@gomeniucivan/ui 1.0.17 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,50 +1,10 @@
1
- 'use strict';var X=require('react'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactTable=require('@tanstack/react-table'),radixUi=require('radix-ui'),classVarianceAuthority=require('class-variance-authority'),reactDayPicker=require('react-day-picker'),rg=require('embla-carousel-react'),sonner=require('sonner'),framerMotion=require('framer-motion'),Yr=require('recharts'),cmdk=require('cmdk'),dateFns=require('date-fns'),vaul=require('vaul'),inputOtp=require('input-otp'),no=require('react-resizable-panels'),core=require('@dnd-kit/core'),modifiers=require('@dnd-kit/modifiers'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),Wd=require('react-dom');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}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 X__namespace=/*#__PURE__*/_interopNamespace(X);var rg__default=/*#__PURE__*/_interopDefault(rg);var Yr__namespace=/*#__PURE__*/_interopNamespace(Yr);var no__namespace=/*#__PURE__*/_interopNamespace(no);var Wd__namespace=/*#__PURE__*/_interopNamespace(Wd);function $s(e){return typeof document=="undefined"?[]:Array.from(document.querySelectorAll(e))}function bR(e){for(let t of $s('[data-slot="sidebar-inset"]'))t.dataset.contentLayout=e;}function wR(e){for(let t of $s("header[data-navbar-style]"))t.dataset.navbarStyle=e;}var qs={fieldCy:false,fieldName:false},Ks=qs,la=new Map,jr=[],Ys=()=>{let e=jr[jr.length-1];Ks=e?la.get(e):qs;},Xs=()=>Symbol("theme-extras-provider"),Js=()=>Ks,Zs=(e,t)=>{let r={fieldCy:t.fieldCy,fieldName:t.fieldName};la.set(e,r),jr.includes(e)||jr.push(e),Ys();},Qs=e=>{if(!la.has(e))return;la.delete(e);let t=jr.indexOf(e);t!==-1&&jr.splice(t,1),Ys();};var um=new Set(["input","select","textarea","form","button"]),Fn=(e,t)=>{if(t===null||typeof t!="object"||typeof e!="string")return t;let r=Js(),o=!r.fieldCy,n=!r.fieldName&&um.has(e);if(!o&&!n)return t;let i=t,s=null,l=()=>(s||(s={...i}),s);if(o&&Object.prototype.hasOwnProperty.call(i,"data-cy")){let c=l();delete c["data-cy"];}if(n&&Object.prototype.hasOwnProperty.call(i,"name")){let c=l();delete c.name;}return s!=null?s:i};var a=(e,t,r)=>jsxRuntime.jsx(e,Fn(e,t),r),w=(e,t,r)=>jsxRuntime.jsxs(e,Fn(e,t),r);var Hn=X.createContext(null),Po=null;function zn(){return typeof window=="undefined"?"/":window.location.pathname||"/"}function tl({children:e}){let[t,r]=X.useState(()=>zn()),o=X.useCallback((i,s={})=>{typeof window!="undefined"&&(s.replace?window.history.replaceState(null,"",i):window.history.pushState(null,"",i),r(zn()));},[]);X.useEffect(()=>{Po=o;let i=()=>{r(zn());};return window.addEventListener("popstate",i),()=>{window.removeEventListener("popstate",i),Po===o&&(Po=null);}},[o]);let n=X.useMemo(()=>({pathname:t,navigate:o}),[t,o]);return a(Hn.Provider,{value:n,children:e})}function NR(){let e=X.useContext(Hn);if(!e)throw new Error("usePathname must be used within a RouterProvider");return e.pathname}function ER(){let e=X.useContext(Hn);if(!e)throw new Error("useNavigate must be used within a RouterProvider");return e.navigate}function rl(e){if(Po){Po(e,{replace:true});return}typeof window!="undefined"&&window.location.replace(e);}var ol=["auto","light","dark"],wm=[{label:"Default",value:"default",primary:{light:"oklch(0.205 0 0)",dark:"oklch(0.922 0 0)"}},{label:"Brutalist",value:"brutalist",primary:{light:"oklch(0.6489 0.2370 26.9728)",dark:"oklch(0.7044 0.1872 23.1858)"}},{label:"Soft Pop",value:"soft-pop",primary:{light:"oklch(0.5106 0.2301 276.9656)",dark:"oklch(0.6801 0.1583 276.9349)"}},{label:"Tangerine",value:"tangerine",primary:{light:"oklch(0.64 0.17 36.44)",dark:"oklch(0.64 0.17 36.44)"}}],IR=wm.map(e=>e.value);var Wr="gi_theme",ca="gi-theme-mode-change",xm=new Set(ol);function Bn(){return typeof window!="undefined"?window:void 0}function Vn(){return typeof document!="undefined"?document.documentElement:null}function ym(){var t,r,o;let e=Bn();return e&&(o=(r=(t=e.matchMedia)==null?void 0:t.call(e,"(prefers-color-scheme: dark)"))==null?void 0:r.matches)!=null?o:false}function Ur(e){return typeof e=="string"&&xm.has(e)}function So(e){return e==="auto"?ym()?"dark":"light":e}function da(e){let t=Vn();if(!t)return;let r=So(e);t.dataset.themeMode=e,t.dataset.themeModeResolved=r,t.classList.toggle("dark",r==="dark");}function al(e="auto"){var r;da(e);let t=Bn();if(t){try{(r=t.localStorage)==null||r.setItem(Wr,e);}catch{}t.dispatchEvent(new CustomEvent(ca,{detail:e}));}}function AR(){var n,i;let e=Vn(),t=(n=e==null?void 0:e.dataset)==null?void 0:n.themeMode;if(Ur(t))return t;let r=Bn(),o=(i=r==null?void 0:r.localStorage)==null?void 0:i.getItem(Wr);return Ur(o)?o:"auto"}function FR(e){let t=Vn();t&&(t.dataset.themePreset=e);}function f(...e){return tailwindMerge.twMerge(clsx.clsx(e))}function VR(e,t={}){let{currency:r="USD",noDecimals:o=false}=t;return new Intl.NumberFormat("en-US",{style:"currency",currency:r,minimumFractionDigits:o?0:2,maximumFractionDigits:o?0:2}).format(e)}function jR(e){return e.split(" ").filter(Boolean).map(t=>{var r,o;return (o=(r=t[0])==null?void 0:r.toUpperCase())!=null?o:""}).join("").slice(0,2)}function GR(e){let t=new Set,r={};function o(){return r}function n(s){let l=r,c=typeof s=="function"?s(l):s;if(!c)return;let u=false,d={...l};for(let[m,v]of Object.entries(c)){let g=m,h=v;Object.is(d[g],h)||(u=true,d[g]=h);}u&&(r=d,t.forEach(m=>m(d,l)));}r=e(n,o);function i(s){return t.add(s),()=>t.delete(s)}return {getState:o,setState:n,subscribe:i}}function $R(e,t){return X.useSyncExternalStore(r=>e.subscribe(()=>r()),()=>t(e.getState()),()=>t(e.getState()))}var It="h-10 md:h-9";var ua=false,$r=false,Gr=null,Pm=()=>typeof window!="undefined"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,nl=e=>{if(!e||typeof e.scrollIntoView!="function")return;let t=Pm(),r=()=>e.scrollIntoView({behavior:t?"auto":"smooth",block:"center",inline:"nearest"});if(typeof window!="undefined"&&typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(r);return}r();},Sm=e=>{if(typeof window=="undefined")return;let t=window.visualViewport;if(!t)return;let r=null,o,n=false,i,s=()=>{t.removeEventListener("resize",l),t.removeEventListener("scroll",l),typeof i=="number"&&window.clearTimeout(i),r!==null&&typeof window.cancelAnimationFrame=="function"&&(window.cancelAnimationFrame(r),r=null),typeof o=="number"&&(window.clearTimeout(o),o=void 0),n=false;},l=()=>{if(typeof document!="undefined"&&document.activeElement!==e||!e.isConnected){s();return}let c=()=>{r=null,il(e)||(s(),nl(e));};if(!n){if(n=true,typeof window.requestAnimationFrame=="function"){r=window.requestAnimationFrame(()=>{n=false,r=null,c();});return}o=window.setTimeout(()=>{o=void 0,n=false,c();},0);}};t.addEventListener("resize",l,{passive:true}),t.addEventListener("scroll",l,{passive:true}),i=window.setTimeout(s,700);},Tm=(e,t)=>{let r=e.height+e.offsetTop,o=t-r;return Math.max(0,o)},Mm=()=>{if(ua)return Promise.resolve(true);if($r)return Promise.resolve(false);if(typeof window=="undefined")return $r=true,Promise.resolve(false);let e=window.visualViewport;return e?Gr||(Gr=new Promise(t=>{let r=false,o,n=Math.max(e.height+e.offsetTop,typeof window!="undefined"?window.innerHeight:0),i=l=>{r||(r=true,e.removeEventListener("resize",s),e.removeEventListener("scroll",s),typeof o=="number"&&window.clearTimeout(o),l?ua=true:$r=true,t(l));},s=()=>{Tm(e,n)>80&&i(true);};o=window.setTimeout(()=>i(false),600),s(),r||(e.addEventListener("resize",s,{passive:true}),e.addEventListener("scroll",s,{passive:true}));}).finally(()=>{Gr=null;}),Gr):($r=true,Promise.resolve(false))},il=e=>{if(typeof window=="undefined")return true;let t=e.getBoundingClientRect(),r=window.visualViewport;if(!r){let i=window.innerHeight||0;return t.top>=0&&t.bottom<=i}let o=r.offsetTop,n=o+r.height;return t.top>=o&&t.bottom<=n},pa=e=>{e&&Mm().then(t=>{if(!t||typeof document!="undefined"&&document.activeElement!==e||!e.isConnected)return;if(il(e)){Sm(e);return}let r=()=>nl(e);if(typeof window!="undefined"&&typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(r);return}r();});},YR={get isVirtualKeyboardLikelyDevice(){return ua},get hasAttemptedVirtualKeyboardDetection(){return $r},reset(){ua=false,$r=false,Gr=null;}};function sl({data:e,columns:t,enableRowSelection:r=true,defaultPageIndex:o,defaultPageSize:n,getRowId:i}){let[s,l]=X__namespace.useState({}),[c,u]=X__namespace.useState({}),[d,m]=X__namespace.useState([]),[v,g]=X__namespace.useState([]),[h,p]=X__namespace.useState({pageIndex:o!=null?o:0,pageSize:n!=null?n:10});return reactTable.useReactTable({data:e,columns:t,state:{sorting:v,columnVisibility:c,rowSelection:s,columnFilters:d,pagination:h},enableRowSelection:r,getRowId:i!=null?i:(x=>x.id.toString()),onRowSelectionChange:l,onSortingChange:g,onColumnFiltersChange:m,onColumnVisibilityChange:u,onPaginationChange:p,getCoreRowModel:reactTable.getCoreRowModel(),getFilteredRowModel:reactTable.getFilteredRowModel(),getPaginationRowModel:reactTable.getPaginationRowModel(),getSortedRowModel:reactTable.getSortedRowModel(),getFacetedRowModel:reactTable.getFacetedRowModel(),getFacetedUniqueValues:reactTable.getFacetedUniqueValues()})}function ik({...e}){return a(radixUi.Accordion.Root,{"data-slot":"accordion",...e})}function sk({className:e,...t}){return a(radixUi.Accordion.Item,{"data-slot":"accordion-item",className:f("border-b last:border-b-0",e),...t})}function lk({className:e,children:t,...r}){return a(radixUi.Accordion.Header,{className:"flex",children:w(radixUi.Accordion.Trigger,{"data-slot":"accordion-trigger",className:f("focus-visible:border-primary focus-visible:ring-primary/40 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,a(lucideReact.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function ck({className:e,children:t,...r}){return a(radixUi.Accordion.Content,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...r,children:a("div",{className:f("pt-0 pb-4",e),children:t})})}var zm=classVarianceAuthority.cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function mk({className:e,variant:t,...r}){return a("div",{"data-slot":"alert",role:"alert",className:f(zm({variant:t}),e),...r})}function gk({className:e,...t}){return a("div",{"data-slot":"alert-title",className:f("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function vk({className:e,...t}){return a("div",{"data-slot":"alert-description",className:f("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}var $t=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),te=X__namespace.forwardRef(({className:e,variant:t,size:r,asChild:o=false,loading:n=false,loadingText:i,children:s,disabled:l,...c},u)=>{let d=o?radixUi.Slot.Slot:"button";return w(d,{"data-slot":"button",className:f($t({variant:t,size:r,className:e}),n?"relative":"disabled:opacity-50"),disabled:n||l,"data-loading":n?"":void 0,ref:u,...c,children:[a("span",{className:f("pointer-events-none inline-flex items-center justify-center gap-2 w-full",n&&"invisible"),children:s}),n?w("span",{className:"pointer-events-none absolute inset-0 inline-flex items-center justify-center gap-2",children:[i!=null?i:a(lucideReact.Loader2,{className:"size-4 animate-spin","aria-hidden":"true"}),a("span",{className:"sr-only",children:typeof i=="string"?i:"Loading"})]}):null]})});te.displayName="Button";function Mk({...e}){return a(radixUi.AlertDialog.Root,{"data-slot":"alert-dialog",...e})}function Nk({...e}){return a(radixUi.AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function jm({...e}){return a(radixUi.AlertDialog.Portal,{"data-slot":"alert-dialog-portal",...e})}function Um({className:e,...t}){return a(radixUi.AlertDialog.Overlay,{"data-slot":"alert-dialog-overlay",className:f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Ek({className:e,...t}){return w(jm,{children:[a(Um,{}),a(radixUi.AlertDialog.Content,{"data-slot":"alert-dialog-content",className:f("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function Dk({className:e,...t}){return a("div",{"data-slot":"alert-dialog-header",className:f("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Lk({className:e,...t}){return a("div",{"data-slot":"alert-dialog-footer",className:f("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ik({className:e,...t}){return a(radixUi.AlertDialog.Title,{"data-slot":"alert-dialog-title",className:f("text-lg font-semibold",e),...t})}function _k({className:e,...t}){return a(radixUi.AlertDialog.Description,{"data-slot":"alert-dialog-description",className:f("text-muted-foreground text-sm",e),...t})}function Ok({className:e,...t}){return a(radixUi.AlertDialog.Action,{className:f($t(),e),...t})}function Ak({className:e,...t}){return a(radixUi.AlertDialog.Cancel,{className:f($t({variant:"outline"}),e),...t})}function Bk({...e}){return a(radixUi.AspectRatio.Root,{"data-slot":"aspect-ratio",...e})}function Gk({className:e,...t}){return a(radixUi.Avatar.Root,{"data-slot":"avatar",className:f("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function $k({className:e,...t}){return a(radixUi.Avatar.Image,{"data-slot":"avatar-image",className:f("aspect-square size-full",e),...t})}function qk({className:e,...t}){return a(radixUi.Avatar.Fallback,{"data-slot":"avatar-fallback",className:f("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var qm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function cl({className:e,variant:t,asChild:r=false,...o}){let n=r?radixUi.Slot.Slot:"span";return a(n,{"data-slot":"badge",className:f(qm({variant:t}),e),...o})}function aC({...e}){return a("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function nC({className:e,...t}){return a("ol",{"data-slot":"breadcrumb-list",className:f("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function iC({className:e,...t}){return a("li",{"data-slot":"breadcrumb-item",className:f("inline-flex items-center gap-1.5",e),...t})}function sC({asChild:e,className:t,...r}){let o=e?radixUi.Slot.Slot:"a";return a(o,{"data-slot":"breadcrumb-link",className:f("hover:text-foreground transition-colors",t),...r})}function lC({className:e,...t}){return a("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:f("text-foreground font-normal",e),...t})}function cC({children:e,className:t,...r}){return a("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:f("[&>svg]:size-3.5",t),...r,children:e!=null?e:a(lucideReact.ChevronRight,{})})}function dC({className:e,...t}){return w("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:f("flex size-9 items-center justify-center",e),...t,children:[a(lucideReact.MoreHorizontal,{className:"size-4"}),a("span",{className:"sr-only",children:"More"})]})}function bC({className:e,classNames:t,showOutsideDays:r=true,captionLayout:o="label",buttonVariant:n="ghost",formatters:i,components:s,...l}){let c=reactDayPicker.getDefaultClassNames();return a(reactDayPicker.DayPicker,{showOutsideDays:r,className:f("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:o,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...i},classNames:{root:f("w-fit",c.root),months:f("flex gap-4 flex-col md:flex-row relative",c.months),month:f("flex flex-col w-full gap-4",c.month),nav:f("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",c.nav),button_previous:f($t({variant:n}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_previous),button_next:f($t({variant:n}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_next),month_caption:f("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",c.month_caption),dropdowns:f("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",c.dropdowns),dropdown_root:f("relative has-focus:border-primary border border-input shadow-xs has-focus:ring-primary/40 has-focus:ring-[3px] rounded-md",c.dropdown_root),dropdown:f("absolute bg-popover inset-0 opacity-0",c.dropdown),caption_label:f("select-none font-medium",o==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:f("flex",c.weekdays),weekday:f("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",c.weekday),week:f("flex w-full mt-2",c.week),week_number_header:f("select-none w-(--cell-size)",c.week_number_header),week_number:f("text-[0.8rem] select-none text-muted-foreground",c.week_number),day:f("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",c.day),range_start:f("rounded-l-md bg-accent",c.range_start),range_middle:f("rounded-none",c.range_middle),range_end:f("rounded-r-md bg-accent",c.range_end),today:f("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:f("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:f("text-muted-foreground opacity-50",c.disabled),hidden:f("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:d,...m})=>a("div",{"data-slot":"calendar",ref:d,className:f(u),...m}),Chevron:({className:u,orientation:d,...m})=>d==="left"?a(lucideReact.ChevronLeftIcon,{className:f("size-4",u),...m}):d==="right"?a(lucideReact.ChevronRightIcon,{className:f("size-4",u),...m}):a(lucideReact.ChevronDownIcon,{className:f("size-4",u),...m}),DayButton:tg,WeekNumber:({children:u,...d})=>a("td",{...d,children:a("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:u})}),...s},...l})}function tg({className:e,day:t,modifiers:r,...o}){let n=reactDayPicker.getDefaultClassNames(),i=X__namespace.useRef(null);return X__namespace.useEffect(()=>{var s;r.focused&&((s=i.current)==null||s.focus());},[r.focused]),a(te,{ref:i,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:f("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-primary group-data-[focused=true]/day:ring-primary/40 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",n.day,e),...o})}function RC({className:e,...t}){return a("div",{"data-slot":"card",className:f("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6",e),...t})}function kC({className:e,...t}){return a("div",{"data-slot":"card-header",className:f("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function CC({className:e,...t}){return a("div",{"data-slot":"card-title",className:f("leading-none font-semibold",e),...t})}function PC({className:e,...t}){return a("div",{"data-slot":"card-description",className:f("text-muted-foreground text-sm",e),...t})}function SC({className:e,...t}){return a("div",{"data-slot":"card-action",className:f("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function TC({className:e,...t}){return a("div",{"data-slot":"card-content",className:f("px-6",e),...t})}function MC({className:e,...t}){return a("div",{"data-slot":"card-footer",className:f("flex items-center px-6 [.border-t]:pt-6",e),...t})}var ul=X__namespace.createContext(null);function ma(){let e=X__namespace.useContext(ul);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function OC({orientation:e="horizontal",opts:t,setApi:r,plugins:o,className:n,children:i,...s}){let[l,c]=rg__default.default({...t,axis:e==="horizontal"?"x":"y"},o),[u,d]=X__namespace.useState(false),[m,v]=X__namespace.useState(false),g=X__namespace.useCallback(x=>{x&&(d(x.canScrollPrev()),v(x.canScrollNext()));},[]),h=X__namespace.useCallback(()=>{c==null||c.scrollPrev();},[c]),p=X__namespace.useCallback(()=>{c==null||c.scrollNext();},[c]),b=X__namespace.useCallback(x=>{x.key==="ArrowLeft"?(x.preventDefault(),h()):x.key==="ArrowRight"&&(x.preventDefault(),p());},[h,p]);return X__namespace.useEffect(()=>{!c||!r||r(c);},[c,r]),X__namespace.useEffect(()=>{if(c)return g(c),c.on("reInit",g),c.on("select",g),()=>{c==null||c.off("select",g);}},[c,g]),a(ul.Provider,{value:{carouselRef:l,api:c,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:h,scrollNext:p,canScrollPrev:u,canScrollNext:m},children:a("div",{onKeyDownCapture:b,className:f("relative",n),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...s,children:i})})}function AC({className:e,...t}){let{carouselRef:r,orientation:o}=ma();return a("div",{ref:r,className:"overflow-hidden","data-slot":"carousel-content",children:a("div",{className:f("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function FC({className:e,...t}){let{orientation:r}=ma();return a("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:f("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})}function zC({className:e,variant:t="outline",size:r="icon",...o}){let{orientation:n,scrollPrev:i,canScrollPrev:s}=ma();return w(te,{"data-slot":"carousel-previous",variant:t,size:r,className:f("absolute size-8 rounded-full",n==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...o,children:[a(lucideReact.ArrowLeft,{}),a("span",{className:"sr-only",children:"Previous slide"})]})}function HC({className:e,variant:t="outline",size:r="icon",...o}){let{orientation:n,scrollNext:i,canScrollNext:s}=ma();return w(te,{"data-slot":"carousel-next",variant:t,size:r,className:f("absolute size-8 rounded-full",n==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...o,children:[a(lucideReact.ArrowRight,{}),a("span",{className:"sr-only",children:"Next slide"})]})}var ig=50,sg=10;function ml(e){let t=X.useRef(null),r=X.useRef(null),[o,n]=X.useState(true),i=()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight);},s=()=>{if(t.current){let{scrollTop:c,scrollHeight:u,clientHeight:d}=t.current,m=Math.abs(u-c-d),v=r.current?c<r.current:false,g=r.current?r.current-c:0;if(v&&g>sg)n(false);else {let p=m<ig;n(p);}r.current=c;}},l=()=>{n(false);};return X.useEffect(()=>{t.current&&(r.current=t.current.scrollTop);},[]),X.useEffect(()=>{o&&i();},e),{containerRef:t,scrollToBottom:i,handleScroll:s,shouldAutoScroll:o,handleTouchStart:l}}function vl({text:e,copyMessage:t="Copied to clipboard!"}){let[r,o]=X.useState(false),n=X.useRef(null),i=X.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{sonner.toast.success(t),o(true),n.current&&(clearTimeout(n.current),n.current=null),n.current=setTimeout(()=>{o(false);},2e3);}).catch(()=>{sonner.toast.error("Failed to copy to clipboard.");});},[e,t]);return {isCopied:r,handleCopy:i}}function Un({content:e,copyMessage:t}){let{isCopied:r,handleCopy:o}=vl({text:e,copyMessage:t});return w(te,{variant:"ghost",size:"icon",className:"relative h-6 w-6","aria-label":"Copy to clipboard",onClick:o,children:[a("div",{className:"absolute inset-0 flex items-center justify-center",children:a(lucideReact.Check,{className:f("h-4 w-4 transition-transform ease-in-out",r?"scale-100":"scale-0")})}),a(lucideReact.Copy,{className:f("h-4 w-4 transition-transform ease-in-out",r?"scale-0":"scale-100")})]})}function hl({ref:e,maxHeight:t=Number.MAX_SAFE_INTEGER,borderWidth:r=0,dependencies:o}){let n=X.useRef(null);X.useLayoutEffect(()=>{if(!e.current)return;let i=e.current,s=r*2;n.current===null&&(n.current=i.scrollHeight-s),i.style.removeProperty("height");let l=i.scrollHeight,c=Math.min(l,t),u=Math.max(c,n.current);i.style.height=`${u+s}px`;},[t,e,...o]);}var No=X__namespace.default.forwardRef((e,t)=>e.file.type.startsWith("image/")?a(bl,{...e,ref:t}):e.file.type.startsWith("text/")||e.file.name.endsWith(".txt")||e.file.name.endsWith(".md")?a(wl,{...e,ref:t}):a(xl,{...e,ref:t}));No.displayName="FilePreview";var bl=X__namespace.default.forwardRef(({file:e,onRemove:t},r)=>w(framerMotion.motion.div,{ref:r,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:true,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[w("div",{className:"flex w-full items-center space-x-2",children:[a("img",{alt:`Attachment ${e.name}`,className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted object-cover",src:URL.createObjectURL(e)}),a("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?a("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:a(lucideReact.X,{className:"h-2.5 w-2.5"})}):null]}));bl.displayName="ImageFilePreview";var wl=X__namespace.default.forwardRef(({file:e,onRemove:t},r)=>{let[o,n]=X__namespace.default.useState("");return X.useEffect(()=>{let i=new FileReader;i.onload=s=>{var c;let l=(c=s.target)==null?void 0:c.result;n(l.slice(0,50)+(l.length>50?"...":""));},i.readAsText(e);},[e]),w(framerMotion.motion.div,{ref:r,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:true,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[w("div",{className:"flex w-full items-center space-x-2",children:[a("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted p-0.5",children:a("div",{className:"h-full w-full overflow-hidden text-[6px] leading-none text-muted-foreground",children:o||"Loading..."})}),a("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?a("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:a(lucideReact.X,{className:"h-2.5 w-2.5"})}):null]})});wl.displayName="TextFilePreview";var xl=X__namespace.default.forwardRef(({file:e,onRemove:t},r)=>w(framerMotion.motion.div,{ref:r,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:true,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[w("div",{className:"flex w-full items-center space-x-2",children:[a("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted",children:a(lucideReact.FileIcon,{className:"h-6 w-6 text-foreground"})}),a("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?a("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:a(lucideReact.X,{className:"h-2.5 w-2.5"})}):null]}));xl.displayName="GenericFilePreview";function $n(e){if(e.allowAttachments){let{allowAttachments:o,files:n,setFiles:i,...s}=e;return a(yl,{...s,allowAttachments:true,files:n,setFiles:i})}let{allowAttachments:t,...r}=e;return a(yl,{...r,allowAttachments:false,files:null})}$n.displayName="MessageInput";function yl({placeholder:e="Ask AI...",className:t,submitOnEnter:r=true,stop:o,isGenerating:n,allowAttachments:i,files:s,setFiles:l,onKeyDown:c,value:u,...d}){let m=X.useRef(null),[v,g]=X.useState(false),h=i&&!!s&&s.length>0;hl({ref:m,maxHeight:240,borderWidth:1,dependencies:[u,h]});let p=X.useCallback(k=>{!i||!l||!(k!=null&&k.length)||l(M=>M!=null&&M.length?[...M,...k]:k);},[i,l]),b=X.useCallback(k=>{!i||!l||l(M=>{if(!M)return null;let N=M.filter(D=>D!==k);return N.length>0?N:null});},[i,l]),x=X.useCallback(k=>{i&&(k.preventDefault(),g(true));},[i]),y=X.useCallback(k=>{i&&(k.preventDefault(),g(false));},[i]),C=X.useCallback(k=>{if(!i)return;k.preventDefault(),g(false);let M=Array.from(k.dataTransfer.files);p(M);},[p,i]),R=X.useCallback(k=>{var P;if(!i)return;let M=(P=k.clipboardData)==null?void 0:P.items;if(!M)return;let N=k.clipboardData.getData("text");if(N&&N.length>500){k.preventDefault();let T=new Blob([N],{type:"text/plain"}),O=new File([T],"Pasted text",{type:"text/plain",lastModified:Date.now()});p([O]);return}let D=Array.from(M).map(T=>T.getAsFile()).filter(T=>T!==null);D.length>0&&(k.preventDefault(),p(D));},[p,i]),S=X.useCallback(k=>{var M;r&&k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),n&&o&&o(),(M=k.currentTarget.form)==null||M.requestSubmit()),c==null||c(k);},[n,c,o,r]);return w("div",{className:"relative flex w-full",onDragOver:x,onDragLeave:y,onDrop:C,children:[a("div",{className:"relative flex w-full items-center space-x-2",children:w("div",{className:"relative flex-1",children:[a("textarea",{"aria-label":"Write your prompt here",placeholder:e,ref:m,onPaste:R,onKeyDown:S,className:f("z-10 w-full grow resize-none rounded-xl border border-input bg-background p-3 pr-24 text-sm ring-offset-background transition-[border] placeholder:text-muted-foreground focus-visible:border-primary focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",h&&"pb-16",t),value:u,...d}),i&&a("div",{className:"absolute inset-x-3 bottom-0 z-20 overflow-x-auto py-3",children:a("div",{className:"flex space-x-3",children:a(framerMotion.AnimatePresence,{mode:"popLayout",children:s==null?void 0:s.map(k=>a(No,{file:k,onRemove:()=>b(k)},k.name+String(k.lastModified)))})})})]})}),w("div",{className:"absolute right-3 top-3 z-20 flex gap-2",children:[i&&a(te,{type:"button",size:"icon",variant:"outline",className:"h-8 w-8","aria-label":"Attach a file",onClick:async()=>{let k=await kg();p(k);},children:a(lucideReact.Paperclip,{className:"h-4 w-4"})}),n&&o?a(te,{type:"button",size:"icon",className:"h-8 w-8","aria-label":"Stop generating",onClick:o,children:a(lucideReact.Square,{className:"h-3 w-3 animate-pulse",fill:"currentColor"})}):a(te,{type:"submit",size:"icon",className:"h-8 w-8 transition-opacity","aria-label":"Send message",disabled:u.trim()===""&&(!i||!(s!=null&&s.length))||n,children:a(lucideReact.ArrowUp,{className:"h-5 w-5"})})]}),i&&a(Rg,{isDragging:v})]})}function Rg({isDragging:e}){return a(framerMotion.AnimatePresence,{children:e&&w(framerMotion.motion.div,{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center space-x-2 rounded-xl border border-dashed border-border bg-background text-sm text-muted-foreground",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},"aria-hidden":true,children:[a(lucideReact.Paperclip,{className:"h-4 w-4"}),a("span",{children:"Drop your files here to attach them."})]})})}function kg(){let e=document.createElement("input");return e.type="file",e.multiple=true,e.accept="*/*",e.click(),new Promise(t=>{e.onchange=r=>{let n=r.currentTarget.files;if(n){t(Array.from(n));return}t(null);};})}function Cl({...e}){return a(radixUi.Collapsible.Root,{"data-slot":"collapsible",...e})}function Pl({...e}){return a(radixUi.Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function Sl({...e}){return a(radixUi.Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",...e})}var Tg={h1:["text-2xl","font-semibold"],h2:["text-xl","font-semibold"],h3:["text-lg","font-semibold"],h4:["text-base","font-semibold"],h5:["text-sm","font-semibold"],h6:["text-sm","font-semibold"],p:["whitespace-pre-wrap"],ul:["list-disc","space-y-1.5","pl-6"],ol:["list-decimal","space-y-1.5","pl-6"],li:["leading-relaxed"],blockquote:["border-l-2","border-primary/60","pl-4","italic","text-muted-foreground"],table:["w-full","border-collapse","overflow-hidden","rounded-md","border"],th:["border","border-foreground/20","bg-muted/50","px-4","py-2","text-left","font-semibold"],td:["border","border-foreground/20","px-4","py-2","align-top"],tr:["even:bg-muted/40"],hr:["my-4","border-foreground/20"],img:["rounded-md","border","max-w-full"],strong:["font-semibold"],em:["italic"]},Mg="absolute right-2 top-2 rounded-md border bg-background/80 px-2 py-1 text-xs font-medium shadow-sm backdrop-blur transition hover:bg-background",Ng=["relative","overflow-x-auto","rounded-md","border","bg-background/50","p-4","font-mono","text-sm"];function Kr({children:e,className:t}){let r=X.useRef(null),o=X.useMemo(()=>Eg(e!=null?e:""),[e]);return X.useEffect(()=>{let n=r.current;if(!n)return;Dg(n);let i=Lg(n);return ()=>{i();}},[o]),a("div",{ref:r,className:f("space-y-4 text-sm leading-relaxed",t),dangerouslySetInnerHTML:{__html:o}})}Kr.displayName="HtmlRenderer";var xP=Kr;function Eg(e){return e?e.replace(/<(script|style|iframe|object|embed|link|meta)[^>]*>[\s\S]*?<\/\1>/gi,"").replace(/<(script|style|iframe|object|embed|link|meta)[^>]*\/>/gi,"").replace(/<(script|style|iframe|object|embed|link|meta)[^>]*>/gi,"").replace(/ on[a-z]+="[^"]*"/gi,"").replace(/ on[a-z]+='[^']*'/gi,"").replace(/javascript:/gi,""):""}function Dg(e){Object.entries(Tg).forEach(([t,r])=>{e.querySelectorAll(t).forEach(o=>{r.forEach(n=>o.classList.add(n));});}),e.querySelectorAll("a").forEach(t=>{var o,n;t.classList.add("text-primary","underline","underline-offset-4");let r=(o=t.getAttribute("href"))!=null?o:"";if(/^javascript:/i.test(r)&&t.removeAttribute("href"),t.getAttribute("target")==="_blank"){let i=(n=t.getAttribute("rel"))!=null?n:"";/noopener|noreferrer/i.test(i)||t.setAttribute("rel",`${i} noopener noreferrer`.trim());}}),e.querySelectorAll("code").forEach(t=>{var r;((r=t.parentElement)==null?void 0:r.tagName)!=="PRE"&&t.classList.add("rounded","bg-muted/70","px-1.5","py-0.5","font-mono","text-[0.85em]");}),e.querySelectorAll("table").forEach(t=>{var o;if(t.parentElement&&t.parentElement.dataset.htmlRendererTable==="true")return;let r=document.createElement("div");r.dataset.htmlRendererTable="true",r.className="overflow-x-auto rounded-md border border-foreground/20",(o=t.parentElement)==null||o.insertBefore(r,t),r.appendChild(t);});}function Lg(e){let t=[];return e.querySelectorAll("button[data-html-renderer-copy]").forEach(r=>{r.remove();}),e.querySelectorAll("pre").forEach(r=>{Ng.forEach(c=>r.classList.add(c));let o=document.createElement("button");o.type="button",o.dataset.htmlRendererCopy="true",o.textContent="Copy",o.className=Mg;let n="Copy",i="Copied!",s="Copy failed",l=async()=>{var u;let c=(u=r.textContent)!=null?u:"";try{if(navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(c.trimEnd()),o.textContent=i;else throw new Error("Clipboard API unavailable")}catch(d){console.error(d),o.textContent=s;}window.setTimeout(()=>{o.textContent=n;},1500);};o.addEventListener("click",l),r.appendChild(o),t.push(()=>{o.removeEventListener("click",l),o.remove();});}),()=>{t.forEach(r=>r());}}var Kn=classVarianceAuthority.cva("group/message relative break-words rounded-lg p-3 text-sm sm:max-w-[70%]",{variants:{isUser:{true:"bg-primary text-primary-foreground",false:"bg-muted text-foreground"},animation:{none:"",slide:"duration-300 animate-in fade-in-0",scale:"duration-300 animate-in fade-in-0 zoom-in-75",fade:"duration-500 animate-in fade-in-0"}},compoundVariants:[{isUser:true,animation:"slide",class:"slide-in-from-right"},{isUser:false,animation:"slide",class:"slide-in-from-left"},{isUser:true,animation:"scale",class:"origin-bottom-right"},{isUser:false,animation:"scale",class:"origin-bottom-left"}]}),Ml=({role:e,content:t,createdAt:r,showTimeStamp:o=false,animation:n="scale",actions:i,experimental_attachments:s,toolInvocations:l,parts:c})=>{let u=X.useMemo(()=>s==null?void 0:s.map(v=>{var p;let g=jg(v.url);return new File([g],(p=v.name)!=null?p:"Unknown",{type:v.contentType})}),[s]),d=e==="user",m=r==null?void 0:r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return d?w("div",{className:f("flex flex-col",d?"items-end":"items-start"),children:[u?a("div",{className:"mb-1 flex flex-wrap gap-2",children:u.map((v,g)=>a(No,{file:v},g))}):null,a("div",{className:f(Kn({isUser:d,animation:n})),children:a(Kr,{children:t})}),o&&r?a("time",{dateTime:r.toISOString(),className:f("mt-1 block px-1 text-xs opacity-50",n!=="none"&&"duration-500 animate-in fade-in-0"),children:m}):null]}):c&&c.length>0?c.map((v,g)=>v.type==="text"?w("div",{className:f("flex flex-col",d?"items-end":"items-start"),children:[w("div",{className:f(Kn({isUser:d,animation:n})),children:[a(Kr,{children:v.text}),i?a("div",{className:"absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100",children:i}):null]}),o&&r?a("time",{dateTime:r.toISOString(),className:f("mt-1 block px-1 text-xs opacity-50",n!=="none"&&"duration-500 animate-in fade-in-0"),children:m}):null]},`text-${g}`):v.type==="reasoning"?a(Ug,{part:v},`reasoning-${g}`):v.type==="tool-invocation"?a(Tl,{toolInvocations:[v.toolInvocation]},`tool-${g}`):null):l&&l.length>0?a(Tl,{toolInvocations:l}):w("div",{className:f("flex flex-col",d?"items-end":"items-start"),children:[w("div",{className:f(Kn({isUser:d,animation:n})),children:[a(Kr,{children:t}),i?a("div",{className:"absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100",children:i}):null]}),o&&r?a("time",{dateTime:r.toISOString(),className:f("mt-1 block px-1 text-xs opacity-50",n!=="none"&&"duration-500 animate-in fade-in-0"),children:m}):null]})};function jg(e){let[,t=""]=e.split(",");if(!t)return new Uint8Array;if(typeof atob=="function"){let r=atob(t),o=new Uint8Array(r.length);for(let n=0;n<r.length;n+=1)o[n]=r.charCodeAt(n);return o}return typeof Buffer!="undefined"?new Uint8Array(Buffer.from(t,"base64")):new Uint8Array}var Ug=({part:e})=>{let[t,r]=X.useState(false);return a("div",{className:"mb-2 flex flex-col items-start sm:max-w-[70%]",children:w(Cl,{open:t,onOpenChange:r,className:"group w-full overflow-hidden rounded-lg border bg-muted/50",children:[a("div",{className:"flex items-center p-2",children:a(Pl,{asChild:true,children:w("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[a(lucideReact.ChevronRight,{className:"h-4 w-4 transition-transform group-data-[state=open]:rotate-90"}),a("span",{children:"Thinking"})]})})}),a(Sl,{forceMount:true,children:a(framerMotion.motion.div,{initial:false,animate:t?"open":"closed",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},transition:{duration:.3,ease:[.04,.62,.23,.98]},className:"border-t",children:a("div",{className:"p-2",children:a("div",{className:"whitespace-pre-wrap text-xs",children:e.reasoning})})})})]})})};function Tl({toolInvocations:e}){return e!=null&&e.length?a("div",{className:"flex flex-col items-start gap-2",children:e.map((t,r)=>{if(t.state==="result"&&t.result.__cancelled===true)return w("div",{className:"flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2 text-sm text-muted-foreground",children:[a(lucideReact.Ban,{className:"h-4 w-4"}),w("span",{children:["Cancelled"," ",w("span",{className:"font-mono",children:["`",t.toolName,"`"]})]})]},r);switch(t.state){case "partial-call":case "call":return w("div",{className:"flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2 text-sm text-muted-foreground",children:[a(lucideReact.Terminal,{className:"h-4 w-4"}),w("span",{children:["Calling"," ",w("span",{className:"font-mono",children:["`",t.toolName,"`"]}),"..."]}),a(lucideReact.Loader2,{className:"h-3 w-3 animate-spin"})]},r);case "result":return w("div",{className:"flex flex-col gap-1.5 rounded-lg border bg-muted/50 px-3 py-2 text-sm",children:[w("div",{className:"flex items-center gap-2 text-muted-foreground",children:[a(lucideReact.Code2,{className:"h-4 w-4"}),w("span",{children:["Result from"," ",w("span",{className:"font-mono",children:["`",t.toolName,"`"]})]})]}),a("pre",{className:"overflow-x-auto whitespace-pre-wrap text-foreground",children:JSON.stringify(t.result,null,2)})]},r);default:return null}})}):null}function Nl(){return a("div",{className:"justify-left flex space-x-1",children:a("div",{className:"rounded-lg bg-muted p-3",children:w("div",{className:"flex -space-x-2.5",children:[a(lucideReact.Dot,{className:"h-5 w-5 animate-typing-dot-bounce"}),a(lucideReact.Dot,{className:"h-5 w-5 animate-typing-dot-bounce [animation-delay:90ms]"}),a(lucideReact.Dot,{className:"h-5 w-5 animate-typing-dot-bounce [animation-delay:180ms]"})]})})})}function El({messages:e,showTimeStamps:t=true,isTyping:r=false,messageOptions:o}){return w("div",{className:"space-y-4 overflow-visible",children:[e.map((n,i)=>{let s=typeof o=="function"?o(n):o;return a(Ml,{showTimeStamp:t,...n,...s},i)}),r&&a(Nl,{})]})}function Dl({label:e,append:t,suggestions:r}){return w("div",{className:"space-y-6",children:[a("h2",{className:"text-center text-2xl font-bold",children:e}),a("div",{className:"flex gap-6 text-sm",children:r.map(o=>a("button",{onClick:()=>t({role:"user",content:o}),className:"h-max flex-1 rounded-xl border bg-background p-4 hover:bg-muted",children:a("p",{children:o})},o))})]})}function Yg({messages:e,handleSubmit:t,input:r,handleInputChange:o,stop:n,isGenerating:i,append:s,suggestions:l,className:c,onRateResponse:u,setMessages:d}){let m=e.at(-1),v=e.length===0,g=(m==null?void 0:m.role)==="user",h=X.useRef(e);h.current=e;let p=X.useCallback(()=>{if(n==null||n(),!d)return;let x=[...h.current],y;for(let S=x.length-1;S>=0;S-=1){let k=x[S];if(k.role==="assistant"){y=k;break}}if(!y)return;let C=false,R={...y};if(y.toolInvocations){let S=y.toolInvocations.map(k=>k.state==="call"?(C=true,{...k,state:"result",result:{content:"Tool execution was cancelled",__cancelled:true}}):k);C&&(R={...R,toolInvocations:S});}if(y.parts&&y.parts.length>0){let S=y.parts.map(k=>{if(k.type==="tool-invocation"&&k.toolInvocation.state==="call"){C=true;let M={...k.toolInvocation,state:"result",result:{content:"Tool execution was cancelled",__cancelled:true}};return {...k,toolInvocation:M}}return k});C&&(R={...R,parts:S});}if(C){let S=x.findIndex(k=>k.id===y.id);S!==-1&&(x[S]=R,d(x));}},[n,d,h]),b=X.useCallback(x=>({actions:u?w(jsxRuntime.Fragment,{children:[a("div",{className:"border-r pr-1",children:a(Un,{content:x.content,copyMessage:"Copied response to clipboard!"})}),a(te,{size:"icon",variant:"ghost",className:"h-6 w-6",onClick:()=>u(x.id,"thumbs-up"),children:a(lucideReact.ThumbsUp,{className:"h-4 w-4"})}),a(te,{size:"icon",variant:"ghost",className:"h-6 w-6",onClick:()=>u(x.id,"thumbs-down"),children:a(lucideReact.ThumbsDown,{className:"h-4 w-4"})})]}):a(Un,{content:x.content,copyMessage:"Copied response to clipboard!"})}),[u]);return w(_l,{className:c,children:[v&&s&&l?a(Dl,{label:"Try these prompts \u2728",append:s,suggestions:l}):null,e.length>0?a(Xg,{messages:e,children:a(El,{messages:e,isTyping:g,messageOptions:b})}):null,a(Ol,{className:"mt-auto",handleSubmit:t,children:({files:x,setFiles:y})=>a($n,{value:r,onChange:o,allowAttachments:true,files:x,setFiles:y,stop:p,isGenerating:i})})]})}Yg.displayName="Chat";function Xg({messages:e,children:t}){let{containerRef:r,scrollToBottom:o,handleScroll:n,shouldAutoScroll:i,handleTouchStart:s}=ml([e]);return w("div",{className:"grid grid-cols-1 overflow-y-auto pb-4",ref:r,onScroll:n,onTouchStart:s,children:[a("div",{className:"max-w-full [grid-column:1/1] [grid-row:1/1]",children:t}),!i&&a("div",{className:"pointer-events-none flex flex-1 items-end justify-end [grid-column:1/1] [grid-row:1/1]",children:a("div",{className:"sticky bottom-0 left-0 flex w-full justify-end",children:a(te,{onClick:o,className:"pointer-events-auto h-8 w-8 rounded-full ease-in-out animate-in fade-in-0 slide-in-from-bottom-1",size:"icon",variant:"ghost",children:a(lucideReact.ArrowDown,{className:"h-4 w-4"})})})})]})}var _l=X.forwardRef(({className:e,...t},r)=>a("div",{ref:r,className:f("grid max-h-full w-full grid-rows-[1fr_auto]",e),...t}));_l.displayName="ChatContainer";var Ol=X.forwardRef(({children:e,handleSubmit:t,className:r},o)=>{let[n,i]=X.useState(null);return a("form",{ref:o,onSubmit:l=>{if(!n){t(l);return}let c=Jg(n);t(l,{experimental_attachments:c}),i(null);},className:r,children:e({files:n,setFiles:i})})});Ol.displayName="ChatForm";function Jg(e){let t=new DataTransfer;for(let r of Array.from(e))t.items.add(r);return t.files}var Zg={light:"",dark:".dark"},Al=X__namespace.createContext(null);function Fl(){let e=X__namespace.useContext(Al);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function tS({id:e,className:t,children:r,config:o,...n}){let i=X__namespace.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return a(Al.Provider,{value:{config:o},children:w("div",{"data-slot":"chart","data-chart":s,className:f("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",t),...n,children:[a(Qg,{id:s,config:o}),a(Yr__namespace.ResponsiveContainer,{children:r})]})})}var Qg=({id:e,config:t})=>{let r=Object.entries(t).filter(([,o])=>o.theme||o.color);return r.length?a("style",{dangerouslySetInnerHTML:{__html:Object.entries(Zg).map(([o,n])=>`
2
- ${n} [data-chart=${e}] {
3
- ${r.map(([i,s])=>{var c;let l=((c=s.theme)==null?void 0:c[o])||s.color;return l?` --color-${i}: ${l};`:null}).join(`
1
+ 'use strict';var X=require('react'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactTable=require('@tanstack/react-table'),radixUi=require('radix-ui'),classVarianceAuthority=require('class-variance-authority'),reactDayPicker=require('react-day-picker'),fc=require('embla-carousel-react'),sonner=require('sonner'),framerMotion=require('framer-motion'),Xt=require('recharts'),cmdk=require('cmdk'),dateFns=require('date-fns'),vaul=require('vaul'),inputOtp=require('input-otp'),io=require('react-resizable-panels'),core=require('@dnd-kit/core'),modifiers=require('@dnd-kit/modifiers'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}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 X__namespace=/*#__PURE__*/_interopNamespace(X);var fc__default=/*#__PURE__*/_interopDefault(fc);var Xt__namespace=/*#__PURE__*/_interopNamespace(Xt);var io__namespace=/*#__PURE__*/_interopNamespace(io);function Za(e){return typeof document=="undefined"?[]:Array.from(document.querySelectorAll(e))}function Df(e){for(let t of Za('[data-slot="sidebar-inset"]'))t.dataset.contentLayout=e;}function Lf(e){for(let t of Za("header[data-navbar-style]"))t.dataset.navbarStyle=e;}var er={fieldCy:false,fieldName:false},tr=er,Bo=new Map,Ut=[],or=()=>{let e=Ut[Ut.length-1];tr=e?Bo.get(e):er;},nr=()=>Symbol("theme-extras-provider"),ar=()=>tr,rr=(e,t)=>{let n={fieldCy:t.fieldCy,fieldName:t.fieldName};Bo.set(e,n),Ut.includes(e)||Ut.push(e),or();},ir=e=>{if(!Bo.has(e))return;Bo.delete(e);let t=Ut.indexOf(e);t!==-1&&Ut.splice(t,1),or();};var Cl=new Set(["input","select","textarea","form","button"]),On=(e,t)=>{if(t===null||typeof t!="object"||typeof e!="string")return t;let n=ar(),a=!n.fieldCy,r=!n.fieldName&&Cl.has(e);if(!a&&!r)return t;let i=t,c=null,d=()=>(c||(c={...i}),c);if(a&&Object.prototype.hasOwnProperty.call(i,"data-cy")){let l=d();delete l["data-cy"];}if(r&&Object.prototype.hasOwnProperty.call(i,"name")){let l=d();delete l.name;}return c!=null?c:i};var o=(e,t,n)=>jsxRuntime.jsx(e,On(e,t),n),u=(e,t,n)=>jsxRuntime.jsxs(e,On(e,t),n);var zn=X.createContext(null),vo=null;function An(){return typeof window=="undefined"?"/":window.location.pathname||"/"}function lr({children:e}){let[t,n]=X.useState(()=>An()),a=X.useCallback((i,c={})=>{typeof window!="undefined"&&(c.replace?window.history.replaceState(null,"",i):window.history.pushState(null,"",i),n(An()));},[]);X.useEffect(()=>{vo=a;let i=()=>{n(An());};return window.addEventListener("popstate",i),()=>{window.removeEventListener("popstate",i),vo===a&&(vo=null);}},[a]);let r=X.useMemo(()=>({pathname:t,navigate:a}),[t,a]);return o(zn.Provider,{value:r,children:e})}function jf(){let e=X.useContext(zn);if(!e)throw new Error("usePathname must be used within a RouterProvider");return e.pathname}function Uf(){let e=X.useContext(zn);if(!e)throw new Error("useNavigate must be used within a RouterProvider");return e.navigate}function cr(e){if(vo){vo(e,{replace:true});return}typeof window!="undefined"&&window.location.replace(e);}var dr=["auto","light","dark"],Dl=[{label:"Default",value:"default",primary:{light:"oklch(0.205 0 0)",dark:"oklch(0.922 0 0)"}},{label:"Brutalist",value:"brutalist",primary:{light:"oklch(0.6489 0.2370 26.9728)",dark:"oklch(0.7044 0.1872 23.1858)"}},{label:"Soft Pop",value:"soft-pop",primary:{light:"oklch(0.5106 0.2301 276.9656)",dark:"oklch(0.6801 0.1583 276.9349)"}},{label:"Tangerine",value:"tangerine",primary:{light:"oklch(0.64 0.17 36.44)",dark:"oklch(0.64 0.17 36.44)"}}],Wf=Dl.map(e=>e.value);var qt="gi_theme",Vo="gi-theme-mode-change",Ll=new Set(dr);function Bn(){return typeof window!="undefined"?window:void 0}function Vn(){return typeof document!="undefined"?document.documentElement:null}function Il(){var t,n,a;let e=Bn();return e&&(a=(n=(t=e.matchMedia)==null?void 0:t.call(e,"(prefers-color-scheme: dark)"))==null?void 0:n.matches)!=null?a:false}function Gt(e){return typeof e=="string"&&Ll.has(e)}function ho(e){return e==="auto"?Il()?"dark":"light":e}function jo(e){let t=Vn();if(!t)return;let n=ho(e);t.dataset.themeMode=e,t.dataset.themeModeResolved=n,t.classList.toggle("dark",n==="dark");}function ur(e="auto"){var n;jo(e);let t=Bn();if(t){try{(n=t.localStorage)==null||n.setItem(qt,e);}catch{}t.dispatchEvent(new CustomEvent(Vo,{detail:e}));}}function Kf(){var r,i;let e=Vn(),t=(r=e==null?void 0:e.dataset)==null?void 0:r.themeMode;if(Gt(t))return t;let n=Bn(),a=(i=n==null?void 0:n.localStorage)==null?void 0:i.getItem(qt);return Gt(a)?a:"auto"}function Xf(e){let t=Vn();t&&(t.dataset.themePreset=e);}function s(...e){return tailwindMerge.twMerge(clsx.clsx(e))}function eg(e,t={}){let{currency:n="USD",noDecimals:a=false}=t;return new Intl.NumberFormat("en-US",{style:"currency",currency:n,minimumFractionDigits:a?0:2,maximumFractionDigits:a?0:2}).format(e)}function tg(e){return e.split(" ").filter(Boolean).map(t=>{var n,a;return (a=(n=t[0])==null?void 0:n.toUpperCase())!=null?a:""}).join("").slice(0,2)}function ag(e){let t=new Set,n={};function a(){return n}function r(c){let d=n,l=typeof c=="function"?c(d):c;if(!l)return;let g=false,m={...d};for(let[C,R]of Object.entries(l)){let f=C,b=R;Object.is(m[f],b)||(g=true,m[f]=b);}g&&(n=m,t.forEach(C=>C(m,d)));}n=e(r,a);function i(c){return t.add(c),()=>t.delete(c)}return {getState:a,setState:r,subscribe:i}}function rg(e,t){return X.useSyncExternalStore(n=>e.subscribe(()=>n()),()=>t(e.getState()),()=>t(e.getState()))}var at="h-10 md:h-9";var Uo=false,$t=false,Wt=null,Ol=()=>typeof window!="undefined"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,pr=e=>{if(!e||typeof e.scrollIntoView!="function")return;let t=Ol(),n=()=>e.scrollIntoView({behavior:t?"auto":"smooth",block:"center",inline:"nearest"});if(typeof window!="undefined"&&typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(n);return}n();},Al=e=>{if(typeof window=="undefined")return;let t=window.visualViewport;if(!t)return;let n=null,a,r=false,i,c=()=>{t.removeEventListener("resize",d),t.removeEventListener("scroll",d),typeof i=="number"&&window.clearTimeout(i),n!==null&&typeof window.cancelAnimationFrame=="function"&&(window.cancelAnimationFrame(n),n=null),typeof a=="number"&&(window.clearTimeout(a),a=void 0),r=false;},d=()=>{if(typeof document!="undefined"&&document.activeElement!==e||!e.isConnected){c();return}let l=()=>{n=null,mr(e)||(c(),pr(e));};if(!r){if(r=true,typeof window.requestAnimationFrame=="function"){n=window.requestAnimationFrame(()=>{r=false,n=null,l();});return}a=window.setTimeout(()=>{a=void 0,r=false,l();},0);}};t.addEventListener("resize",d,{passive:true}),t.addEventListener("scroll",d,{passive:true}),i=window.setTimeout(c,700);},zl=(e,t)=>{let n=e.height+e.offsetTop,a=t-n;return Math.max(0,a)},Bl=()=>{if(Uo)return Promise.resolve(true);if($t)return Promise.resolve(false);if(typeof window=="undefined")return $t=true,Promise.resolve(false);let e=window.visualViewport;return e?Wt||(Wt=new Promise(t=>{let n=false,a,r=Math.max(e.height+e.offsetTop,typeof window!="undefined"?window.innerHeight:0),i=d=>{n||(n=true,e.removeEventListener("resize",c),e.removeEventListener("scroll",c),typeof a=="number"&&window.clearTimeout(a),d?Uo=true:$t=true,t(d));},c=()=>{zl(e,r)>80&&i(true);};a=window.setTimeout(()=>i(false),600),c(),n||(e.addEventListener("resize",c,{passive:true}),e.addEventListener("scroll",c,{passive:true}));}).finally(()=>{Wt=null;}),Wt):($t=true,Promise.resolve(false))},mr=e=>{if(typeof window=="undefined")return true;let t=e.getBoundingClientRect(),n=window.visualViewport;if(!n){let i=window.innerHeight||0;return t.top>=0&&t.bottom<=i}let a=n.offsetTop,r=a+n.height;return t.top>=a&&t.bottom<=r},Go=e=>{e&&Bl().then(t=>{if(!t||typeof document!="undefined"&&document.activeElement!==e||!e.isConnected)return;if(mr(e)){Al(e);return}let n=()=>pr(e);if(typeof window!="undefined"&&typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(n);return}n();});},lg={get isVirtualKeyboardLikelyDevice(){return Uo},get hasAttemptedVirtualKeyboardDetection(){return $t},reset(){Uo=false,$t=false,Wt=null;}};function fr({data:e,columns:t,enableRowSelection:n=true,defaultPageIndex:a,defaultPageSize:r,getRowId:i}){let[c,d]=X__namespace.useState({}),[l,g]=X__namespace.useState({}),[m,C]=X__namespace.useState([]),[R,f]=X__namespace.useState([]),[b,p]=X__namespace.useState({pageIndex:a!=null?a:0,pageSize:r!=null?r:10});return reactTable.useReactTable({data:e,columns:t,state:{sorting:R,columnVisibility:l,rowSelection:c,columnFilters:m,pagination:b},enableRowSelection:n,getRowId:i!=null?i:(y=>y.id.toString()),onRowSelectionChange:d,onSortingChange:f,onColumnFiltersChange:C,onColumnVisibilityChange:g,onPaginationChange:p,getCoreRowModel:reactTable.getCoreRowModel(),getFilteredRowModel:reactTable.getFilteredRowModel(),getPaginationRowModel:reactTable.getPaginationRowModel(),getSortedRowModel:reactTable.getSortedRowModel(),getFacetedRowModel:reactTable.getFacetedRowModel(),getFacetedUniqueValues:reactTable.getFacetedUniqueValues()})}function yg({...e}){return o(radixUi.Accordion.Root,{"data-slot":"accordion",...e})}function xg({className:e,...t}){return o(radixUi.Accordion.Item,{"data-slot":"accordion-item",className:s("border-b last:border-b-0",e),...t})}function wg({className:e,children:t,...n}){return o(radixUi.Accordion.Header,{className:"flex",children:u(radixUi.Accordion.Trigger,{"data-slot":"accordion-trigger",className:s("focus-visible:border-primary focus-visible:ring-primary/40 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,o(lucideReact.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function Rg({className:e,children:t,...n}){return o(radixUi.Accordion.Content,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:o("div",{className:s("pt-0 pb-4",e),children:t})})}var Xl=classVarianceAuthority.cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Sg({className:e,variant:t,...n}){return o("div",{"data-slot":"alert",role:"alert",className:s(Xl({variant:t}),e),...n})}function Mg({className:e,...t}){return o("div",{"data-slot":"alert-title",className:s("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function kg({className:e,...t}){return o("div",{"data-slot":"alert-description",className:s("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}var mt=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Q=X__namespace.forwardRef(({className:e,variant:t,size:n,asChild:a=false,loading:r=false,loadingText:i,children:c,disabled:d,...l},g)=>{let m=a?radixUi.Slot.Slot:"button";return u(m,{"data-slot":"button",className:s(mt({variant:t,size:n,className:e}),r?"relative":"disabled:opacity-50"),disabled:r||d,"data-loading":r?"":void 0,ref:g,...l,children:[o("span",{className:s("pointer-events-none inline-flex items-center justify-center gap-2 w-full",r&&"invisible"),children:c}),r?u("span",{className:"pointer-events-none absolute inset-0 inline-flex items-center justify-center gap-2",children:[i!=null?i:o(lucideReact.Loader2,{className:"size-4 animate-spin","aria-hidden":"true"}),o("span",{className:"sr-only",children:typeof i=="string"?i:"Loading"})]}):null]})});Q.displayName="Button";function Vg({...e}){return o(radixUi.AlertDialog.Root,{"data-slot":"alert-dialog",...e})}function jg({...e}){return o(radixUi.AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function ec({...e}){return o(radixUi.AlertDialog.Portal,{"data-slot":"alert-dialog-portal",...e})}function tc({className:e,...t}){return o(radixUi.AlertDialog.Overlay,{"data-slot":"alert-dialog-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Ug({className:e,...t}){return u(ec,{children:[o(tc,{}),o(radixUi.AlertDialog.Content,{"data-slot":"alert-dialog-content",className:s("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function Gg({className:e,...t}){return o("div",{"data-slot":"alert-dialog-header",className:s("flex flex-col gap-2 text-center sm:text-left",e),...t})}function qg({className:e,...t}){return o("div",{"data-slot":"alert-dialog-footer",className:s("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Wg({className:e,...t}){return o(radixUi.AlertDialog.Title,{"data-slot":"alert-dialog-title",className:s("text-lg font-semibold",e),...t})}function $g({className:e,...t}){return o(radixUi.AlertDialog.Description,{"data-slot":"alert-dialog-description",className:s("text-muted-foreground text-sm",e),...t})}function Yg({className:e,...t}){return o(radixUi.AlertDialog.Action,{className:s(mt(),e),...t})}function Kg({className:e,...t}){return o(radixUi.AlertDialog.Cancel,{className:s(mt({variant:"outline"}),e),...t})}function Zg({...e}){return o(radixUi.AspectRatio.Root,{"data-slot":"aspect-ratio",...e})}function ab({className:e,...t}){return o(radixUi.Avatar.Root,{"data-slot":"avatar",className:s("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function rb({className:e,...t}){return o(radixUi.Avatar.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full",e),...t})}function ib({className:e,...t}){return o(radixUi.Avatar.Fallback,{"data-slot":"avatar-fallback",className:s("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var rc=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function br({className:e,variant:t,asChild:n=false,...a}){let r=n?radixUi.Slot.Slot:"span";return o(r,{"data-slot":"badge",className:s(rc({variant:t}),e),...a})}function vb({...e}){return o("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function hb({className:e,...t}){return o("ol",{"data-slot":"breadcrumb-list",className:s("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function yb({className:e,...t}){return o("li",{"data-slot":"breadcrumb-item",className:s("inline-flex items-center gap-1.5",e),...t})}function xb({asChild:e,className:t,...n}){let a=e?radixUi.Slot.Slot:"a";return o(a,{"data-slot":"breadcrumb-link",className:s("hover:text-foreground transition-colors",t),...n})}function wb({className:e,...t}){return o("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s("text-foreground font-normal",e),...t})}function Rb({children:e,className:t,...n}){return o("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:s("[&>svg]:size-3.5",t),...n,children:e!=null?e:o(lucideReact.ChevronRight,{})})}function Cb({className:e,...t}){return u("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:s("flex size-9 items-center justify-center",e),...t,children:[o(lucideReact.MoreHorizontal,{className:"size-4"}),o("span",{className:"sr-only",children:"More"})]})}function Db({className:e,classNames:t,showOutsideDays:n=true,captionLayout:a="label",buttonVariant:r="ghost",formatters:i,components:c,...d}){let l=reactDayPicker.getDefaultClassNames();return o(reactDayPicker.DayPicker,{showOutsideDays:n,className:s("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:a,formatters:{formatMonthDropdown:g=>g.toLocaleString("default",{month:"short"}),...i},classNames:{root:s("w-fit",l.root),months:s("flex gap-4 flex-col md:flex-row relative",l.months),month:s("flex flex-col w-full gap-4",l.month),nav:s("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",l.nav),button_previous:s(mt({variant:r}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",l.button_previous),button_next:s(mt({variant:r}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",l.button_next),month_caption:s("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",l.month_caption),dropdowns:s("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",l.dropdowns),dropdown_root:s("relative has-focus:border-primary border border-input shadow-xs has-focus:ring-primary/40 has-focus:ring-[3px] rounded-md",l.dropdown_root),dropdown:s("absolute bg-popover inset-0 opacity-0",l.dropdown),caption_label:s("select-none font-medium",a==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:s("flex",l.weekdays),weekday:s("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",l.weekday),week:s("flex w-full mt-2",l.week),week_number_header:s("select-none w-(--cell-size)",l.week_number_header),week_number:s("text-[0.8rem] select-none text-muted-foreground",l.week_number),day:s("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",l.day),range_start:s("rounded-l-md bg-accent",l.range_start),range_middle:s("rounded-none",l.range_middle),range_end:s("rounded-r-md bg-accent",l.range_end),today:s("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:s("text-muted-foreground opacity-50",l.disabled),hidden:s("invisible",l.hidden),...t},components:{Root:({className:g,rootRef:m,...C})=>o("div",{"data-slot":"calendar",ref:m,className:s(g),...C}),Chevron:({className:g,orientation:m,...C})=>m==="left"?o(lucideReact.ChevronLeftIcon,{className:s("size-4",g),...C}):m==="right"?o(lucideReact.ChevronRightIcon,{className:s("size-4",g),...C}):o(lucideReact.ChevronDownIcon,{className:s("size-4",g),...C}),DayButton:mc,WeekNumber:({children:g,...m})=>o("td",{...m,children:o("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:g})}),...c},...d})}function mc({className:e,day:t,modifiers:n,...a}){let r=reactDayPicker.getDefaultClassNames(),i=X__namespace.useRef(null);return X__namespace.useEffect(()=>{var c;n.focused&&((c=i.current)==null||c.focus());},[n.focused]),o(Q,{ref:i,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:s("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-primary group-data-[focused=true]/day:ring-primary/40 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",r.day,e),...a})}function _b({className:e,...t}){return o("div",{"data-slot":"card",className:s("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6",e),...t})}function Hb({className:e,...t}){return o("div",{"data-slot":"card-header",className:s("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Ob({className:e,...t}){return o("div",{"data-slot":"card-title",className:s("leading-none font-semibold",e),...t})}function Ab({className:e,...t}){return o("div",{"data-slot":"card-description",className:s("text-muted-foreground text-sm",e),...t})}function zb({className:e,...t}){return o("div",{"data-slot":"card-action",className:s("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Bb({className:e,...t}){return o("div",{"data-slot":"card-content",className:s("px-6",e),...t})}function Vb({className:e,...t}){return o("div",{"data-slot":"card-footer",className:s("flex items-center px-6 [.border-t]:pt-6",e),...t})}var hr=X__namespace.createContext(null);function Wo(){let e=X__namespace.useContext(hr);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Yb({orientation:e="horizontal",opts:t,setApi:n,plugins:a,className:r,children:i,...c}){let[d,l]=fc__default.default({...t,axis:e==="horizontal"?"x":"y"},a),[g,m]=X__namespace.useState(false),[C,R]=X__namespace.useState(false),f=X__namespace.useCallback(y=>{y&&(m(y.canScrollPrev()),R(y.canScrollNext()));},[]),b=X__namespace.useCallback(()=>{l==null||l.scrollPrev();},[l]),p=X__namespace.useCallback(()=>{l==null||l.scrollNext();},[l]),v=X__namespace.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),b()):y.key==="ArrowRight"&&(y.preventDefault(),p());},[b,p]);return X__namespace.useEffect(()=>{!l||!n||n(l);},[l,n]),X__namespace.useEffect(()=>{if(l)return f(l),l.on("reInit",f),l.on("select",f),()=>{l==null||l.off("select",f);}},[l,f]),o(hr.Provider,{value:{carouselRef:d,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:p,canScrollPrev:g,canScrollNext:C},children:o("div",{onKeyDownCapture:v,className:s("relative",r),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...c,children:i})})}function Kb({className:e,...t}){let{carouselRef:n,orientation:a}=Wo();return o("div",{ref:n,className:"overflow-hidden","data-slot":"carousel-content",children:o("div",{className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function Xb({className:e,...t}){let{orientation:n}=Wo();return o("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:s("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",e),...t})}function Jb({className:e,variant:t="outline",size:n="icon",...a}){let{orientation:r,scrollPrev:i,canScrollPrev:c}=Wo();return u(Q,{"data-slot":"carousel-previous",variant:t,size:n,className:s("absolute size-8 rounded-full",r==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!c,onClick:i,...a,children:[o(lucideReact.ArrowLeft,{}),o("span",{className:"sr-only",children:"Previous slide"})]})}function Qb({className:e,variant:t="outline",size:n="icon",...a}){let{orientation:r,scrollNext:i,canScrollNext:c}=Wo();return u(Q,{"data-slot":"carousel-next",variant:t,size:n,className:s("absolute size-8 rounded-full",r==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!c,onClick:i,...a,children:[o(lucideReact.ArrowRight,{}),o("span",{className:"sr-only",children:"Next slide"})]})}var hc=50,yc=10;function wr(e){let t=X.useRef(null),n=X.useRef(null),[a,r]=X.useState(true),i=()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight);},c=()=>{if(t.current){let{scrollTop:l,scrollHeight:g,clientHeight:m}=t.current,C=Math.abs(g-l-m),R=n.current?l<n.current:false,f=n.current?n.current-l:0;if(R&&f>yc)r(false);else {let p=C<hc;r(p);}n.current=l;}},d=()=>{r(false);};return X.useEffect(()=>{t.current&&(n.current=t.current.scrollTop);},[]),X.useEffect(()=>{a&&i();},e),{containerRef:t,scrollToBottom:i,handleScroll:c,shouldAutoScroll:a,handleTouchStart:d}}function Cr({text:e,copyMessage:t="Copied to clipboard!"}){let[n,a]=X.useState(false),r=X.useRef(null),i=X.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{sonner.toast.success(t),a(true),r.current&&(clearTimeout(r.current),r.current=null),r.current=setTimeout(()=>{a(false);},2e3);}).catch(()=>{sonner.toast.error("Failed to copy to clipboard.");});},[e,t]);return {isCopied:n,handleCopy:i}}function Un({content:e,copyMessage:t}){let{isCopied:n,handleCopy:a}=Cr({text:e,copyMessage:t});return u(Q,{variant:"ghost",size:"icon",className:"relative h-6 w-6","aria-label":"Copy to clipboard",onClick:a,children:[o("div",{className:"absolute inset-0 flex items-center justify-center",children:o(lucideReact.Check,{className:s("h-4 w-4 transition-transform ease-in-out",n?"scale-100":"scale-0")})}),o(lucideReact.Copy,{className:s("h-4 w-4 transition-transform ease-in-out",n?"scale-0":"scale-100")})]})}function Pr({ref:e,maxHeight:t=Number.MAX_SAFE_INTEGER,borderWidth:n=0,dependencies:a}){let r=X.useRef(null);X.useLayoutEffect(()=>{if(!e.current)return;let i=e.current,c=n*2;r.current===null&&(r.current=i.scrollHeight-c),i.style.removeProperty("height");let d=i.scrollHeight,l=Math.min(d,t),g=Math.max(l,r.current);i.style.height=`${g+c}px`;},[t,e,...a]);}var wo=X__namespace.default.forwardRef((e,t)=>e.file.type.startsWith("image/")?o(Tr,{...e,ref:t}):e.file.type.startsWith("text/")||e.file.name.endsWith(".txt")||e.file.name.endsWith(".md")?o(Nr,{...e,ref:t}):o(Sr,{...e,ref:t}));wo.displayName="FilePreview";var Tr=X__namespace.default.forwardRef(({file:e,onRemove:t},n)=>u(framerMotion.motion.div,{ref:n,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:true,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[u("div",{className:"flex w-full items-center space-x-2",children:[o("img",{alt:`Attachment ${e.name}`,className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted object-cover",src:URL.createObjectURL(e)}),o("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?o("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:o(lucideReact.X,{className:"h-2.5 w-2.5"})}):null]}));Tr.displayName="ImageFilePreview";var Nr=X__namespace.default.forwardRef(({file:e,onRemove:t},n)=>{let[a,r]=X__namespace.default.useState("");return X.useEffect(()=>{let i=new FileReader;i.onload=c=>{var l;let d=(l=c.target)==null?void 0:l.result;r(d.slice(0,50)+(d.length>50?"...":""));},i.readAsText(e);},[e]),u(framerMotion.motion.div,{ref:n,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:true,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[u("div",{className:"flex w-full items-center space-x-2",children:[o("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted p-0.5",children:o("div",{className:"h-full w-full overflow-hidden text-[6px] leading-none text-muted-foreground",children:a||"Loading..."})}),o("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?o("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:o(lucideReact.X,{className:"h-2.5 w-2.5"})}):null]})});Nr.displayName="TextFilePreview";var Sr=X__namespace.default.forwardRef(({file:e,onRemove:t},n)=>u(framerMotion.motion.div,{ref:n,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:true,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[u("div",{className:"flex w-full items-center space-x-2",children:[o("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted",children:o(lucideReact.FileIcon,{className:"h-6 w-6 text-foreground"})}),o("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?o("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:o(lucideReact.X,{className:"h-2.5 w-2.5"})}):null]}));Sr.displayName="GenericFilePreview";function Wn(e){if(e.allowAttachments){let{allowAttachments:a,files:r,setFiles:i,...c}=e;return o(Mr,{...c,allowAttachments:true,files:r,setFiles:i})}let{allowAttachments:t,...n}=e;return o(Mr,{...n,allowAttachments:false,files:null})}Wn.displayName="MessageInput";function Mr({placeholder:e="Ask AI...",className:t,submitOnEnter:n=true,stop:a,isGenerating:r,allowAttachments:i,files:c,setFiles:d,onKeyDown:l,value:g,...m}){let C=X.useRef(null),[R,f]=X.useState(false),b=i&&!!c&&c.length>0;Pr({ref:C,maxHeight:240,borderWidth:1,dependencies:[g,b]});let p=X.useCallback(h=>{!i||!d||!(h!=null&&h.length)||d(E=>E!=null&&E.length?[...E,...h]:h);},[i,d]),v=X.useCallback(h=>{!i||!d||d(E=>{if(!E)return null;let L=E.filter(M=>M!==h);return L.length>0?L:null});},[i,d]),y=X.useCallback(h=>{i&&(h.preventDefault(),f(true));},[i]),x=X.useCallback(h=>{i&&(h.preventDefault(),f(false));},[i]),N=X.useCallback(h=>{if(!i)return;h.preventDefault(),f(false);let E=Array.from(h.dataTransfer.files);p(E);},[p,i]),w=X.useCallback(h=>{var P;if(!i)return;let E=(P=h.clipboardData)==null?void 0:P.items;if(!E)return;let L=h.clipboardData.getData("text");if(L&&L.length>500){h.preventDefault();let T=new Blob([L],{type:"text/plain"}),H=new File([T],"Pasted text",{type:"text/plain",lastModified:Date.now()});p([H]);return}let M=Array.from(E).map(T=>T.getAsFile()).filter(T=>T!==null);M.length>0&&(h.preventDefault(),p(M));},[p,i]),S=X.useCallback(h=>{var E;n&&h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),r&&a&&a(),(E=h.currentTarget.form)==null||E.requestSubmit()),l==null||l(h);},[r,l,a,n]);return u("div",{className:"relative flex w-full",onDragOver:y,onDragLeave:x,onDrop:N,children:[o("div",{className:"relative flex w-full items-center space-x-2",children:u("div",{className:"relative flex-1",children:[o("textarea",{"aria-label":"Write your prompt here",placeholder:e,ref:C,onPaste:w,onKeyDown:S,className:s("z-10 w-full grow resize-none rounded-xl border border-input bg-background p-3 pr-24 text-sm ring-offset-background transition-[border] placeholder:text-muted-foreground focus-visible:border-primary focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",b&&"pb-16",t),value:g,...m}),i&&o("div",{className:"absolute inset-x-3 bottom-0 z-20 overflow-x-auto py-3",children:o("div",{className:"flex space-x-3",children:o(framerMotion.AnimatePresence,{mode:"popLayout",children:c==null?void 0:c.map(h=>o(wo,{file:h,onRemove:()=>v(h)},h.name+String(h.lastModified)))})})})]})}),u("div",{className:"absolute right-3 top-3 z-20 flex gap-2",children:[i&&o(Q,{type:"button",size:"icon",variant:"outline",className:"h-8 w-8","aria-label":"Attach a file",onClick:async()=>{let h=await _c();p(h);},children:o(lucideReact.Paperclip,{className:"h-4 w-4"})}),r&&a?o(Q,{type:"button",size:"icon",className:"h-8 w-8","aria-label":"Stop generating",onClick:a,children:o(lucideReact.Square,{className:"h-3 w-3 animate-pulse",fill:"currentColor"})}):o(Q,{type:"submit",size:"icon",className:"h-8 w-8 transition-opacity","aria-label":"Send message",disabled:g.trim()===""&&(!i||!(c!=null&&c.length))||r,children:o(lucideReact.ArrowUp,{className:"h-5 w-5"})})]}),i&&o(Fc,{isDragging:R})]})}function Fc({isDragging:e}){return o(framerMotion.AnimatePresence,{children:e&&u(framerMotion.motion.div,{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center space-x-2 rounded-xl border border-dashed border-border bg-background text-sm text-muted-foreground",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},"aria-hidden":true,children:[o(lucideReact.Paperclip,{className:"h-4 w-4"}),o("span",{children:"Drop your files here to attach them."})]})})}function _c(){let e=document.createElement("input");return e.type="file",e.multiple=true,e.accept="*/*",e.click(),new Promise(t=>{e.onchange=n=>{let r=n.currentTarget.files;if(r){t(Array.from(r));return}t(null);};})}function Dr({...e}){return o(radixUi.Collapsible.Root,{"data-slot":"collapsible",...e})}function Lr({...e}){return o(radixUi.Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function Ir({...e}){return o(radixUi.Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",...e})}var zc={h1:["text-2xl","font-semibold"],h2:["text-xl","font-semibold"],h3:["text-lg","font-semibold"],h4:["text-base","font-semibold"],h5:["text-sm","font-semibold"],h6:["text-sm","font-semibold"],p:["whitespace-pre-wrap"],ul:["list-disc","space-y-1.5","pl-6"],ol:["list-decimal","space-y-1.5","pl-6"],li:["leading-relaxed"],blockquote:["border-l-2","border-primary/60","pl-4","italic","text-muted-foreground"],table:["w-full","border-collapse","overflow-hidden","rounded-md","border"],th:["border","border-foreground/20","bg-muted/50","px-4","py-2","text-left","font-semibold"],td:["border","border-foreground/20","px-4","py-2","align-top"],tr:["even:bg-muted/40"],hr:["my-4","border-foreground/20"],img:["rounded-md","border","max-w-full"],strong:["font-semibold"],em:["italic"]},Bc="absolute right-2 top-2 rounded-md border bg-background/80 px-2 py-1 text-xs font-medium shadow-sm backdrop-blur transition hover:bg-background",Vc=["relative","overflow-x-auto","rounded-md","border","bg-background/50","p-4","font-mono","text-sm"];function Kt({children:e,className:t}){let n=X.useRef(null),a=X.useMemo(()=>jc(e!=null?e:""),[e]);return X.useEffect(()=>{let r=n.current;if(!r)return;Uc(r);let i=Gc(r);return ()=>{i();}},[a]),o("div",{ref:n,className:s("space-y-4 text-sm leading-relaxed",t),dangerouslySetInnerHTML:{__html:a}})}Kt.displayName="HtmlRenderer";var Iv=Kt;function jc(e){return e?e.replace(/<(script|style|iframe|object|embed|link|meta)[^>]*>[\s\S]*?<\/\1>/gi,"").replace(/<(script|style|iframe|object|embed|link|meta)[^>]*\/>/gi,"").replace(/<(script|style|iframe|object|embed|link|meta)[^>]*>/gi,"").replace(/ on[a-z]+="[^"]*"/gi,"").replace(/ on[a-z]+='[^']*'/gi,"").replace(/javascript:/gi,""):""}function Uc(e){Object.entries(zc).forEach(([t,n])=>{e.querySelectorAll(t).forEach(a=>{n.forEach(r=>a.classList.add(r));});}),e.querySelectorAll("a").forEach(t=>{var a,r;t.classList.add("text-primary","underline","underline-offset-4");let n=(a=t.getAttribute("href"))!=null?a:"";if(/^javascript:/i.test(n)&&t.removeAttribute("href"),t.getAttribute("target")==="_blank"){let i=(r=t.getAttribute("rel"))!=null?r:"";/noopener|noreferrer/i.test(i)||t.setAttribute("rel",`${i} noopener noreferrer`.trim());}}),e.querySelectorAll("code").forEach(t=>{var n;((n=t.parentElement)==null?void 0:n.tagName)!=="PRE"&&t.classList.add("rounded","bg-muted/70","px-1.5","py-0.5","font-mono","text-[0.85em]");}),e.querySelectorAll("table").forEach(t=>{var a;if(t.parentElement&&t.parentElement.dataset.htmlRendererTable==="true")return;let n=document.createElement("div");n.dataset.htmlRendererTable="true",n.className="overflow-x-auto rounded-md border border-foreground/20",(a=t.parentElement)==null||a.insertBefore(n,t),n.appendChild(t);});}function Gc(e){let t=[];return e.querySelectorAll("button[data-html-renderer-copy]").forEach(n=>{n.remove();}),e.querySelectorAll("pre").forEach(n=>{Vc.forEach(l=>n.classList.add(l));let a=document.createElement("button");a.type="button",a.dataset.htmlRendererCopy="true",a.textContent="Copy",a.className=Bc;let r="Copy",i="Copied!",c="Copy failed",d=async()=>{var g;let l=(g=n.textContent)!=null?g:"";try{if(navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(l.trimEnd()),a.textContent=i;else throw new Error("Clipboard API unavailable")}catch(m){console.error(m),a.textContent=c;}window.setTimeout(()=>{a.textContent=r;},1500);};a.addEventListener("click",d),n.appendChild(a),t.push(()=>{a.removeEventListener("click",d),a.remove();});}),()=>{t.forEach(n=>n());}}var Yn=classVarianceAuthority.cva("group/message relative break-words rounded-lg p-3 text-sm sm:max-w-[70%]",{variants:{isUser:{true:"bg-primary text-primary-foreground",false:"bg-muted text-foreground"},animation:{none:"",slide:"duration-300 animate-in fade-in-0",scale:"duration-300 animate-in fade-in-0 zoom-in-75",fade:"duration-500 animate-in fade-in-0"}},compoundVariants:[{isUser:true,animation:"slide",class:"slide-in-from-right"},{isUser:false,animation:"slide",class:"slide-in-from-left"},{isUser:true,animation:"scale",class:"origin-bottom-right"},{isUser:false,animation:"scale",class:"origin-bottom-left"}]}),_r=({role:e,content:t,createdAt:n,showTimeStamp:a=false,animation:r="scale",actions:i,experimental_attachments:c,toolInvocations:d,parts:l})=>{let g=X.useMemo(()=>c==null?void 0:c.map(R=>{var p;let f=ed(R.url);return new File([f],(p=R.name)!=null?p:"Unknown",{type:R.contentType})}),[c]),m=e==="user",C=n==null?void 0:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return m?u("div",{className:s("flex flex-col",m?"items-end":"items-start"),children:[g?o("div",{className:"mb-1 flex flex-wrap gap-2",children:g.map((R,f)=>o(wo,{file:R},f))}):null,o("div",{className:s(Yn({isUser:m,animation:r})),children:o(Kt,{children:t})}),a&&n?o("time",{dateTime:n.toISOString(),className:s("mt-1 block px-1 text-xs opacity-50",r!=="none"&&"duration-500 animate-in fade-in-0"),children:C}):null]}):l&&l.length>0?l.map((R,f)=>R.type==="text"?u("div",{className:s("flex flex-col",m?"items-end":"items-start"),children:[u("div",{className:s(Yn({isUser:m,animation:r})),children:[o(Kt,{children:R.text}),i?o("div",{className:"absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100",children:i}):null]}),a&&n?o("time",{dateTime:n.toISOString(),className:s("mt-1 block px-1 text-xs opacity-50",r!=="none"&&"duration-500 animate-in fade-in-0"),children:C}):null]},`text-${f}`):R.type==="reasoning"?o(td,{part:R},`reasoning-${f}`):R.type==="tool-invocation"?o(Fr,{toolInvocations:[R.toolInvocation]},`tool-${f}`):null):d&&d.length>0?o(Fr,{toolInvocations:d}):u("div",{className:s("flex flex-col",m?"items-end":"items-start"),children:[u("div",{className:s(Yn({isUser:m,animation:r})),children:[o(Kt,{children:t}),i?o("div",{className:"absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 text-foreground opacity-0 transition-opacity group-hover/message:opacity-100",children:i}):null]}),a&&n?o("time",{dateTime:n.toISOString(),className:s("mt-1 block px-1 text-xs opacity-50",r!=="none"&&"duration-500 animate-in fade-in-0"),children:C}):null]})};function ed(e){let[,t=""]=e.split(",");if(!t)return new Uint8Array;if(typeof atob=="function"){let n=atob(t),a=new Uint8Array(n.length);for(let r=0;r<n.length;r+=1)a[r]=n.charCodeAt(r);return a}return typeof Buffer!="undefined"?new Uint8Array(Buffer.from(t,"base64")):new Uint8Array}var td=({part:e})=>{let[t,n]=X.useState(false);return o("div",{className:"mb-2 flex flex-col items-start sm:max-w-[70%]",children:u(Dr,{open:t,onOpenChange:n,className:"group w-full overflow-hidden rounded-lg border bg-muted/50",children:[o("div",{className:"flex items-center p-2",children:o(Lr,{asChild:true,children:u("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[o(lucideReact.ChevronRight,{className:"h-4 w-4 transition-transform group-data-[state=open]:rotate-90"}),o("span",{children:"Thinking"})]})})}),o(Ir,{forceMount:true,children:o(framerMotion.motion.div,{initial:false,animate:t?"open":"closed",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},transition:{duration:.3,ease:[.04,.62,.23,.98]},className:"border-t",children:o("div",{className:"p-2",children:o("div",{className:"whitespace-pre-wrap text-xs",children:e.reasoning})})})})]})})};function Fr({toolInvocations:e}){return e!=null&&e.length?o("div",{className:"flex flex-col items-start gap-2",children:e.map((t,n)=>{if(t.state==="result"&&t.result.__cancelled===true)return u("div",{className:"flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2 text-sm text-muted-foreground",children:[o(lucideReact.Ban,{className:"h-4 w-4"}),u("span",{children:["Cancelled"," ",u("span",{className:"font-mono",children:["`",t.toolName,"`"]})]})]},n);switch(t.state){case "partial-call":case "call":return u("div",{className:"flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2 text-sm text-muted-foreground",children:[o(lucideReact.Terminal,{className:"h-4 w-4"}),u("span",{children:["Calling"," ",u("span",{className:"font-mono",children:["`",t.toolName,"`"]}),"..."]}),o(lucideReact.Loader2,{className:"h-3 w-3 animate-spin"})]},n);case "result":return u("div",{className:"flex flex-col gap-1.5 rounded-lg border bg-muted/50 px-3 py-2 text-sm",children:[u("div",{className:"flex items-center gap-2 text-muted-foreground",children:[o(lucideReact.Code2,{className:"h-4 w-4"}),u("span",{children:["Result from"," ",u("span",{className:"font-mono",children:["`",t.toolName,"`"]})]})]}),o("pre",{className:"overflow-x-auto whitespace-pre-wrap text-foreground",children:JSON.stringify(t.result,null,2)})]},n);default:return null}})}):null}function Hr(){return o("div",{className:"justify-left flex space-x-1",children:o("div",{className:"rounded-lg bg-muted p-3",children:u("div",{className:"flex -space-x-2.5",children:[o(lucideReact.Dot,{className:"h-5 w-5 animate-typing-dot-bounce"}),o(lucideReact.Dot,{className:"h-5 w-5 animate-typing-dot-bounce [animation-delay:90ms]"}),o(lucideReact.Dot,{className:"h-5 w-5 animate-typing-dot-bounce [animation-delay:180ms]"})]})})})}function Or({messages:e,showTimeStamps:t=true,isTyping:n=false,messageOptions:a}){return u("div",{className:"space-y-4 overflow-visible",children:[e.map((r,i)=>{let c=typeof a=="function"?a(r):a;return o(_r,{showTimeStamp:t,...r,...c},i)}),n&&o(Hr,{})]})}function Ar({label:e,append:t,suggestions:n}){return u("div",{className:"space-y-6",children:[o("h2",{className:"text-center text-2xl font-bold",children:e}),o("div",{className:"flex gap-6 text-sm",children:n.map(a=>o("button",{onClick:()=>t({role:"user",content:a}),className:"h-max flex-1 rounded-xl border bg-background p-4 hover:bg-muted",children:o("p",{children:a})},a))})]})}function sd({messages:e,handleSubmit:t,input:n,handleInputChange:a,stop:r,isGenerating:i,append:c,suggestions:d,className:l,onRateResponse:g,setMessages:m}){let C=e.at(-1),R=e.length===0,f=(C==null?void 0:C.role)==="user",b=X.useRef(e);b.current=e;let p=X.useCallback(()=>{if(r==null||r(),!m)return;let y=[...b.current],x;for(let S=y.length-1;S>=0;S-=1){let h=y[S];if(h.role==="assistant"){x=h;break}}if(!x)return;let N=false,w={...x};if(x.toolInvocations){let S=x.toolInvocations.map(h=>h.state==="call"?(N=true,{...h,state:"result",result:{content:"Tool execution was cancelled",__cancelled:true}}):h);N&&(w={...w,toolInvocations:S});}if(x.parts&&x.parts.length>0){let S=x.parts.map(h=>{if(h.type==="tool-invocation"&&h.toolInvocation.state==="call"){N=true;let E={...h.toolInvocation,state:"result",result:{content:"Tool execution was cancelled",__cancelled:true}};return {...h,toolInvocation:E}}return h});N&&(w={...w,parts:S});}if(N){let S=y.findIndex(h=>h.id===x.id);S!==-1&&(y[S]=w,m(y));}},[r,m,b]),v=X.useCallback(y=>({actions:g?u(jsxRuntime.Fragment,{children:[o("div",{className:"border-r pr-1",children:o(Un,{content:y.content,copyMessage:"Copied response to clipboard!"})}),o(Q,{size:"icon",variant:"ghost",className:"h-6 w-6",onClick:()=>g(y.id,"thumbs-up"),children:o(lucideReact.ThumbsUp,{className:"h-4 w-4"})}),o(Q,{size:"icon",variant:"ghost",className:"h-6 w-6",onClick:()=>g(y.id,"thumbs-down"),children:o(lucideReact.ThumbsDown,{className:"h-4 w-4"})})]}):o(Un,{content:y.content,copyMessage:"Copied response to clipboard!"})}),[g]);return u(Vr,{className:l,children:[R&&c&&d?o(Ar,{label:"Try these prompts \u2728",append:c,suggestions:d}):null,e.length>0?o(ld,{messages:e,children:o(Or,{messages:e,isTyping:f,messageOptions:v})}):null,o(jr,{className:"mt-auto",handleSubmit:t,children:({files:y,setFiles:x})=>o(Wn,{value:n,onChange:a,allowAttachments:true,files:y,setFiles:x,stop:p,isGenerating:i})})]})}sd.displayName="Chat";function ld({messages:e,children:t}){let{containerRef:n,scrollToBottom:a,handleScroll:r,shouldAutoScroll:i,handleTouchStart:c}=wr([e]);return u("div",{className:"grid grid-cols-1 overflow-y-auto pb-4",ref:n,onScroll:r,onTouchStart:c,children:[o("div",{className:"max-w-full [grid-column:1/1] [grid-row:1/1]",children:t}),!i&&o("div",{className:"pointer-events-none flex flex-1 items-end justify-end [grid-column:1/1] [grid-row:1/1]",children:o("div",{className:"sticky bottom-0 left-0 flex w-full justify-end",children:o(Q,{onClick:a,className:"pointer-events-auto h-8 w-8 rounded-full ease-in-out animate-in fade-in-0 slide-in-from-bottom-1",size:"icon",variant:"ghost",children:o(lucideReact.ArrowDown,{className:"h-4 w-4"})})})})]})}var Vr=X.forwardRef(({className:e,...t},n)=>o("div",{ref:n,className:s("grid max-h-full w-full grid-rows-[1fr_auto]",e),...t}));Vr.displayName="ChatContainer";var jr=X.forwardRef(({children:e,handleSubmit:t,className:n},a)=>{let[r,i]=X.useState(null);return o("form",{ref:a,onSubmit:d=>{if(!r){t(d);return}let l=cd(r);t(d,{experimental_attachments:l}),i(null);},className:n,children:e({files:r,setFiles:i})})});jr.displayName="ChatForm";function cd(e){let t=new DataTransfer;for(let n of Array.from(e))t.items.add(n);return t.files}var dd={light:"",dark:".dark"},Ur=X__namespace.createContext(null);function Gr(){let e=X__namespace.useContext(Ur);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function fh({id:e,className:t,children:n,config:a,...r}){let i=X__namespace.useId(),c=`chart-${e||i.replace(/:/g,"")}`;return o(Ur.Provider,{value:{config:a},children:u("div",{"data-slot":"chart","data-chart":c,className:s("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",t),...r,children:[o(ud,{id:c,config:a}),o(Xt__namespace.ResponsiveContainer,{children:n})]})})}var ud=({id:e,config:t})=>{let n=Object.entries(t).filter(([,a])=>a.theme||a.color);return n.length?o("style",{dangerouslySetInnerHTML:{__html:Object.entries(dd).map(([a,r])=>`
2
+ ${r} [data-chart=${e}] {
3
+ ${n.map(([i,c])=>{var l;let d=((l=c.theme)==null?void 0:l[a])||c.color;return d?` --color-${i}: ${d};`:null}).join(`
4
4
  `)}
5
5
  }
6
6
  `).join(`
7
- `)}}):null},rS=Yr__namespace.Tooltip;function oS({active:e,payload:t,className:r,indicator:o="dot",hideLabel:n=false,hideIndicator:i=false,label:s,labelFormatter:l,labelClassName:c,formatter:u,color:d,nameKey:m,labelKey:v}){let{config:g}=Fl(),h=X__namespace.useMemo(()=>{var R;if(n||!(t!=null&&t.length))return null;let[b]=t,x=`${v||(b==null?void 0:b.dataKey)||(b==null?void 0:b.name)||"value"}`,y=Xn(g,b,x),C=!v&&typeof s=="string"?((R=g[s])==null?void 0:R.label)||s:y==null?void 0:y.label;return l?a("div",{className:f("font-medium",c),children:l(C,t)}):C?a("div",{className:f("font-medium",c),children:C}):null},[s,l,t,n,c,g,v]);if(!e||!(t!=null&&t.length))return null;let p=t.length===1&&o!=="dot";return w("div",{className:f("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",r),children:[p?null:h,a("div",{className:"grid gap-1.5",children:t.filter(b=>b.type!=="none").map((b,x)=>{let y=`${m||b.name||b.dataKey||"value"}`,C=Xn(g,b,y),R=d||b.payload.fill||b.color;return a("div",{className:f("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",o==="dot"&&"items-center"),children:u&&(b==null?void 0:b.value)!==void 0&&b.name?u(b.value,b.name,b,x,b.payload):w(jsxRuntime.Fragment,{children:[C!=null&&C.icon?a(C.icon,{}):!i&&a("div",{className:f("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":o==="dot","w-1":o==="line","w-0 border-[1.5px] border-dashed bg-transparent":o==="dashed","my-0.5":p&&o==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),w("div",{className:f("flex flex-1 justify-between leading-none",p?"items-end":"items-center"),children:[w("div",{className:"grid gap-1.5",children:[p?h:null,a("span",{className:"text-muted-foreground",children:(C==null?void 0:C.label)||b.name})]}),b.value&&a("span",{className:"text-foreground font-mono font-medium tabular-nums",children:b.value.toLocaleString()})]})]})},b.dataKey)})})]})}var aS=Yr__namespace.Legend;function nS({className:e,hideIcon:t=false,payload:r,verticalAlign:o="bottom",nameKey:n}){let{config:i}=Fl();return r!=null&&r.length?a("div",{className:f("flex items-center justify-center gap-4",o==="top"?"pb-3":"pt-3",e),children:r.filter(s=>s.type!=="none").map(s=>{let l=`${n||s.dataKey||"value"}`,c=Xn(i,s,l);return w("div",{className:f("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[c!=null&&c.icon&&!t?a(c.icon,{}):a("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),c==null?void 0:c.label]},s.value)})}):null}function Xn(e,t,r){if(typeof t!="object"||t===null)return;let o="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0,n=r;return r in t&&typeof t[r]=="string"?n=t[r]:o&&r in o&&typeof o[r]=="string"&&(n=o[r]),n in e?e[n]:e[r]}var Eo=X__namespace.forwardRef(function({className:t,...r},o){return a(radixUi.Checkbox.Root,{ref:o,"data-slot":"checkbox",className:f("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:a(radixUi.Checkbox.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:a(lucideReact.CheckIcon,{className:"size-3.5"})})})});function ga({...e}){return a(radixUi.Dialog.Root,{"data-slot":"dialog",...e})}function vS({...e}){return a(radixUi.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}function rv({...e}){return a(radixUi.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function hS({...e}){return a(radixUi.Dialog.Close,{"data-slot":"dialog-close",...e})}function ov({className:e,...t}){return a(radixUi.Dialog.Overlay,{"data-slot":"dialog-overlay",className:f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function va({className:e,children:t,showCloseButton:r=true,...o}){return w(rv,{"data-slot":"dialog-portal",children:[a(ov,{}),w(radixUi.Dialog.Content,{"data-slot":"dialog-content",className:f("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...o,children:[t,r&&w(radixUi.Dialog.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a(lucideReact.XIcon,{}),a("span",{className:"sr-only",children:"Close"})]})]})]})}function ha({className:e,...t}){return a("div",{"data-slot":"dialog-header",className:f("flex flex-col gap-2 text-center sm:text-left",e),...t})}function bS({className:e,...t}){return a("div",{"data-slot":"dialog-footer",className:f("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function ba({className:e,...t}){return a(radixUi.Dialog.Title,{"data-slot":"dialog-title",className:f("text-lg leading-none font-semibold",e),...t})}function wa({className:e,...t}){return a(radixUi.Dialog.Description,{"data-slot":"dialog-description",className:f("text-muted-foreground text-sm",e),...t})}function Jn({className:e,...t}){return a(cmdk.Command,{"data-slot":"command",className:f("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function PS({title:e="Command Palette",description:t="Search for a command to run...",children:r,className:o,showCloseButton:n=true,...i}){return w(ga,{...i,children:[w(ha,{className:"sr-only",children:[a(ba,{children:e}),a(wa,{children:t})]}),a(va,{className:f("overflow-hidden p-0",o),showCloseButton:n,children:a(Jn,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})]})}function Bl({className:e,...t}){return w("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[a(lucideReact.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),a(cmdk.Command.Input,{"data-slot":"command-input",className:f("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Vl({className:e,...t}){return a(cmdk.Command.List,{"data-slot":"command-list",className:f("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function jl({...e}){return a(cmdk.Command.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function SS({className:e,...t}){return a(cmdk.Command.Group,{"data-slot":"command-group",className:f("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function TS({className:e,...t}){return a(cmdk.Command.Separator,{"data-slot":"command-separator",className:f("bg-border -mx-1 h-px",e),...t})}function Ul({className:e,...t}){return a(cmdk.Command.Item,{"data-slot":"command-item",className:f("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function MS({className:e,...t}){return a("span",{"data-slot":"command-shortcut",className:f("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function _S({...e}){return a(radixUi.ContextMenu.Root,{"data-slot":"context-menu",...e})}function OS({...e}){return a(radixUi.ContextMenu.Trigger,{"data-slot":"context-menu-trigger",...e})}function AS({...e}){return a(radixUi.ContextMenu.Group,{"data-slot":"context-menu-group",...e})}function FS({...e}){return a(radixUi.ContextMenu.Portal,{"data-slot":"context-menu-portal",...e})}function zS({...e}){return a(radixUi.ContextMenu.Sub,{"data-slot":"context-menu-sub",...e})}function HS({...e}){return a(radixUi.ContextMenu.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function BS({className:e,inset:t,children:r,...o}){return w(radixUi.ContextMenu.SubTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:f("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[r,a(lucideReact.ChevronRightIcon,{className:"ml-auto"})]})}function VS({className:e,...t}){return a(radixUi.ContextMenu.SubContent,{"data-slot":"context-menu-sub-content",className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function jS({className:e,...t}){return a(radixUi.ContextMenu.Portal,{children:a(radixUi.ContextMenu.Content,{"data-slot":"context-menu-content",className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function US({className:e,inset:t,variant:r="default",...o}){return a(radixUi.ContextMenu.Item,{"data-slot":"context-menu-item","data-inset":t,"data-variant":r,className:f("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function WS({className:e,children:t,checked:r,...o}){return w(radixUi.ContextMenu.CheckboxItem,{"data-slot":"context-menu-checkbox-item",className:f("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...o,children:[a("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a(radixUi.ContextMenu.ItemIndicator,{children:a(lucideReact.CheckIcon,{className:"size-4"})})}),t]})}function GS({className:e,children:t,...r}){return w(radixUi.ContextMenu.RadioItem,{"data-slot":"context-menu-radio-item",className:f("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[a("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a(radixUi.ContextMenu.ItemIndicator,{children:a(lucideReact.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function $S({className:e,inset:t,...r}){return a(radixUi.ContextMenu.Label,{"data-slot":"context-menu-label","data-inset":t,className:f("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function qS({className:e,...t}){return a(radixUi.ContextMenu.Separator,{"data-slot":"context-menu-separator",className:f("bg-border -mx-1 my-1 h-px",e),...t})}function KS({className:e,...t}){return a("span",{"data-slot":"context-menu-shortcut",className:f("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var Rv={YYYY:"yyyy",YY:"yy",MM:"MM",M:"M",DD:"dd",D:"d"},kv=e=>{var t;return (t=Rv[e])!=null?t:e},Cv=/(YYYY|YY|MM|M|DD|D|HH|H|mm|m|ss|s)/g,Zn=e=>e.replace(Cv,t=>t==="HH"?"HH":t==="H"?"H":t==="mm"?"mm":t==="m"?"m":t==="ss"?"ss":t==="s"?"s":kv(t)),ya=e=>!Number.isNaN(e.getTime()),hr=class e{constructor(t){this.value=t;}create(t){return new e(t)}clone(){return this.create(new Date(this.value.getTime()))}add(t,r){switch(r){case "month":return this.create(dateFns.addMonths(this.value,t));case "year":return this.create(dateFns.addYears(this.value,t));default:return this.create(dateFns.addDays(this.value,t))}}subtract(t,r){return this.add(-t,r)}startOf(t){switch(t){case "month":return this.create(dateFns.startOfMonth(this.value));case "year":return this.create(dateFns.startOfYear(this.value));case "week":return this.create(dateFns.startOfWeek(this.value,{weekStartsOn:0}));default:return this.create(dateFns.startOfDay(this.value))}}endOf(t){if(t==="year")return this.create(dateFns.endOfYear(this.value));if(t==="month"){let n=dateFns.startOfMonth(this.value),i=dateFns.addDays(dateFns.addMonths(n,1),-1);return this.create(i)}let r=dateFns.startOfDay(this.value),o=dateFns.addDays(r,1);return this.create(dateFns.addDays(o,-1))}isSame(t,r="day"){switch(r){case "month":return dateFns.isSameMonth(this.value,t.toDate());case "year":return dateFns.isSameYear(this.value,t.toDate());case "week":return this.startOf("week").valueOf()===t.startOf("week").valueOf();default:return dateFns.isSameDay(this.value,t.toDate())}}isBefore(t,r){if(r){let o=this.startOf(r),n=t.startOf(r);return o.valueOf()<n.valueOf()}return dateFns.isBefore(this.value,t.toDate())}isAfter(t,r){if(r){let o=this.startOf(r),n=t.startOf(r);return o.valueOf()>n.valueOf()}return dateFns.isAfter(this.value,t.toDate())}format(t){return dateFns.format(this.value,Zn(t))}daysInMonth(){return dateFns.getDaysInMonth(this.value)}month(t){return typeof t=="number"?this.create(dateFns.setMonth(this.value,t)):this.value.getMonth()}year(t){return typeof t=="number"?this.create(dateFns.setYear(this.value,t)):this.value.getFullYear()}date(t){return typeof t=="number"?this.create(dateFns.setDate(this.value,t)):this.value.getDate()}isValid(){return ya(this.value)}toDate(){return new Date(this.value.getTime())}valueOf(){return this.value.getTime()}},Pv=e=>{if(e instanceof hr)return e.toDate();if(e instanceof Date)return new Date(e.getTime());if(typeof e=="number")return new Date(e);if(typeof e=="string"){let t=new Date(e);if(ya(t))return t}return new Date},_t=(e,t)=>{if(typeof e=="string"&&t){let r=dateFns.parse(e,Zn(t),new Date);return ya(r)?new hr(r):new hr(new Date(NaN))}return new hr(Pv(e))},Kl=(e,t)=>{let r=dateFns.parse(e,Zn(t),new Date);return ya(r)?new hr(r):null};function Qn(e){return Object.keys(e).reduce((t,r)=>{let o=e[r];return o&&(t[r]=o),t},{})}function eT(e){let[t,r]=X.useState({values:e.initialValues,errors:{},fieldErrors:{},touched:{},isSubmitting:false,isValid:false,validationSequence:0}),o=X.useCallback((g=t.values)=>{let h=e.validate?e.validate(g):{},p=Qn({...h,...t.fieldErrors}),b=Object.keys(p).length===0;return r(x=>({...x,errors:p,isValid:b})),b},[e.validate,t.fieldErrors,t.values]),n=X.useCallback((g,h)=>{r(p=>{let b={...p.values,[g]:h},x={...p.fieldErrors};delete x[g];let y=e.validate?e.validate(b):{},C=Qn({...y,...x}),R=Object.keys(C).length===0;return {...p,values:b,fieldErrors:x,errors:C,isValid:R}});},[e.validate]),i=X.useCallback((g,h=true)=>{r(p=>({...p,touched:{...p.touched,[g]:h}}));},[]),s=X.useCallback((g,h)=>{r(p=>{let b={...p.fieldErrors};h?b[g]=h:delete b[g];let x=e.validate?e.validate(p.values):{},y=Qn({...x,...b}),C=Object.keys(y).length===0;return {...p,fieldErrors:b,errors:y,isValid:C}});},[e.validate]),l=X.useCallback(()=>{r(g=>({...g,validationSequence:g.validationSequence+1}));},[]),c=X.useCallback(g=>{let{name:h,value:p}=g.target;n(h,p);},[n]),u=X.useCallback(g=>{let{name:h}=g.target;i(h,true),o();},[i,o]),d=X.useCallback(async g=>{g&&(g.preventDefault(),g.stopPropagation()),r(b=>{let x=Object.keys(b.values).reduce((y,C)=>(y[C]=true,y),{});return {...b,touched:x,validationSequence:b.validationSequence+1}});let h=t.values;if(o(h)&&!(Object.keys(t.fieldErrors).length>0)){r(b=>({...b,isSubmitting:true}));try{await e.onSubmit(h);}catch(b){console.error("Form submission error:",b);}finally{r(b=>({...b,isSubmitting:false}));}}},[e.onSubmit,o,t.values]),m=X.useCallback(()=>{r({values:e.initialValues,errors:{},fieldErrors:{},touched:{},isSubmitting:false,isValid:false,validationSequence:0});},[e.initialValues]);return {...t,...{setFieldValue:n,setFieldTouched:i,setFieldError:s,handleChange:c,handleBlur:u,handleSubmit:d,resetForm:m,validateForm:()=>o(),triggerValidation:l},form:{values:t.values,errors:t.errors,fieldErrors:t.fieldErrors,touched:t.touched,validationSequence:t.validationSequence,setFieldValue:(g,h)=>{n(g,h);},setFieldError:(g,h)=>{s(g,h);},setFieldTouched:(g,h)=>{i(g,h);},handleChange:c,handleBlur:u,handleSubmit:d,resetForm:m,validateForm:()=>o(),triggerValidation:l,isSubmitting:t.isSubmitting,isValid:t.isValid}}}var Yl=768;function ei(){var i,s;if(typeof window=="undefined")return false;let e=window.innerWidth<Yl,t=window.navigator,r=(t.userAgent||"").toLowerCase(),o=/android|iphone|ipad|ipod|blackberry|iemobile|opera mini/.test(r),n=(s=(i=t.userAgentData)==null?void 0:i.mobile)!=null?s:false;return e||o||n}function ct(){let[e,t]=X__namespace.useState(()=>ei());return X__namespace.useEffect(()=>{let r=window.matchMedia(`(max-width: ${Yl-1}px)`),o=()=>{t(ei());};return typeof r.addEventListener=="function"?r.addEventListener("change",o):typeof r.addListener=="function"&&r.addListener(o),t(ei()),()=>{typeof r.removeEventListener=="function"?r.removeEventListener("change",o):typeof r.removeListener=="function"&&r.removeListener(o);}},[]),e}var Xl=e=>({title:"",subtitle:void 0,supportingText:void 0,heroBadge:void 0,icon:void 0,back:void 0,actions:void 0,variant:void 0,...e}),Jl=e=>{let t=X.useMemo(()=>Xl(e),[e]),[r,o]=X.useState([t]),n=r[r.length-1],i=r.length>1,s=X.useCallback(d=>{o(m=>{let v=[...m],g=v.length-1;return v[g]={...t,...d},v});},[t]),l=X.useCallback(d=>{o(m=>[...m,{...t,...d}]);},[t]),c=X.useCallback(()=>{i&&o(d=>d.slice(0,-1));},[i]),u=X.useCallback(d=>{o([Xl(d!=null?d:t)]);},[t]);return {header:n,navigationState:n,navigationStack:r,setHeader:s,navigateTo:l,navigateBack:c,canGoBack:i,resetNavigation:u}},Dv=()=>{let e=globalThis;return e.__GOMENIUCIVAN_MOBILE_HEADER_CONTEXT__||(e.__GOMENIUCIVAN_MOBILE_HEADER_CONTEXT__=X.createContext(null)),e.__GOMENIUCIVAN_MOBILE_HEADER_CONTEXT__},Zl=Dv(),Ql=({initialState:e,children:t})=>{let r=Jl(e);return a(Zl.Provider,{value:r,children:t})},ec=e=>{let t=X.useContext(Zl);return t||Jl(e)};var Iv=400,oc=200,ac=.95,nc=()=>typeof window=="undefined"?"":`${window.location.pathname}${window.location.search}${window.location.hash}`,ic=(e,t)=>{if(typeof window=="undefined")return ()=>{};let r=window.history,o=r[e];return o?(r[e]=function(...i){let s=o.apply(this,i);return t(),s},()=>{r[e]=o;}):()=>{}},_v=(e,t)=>{if(typeof window=="undefined")return ()=>{};let r=[],o=null,n={current:nc()},i=()=>{o&&window.clearTimeout(o),o=window.setTimeout(()=>{o=null,t();},Iv);},s=()=>{let d=nc();if(d===n.current){t();return}n.current=d,e(),i();};r.push(ic("pushState",s)),r.push(ic("replaceState",s));let l=()=>{s();};window.addEventListener("popstate",l),r.push(()=>window.removeEventListener("popstate",l));let c=()=>{s();};window.addEventListener("hashchange",c),r.push(()=>window.removeEventListener("hashchange",c));let u=()=>{o&&(window.clearTimeout(o),o=null),t();};return window.addEventListener("load",u),window.addEventListener("pageshow",u),r.push(()=>{window.removeEventListener("load",u),window.removeEventListener("pageshow",u);}),()=>{r.forEach(d=>d()),o&&window.clearTimeout(o);}},Ov=({color:e,framework:t})=>{let[r,o]=X.useState(false),n=X.useRef(r),[i,s]=X.useState(0),l=X.useRef(null),c=X.useRef(null),u=X.useCallback(()=>{c.current&&(window.clearTimeout(c.current),c.current=null),n.current=true,o(true),s(v=>v>0&&v<.2?v:.2);},[]),d=X.useCallback(()=>{n.current&&(l.current&&(window.clearTimeout(l.current),l.current=null),s(1),c.current=window.setTimeout(()=>{n.current=false,o(false),s(0);},200));},[]);X.useEffect(()=>{n.current=r;},[r]),X.useEffect(()=>typeof window=="undefined"?()=>{}:_v(u,d),[u,d,t]),X.useEffect(()=>{if(!r){l.current&&(window.clearTimeout(l.current),l.current=null);return}let v=()=>{s(g=>{if(g>=ac)return g;let h=(1-g)*.1;return Math.min(g+h,ac)}),l.current=window.setTimeout(v,oc);};return l.current=window.setTimeout(v,oc),()=>{l.current&&(window.clearTimeout(l.current),l.current=null);}},[r]),X.useEffect(()=>()=>{l.current&&window.clearTimeout(l.current),c.current&&window.clearTimeout(c.current);},[]);let m=X.useMemo(()=>({position:"fixed",top:0,left:0,height:"2px",width:`${Math.max(i*100,0)}%`,backgroundColor:e,boxShadow:"0 0 8px rgba(0, 0, 0, 0.15)",opacity:r?1:0,transition:"width 0.2s ease, opacity 0.2s ease",transform:"translateZ(0)",zIndex:9999}),[e,i,r]);return a("div",{"aria-hidden":"true",style:m})},Pa=Ov;var sc=({color:e,framework:t})=>a(Pa,{color:e,framework:t});var lc=({color:e,framework:t})=>a(Pa,{color:e,framework:t});var Av={nextjs:lc},cc=e=>{var t;return (t=Av[e])!=null?t:sc};var dc=({color:e,framework:t})=>{let r=cc(t);return typeof window=="undefined"?null:a(r,{color:e,framework:t})};var ri=e=>{if(e===void 0||e===""||e===null||e==="undefined"||e==="null")return true;let t=e.toString();try{t=t.trim();}catch{return true}return !t||t.length===0};var br=e=>{if(ri(e))return false;if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.toLowerCase();return t==="true"||t==="yes"||t==="1"}else return !!e};var fc,Ot=typeof process!="undefined"&&!!((fc=process==null?void 0:process.versions)!=null&&fc.node),oi=null,ai=null,mc=Function("specifier","return import(specifier);"),wr=()=>Ot?(oi||(oi=mc("node:"+["fs","promises"].join("/"))),oi):null,Do=()=>Ot?(ai||(ai=mc("node:path")),ai):null,uc={debug:10,info:20,warning:30,error:40,critical:50},Fv=30,zv=1e3,Hv=20,Bv=e=>e===false?null:typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):Fv,pc=e=>{var l,c,u,d,m,v,g;let t=typeof process!="undefined"?(l=process==null?void 0:process.env)==null?void 0:l.NODE_ENV:void 0,r=Bv(e==null?void 0:e.storeDays),o=(c=e==null?void 0:e.level)!=null?c:"info",n=(u=e==null?void 0:e.consoleLogging)!=null?u:t!=="production",s=!!(e!=null&&e.enable)&&(t==="production"||!!(e!=null&&e.writeToFileInDev))&&Ot;return {enable:!!(e!=null&&e.enable),level:o,retentionDays:r,json:!!(e!=null&&e.json),slowRequestThresholdMs:(d=e==null?void 0:e.slowRequestThresholdMs)!=null?d:zv,maxFileSizeBytes:Math.max(1,(m=e==null?void 0:e.maxFileSizeMB)!=null?m:Hv)*1024*1024,directory:(v=e==null?void 0:e.directory)!=null?v:"monitoring",consoleLogging:n,captureUnhandled:(g=e==null?void 0:e.captureUnhandled)!=null?g:true,writeToFile:s}},Vv=(e,t)=>uc[e]>=uc[t],jv=e=>{var t;if(e)return e instanceof Error?{name:e.name,message:e.message,stack:e.stack}:typeof e=="object"?{name:e.name,message:String((t=e.message)!=null?t:e),stack:e.stack,raw:e}:{message:String(e)}},Uv=e=>typeof(e==null?void 0:e.then)=="function",Sa=class{constructor(t){this.directoryCache=null;this.initialized=false;this.options=pc(t),this.publicApi=this.createPublicApi(),this.options.enable&&this.initialize();}get api(){return this.publicApi}updateOptions(t){let r=this.options.enable,o=this.options.level,n=this.options.json,i=this.options.slowRequestThresholdMs,s=this.options.retentionDays,l=this.options.directory,c=this.options.writeToFile;if(this.options=pc(t),this.options.directory!==l&&(this.directoryCache=null),!this.options.enable){this.detachProcessHandlers();return}(!r||this.options.level!==o||this.options.json!==n||this.options.slowRequestThresholdMs!==i||this.options.retentionDays!==s||this.options.directory!==l||this.options.writeToFile!==c)&&this.initialize();}async initialize(){if(this.initialized){await this.ensureDirectory(),this.options.retentionDays!==null&&await this.purgeLogs(),this.ensureProcessHandlers();return}await this.ensureDirectory(),this.options.retentionDays!==null&&await this.purgeLogs(),this.ensureProcessHandlers(),this.initialized=true;}createPublicApi(){return {log:(t,r,o)=>this.log(t,r,o),debug:(t,r)=>this.log("debug",t,r),info:(t,r)=>this.log("info",t,r),warning:(t,r)=>this.log("warning",t,r),error:(t,r)=>this.log("error",t,r),critical:(t,r)=>this.log("critical",t,r),logRequest:t=>this.logRequest(t),monitorRequest:(t,r)=>this.monitorRequest(t,r),deleteLogFile:t=>this.deleteLogFile(t),purgeLogs:()=>this.purgeLogs(),listLogFiles:()=>this.listLogFiles(),getLogDirectory:()=>this.getDirectoryPath(),getOptions:()=>this.options,updateOptions:t=>this.updateOptions(t)}}async getDirectoryPath(){if(!Ot)return null;if(this.directoryCache)return this.directoryCache;let t=await Do();if(!t)return null;let r=this.options.directory,o=t.isAbsolute(r)?r:t.join(process.cwd(),r);return this.directoryCache=o,o}async ensureDirectory(){if(!this.options.enable||!Ot)return;let t=await wr(),r=await this.getDirectoryPath();if(!(!t||!r))try{await t.mkdir(r,{recursive:!0});}catch(o){this.options.consoleLogging&&console.error("[monitoring] Failed to create directory",o);}}ensureProcessHandlers(){if(!this.options.enable||!this.options.captureUnhandled||!Ot)return;let t=process;if(!(t!=null&&t.on)||this.processHandlers)return;let r=(...n)=>{let[i]=n;this.log("critical","Uncaught exception detected",{error:i});},o=(...n)=>{let[i]=n;this.log("error","Unhandled promise rejection detected",{error:i});};t.on("uncaughtException",r),t.on("unhandledRejection",o),this.processHandlers={exception:r,rejection:o};}detachProcessHandlers(){if(!this.processHandlers||!Ot)return;let t=process,{exception:r,rejection:o}=this.processHandlers;t!=null&&t.off?(t.off("uncaughtException",r),t.off("unhandledRejection",o)):t!=null&&t.removeListener&&(t.removeListener("uncaughtException",r),t.removeListener("unhandledRejection",o)),this.processHandlers=void 0;}resolveLogEntry(t,r,o){let n=o==null?void 0:o.context,i=jv(o==null?void 0:o.error),{error:s,context:l,metadata:c,...u}=o!=null?o:{},d={};return c&&typeof c=="object"&&(d.metadata=c),Object.assign(d,u),{timestamp:new Date,level:t,message:r,context:n,error:i,metadata:Object.keys(d).length>0?d:void 0}}async log(t,r,o){if(!Vv(t,this.options.level))return;let i=this.resolveLogEntry(t,r,o);this.options.consoleLogging&&this.consoleLog(i),!(!this.options.enable||!this.options.writeToFile||!Ot)&&(await this.writeLogEntry(i),this.options.retentionDays!==null&&await this.purgeLogs());}consoleLog(t){let r=t.timestamp.toISOString(),o={...t.metadata,context:t.context,error:t.error},n=[`[monitoring] ${r} [${t.level.toUpperCase()}] ${t.message}`,o];switch(t.level){case "error":case "critical":console.error(...n);break;case "warning":console.warn(...n);break;case "info":console.info(...n);break;default:console.debug(...n);break}}async writeLogEntry(t){let r=await wr(),o=await Do(),n=await this.getDirectoryPath();if(!(!r||!o||!n))try{let i=await this.resolveLogFilePath(n);if(!i)return;let s=this.options.json?this.serializeJsonEntry(t):this.serializeTextEntry(t);await r.appendFile(i,s+`
8
- `);}catch(i){this.options.consoleLogging&&console.error("[monitoring] Failed to write log entry",i);}}serializeTextEntry(t){let o=[`[${t.timestamp.toISOString()}]`,`[${t.level.toUpperCase()}]`,t.message];return t.context&&Object.keys(t.context).length>0&&o.push(`context=${JSON.stringify(t.context)}`),t.metadata&&Object.keys(t.metadata).length>0&&o.push(`metadata=${JSON.stringify(t.metadata)}`),t.error&&o.push(`error=${JSON.stringify(t.error)}`),o.join(" ")}serializeJsonEntry(t){return JSON.stringify({timestamp:t.timestamp.toISOString(),level:t.level,message:t.message,context:t.context,metadata:t.metadata,error:t.error})}async resolveLogFilePath(t){let r=await wr(),o=await Do();if(!r||!o)return null;let n=new Date,i=[n.getFullYear(),String(n.getMonth()+1).padStart(2,"0"),String(n.getDate()).padStart(2,"0")].join("-"),s=this.options.json?"jsonl":"log",l=`${i}.${s}`,c=o.join(t,l);if(!await this.isFileExceedingSize(c))return c;let u=1;for(;;){let d=`${i}-${u}.${s}`,m=o.join(t,d);if(!await this.isFileExceedingSize(m))return m;u+=1;}}async isFileExceedingSize(t){let r=await wr();if(!r)return false;try{return (await r.stat(t)).size>=this.options.maxFileSizeBytes}catch(o){if(o.code==="ENOENT")return false;throw o}}async logRequest(t){var s,l,c;let r=(s=t.thresholdMs)!=null?s:this.options.slowRequestThresholdMs;if(t.durationMs<r)return;let o=((l=t.method)!=null?l:"REQUEST").toUpperCase(),n=`Slow request detected for ${o} ${(c=t.url)!=null?c:""}`,i=t.durationMs>=r*2?"error":"warning";await this.log(i,n,{context:{method:o,url:t.url,durationMs:t.durationMs,statusCode:t.statusCode,thresholdMs:r},metadata:t.metadata});}async monitorRequest(t,r){let o=Date.now();try{let n=r();return Uv(n)?await n:n}catch(n){throw await this.log("error","Monitored request failed",{context:{method:t.method,url:t.url,operationName:t.operationName,statusCode:t.statusCode},error:n}),n}finally{let n=Date.now()-o;await this.logRequest({...t,durationMs:n});}}async purgeLogs(){if(!this.options.enable||this.options.retentionDays===null)return;let t=await wr(),r=await Do(),o=await this.getDirectoryPath();if(!(!t||!r||!o))try{let n=await t.readdir(o,{withFileTypes:!0}),i=Date.now()-this.options.retentionDays*24*60*60*1e3;await Promise.all(n.filter(s=>s.isFile()).map(async s=>{let l=r.join(o,s.name);try{(await t.stat(l)).mtime.getTime()<i&&await t.rm(l,{force:!0});}catch(c){this.options.consoleLogging&&console.warn("[monitoring] Failed to purge log file",c);}}));}catch(n){this.options.consoleLogging&&console.error("[monitoring] Failed to read monitoring directory",n);}}async deleteLogFile(t){if(!Ot)return;let r=await wr(),o=await Do(),n=await this.getDirectoryPath();if(!(!r||!o||!n))try{if(!t){let l=await r.readdir(n,{withFileTypes:!0});await Promise.all(l.map(async c=>{let u=o.join(n,c.name);await r.rm(u,{force:!0,recursive:c.isDirectory()});}));return}let i=o.basename(t),s=o.join(n,i);await r.rm(s,{force:!0});}catch(i){this.options.consoleLogging&&console.error("[monitoring] Failed to delete log file",i);}}async listLogFiles(){if(!Ot)return [];let t=await wr(),r=await this.getDirectoryPath();if(!t||!r)return [];try{return (await t.readdir(r)).sort()}catch(o){return this.options.consoleLogging&&console.error("[monitoring] Failed to list log files",o),[]}}},xr=null,Wv=()=>(xr||(xr=new Sa),xr),Ta=e=>(xr?xr.updateOptions(e):xr=new Sa(e),xr.api),gc=()=>Wv().api,Gv=e=>{let t=X__namespace.useRef();return X__namespace.useEffect(()=>{if(!e)return;let r=t.current,o=JSON.stringify(e),n=r?JSON.stringify(r):void 0;o!==n&&(t.current=e,Ta(e));},[e]),X__namespace.useMemo(()=>gc(),[])};function Io(e,t="info",r){let{title:o,description:n,duration:i=4e3,action:s}=r||{},l={duration:i,...s&&{action:{label:s.label,onClick:s.onClick}}};switch(t){case "success":sonner.toast.success(o||e,{description:n,...l});break;case "error":sonner.toast.error(o||e,{description:n,...l});break;case "warning":sonner.toast.warning(o||e,{description:n,...l});break;case "info":default:sonner.toast.info(o||e,{description:n,...l});break}}var $v=(e,t)=>Io(e,"success",t),qv=(e,t)=>Io(e,"error",t),Kv=(e,t)=>Io(e,"warning",t),Yv=(e,t)=>Io(e,"info",t);var hc=X.createContext(void 0),Zv={enabled:false,framework:"auto",fieldName:"auto",fieldCy:"auto"},Qv=new Set(["","email","number","password","search","tel","text","url","date","datetime-local","month","time","week"]),eh=()=>{var r;if(typeof window!="undefined"){if(window.__NEXT_DATA__)return "nextjs";if(window.__vite_plugin_react_preamble_installed__)return "vite"}if(typeof document!="undefined"&&document.querySelector('script[src*="@vite/client"]'))return "vite";let e=typeof globalThis!="undefined"&&(r=globalThis.process)!=null?r:void 0,t=e==null?void 0:e.env;if(t){if(t.NEXT_PHASE||t.__NEXT_PREVIEW_MODE)return "nextjs";if(t.VITE_DEV_SERVER_URL||t.VITE_USER_NODE_ENV)return "vite";if(t.BABEL_ENV)return "babel";if(t.WEBPACK||t.WEBPACK_DEV_SERVER)return "webpack"}return typeof globalThis!="undefined"&&globalThis.__webpack_require__?"webpack":"unknown"},th=e=>{var l;let t={...Zv,...e!=null?e:{}},r=(l=t.framework)!=null?l:"auto",o=r==="auto"?eh():r,n=!!t.enabled,i=t.fieldName==="auto"?n:!!t.fieldName,s=t.fieldCy==="auto"?n:!!t.fieldCy;return {enabled:n,debug:n,framework:o,requestedFramework:r,fieldName:i,fieldCy:s}},$T=({children:e,defaultTheme:t="system",nativeApp:r=false,extras:o,monitoring:n,siderbar:i})=>{var P,T,O,A,V;let[s,l]=X.useState(!!r),c=ct(),u=X.useMemo(()=>Xs(),[]),d=X.useMemo(()=>{let L=th(o);return Zs(u,L),L},[o,u]),m=X.useMemo(()=>n||{enable:false},[n]);X.useEffect(()=>{Ta(m);},[m]),X.useEffect(()=>()=>{Qs(u);},[u]),X.useEffect(()=>{l(!!r);},[r]);let v=()=>{var _;if(typeof window=="undefined")return t==="system"?"auto":t;let L=(_=window.localStorage)==null?void 0:_.getItem(Wr);return Ur(L)?L:t==="system"?"auto":t},[g,h]=X.useState(()=>v()),[p,b]=X.useState(()=>So(v())),[x,y]=X.useState(null);X.useEffect(()=>{b(So(g)),al(g);},[g]),X.useEffect(()=>{var z;if(typeof window=="undefined")return;let L=(z=window.localStorage)==null?void 0:z.getItem(Wr);if(Ur(L))return;let _=t==="system"?"auto":t;h(E=>E===_?E:_);},[t]),X.useEffect(()=>{if(typeof window=="undefined"||g!=="auto")return;let L=window.matchMedia("(prefers-color-scheme: dark)"),_=E=>{let I=E.matches?"dark":"light";b(H=>H===I?H:I),da("auto");},z=So("auto");return b(E=>E===z?E:z),da("auto"),L.addEventListener("change",_),()=>L.removeEventListener("change",_)},[g]),X.useEffect(()=>{if(typeof window=="undefined")return;let L=_=>{let z=_.detail;z&&h(E=>E===z?E:z);};return window.addEventListener(ca,L),()=>window.removeEventListener(ca,L)},[]),X.useEffect(()=>{if(typeof window=="undefined")return;let L=_=>{if(_.key!==Wr||!_.newValue||!Ur(_.newValue))return;let z=_.newValue;h(E=>E===z?E:z);};return window.addEventListener("storage",L),()=>window.removeEventListener("storage",L)},[]);let C=p==="dark";X.useEffect(()=>{if(typeof document=="undefined")return;let L=document.documentElement;L.dataset.framework=d.framework,L.dataset.debug=d.enabled?"true":"false";},[d]);let R=s,S=R||c;X.useEffect(()=>{if(typeof document=="undefined"||typeof window=="undefined"||!S)return;let L=150,_=U=>U instanceof HTMLElement?U.isContentEditable||U instanceof HTMLTextAreaElement?true:U instanceof HTMLInputElement?Qv.has(U.type):false:false,z=U=>{let W=U.getBoundingClientRect(),G=window.innerHeight||document.documentElement.clientHeight,B=window.innerWidth||document.documentElement.clientWidth,Z=W.top>=0&&W.bottom<=G,q=W.left>=0&&W.right<=B;return Z&&q},E=U=>{window.setTimeout(()=>{z(U)||U.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});},L);},I=U=>{if(!(U instanceof Element))return null;if(_(U))return U;let W=U.closest('input, textarea, [contenteditable="true"]');return W&&_(W)?W:null},H=U=>{let W=I(U.target);W&&E(W);},j=U=>{if(U.pointerType&&U.pointerType!=="touch"&&U.pointerType!=="pen")return;let W=I(U.target);W&&E(W);};return document.addEventListener("focusin",H,true),document.addEventListener("pointerdown",j,true),()=>{document.removeEventListener("focusin",H,true),document.removeEventListener("pointerdown",j,true);}},[S]);let k=X.useCallback(L=>{h(_=>_===L?_:L);},[h]),M=X.useCallback(L=>{k(L?"dark":"light");},[k]),N=X.useMemo(()=>C?"#fff":"#000",[C]),D={isDarkMode:C,themeMode:g,isNativeApp:s,isNativeLike:R,isNative:R,extras:d,nativeOverlayContainer:x,setIsDarkMode:M,setThemeMode:k,setNativeApp:l,setNativeOverlayContainer:y};return a(hc.Provider,{value:D,children:w(tl,{children:[a(dc,{color:N,framework:d.framework}),w(ni,{delayDuration:0,children:[br(i==null?void 0:i.show)&&w(bc,{children:[w(wc,{...i==null?void 0:i.props,children:[br((P=i==null?void 0:i.header)==null?void 0:P.show)&&a(yc,{children:a(Cc,{children:a(Pc,{children:a(Sc,{asChild:true,className:"data-[slot=sidebar-menu-button]:!p-1.5",children:"Header"})})})}),br((T=i==null?void 0:i.content)==null?void 0:T.show)&&a(kc,{children:(O=i==null?void 0:i.content)==null?void 0:O.children}),br((A=i==null?void 0:i.footer)==null?void 0:A.show)&&a(Rc,{children:(V=i==null?void 0:i.footer)==null?void 0:V.children})]}),a(xc,{"data-content-layout":i==null?void 0:i.contentLayout,className:f("data-[content-layout=centered]:!mx-auto data-[content-layout=centered]:max-w-screen-2xl","max-[113rem]:peer-data-[variant=inset]:!mr-2 min-[101rem]:peer-data-[variant=inset]:peer-data-[state=collapsed]:!mr-auto"),children:a("div",{className:"h-full p-4 md:p-6",children:e})})]}),!br(i==null?void 0:i.show)&&a(jsxRuntime.Fragment,{children:e})]})]})})},Xt=()=>{let e=X.useContext(hc);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},qT=()=>{let{extras:e}=Xt();return e};var ii=X__namespace.forwardRef(({className:e,...t},r)=>w("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[a("path",{d:"M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7Z"}),a("circle",{cx:12,cy:12,r:3})]}));ii.displayName="EyeIcon";var si=X__namespace.forwardRef(({className:e,...t},r)=>w("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[a("path",{d:"M3.12 3.12 5.3 5.3C3.42 6.78 2 9 2 9s4 7 10 7a9.78 9.78 0 0 0 4.68-1.07l1.92 1.92M9.88 9.88a3 3 0 0 0 4.24 4.24"}),a("path",{d:"M10.73 5.08A9.77 9.77 0 0 1 12 5c6 0 10 7 10 7a16.85 16.85 0 0 1-3.24 4.13"}),a("line",{x1:1,x2:23,y1:1,y2:23})]}));si.displayName="EyeOffIcon";var at=X__namespace.forwardRef(({className:e,type:t,onFocus:r,...o},n)=>{let i=X__namespace.useCallback(h=>{typeof n=="function"?n(h):n&&(n.current=h);},[n]),s=X__namespace.useCallback(h=>{r==null||r(h),!h.defaultPrevented&&pa(h.currentTarget);},[r]),[l,c]=X__namespace.useState(false),u=t!=null?t:"text",d=u==="password",m=d&&l?"text":u;X__namespace.useEffect(()=>{!d&&l&&c(false);},[d,l]);let v=l?"Hide password":"Show password",g=f(It,"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-0","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",d?"pr-10":void 0,e);return d?w("div",{className:f("relative inline-flex w-full",e),children:[a("input",{ref:i,type:m,"data-slot":"input",onFocus:s,className:g,...o}),d&&a("button",{type:"button",onClick:()=>c(h=>!h),className:"ring-offset-background focus-visible:ring-ring absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground transition-colors hover:text-foreground focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1","aria-label":v,"aria-pressed":l,children:l?a(si,{"aria-hidden":true,className:"size-4"}):a(ii,{"aria-hidden":true,className:"size-4"})})]}):a("input",{ref:i,type:m,"data-slot":"input",onFocus:s,className:g,...o})});at.displayName="Input";var li=(e,t)=>{if(typeof t=="number"){let r=Math.pow(10,t);return (Math.round(e*r)/r).toString()}return e.toString()},rh=e=>e==null?"":typeof e=="number"?e.toString():e.trim(),oh=e=>e===0?/^-?\d*$/:typeof e=="number"?new RegExp(`^-?\\d*(\\.\\d{0,${e}})?$`):/^-?\d*(\.\d*)?$/,ah=e=>e===""||e==="-"||e==="."||e==="-.",ci=(e,t)=>{if(ah(e))return null;let r=Number(e);if(Number.isNaN(r))return null;if(typeof t=="number"){let o=Math.pow(10,t);return Math.round(r*o)/o}return r},di=X__namespace.forwardRef(({value:e,defaultValue:t,onChange:r,min:o,max:n,decimals:i,formatter:s,parser:l,onBlur:c,onFocus:u,inputMode:d,pattern:m,...v},g)=>{let h=X__namespace.useMemo(()=>oh(i),[i]),p=X__namespace.useMemo(()=>{var P;let D=(P=e!=null?e:t)!=null?P:null;return D===null?"":li(D,i)},[e,t,i]),[b,x]=X__namespace.useState(p),[y,C]=X__namespace.useState(false);X__namespace.useEffect(()=>{if(e===void 0)return;let D=e===null?"":li(e,i);x(P=>P===D?P:D);},[e,i]);let R=X__namespace.useCallback(D=>{if(D===null)return null;let P=D;return typeof o=="number"&&(P=Math.max(o,P)),typeof n=="number"&&(P=Math.min(n,P)),P},[o,n]),S=D=>{let P=l?rh(l(D.target.value)):D.target.value;if(!h.test(P)&&P!=="")return;x(P);let T=ci(P,i);r==null||r(T);},k=D=>{C(true),u==null||u(D);},M=D=>{C(false);let P=ci(b,i),T=R(P);if(T===null)b!==""&&(x(""),r==null||r(null));else if(T!==P){let O=li(T,i);x(O),r==null||r(T);}c==null||c(D);},N=X__namespace.useMemo(()=>{if(y)return b;if(s){let D=ci(b,i),P=D!=null?D:b===""?null:b;return s(P)}return b},[s,y,b,i]);return a(at,{ref:g,value:N,onChange:S,onFocus:k,onBlur:M,inputMode:d!=null?d:i===0?"numeric":"decimal",pattern:m!=null?m:i===0?"-?\\d*":void 0,...v})});di.displayName="InputNumeric";var Nc="X",nh=e=>e.replace(/\D/g,""),ih=(e,t)=>e.split("").reduce((r,o)=>o===t?r+1:r,0),sh=(e,t,r)=>{if(!t)return e;let o="",n=0;for(let i of t)if(i===r)if(n<e.length)o+=e[n],n+=1;else break;else (e.length>0||o.length>0)&&(o+=i);return o},ui=X__namespace.forwardRef(({mask:e,placeholderChar:t=Nc,value:r,defaultValue:o,onChange:n,inputMode:i,...s},l)=>{var p;let c=(p=t[0])!=null?p:Nc,u=X__namespace.useMemo(()=>ih(e,c),[e,c]),d=X__namespace.useCallback(b=>{if(!b)return "";let x=nh(b);return u===0?"":x.slice(0,u)},[u]),[m,v]=X__namespace.useState(()=>{var b;return d((b=r!=null?r:o)!=null?b:"")});X__namespace.useEffect(()=>{if(r===void 0)return;let b=d(r);v(x=>x===b?x:b);},[r,d]),X__namespace.useEffect(()=>{r===void 0&&v(b=>d(b));},[e,c,d,r]);let g=b=>{let x=d(b.target.value);r===void 0&&v(x),n==null||n(x);},h=X__namespace.useMemo(()=>sh(m,e,c),[e,c,m]);return a(at,{ref:l,value:h,onChange:g,inputMode:i!=null?i:"numeric",...s})});ui.displayName="InputMask";function Jr({...e}){return a(radixUi.Popover.Root,{"data-slot":"popover",...e})}function Ec({...e}){return a(radixUi.Popover.Trigger,{"data-slot":"popover-trigger",...e})}function Zr({className:e,align:t="center",sideOffset:r=4,...o}){return a(radixUi.Popover.Portal,{children:a(radixUi.Popover.Content,{"data-slot":"popover-content",align:t,sideOffset:r,className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}function Ea({...e}){return a(radixUi.Popover.Anchor,{"data-slot":"popover-anchor",...e})}function Qr({...e}){return a(vaul.Drawer.Root,{"data-slot":"drawer",...e})}function Da({...e}){return a(vaul.Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function lh({...e}){return a(vaul.Drawer.Portal,{"data-slot":"drawer-portal",...e})}function La({...e}){return a(vaul.Drawer.Close,{"data-slot":"drawer-close",...e})}function ch({className:e,...t}){return a(vaul.Drawer.Overlay,{"data-slot":"drawer-overlay",className:f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function eo({className:e,children:t,...r}){return w(lh,{"data-slot":"drawer-portal",children:[a(ch,{}),w(vaul.Drawer.Content,{"data-slot":"drawer-content",className:f("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...r,children:[a("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function to({className:e,...t}){return a("div",{"data-slot":"drawer-header",className:f("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function Dc({className:e,...t}){return a("div",{"data-slot":"drawer-footer",className:f("mt-auto flex flex-col gap-2 p-4",e),...t})}function ro({className:e,...t}){return a(vaul.Drawer.Title,{"data-slot":"drawer-title",className:f("text-foreground font-semibold",e),...t})}function h1({className:e,...t}){return a(vaul.Drawer.Description,{"data-slot":"drawer-description",className:f("text-muted-foreground text-sm",e),...t})}var hi="YYYY-MM-DD",vh=["Su","Mo","Tu","We","Th","Fr","Sa"],hh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pi={bottomLeft:{side:"bottom",align:"start"},bottomRight:{side:"bottom",align:"end"},topLeft:{side:"top",align:"start"},topRight:{side:"top",align:"end"}},bh=e=>{var t;return e&&(t=pi[e])!=null?t:pi.bottomLeft},_c=e=>e?typeof e=="function"?[hi]:Array.isArray(e)?e:[e]:[hi],Ia=(e,t)=>{if(!e)return "";if(typeof t=="function")return t(e);let r=_c(t),[o]=r;return e.format(o!=null?o:hi)},wh=(e,t)=>{let r=e.trim();if(!r)return null;if(t&&typeof t=="function"){let i=_t(r);return i.isValid()?i:null}let o=_c(t);for(let i of o){let s=Kl(r,i);if(s!=null&&s.isValid())return s}let n=_t(r);return n.isValid()?n:null},fi=(e,t,r)=>{if(!e||!t)return false;switch(r){case "month":return e.isSame(t,"month");case "year":case "decade":return e.isSame(t,"year");default:return e.isSame(t,"day")}},xh=e=>{let t=Math.floor(e.year()/10)*10;return e.year(t).startOf("year")},_a=e=>{let t=xh(e),r=t.add(9,"year").endOf("year");return {start:t,end:r}},yr=(e,t,r)=>{let o=e;return t&&o.isBefore(t)&&(o=t),r&&o.isAfter(r)&&(o=r),o},Rr=44,Oa=5,Lc=40,mi=6,Ic=(e,t)=>t<=0?0:Math.min(Math.max(e,0),t),gi=({label:e,options:t,selectedValue:r,onValueChange:o,open:n,infinite:i=true})=>{let s=X__namespace.useRef(null),l=X__namespace.useRef(null),[c,u]=X__namespace.useState(()=>({start:0,end:Math.min(t.length,Oa+mi)}));X__namespace.useEffect(()=>{i||u(y=>{if(t.length===0)return {start:0,end:0};let C=t.length-1,R=Math.min(y.start,C),S=Oa+mi,k=Math.max(R+S,R+1),M=Math.min(t.length,k);return y.start===R&&y.end===M?y:{start:R,end:M}});},[i,t.length]);let d=X__namespace.useCallback(y=>{if(i||t.length===0)return;let C=Ic(y,t.length-1),R=Oa+mi,S=Math.floor(R/2),k=Math.max(0,C-S),M=Math.min(t.length,C+S+1);u(N=>N.start===k&&N.end===M?N:{start:k,end:M});},[i,t.length]),m=X__namespace.useMemo(()=>{if(t.length===0)return [];if(!i)return t;let y=[];for(let C=0;C<Lc;C+=1)for(let R of t)y.push(R);return y},[i,t]),v=X__namespace.useCallback((y,C="auto")=>{if(!s.current||t.length===0||m.length===0)return;let R=t.findIndex(D=>D.value===y),S=R>=0?R:0,k=Math.floor(Lc/2),N=(i?S+t.length*k:S)*Rr;s.current.scrollTo({top:N,behavior:C}),i||d(S);},[m.length,i,t,d]);X__namespace.useLayoutEffect(()=>{n&&v(r);},[v,n,t,r]),X__namespace.useEffect(()=>{if(i||!n)return;let y=t.findIndex(C=>C.value===r);d(y>=0?y:0);},[i,n,t,r,d]),X__namespace.useEffect(()=>()=>{l.current!==null&&clearTimeout(l.current);},[]);let g=X__namespace.useCallback(y=>{m.length===0||t.length===0||(l.current!==null&&clearTimeout(l.current),l.current=setTimeout(()=>{var k,M;if(!s.current)return;let C=Math.round(s.current.scrollTop/Rr);i||(C=Ic(C,m.length-1));let R=m[C];if(!R)return;if(!o(R.value)){v(r,"smooth");return}if(i){let N=t.length,D=m.length-t.length-1;if(C<=N||C>=D)v(R.value);else {let P=C*Rr;(k=s.current)==null||k.scrollTo({top:P});}}else {d(C);let N=C*Rr;(M=s.current)==null||M.scrollTo({top:N});}},80));},[v,m,i,o,t,t.length,r,d]);if(t.length===0)return a("div",{className:"flex-1",children:a("p",{className:"text-center text-sm text-muted-foreground",children:"No options"})});let h=(Oa-1)/2*Rr,p=i?m:t.slice(c.start,c.end),b=c.start*Rr,x=t.length*Rr;return w("div",{className:"flex flex-1 flex-col items-center gap-2",children:[a("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),w("div",{className:"relative h-56 w-full overflow-hidden",children:[a("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 border-y border-primary/30"}),a("div",{ref:s,onScroll:g,className:"h-56 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",style:{paddingTop:h,paddingBottom:h,WebkitOverflowScrolling:"touch"},children:i?m.map((y,C)=>{let R=`${C}-${y.value}`,S=y.value===r;return a("div",{className:f("flex h-11 items-center justify-center text-base transition-colors",S?"font-medium text-foreground":"text-muted-foreground"),children:y.label},R)}):a("div",{style:{height:x},children:a("div",{style:{transform:`translateY(${b}px)`},children:p.map((y,C)=>{let S=`${c.start+C}-${y.value}`,k=y.value===r;return a("div",{className:f("flex h-11 items-center justify-center text-base transition-colors",k?"font-medium text-foreground":"text-muted-foreground"),children:y.label},S)})})})})]})]})},yh=(e,t)=>e&&e!=="time"?e:t==="month"?"month":t==="year"?"year":"date",Rh=e=>{switch(e){case "month":case "year":return e;case "decade":return "year";default:return "day"}},kh=(e,t,r,o="date")=>{let n=Rh(o);return !(t&&e.isBefore(t,n)||r&&e.isAfter(r,n))},Ch=e=>{var t,r,o,n,i,s,l;return {placeholder:(t=e==null?void 0:e.placeholder)!=null?t:"Select date",today:(r=e==null?void 0:e.today)!=null?r:"Today",clear:(o=e==null?void 0:e.clear)!=null?o:"Clear",months:(n=e==null?void 0:e.months)!=null?n:hh,weekDays:(i=e==null?void 0:e.weekDays)!=null?i:vh,yearFormat:(s=e==null?void 0:e.yearFormat)!=null?s:"YYYY",decadeFormat:(l=e==null?void 0:e.decadeFormat)!=null?l:((c,u)=>`${c.format("YYYY")}-${u.format("YYYY")}`)}},vi=e=>{let t=X__namespace.useRef(e);return X__namespace.useEffect(()=>{t.current=e;},[e]),t},Ph="hsl(var(--primary))",bi=X__namespace.forwardRef((e,t)=>{var Hs,Bs,Vs,js,Us,Ws,Gs;let{value:r,defaultValue:o=null,onChange:n,onOpenChange:i,allowClear:s=true,autoFocus:l=false,defaultOpen:c,disabled:u=false,disabledDate:d,format:m,preserveInvalidOnBlur:v=false,inputReadOnly:g=false,locale:h,minDate:p,maxDate:b,mode:x,needConfirm:y=false,open:C,panelRender:R,picker:S,placeholder:k,placement:M="bottomLeft",prefix:N,presets:D,size:P="middle",status:T,variant:O="outlined",className:A,style:V,inputClassName:L,inputStyle:_,onFocus:z,onBlur:E,name:I,id:H,...j}=e,{isNative:U}=Xt(),W=ct(),G=U||W,[B,Z]=X__namespace.useState(null),q=X__namespace.useMemo(()=>Ch(h),[h]),le=vi(n),ee=vi(i),ae=vi(m),he=r!==void 0,[ve,K]=X__namespace.useState(o),ce=(Hs=he?r:ve)!=null?Hs:null,fe=X__namespace.useMemo(()=>yh(x,S),[x,S]),[we,ke]=X__namespace.useState(fe),ie=X__namespace.useCallback(F=>{var $;he||K(F),($=le.current)==null||$.call(le,F,Ia(F,ae.current));},[ae,he,le]),[ne,xe]=X__namespace.useState(ce);X__namespace.useEffect(()=>{xe(ce);},[ce]);let[de,Se]=X__namespace.useState(()=>{let F=ce!=null?ce:_t();return yr(F,p,b)}),De=C!==void 0,[be,ze]=X__namespace.useState(!!c),Ee=De?!!C:be,Le=X__namespace.useCallback(F=>{var $;De||ze(F),($=ee.current)==null||$.call(ee,F);},[De,ee]),ye=y?ne:ce;X__namespace.useEffect(()=>{Ee&&(ke(fe),Se(F=>yr(ye!=null?ye:F,p,b)));},[ye,fe,b,p,Ee]);let[Ut,Ce]=X__namespace.useState(()=>Ia(ye,ae.current)),fr=X__namespace.useRef(false);X__namespace.useEffect(()=>{fr.current||Ce(Ia(ye,ae.current));},[ye,ae]);let et=X__namespace.useMemo(()=>({"--date-primary-color":Ph}),[]),tr=X__namespace.useRef(null),Dt=X__namespace.useCallback(F=>{u||(Le(F),F&&(ke(fe),Se($=>yr(ye!=null?ye:$,p,b))));},[ye,u,fe,b,p,Le]),rr=X__namespace.useCallback(F=>wh(F,ae.current),[ae]),Ae=X__namespace.useCallback((F,$)=>kh(F,p,b,$)?d?d(F,{type:$}):false:true,[d,b,p]),Te=X__namespace.useCallback(F=>Ia(F,ae.current),[ae]),mr=X__namespace.useCallback(F=>{Ae(F,"date")||(y?(xe(F),Ce(Te(F))):(ie(F),Ce(Te(F)),Le(false)));},[ie,Te,Ae,y,Le]),Br=F=>{let $=de.month(F);if(Se($),fe==="month"){let Y=$.startOf("month");if(Ae(Y,"month"))return;y?(xe(Y),Ce(Te(Y))):(ie(Y),Ce(Te(Y)),Le(false));}else ke("date");},ue=F=>{let $=de.year(F);if(Se($),fe==="year"){let Y=$.startOf("year");if(Ae(Y,"year"))return;y?(xe(Y),Ce(Te(Y))):(ie(Y),Ce(Te(Y)),Le(false));}else ke("month");},gt=F=>{let $=de.year(F);Se($),ke("year");},tt=F=>{Se($=>{let Y=F==="date"?$.subtract(1,"month"):F==="month"?$.subtract(1,"year"):$.subtract(10,"year");return yr(Y,p,b)});},Wt=F=>{Se($=>{let Y=F==="date"?$.add(1,"month"):F==="month"?$.add(1,"year"):$.add(10,"year");return yr(Y,p,b)});},Mn=()=>{let $=de.startOf("month").startOf("week"),Y=[];for(let re=0;re<6;re+=1){let Ue=[];for(let lt=0;lt<7;lt+=1){let Ie=$.add(re*7+lt,"day"),Gt=Ie.month()===de.month()&&Ie.year()===de.year(),Co=fi(Ie,ye,"date"),dm=Ie.isSame(_t(),"day"),An=Ae(Ie,"date");Ue.push(a("button",{type:"button",disabled:An,onClick:()=>mr(Ie),className:f("flex h-8 w-8 items-center justify-center rounded-md text-sm transition",!Gt&&"text-muted-foreground/70",Co&&"bg-[var(--date-primary-color)] text-white",dm&&!Co&&"border border-[var(--date-primary-color)]",An&&"cursor-not-allowed opacity-40",!An&&!Co&&"hover:bg-muted"),style:et,children:Ie.date()},Ie.format("YYYY-MM-DD")));}Y.push(a("div",{className:"grid grid-cols-7 gap-1",children:Ue},`week-${re}`));}return w("div",{className:"space-y-1",children:[a("div",{className:"grid grid-cols-7 gap-1 text-center text-xs text-muted-foreground",children:q.weekDays.map(re=>a("div",{children:re},re))}),a("div",{className:"space-y-1",children:Y})]})},na=()=>a("div",{className:"grid grid-cols-3 gap-2",children:q.months.map((F,$)=>{let Y=de.month($),re=fi(Y,ye,"month"),Ue=Ae(Y.startOf("month"),"month");return a("button",{type:"button",disabled:Ue,onClick:()=>Br($),className:f("flex h-12 flex-col items-center justify-center rounded-md text-sm transition",re&&"bg-[var(--date-primary-color)] text-white",Ue&&"cursor-not-allowed opacity-40",!Ue&&!re&&"hover:bg-muted"),style:et,children:F},F)})}),Nn=()=>{let{start:F}=_a(de),$=[];for(let Y=-1;Y<11;Y+=1)$.push(F.year()+Y);return a("div",{className:"grid grid-cols-4 gap-2",children:$.map(Y=>{let re=de.year(Y),Ue=fi(re,ye,"year"),lt=Ae(re.startOf("year"),"year"),Ie=Y<F.year()||Y>F.year()+9;return a("button",{type:"button",disabled:lt,onClick:()=>ue(Y),className:f("flex h-12 flex-col items-center justify-center rounded-md text-sm transition",Ue&&"bg-[var(--date-primary-color)] text-white",lt&&"cursor-not-allowed opacity-40",!lt&&!Ue&&"hover:bg-muted",Ie&&"text-muted-foreground/70"),style:et,children:Y},Y)})})},ia=()=>{let{start:F}=_a(de),$=F.year()-10,Y=[];for(let re=0;re<12;re+=1)Y.push($+re*10);return a("div",{className:"grid grid-cols-4 gap-2",children:Y.map(re=>{let Ue=re+9,lt=ye==null?void 0:ye.year(),Ie=lt!==void 0&&lt>=re&&lt<=Ue,Gt=Ae(de.year(re).startOf("year"),"year"),Co=Ue<F.year()||re>F.year()+9;return w("button",{type:"button",disabled:Gt,onClick:()=>gt(re),className:f("flex h-12 flex-col items-center justify-center rounded-md text-sm transition",Ie&&"bg-[var(--date-primary-color)] text-white",Gt&&"cursor-not-allowed opacity-40",!Gt&&!Ie&&"hover:bg-muted",Co&&"text-muted-foreground/70"),style:et,children:[re,"-",Ue]},`${re}-${Ue}`)})})},En=()=>{switch(we){case "month":return na();case "year":return Nn();case "decade":return ia();default:return Mn()}},Dn=F=>{fr.current=true,Ce(F.target.value);},Ln=F=>{z==null||z(F),Dt(true);},sa=F=>{E==null||E(F);let $=()=>{fr.current=false;let Y=rr(Ut);Y&&!Ae(Y,"date")?y?(xe(Y),Ce(Te(Y))):(ie(Y),Ce(Te(Y))):v||Ce(Te(ye));};typeof window!="undefined"?window.setTimeout($,50):$();},Vr=F=>{F==null||F.preventDefault(),F==null||F.stopPropagation(),!u&&(xe(null),Se(()=>yr(_t(),p,b)),y?Ce(""):(ie(null),Ce(""),Le(false)));},yo=()=>{let F=_t();Ae(F,"date")||(y?(xe(F),Ce(Te(F))):(ie(F),Ce(Te(F)),Le(false)));},Ro=()=>{y&&(ie(ne!=null?ne:null),Le(false));},Q=()=>{y&&(xe(ce),Ce(Te(ce)),Le(false));},ge=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:void 0,st=!!s&&!u&&!!Ut,Lt=(Bs=ge==null?void 0:ge.clearIcon)!=null?Bs:a(lucideReact.X,{className:"h-4 w-4",strokeWidth:2}),{side:In,align:Xf}=bh(M),Jf=(Vs={large:"lg",middle:"md",small:"sm"}[P])!=null?Vs:"md",Zf={error:{borderColor:"hsl(var(--destructive))","--active-border-color":"hsl(var(--destructive))","--input-active-border-color":"hsl(var(--destructive))"},warning:{borderColor:"var(--warning, hsl(var(--primary)))","--active-border-color":"var(--warning, hsl(var(--primary)))","--input-active-border-color":"var(--warning, hsl(var(--primary)))"}},Qf={outlined:"",borderless:"border-transparent shadow-none focus:border-transparent focus:ring-0 focus:ring-offset-0",filled:"border-transparent bg-muted/60 focus:bg-muted",underlined:"border-x-0 border-t-0 rounded-none focus:ring-offset-0"},em={...T?Zf[T]:{},..._!=null?_:{}},tm={sm:"h-8 text-sm",md:`${It} text-sm`,lg:"h-11 text-base"},rm={error:"border-destructive focus-visible:border-destructive focus-visible:ring-destructive/30",warning:"border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500/30"},Ls=w("div",{className:"w-[280px] select-none",role:"dialog","aria-modal":"true",children:[w("div",{className:"flex items-center justify-between px-2 pt-2",children:[w("div",{className:"flex items-center gap-1",children:[a("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>tt(we==="date"?"month":we==="month"?"year":"decade"),children:a(lucideReact.ChevronsLeft,{className:"h-4 w-4"})}),we==="date"&&a("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>tt("date"),children:a(lucideReact.ChevronLeft,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-col items-center",children:w("button",{type:"button",className:"text-sm font-medium hover:text-[var(--date-primary-color)]",style:et,onClick:()=>{we==="date"?ke("month"):we==="month"?ke("year"):we==="year"&&ke("decade");},children:[we==="date"&&`${q.months[de.month()]} ${de.format(q.yearFormat)}`,we==="month"&&de.format(q.yearFormat),we==="year"&&(()=>{let{start:F,end:$}=_a(de);return q.decadeFormat(F,$)})(),we==="decade"&&(()=>{let{start:F,end:$}=_a(de);return `${F.subtract(10,"year").format(q.yearFormat)}-${$.add(10,"year").format(q.yearFormat)}`})()]})}),w("div",{className:"flex items-center gap-1",children:[we==="date"&&a("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>Wt("date"),children:a(lucideReact.ChevronRight,{className:"h-4 w-4"})}),a("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>Wt(we==="date"?"month":we==="month"?"year":"decade"),children:a(lucideReact.ChevronsRight,{className:"h-4 w-4"})})]})]}),a("div",{className:"px-2 pb-2 pt-3",children:En()}),w("div",{className:"flex items-center justify-between gap-2 border-t px-2 py-2",children:[a("div",{className:"flex flex-wrap items-center gap-2",children:D==null?void 0:D.map((F,$)=>{let Y=typeof F.value=="function"?F.value():F.value,re=Y?Ae(Y,"date"):false;return a("button",{type:"button",disabled:re,onClick:()=>{!Y||re||(y?(xe(Y),Ce(Te(Y))):(ie(Y),Ce(Te(Y)),Le(false)));},className:f("rounded-md px-2 py-1 text-xs transition",re?"cursor-not-allowed bg-muted text-muted-foreground":"bg-muted hover:bg-muted/80"),children:F.label},$)})}),w("div",{className:"flex items-center gap-2",children:[a("button",{type:"button",onClick:yo,className:"text-xs font-medium text-[var(--date-primary-color)] hover:underline disabled:text-muted-foreground",disabled:Ae(_t(),"date"),style:et,children:q.today}),y?w("div",{className:"flex items-center gap-2",children:[a("button",{type:"button",className:"rounded-md px-2 py-1 text-xs hover:bg-muted",onClick:Q,children:q.clear}),a("button",{type:"button",className:"rounded-md bg-[var(--date-primary-color)] px-2 py-1 text-xs font-medium text-white hover:opacity-90",style:et,onClick:Ro,children:"OK"})]}):a("button",{type:"button",className:"rounded-md px-2 py-1 text-xs hover:bg-muted",onClick:F=>Vr(F),disabled:!ce,children:q.clear})]})]})]}),om=R?R(Ls):Ls;X__namespace.useEffect(()=>{if(!l)return;let F=()=>{var $;($=tr.current)==null||$.focus();};typeof window!="undefined"?window.setTimeout(F,0):F();},[l]),X__namespace.useImperativeHandle(t,()=>tr.current);let am=!u&&(g||G),Is=w("div",{role:"combobox","aria-expanded":Ee,"aria-haspopup":"dialog",className:f("relative w-full",A),style:V,children:[N&&a("div",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center text-muted-foreground",children:N}),a(at,{...j,ref:tr,value:Ut,onChange:Dn,onFocus:Ln,onBlur:sa,autoFocus:l,readOnly:g||G,disabled:u,placeholder:k!=null?k:q.placeholder,name:I,id:H,className:f("pr-10 text-sm",Qf[O],N&&"pl-10",u&&"cursor-not-allowed opacity-60",am&&"cursor-pointer",tm[Jf],T?rm[T]:void 0,L),style:em,onClick:F=>{var $;($=j.onClick)==null||$.call(j,F),!u&&G&&Dt(true);}}),st&&a("button",{type:"button",className:"absolute inset-y-0 right-8 flex items-center text-muted-foreground transition hover:text-foreground",onMouseDown:F=>{F.preventDefault(),F.stopPropagation();},onClick:F=>Vr(F),children:Lt}),a("div",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-muted-foreground",children:a(lucideReact.Calendar,{className:"h-4 w-4"})})]}),ko=X__namespace.useMemo(()=>{var $,Y;return ((Y=y?($=ne!=null?ne:ce)!=null?$:de:ye!=null?ye:de)!=null?Y:_t()).clone()},[ye,ne,y,ce,de]),nm=X__namespace.useMemo(()=>q.months.map((F,$)=>({label:F,value:$})),[q.months]),_s=ko.daysInMonth(),im=X__namespace.useMemo(()=>Array.from({length:_s},(F,$)=>({label:String($+1).padStart(2,"0"),value:$+1})),[_s]),Os=ko.year(),As=(js=p==null?void 0:p.year())!=null?js:Os-100,Fs=(Us=b==null?void 0:b.year())!=null?Us:Os+100,_n=Math.min(As,Fs),zs=Math.max(As,Fs),sm=X__namespace.useMemo(()=>Array.from({length:zs-_n+1},(F,$)=>{let Y=_n+$;return {label:String(Y),value:Y}}),[zs,_n]),On=X__namespace.useCallback((F,$)=>{var Ue,lt;let re=(lt=y?(Ue=ne!=null?ne:ce)!=null?Ue:de:ce!=null?ce:de)!=null?lt:_t();if(F==="month"){let Ie=re.month($),Gt=Math.min(re.date(),Ie.daysInMonth());re=Ie.date(Gt);}else if(F==="date"){let Ie=Math.min($,re.daysInMonth());re=re.date(Ie);}else {let Ie=re.year($),Gt=Math.min(re.date(),Ie.daysInMonth());re=Ie.date(Gt);}return re=yr(re,p,b),Ae(re,"date")?false:(y?(xe(re),Ce(Te(re))):(ie(re),Ce(Te(re))),Se(re),true)},[ie,ne,Te,Ae,b,p,y,ce,Se,de]),lm=(Gs=(Ws=typeof j["aria-label"]=="string"?j["aria-label"]:void 0)!=null?Ws:k)!=null?Gs:q.placeholder,cm=X__namespace.useCallback(F=>{Dt(F);},[Dt]);if(X__namespace.useEffect(()=>{var $,Y;if(!G||!Ee||!H||typeof document=="undefined")return;Z(null);let F=document.querySelector(`label[for="${H}"]`);F&&Z((Y=($=F.textContent)==null?void 0:$.trim())!=null?Y:null);},[H,Ee,G]),G){let F=B!=null?B:lm;return w(Qr,{open:Ee,onOpenChange:cm,children:[a(Da,{asChild:true,children:Is}),w(eo,{className:"mt-10 max-h-[min(540px,calc(100dvh-6rem))] rounded-t-3xl bg-background",children:[a(to,{className:"px-6 pb-2 pt-4",children:a(ro,{className:"text-base font-medium text-foreground",children:F})}),w("div",{className:"flex flex-1 flex-col gap-6 px-6 pb-6",children:[w("div",{className:"flex gap-4",children:[a(gi,{open:Ee,label:"Month",options:nm,selectedValue:ko.month(),onValueChange:$=>On("month",$)}),a(gi,{open:Ee,label:"Day",options:im,selectedValue:ko.date(),onValueChange:$=>On("date",$)}),a(gi,{open:Ee,label:"Year",options:sm,selectedValue:ko.year(),onValueChange:$=>On("year",$),infinite:false})]}),w("div",{className:"mt-auto flex items-center justify-between",children:[a(te,{type:"button",variant:"ghost",size:"sm",className:"text-[var(--date-primary-color)] hover:bg-[var(--date-primary-color)]/10 focus-visible:ring-[var(--date-primary-color)]/30",style:et,onClick:yo,children:q.today}),w("div",{className:"flex items-center gap-3",children:[s?a(te,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:$=>Vr($),children:q.clear}):null,y?w(jsxRuntime.Fragment,{children:[a(te,{type:"button",variant:"ghost",size:"sm",className:"hover:bg-muted",onClick:Q,children:"Cancel"}),a(te,{type:"button",variant:"default",size:"sm",className:"bg-[var(--date-primary-color)] text-white hover:opacity-90 focus-visible:ring-[var(--date-primary-color)]/30",style:et,onClick:Ro,children:"OK"})]}):a(La,{asChild:true,children:a(te,{type:"button",variant:"default",size:"sm",className:"bg-[var(--date-primary-color)] text-white hover:opacity-90 focus-visible:ring-[var(--date-primary-color)]/30",style:et,children:"Done"})})]})]})]})]})]})}return w(Jr,{open:Ee,onOpenChange:Dt,children:[a(Ea,{asChild:true,children:Is}),a(Zr,{className:"w-auto border border-border bg-popover p-0",align:Xf,side:In,children:om})]})});bi.displayName="DatePicker";function Oc({...e}){return a(radixUi.DropdownMenu.Root,{"data-slot":"dropdown-menu",...e})}function _1({...e}){return a(radixUi.DropdownMenu.Portal,{"data-slot":"dropdown-menu-portal",...e})}function O1({...e}){return a(radixUi.DropdownMenu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function Ac({className:e,sideOffset:t=4,...r}){return a(radixUi.DropdownMenu.Portal,{children:a(radixUi.DropdownMenu.Content,{"data-slot":"dropdown-menu-content",sideOffset:t,className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function A1({...e}){return a(radixUi.DropdownMenu.Group,{"data-slot":"dropdown-menu-group",...e})}function F1({className:e,inset:t,variant:r="default",...o}){return a(radixUi.DropdownMenu.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:f("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function Fc({className:e,children:t,checked:r,...o}){return w(radixUi.DropdownMenu.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:f("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...o,children:[a("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a(radixUi.DropdownMenu.ItemIndicator,{children:a(lucideReact.CheckIcon,{className:"size-4"})})}),t]})}function z1({...e}){return a(radixUi.DropdownMenu.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function H1({className:e,children:t,...r}){return w(radixUi.DropdownMenu.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:f("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[a("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a(radixUi.DropdownMenu.ItemIndicator,{children:a(lucideReact.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function zc({className:e,inset:t,...r}){return a(radixUi.DropdownMenu.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:f("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function Hc({className:e,...t}){return a(radixUi.DropdownMenu.Separator,{"data-slot":"dropdown-menu-separator",className:f("bg-border -mx-1 my-1 h-px",e),...t})}function B1({className:e,...t}){return a("span",{"data-slot":"dropdown-menu-shortcut",className:f("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function V1({...e}){return a(radixUi.DropdownMenu.Sub,{"data-slot":"dropdown-menu-sub",...e})}function j1({className:e,inset:t,children:r,...o}){return w(radixUi.DropdownMenu.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:f("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...o,children:[r,a(lucideReact.ChevronRightIcon,{className:"ml-auto size-4"})]})}function U1({className:e,...t}){return a(radixUi.DropdownMenu.SubContent,{"data-slot":"dropdown-menu-sub-content",className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var Nh=({children:e,...t})=>a("form",{...t,children:e});var Oo=({className:e,...t})=>a("p",{"data-slot":"form-description",className:f("text-muted-foreground text-sm",e),...t});Oo.displayName="FormDescription";var Ao=({className:e,...t})=>{let r=t.children;return r?a("p",{"data-slot":"form-message",className:f("text-destructive text-sm",e),...t,children:r}):null};Ao.displayName="FormMessage";var Fo=({className:e,...t})=>a(_e,{"data-slot":"form-label",className:e,...t});Fo.displayName="FormLabel";var Eh=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange?e:(t=e.form)!=null?t:e},Dh=({name:e,label:t,description:r,className:o,checked:n,defaultChecked:i,onCheckedChange:s,checkboxProps:l,error:c,form:u,rules:d})=>{var D,P;let{onCheckedChange:m,...v}=l!=null?l:{},g=Eh(u),h=g==null?void 0:g.values,p=g==null?void 0:g.errors,b=g==null?void 0:g.touched,x=h==null?void 0:h[e],y=p==null?void 0:p[e],C=b==null?void 0:b[e],R=(D=g==null?void 0:g.validationSequence)!=null?D:0,S=(P=C?y:void 0)!=null?P:c,k=x!==void 0?!!x:n!==void 0?n:void 0,M=T=>{var L,_,z;let O=T===true,V=!!d?Bc(O,d):void 0;if((L=g==null?void 0:g.setFieldError)==null||L.call(g,e,V),(_=g==null?void 0:g.setFieldValue)==null||_.call(g,e,O),(z=g==null?void 0:g.setFieldTouched)==null||z.call(g,e,true),g!=null&&g.handleChange){let E={target:{name:e,value:O,checked:O}};g.handleChange(E);}s==null||s(O),m==null||m(T);},N=X__namespace.useRef(R);return X__namespace.useEffect(()=>{let T=!!d,O=R!==N.current;if(!(g!=null&&g.setFieldError)||!T){N.current=R;return}if(!C&&!O){N.current=R;return}let V=Bc(x!==void 0?!!x:n!==void 0?n:!!i,d);V!==y&&g.setFieldError(e,V),N.current=R;},[n,i,y,C,x,e,g,d,R]),w("div",{className:f("items-start gap-2",o),children:[w("div",{className:"flex items-start gap-3",children:[a("div",{children:a(Eo,{name:e,...v,...k!==void 0?{checked:k}:{defaultChecked:i},"aria-invalid":!!S,onCheckedChange:M})}),w("div",{className:"grid gap-1.5 leading-none",children:[t?a(Fo,{className:"text-sm font-medium leading-none",children:t}):null,r?a(Oo,{children:r}):null]})]}),a(Ao,{children:S})]})};Dh.displayName="FormCheckbox";function Bc(e,t){if(t){if(t.required&&!e)return typeof t.required=="string"?t.required:"This field is required";if(t.validate){let r=t.validate(e);if(typeof r=="string")return r;if(r===false)return "Invalid value"}}}var Lh={row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},Ih={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},_h={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Fa={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},za={none:{all:"gap-0",x:"gap-x-0",y:"gap-y-0"},xs:{all:"gap-1",x:"gap-x-1",y:"gap-y-1"},sm:{all:"gap-2",x:"gap-x-2",y:"gap-y-2"},md:{all:"gap-3",x:"gap-x-3",y:"gap-y-3"},lg:{all:"gap-4",x:"gap-x-4",y:"gap-y-4"},xl:{all:"gap-6",x:"gap-x-6",y:"gap-y-6"},"2xl":{all:"gap-8",x:"gap-x-8",y:"gap-y-8"}},wi={...za,small:za.sm,middle:za.md,large:za.lg},Oh=X__namespace.forwardRef(({direction:e,vertical:t,align:r,justify:o,wrap:n=false,gap:i,gapX:s,gapY:l,inline:c=false,className:u,children:d,...m},v)=>{var p;let g=e!=null?e:t?"column":"row",h=typeof n=="boolean"?n?Fa.wrap:Fa.nowrap:(p=Fa[n])!=null?p:Fa.nowrap;return a("div",{ref:v,"data-slot":"flex",className:f(c?"inline-flex":"flex",Lh[g],r?Ih[r]:null,o?_h[o]:null,h,i?wi[i].all:null,s?wi[s].x:null,l?wi[l].y:null,u),...m,children:d})});Oh.displayName="Flex";function hM({...e}){return a(radixUi.HoverCard.Root,{"data-slot":"hover-card",...e})}function bM({...e}){return a(radixUi.HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function wM({className:e,align:t="center",sideOffset:r=4,...o}){return a(radixUi.HoverCard.Portal,{"data-slot":"hover-card-portal",children:a(radixUi.HoverCard.Content,{"data-slot":"hover-card-content",align:t,sideOffset:r,className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}function PM({className:e,containerClassName:t,...r}){return a(inputOtp.OTPInput,{"data-slot":"input-otp",containerClassName:f("flex items-center gap-2 has-disabled:opacity-50",t),className:f("disabled:cursor-not-allowed",e),...r})}function SM({className:e,...t}){return a("div",{"data-slot":"input-otp-group",className:f("flex items-center",e),...t})}function TM({index:e,className:t,...r}){var l;let o=X__namespace.useContext(inputOtp.OTPInputContext),{char:n,hasFakeCaret:i,isActive:s}=(l=o==null?void 0:o.slots[e])!=null?l:{};return w("div",{"data-slot":"input-otp-slot","data-active":s,className:f("data-[active=true]:border-primary data-[active=true]:ring-primary/40 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[n,i&&a("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:a("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function MM({...e}){return a("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:a(lucideReact.MinusIcon,{})})}function _e({className:e,...t}){return a(radixUi.Label.Root,{"data-slot":"label",className:f("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function zM({className:e,...t}){return a(radixUi.Menubar.Root,{"data-slot":"menubar",className:f("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function HM({...e}){return a(radixUi.Menubar.Menu,{"data-slot":"menubar-menu",...e})}function BM({...e}){return a(radixUi.Menubar.Group,{"data-slot":"menubar-group",...e})}function Uh({...e}){return a(radixUi.Menubar.Portal,{"data-slot":"menubar-portal",...e})}function VM({...e}){return a(radixUi.Menubar.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function jM({className:e,...t}){return a(radixUi.Menubar.Trigger,{"data-slot":"menubar-trigger",className:f("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",e),...t})}function UM({className:e,align:t="start",alignOffset:r=-4,sideOffset:o=8,...n}){return a(Uh,{children:a(radixUi.Menubar.Content,{"data-slot":"menubar-content",align:t,alignOffset:r,sideOffset:o,className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",e),...n})})}function WM({className:e,inset:t,variant:r="default",...o}){return a(radixUi.Menubar.Item,{"data-slot":"menubar-item","data-inset":t,"data-variant":r,className:f("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function GM({className:e,children:t,checked:r,...o}){return w(radixUi.Menubar.CheckboxItem,{"data-slot":"menubar-checkbox-item",className:f("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...o,children:[a("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a(radixUi.Menubar.ItemIndicator,{children:a(lucideReact.CheckIcon,{className:"size-4"})})}),t]})}function $M({className:e,children:t,...r}){return w(radixUi.Menubar.RadioItem,{"data-slot":"menubar-radio-item",className:f("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[a("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a(radixUi.Menubar.ItemIndicator,{children:a(lucideReact.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function qM({className:e,inset:t,...r}){return a(radixUi.Menubar.Label,{"data-slot":"menubar-label","data-inset":t,className:f("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function KM({className:e,...t}){return a(radixUi.Menubar.Separator,{"data-slot":"menubar-separator",className:f("bg-border -mx-1 my-1 h-px",e),...t})}function YM({className:e,...t}){return a("span",{"data-slot":"menubar-shortcut",className:f("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function XM({...e}){return a(radixUi.Menubar.Sub,{"data-slot":"menubar-sub",...e})}function JM({className:e,inset:t,children:r,...o}){return w(radixUi.Menubar.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":t,className:f("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",e),...o,children:[r,a(lucideReact.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function ZM({className:e,...t}){return a(radixUi.Menubar.SubContent,{"data-slot":"menubar-sub-content",className:f("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var Wh="relative isolate overflow-hidden rounded-md bg-muted text-transparent",Gh="after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_1.6s_linear_infinite] after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent after:content-['']",Va=X__namespace.forwardRef(({className:e,...t},r)=>a("div",{ref:r,"data-slot":"skeleton",className:f(Wh,Gh,e),...t}));Va.displayName="Skeleton";var Uc=X__namespace.forwardRef(({className:e,...t},r)=>a(Va,{ref:r,className:f("h-9 w-32 rounded-md",e),...t}));Uc.displayName="Skeleton.Button";var Wc=X__namespace.forwardRef(({className:e,...t},r)=>a(Va,{ref:r,className:f("h-9 w-full rounded-md",e),...t}));Wc.displayName="Skeleton.Input";var nr=Object.assign(Va,{Button:Uc,Input:Wc});var qh={sm:"sm:max-w-sm",md:"sm:max-w-lg",lg:"sm:max-w-2xl",xl:"sm:max-w-3xl"},Kh=w("div",{className:"space-y-3","aria-hidden":true,children:[a(nr,{className:"h-4 w-2/3"}),a(nr,{className:"h-4 w-full"}),a(nr,{className:"h-4 w-5/6"}),a(nr,{className:"h-4 w-3/4"})]}),Yh=e=>{switch(e){case "destructive":return "destructive";case "default":return "outline";case "primary":default:return "default"}},Xh=({title:e,description:t,closable:r=true,className:o,classNames:n,loading:i=false,maskClosable:s=false,style:l,footer:c,onOk:u,onCancel:d,children:m,onOpenChange:v,size:g="md",...h})=>{var N,D,P,T,O,A,V;let p={show:(N=c==null?void 0:c.show)!=null?N:true,render:c==null?void 0:c.render,onOk:c==null?void 0:c.onOk,onCancel:c==null?void 0:c.onCancel,showOk:(D=c==null?void 0:c.showOk)!=null?D:true,showCancel:(P=c==null?void 0:c.showCancel)!=null?P:true,okText:(T=c==null?void 0:c.okText)!=null?T:"Save changes",cancelText:(O=c==null?void 0:c.cancelText)!=null?O:"Cancel",okLoading:c==null?void 0:c.okLoading,cancelLoading:c==null?void 0:c.cancelLoading,okDisabled:c==null?void 0:c.okDisabled,cancelDisabled:(A=c==null?void 0:c.cancelDisabled)!=null?A:c==null?void 0:c.cancelDisable,okType:c==null?void 0:c.okType,okButtonProps:c==null?void 0:c.okButtonProps,cancelButtonProps:c==null?void 0:c.cancelButtonProps,size:(V=c==null?void 0:c.size)!=null?V:"default"},b=X__namespace.useCallback(()=>{var L;(L=p.onCancel)==null||L.call(p),d==null||d();},[p.onCancel,d]),x=X__namespace.useCallback(()=>{var L;(L=p.onOk)==null||L.call(p),u==null||u();},[p.onOk,u]),y=X__namespace.useCallback(L=>{L||b(),v==null||v(L);},[b,v]),C=X__namespace.useCallback(L=>{s||L.preventDefault();},[s]),R=X__namespace.useCallback(L=>{r||L.preventDefault();},[r]),S=f(qh[g],o,n==null?void 0:n.content),k=a(framerMotion.AnimatePresence,{mode:"wait",children:i?a(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18,ease:"easeInOut"},className:f("space-y-4",n==null?void 0:n.body),children:Kh},"modal-loading"):a(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18,ease:"easeInOut"},className:f("space-y-3 text-sm text-muted-foreground",n==null?void 0:n.body),"aria-busy":i,children:m},"modal-content")}),M=()=>{var ee,ae,he,ve,K,ce,fe,we,ke,ie;if(!p.show)return null;if(p.render)return a("div",{className:f("mt-2",n==null?void 0:n.footer),children:p.render});if(!p.showOk&&!p.showCancel)return null;let{onClick:L,variant:_,size:z,loading:E,disabled:I,...H}=(ee=p.okButtonProps)!=null?ee:{},{onClick:j,variant:U,size:W,loading:G,disabled:B,...Z}=(ae=p.cancelButtonProps)!=null?ae:{},q=ne=>{L==null||L(ne),!ne.defaultPrevented&&x();},le=ne=>{j==null||j(ne),!ne.defaultPrevented&&b();};return a("div",{className:f("mt-4",n==null?void 0:n.footer),children:w("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[p.showCancel?a(te,{variant:U!=null?U:"outline",size:W!=null?W:p.size,loading:(ve=(he=p.cancelLoading)!=null?he:G)!=null?ve:false,disabled:(ce=(K=p.cancelDisabled)!=null?K:B)!=null?ce:false,...Z,onClick:le,children:p.cancelText}):null,p.showOk?a(te,{variant:_!=null?_:Yh(p.okType),size:z!=null?z:p.size,loading:(we=(fe=p.okLoading)!=null?fe:E)!=null?we:false,disabled:(ie=(ke=p.okDisabled)!=null?ke:I)!=null?ie:false,...H,onClick:q,children:p.okText}):null]})})};return a(ga,{...h,onOpenChange:y,children:a(va,{showCloseButton:r,className:S,style:l,onInteractOutside:C,onEscapeKeyDown:R,children:w(framerMotion.motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.2,ease:"easeOut"},className:"flex flex-col gap-4",children:[(e||t)&&w(ha,{className:n==null?void 0:n.header,children:[e?a(ba,{className:n==null?void 0:n.title,children:e}):null,t?a(wa,{className:n==null?void 0:n.description,children:t}):null]}),k,M()]})})})};Xh.displayName="Modal";function kr({open:e,onOpenChange:t,title:r,children:o,footer:n,footerClassName:i,contentClassName:s,disableContentWrapper:l=false,options:c,selectedValues:u,onSelect:d,isMulti:m=false}){let v=b=>{d==null||d(b),m||t(false);},g=b=>m&&Array.isArray(u)?u.includes(b):u===b,h=()=>c?a("div",{className:"max-h-[75vh] overflow-y-auto",children:c.map(b=>w("button",{className:f("w-full flex items-center justify-between px-4 py-4 text-left transition-colors","min-h-[50px] h-auto",b.disabled?"opacity-50 cursor-not-allowed":"hover:bg-accent active:bg-accent/80",g(b.value)&&"bg-accent"),onClick:()=>!b.disabled&&v(b.value),disabled:b.disabled,children:[a("span",{className:"flex-1",children:b.label}),g(b.value)&&a(lucideReact.CheckIcon,{className:"h-4 w-4 text-primary flex-shrink-0 ml-2"})]},b.value))}):null,p=l?o:a("div",{className:f(s),children:o});return a(Qr,{open:e,onOpenChange:t,direction:"bottom",children:w(eo,{className:"p-0 pb-4 rounded-t-2xl border-t bg-background",children:[r?a(to,{className:"px-4 pb-2 pt-4 text-left border-b",children:typeof r=="string"||typeof r=="number"?a(ro,{children:r}):r}):null,c?h():p,n?a(Dc,{className:f("border-border/60 border-t px-4 pt-3",i),children:n}):null]})})}var Zh={floating:{label:"Floating Glow",description:"Glassmorphism-inspired bar with a floating circular highlight around the active tab."},pill:{label:"Soft Pill",description:"Rounded pill navigation with a smooth capsule indicator that slides beneath the active item."},minimal:{label:"Minimal Line",description:"Lightweight footer that focuses on iconography with a subtle underline transition."},curved:{label:"Curved Wave",description:"Playful curved dock that mimics native device docks with a spotlighted active state."}},hN=Object.keys(Zh),Qh=()=>{},yi=X__namespace.forwardRef(({items:e,value:t,defaultValue:r,onChange:o=Qh,className:n,variant:i="floating",forceLabels:s=false,...l},c)=>{let[u,d]=X__namespace.useState(()=>{var P,T;return t!==void 0?t:r||((T=(P=e[0])==null?void 0:P.value)!=null?T:"")}),m=t!==void 0,v=m?t:u;X__namespace.useEffect(()=>{var T;if(!e.length)return;if(!e.some(O=>O.value===v)){let O=(T=e[0])==null?void 0:T.value;if(!O)return;m||d(O),o(O);}},[e,v,m,o]);let g=X__namespace.useCallback(P=>{P!==v&&(m||d(P),o(P));},[m,o,v]);if(!e.length)return null;let h=Math.max(e.findIndex(P=>P.value===v),0),p=100/e.length,b=X__namespace.useMemo(()=>{let T=p/2;return {width:72,height:72,left:`calc(${p}% * ${h} + ${T}% - ${72/2}px)`}},[h,p]),x=X__namespace.useMemo(()=>({width:`calc((100% / ${e.length}) - 0.75rem)`,left:`calc((100% / ${e.length}) * ${h} + 0.375rem)`}),[h,e.length]),y=X__namespace.useMemo(()=>({width:`calc((100% / ${e.length}) * 0.6)`,left:`calc((100% / ${e.length}) * ${h} + (100% / ${e.length}) * 0.2)`}),[h,e.length]),C=X__namespace.useMemo(()=>{let T=p/2;return {width:64,height:64,left:`calc(${p}% * ${h} + ${T}%)`}},[h,p]),R=()=>{switch(i){case "floating":return a("span",{"aria-hidden":true,style:b,className:"pointer-events-none absolute -top-7 z-0 rounded-full bg-primary/25 blur-2xl transition-[left] duration-500 ease-out"});case "pill":return a("span",{"aria-hidden":true,style:x,className:"pointer-events-none absolute inset-y-2 z-0 rounded-full border border-primary/20 bg-primary/10 shadow-inner transition-[left] duration-500 ease-out"});case "minimal":return a("span",{"aria-hidden":true,style:y,className:"pointer-events-none absolute bottom-1 left-0 h-1 rounded-full bg-primary transition-[left] duration-500 ease-out"});case "curved":return a("span",{"aria-hidden":true,style:C,className:"pointer-events-none absolute -top-6 z-0 -translate-x-1/2 rounded-full border border-primary/20 bg-primary/20 shadow-[0_12px_30px_-15px_rgba(59,130,246,0.65)] transition-[left] duration-500 ease-out"});default:return null}},S=P=>{switch(i){case "floating":return f("group relative z-10 flex flex-1 flex-col items-center gap-1 rounded-2xl px-2 pb-1 pt-3 text-[0.7rem] font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground");case "pill":return f("group relative z-10 flex flex-1 items-center justify-center gap-2 rounded-full px-3 text-sm font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground");case "minimal":return f("group relative flex flex-1 flex-col items-center gap-1 rounded-2xl px-2 py-2 text-[0.7rem] font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground/80");case "curved":return f("group relative z-10 flex flex-1 flex-col items-center gap-1 rounded-2xl px-3 pb-2 pt-5 text-[0.7rem] font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground/90");default:return ""}},k=P=>{switch(i){case "floating":return f("flex size-12 items-center justify-center rounded-full border border-border/50 bg-muted/60 text-base transition-all duration-300 ease-out",P?"scale-100 border-primary/40 bg-primary text-primary-foreground shadow-lg shadow-primary/30":"scale-95 text-muted-foreground");case "pill":return f("flex size-9 items-center justify-center rounded-full text-base transition-all duration-300 ease-out",P?"bg-primary text-primary-foreground shadow-lg shadow-primary/30":"bg-transparent text-muted-foreground");case "minimal":return f("flex size-10 items-center justify-center rounded-full text-base transition-all duration-300 ease-out",P?"scale-105 bg-primary/10 text-primary":"scale-95 text-muted-foreground/80");case "curved":return f("flex size-12 items-center justify-center rounded-full border border-border/60 bg-muted/70 text-base transition-all duration-300 ease-out",P?"-translate-y-3 border-primary/40 bg-primary text-primary-foreground shadow-xl shadow-primary/40":"translate-y-0 text-muted-foreground");default:return ""}},M=P=>{let T="transition-all duration-300 ease-out";switch(i){case "floating":return f(T,P?"translate-y-0 opacity-100":"translate-y-[2px] opacity-90",s?"block":"");case "pill":return f(T,"text-xs",P?"opacity-100":"opacity-90");case "minimal":return f(T,"text-xs",P||s?"opacity-100":"opacity-0");case "curved":return f(T,"text-xs",P||s?"opacity-100":"opacity-0 group-hover:opacity-80");default:return T}},N=(P,T)=>P?a("span",{className:f("pointer-events-none absolute -right-0.5 -top-0.5 min-w-4 rounded-full bg-destructive px-1.5 text-[10px] font-semibold leading-none text-destructive-foreground shadow-sm",T?"scale-105":"scale-100 opacity-95"),children:P}):null,D=()=>{switch(i){case "floating":return w("div",{className:"relative isolate flex h-24 w-full items-end rounded-[26px] border border-border/40 bg-card/90 px-4 pb-3 pt-5 shadow-[0_20px_40px_-24px_rgba(15,23,42,0.35)] backdrop-blur-xl",children:[R(),e.map(P=>{let T=P.value===v;return w("button",{type:"button",className:S(T),onClick:()=>g(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[w("span",{className:"relative",children:[a("span",{className:k(T),children:P.icon}),N(P.badge,T)]}),(T||s)&&P.label?a("span",{className:M(T),children:P.label}):P.label&&!s?a("span",{className:f(M(T),"sr-only"),children:P.label}):null]},P.value)})]});case "pill":return w("div",{className:"relative isolate flex h-20 w-full items-center rounded-full border border-border/40 bg-card/95 px-2 shadow-[0_24px_50px_-24px_rgba(15,23,42,0.45)] backdrop-blur",children:[R(),e.map(P=>{let T=P.value===v;return w("button",{type:"button",className:S(T),onClick:()=>g(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[w("span",{className:"relative flex items-center gap-2",children:[a("span",{className:k(T),children:P.icon}),(T||s)&&P.label?a("span",{className:M(T),children:P.label}):null]}),N(P.badge,T)]},P.value)})]});case "minimal":return w("div",{className:"relative isolate flex h-[4.5rem] w-full items-center justify-between rounded-3xl border border-border/30 bg-background/60 px-4 py-3 shadow-[0_18px_35px_-24px_rgba(15,23,42,0.35)]",children:[R(),e.map(P=>{let T=P.value===v;return w("button",{type:"button",className:S(T),onClick:()=>g(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[w("span",{className:"relative",children:[a("span",{className:k(T),children:P.icon}),N(P.badge,T)]}),(T||s)&&P.label?a("span",{className:M(T),children:P.label}):null]},P.value)})]});case "curved":return w("div",{className:"relative isolate flex h-28 w-full items-end justify-center",children:[a("div",{className:"absolute inset-x-3 bottom-0 h-20 rounded-t-[36px] border border-border/35 bg-card/95 shadow-[0_-30px_45px_-28px_rgba(15,23,42,0.55)]"}),w("div",{className:"relative z-10 flex h-24 w-[92%] items-end justify-between px-5 pb-4 pt-6",children:[R(),e.map(P=>{let T=P.value===v;return w("button",{type:"button",className:S(T),onClick:()=>g(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[w("span",{className:"relative",children:[a("span",{className:k(T),children:P.icon}),N(P.badge,T)]}),(T||s)&&P.label?a("span",{className:M(T),children:P.label}):null]},P.value)})]})]});default:return null}};return a("nav",{ref:c,className:f("relative flex w-full justify-center",n),...l,children:D()})});yi.displayName="MobileFooter";var eb={hero:{label:"Hero Spotlight",description:"Immersive header with a leading action row, large title block, and optional hero media thumbnail."},stories:{label:"Stories Carousel",description:"Horizontal story rail with rounded action chips that mimic social media story pickers."},minimal:{label:"Minimal Bar",description:"Compact navigation bar with centered title and contextual leading/trailing actions."},search:{label:"Search Hub",description:"Two-line header with quick actions and an inline search field anchored by an avatar trigger."}},yN=Object.keys(eb),tb=()=>{},rb=()=>w("svg",{"aria-hidden":true,viewBox:"0 0 24 24",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[a("circle",{cx:11,cy:11,r:7}),a("path",{d:"m20 20-3-3"})]}),zo=(e,t=false)=>e?a("span",{className:f("pointer-events-none absolute -right-0.5 -top-0.5 min-w-4 rounded-full bg-destructive px-1.5 text-[10px] font-semibold leading-none text-destructive-foreground shadow-sm",t?"scale-105":"scale-100"),children:e}):null,Ri=X__namespace.forwardRef(({title:e,subtitle:t,supportingText:r,heroBadge:o,heroMedia:n,heroImage:i,heroAlt:s,leadingAction:l,trailingActions:c,trailingContent:u,stories:d,searchPlaceholder:m,searchValue:v,defaultSearchValue:g,onSearchChange:h=tb,searchIcon:p,variant:b="hero",className:x,children:y,...C},R)=>{let[S,k]=X__namespace.useState(()=>g!=null?g:""),M=v!==void 0,N=M?v:S,D=X__namespace.useCallback(E=>{let I=E.target.value;M||k(I),h(I);},[M,h]),P=(E,I)=>{var H,j,U;return E?w("button",{type:"button",onClick:E.onClick,"aria-label":(j=(H=E.ariaLabel)!=null?H:E.label)!=null?j:E.value,className:"relative inline-flex size-10 items-center justify-center rounded-full border border-border/50 bg-background/80 text-base font-medium text-foreground shadow-[0_8px_24px_-18px_rgba(59,130,246,0.8)] transition-transform duration-200 ease-out hover:-translate-y-0.5",children:[a("span",{className:"pointer-events-none text-lg",children:(U=E.icon)!=null?U:E.label}),zo(E.badge)]},E.value):I?a("span",{className:"size-10","aria-hidden":true},I):null},T=E=>{var I,H,j;return E?w("button",{type:"button",onClick:E.onClick,"aria-label":(H=(I=E.ariaLabel)!=null?I:E.label)!=null?H:E.value,className:"relative inline-flex size-10 items-center justify-center rounded-full border border-border/40 bg-card/80 text-base text-foreground shadow-sm transition-colors duration-200 ease-out hover:bg-card",children:[a("span",{className:"pointer-events-none text-lg",children:(j=E.icon)!=null?j:E.label}),zo(E.badge)]},E.value):null},O=E=>{var I,H,j;return E?w("button",{type:"button",onClick:E.onClick,"aria-label":(H=(I=E.ariaLabel)!=null?I:E.label)!=null?H:E.value,className:"relative inline-flex size-10 items-center justify-center rounded-full text-base text-muted-foreground transition-colors duration-200 ease-out hover:text-foreground",children:[a("span",{className:"pointer-events-none text-lg",children:(j=E.icon)!=null?j:E.label}),zo(E.badge)]},E.value):null},A=E=>{var I,H,j;return w("button",{type:"button",onClick:E.onClick,"aria-label":(H=(I=E.ariaLabel)!=null?I:E.label)!=null?H:E.value,className:"group relative flex w-24 shrink-0 flex-col items-center gap-2 rounded-2xl border border-border/40 bg-card/60 px-3 py-3 text-center shadow-[0_12px_30px_-22px_rgba(59,130,246,0.45)] transition-all duration-300 ease-out hover:-translate-y-1 hover:border-primary/40",children:[w("span",{className:"relative inline-flex size-14 items-center justify-center overflow-hidden rounded-full border border-border/40 bg-background/80 text-lg text-foreground shadow-sm",children:[(j=E.icon)!=null?j:E.label,zo(E.badge,true)]}),E.label?a("span",{className:"text-xs font-medium text-foreground transition-colors group-hover:text-primary",children:E.label}):null,E.description?a("span",{className:"text-[11px] text-muted-foreground transition-opacity group-hover:opacity-90",children:E.description}):null]},E.value)},V=()=>w("div",{className:"relative isolate w-full overflow-hidden rounded-[28px] border border-border/30 bg-gradient-to-br from-background/95 via-background/90 to-background/70 px-5 pb-6 pt-5 shadow-[0_28px_60px_-35px_rgba(15,23,42,0.55)] backdrop-blur",children:[a("div",{className:"pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(circle_at_top,_rgba(59,130,246,0.18),_transparent_55%)]"}),w("div",{className:"flex items-center justify-between",children:[P(l!=null?l:null,"hero-leading-placeholder"),a("div",{className:"flex items-center gap-2",children:c==null?void 0:c.map(E=>P(E))})]}),w("div",{className:"mt-7 flex items-end justify-between gap-6",children:[w("div",{className:"space-y-3",children:[o?a("span",{className:"inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-xs font-medium text-primary",children:o}):null,e?a("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:e}):null,t?a("p",{className:"text-sm text-muted-foreground",children:t}):null,r?a("p",{className:"text-xs text-muted-foreground/90",children:r}):null]}),a("div",{className:"shrink-0",children:n?a("div",{className:"relative h-24 w-24 overflow-hidden rounded-2xl border border-border/40 shadow-[0_24px_40px_-28px_rgba(59,130,246,0.75)]",children:n}):i?a("div",{className:"relative h-24 w-24 overflow-hidden rounded-2xl border border-border/40 shadow-[0_24px_40px_-28px_rgba(59,130,246,0.75)]",children:a("img",{src:i,alt:s!=null?s:"",className:"size-full object-cover"})}):null})]}),y?a("div",{className:"mt-6",children:y}):null]}),L=()=>{var E;return w("div",{className:"relative isolate w-full overflow-hidden rounded-[26px] border border-border/35 bg-background/90 px-4 pb-5 pt-4 shadow-[0_24px_50px_-35px_rgba(15,23,42,0.55)]",children:[w("div",{className:"flex items-center justify-between gap-3",children:[w("div",{className:"flex items-center gap-3",children:[l?w("div",{className:"flex items-center gap-2 rounded-full border border-border/40 bg-card/80 px-3 py-1.5 text-sm font-medium text-foreground shadow-sm",children:[a("span",{className:"text-base",children:(E=l.icon)!=null?E:l.label}),l.label?a("span",{children:l.label}):null]}):null,e?a("h2",{className:"text-lg font-semibold text-foreground",children:e}):null]}),a("div",{className:"flex items-center gap-2",children:c==null?void 0:c.map(I=>O(I))})]}),t?a("p",{className:"mt-2 text-sm text-muted-foreground",children:t}):null,a("div",{className:"mt-4 flex gap-3 overflow-x-auto pb-1",children:d==null?void 0:d.map(I=>A(I))}),y?a("div",{className:"mt-4",children:y}):null]})},_=()=>w("div",{className:"relative isolate flex h-16 w-full items-center gap-3 rounded-[22px] border border-border/40 bg-background/95 px-2 shadow-[0_18px_35px_-28px_rgba(15,23,42,0.45)]",children:[a("div",{className:"flex items-center",children:l?T(l):a("span",{className:"size-10","aria-hidden":true})}),w("div",{className:"flex flex-1 flex-col items-center justify-center text-center",children:[t?a("span",{className:"text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:t}):null,e?a("span",{className:"text-base font-semibold text-foreground",children:e}):null]}),a("div",{className:"flex items-center gap-2",children:u!=null?u:c==null?void 0:c.map(E=>T(E))})]}),z=()=>{var E,I,H;return w("div",{className:"relative isolate w-full overflow-hidden rounded-[26px] border border-border/35 bg-background/95 px-4 pb-5 pt-4 shadow-[0_26px_54px_-34px_rgba(15,23,42,0.55)]",children:[w("div",{className:"flex items-start justify-between gap-4",children:[w("div",{className:"space-y-1",children:[t?a("span",{className:"text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:t}):null,e?a("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,r?a("p",{className:"text-xs text-muted-foreground/90",children:r}):null]}),a("div",{className:"flex items-center gap-2",children:c==null?void 0:c.map(j=>O(j))})]}),w("div",{className:"mt-4 flex items-center gap-3",children:[l?w("button",{type:"button",onClick:l.onClick,"aria-label":(I=(E=l.ariaLabel)!=null?E:l.label)!=null?I:l.value,className:"relative inline-flex size-12 items-center justify-center rounded-full border border-border/40 bg-card/80 text-base text-foreground shadow-sm",children:[a("span",{className:"pointer-events-none text-lg",children:(H=l.icon)!=null?H:l.label}),zo(l.badge)]}):null,w("div",{className:"relative flex-1",children:[a("span",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center",children:p!=null?p:a(rb,{})}),a("input",{type:"search",value:N,onChange:D,placeholder:m,className:"h-12 w-full rounded-full border border-border/40 bg-card/70 pl-10 pr-4 text-sm text-foreground shadow-inner shadow-primary/5 outline-none transition focus:border-primary/40 focus:bg-card"})]})]}),y?a("div",{className:"mt-4",children:y}):null]})};return a("header",{ref:R,className:f("relative flex w-full justify-center",x),...C,children:(()=>{switch(b){case "hero":return V();case "stories":return L();case "minimal":return _();case "search":return z();default:return null}})()})});Ri.displayName="MobileHeader";function Gc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t);}function Cr(...e){return t=>{let r=false,o=e.map(n=>{let i=Gc(n,t);return !r&&typeof i=="function"&&(r=true),i});if(r)return ()=>{for(let n=0;n<o.length;n++){let i=o[n];typeof i=="function"?i():Gc(e[n],null);}}}}function Oe(...e){return X__namespace.useCallback(Cr(...e),e)}function ir(e){let t=ob(e),r=X__namespace.forwardRef((o,n)=>{let{children:i,...s}=o,l=X__namespace.Children.toArray(i),c=l.find(nb);if(c){let u=c.props.children,d=l.map(m=>m===c?X__namespace.Children.count(u)>1?X__namespace.Children.only(null):X__namespace.isValidElement(u)?u.props.children:null:m);return jsxRuntime.jsx(t,{...s,ref:n,children:X__namespace.isValidElement(u)?X__namespace.cloneElement(u,void 0,d):null})}return jsxRuntime.jsx(t,{...s,ref:n,children:i})});return r.displayName=`${e}.Slot`,r}var Kc=ir("Slot");function ob(e){let t=X__namespace.forwardRef((r,o)=>{let{children:n,...i}=r;if(X__namespace.isValidElement(n)){let s=sb(n),l=ib(i,n.props);return n.type!==X__namespace.Fragment&&(l.ref=o?Cr(o,s):s),X__namespace.cloneElement(n,l)}return X__namespace.Children.count(n)>1?X__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ab=Symbol("radix.slottable");function nb(e){return X__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ab}function ib(e,t){let r={...t};for(let o in t){let n=e[o],i=t[o];/^on[A-Z]/.test(o)?n&&i?r[o]=(...l)=>{let c=i(...l);return n(...l),c}:n&&(r[o]=n):o==="style"?r[o]={...n,...i}:o==="className"&&(r[o]=[n,i].filter(Boolean).join(" "));}return {...e,...r}}function sb(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lb=["top","right","bottom","left"],ja=(e,t)=>e.includes(t)?`env(safe-area-inset-${t})`:void 0,Ua=X__namespace.forwardRef(({edges:e=lb,asChild:t,className:r,style:o,...n},i)=>{var l,c,u,d;return a(t?Kc:"div",{ref:i,className:f("relative",r),style:{paddingTop:(l=o==null?void 0:o.paddingTop)!=null?l:ja(e,"top"),paddingRight:(c=o==null?void 0:o.paddingRight)!=null?c:ja(e,"right"),paddingBottom:(u=o==null?void 0:o.paddingBottom)!=null?u:ja(e,"bottom"),paddingLeft:(d=o==null?void 0:o.paddingLeft)!=null?d:ja(e,"left"),...o},...n})});Ua.displayName="SafeArea";var db=({header:e,footer:t,children:r,className:o,safeArea:n})=>{var N,D,P,T,O;let{header:i,navigateBack:s,canGoBack:l}=ec(),c=X__namespace.useMemo(()=>{let A=[];return n.top&&A.push("top"),n.left&&A.push("left"),n.right&&A.push("right"),A},[n.top,n.left,n.right]),u=X__namespace.useMemo(()=>{let A=[];return n.bottom&&A.push("bottom"),n.left&&A.push("left"),n.right&&A.push("right"),A},[n.bottom,n.left,n.right]),d=X__namespace.useCallback(()=>{if(l){s();return}typeof window!="undefined"&&window.history.back();},[l,s]),m=(N=i.back)!=null?N:l,v=X__namespace.useMemo(()=>{if(m)return {value:"mobile-header-back",icon:a(lucideReact.ArrowLeft,{className:"size-5","aria-hidden":true}),ariaLabel:"Go back",onClick:d};if(i.icon)return {value:"mobile-header-icon",icon:i.icon}},[m,i.icon,d]),{show:g=true,className:h,variant:p,type:b}=e,x=(T=(P=(D=i.variant)!=null?D:p)!=null?P:b)!=null?T:"hero",{show:y=true,activeKey:C,onChange:R,...S}=t,k=(O=S.value)!=null?O:C,M=X__namespace.useCallback(A=>{R==null||R(A);},[R]);return w("div",{className:f("flex min-h-svh w-full flex-col bg-background",o),children:[g&&a("div",{className:"sticky top-0 z-20 bg-background",children:a(Ua,{edges:c,className:"bg-background",children:a(Ri,{variant:x,className:h,title:i.title,subtitle:i.subtitle,supportingText:i.supportingText,heroBadge:i.heroBadge,leadingAction:v,trailingContent:i.actions})})}),a("div",{className:"flex-1 overflow-y-auto bg-muted/10",children:r}),y&&a("div",{className:"sticky bottom-0 z-20 bg-background",children:a(Ua,{edges:u,className:"bg-background px-4 pb-4 pt-2",children:a(yi,{...S,value:k,onChange:M})})})]})},ub=({header:e={show:true},footer:t={show:true,items:[]},children:r,className:o,safeArea:n={top:true,bottom:true,left:true,right:true}})=>a(Ql,{children:a(db,{header:e,footer:t,className:o,safeArea:n,children:r})});function qN({className:e,children:t,viewport:r=true,...o}){return w(radixUi.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":r,className:f("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...o,children:[t,r&&a(gb,{})]})}function KN({className:e,...t}){return a(radixUi.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:f("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function YN({className:e,...t}){return a(radixUi.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:f("relative",e),...t})}var mb=classVarianceAuthority.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-primary/40 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function XN({className:e,children:t,...r}){return w(radixUi.NavigationMenu.Trigger,{"data-slot":"navigation-menu-trigger",className:f(mb(),"group",e),...r,children:[t," ",a(lucideReact.ChevronDownIcon,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function JN({className:e,...t}){return a(radixUi.NavigationMenu.Content,{"data-slot":"navigation-menu-content",className:f("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",e),...t})}function gb({className:e,...t}){return a("div",{className:f("absolute top-full left-0 isolate z-50 flex justify-center"),children:a(radixUi.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:f("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function ZN({className:e,...t}){return a(radixUi.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:f("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-primary/40 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}function QN({className:e,...t}){return a(radixUi.NavigationMenu.Indicator,{"data-slot":"navigation-menu-indicator",className:f("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:a("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}function iE({className:e,...t}){return a("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:f("mx-auto flex w-full justify-center",e),...t})}function sE({className:e,...t}){return a("ul",{"data-slot":"pagination-content",className:f("flex flex-row items-center gap-1",e),...t})}function lE({...e}){return a("li",{"data-slot":"pagination-item",...e})}function Xc({className:e,isActive:t,size:r="icon",...o}){return a("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:f($t({variant:t?"outline":"ghost",size:r}),e),...o})}function cE({className:e,...t}){return w(Xc,{"aria-label":"Go to previous page",size:"default",className:f("gap-1 px-2.5 sm:pl-2.5",e),...t,children:[a(lucideReact.ChevronLeftIcon,{}),a("span",{className:"hidden sm:block",children:"Previous"})]})}function dE({className:e,...t}){return w(Xc,{"aria-label":"Go to next page",size:"default",className:f("gap-1 px-2.5 sm:pr-2.5",e),...t,children:[a("span",{className:"hidden sm:block",children:"Next"}),a(lucideReact.ChevronRightIcon,{})]})}function uE({className:e,...t}){return w("span",{"aria-hidden":true,"data-slot":"pagination-ellipsis",className:f("flex size-9 items-center justify-center",e),...t,children:[a(lucideReact.MoreHorizontalIcon,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}function vE({className:e,value:t,...r}){return a(radixUi.Progress.Root,{"data-slot":"progress",className:f("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...r,children:a(radixUi.Progress.Indicator,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Zc({className:e,...t}){return a(radixUi.RadioGroup.Root,{"data-slot":"radio-group",className:f("grid gap-3",e),...t})}function Qc({className:e,...t}){return a(radixUi.RadioGroup.Item,{"data-slot":"radio-group-item",className:f("border-input text-primary focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a(radixUi.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:a(lucideReact.CircleIcon,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function SE({className:e,...t}){return a(no__namespace.PanelGroup,{"data-slot":"resizable-panel-group",className:f("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function TE({...e}){return a(no__namespace.Panel,{"data-slot":"resizable-panel",...e})}function ME({withHandle:e,className:t,...r}){return a(no__namespace.PanelResizeHandle,{"data-slot":"resizable-handle",className:f("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r,children:e&&a("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a(lucideReact.GripVerticalIcon,{className:"size-2.5"})})})}function IE({className:e,children:t,...r}){return w(radixUi.ScrollArea.Root,{"data-slot":"scroll-area",className:f("relative",e),...r,children:[a(radixUi.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-primary/40 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),a(yb,{}),a(radixUi.ScrollArea.Corner,{})]})}function yb({className:e,orientation:t="vertical",...r}){return a(radixUi.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:t,className:f("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:a(radixUi.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var td=X__namespace.createContext(void 0);function Ci(){let e=X__namespace.useContext(td);if(!e)throw new Error("useNativeSelectContext must be used within a Select component");return e}function Cb({open:e,defaultOpen:t,onOpenChange:r,children:o,...n}){let{isNative:i}=Xt(),s=ct(),l=i||s,[c,u]=X__namespace.useState(t!=null?t:false),d=e!=null?e:c,m=X__namespace.useCallback(g=>{e===void 0&&u(g),r==null||r(g);},[e,r]),v=X__namespace.useMemo(()=>({isNative:l,open:d,setOpen:m,closeOnSelect:true}),[l,d,m]);return a(td.Provider,{value:v,children:a(radixUi.Select.Root,{"data-slot":"select",open:d,onOpenChange:m,...n,children:o})})}function Pb({className:e,size:t="default",children:r,...o}){let{isNative:n,open:i,setOpen:s}=Ci();return w(radixUi.Select.Trigger,{"data-slot":"select-trigger","data-size":t,onClick:l=>{n&&(l.preventDefault(),l.stopPropagation(),s(!i));},className:f(It,"border-input flex w-full items-center gap-2 rounded-md border bg-transparent px-3 py-2 text-sm transition-colors cursor-pointer","data-[state=open]:border-primary focus-visible:ring-0 data-[state=open]:ring-0",e),...o,children:[a("span",{className:"flex-1 min-w-0 text-left [&_[data-slot=select-value]]:min-w-0 [&_[data-slot=select-value]]:flex [&_[data-slot=select-value]]:flex-1 [&_[data-slot=select-value]]:truncate",children:r}),a(radixUi.Select.Icon,{className:"pointer-events-none shrink-0 text-muted-foreground",children:a(lucideReact.ChevronDownIcon,{className:"size-4"})})]})}function Sb({className:e,children:t,position:r="popper",title:o,...n}){let i=Ci();return a(radixUi.Select.Portal,{children:a(radixUi.Select.Content,{"data-slot":"select-content",className:f(i.isNative?"fixed inset-x-0 bottom-0 z-[9999] rounded-t-2xl border-t bg-background":"bg-popover text-popover-foreground relative z-50 rounded-md border",e),position:r,...n,children:i.isNative?a(kr,{open:i.open,onOpenChange:i.setOpen,title:o,disableContentWrapper:true,children:a(radixUi.Select.Viewport,{className:"max-h-[75vh] overflow-y-auto",children:t})}):w(jsxRuntime.Fragment,{children:[a(Mb,{}),a(radixUi.Select.Viewport,{className:"p-1",children:t}),a(Nb,{})]})})})}function Tb({className:e,children:t,onSelect:r,...o}){let n=Ci(),i=X__namespace.useCallback(s=>{r==null||r(s),n.isNative&&n.closeOnSelect&&!s.defaultPrevented&&setTimeout(()=>{n.setOpen(false);});},[n,r]);return w(radixUi.Select.Item,{"data-slot":"select-item",onSelect:i,className:f("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm select-none",e),...o,children:[a("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:a(radixUi.Select.ItemIndicator,{children:a(lucideReact.CheckIcon,{className:"size-4"})})}),a(radixUi.Select.ItemText,{children:t})]})}function Mb({className:e,...t}){return a(radixUi.Select.ScrollUpButton,{className:f("flex items-center justify-center py-1",e),...t,children:a(lucideReact.ChevronUpIcon,{className:"size-4"})})}function Nb({className:e,...t}){return a(radixUi.Select.ScrollDownButton,{className:f("flex items-center justify-center py-1",e),...t,children:a(lucideReact.ChevronDownIcon,{className:"size-4"})})}function Eb({className:e,...t}){return a(radixUi.Select.Value,{"data-slot":"select-value",className:f("flex-1 min-w-0 truncate text-left data-[placeholder]:text-muted-foreground",e),...t})}function Wa({options:e,placeholder:t="Select an option",triggerProps:r,contentProps:o,...n}){let i=r!=null?r:{},s=o!=null?o:{};return w(Cb,{...n,children:[a(Pb,{...i,children:a(Eb,{placeholder:t})}),a(Sb,{...s,children:e.map(l=>{var c,u;return a(Tb,{value:l.value,disabled:l.disabled,className:l.className,children:(u=l.label)!=null?u:l.value},(c=l.key)!=null?c:l.value)})})]})}var Pi=()=>{},rd=X__namespace.createContext({isNative:false,selectedValues:[],setSelectedValues:Pi,toggleValue:Pi,isSelected:()=>false,open:false,setOpen:Pi});function Ga(){return X__namespace.useContext(rd)}function od({value:e,defaultValue:t=[],onValueChange:r,open:o,defaultOpen:n,onOpenChange:i,children:s}){let{isNative:l}=Xt(),c=ct(),u=l||c,[d,m]=X__namespace.useState(t),[v,g]=X__namespace.useState(n!=null?n:false);X__namespace.useEffect(()=>{e!==void 0&&m(e);},[e]),X__namespace.useEffect(()=>{o!==void 0&&g(o);},[o]);let h=e!=null?e:d,p=o!=null?o:v,b=X__namespace.useCallback(k=>{let M=typeof k=="function"?k(h):k;e===void 0&&m(M),r==null||r(M);},[r,h,e]),x=X__namespace.useCallback(k=>{b(M=>M.includes(k)?M.filter(N=>N!==k):[...M,k]);},[b]),y=X__namespace.useCallback(k=>h.includes(k),[h]),C=X__namespace.useCallback(k=>{o===void 0&&g(k),i==null||i(k);},[i,o]),R=X__namespace.useMemo(()=>({isNative:u,selectedValues:h,setSelectedValues:b,toggleValue:x,isSelected:y,open:p,setOpen:C}),[u,p,C,h,b,x,y]),S=u?s:a(Jr,{open:p,onOpenChange:C,children:s});return a(rd.Provider,{value:R,children:S})}function ad({className:e,children:t,disabled:r,onClick:o,...n}){let i=Ga(),s=X__namespace.useCallback(c=>{o==null||o(c),i.isNative&&!r&&i.setOpen(!i.open);},[i,r,o]),l=w("button",{type:"button","data-slot":"multi-select-trigger","data-state":i.open?"open":"closed",className:f(It,"border-input focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 relative flex w-full min-w-0 items-center gap-2 rounded-md border bg-transparent py-2 pl-3 pr-9 text-sm transition-colors outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),"aria-haspopup":"listbox","aria-expanded":i.open,disabled:r,onClick:s,...n,children:[a("span",{className:"flex-1 min-w-0 text-left",children:t}),a(lucideReact.ChevronDownIcon,{className:"pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 opacity-50"})]});return i.isNative?l:a(Ec,{asChild:true,children:l})}function nd({placeholder:e="Select options",className:t,separator:r=", ",formatValue:o}){let{selectedValues:n,isNative:i}=Ga(),s=X__namespace.useMemo(()=>o?o(n):n.length===0?e:i?n.map(l=>a(cl,{variant:"secondary",children:l},l)):n.join(r),[o,i,e,n,r]);return a("span",{"data-slot":"multi-select-value",className:f("flex min-h-4 flex-wrap items-center gap-1 text-sm",n.length===0&&"text-muted-foreground",t),children:s})}function id({className:e,title:t,children:r,commandClassName:o,showSearch:n=false,searchPlaceholder:i="Search...",emptyMessage:s="No options found.",sideOffset:l=4,align:c="start",...u}){let d=Ga(),m=w(Jn,{className:f("w-full",o),children:[n?a(Bl,{placeholder:i}):null,w(Vl,{children:[s!==null?a(jl,{children:s}):null,r]})]});return d.isNative?a(kr,{open:d.open,onOpenChange:d.setOpen,title:t,contentClassName:f("px-2 pb-2",e),footer:a(te,{type:"button",variant:"outline",onClick:()=>d.setOpen(false),children:"Close"}),children:m}):a(Zr,{"data-slot":"multi-select-content",className:f("w-64 p-0",e),sideOffset:l,align:c,...u,children:m})}function sd({value:e,children:t,className:r,disabled:o,...n}){let i=Ga(),s=i.isSelected(e);return w(Ul,{...n,value:e,onSelect:()=>{o||i.toggleValue(e);},"data-slot":"multi-select-item",disabled:o,className:f("gap-2",r),children:[a("span",{className:"flex size-4 items-center justify-center",children:a(lucideReact.CheckIcon,{className:f("size-4",s?"opacity-100":"opacity-0")})}),a("span",{children:t})]})}function ld({className:e,orientation:t="horizontal",decorative:r=true,...o}){return a(radixUi.Separator.Root,{"data-slot":"separator",decorative:r,orientation:t,className:f("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function cd({...e}){return a(radixUi.Dialog.Root,{"data-slot":"sheet",...e})}function l2({...e}){return a(radixUi.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}function c2({...e}){return a(radixUi.Dialog.Close,{"data-slot":"sheet-close",...e})}function Ob({...e}){return a(radixUi.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function Ab({className:e,...t}){return a(radixUi.Dialog.Overlay,{"data-slot":"sheet-overlay",className:f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function dd({className:e,children:t,side:r="right",...o}){return w(Ob,{children:[a(Ab,{}),w(radixUi.Dialog.Content,{"data-slot":"sheet-content",className:f("bg-background fixed z-50 flex flex-col gap-4 shadow-lg outline-none transition-transform ease-in-out data-[state=open]:duration-300 data-[state=closed]:duration-200",r==="right"&&"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",r==="left"&&"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0",r==="top"&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0",r==="bottom"&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0",e),...o,children:[t,w(radixUi.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[a(lucideReact.XIcon,{className:"size-4"}),a("span",{className:"sr-only",children:"Close"})]})]})]})}function ud({className:e,...t}){return a("div",{"data-slot":"sheet-header",className:f("flex flex-col gap-1.5 p-4",e),...t})}function d2({className:e,...t}){return a("div",{"data-slot":"sheet-footer",className:f("mt-auto flex flex-col gap-2 p-4",e),...t})}function pd({className:e,...t}){return a(radixUi.Dialog.Title,{"data-slot":"sheet-title",className:f("text-foreground font-semibold",e),...t})}function fd({className:e,...t}){return a(radixUi.Dialog.Description,{"data-slot":"sheet-description",className:f("text-muted-foreground text-sm",e),...t})}function ni({delayDuration:e=0,...t}){return a(radixUi.Tooltip.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function md({...e}){return a(ni,{children:a(radixUi.Tooltip.Root,{"data-slot":"tooltip",...e})})}function gd({...e}){return a(radixUi.Tooltip.Trigger,{"data-slot":"tooltip-trigger",...e})}function vd({className:e,sideOffset:t=0,children:r,...o}){return a(radixUi.Tooltip.Portal,{children:w(radixUi.Tooltip.Content,{"data-slot":"tooltip-content",sideOffset:t,className:f("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[r,a(radixUi.Tooltip.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}var Hb="sidebar_state",Bb=3600*24*7,Vb="16rem",jb="18rem",Ub="3rem",Wb="b",hd=X__namespace.createContext(null);function Vo(){let e=X__namespace.useContext(hd);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function bc({defaultOpen:e=true,open:t,onOpenChange:r,className:o,style:n,children:i,...s}){let l=ct(),[c,u]=X__namespace.useState(false),[d,m]=X__namespace.useState(e),v=t!=null?t:d,g=X__namespace.useCallback(x=>{let y=typeof x=="function"?x(v):x;r?r(y):m(y),document.cookie=`${Hb}=${y}; path=/; max-age=${Bb}`;},[r,v]),h=X__namespace.useCallback(()=>l?u(x=>!x):g(x=>!x),[l,g,u]);X__namespace.useEffect(()=>{let x=y=>{y.key===Wb&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),h());};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[h]);let p=v?"expanded":"collapsed",b=X__namespace.useMemo(()=>({state:p,open:v,setOpen:g,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:h}),[p,v,g,l,c,u,h]);return a(hd.Provider,{value:b,children:a("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Vb,"--sidebar-width-icon":Ub,...n},className:f("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...s,children:i})})}function wc({side:e="left",variant:t="sidebar",collapsible:r="icon",className:o,children:n,...i}){let{isMobile:s,state:l,openMobile:c,setOpenMobile:u}=Vo();return r==="none"?a("div",{"data-slot":"sidebar",className:f("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...i,children:n}):s?a(cd,{open:c,onOpenChange:u,...i,children:w(dd,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":jb},side:e,children:[w(ud,{className:"sr-only",children:[a(pd,{children:"Sidebar"}),a(fd,{children:"Displays the mobile sidebar."})]}),a("div",{className:"flex h-full w-full flex-col",children:n})]})}):w("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[a("div",{"data-slot":"sidebar-gap",className:f("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),a("div",{"data-slot":"sidebar-container",className:f("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:a("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n})})]})}function N2({className:e,onClick:t,...r}){let{toggleSidebar:o}=Vo();return w(te,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:f("size-7",e),onClick:n=>{t==null||t(n),o();},...r,children:[a(lucideReact.PanelLeftIcon,{}),a("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function E2({className:e,...t}){let{toggleSidebar:r}=Vo();return a("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:f("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function xc({className:e,...t}){return a("main",{"data-slot":"sidebar-inset",className:f("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function D2({className:e,...t}){return a(at,{"data-slot":"sidebar-input","data-sidebar":"input",className:f("bg-background h-8 w-full shadow-none",e),...t})}function yc({className:e,sticky:t=false,...r}){return a("div",{"data-slot":"sidebar-header","data-sidebar":"header","data-sticky":t?"true":void 0,className:f("flex flex-col gap-2 p-2",t&&"sticky top-0 z-20 bg-sidebar/95 backdrop-blur supports-[backdrop-filter]:bg-sidebar/75",e),...r})}function Rc({className:e,...t}){return a("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:f("flex flex-col gap-2 p-2",e),...t})}function L2({className:e,...t}){return a(ld,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:f("bg-sidebar-border mx-2 w-auto",e),...t})}function kc({className:e,...t}){return a("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:f("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function I2({className:e,...t}){return a("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:f("relative flex w-full min-w-0 flex-col p-2",e),...t})}function _2({className:e,asChild:t=false,...r}){let o=t?radixUi.Slot.Slot:"div";return a(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:f("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})}function O2({className:e,asChild:t=false,...r}){let o=t?radixUi.Slot.Slot:"button";return a(o,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:f("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})}function A2({className:e,...t}){return a("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:f("w-full text-sm",e),...t})}function Cc({className:e,...t}){return a("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:f("flex w-full min-w-0 flex-col gap-1",e),...t})}function Pc({className:e,...t}){return a("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:f("group/menu-item relative",e),...t})}var Gb=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Sc({asChild:e=false,isActive:t=false,variant:r="default",size:o="default",tooltip:n,className:i,onClick:s,...l}){let c=e?radixUi.Slot.Slot:"button",{isMobile:u,setOpenMobile:d,state:m}=Vo(),v=X__namespace.useCallback(h=>{s&&s(h),!h.defaultPrevented&&u&&d(false);},[u,s,d]),g=a(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":t,className:f(Gb({variant:r,size:o}),i),onClick:v,...l});return n?(typeof n=="string"&&(n={children:n}),w(md,{children:[a(gd,{asChild:true,children:g}),a(vd,{side:"right",align:"center",hidden:m!=="collapsed"||u,...n})]})):g}function F2({className:e,asChild:t=false,showOnHover:r=false,...o}){let n=t?radixUi.Slot.Slot:"button";return a(n,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:f("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...o})}function z2({className:e,...t}){return a("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:f("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}function H2({className:e,showIcon:t=false,...r}){let o=X__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return w("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:f("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[t&&a(nr,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),a(nr,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}function B2({className:e,...t}){return a("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:f("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function V2({className:e,...t}){return a("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:f("group/menu-sub-item relative",e),...t})}function j2({asChild:e=false,size:t="md",isActive:r=false,className:o,onClick:n,...i}){let s=e?radixUi.Slot.Slot:"a",{isMobile:l,setOpenMobile:c}=Vo(),u=X__namespace.useCallback(d=>{n&&n(d),!d.defaultPrevented&&l&&c(false);},[l,n,c]);return a(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:f("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),onClick:u,...i})}function q2({className:e,defaultValue:t,value:r,min:o=0,max:n=100,...i}){let s=X__namespace.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[o,n],[r,t,o,n]);return w(radixUi.Slider.Root,{"data-slot":"slider",defaultValue:t,value:r,min:o,max:n,className:f("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...i,children:[a(radixUi.Slider.Track,{"data-slot":"slider-track",className:f("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:a(radixUi.Slider.Range,{"data-slot":"slider-range",className:f("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(l,c)=>a(radixUi.Slider.Thumb,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-primary/40 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},c))]})}var J2=({...e})=>a(sonner.Toaster,{theme:"dark",className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e});function xd({className:e,...t}){return a(radixUi.Switch.Root,{"data-slot":"switch",className:f("peer cursor-pointer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-primary focus-visible:ring-primary/40 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a(radixUi.Switch.Thumb,{"data-slot":"switch-thumb",className:f("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function yd({className:e,...t}){return a("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-visible",children:a("table",{"data-slot":"table",className:f("w-full caption-bottom text-sm",e),...t})})}function Rd({className:e,...t}){return a("thead",{"data-slot":"table-header",className:f("[&_tr]:border-b",e),...t})}function kd({className:e,...t}){return a("tbody",{"data-slot":"table-body",className:f("[&_tr:last-child]:border-0",e),...t})}function nD({className:e,...t}){return a("tfoot",{"data-slot":"table-footer",className:f("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function lr({className:e,...t}){return a("tr",{"data-slot":"table-row",className:f("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Cd({className:e,...t}){return a("th",{"data-slot":"table-head",className:f("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Sr({className:e,...t}){return a("td",{"data-slot":"table-cell",className:f("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function iD({className:e,...t}){return a("caption",{"data-slot":"table-caption",className:f("text-muted-foreground mt-4 text-sm",e),...t})}var Pd=X__namespace.createContext(null),Si=e=>{let t=X__namespace.useContext(Pd);if(!t)throw new Error(`${e} must be used within <Tabs>`);return t},Sd=X__namespace.createContext("default"),Ti=e=>{let t=X__namespace.useContext(Sd);return e!=null?e:t},qb={default:"h-10 justify-start rounded-md bg-muted p-1 text-muted-foreground md:justify-center",solid:"justify-start gap-1 rounded-full bg-muted/80 p-1 text-muted-foreground",segmented:"justify-start gap-1 rounded-xl bg-muted/70 p-1 text-muted-foreground",underline:"justify-start gap-6 border-b border-border bg-transparent p-0 text-muted-foreground",boxed:"justify-start gap-1 rounded-t-xl border border-border/60 bg-muted/40 p-1 text-muted-foreground"},Kb="relative z-10 inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",Yb={default:"min-w-[120px] rounded-md px-3 py-1.5 text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-foreground",solid:"rounded-full px-4 py-1.5 text-foreground/80 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-background",segmented:"rounded-lg px-4 py-1.5 text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-foreground",underline:"rounded-none border-b-2 border-transparent px-1 pb-2 pt-1 text-sm text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0 data-[state=active]:border-foreground data-[state=active]:text-foreground",boxed:"rounded-md border border-transparent px-4 py-2 text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-foreground"},Xb={default:"mt-2",solid:"mt-3",segmented:"mt-3",underline:"mt-4",boxed:"mt-0 rounded-b-xl border border-border border-t-0 bg-card p-6 shadow-sm"},Jb=new Set(["default","solid","segmented","boxed"]),Zb={default:"rounded-md bg-background shadow-sm",solid:"rounded-full bg-foreground",segmented:"rounded-lg bg-background shadow-sm",boxed:"rounded-md border border-border bg-background shadow-sm"},Qb="pointer-events-none absolute left-0 top-0 z-0 transition-all duration-300 ease-out will-change-transform",Td=(...e)=>t=>{e.forEach(r=>{if(typeof r=="function")r(t);else if(r!=null){let o=r;o.current=t;}});},Md=X__namespace.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,activationMode:n="automatic",variant:i="default",orientation:s="horizontal",items:l,listClassName:c,triggerClassName:u,contentClassName:d,renderList:m,...v},g)=>{var V;let h=X__namespace.useId(),p=t!==void 0,[b,x]=X__namespace.useState(()=>r!=null?r:null),y=(V=p?t:b)!=null?V:null,C=X__namespace.useRef(new Map),R=X__namespace.useCallback(L=>{p||x(L),o==null||o(L);},[p,o]),S=X__namespace.useCallback((L,_)=>{if(_){let z=C.current.size===0;C.current.set(L,_),!p&&y==null&&r==null&&z&&x(L);}else C.current.delete(L);},[r,p,x,y]),k=X__namespace.useCallback(L=>{var _;return L&&(_=C.current.get(L))!=null?_:null},[]),M=X__namespace.useCallback(L=>{let _=Array.from(C.current.keys());if(!_.length)return;let z=(L%_.length+_.length)%_.length,E=_[z],I=C.current.get(E);I==null||I.focus(),n!=="manual"&&R(E);},[n,R]),N=X__namespace.useCallback((L,_)=>{let E=Array.from(C.current.keys()).indexOf(L);E!==-1&&M(E+_);},[M]),D=X__namespace.useCallback(L=>{let _=Array.from(C.current.keys());_.length&&M(L==="first"?0:_.length-1);},[M]),[P,T]=X__namespace.useState(s),O=X__namespace.useCallback(L=>{T(L);},[]);X__namespace.useEffect(()=>{T(s);},[s]),X__namespace.useEffect(()=>{!p&&y==null&&r&&x(r);},[r,p,x,y]);let A=X__namespace.useMemo(()=>({id:h,value:y,setValue:R,activationMode:n,registerTrigger:S,getTriggerNode:k,focusNextTrigger:N,focusEdgeTrigger:D,orientation:P,setOrientation:O}),[h,y,R,n,S,N,D,P,O]);return a(Sd.Provider,{value:i,children:a(Pd.Provider,{value:A,children:w("div",{ref:g,className:f("flex flex-col gap-2",e),...v,children:[(m!=null?m:(L=>L))(a(Nd,{className:c,variant:i,orientation:s,children:l.map(L=>{let{triggerProps:_,contentProps:z,...E}=L,{className:I,...H}=_!=null?_:{};return a(Ed,{value:E.key,disabled:E.disabled,className:f(u,E.triggerClassName,I),variant:i,...H,children:E.label},E.key)})})),l.map(L=>{let{triggerProps:_,contentProps:z,...E}=L,{className:I,...H}=z!=null?z:{};return a(Dd,{value:E.key,variant:i,className:f(d,E.contentClassName,I),...H,children:E.children},E.key)})]})})})});Md.displayName="Tabs";var Nd=X__namespace.forwardRef(({className:e,variant:t,orientation:r="horizontal",...o},n)=>{let{value:i,setOrientation:s,getTriggerNode:l}=Si("TabsList"),c=Ti(t),u=Zb[c],d=X__namespace.useRef(null),[m,v]=X__namespace.useState(null),g=Jb.has(c),[h,p]=X__namespace.useState(false),[b,x]=X__namespace.useState(false),y=X__namespace.useCallback(S=>{if(r!=="horizontal")return;let k=d.current;if(!k||!S)return;let M=l(S);if(!M)return;let N=32,D=k.scrollLeft,P=D+k.clientWidth,T=M.offsetLeft,O=T+M.offsetWidth;if(T<D){let A=Math.max(0,T-N);typeof k.scrollTo=="function"?k.scrollTo({left:A,behavior:"smooth"}):k.scrollLeft=A;}else if(O>P){let A=Math.max(0,k.scrollWidth-k.clientWidth),V=Math.min(A,O-k.clientWidth+N);typeof k.scrollTo=="function"?k.scrollTo({left:V,behavior:"smooth"}):k.scrollLeft=V;}},[l,r]),C=X__namespace.useCallback(()=>{if(!g){v(null);return}let S=d.current,k=l(i);if(!S||!k){v(null);return}let M=k.offsetWidth,N=k.offsetHeight,D=k.offsetLeft,P=k.offsetTop,T=k.offsetParent;for(;T&&T!==S;)D+=T.offsetLeft-T.scrollLeft,P+=T.offsetTop-T.scrollTop,T=T.offsetParent;if(T!==S){let O=k.getBoundingClientRect(),A=S.getBoundingClientRect();D=O.left-A.left+S.scrollLeft,P=O.top-A.top+S.scrollTop;}v({width:M,height:N,transform:`translate3d(${D}px, ${P}px, 0)`});},[i,l,g]);X__namespace.useEffect(()=>{s(r);},[r,s]),X__namespace.useLayoutEffect(()=>{C();},[C]),X__namespace.useEffect(()=>{if(r!=="horizontal"){p(false),x(false);return}let S=d.current;if(!S)return;let k=()=>{let{scrollLeft:P,scrollWidth:T,clientWidth:O}=S;if(!(T-O>1)){p(false),x(false);return}p(P>1),x(P<T-O-1);};k(),y(i);let M=()=>k(),N=()=>{k(),y(i);},D=typeof ResizeObserver!="undefined"?new ResizeObserver(()=>N()):null;return S.addEventListener("scroll",M,{passive:true}),D==null||D.observe(S),window.addEventListener("resize",N),()=>{S.removeEventListener("scroll",M),D==null||D.disconnect(),window.removeEventListener("resize",N);}},[i,y,r]),X__namespace.useEffect(()=>{y(i);},[i,y]),X__namespace.useEffect(()=>{if(!g||typeof ResizeObserver=="undefined")return;let S=d.current;if(!S)return;let k=new ResizeObserver(()=>{C();});k.observe(S);let M=l(i);return M&&k.observe(M),()=>{k.disconnect();}},[i,l,g,C]),X__namespace.useEffect(()=>{if(!g||typeof MutationObserver=="undefined")return;let S=d.current;if(!S)return;let k=new MutationObserver(()=>{C();});return k.observe(S,{childList:true,subtree:true}),()=>{k.disconnect();}},[g,C]),X__namespace.useEffect(()=>{if(!g)return;let S=()=>{C();};return window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S);}},[g,C]);let R=r==="horizontal";return w("div",{className:f("relative",R&&"max-w-full overflow-hidden"),children:[w("div",{ref:Td(d,n),role:"tablist","aria-orientation":r,className:f("relative inline-flex items-center",R&&"w-full max-w-full overflow-x-auto overflow-y-hidden [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",qb[c],e),...o,children:[g&&m&&u?a("span",{"aria-hidden":"true",className:f(Qb,u),style:m}):null,o.children]}),R&&h?a("div",{className:"pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r from-background to-transparent"}):null,R&&b?a("div",{className:"pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-background to-transparent"}):null]})});Nd.displayName="TabsList";var Ed=X__namespace.forwardRef(({className:e,variant:t,value:r,disabled:o,onClick:n,onKeyDown:i,...s},l)=>{let{id:c,value:u,setValue:d,registerTrigger:m,focusNextTrigger:v,focusEdgeTrigger:g,orientation:h}=Si("TabsTrigger"),p=Ti(t),b=X__namespace.useRef(null),x=u===r,y=`${c}-trigger-${r}`,C=`${c}-content-${r}`;X__namespace.useEffect(()=>(m(r,b.current),()=>m(r,null)),[m,r]);let R=k=>{n==null||n(k),!(k.defaultPrevented||o)&&d(r);},S=k=>{if(i==null||i(k),!k.defaultPrevented){if(h==="horizontal"){if(k.key==="ArrowRight"){k.preventDefault(),v(r,1);return}if(k.key==="ArrowLeft"){k.preventDefault(),v(r,-1);return}}else {if(k.key==="ArrowDown"){k.preventDefault(),v(r,1);return}if(k.key==="ArrowUp"){k.preventDefault(),v(r,-1);return}}if(k.key==="Home"){k.preventDefault(),g("first");return}if(k.key==="End"){k.preventDefault(),g("last");return}(k.key===" "||k.key==="Enter")&&(k.preventDefault(),d(r));}};return a("button",{type:"button",role:"tab",id:y,"aria-selected":x,"aria-controls":C,tabIndex:x?0:-1,"data-state":x?"active":"inactive",disabled:o,ref:Td(b,l),className:f(Kb,Yb[p],e),onClick:R,onKeyDown:S,...s})});Ed.displayName="TabsTrigger";var Dd=X__namespace.forwardRef(({className:e,variant:t,value:r,...o},n)=>{let{id:i,value:s}=Si("TabsContent"),l=Ti(t),c=s===r,u=`${i}-trigger-${r}`,d=`${i}-content-${r}`;return a("div",{ref:n,role:"tabpanel",id:d,"aria-labelledby":u,hidden:!c,"data-state":c?"active":"inactive",className:f("focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",Xb[l],e),...o})});Dd.displayName="TabsContent";var Mi=X__namespace.forwardRef(({className:e,onFocus:t,...r},o)=>{let n=X__namespace.useCallback(s=>{typeof o=="function"?o(s):o&&(o.current=s);},[o]),i=X__namespace.useCallback(s=>{t==null||t(s),!s.defaultPrevented&&pa(s.currentTarget);},[t]);return a("textarea",{ref:n,"data-slot":"textarea",onFocus:i,className:f("border-input placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...r})});Mi.displayName="Textarea";var Ni=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function xD({className:e,variant:t,size:r,...o}){return a(radixUi.Toggle.Root,{"data-slot":"toggle",className:f(Ni({variant:t,size:r,className:e})),...o})}var Id=X__namespace.createContext({size:"default",variant:"default"});function SD({className:e,variant:t,size:r,children:o,...n}){return a(radixUi.ToggleGroup.Root,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:f("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",e),...n,children:a(Id.Provider,{value:{variant:t,size:r},children:o})})}function TD({className:e,children:t,variant:r,size:o,...n}){let i=X__namespace.useContext(Id);return a(radixUi.ToggleGroup.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||r,"data-size":i.size||o,className:f(Ni({variant:i.variant||r,size:i.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...n,children:t})}var aw="hsl(var(--primary))",Ei={bottomLeft:{side:"bottom",align:"start"},bottomRight:{side:"bottom",align:"end"},topLeft:{side:"top",align:"start"},topRight:{side:"top",align:"end"}},nw=e=>{var t;return e&&(t=Ei[e])!=null?t:Ei.bottomLeft},wt=e=>String(e).padStart(2,"0"),iw=(e,t)=>{let r=e.hour>=12?"PM":"AM",o=(e.hour+11)%12+1,n={HH:wt(e.hour),H:String(e.hour),hh:wt(o),h:String(o),mm:wt(e.minute),m:String(e.minute),ss:wt(e.second),s:String(e.second),A:r,a:r.toLowerCase()};return t.replace(/HH|H|hh|h|mm|m|ss|s|A|a/g,i=>n[i])},sw=(e,t)=>t?`${wt(e.hour)}:${wt(e.minute)}:${wt(e.second)}`:`${wt(e.hour)}:${wt(e.minute)}`,lw=e=>{let t=e.match(/\b(AM|PM)\b/i);return t?t[1].toUpperCase()==="AM"?"AM":"PM":null},_d=e=>{if(!e)return null;let t=e.trim();if(!t)return null;let r=lw(t),o=r?t.replace(/\s?(AM|PM)\b/i,"").trim():t,[n,i,s]=o.split(":");if(!n||!i)return null;let l=Number.parseInt(n,10),c=Number.parseInt(i,10),u=s?Number.parseInt(s,10):0;if([l,c,u].some(m=>Number.isNaN(m)))return null;let d=l;if(r){let m=Math.min(Math.max(d%12||12,1),12);d=r==="PM"?m%12+12:m%12,r==="AM"&&m===12&&(d=0),r==="PM"&&m===12&&(d=12);}return {hour:Math.min(Math.max(d,0),23),minute:Math.min(Math.max(c,0),59),second:Math.min(Math.max(u,0),59)}},cw=e=>{let t=e%12;return t===0?12:t},dw=(e,t)=>{let r=e%12;return t==="PM"?r+12:r===12?0:r},Di=({label:e,options:t,selectedValue:r,onSelect:o})=>w("div",{className:"flex w-20 min-w-0 flex-col gap-2",children:[a("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),a("div",{role:"listbox",className:"max-h-48 overflow-y-auto rounded-md border border-border/60 p-1","aria-label":e,children:t.map(n=>{let i=n.value===r;return a("button",{type:"button",role:"option","aria-selected":i,className:f("w-full rounded-sm px-2 py-1 text-sm transition-colors",i?"bg-primary text-primary-foreground":"hover:bg-muted hover:text-foreground"),onClick:()=>o(n.value),children:n.label},n.value)})})]}),Ka=44,uw=5,Od=40;function Li({label:e,options:t,selectedValue:r,onValueChange:o,open:n,infinite:i=true}){let s=X__namespace.useRef(null),l=X__namespace.useRef(null),c=X__namespace.useMemo(()=>{if(t.length===0)return [];if(!i)return t;let v=[];for(let g=0;g<Od;g+=1)for(let h of t)v.push(h);return v},[i,t]),u=X__namespace.useCallback((v,g="auto")=>{if(!s.current||t.length===0||c.length===0)return;let h=t.findIndex(C=>C.value===v),p=h>=0?h:0,b=Math.floor(Od/2),y=(i?p+t.length*b:p)*Ka;s.current.scrollTo({top:y,behavior:g});},[c.length,i,t]);X__namespace.useLayoutEffect(()=>{n&&u(r);},[u,n,t,r]),X__namespace.useEffect(()=>()=>{l.current!==null&&clearTimeout(l.current);},[]);let d=X__namespace.useCallback(v=>{if(c.length===0||t.length===0)return;let g=v.currentTarget,h=Math.round(g.scrollTop/Ka),p=c.length-1,b=Math.max(0,Math.min(h,p));l.current!==null&&clearTimeout(l.current),l.current=setTimeout(()=>{var C;let x=c[b];if(!x)return;if(!o(x.value)){u(r,"smooth");return}if(i){let R=t.length,S=c.length-t.length-1;if(h<=R||h>=S)u(x.value);else {let k=h*Ka;(C=s.current)==null||C.scrollTo({top:k});}return}u(x.value);},80);},[u,c,i,o,t,r]);if(t.length===0)return a("div",{className:"flex-1",children:a("p",{className:"text-center text-sm text-muted-foreground",children:"No options"})});let m=(uw-1)/2*Ka;return w("div",{className:"flex flex-1 flex-col items-center gap-2",children:[a("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),w("div",{className:"relative h-56 w-full overflow-hidden",children:[a("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 border-y border-primary/30"}),a("div",{ref:s,onScroll:d,className:"h-56 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",style:{paddingTop:m,paddingBottom:m,WebkitOverflowScrolling:"touch"},children:c.map((v,g)=>{let h=`${g}-${v.value}`,p=v.value===r;return a("div",{className:f("flex h-11 items-center justify-center text-base transition-colors",p?"font-medium text-foreground":"text-muted-foreground"),children:v.label},h)})})]})]})}var pw=({value:e,onChange:t})=>w("div",{className:"flex w-20 min-w-0 flex-col gap-2",children:[a("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Period"}),a("div",{role:"radiogroup",className:"grid gap-2",children:["AM","PM"].map(r=>{let o=r===e;return a("button",{type:"button",role:"radio","aria-checked":o,className:f("rounded-sm px-2 py-1 text-sm transition-colors",o?"bg-primary text-primary-foreground":"border border-border/60 hover:bg-muted hover:text-foreground"),onClick:()=>t(r),children:r},r)})})]}),Ii=X__namespace.forwardRef((e,t)=>{var sa,Vr,yo,Ro;let{value:r,defaultValue:o=null,onChange:n,onOpenChange:i,hourStep:s=1,minuteStep:l=1,secondStep:c=1,showSeconds:u,use12Hours:d=false,allowClear:m=true,format:v,placeholder:g,placement:h="bottomLeft",size:p="middle",status:b,variant:x="outlined",inputClassName:y,inputStyle:C,prefix:R,open:S,defaultOpen:k,inputReadOnly:M=true,className:N,style:D,disabled:P=false,name:T,id:O,...A}=e,{onBlur:V,onFocus:L,onClick:_,...z}=A,{isNative:E}=Xt(),I=ct(),H=E||I,j=r!==void 0,[U,W]=X__namespace.useState(o),G=(sa=j?r:U)!=null?sa:null,B=X__namespace.useMemo(()=>_d(G),[G]),Z=X__namespace.useMemo(()=>{var Q;return ((Q=B==null?void 0:B.hour)!=null?Q:0)>=12?"PM":"AM"},[B==null?void 0:B.hour]),[q,le]=X__namespace.useState(Z);X__namespace.useEffect(()=>{le(Z);},[Z]);let ee=X__namespace.useMemo(()=>typeof u=="boolean"?u:typeof v=="string"?/s/.test(v):!!(G&&G.split(":").length===3),[G,v,u]),ae=X__namespace.useMemo(()=>d?ee?"hh:mm:ss A":"hh:mm A":ee?"HH:mm:ss":"HH:mm",[ee,d]),he=typeof v=="string"?v:ae,ve=X__namespace.useCallback(Q=>Q?typeof v=="function"?v(Q):iw(Q,he):"",[v,he]),[K,ce]=X__namespace.useState(()=>ve(B));X__namespace.useEffect(()=>{ce(ve(B));},[ve,B]);let fe=typeof m=="object"&&m!==null&&!Array.isArray(m)?m:void 0,we=(Vr=fe==null?void 0:fe.clearIcon)!=null?Vr:a(lucideReact.X,{className:"h-4 w-4",strokeWidth:2}),ke=!!m&&!P&&!!G,ie=X__namespace.useMemo(()=>({"--date-primary-color":aw}),[]),ne=S!==void 0,[xe,de]=X__namespace.useState(!!k),Se=ne?!!S:xe,De=X__namespace.useCallback(Q=>{P||(ne||de(Q),i==null||i(Q));},[P,ne,i]),be=X__namespace.useCallback(Q=>{if(!Q){j||W(null),ce(""),n==null||n(null,"");return}let ge=sw(Q,ee);j||W(ge);let st=ve(Q);ce(st),n==null||n(ge,st);},[ve,ee,j,n]),ze=B!=null?B:{hour:0,minute:0,second:0},Ee=Math.max(1,Math.floor(s)),Le=Math.max(1,Math.floor(l)),ye=Math.max(1,Math.floor(c)),Ut=X__namespace.useMemo(()=>{if(d){let ge=[];for(let Lt=1;Lt<=12;Lt+=Ee)ge.push(Math.min(Lt,12));return ge.includes(12)||ge.push(12),Array.from(new Set(ge)).sort((Lt,In)=>Lt-In).map(Lt=>({label:wt(Lt),value:Lt}))}let Q=[];for(let ge=0;ge<24;ge+=Ee)Q.push({label:wt(ge),value:ge});return Q},[Ee,d]),Ce=X__namespace.useMemo(()=>{let Q=[];for(let ge=0;ge<60;ge+=Le)Q.push({label:wt(ge),value:ge});return Q},[Le]),fr=X__namespace.useMemo(()=>{if(!ee)return [];let Q=[];for(let ge=0;ge<60;ge+=ye)Q.push({label:wt(ge),value:ge});return Q},[ee,ye]),et=X__namespace.useMemo(()=>B?d?cw(B.hour):B.hour:d?12:0,[B,d]),tr=(yo=B==null?void 0:B.minute)!=null?yo:0,Dt=(Ro=B==null?void 0:B.second)!=null?Ro:0,rr=X__namespace.useCallback(Q=>{if(d){let ge=dw(Q,q);be({...ze,hour:ge});}else be({...ze,hour:Q});},[ze,be,q,d]),Ae=X__namespace.useCallback(Q=>{be({...ze,minute:Q});},[ze,be]),Te=X__namespace.useCallback(Q=>{be({...ze,second:Q});},[ze,be]),mr=X__namespace.useCallback(Q=>{le(Q);let ge=B!=null?B:ze,st=ge.hour;Q==="AM"&&st>=12&&(st-=12),Q==="PM"&&st<12&&(st+=12),be({...ge,hour:st});},[ze,be,B]),Br=X__namespace.useCallback(Q=>{let ge=Q.target.value;if(ce(ge),!ge.trim()){be(null);return}let st=_d(ge);st&&be(st);},[be]),{side:ue,align:gt}=nw(h),tt={small:"h-8 text-sm",middle:`${It} text-sm`,large:"h-11 text-base"},Wt={error:"border-destructive focus-visible:border-destructive focus-visible:ring-destructive/30",warning:"border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500/30"},Mn={outlined:"",borderless:"border-transparent shadow-none focus:border-transparent focus:ring-0 focus:ring-offset-0",filled:"border-transparent bg-muted/60 focus:bg-muted",underlined:"border-x-0 border-t-0 rounded-none focus:ring-offset-0"},na=M||H,Nn=g!=null?g:"Select time",ia=w("div",{role:"combobox","aria-expanded":Se,"aria-haspopup":"dialog",className:f("relative w-full",N),style:D,children:[R&&a("div",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center text-muted-foreground",children:R}),a(at,{...z,ref:t,value:K,onChange:na?void 0:Br,onFocus:L,onBlur:V,readOnly:na,disabled:P,placeholder:Nn,name:T,id:O,className:f("pr-10 text-sm",Mn[x],R&&"pl-10",P&&"cursor-not-allowed opacity-60",!P&&"cursor-pointer",tt[p],b?Wt[b]:void 0,y),style:{...b==="error"?{borderColor:"hsl(var(--destructive))",boxShadow:"0 0 0 3px hsl(var(--destructive) / 0.2)"}:{},...b==="warning"?{borderColor:"var(--warning, hsl(var(--primary)))",boxShadow:"0 0 0 3px hsl(var(--primary) / 0.2)"}:{},...C!=null?C:{}},onClick:Q=>{_==null||_(Q),!P&&De(true);}}),ke&&a("button",{type:"button",className:"absolute inset-y-0 right-8 flex items-center text-muted-foreground transition hover:text-foreground",onMouseDown:Q=>{Q.preventDefault(),Q.stopPropagation();},onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),be(null);},children:we}),a("div",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-muted-foreground",children:a(lucideReact.Clock,{className:"h-4 w-4"})})]}),En=X__namespace.useMemo(()=>[{label:"AM",value:"AM"},{label:"PM",value:"PM"}],[]),Dn=w("div",{className:"flex w-max gap-4 p-4",role:"dialog","aria-modal":"true",children:[a(Di,{label:"Hour",options:Ut,selectedValue:et,onSelect:rr}),a(Di,{label:"Minute",options:Ce,selectedValue:tr,onSelect:Ae}),ee?a(Di,{label:"Second",options:fr,selectedValue:Dt,onSelect:Te}):null,d?a(pw,{value:q,onChange:mr}):null]}),Ln=w("div",{className:"flex w-full gap-4",children:[a(Li,{open:Se,label:"Hour",options:Ut,selectedValue:et,onValueChange:Q=>(rr(Q),true)}),a(Li,{open:Se,label:"Minute",options:Ce,selectedValue:tr,onValueChange:Q=>(Ae(Q),true)}),d?a(Li,{open:Se,label:"Period",options:En,selectedValue:q,infinite:false,onValueChange:Q=>(mr(Q),true)}):null]});return H?w(Qr,{open:Se,onOpenChange:De,children:[a(Da,{asChild:true,children:ia}),w(eo,{className:"mt-10 max-h-[min(540px,calc(100dvh-6rem))] rounded-t-3xl bg-background",children:[a(to,{className:"px-6 pb-2 pt-4",children:a(ro,{className:"text-base font-medium text-foreground",children:"Select time"})}),w("div",{className:"flex flex-1 flex-col gap-6 px-6 pb-6",children:[a("div",{className:"flex w-full gap-4",children:Ln}),w("div",{className:"mt-auto flex items-center justify-between",children:[a("div",{className:"flex-1"}),w("div",{className:"flex items-center gap-3",children:[m?a(te,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:()=>be(null),children:"Clear"}):null,a(La,{asChild:true,children:a(te,{type:"button",variant:"default",size:"sm",className:"bg-[var(--date-primary-color)] text-white hover:opacity-90 focus-visible:ring-[var(--date-primary-color)]/30",style:ie,children:"Done"})})]})]})]})]})]}):w(Jr,{open:Se,onOpenChange:De,children:[a(Ea,{asChild:true,children:ia}),a(Zr,{className:"w-auto border border-border bg-popover p-0 shadow-lg",align:gt,side:ue,children:Dn})]})});Ii.displayName="TimePicker";function Ad({row:e}){let{transform:t,transition:r,setNodeRef:o,isDragging:n}=sortable.useSortable({id:e.original.id});return a(lr,{"data-state":e.getIsSelected()&&"selected","data-dragging":n,ref:o,className:"relative z-0 data-[dragging=true]:z-10 data-[dragging=true]:opacity-80",style:{transform:utilities.CSS.Transform.toString(t),transition:r},children:e.getVisibleCells().map(i=>a(Sr,{children:reactTable.flexRender(i.column.columnDef.cell,i.getContext())},i.id))})}function Sw({columns:e,dndEnabled:t,dataIds:r,rows:o}){return o.length?t?a(sortable.SortableContext,{items:r,strategy:sortable.verticalListSortingStrategy,children:o.map(n=>a(Ad,{row:n},n.id))}):o.map(n=>a(lr,{"data-state":n.getIsSelected()&&"selected",children:n.getVisibleCells().map(i=>{let s=i.column.columnDef.meta;return a(Sr,{className:s==null?void 0:s.cellClassName,style:s==null?void 0:s.cellStyle,children:reactTable.flexRender(i.column.columnDef.cell,i.getContext())},i.id)})},n.id)):a(lr,{children:a(Sr,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})}function Hd({table:e,columns:t,dndEnabled:r=false,onReorder:o,virtualizedRows:n}){var m;let i=(m=n==null?void 0:n.rows)!=null?m:e.getRowModel().rows,s=r?i.map(v=>Number(v.id)):[],l=X__namespace.useId(),c=core.useSensors(core.useSensor(core.MouseSensor,{}),core.useSensor(core.TouchSensor,{}),core.useSensor(core.KeyboardSensor,{}));function u(v){let{active:g,over:h}=v;if(g&&h&&g.id!==h.id&&o){let p=s.indexOf(g.id),b=s.indexOf(h.id),x=sortable.arrayMove(e.options.data,p,b);o(x);}}let d=w(yd,{className:"table-fixed min-w-full",children:[a(Rd,{className:"sticky top-0 z-20 bg-muted",children:e.getHeaderGroups().map(v=>a(lr,{children:v.headers.map(g=>{let h=g.column.columnDef.meta;return a(Cd,{colSpan:g.colSpan,className:f("sticky top-0 z-30 bg-muted",h==null?void 0:h.headerClassName),style:h==null?void 0:h.headerStyle,children:g.isPlaceholder?null:reactTable.flexRender(g.column.columnDef.header,g.getContext())},g.id)})},v.id))}),w(kd,{className:"**:data-[slot=table-cell]:first:w-8",children:[n!=null&&n.paddingTop?a(lr,{className:"pointer-events-none border-0",children:a(Sr,{colSpan:t.length,className:"p-0",style:{height:n.paddingTop}})}):null,Sw({columns:t,dndEnabled:r,dataIds:s,rows:i}),n!=null&&n.paddingBottom?a(lr,{className:"pointer-events-none border-0",children:a(Sr,{colSpan:t.length,className:"p-0",style:{height:n.paddingBottom}})}):null]})]});return r?a(core.DndContext,{collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToVerticalAxis],onDragEnd:u,sensors:c,id:l,children:d}):d}function Ew(e){switch(e){case "desc":return a(lucideReact.ArrowDown,{className:"ml-2 h-4 w-4"});case "asc":return a(lucideReact.ArrowUp,{className:"ml-2 h-4 w-4"});default:return a(lucideReact.ChevronsUpDown,{className:"ml-2 h-4 w-4"})}}function Bd({column:e,title:t,className:r}){if(!e.getCanSort())return a("div",{className:f(r),children:t});let o=n=>{let i=n.shiftKey||n.metaKey||n.ctrlKey,s=e.getNextSortingOrder();if(!s){e.clearSorting();return}e.toggleSorting(s==="desc",i);};return a("div",{className:f("flex items-center space-x-2",r),children:w(te,{type:"button",variant:"ghost",size:"sm",className:"-ml-3 h-8 justify-start",onClick:o,children:[a("span",{children:t}),Ew(e.getIsSorted())]})})}function Vd({table:e,showPageSize:t=true,pageSizeOptions:r=[10,20,30,40,50]}){return w("div",{className:"flex items-center justify-between px-4",children:[w("div",{className:"text-muted-foreground hidden flex-1 text-sm lg:flex",children:[e.getFilteredSelectedRowModel().rows.length," of ",e.getFilteredRowModel().rows.length," row(s) selected."]}),w("div",{className:"flex w-full items-center gap-8 lg:w-fit",children:[t?w("div",{className:"hidden items-center gap-2 lg:flex",children:[a(_e,{htmlFor:"rows-per-page",className:"text-sm font-medium",children:"Rows per page"}),a(Wa,{value:`${e.getState().pagination.pageSize}`,onValueChange:o=>{e.setPageSize(Number(o));},options:r.map(o=>({value:`${o}`,label:o})),triggerProps:{size:"sm",className:"w-20",id:"rows-per-page"},contentProps:{side:"top"}})]}):null,w("div",{className:"flex w-fit items-center justify-center text-sm font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),w("div",{className:"ml-auto flex items-center gap-2 lg:ml-0",children:[w(te,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[a("span",{className:"sr-only",children:"Go to first page"}),a(lucideReact.ChevronsLeft,{})]}),w(te,{variant:"outline",className:"size-8",size:"icon",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[a("span",{className:"sr-only",children:"Go to previous page"}),a(lucideReact.ChevronLeft,{})]}),w(te,{variant:"outline",className:"size-8",size:"icon",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[a("span",{className:"sr-only",children:"Go to next page"}),a(lucideReact.ChevronRight,{})]}),w(te,{variant:"outline",className:"hidden size-8 lg:flex",size:"icon",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[a("span",{className:"sr-only",children:"Go to last page"}),a(lucideReact.ChevronsRight,{})]})]})]})]})}function me(e,t,{checkForDefaultPrevented:r=true}={}){return function(n){if(e==null||e(n),r===false||!n.defaultPrevented)return t==null?void 0:t(n)}}function Ft(e,t=[]){let r=[];function o(i,s){let l=X__namespace.createContext(s),c=r.length;r=[...r,s];let u=m=>{var x;let{scope:v,children:g,...h}=m,p=((x=v==null?void 0:v[e])==null?void 0:x[c])||l,b=X__namespace.useMemo(()=>h,Object.values(h));return jsxRuntime.jsx(p.Provider,{value:b,children:g})};u.displayName=i+"Provider";function d(m,v){var p;let g=((p=v==null?void 0:v[e])==null?void 0:p[c])||l,h=X__namespace.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${i}\``)}return [u,d]}let n=()=>{let i=r.map(s=>X__namespace.createContext(s));return function(l){let c=(l==null?void 0:l[e])||i;return X__namespace.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return n.scopeName=e,[o,Aw(n,...t)]}function Aw(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(i){let s=o.reduce((l,{useScope:c,scopeName:u})=>{let m=c(i)[`__scope${u}`];return {...l,...m}},{});return X__namespace.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var dt=globalThis!=null&&globalThis.document?X__namespace.useLayoutEffect:()=>{};var Fw=X__namespace[" useInsertionEffect ".trim().toString()]||dt;function Ya({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,i,s]=zw({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:n;{let d=X__namespace.useRef(e!==void 0);X__namespace.useEffect(()=>{let m=d.current;m!==l&&console.warn(`${o} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l;},[l,o]);}let u=X__namespace.useCallback(d=>{var m;if(l){let v=Hw(d)?d(e):d;v!==e&&((m=s.current)==null||m.call(s,v));}else i(d);},[l,e,i,s]);return [c,u]}function zw({defaultProp:e,onChange:t}){let[r,o]=X__namespace.useState(e),n=X__namespace.useRef(r),i=X__namespace.useRef(t);return Fw(()=>{i.current=t;},[t]),X__namespace.useEffect(()=>{var s;n.current!==r&&((s=i.current)==null||s.call(i,r),n.current=r);},[r,n]),[r,o,i]}function Hw(e){return typeof e=="function"}var Vw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Me=Vw.reduce((e,t)=>{let r=ir(`Primitive.${t}`),o=X__namespace.forwardRef((n,i)=>{let{asChild:s,...l}=n,c=s?r:t;return typeof window!="undefined"&&(window[Symbol.for("radix-ui")]=true),jsxRuntime.jsx(c,{...l,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Ja(e,t){e&&Wd__namespace.flushSync(()=>e.dispatchEvent(t));}function Za(e){let t=e+"CollectionProvider",[r,o]=Ft(t),[n,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{let{scope:b,children:x}=p,y=X__namespace.default.useRef(null),C=X__namespace.default.useRef(new Map).current;return jsxRuntime.jsx(n,{scope:b,itemMap:C,collectionRef:y,children:x})};s.displayName=t;let l=e+"CollectionSlot",c=ir(l),u=X__namespace.default.forwardRef((p,b)=>{let{scope:x,children:y}=p,C=i(l,x),R=Oe(b,C.collectionRef);return jsxRuntime.jsx(c,{ref:R,children:y})});u.displayName=l;let d=e+"CollectionItemSlot",m="data-radix-collection-item",v=ir(d),g=X__namespace.default.forwardRef((p,b)=>{let{scope:x,children:y,...C}=p,R=X__namespace.default.useRef(null),S=Oe(b,R),k=i(d,x);return X__namespace.default.useEffect(()=>(k.itemMap.set(R,{ref:R,...C}),()=>void k.itemMap.delete(R))),jsxRuntime.jsx(v,{[m]:"",ref:S,children:y})});g.displayName=d;function h(p){let b=i(e+"CollectionConsumer",p);return X__namespace.default.useCallback(()=>{let y=b.collectionRef.current;if(!y)return [];let C=Array.from(y.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((k,M)=>C.indexOf(k.ref.current)-C.indexOf(M.ref.current))},[b.collectionRef,b.itemMap])}return [{Provider:s,Slot:u,ItemSlot:g},h,o]}var jw=X__namespace.createContext(void 0);function en(e){let t=X__namespace.useContext(jw);return e||t||"ltr"}function Je(e){let t=X__namespace.useRef(e);return X__namespace.useEffect(()=>{t.current=e;}),X__namespace.useMemo(()=>(...r)=>{var o;return (o=t.current)==null?void 0:o.call(t,...r)},[])}function $d(e,t=globalThis==null?void 0:globalThis.document){let r=Je(e);X__namespace.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n);};return t.addEventListener("keydown",o,{capture:true}),()=>t.removeEventListener("keydown",o,{capture:true})},[r,t]);}var Uw="DismissableLayer",Ai="dismissableLayer.update",Ww="dismissableLayer.pointerDownOutside",Gw="dismissableLayer.focusOutside",qd,Xd=X__namespace.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fi=X__namespace.forwardRef((e,t)=>{var M;let{disableOutsidePointerEvents:r=false,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=X__namespace.useContext(Xd),[d,m]=X__namespace.useState(null),v=(M=d==null?void 0:d.ownerDocument)!=null?M:globalThis==null?void 0:globalThis.document,[,g]=X__namespace.useState({}),h=Oe(t,N=>m(N)),p=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(b),y=d?p.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=x,S=Kw(N=>{let D=N.target,P=[...u.branches].some(T=>T.contains(D));!R||P||(n==null||n(N),s==null||s(N),N.defaultPrevented||l==null||l());},v),k=Yw(N=>{let D=N.target;[...u.branches].some(T=>T.contains(D))||(i==null||i(N),s==null||s(N),N.defaultPrevented||l==null||l());},v);return $d(N=>{y===u.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()));},v),X__namespace.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qd=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Kd(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=qd);}},[d,v,r,u]),X__namespace.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Kd());},[d,u]),X__namespace.useEffect(()=>{let N=()=>g({});return document.addEventListener(Ai,N),()=>document.removeEventListener(Ai,N)},[]),jsxRuntime.jsx(Me.div,{...c,ref:h,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,k.onFocusCapture),onBlurCapture:me(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,S.onPointerDownCapture)})});Fi.displayName=Uw;var $w="DismissableLayerBranch",qw=X__namespace.forwardRef((e,t)=>{let r=X__namespace.useContext(Xd),o=X__namespace.useRef(null),n=Oe(t,o);return X__namespace.useEffect(()=>{let i=o.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i);}},[r.branches]),jsxRuntime.jsx(Me.div,{...e,ref:n})});qw.displayName=$w;function Kw(e,t=globalThis==null?void 0:globalThis.document){let r=Je(e),o=X__namespace.useRef(false),n=X__namespace.useRef(()=>{});return X__namespace.useEffect(()=>{let i=l=>{if(l.target&&!o.current){let u=function(){Jd(Ww,r,d,{discrete:true});};let d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:true})):u();}else t.removeEventListener("click",n.current);o.current=false;},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i);},0);return ()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",n.current);}},[t,r]),{onPointerDownCapture:()=>o.current=true}}function Yw(e,t=globalThis==null?void 0:globalThis.document){let r=Je(e),o=X__namespace.useRef(false);return X__namespace.useEffect(()=>{let n=i=>{i.target&&!o.current&&Jd(Gw,r,{originalEvent:i},{discrete:false});};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=true,onBlurCapture:()=>o.current=false}}function Kd(){let e=new CustomEvent(Ai);document.dispatchEvent(e);}function Jd(e,t,r,{discrete:o}){let n=r.originalEvent.target,i=new CustomEvent(e,{bubbles:false,cancelable:true,detail:r});t&&n.addEventListener(e,t,{once:true}),o?Ja(n,i):n.dispatchEvent(i);}var zi=0;function eu(){X__namespace.useEffect(()=>{var t,r;let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=e[0])!=null?t:Zd()),document.body.insertAdjacentElement("beforeend",(r=e[1])!=null?r:Zd()),zi++,()=>{zi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),zi--;}},[]);}function Zd(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Hi="focusScope.autoFocusOnMount",Bi="focusScope.autoFocusOnUnmount",tu={bubbles:false,cancelable:true},Jw="FocusScope",Vi=X__namespace.forwardRef((e,t)=>{let{loop:r=false,trapped:o=false,onMountAutoFocus:n,onUnmountAutoFocus:i,...s}=e,[l,c]=X__namespace.useState(null),u=Je(n),d=Je(i),m=X__namespace.useRef(null),v=Oe(t,p=>c(p)),g=X__namespace.useRef({paused:false,pause(){this.paused=true;},resume(){this.paused=false;}}).current;X__namespace.useEffect(()=>{if(o){let y=function(k){if(g.paused||!l)return;let M=k.target;l.contains(M)?m.current=M:cr(m.current,{select:true});},C=function(k){if(g.paused||!l)return;let M=k.relatedTarget;M!==null&&(l.contains(M)||cr(m.current,{select:true}));},R=function(k){if(document.activeElement===document.body)for(let N of k)N.removedNodes.length>0&&cr(l);};document.addEventListener("focusin",y),document.addEventListener("focusout",C);let S=new MutationObserver(R);return l&&S.observe(l,{childList:true,subtree:true}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",C),S.disconnect();}}},[o,l,g.paused]),X__namespace.useEffect(()=>{if(l){ou.add(g);let p=document.activeElement;if(!l.contains(p)){let x=new CustomEvent(Hi,tu);l.addEventListener(Hi,u),l.dispatchEvent(x),x.defaultPrevented||(Zw(ox(nu(l)),{select:true}),document.activeElement===p&&cr(l));}return ()=>{l.removeEventListener(Hi,u),setTimeout(()=>{let x=new CustomEvent(Bi,tu);l.addEventListener(Bi,d),l.dispatchEvent(x),x.defaultPrevented||cr(p!=null?p:document.body,{select:true}),l.removeEventListener(Bi,d),ou.remove(g);},0);}}},[l,u,d,g]);let h=X__namespace.useCallback(p=>{if(!r&&!o||g.paused)return;let b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(b&&x){let y=p.currentTarget,[C,R]=Qw(y);C&&R?!p.shiftKey&&x===R?(p.preventDefault(),r&&cr(C,{select:true})):p.shiftKey&&x===C&&(p.preventDefault(),r&&cr(R,{select:true})):x===y&&p.preventDefault();}},[r,o,g.paused]);return jsxRuntime.jsx(Me.div,{tabIndex:-1,...s,ref:v,onKeyDown:h})});Vi.displayName=Jw;function Zw(e,{select:t=false}={}){let r=document.activeElement;for(let o of e)if(cr(o,{select:t}),document.activeElement!==r)return}function Qw(e){let t=nu(e),r=ru(t,e),o=ru(t.reverse(),e);return [r,o]}function nu(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ru(e,t){for(let r of e)if(!ex(r,{upTo:t}))return r}function ex(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return true;for(;e;){if(t!==void 0&&e===t)return false;if(getComputedStyle(e).display==="none")return true;e=e.parentElement;}return false}function tx(e){return e instanceof HTMLInputElement&&"select"in e}function cr(e,{select:t=false}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:true}),e!==r&&tx(e)&&t&&e.select();}}var ou=rx();function rx(){let e=[];return {add(t){let r=e[0];t!==r&&(r==null||r.pause()),e=au(e,t),e.unshift(t);},remove(t){var r;e=au(e,t),(r=e[0])==null||r.resume();}}}function au(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function ox(e){return e.filter(t=>t.tagName!=="A")}var ax=X__namespace[" useId ".trim().toString()]||(()=>{}),nx=0;function dr(e){let[t,r]=X__namespace.useState(ax());return dt(()=>{r(o=>o!=null?o:String(nx++));},[e]),(t?`radix-${t}`:"")}var lu=["top","right","bottom","left"];var zt=Math.min,nt=Math.max,Wo=Math.round,Go=Math.floor,Tt=e=>({x:e,y:e}),ix={left:"right",right:"left",bottom:"top",top:"bottom"},sx={start:"end",end:"start"};function rn(e,t,r){return nt(e,zt(t,r))}function Ht(e,t){return typeof e=="function"?e(t):e}function Bt(e){return e.split("-")[0]}function Mr(e){return e.split("-")[1]}function on(e){return e==="x"?"y":"x"}function an(e){return e==="y"?"height":"width"}var lx=new Set(["top","bottom"]);function Mt(e){return lx.has(Bt(e))?"y":"x"}function nn(e){return on(Mt(e))}function cu(e,t,r){r===void 0&&(r=false);let o=Mr(e),n=nn(e),i=an(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Uo(s)),[s,Uo(s)]}function du(e){let t=Uo(e);return [tn(e),t,tn(t)]}function tn(e){return e.replace(/start|end/g,t=>sx[t])}var iu=["left","right"],su=["right","left"],cx=["top","bottom"],dx=["bottom","top"];function ux(e,t,r){switch(e){case "top":case "bottom":return r?t?su:iu:t?iu:su;case "left":case "right":return t?cx:dx;default:return []}}function uu(e,t,r,o){let n=Mr(e),i=ux(Bt(e),r==="start",o);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(tn)))),i}function Uo(e){return e.replace(/left|right|bottom|top/g,t=>ix[t])}function px(e){return {top:0,right:0,bottom:0,left:0,...e}}function Ui(e){return typeof e!="number"?px(e):{top:e,right:e,bottom:e,left:e}}function Nr(e){let{x:t,y:r,width:o,height:n}=e;return {width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function pu(e,t,r){let{reference:o,floating:n}=e,i=Mt(t),s=nn(t),l=an(s),c=Bt(t),u=i==="y",d=o.x+o.width/2-n.width/2,m=o.y+o.height/2-n.height/2,v=o[l]/2-n[l]/2,g;switch(c){case "top":g={x:d,y:o.y-n.height};break;case "bottom":g={x:d,y:o.y+o.height};break;case "right":g={x:o.x+o.width,y:m};break;case "left":g={x:o.x-n.width,y:m};break;default:g={x:o.x,y:o.y};}switch(Mr(t)){case "start":g[s]-=v*(r&&u?-1:1);break;case "end":g[s]+=v*(r&&u?-1:1);break}return g}var gu=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:s}=r,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:m}=pu(u,o,c),v=o,g={},h=0;for(let p=0;p<l.length;p++){let{name:b,fn:x}=l[p],{x:y,y:C,data:R,reset:S}=await x({x:d,y:m,initialPlacement:o,placement:v,strategy:n,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});d=y!=null?y:d,m=C!=null?C:m,g={...g,[b]:{...g[b],...R}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(u=S.rects===true?await s.getElementRects({reference:e,floating:t,strategy:n}):S.rects),{x:d,y:m}=pu(u,v,c)),p=-1);}return {x:d,y:m,placement:v,strategy:n,middlewareData:g}};async function lo(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:v=false,padding:g=0}=Ht(t,e),h=Ui(g),b=l[v?m==="floating"?"reference":"floating":m],x=Nr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=m==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),R=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},S=Nr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:C,strategy:c}):y);return {top:(x.top-S.top+h.top)/R.y,bottom:(S.bottom-x.bottom+h.bottom)/R.y,left:(x.left-S.left+h.left)/R.x,right:(S.right-x.right+h.right)/R.x}}var vu=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Ht(e,t)||{};if(u==null)return {};let m=Ui(d),v={x:r,y:o},g=nn(n),h=an(g),p=await s.getDimensions(u),b=g==="y",x=b?"top":"left",y=b?"bottom":"right",C=b?"clientHeight":"clientWidth",R=i.reference[h]+i.reference[g]-v[g]-i.floating[h],S=v[g]-i.reference[g],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),M=k?k[C]:0;(!M||!await(s.isElement==null?void 0:s.isElement(k)))&&(M=l.floating[C]||i.floating[h]);let N=R/2-S/2,D=M/2-p[h]/2-1,P=zt(m[x],D),T=zt(m[y],D),O=P,A=M-p[h]-T,V=M/2-p[h]/2+N,L=rn(O,V,A),_=!c.arrow&&Mr(n)!=null&&V!==L&&i.reference[h]/2-(V<O?P:T)-p[h]/2<0,z=_?V<O?V-O:V-A:0;return {[g]:v[g]+z,data:{[g]:L,centerOffset:V-L-z,..._&&{alignmentOffset:z}},reset:_}}});var hu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=true,crossAxis:m=true,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=true,...b}=Ht(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return {};let x=Bt(n),y=Mt(l),C=Bt(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=v||(C||!p?[Uo(l)]:du(l)),k=h!=="none";!v&&k&&S.push(...uu(l,p,h,R));let M=[l,...S],N=await lo(t,b),D=[],P=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&D.push(N[x]),m){let V=cu(n,s,R);D.push(N[V[0]],N[V[1]]);}if(P=[...P,{placement:n,overflows:D}],!D.every(V=>V<=0)){var T,O;let V=(((T=i.flip)==null?void 0:T.index)||0)+1,L=M[V];if(L&&(!(m==="alignment"?y!==Mt(L):false)||P.every(E=>Mt(E.placement)===y?E.overflows[0]>0:true)))return {data:{index:V,overflows:P},reset:{placement:L}};let _=(O=P.filter(z=>z.overflows[0]<=0).sort((z,E)=>z.overflows[1]-E.overflows[1])[0])==null?void 0:O.placement;if(!_)switch(g){case "bestFit":{var A;let z=(A=P.filter(E=>{if(k){let I=Mt(E.placement);return I===y||I==="y"}return true}).map(E=>[E.placement,E.overflows.filter(I=>I>0).reduce((I,H)=>I+H,0)]).sort((E,I)=>E[1]-I[1])[0])==null?void 0:A[0];z&&(_=z);break}case "initialPlacement":_=l;break}if(n!==_)return {reset:{placement:_}}}return {}}}};function fu(e,t){return {top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mu(e){return lu.some(t=>e[t]>=0)}var bu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=Ht(e,t);switch(o){case "referenceHidden":{let i=await lo(t,{...n,elementContext:"reference"}),s=fu(i,r.reference);return {data:{referenceHiddenOffsets:s,referenceHidden:mu(s)}}}case "escaped":{let i=await lo(t,{...n,altBoundary:true}),s=fu(i,r.floating);return {data:{escapedOffsets:s,escaped:mu(s)}}}default:return {}}}}};var wu=new Set(["left","top"]);async function fx(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=Bt(r),l=Mr(r),c=Mt(r)==="y",u=wu.has(s)?-1:1,d=i&&c?-1:1,m=Ht(t,e),{mainAxis:v,crossAxis:g,alignmentAxis:h}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof h=="number"&&(g=l==="end"?h*-1:h),c?{x:g*d,y:v*u}:{x:v*u,y:g*d}}var xu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:i,placement:s,middlewareData:l}=t,c=await fx(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:n+c.x,y:i+c.y,data:{...c,placement:s}}}}},yu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n}=t,{mainAxis:i=true,crossAxis:s=false,limiter:l={fn:b=>{let{x,y}=b;return {x,y}}},...c}=Ht(e,t),u={x:r,y:o},d=await lo(t,c),m=Mt(Bt(n)),v=on(m),g=u[v],h=u[m];if(i){let b=v==="y"?"top":"left",x=v==="y"?"bottom":"right",y=g+d[b],C=g-d[x];g=rn(y,g,C);}if(s){let b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=h+d[b],C=h-d[x];h=rn(y,h,C);}let p=l.fn({...t,[v]:g,[m]:h});return {...p,data:{x:p.x-r,y:p.y-o,enabled:{[v]:i,[m]:s}}}}}},Ru=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=true,crossAxis:u=true}=Ht(e,t),d={x:r,y:o},m=Mt(n),v=on(m),g=d[v],h=d[m],p=Ht(l,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){let C=v==="y"?"height":"width",R=i.reference[v]-i.floating[C]+b.mainAxis,S=i.reference[v]+i.reference[C]-b.mainAxis;g<R?g=R:g>S&&(g=S);}if(u){var x,y;let C=v==="y"?"width":"height",R=wu.has(Bt(n)),S=i.reference[m]-i.floating[C]+(R&&((x=s.offset)==null?void 0:x[m])||0)+(R?0:b.crossAxis),k=i.reference[m]+i.reference[C]+(R?0:((y=s.offset)==null?void 0:y[m])||0)-(R?b.crossAxis:0);h<S?h=S:h>k&&(h=k);}return {[v]:g,[m]:h}}}},ku=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}=Ht(e,t),d=await lo(t,u),m=Bt(n),v=Mr(n),g=Mt(n)==="y",{width:h,height:p}=i.floating,b,x;m==="top"||m==="bottom"?(b=m,x=v===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=m,b=v==="end"?"top":"bottom");let y=p-d.top-d.bottom,C=h-d.left-d.right,R=zt(p-d[b],y),S=zt(h-d[x],C),k=!t.middlewareData.shift,M=R,N=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(M=y),k&&!v){let P=nt(d.left,0),T=nt(d.right,0),O=nt(d.top,0),A=nt(d.bottom,0);g?N=h-2*(P!==0||T!==0?P+T:nt(d.left,d.right)):M=p-2*(O!==0||A!==0?O+A:nt(d.top,d.bottom));}await c({...t,availableWidth:N,availableHeight:M});let D=await s.getDimensions(l.floating);return h!==D.width||p!==D.height?{reset:{rects:true}}:{}}}};function sn(){return typeof window!="undefined"}function Dr(e){return Pu(e)?(e.nodeName||"").toLowerCase():"#document"}function ut(e){var t;return (e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nt(e){var t;return (t=(Pu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pu(e){return sn()?e instanceof Node||e instanceof ut(e).Node:false}function kt(e){return sn()?e instanceof Element||e instanceof ut(e).Element:false}function Et(e){return sn()?e instanceof HTMLElement||e instanceof ut(e).HTMLElement:false}function Cu(e){return !sn()||typeof ShadowRoot=="undefined"?false:e instanceof ShadowRoot||e instanceof ut(e).ShadowRoot}var mx=new Set(["inline","contents"]);function co(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Ct(e);return /auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!mx.has(n)}var gx=new Set(["table","td","th"]);function Su(e){return gx.has(Dr(e))}var vx=[":popover-open",":modal"];function $o(e){return vx.some(t=>{try{return e.matches(t)}catch{return false}})}var hx=["transform","translate","scale","rotate","perspective"],bx=["transform","translate","scale","rotate","perspective","filter"],wx=["paint","layout","strict","content"];function ln(e){let t=cn(),r=kt(e)?Ct(e):e;return hx.some(o=>r[o]?r[o]!=="none":false)||(r.containerType?r.containerType!=="normal":false)||!t&&(r.backdropFilter?r.backdropFilter!=="none":false)||!t&&(r.filter?r.filter!=="none":false)||bx.some(o=>(r.willChange||"").includes(o))||wx.some(o=>(r.contain||"").includes(o))}function Tu(e){let t=er(e);for(;Et(t)&&!Lr(t);){if(ln(t))return t;if($o(t))return null;t=er(t);}return null}function cn(){return typeof CSS=="undefined"||!CSS.supports?false:CSS.supports("-webkit-backdrop-filter","none")}var xx=new Set(["html","body","#document"]);function Lr(e){return xx.has(Dr(e))}function Ct(e){return ut(e).getComputedStyle(e)}function qo(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(Dr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Cu(e)&&e.host||Nt(e);return Cu(t)?t.host:t}function Mu(e){let t=er(e);return Lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&co(t)?t:Mu(t)}function Er(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=true);let n=Mu(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),s=ut(n);if(i){let l=dn(s);return t.concat(s,s.visualViewport||[],co(n)?n:[],l&&r?Er(l):[])}return t.concat(n,Er(n,[],r))}function dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lu(e){let t=Ct(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Et(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o,l=Wo(r)!==i||Wo(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function Gi(e){return kt(e)?e:e.contextElement}function uo(e){let t=Gi(e);if(!Et(t))return Tt(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=Lu(t),s=(i?Wo(r.width):r.width)/o,l=(i?Wo(r.height):r.height)/n;return (!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var yx=Tt(0);function Iu(e){let t=ut(e);return !cn()||!t.visualViewport?yx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rx(e,t,r){return t===void 0&&(t=false),!r||t&&r!==ut(e)?false:t}function Ir(e,t,r,o){t===void 0&&(t=false),r===void 0&&(r=false);let n=e.getBoundingClientRect(),i=Gi(e),s=Tt(1);t&&(o?kt(o)&&(s=uo(o)):s=uo(e));let l=Rx(i,r,o)?Iu(i):Tt(0),c=(n.left+l.x)/s.x,u=(n.top+l.y)/s.y,d=n.width/s.x,m=n.height/s.y;if(i){let v=ut(i),g=o&&kt(o)?ut(o):o,h=v,p=dn(h);for(;p&&o&&g!==h;){let b=uo(p),x=p.getBoundingClientRect(),y=Ct(p),C=x.left+(p.clientLeft+parseFloat(y.paddingLeft))*b.x,R=x.top+(p.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,m*=b.y,c+=C,u+=R,h=ut(p),p=dn(h);}}return Nr({width:d,height:m,x:c,y:u})}function un(e,t){let r=qo(e).scrollLeft;return t?t.left+r:Ir(Nt(e)).left+r}function _u(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-un(e,r),n=r.top+t.scrollTop;return {x:o,y:n}}function kx(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",s=Nt(o),l=t?$o(t.floating):false;if(o===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Tt(1),d=Tt(0),m=Et(o);if((m||!m&&!i)&&((Dr(o)!=="body"||co(s))&&(c=qo(o)),Et(o))){let g=Ir(o);u=uo(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop;}let v=s&&!m&&!i?_u(s,c):Tt(0);return {width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+v.x,y:r.y*u.y-c.scrollTop*u.y+d.y+v.y}}function Cx(e){return Array.from(e.getClientRects())}function Px(e){let t=Nt(e),r=qo(e),o=e.ownerDocument.body,n=nt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=nt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+un(e),l=-r.scrollTop;return Ct(o).direction==="rtl"&&(s+=nt(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:l}}var Nu=25;function Sx(e,t){let r=ut(e),o=Nt(e),n=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,c=0;if(n){i=n.width,s=n.height;let d=cn();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop);}let u=un(o);if(u<=0){let d=o.ownerDocument,m=d.body,v=getComputedStyle(m),g=d.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,h=Math.abs(o.clientWidth-m.clientWidth-g);h<=Nu&&(i-=h);}else u<=Nu&&(i+=u);return {width:i,height:s,x:l,y:c}}var Tx=new Set(["absolute","fixed"]);function Mx(e,t){let r=Ir(e,true,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=Et(e)?uo(e):Tt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=n*i.x,u=o*i.y;return {width:s,height:l,x:c,y:u}}function Eu(e,t,r){let o;if(t==="viewport")o=Sx(e,r);else if(t==="document")o=Px(Nt(e));else if(kt(t))o=Mx(t,r);else {let n=Iu(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height};}return Nr(o)}function Ou(e,t){let r=er(e);return r===t||!kt(r)||Lr(r)?false:Ct(r).position==="fixed"||Ou(r,t)}function Nx(e,t){let r=t.get(e);if(r)return r;let o=Er(e,[],false).filter(l=>kt(l)&&Dr(l)!=="body"),n=null,i=Ct(e).position==="fixed",s=i?er(e):e;for(;kt(s)&&!Lr(s);){let l=Ct(s),c=ln(s);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&Tx.has(n.position)||co(s)&&!c&&Ou(e,s))?o=o.filter(d=>d!==s):n=l,s=er(s);}return t.set(e,o),o}function Ex(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?$o(t)?[]:Nx(t,this._c):[].concat(r),o],l=s[0],c=s.reduce((u,d)=>{let m=Eu(t,d,n);return u.top=nt(m.top,u.top),u.right=zt(m.right,u.right),u.bottom=zt(m.bottom,u.bottom),u.left=nt(m.left,u.left),u},Eu(t,l,n));return {width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Dx(e){let{width:t,height:r}=Lu(e);return {width:t,height:r}}function Lx(e,t,r){let o=Et(t),n=Nt(t),i=r==="fixed",s=Ir(e,true,i,t),l={scrollLeft:0,scrollTop:0},c=Tt(0);function u(){c.x=un(n);}if(o||!o&&!i)if((Dr(t)!=="body"||co(n))&&(l=qo(t)),o){let g=Ir(t,true,i,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop;}else n&&u();i&&!o&&n&&u();let d=n&&!o&&!i?_u(n,l):Tt(0),m=s.left+l.scrollLeft-c.x-d.x,v=s.top+l.scrollTop-c.y-d.y;return {x:m,y:v,width:s.width,height:s.height}}function Wi(e){return Ct(e).position==="static"}function Du(e,t){if(!Et(e)||Ct(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Nt(e)===r&&(r=r.ownerDocument.body),r}function Au(e,t){let r=ut(e);if($o(e))return r;if(!Et(e)){let n=er(e);for(;n&&!Lr(n);){if(kt(n)&&!Wi(n))return n;n=er(n);}return r}let o=Du(e,t);for(;o&&Su(o)&&Wi(o);)o=Du(o,t);return o&&Lr(o)&&Wi(o)&&!ln(o)?r:o||Tu(e)||r}var Ix=async function(e){let t=this.getOffsetParent||Au,r=this.getDimensions,o=await r(e.floating);return {reference:Lx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function _x(e){return Ct(e).direction==="rtl"}var Fu={convertOffsetParentRelativeRectToViewportRelativeRect:kx,getDocumentElement:Nt,getClippingRect:Ex,getOffsetParent:Au,getElementRects:Ix,getClientRects:Cx,getDimensions:Dx,getScale:uo,isElement:kt,isRTL:_x};function zu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ox(e,t){let r=null,o,n=Nt(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null;}function s(l,c){l===void 0&&(l=false),c===void 0&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:m,width:v,height:g}=u;if(l||t(),!v||!g)return;let h=Go(m),p=Go(n.clientWidth-(d+v)),b=Go(n.clientHeight-(m+g)),x=Go(d),C={rootMargin:-h+"px "+-p+"px "+-b+"px "+-x+"px",threshold:nt(0,zt(1,c))||1},R=true;function S(k){let M=k[0].intersectionRatio;if(M!==c){if(!R)return s();M?s(false,M):o=setTimeout(()=>{s(false,1e-7);},1e3);}M===1&&!zu(u,e.getBoundingClientRect())&&s(),R=false;}try{r=new IntersectionObserver(S,{...C,root:n.ownerDocument});}catch{r=new IntersectionObserver(S,C);}r.observe(e);}return s(true),i}function $i(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=true,ancestorResize:i=true,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=false}=o,u=Gi(e),d=n||i?[...u?Er(u):[],...Er(t)]:[];d.forEach(x=>{n&&x.addEventListener("scroll",r,{passive:true}),i&&x.addEventListener("resize",r);});let m=u&&l?Ox(u,r):null,v=-1,g=null;s&&(g=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t);})),r();}),u&&!c&&g.observe(u),g.observe(t));let h,p=c?Ir(e):null;c&&b();function b(){let x=Ir(e);p&&!zu(p,x)&&r(),p=x,h=requestAnimationFrame(b);}return r(),()=>{var x;d.forEach(y=>{n&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r);}),m==null||m(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(h);}}var Hu=xu;var Bu=yu,Vu=hu,ju=ku,Uu=bu,qi=vu;var Wu=Ru,Ki=(e,t,r)=>{let o=new Map,n={platform:Fu,...r},i={...n.platform,_c:o};return gu(e,t,{...n,platform:i})};var Fx=typeof document!="undefined",zx=function(){},pn=Fx?X.useLayoutEffect:zx;function fn(e,t){if(e===t)return true;if(typeof e!=typeof t)return false;if(typeof e=="function"&&e.toString()===t.toString())return true;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return false;for(o=r;o--!==0;)if(!fn(e[o],t[o]))return false;return true}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return false;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return false;for(o=r;o--!==0;){let i=n[o];if(!(i==="_owner"&&e.$$typeof)&&!fn(e[i],t[i]))return false}return true}return e!==e&&t!==t}function qu(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gu(e,t){let r=qu(e);return Math.round(t*r)/r}function Yi(e){let t=X__namespace.useRef(e);return pn(()=>{t.current=e;}),t}function Ku(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:s}={},transform:l=true,whileElementsMounted:c,open:u}=e,[d,m]=X__namespace.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:false}),[v,g]=X__namespace.useState(o);fn(v,o)||g(o);let[h,p]=X__namespace.useState(null),[b,x]=X__namespace.useState(null),y=X__namespace.useCallback(E=>{E!==k.current&&(k.current=E,p(E));},[]),C=X__namespace.useCallback(E=>{E!==M.current&&(M.current=E,x(E));},[]),R=i||h,S=s||b,k=X__namespace.useRef(null),M=X__namespace.useRef(null),N=X__namespace.useRef(d),D=c!=null,P=Yi(c),T=Yi(n),O=Yi(u),A=X__namespace.useCallback(()=>{if(!k.current||!M.current)return;let E={placement:t,strategy:r,middleware:v};T.current&&(E.platform=T.current),Ki(k.current,M.current,E).then(I=>{let H={...I,isPositioned:O.current!==false};V.current&&!fn(N.current,H)&&(N.current=H,Wd__namespace.flushSync(()=>{m(H);}));});},[v,t,r,T,O]);pn(()=>{u===false&&N.current.isPositioned&&(N.current.isPositioned=false,m(E=>({...E,isPositioned:false})));},[u]);let V=X__namespace.useRef(false);pn(()=>(V.current=true,()=>{V.current=false;}),[]),pn(()=>{if(R&&(k.current=R),S&&(M.current=S),R&&S){if(P.current)return P.current(R,S,A);A();}},[R,S,A,P,D]);let L=X__namespace.useMemo(()=>({reference:k,floating:M,setReference:y,setFloating:C}),[y,C]),_=X__namespace.useMemo(()=>({reference:R,floating:S}),[R,S]),z=X__namespace.useMemo(()=>{let E={position:r,left:0,top:0};if(!_.floating)return E;let I=Gu(_.floating,d.x),H=Gu(_.floating,d.y);return l?{...E,transform:"translate("+I+"px, "+H+"px)",...qu(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:I,top:H}},[r,l,_.floating,d.x,d.y]);return X__namespace.useMemo(()=>({...d,update:A,refs:L,elements:_,floatingStyles:z}),[d,A,L,_,z])}var Hx=e=>{function t(r){return {}.hasOwnProperty.call(r,"current")}return {name:"arrow",options:e,fn(r){let{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?qi({element:o.current,padding:n}).fn(r):{}:o?qi({element:o,padding:n}).fn(r):{}}}},Yu=(e,t)=>({...Hu(e),options:[e,t]}),Xu=(e,t)=>({...Bu(e),options:[e,t]}),Ju=(e,t)=>({...Wu(e),options:[e,t]}),Zu=(e,t)=>({...Vu(e),options:[e,t]}),Qu=(e,t)=>({...ju(e),options:[e,t]});var ep=(e,t)=>({...Uu(e),options:[e,t]});var tp=(e,t)=>({...Hx(e),options:[e,t]});var Bx="Arrow",ap=X__namespace.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...i}=e;return jsxRuntime.jsx(Me.svg,{...i,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});ap.displayName=Bx;var np=ap;function sp(e){let[t,r]=X__namespace.useState(void 0);return dt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let i=n[0],s,l;if("borderBoxSize"in i){let c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize;}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l});});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0);},[e]),t}var Xi="Popper",[lp,Ji]=Ft(Xi),[jx,cp]=lp(Xi);var up="PopperAnchor",pp=X__namespace.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,i=cp(up,r),s=X__namespace.useRef(null),l=Oe(t,s),c=X__namespace.useRef(null);return X__namespace.useEffect(()=>{let u=c.current;c.current=(o==null?void 0:o.current)||s.current,u!==c.current&&i.onAnchorChange(c.current);}),o?null:jsxRuntime.jsx(Me.div,{...n,ref:l})});pp.displayName=up;var Zi="PopperContent",[Ux,Wx]=lp(Zi),fp=X__namespace.forwardRef((e,t)=>{var q,le,ee,ae,he,ve,K,ce;let{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=true,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:v=false,updatePositionStrategy:g="optimized",onPlaced:h,...p}=e,b=cp(Zi,r),[x,y]=X__namespace.useState(null),C=Oe(t,fe=>y(fe)),[R,S]=X__namespace.useState(null),k=sp(R),M=(q=k==null?void 0:k.width)!=null?q:0,N=(le=k==null?void 0:k.height)!=null?le:0,D=o+(i!=="center"?"-"+i:""),P=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],O=T.length>0,A={padding:P,boundary:T.filter($x),altBoundary:O},{refs:V,floatingStyles:L,placement:_,isPositioned:z,middlewareData:E}=Ku({strategy:"fixed",placement:D,whileElementsMounted:(...fe)=>$i(...fe,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[Yu({mainAxis:n+N,alignmentAxis:s}),c&&Xu({mainAxis:true,crossAxis:false,limiter:m==="partial"?Ju():void 0,...A}),c&&Zu({...A}),Qu({...A,apply:({elements:fe,rects:we,availableWidth:ke,availableHeight:ie})=>{let{width:ne,height:xe}=we.reference,de=fe.floating.style;de.setProperty("--radix-popper-available-width",`${ke}px`),de.setProperty("--radix-popper-available-height",`${ie}px`),de.setProperty("--radix-popper-anchor-width",`${ne}px`),de.setProperty("--radix-popper-anchor-height",`${xe}px`);}}),R&&tp({element:R,padding:l}),qx({arrowWidth:M,arrowHeight:N}),v&&ep({strategy:"referenceHidden",...A})]}),[I,H]=vp(_),j=Je(h);dt(()=>{z&&(j==null||j());},[z,j]);let U=(ee=E.arrow)==null?void 0:ee.x,W=(ae=E.arrow)==null?void 0:ae.y,G=((he=E.arrow)==null?void 0:he.centerOffset)!==0,[B,Z]=X__namespace.useState();return dt(()=>{x&&Z(window.getComputedStyle(x).zIndex);},[x]),jsxRuntime.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:z?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(ve=E.transformOrigin)==null?void 0:ve.x,(K=E.transformOrigin)==null?void 0:K.y].join(" "),...((ce=E.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(Ux,{scope:r,placedSide:I,onArrowChange:S,arrowX:U,arrowY:W,shouldHideArrow:G,children:jsxRuntime.jsx(Me.div,{"data-side":I,"data-align":H,...p,ref:C,style:{...p.style,animation:z?void 0:"none"}})})})});fp.displayName=Zi;var mp="PopperArrow",Gx={top:"bottom",right:"left",bottom:"top",left:"right"},gp=X__namespace.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,i=Wx(mp,o),s=Gx[i.placedSide];return jsxRuntime.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(np,{...n,ref:r,style:{...n.style,display:"block"}})})});gp.displayName=mp;function $x(e){return e!==null}var qx=e=>({name:"transformOrigin",options:e,fn(t){var b,x,y,C,R;let{placement:r,rects:o,middlewareData:n}=t,s=((b=n.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=vp(r),m={start:"0%",center:"50%",end:"100%"}[d],v=((y=(x=n.arrow)==null?void 0:x.x)!=null?y:0)+l/2,g=((R=(C=n.arrow)==null?void 0:C.y)!=null?R:0)+c/2,h="",p="";return u==="bottom"?(h=s?m:`${v}px`,p=`${-c}px`):u==="top"?(h=s?m:`${v}px`,p=`${o.floating.height+c}px`):u==="right"?(h=`${-c}px`,p=s?m:`${g}px`):u==="left"&&(h=`${o.floating.width+c}px`,p=s?m:`${g}px`),{data:{x:h,y:p}}}});function vp(e){let[t,r="center"]=e.split("-");return [t,r]}var hp=pp,bp=fp,wp=gp;var Jx="Portal",es=X__namespace.forwardRef((e,t)=>{var l;let{container:r,...o}=e,[n,i]=X__namespace.useState(false);dt(()=>i(true),[]);let s=r||n&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Wd__namespace.default.createPortal(jsxRuntime.jsx(Me.div,{...o,ref:t}),s):null});es.displayName=Jx;function Zx(e,t){return X__namespace.useReducer((r,o)=>{let n=t[r][o];return n!=null?n:r},e)}var po=e=>{let{present:t,children:r}=e,o=Qx(t),n=typeof r=="function"?r({present:o.isPresent}):X__namespace.Children.only(r),i=Oe(o.ref,ey(n));return typeof r=="function"||o.isPresent?X__namespace.cloneElement(n,{ref:i}):null};po.displayName="Presence";function Qx(e){let[t,r]=X__namespace.useState(),o=X__namespace.useRef(null),n=X__namespace.useRef(e),i=X__namespace.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Zx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X__namespace.useEffect(()=>{let u=gn(o.current);i.current=l==="mounted"?u:"none";},[l]),dt(()=>{let u=o.current,d=n.current;if(d!==e){let v=i.current,g=gn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&v!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=e;}},[e,c]),dt(()=>{var u;if(t){let d,m=(u=t.ownerDocument.defaultView)!=null?u:window,v=h=>{let b=gn(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&b&&(c("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x);});}},g=h=>{h.target===t&&(i.current=gn(o.current));};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v);}}else c("ANIMATION_END");},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:X__namespace.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u);},[])}}function gn(e){return (e==null?void 0:e.animationName)||"none"}function ey(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ts="rovingFocusGroup.onEntryFocus",ty={bubbles:false,cancelable:true},Ko="RovingFocusGroup",[rs,yp,ry]=Za(Ko),[oy,os]=Ft(Ko,[ry]),[ay,ny]=oy(Ko),Rp=X__namespace.forwardRef((e,t)=>jsxRuntime.jsx(rs.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(rs.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(iy,{...e,ref:t})})}));Rp.displayName=Ko;var iy=X__namespace.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:n=false,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=false,...m}=e,v=X__namespace.useRef(null),g=Oe(t,v),h=en(i),[p,b]=Ya({prop:s,defaultProp:l!=null?l:null,onChange:c,caller:Ko}),[x,y]=X__namespace.useState(false),C=Je(u),R=yp(r),S=X__namespace.useRef(false),[k,M]=X__namespace.useState(0);return X__namespace.useEffect(()=>{let N=v.current;if(N)return N.addEventListener(ts,C),()=>N.removeEventListener(ts,C)},[C]),jsxRuntime.jsx(ay,{scope:r,orientation:o,dir:h,loop:n,currentTabStopId:p,onItemFocus:X__namespace.useCallback(N=>b(N),[b]),onItemShiftTab:X__namespace.useCallback(()=>y(true),[]),onFocusableItemAdd:X__namespace.useCallback(()=>M(N=>N+1),[]),onFocusableItemRemove:X__namespace.useCallback(()=>M(N=>N-1),[]),children:jsxRuntime.jsx(Me.div,{tabIndex:x||k===0?-1:0,"data-orientation":o,...m,ref:g,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{S.current=true;}),onFocus:me(e.onFocus,N=>{let D=!S.current;if(N.target===N.currentTarget&&D&&!x){let P=new CustomEvent(ts,ty);if(N.currentTarget.dispatchEvent(P),!P.defaultPrevented){let T=R().filter(_=>_.focusable),O=T.find(_=>_.active),A=T.find(_=>_.id===p),L=[O,A,...T].filter(Boolean).map(_=>_.ref.current);Pp(L,d);}}S.current=false;}),onBlur:me(e.onBlur,()=>y(false))})})}),kp="RovingFocusGroupItem",Cp=X__namespace.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=true,active:n=false,tabStopId:i,children:s,...l}=e,c=dr(),u=i||c,d=ny(kp,r),m=d.currentTabStopId===u,v=yp(r),{onFocusableItemAdd:g,onFocusableItemRemove:h,currentTabStopId:p}=d;return X__namespace.useEffect(()=>{if(o)return g(),()=>h()},[o,g,h]),jsxRuntime.jsx(rs.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:jsxRuntime.jsx(Me.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:me(e.onMouseDown,b=>{o?d.onItemFocus(u):b.preventDefault();}),onFocus:me(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:me(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;let x=cy(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let C=v().filter(R=>R.focusable).map(R=>R.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();let R=C.indexOf(b.currentTarget);C=d.loop?dy(C,R+1):C.slice(R+1);}setTimeout(()=>Pp(C));}}),children:typeof s=="function"?s({isCurrentTabStop:m,hasTabStop:p!=null}):s})})});Cp.displayName=kp;var sy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ly(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cy(e,t,r){let o=ly(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return sy[o]}function Pp(e,t=false){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function dy(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Sp=Rp,Tp=Cp;var py=function(e){if(typeof document=="undefined")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fo=new WeakMap,vn=new WeakMap,hn={},as=0,Mp=function(e){return e&&(e.host||Mp(e.parentNode))},fy=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=Mp(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return !!r})},my=function(e,t,r,o){var n=fy(t,Array.isArray(e)?e:[e]);hn[r]||(hn[r]=new WeakMap);var i=hn[r],s=[],l=new Set,c=new Set(n),u=function(m){!m||l.has(m)||(l.add(m),u(m.parentNode));};n.forEach(u);var d=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(v){if(l.has(v))d(v);else try{var g=v.getAttribute(o),h=g!==null&&g!=="false",p=(fo.get(v)||0)+1,b=(i.get(v)||0)+1;fo.set(v,p),i.set(v,b),s.push(v),p===1&&h&&vn.set(v,!0),b===1&&v.setAttribute(r,"true"),h||v.setAttribute(o,"true");}catch(x){console.error("aria-hidden: cannot operate on ",v,x);}});};return d(t),l.clear(),as++,function(){s.forEach(function(m){var v=fo.get(m)-1,g=i.get(m)-1;fo.set(m,v),i.set(m,g),v||(vn.has(m)||m.removeAttribute(o),vn.delete(m)),g||m.removeAttribute(r);}),as--,as||(fo=new WeakMap,fo=new WeakMap,vn=new WeakMap,hn={});}},Np=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=py(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),my(o,n,r,"aria-hidden")):function(){return null}};var mt=function(){return mt=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);}return t},mt.apply(this,arguments)};function bn(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function Ep(e,t,r){for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var Ar="right-scroll-bar-position",Fr="width-before-scroll-bar",ns="with-scroll-bars-hidden",is="--removed-body-scroll-bar-size";function wn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dp(e,t){var r=X.useState(function(){return {value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n));}}}})[0];return r.callback=t,r.facade}var vy=typeof window!="undefined"?X__namespace.useLayoutEffect:X__namespace.useEffect,Lp=new WeakMap;function ss(e,t){var r=Dp(null,function(o){return e.forEach(function(n){return wn(n,o)})});return vy(function(){var o=Lp.get(r);if(o){var n=new Set(o),i=new Set(e),s=r.current;n.forEach(function(l){i.has(l)||wn(l,null);}),i.forEach(function(l){n.has(l)||wn(l,s);});}Lp.set(r,e);},[e]),r}function hy(e){return e}function by(e,t){t===void 0&&(t=hy);var r=[],o=false,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,o);return r.push(s),function(){r=r.filter(function(l){return l!==s});}},assignSyncMedium:function(i){for(o=true;r.length;){var s=r;r=[],s.forEach(i);}r={push:function(l){return i(l)},filter:function(){return r}};},assignMedium:function(i){o=true;var s=[];if(r.length){var l=r;r=[],l.forEach(i),s=r;}var c=function(){var d=s;s=[],d.forEach(i);},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){s.push(d),u();},filter:function(d){return s=s.filter(d),r}};}};return n}function ls(e){e===void 0&&(e={});var t=by(null);return t.options=mt({async:true,ssr:false},e),t}var _p=function(e){var t=e.sideCar,r=bn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return X__namespace.createElement(o,mt({},r))};_p.isSideCarExport=true;function cs(e,t){return e.useMedium(t),_p}var yn=ls();var ds=function(){},Yo=X__namespace.forwardRef(function(e,t){var r=X__namespace.useRef(null),o=X__namespace.useState({onScrollCapture:ds,onWheelCapture:ds,onTouchMoveCapture:ds}),n=o[0],i=o[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,m=e.shards,v=e.sideCar,g=e.noRelative,h=e.noIsolation,p=e.inert,b=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,C=e.gapMode,R=bn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=v,k=ss([r,t]),M=mt(mt({},R),n);return X__namespace.createElement(X__namespace.Fragment,null,d&&X__namespace.createElement(S,{sideCar:yn,removeScrollBar:u,shards:m,noRelative:g,noIsolation:h,inert:p,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:C}),s?X__namespace.cloneElement(X__namespace.Children.only(l),mt(mt({},M),{ref:k})):X__namespace.createElement(y,mt({},M,{className:c,ref:k}),l))});Yo.defaultProps={enabled:true,removeScrollBar:true,inert:false};Yo.classNames={fullWidth:Fr,zeroRight:Ar};var Ap=function(){if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function wy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ap();return t&&e.setAttribute("nonce",t),e}function xy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t));}function yy(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e);}var us=function(){var e=0,t=null;return {add:function(r){e==0&&(t=wy())&&(xy(t,r),yy(t)),e++;},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null);}}};var ps=function(){var e=us();return function(t,r){X__namespace.useEffect(function(){return e.add(t),function(){e.remove();}},[t&&r]);}};var Xo=function(){var e=ps(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var Ry={left:0,top:0,right:0,gap:0},fs=function(e){return parseInt(e||"",10)||0},ky=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return [fs(r),fs(o),fs(n)]},ms=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Ry;var t=ky(e),r=document.documentElement.clientWidth,o=window.innerWidth;return {left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var Cy=Xo(),mo="data-scroll-locked",Py=function(e,t,r,o){var n=e.left,i=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),`
9
- .`.concat(ns,` {
10
- overflow: hidden `).concat(o,`;
11
- padding-right: `).concat(l,"px ").concat(o,`;
12
- }
13
- body[`).concat(mo,`] {
14
- overflow: hidden `).concat(o,`;
15
- overscroll-behavior: contain;
16
- `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
17
- padding-left: `.concat(n,`px;
18
- padding-top: `).concat(i,`px;
19
- padding-right: `).concat(s,`px;
20
- margin-left:0;
21
- margin-top:0;
22
- margin-right: `).concat(l,"px ").concat(o,`;
23
- `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
24
- }
25
-
26
- .`).concat(Ar,` {
27
- right: `).concat(l,"px ").concat(o,`;
28
- }
29
-
30
- .`).concat(Fr,` {
31
- margin-right: `).concat(l,"px ").concat(o,`;
32
- }
33
-
34
- .`).concat(Ar," .").concat(Ar,` {
35
- right: 0 `).concat(o,`;
36
- }
37
-
38
- .`).concat(Fr," .").concat(Fr,` {
39
- margin-right: 0 `).concat(o,`;
40
- }
41
-
42
- body[`).concat(mo,`] {
43
- `).concat(is,": ").concat(l,`px;
44
- }
45
- `)},zp=function(){var e=parseInt(document.body.getAttribute(mo)||"0",10);return isFinite(e)?e:0},Sy=function(){X__namespace.useEffect(function(){return document.body.setAttribute(mo,(zp()+1).toString()),function(){var e=zp()-1;e<=0?document.body.removeAttribute(mo):document.body.setAttribute(mo,e.toString());}},[]);},gs=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;Sy();var i=X__namespace.useMemo(function(){return ms(n)},[n]);return X__namespace.createElement(Cy,{styles:Py(i,!t,n,r?"":"!important")})};var vs=false;if(typeof window!="undefined")try{Jo=Object.defineProperty({},"passive",{get:function(){return vs=!0,!0}}),window.addEventListener("test",Jo,Jo),window.removeEventListener("test",Jo,Jo);}catch{vs=false;}var Jo,zr=vs?{passive:false}:false;var Ty=function(e){return e.tagName==="TEXTAREA"},Hp=function(e,t){if(!(e instanceof Element))return false;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ty(e)&&r[t]==="visible")},My=function(e){return Hp(e,"overflowY")},Ny=function(e){return Hp(e,"overflowX")},hs=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot!="undefined"&&o instanceof ShadowRoot&&(o=o.host);var n=Bp(e,o);if(n){var i=Vp(e,o),s=i[1],l=i[2];if(s>l)return true}o=o.parentNode;}while(o&&o!==r.body);return false},Ey=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return [t,r,o]},Dy=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return [t,r,o]},Bp=function(e,t){return e==="v"?My(t):Ny(t)},Vp=function(e,t){return e==="v"?Ey(t):Dy(t)},Ly=function(e,t){return e==="h"&&t==="rtl"?-1:1},jp=function(e,t,r,o,n){var i=Ly(e,window.getComputedStyle(t).direction),s=i*o,l=r.target,c=t.contains(l),u=false,d=s>0,m=0,v=0;do{if(!l)break;var g=Vp(e,l),h=g[0],p=g[1],b=g[2],x=p-b-i*h;(h||x)&&Bp(e,l)&&(m+=x,v+=h);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y;}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return (d&&(Math.abs(m)<1||false)||!d&&(Math.abs(v)<1||false))&&(u=true),u};var Rn=function(e){return "changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Up=function(e){return [e.deltaX,e.deltaY]},Wp=function(e){return e&&"current"in e?e.current:e},Iy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_y=function(e){return `
46
- .block-interactivity-`.concat(e,` {pointer-events: none;}
47
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
48
- `)},Oy=0,vo=[];function Gp(e){var t=X__namespace.useRef([]),r=X__namespace.useRef([0,0]),o=X__namespace.useRef(),n=X__namespace.useState(Oy++)[0],i=X__namespace.useState(Xo)[0],s=X__namespace.useRef(e);X__namespace.useEffect(function(){s.current=e;},[e]),X__namespace.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var p=Ep([e.lockRef.current],(e.shards||[]).map(Wp)).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(n))});}}},[e.inert,e.lockRef.current,e.shards]);var l=X__namespace.useCallback(function(p,b){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return !s.current.allowPinchZoom;var x=Rn(p),y=r.current,C="deltaX"in p?p.deltaX:y[0]-x[0],R="deltaY"in p?p.deltaY:y[1]-x[1],S,k=p.target,M=Math.abs(C)>Math.abs(R)?"h":"v";if("touches"in p&&M==="h"&&k.type==="range")return false;var N=hs(M,k);if(!N)return true;if(N?S=M:(S=M==="v"?"h":"v",N=hs(M,k)),!N)return false;if(!o.current&&"changedTouches"in p&&(C||R)&&(o.current=S),!S)return true;var D=o.current||S;return jp(D,b,p,D==="h"?C:R)},[]),c=X__namespace.useCallback(function(p){var b=p;if(!(!vo.length||vo[vo.length-1]!==i)){var x="deltaY"in b?Up(b):Rn(b),y=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&Iy(S.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var C=(s.current.shards||[]).map(Wp).filter(Boolean).filter(function(S){return S.contains(b.target)}),R=C.length>0?l(b,C[0]):!s.current.noIsolation;R&&b.cancelable&&b.preventDefault();}}},[]),u=X__namespace.useCallback(function(p,b,x,y){var C={name:p,delta:b,target:x,should:y,shadowParent:Ay(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(R){return R!==C});},1);},[]),d=X__namespace.useCallback(function(p){r.current=Rn(p),o.current=void 0;},[]),m=X__namespace.useCallback(function(p){u(p.type,Up(p),p.target,l(p,e.lockRef.current));},[]),v=X__namespace.useCallback(function(p){u(p.type,Rn(p),p.target,l(p,e.lockRef.current));},[]);X__namespace.useEffect(function(){return vo.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",c,zr),document.addEventListener("touchmove",c,zr),document.addEventListener("touchstart",d,zr),function(){vo=vo.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,zr),document.removeEventListener("touchmove",c,zr),document.removeEventListener("touchstart",d,zr);}},[]);var g=e.removeScrollBar,h=e.inert;return X__namespace.createElement(X__namespace.Fragment,null,h?X__namespace.createElement(i,{styles:_y(n)}):null,g?X__namespace.createElement(gs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ay(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var $p=cs(yn,Gp);var qp=X__namespace.forwardRef(function(e,t){return X__namespace.createElement(Yo,mt({},e,{ref:t,sideCar:$p}))});qp.classNames=Yo.classNames;var bs=qp;var ws=["Enter"," "],Fy=["ArrowDown","PageUp","Home"],Yp=["ArrowUp","PageDown","End"],zy=[...Fy,...Yp],Hy={ltr:[...ws,"ArrowRight"],rtl:[...ws,"ArrowLeft"]},By={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ta="Menu",[Qo,Vy,jy]=Za(ta),[Hr,xs]=Ft(ta,[jy,Ji,os]),ra=Ji(),Xp=os(),[Jp,ur]=Hr(ta),[Uy,oa]=Hr(ta);var Wy="MenuAnchor",ys=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=ra(r);return jsxRuntime.jsx(hp,{...n,...o,ref:t})});ys.displayName=Wy;var Rs="MenuPortal",[Gy,Qp]=Hr(Rs,{forceMount:void 0});var Pt="MenuContent",[$y,ks]=Hr(Pt),tf=X__namespace.forwardRef((e,t)=>{let r=Qp(Pt,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,i=ur(Pt,e.__scopeMenu),s=oa(Pt,e.__scopeMenu);return jsxRuntime.jsx(Qo.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(po,{present:o||i.open,children:jsxRuntime.jsx(Qo.Slot,{scope:e.__scopeMenu,children:s.modal?jsxRuntime.jsx(qy,{...n,ref:t}):jsxRuntime.jsx(Ky,{...n,ref:t})})})})}),qy=X__namespace.forwardRef((e,t)=>{let r=ur(Pt,e.__scopeMenu),o=X__namespace.useRef(null),n=Oe(t,o);return X__namespace.useEffect(()=>{let i=o.current;if(i)return Np(i)},[]),jsxRuntime.jsx(Cs,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:true,onFocusOutside:me(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:false}),onDismiss:()=>r.onOpenChange(false)})}),Ky=X__namespace.forwardRef((e,t)=>{let r=ur(Pt,e.__scopeMenu);return jsxRuntime.jsx(Cs,{...e,ref:t,trapFocus:false,disableOutsidePointerEvents:false,disableOutsideScroll:false,onDismiss:()=>r.onOpenChange(false)})}),Yy=ir("MenuContent.ScrollLock"),Cs=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,loop:o=false,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:v,onDismiss:g,disableOutsideScroll:h,...p}=e,b=ur(Pt,r),x=oa(Pt,r),y=ra(r),C=Xp(r),R=Vy(r),[S,k]=X__namespace.useState(null),M=X__namespace.useRef(null),N=Oe(t,M,b.onContentChange),D=X__namespace.useRef(0),P=X__namespace.useRef(""),T=X__namespace.useRef(0),O=X__namespace.useRef(null),A=X__namespace.useRef("right"),V=X__namespace.useRef(0),L=h?bs:X__namespace.Fragment,_=h?{as:Yy,allowPinchZoom:true}:void 0,z=I=>{var q,le;let H=P.current+I,j=R().filter(ee=>!ee.disabled),U=document.activeElement,W=(q=j.find(ee=>ee.ref.current===U))==null?void 0:q.textValue,G=j.map(ee=>ee.textValue),B=l0(G,H,W),Z=(le=j.find(ee=>ee.textValue===B))==null?void 0:le.ref.current;((function ee(ae){P.current=ae,window.clearTimeout(D.current),ae!==""&&(D.current=window.setTimeout(()=>ee(""),1e3));}))(H),Z&&setTimeout(()=>Z.focus());};X__namespace.useEffect(()=>()=>window.clearTimeout(D.current),[]),eu();let E=X__namespace.useCallback(I=>{var j,U;return A.current===((j=O.current)==null?void 0:j.side)&&d0(I,(U=O.current)==null?void 0:U.area)},[]);return jsxRuntime.jsx($y,{scope:r,searchRef:P,onItemEnter:X__namespace.useCallback(I=>{E(I)&&I.preventDefault();},[E]),onItemLeave:X__namespace.useCallback(I=>{var H;E(I)||((H=M.current)==null||H.focus(),k(null));},[E]),onTriggerLeave:X__namespace.useCallback(I=>{E(I)&&I.preventDefault();},[E]),pointerGraceTimerRef:T,onPointerGraceIntentChange:X__namespace.useCallback(I=>{O.current=I;},[]),children:jsxRuntime.jsx(L,{..._,children:jsxRuntime.jsx(Vi,{asChild:true,trapped:n,onMountAutoFocus:me(i,I=>{var H;I.preventDefault(),(H=M.current)==null||H.focus({preventScroll:true});}),onUnmountAutoFocus:s,children:jsxRuntime.jsx(Fi,{asChild:true,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:v,onDismiss:g,children:jsxRuntime.jsx(Sp,{asChild:true,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:k,onEntryFocus:me(c,I=>{x.isUsingKeyboardRef.current||I.preventDefault();}),preventScrollOnEntryFocus:true,children:jsxRuntime.jsx(bp,{role:"menu","aria-orientation":"vertical","data-state":bf(b.open),"data-radix-menu-content":"",dir:x.dir,...y,...p,ref:N,style:{outline:"none",...p.style},onKeyDown:me(p.onKeyDown,I=>{let j=I.target.closest("[data-radix-menu-content]")===I.currentTarget,U=I.ctrlKey||I.altKey||I.metaKey,W=I.key.length===1;j&&(I.key==="Tab"&&I.preventDefault(),!U&&W&&z(I.key));let G=M.current;if(I.target!==G||!zy.includes(I.key))return;I.preventDefault();let Z=R().filter(q=>!q.disabled).map(q=>q.ref.current);Yp.includes(I.key)&&Z.reverse(),i0(Z);}),onBlur:me(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(D.current),P.current="");}),onPointerMove:me(e.onPointerMove,ea(I=>{let H=I.target,j=V.current!==I.clientX;if(I.currentTarget.contains(H)&&j){let U=I.clientX>V.current?"right":"left";A.current=U,V.current=I.clientX;}}))})})})})})})});tf.displayName=Pt;var Xy="MenuGroup",Ps=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return jsxRuntime.jsx(Me.div,{role:"group",...o,ref:t})});Ps.displayName=Xy;var Jy="MenuLabel",rf=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return jsxRuntime.jsx(Me.div,{...o,ref:t})});rf.displayName=Jy;var Cn="MenuItem",Kp="menu.itemSelect",Sn=X__namespace.forwardRef((e,t)=>{let{disabled:r=false,onSelect:o,...n}=e,i=X__namespace.useRef(null),s=oa(Cn,e.__scopeMenu),l=ks(Cn,e.__scopeMenu),c=Oe(t,i),u=X__namespace.useRef(false),d=()=>{let m=i.current;if(!r&&m){let v=new CustomEvent(Kp,{bubbles:true,cancelable:true});m.addEventListener(Kp,g=>o==null?void 0:o(g),{once:true}),Ja(m,v),v.defaultPrevented?u.current=false:s.onClose();}};return jsxRuntime.jsx(of,{...n,ref:c,disabled:r,onClick:me(e.onClick,d),onPointerDown:m=>{var v;(v=e.onPointerDown)==null||v.call(e,m),u.current=true;},onPointerUp:me(e.onPointerUp,m=>{var v;u.current||(v=m.currentTarget)==null||v.click();}),onKeyDown:me(e.onKeyDown,m=>{let v=l.searchRef.current!=="";r||v&&m.key===" "||ws.includes(m.key)&&(m.currentTarget.click(),m.preventDefault());})})});Sn.displayName=Cn;var of=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=false,textValue:n,...i}=e,s=ks(Cn,r),l=Xp(r),c=X__namespace.useRef(null),u=Oe(t,c),[d,m]=X__namespace.useState(false),[v,g]=X__namespace.useState("");return X__namespace.useEffect(()=>{var p;let h=c.current;h&&g(((p=h.textContent)!=null?p:"").trim());},[i.children]),jsxRuntime.jsx(Qo.ItemSlot,{scope:r,disabled:o,textValue:n!=null?n:v,children:jsxRuntime.jsx(Tp,{asChild:true,...l,focusable:!o,children:jsxRuntime.jsx(Me.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:u,onPointerMove:me(e.onPointerMove,ea(h=>{o?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:true}));})),onPointerLeave:me(e.onPointerLeave,ea(h=>s.onItemLeave(h))),onFocus:me(e.onFocus,()=>m(true)),onBlur:me(e.onBlur,()=>m(false))})})})}),Zy="MenuCheckboxItem",af=X__namespace.forwardRef((e,t)=>{let{checked:r=false,onCheckedChange:o,...n}=e;return jsxRuntime.jsx(df,{scope:e.__scopeMenu,checked:r,children:jsxRuntime.jsx(Sn,{role:"menuitemcheckbox","aria-checked":Pn(r)?"mixed":r,...n,ref:t,"data-state":Ms(r),onSelect:me(n.onSelect,()=>o==null?void 0:o(Pn(r)?true:!r),{checkForDefaultPrevented:false})})})});af.displayName=Zy;var nf="MenuRadioGroup",[Qy,e0]=Hr(nf,{value:void 0,onValueChange:()=>{}}),sf=X__namespace.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,i=Je(o);return jsxRuntime.jsx(Qy,{scope:e.__scopeMenu,value:r,onValueChange:i,children:jsxRuntime.jsx(Ps,{...n,ref:t})})});sf.displayName=nf;var lf="MenuRadioItem",cf=X__namespace.forwardRef((e,t)=>{let{value:r,...o}=e,n=e0(lf,e.__scopeMenu),i=r===n.value;return jsxRuntime.jsx(df,{scope:e.__scopeMenu,checked:i,children:jsxRuntime.jsx(Sn,{role:"menuitemradio","aria-checked":i,...o,ref:t,"data-state":Ms(i),onSelect:me(o.onSelect,()=>{var s;return (s=n.onValueChange)==null?void 0:s.call(n,r)},{checkForDefaultPrevented:false})})})});cf.displayName=lf;var Ss="MenuItemIndicator",[df,t0]=Hr(Ss,{checked:false}),uf=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,i=t0(Ss,r);return jsxRuntime.jsx(po,{present:o||Pn(i.checked)||i.checked===true,children:jsxRuntime.jsx(Me.span,{...n,ref:t,"data-state":Ms(i.checked)})})});uf.displayName=Ss;var r0="MenuSeparator",pf=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return jsxRuntime.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});pf.displayName=r0;var o0="MenuArrow",ff=X__namespace.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=ra(r);return jsxRuntime.jsx(wp,{...n,...o,ref:t})});ff.displayName=o0;var Ts="MenuSub",[a0,mf]=Hr(Ts);var Zo="MenuSubTrigger",gf=X__namespace.forwardRef((e,t)=>{let r=ur(Zo,e.__scopeMenu),o=oa(Zo,e.__scopeMenu),n=mf(Zo,e.__scopeMenu),i=ks(Zo,e.__scopeMenu),s=X__namespace.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=X__namespace.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null;},[]);return X__namespace.useEffect(()=>d,[d]),X__namespace.useEffect(()=>{let m=l.current;return ()=>{window.clearTimeout(m),c(null);}},[l,c]),jsxRuntime.jsx(ys,{asChild:true,...u,children:jsxRuntime.jsx(of,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":bf(r.open),...e,ref:Cr(t,n.onTriggerChange),onClick:m=>{var v;(v=e.onClick)==null||v.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),r.open||r.onOpenChange(true));},onPointerMove:me(e.onPointerMove,ea(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(true),d();},100));})),onPointerLeave:me(e.onPointerLeave,ea(m=>{var g,h;d();let v=(g=r.content)==null?void 0:g.getBoundingClientRect();if(v){let p=(h=r.content)==null?void 0:h.dataset.side,b=p==="right",x=b?-5:5,y=v[b?"left":"right"],C=v[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:y,y:v.top},{x:C,y:v.top},{x:C,y:v.bottom},{x:y,y:v.bottom}],side:p}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300);}else {if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null);}})),onKeyDown:me(e.onKeyDown,m=>{var g;let v=i.searchRef.current!=="";e.disabled||v&&m.key===" "||Hy[o.dir].includes(m.key)&&(r.onOpenChange(true),(g=r.content)==null||g.focus(),m.preventDefault());})})})});gf.displayName=Zo;var vf="MenuSubContent",hf=X__namespace.forwardRef((e,t)=>{let r=Qp(Pt,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,i=ur(Pt,e.__scopeMenu),s=oa(Pt,e.__scopeMenu),l=mf(vf,e.__scopeMenu),c=X__namespace.useRef(null),u=Oe(t,c);return jsxRuntime.jsx(Qo.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(po,{present:o||i.open,children:jsxRuntime.jsx(Qo.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Cs,{id:l.contentId,"aria-labelledby":l.triggerId,...n,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:false,disableOutsideScroll:false,trapFocus:false,onOpenAutoFocus:d=>{var m;s.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),d.preventDefault();},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:me(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(false);}),onEscapeKeyDown:me(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault();}),onKeyDown:me(e.onKeyDown,d=>{var g;let m=d.currentTarget.contains(d.target),v=By[s.dir].includes(d.key);m&&v&&(i.onOpenChange(false),(g=l.trigger)==null||g.focus(),d.preventDefault());})})})})})});hf.displayName=vf;function bf(e){return e?"open":"closed"}function Pn(e){return e==="indeterminate"}function Ms(e){return Pn(e)?"indeterminate":e?"checked":"unchecked"}function i0(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function s0(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function l0(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1,s=s0(e,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==r));let c=s.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return c!==r?c:void 0}function c0(e,t){let{x:r,y:o}=e,n=false;for(let i=0,s=t.length-1;i<t.length;s=i++){let l=t[i],c=t[s],u=l.x,d=l.y,m=c.x,v=c.y;d>o!=v>o&&r<(m-u)*(o-d)/(v-d)+u&&(n=!n);}return n}function d0(e,t){if(!t)return false;let r={x:e.clientX,y:e.clientY};return c0(r,t)}function ea(e){return t=>t.pointerType==="mouse"?e(t):void 0}var xf=ys,Rf=tf,kf=Ps,Cf=rf,Pf=Sn,Sf=af,Tf=sf,Mf=cf,Nf=uf,Ef=pf,Df=ff;var Lf=gf,If=hf;var Tn="DropdownMenu",[p0]=Ft(Tn,[xs]),it=xs(),[f0,_f]=p0(Tn);var Of="DropdownMenuTrigger",Ns=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=false,...n}=e,i=_f(Of,r),s=it(r);return jsxRuntime.jsx(xf,{asChild:true,...s,children:jsxRuntime.jsx(Me.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...n,ref:Cr(t,i.triggerRef),onPointerDown:me(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===false&&(i.onOpenToggle(),i.open||l.preventDefault());}),onKeyDown:me(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(true),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault());})})})});Ns.displayName=Of;var Af="DropdownMenuContent",h0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=_f(Af,r),i=it(r),s=X__namespace.useRef(false);return jsxRuntime.jsx(Rf,{id:n.contentId,"aria-labelledby":n.triggerId,...i,...o,ref:t,onCloseAutoFocus:me(e.onCloseAutoFocus,l=>{var c;s.current||(c=n.triggerRef.current)==null||c.focus(),s.current=false,l.preventDefault();}),onInteractOutside:me(e.onInteractOutside,l=>{let c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===true,d=c.button===2||u;(!n.modal||d)&&(s.current=true);}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});h0.displayName=Af;var b0="DropdownMenuGroup",w0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(kf,{...n,...o,ref:t})});w0.displayName=b0;var x0="DropdownMenuLabel",y0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Cf,{...n,...o,ref:t})});y0.displayName=x0;var R0="DropdownMenuItem",k0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Pf,{...n,...o,ref:t})});k0.displayName=R0;var C0="DropdownMenuCheckboxItem",P0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Sf,{...n,...o,ref:t})});P0.displayName=C0;var S0="DropdownMenuRadioGroup",T0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Tf,{...n,...o,ref:t})});T0.displayName=S0;var M0="DropdownMenuRadioItem",N0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Mf,{...n,...o,ref:t})});N0.displayName=M0;var E0="DropdownMenuItemIndicator",D0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Nf,{...n,...o,ref:t})});D0.displayName=E0;var L0="DropdownMenuSeparator",I0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Ef,{...n,...o,ref:t})});I0.displayName=L0;var _0="DropdownMenuArrow",O0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Df,{...n,...o,ref:t})});O0.displayName=_0;var A0="DropdownMenuSubTrigger",F0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(Lf,{...n,...o,ref:t})});F0.displayName=A0;var z0="DropdownMenuSubContent",H0=X__namespace.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=it(r);return jsxRuntime.jsx(If,{...n,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});H0.displayName=z0;function Ff({table:e}){return w(Oc,{children:[a(Ns,{asChild:true,children:w(te,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[a(lucideReact.Settings2,{}),"View"]})}),w(Ac,{align:"end",className:"w-[150px]",children:[a(zc,{children:"Toggle columns"}),a(Hc,{}),e.getAllColumns().filter(t=>typeof t.accessorFn!="undefined"&&t.getCanHide()).map(t=>a(Fc,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:r=>t.toggleVisibility(!!r),children:t.id},t.id))]})]})}function U0({id:e}){let{attributes:t,listeners:r}=sortable.useSortable({id:e});return w(te,{...t,...r,variant:"ghost",size:"icon",className:"text-muted-foreground size-7 hover:bg-transparent",children:[a(lucideReact.GripVertical,{className:"text-muted-foreground size-3"}),a("span",{className:"sr-only",children:"Drag to reorder"})]})}var zf={id:"drag",header:()=>null,cell:({row:e})=>a(U0,{id:e.original.id}),enableSorting:false,enableHiding:false};function eO(e){return [zf,...e]}function Es(e,t){return t?t.split(".").reduce((r,o)=>{if(!(r===null||typeof r!="object"))return r[o]},e):e}function $0(e){if(e)return typeof e=="number"?{width:e,minWidth:e}:{width:e,minWidth:e}}function q0(e){var c,u,d;if(!e)return null;let t=(c=e.body)!=null?c:e.payload,r=e.params,o=e.headers,n=e.resultKey,i=e.mapData,s=e.delay;if(typeof e.get=="string")return {method:"get",url:e.get,params:r,headers:o,resultKey:n,mapData:i,delay:s};if(typeof e.post=="string")return {method:"post",url:e.post,body:t,params:r,headers:o,resultKey:n,mapData:i,delay:s};let l=(u=e.url)!=null?u:e.reul;return typeof l=="string"?{method:(d=e.method)!=null?d:"get",url:l,body:t,params:r,headers:o,resultKey:n,mapData:i,delay:s}:null}function K0(e,t){return e.map(r=>{var c,u,d,m;let o=r.item?v=>Es(v,r.item):v=>v,n=r.align==="right"?"text-right justify-end":r.align==="center"?"text-center justify-center":void 0,i=f(n,r.headerClassName),s=f(r.align==="right"?"text-right":r.align==="center"?"text-center":void 0,r.cellClassName),l=$0(r.width);return {id:r.key,accessorFn:o,header:({column:v})=>a(Bd,{column:v,title:r.title,className:n}),cell:({row:v})=>{let g=v.original,h=r.item?Es(g,r.item):o(g);return r.func?r.func(g,{value:h,rowIndex:v.index}):h},enableSorting:t&&((c=r.sortable)!=null?c:true)&&!!r.item,enableHiding:(u=r.hiddeable)!=null?u:true,meta:{headerClassName:i,headerStyle:(d=r.headerStyle)!=null?d:l,cellClassName:s,cellStyle:(m=r.cellStyle)!=null?m:l}}})}function Y0(e,t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){if(t&&Array.isArray(e[t]))return e[t];if(Array.isArray(e.data))return e.data}return []}function X0(e,t){if(!t||Object.keys(t).length===0)return e;try{let r=new URL(e,typeof window!="undefined"?window.location.origin:"http://localhost");return Object.entries(t).forEach(([o,n])=>{n!=null&&r.searchParams.set(o,String(n));}),r.toString()}catch{let o=new URLSearchParams(Object.entries(t).reduce((i,[s,l])=>(l==null||(i[s]=String(l)),i),{})),n=e.includes("?")?"&":"?";return `${e}${n}${o.toString()}`}}function J0({data:e,columns:t,pagination:r=true,sortable:o=true,reload:n=false,filterable:i=false,selectable:s=false,height:l=480,rowHeight:c=48,overscan:u=5,defaultPageSize:d=25,pageSize:m,className:v,emptyState:g,onDataChange:h,loading:p}){var fe,we,ke;let b=X__namespace.useMemo(()=>q0(e.read),[e.read]),x=X__namespace.useMemo(()=>{var ie;return (ie=e.bind)!=null?ie:[]},[e.bind]),y=(fe=m==null?void 0:m.count)!=null?fe:d,C=(we=m==null?void 0:m.options)!=null?we:[10,20,30,40,50],R=(ke=m==null?void 0:m.visible)!=null?ke:true,[S,k]=X__namespace.useState(()=>x),[M,N]=X__namespace.useState(false),[D,P]=X__namespace.useState(null),T=X__namespace.useRef(null),[O,A]=X__namespace.useState(0),[V,L]=X__namespace.useState(l),_=X__namespace.useRef(null),[z,E]=X__namespace.useState(""),I=X__namespace.useMemo(()=>K0(t,o),[t,o]),H=X__namespace.useMemo(()=>s?[{id:"__select",enableHiding:false,enableSorting:false,size:44,header:({table:ne})=>a("div",{className:"flex items-center justify-center",children:a(Eo,{"aria-label":"Select all rows",checked:ne.getIsAllPageRowsSelected()||ne.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:xe=>ne.toggleAllPageRowsSelected(xe===true)})}),cell:({row:ne})=>a("div",{className:"flex items-center justify-center",children:a(Eo,{"aria-label":"Select row",checked:ne.getIsSelected(),onCheckedChange:xe=>ne.toggleSelected(xe===true)})}),meta:{headerClassName:"w-11 px-2",headerStyle:{width:44,minWidth:44},cellClassName:"w-11 px-2",cellStyle:{width:44,minWidth:44}}},...I]:I,[I,s]),j=X__namespace.useMemo(()=>t.filter(ie=>!!ie.item),[t]),U=X__namespace.useMemo(()=>{if(!i||!z.trim())return S;let ie=z.trim().toLowerCase();return S.filter(ne=>j.some(xe=>{let de=Es(ne,xe.item);return de==null?false:String(de).toLowerCase().includes(ie)}))},[S,i,z,j]),W=sl({data:U,columns:H,enableRowSelection:s,defaultPageSize:r?y:U.length||10,getRowId:(ie,ne)=>ne.toString()});X__namespace.useEffect(()=>{r||(W.setPageIndex(0),W.setPageSize(U.length||1));},[r,U.length,W]),X__namespace.useEffect(()=>{r&&W.setPageSize(y);},[r,y,W]),X__namespace.useEffect(()=>{k(x);},[x]),X__namespace.useEffect(()=>{i||E("");},[i]);let G=X__namespace.useCallback(async()=>{var ne,xe;if(!b)return;(ne=_.current)==null||ne.abort();let ie=new AbortController;_.current=ie,N(true),P(null);try{let de=X0(b.url,b.params),Se=new Headers(b.headers),De;b.method==="post"&&b.body!==void 0&&(De=typeof b.body=="string"?b.body:JSON.stringify(b.body),Se.has("Content-Type")||Se.set("Content-Type","application/json"));let be=await fetch(de,{method:b.method.toUpperCase(),headers:Se,body:De,signal:ie.signal});if(!be.ok)throw new Error(`Request failed with status ${be.status}`);b.delay&&b.delay>0&&await new Promise(Le=>setTimeout(Le,b.delay));let ze=await be.json(),Ee=b.mapData?b.mapData(ze):Y0(ze,b.resultKey);k(Ee),P(null),h==null||h(Ee);}catch(de){if(de.name==="AbortError")return;P((xe=de.message)!=null?xe:"Unable to fetch data");}finally{N(false);}},[b,h]);X__namespace.useEffect(()=>(b&&G().catch(()=>{}),()=>{var ie;(ie=_.current)==null||ie.abort();}),[b,G]),X__namespace.useEffect(()=>{if(!T.current)return;let ie=T.current;L(ie.clientHeight||l);let ne=()=>{L(ie.clientHeight||l);};return typeof window!="undefined"&&window.addEventListener("resize",ne),()=>{typeof window!="undefined"&&window.removeEventListener("resize",ne);}},[l]);let B=W.getRowModel().rows,Z=B.length,q=W.getFilteredSelectedRowModel().rows.length,le=W.getFilteredRowModel().rows.length;X__namespace.useEffect(()=>{T.current&&(T.current.scrollTop=0),A(0);},[Z]);let ee=Z*c,ae=Math.max(0,Math.floor(O/c)-u),he=Math.min(B.length,Math.ceil((O+V)/c)+u),ve=X__namespace.useMemo(()=>{if(!B.length)return null;let ie=B.slice(ae,he),ne=ae*c,xe=ie.length*c,de=Math.max(ee-ne-xe,0);return {rows:ie,paddingTop:ne,paddingBottom:de}},[B,ae,he,c,ee]),K=!!p||M,ce=!K&&S.length===0&&!!g;return w("div",{className:f("flex w-full flex-col gap-4",v),children:[w("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[i?w("div",{className:"relative flex w-full max-w-md items-center",children:[a(lucideReact.Search,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),a(at,{className:"pl-9",placeholder:"Search rows...",value:z,onChange:ie=>E(ie.target.value)})]}):a("div",{className:"h-9"}),w("div",{className:"flex items-center justify-end gap-2",children:[n&&b?w(te,{variant:"outline",size:"sm",onClick:()=>{G().catch(()=>{});},disabled:M||!!p,children:[M||p?a(lucideReact.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):a(lucideReact.RotateCcw,{className:"mr-2 h-4 w-4"}),"Reload"]}):null,a(Ff,{table:W})]})]}),w("div",{className:"relative overflow-hidden rounded-lg border",children:[ce?a("div",{className:"flex items-center justify-center p-6 text-sm text-muted-foreground",children:g}):a("div",{ref:T,className:"max-h-full overflow-auto",style:{maxHeight:l},onScroll:ie=>A(ie.currentTarget.scrollTop),children:a(Hd,{table:W,columns:H,virtualizedRows:ve!=null?ve:void 0})}),K?a("div",{className:"absolute inset-0 flex items-center justify-center bg-background/70 backdrop-blur-sm",children:w("div",{className:"flex flex-col items-center gap-2 text-sm text-muted-foreground",children:[a(lucideReact.Loader2,{className:"h-5 w-5 animate-spin"}),a("span",{children:"Loading data\u2026"})]})}):null]}),D?a("div",{className:"text-destructive text-sm",children:D}):null,r?a(Vd,{table:W,showPageSize:R,pageSizeOptions:C}):s?a("div",{className:"flex items-center justify-between px-4 text-sm text-muted-foreground",children:w("span",{children:[q," of ",le," row(s) selected."]})}):null]})}J0.displayName="DataGrid";function Q0({onReset:e}){return w("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-background px-6 py-16 text-center",children:[w("div",{className:"space-y-3",children:[a("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Something went wrong"}),a("p",{className:"text-base text-muted-foreground",children:"We hit an unexpected error. You can try again or head back to the dashboard."})]}),w("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[a(te,{onClick:()=>{e(),rl("/dashboard/default");},children:"Back to home"}),a(te,{variant:"outline",onClick:()=>{e();},children:"Try again"})]})]})}var Bf=class extends X.Component{constructor(){super(...arguments);this.state={hasError:false};this.resetBoundary=()=>{this.setState({hasError:false});};}static getDerivedStateFromError(){return {hasError:true}}componentDidCatch(r,o){var n,i;process.env.NODE_ENV!=="production"&&console.error("ErrorBoundary caught an error",r,o),(i=(n=this.props).onError)==null||i.call(n,r,o);}render(){if(this.state.hasError){let{fallback:r}=this.props;return r?typeof r=="function"?r(this.resetBoundary):r:a(Q0,{onReset:this.resetBoundary})}return this.props.children}};var Ye=X__namespace.forwardRef(({className:e,...t},r)=>a("div",{ref:r,className:f("flex flex-col gap-2",e),...t}));Ye.displayName="FormBlock";var Xe=X__namespace.forwardRef(({message:e,children:t,className:r,...o},n)=>!e&&!t?null:a("p",{ref:n,className:f("text-sm text-destructive",r),role:"alert",...o,children:e!=null?e:t}));Xe.displayName="FormError";var eR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},tR=X__namespace.forwardRef(({label:e,name:t,type:r="text",placeholder:o,required:n=false,error:i,value:s,onChange:l,onBlur:c,className:u,description:d,autoComplete:m,labelProps:v={},inputProps:g={},form:h,rules:p},b)=>{var le,ee;let x=eR(h),y=x==null?void 0:x.values,C=x==null?void 0:x.errors,R=x==null?void 0:x.touched,S=y==null?void 0:y[t],k=C==null?void 0:C[t],M=R==null?void 0:R[t],N=(le=x==null?void 0:x.validationSequence)!=null?le:0,D=x==null?void 0:x.handleChange,P=x==null?void 0:x.handleBlur,T=x==null?void 0:x.setFieldValue,O=x==null?void 0:x.setFieldError,A=x==null?void 0:x.setFieldTouched,{onChange:V,onBlur:L,className:_,type:z,autoComplete:E,...I}=g,{children:H,...j}=v,U=z!=null?z:r,W=ae=>{let he=ae.target.value,K=!!p||n?Uf(he,p,n):void 0;O==null||O(t,K),T==null||T(t,he),D==null||D(ae),l==null||l(he),V==null||V(ae);},G=ae=>{A==null||A(t,true),P==null||P(ae),c==null||c(),L==null||L(ae);},B=S!==void 0?S:s!==void 0?s:"",Z=(ee=M?k:void 0)!=null?ee:i,q=X__namespace.useRef(N);return X__namespace.useEffect(()=>{let ae=!!p||n,he=N!==q.current;if(!O||!ae){q.current=N;return}if(!M&&!he){q.current=N;return}let ve=typeof B=="string"?B:B!=null?String(B):"",K=Uf(ve,p,n);K!==k&&O(t,K),q.current=N;},[B,k,O,M,t,n,p,N]),w(Ye,{className:u,children:[e&&a(_e,{htmlFor:t,...j,children:H!=null?H:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),n&&a("span",{className:"text-destructive",children:"*"})]})}),d&&a("p",{className:"text-sm text-muted-foreground",children:d}),a(at,{ref:b,id:t,name:t,type:U,placeholder:o,value:B,onChange:W,onBlur:G,"aria-invalid":!!Z,autoComplete:E!=null?E:m,className:_,...I}),a(Xe,{message:Z})]})});function Uf(e,t,r){if(r&&!e)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minLength&&e.length<t.minLength.value)return t.minLength.message;if(t!=null&&t.maxLength&&e.length>t.maxLength.value)return t.maxLength.message;if(t!=null&&t.pattern&&!t.pattern.value.test(e))return t.pattern.message;if(t!=null&&t.validate){let o=t.validate(e);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}}tR.displayName="FormInput";var rR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},oR=X__namespace.forwardRef(({label:e,name:t,mask:r,placeholderChar:o,placeholder:n,required:i=false,error:s,value:l,onChange:c,onBlur:u,className:d,description:m,labelProps:v={},inputProps:g={},form:h,rules:p},b)=>{var W,G;let x=rR(h),y=x==null?void 0:x.values,C=x==null?void 0:x.errors,R=x==null?void 0:x.touched,S=y==null?void 0:y[t],k=C==null?void 0:C[t],M=R==null?void 0:R[t],N=(W=x==null?void 0:x.validationSequence)!=null?W:0,D=x==null?void 0:x.setFieldValue,P=x==null?void 0:x.setFieldError,T=x==null?void 0:x.setFieldTouched,{className:O,onBlur:A,onChange:V,...L}=g,{children:_,...z}=v,E=B=>{let q=!!p||i?Wf(B,p,i):void 0;P==null||P(t,q),D==null||D(t,B),c==null||c(B),V==null||V(B);},I=B=>{T==null||T(t,true),u==null||u(),A==null||A(B);},H=S!==void 0?S:l!==void 0?l:"",j=(G=M?k:void 0)!=null?G:s,U=X__namespace.useRef(N);return X__namespace.useEffect(()=>{let B=!!p||i,Z=N!==U.current;if(!P||!B){U.current=N;return}if(!M&&!Z){U.current=N;return}let q=Wf(H,p,i);q!==k&&P(t,q),U.current=N;},[H,k,P,M,t,i,p,N]),w(Ye,{className:d,children:[e&&a(_e,{htmlFor:t,...z,children:_!=null?_:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),i&&a("span",{className:"text-destructive",children:"*"})]})}),m&&a("p",{className:"text-sm text-muted-foreground",children:m}),a(ui,{ref:b,id:t,name:t,mask:r,placeholderChar:o,placeholder:n,value:H,onChange:E,onBlur:I,"aria-invalid":!!j,className:O,...L}),a(Xe,{message:j})]})});oR.displayName="FormInputMask";function Wf(e,t,r){if(r&&!e)return t&&typeof t.required=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minLength&&e.length<t.minLength.value)return t.minLength.message;if(t!=null&&t.maxLength&&e.length>t.maxLength.value)return t.maxLength.message;if(t!=null&&t.pattern&&!t.pattern.value.test(e))return t.pattern.message;if(t!=null&&t.validate){let o=t.validate(e);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}}var aR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},nR=X__namespace.forwardRef(({label:e,name:t,placeholder:r,required:o=false,error:n,value:i,onChange:s,onBlur:l,className:c,description:u,labelProps:d={},inputProps:m={},form:v,min:g,max:h,decimals:p,formatter:b,parser:x,rules:y},C)=>{var Z,q;let R=aR(v),S=R==null?void 0:R.values,k=R==null?void 0:R.errors,M=R==null?void 0:R.touched,N=S==null?void 0:S[t],D=k==null?void 0:k[t],P=M==null?void 0:M[t],T=(Z=R==null?void 0:R.validationSequence)!=null?Z:0,O=R==null?void 0:R.setFieldValue,A=R==null?void 0:R.setFieldError,V=R==null?void 0:R.setFieldTouched,{className:L,onBlur:_,onChange:z,...E}=m,{children:I,...H}=d,j=le=>{let ae=!!y||o?Gf(le,y,o):void 0;A==null||A(t,ae),O==null||O(t,le),s==null||s(le),z==null||z(le);},U=le=>{V==null||V(t,true),l==null||l(),_==null||_(le);},W=N!==void 0?N:i!==void 0?i:null,G=(q=P?D:void 0)!=null?q:n,B=X__namespace.useRef(T);return X__namespace.useEffect(()=>{let le=!!y||o,ee=T!==B.current;if(!A||!le){B.current=T;return}if(!P&&!ee){B.current=T;return}let ae=Gf(W,y,o);ae!==D&&A(t,ae),B.current=T;},[W,D,A,P,t,o,y,T]),w(Ye,{className:c,children:[e&&a(_e,{htmlFor:t,...H,children:I!=null?I:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),o&&a("span",{className:"text-destructive",children:"*"})]})}),u&&a("p",{className:"text-sm text-muted-foreground",children:u}),a(di,{ref:C,id:t,name:t,placeholder:r,value:W,onChange:j,onBlur:U,"aria-invalid":!!G,min:g,max:h,decimals:p,formatter:b,parser:x,className:L,...E}),a(Xe,{message:G})]})});nR.displayName="FormInputNumeric";function Gf(e,t,r){if(r&&e==null)return t&&typeof t.required=="string"?t.required:"This field is required";if(e!=null){if(t!=null&&t.min&&e<t.min.value)return t.min.message;if(t!=null&&t.max&&e>t.max.value)return t.max.message;if(t!=null&&t.validate){let o=t.validate(e);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}}var sR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e};function XO({label:e,name:t,description:r,placeholder:o="Select an option",required:n=false,error:i,value:s,defaultValue:l,onChange:c,onBlur:u,className:d,disabled:m,labelProps:v={},selectProps:g={},triggerProps:h={},contentProps:p={},multiSelectProps:b={},multiSelectTriggerProps:x={},multiSelectValueProps:y={},multiSelectContentProps:C={},form:R,options:S,isMulti:k=false,rules:M}){var Te,mr,Br;let N=ct(),D=sR(R),P=D==null?void 0:D.values,T=D==null?void 0:D.errors,O=D==null?void 0:D.touched,A=P==null?void 0:P[t],V=T==null?void 0:T[t],L=O==null?void 0:O[t],_=D==null?void 0:D.setFieldValue,z=D==null?void 0:D.setFieldError,E=D==null?void 0:D.setFieldTouched,I=D==null?void 0:D.handleChange,H=D==null?void 0:D.handleBlur,j=(Te=D==null?void 0:D.validationSequence)!=null?Te:0,{onValueChange:U,value:W,defaultValue:G,...B}=g,{onBlur:Z,...q}=h,le={...q,disabled:m!=null?m:q.disabled},{title:ee,...ae}=p,{onValueChange:he,value:ve,defaultValue:K,...ce}=b,{onBlur:fe,...we}=x,{title:ke,...ie}=C,[ne,xe]=X__namespace.useState(typeof l=="string"?l:""),[de,Se]=X__namespace.useState(Array.isArray(l)?l:[]);X__namespace.useEffect(()=>{typeof l=="string"&&W===void 0&&A===void 0&&s===void 0&&xe(l);},[l,A,W,s]),X__namespace.useEffect(()=>{Array.isArray(l)&&ve===void 0&&!Array.isArray(A)&&!Array.isArray(s)&&Se(l);},[l,A,ve,s]);let De=typeof W=="string"?W:typeof A=="string"?A:typeof s=="string"?s:ne,be=Array.isArray(ve)?ve:Array.isArray(A)?A:Array.isArray(s)?s:de,ze=(mr=L?V:void 0)!=null?mr:i,Ee=X__namespace.useRef(j);X__namespace.useEffect(()=>{let ue=!!M||n,gt=j!==Ee.current;if(!z||!ue){Ee.current=j;return}if(!L&&!gt){Ee.current=j;return}let tt=k?be:De!=null?De:"",Wt=Ds(tt,M,n);Wt!==V&&z(t,Wt),Ee.current=j;},[be,De,V,z,L,k,t,n,M,j]);let Le=X__namespace.useCallback(ue=>{Array.isArray(ue)?(_==null||_(t,ue),I&&I({target:{name:t,value:ue}})):(_==null||_(t,ue),I&&I({target:{name:t,value:ue}}));},[I,_,t]),ye=X__namespace.useCallback(ue=>{W===void 0&&A===void 0&&s===void 0&&xe(ue);let tt=!!M||n?Ds(ue,M,n):void 0;z==null||z(t,tt),Le(ue),c==null||c(ue),U==null||U(ue);},[A,Le,c,U,W,s,M,n,z,t]),Ut=X__namespace.useCallback(ue=>{ve===void 0&&!Array.isArray(A)&&!Array.isArray(s)&&Se(ue);let tt=!!M||n?Ds(ue,M,n):void 0;z==null||z(t,tt),Le(ue),c==null||c(ue),he==null||he(ue);},[A,Le,he,ve,c,s,M,n,z,t]),Ce=X__namespace.useCallback(ue=>{E==null||E(t,true),H==null||H({target:{name:t}}),u==null||u(),Z==null||Z(ue);},[H,E,t,u,Z]),fr=X__namespace.useCallback(ue=>{E==null||E(t,true),H==null||H({target:{name:t}}),u==null||u(),fe==null||fe(ue);},[H,E,t,fe,u]),et=G!=null?G:typeof l=="string"?l:void 0,tr=K!=null?K:Array.isArray(l)?l:void 0,[Dt,rr]=X__namespace.useState(false),Ae=({isMulti:ue=false})=>{var tt;let gt=ue?be.length>0?`${be.length} selected`:o:((tt=S.find(Wt=>Wt.value===De))==null?void 0:tt.label)||o;return w(te,{variant:"outline",className:f("w-full justify-between border-input bg-transparent px-3 py-2 text-sm","flex items-center gap-2",le.disabled&&"opacity-50 cursor-not-allowed",!!ze&&"border-destructive",le.className),onClick:()=>!le.disabled&&rr(true),disabled:le.disabled,type:"button",children:[a("span",{className:"flex-1 text-left truncate",children:gt}),a(lucideReact.ChevronDownIcon,{className:"h-4 w-4 opacity-50 flex-shrink-0"})]})};return w(Ye,{className:d,children:[e&&a(_e,{htmlFor:t,...v,children:(Br=v.children)!=null?Br:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),n&&a("span",{className:"text-destructive",children:"*"})]})}),k?w(jsxRuntime.Fragment,{children:[N?w(jsxRuntime.Fragment,{children:[a(Ae,{isMulti:true}),a(kr,{open:Dt,onOpenChange:rr,title:ke!=null?ke:e,options:S,selectedValues:be,onSelect:ue=>{let gt=be.includes(ue)?be.filter(tt=>tt!==ue):[...be,ue];Ut(gt);},isMulti:true})]}):w(od,{...ce,value:be,defaultValue:tr,onValueChange:Ut,children:[a(ad,{"data-name":t,"aria-invalid":!!ze,...we,...le,onBlur:fr,children:a(nd,{placeholder:o,...y})}),a(id,{title:ke!=null?ke:e,...ie,children:S.map(ue=>a(sd,{value:ue.value,disabled:ue.disabled,children:ue.label},ue.value))})]}),a("input",{type:"hidden",name:t,value:be.join(",")})]}):w(jsxRuntime.Fragment,{children:[N?w(jsxRuntime.Fragment,{children:[a(Ae,{}),a(kr,{open:Dt,onOpenChange:rr,title:ee!=null?ee:e,options:S,selectedValues:De,onSelect:ye,isMulti:false})]}):a(Wa,{...B,value:De,defaultValue:et,onValueChange:ye,options:S.map(ue=>({value:ue.value,label:ue.label,disabled:ue.disabled})),placeholder:o,triggerProps:{...le,id:t,"aria-invalid":!!ze,onBlur:Ce},contentProps:{...ae,title:ee!=null?ee:e}}),a("input",{type:"hidden",name:t,value:De!=null?De:""})]}),a(Xe,{message:ze}),r&&a("p",{className:"text-sm text-muted-foreground",children:r})]})}function Ds(e,t,r){if(r){if(Array.isArray(e)){if(e.length===0)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required"}else if(!e)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required"}if(t!=null&&t.validate){let o=t.validate(e);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}var lR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},cR=X__namespace.forwardRef(({label:e,name:t,placeholder:r,required:o=false,error:n,value:i,onChange:s,onBlur:l,className:c,labelProps:u={},textareaProps:d={},form:m,rules:v},g)=>{var U,W;let h=lR(m),p=h==null?void 0:h.values,b=h==null?void 0:h.errors,x=h==null?void 0:h.touched,y=p==null?void 0:p[t],C=b==null?void 0:b[t],R=x==null?void 0:x[t],S=(U=h==null?void 0:h.validationSequence)!=null?U:0,k=h==null?void 0:h.handleChange,M=h==null?void 0:h.handleBlur,N=h==null?void 0:h.setFieldError,D=h==null?void 0:h.setFieldValue,P=h==null?void 0:h.setFieldTouched,{onChange:T,onBlur:O,className:A,...V}=d,{children:L,..._}=u,z=G=>{let B=G.target.value,q=!!v||o?$f(B,v,o):void 0;N==null||N(t,q),D==null||D(t,B),k==null||k(G),s==null||s(B),T==null||T(G);},E=G=>{P==null||P(t,true),M==null||M(G),l==null||l(),O==null||O(G);},I=y!==void 0?String(y):i!==void 0?i:"",H=(W=R?C:void 0)!=null?W:n,j=X__namespace.useRef(S);return X__namespace.useEffect(()=>{let G=!!v||o,B=S!==j.current;if(!N||!G){j.current=S;return}if(!R&&!B){j.current=S;return}let Z=$f(I,v,o);Z!==C&&N(t,Z),j.current=S;},[I,C,N,R,t,o,v,S]),w(Ye,{className:c,children:[e&&a(_e,{htmlFor:t,..._,children:L!=null?L:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),o&&a("span",{className:"text-destructive",children:"*"})]})}),a(Mi,{ref:g,id:t,name:t,placeholder:r,value:I,onChange:z,onBlur:E,"aria-invalid":!!H,className:A,...V}),a(Xe,{message:H})]})});function $f(e,t,r){if(r&&!e)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minLength&&e.length<t.minLength.value)return t.minLength.message;if(t!=null&&t.maxLength&&e.length>t.maxLength.value)return t.maxLength.message;if(t!=null&&t.pattern&&!t.pattern.value.test(e))return t.pattern.message;if(t!=null&&t.validate){let o=t.validate(e);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}}cR.displayName="FormTextarea";var dR=e=>{var t;if(e)return e.setFieldValue||e.setFieldTouched||e.handleBlur?e:(t=e.form)!=null?t:e},uR=X__namespace.forwardRef(({label:e,description:t,name:r,required:o=false,error:n,value:i,defaultValue:s,onChange:l,onBlur:c,form:u,options:d,className:m,labelProps:v={},radioGroupProps:g={},optionLabelProps:h={},optionWrapperClassName:p,...b},x)=>{var U,W;let y=dR(u),C=y==null?void 0:y.values,R=y==null?void 0:y.errors,S=y==null?void 0:y.touched,k=C==null?void 0:C[r],M=R==null?void 0:R[r],D=(U=(S==null?void 0:S[r])?M:void 0)!=null?U:n,{className:P,onValueChange:T,onBlur:O,value:A,defaultValue:V,...L}=g,_=(W=i!=null?i:A!==void 0?A:void 0)!=null?W:k!=null?String(k):void 0,z=_===void 0?s!=null?s:V:void 0,E=X__namespace.useCallback(G=>{var B;(B=y==null?void 0:y.setFieldValue)==null||B.call(y,r,G),l==null||l(G),T==null||T(G);},[y,r,l,T]),I=X__namespace.useCallback(G=>{var B,Z;(B=y==null?void 0:y.setFieldTouched)==null||B.call(y,r,true),(Z=y==null?void 0:y.handleBlur)==null||Z.call(y,{target:{name:r}}),c==null||c(),O==null||O(G);},[y,r,c,O]),{className:H,...j}=h;return w(Ye,{ref:x,className:f("gap-3",m),...b,children:[(e||t)&&w("div",{className:"space-y-1",children:[e&&a(_e,{...v,children:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),o&&a("span",{className:"text-destructive",children:"*"})]})}),t?a("p",{className:"text-sm text-muted-foreground",children:t}):null]}),a(Zc,{"aria-invalid":!!D,...L,..._!==void 0?{value:_}:z!==void 0?{defaultValue:z}:{},onValueChange:E,onBlur:I,className:f("grid gap-3",P),children:d.map(G=>{let B=`${r}-${G.value}`;return w("div",{className:f("flex items-start gap-3 rounded-lg border border-input bg-background p-3 shadow-xs",p,G.className,G.disabled&&"opacity-60"),children:[a(Qc,{id:B,value:G.value,disabled:G.disabled,"aria-invalid":!!D,className:"mt-1"}),w(_e,{htmlFor:B,className:f("flex-col items-start gap-1 font-normal sm:flex-row sm:items-center sm:gap-2",H),...j,children:[a("span",{className:"text-sm font-medium text-foreground",children:G.label}),G.description?a("span",{className:"block text-sm text-muted-foreground",children:G.description}):null]})]},G.value)})}),a(Xe,{message:D})]})});uR.displayName="FormRadioGroup";var pR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e};function vA({label:e,name:t,placeholder:r,required:o=false,error:n,value:i,defaultValue:s=null,onChange:l,onBlur:c,className:u,description:d,labelProps:m={},datePickerProps:v={},form:g,rules:h}){var ae,he,ve;let p=pR(g),b=p==null?void 0:p.values,x=p==null?void 0:p.errors,y=p==null?void 0:p.touched,C=p==null?void 0:p.setFieldValue,R=p==null?void 0:p.setFieldError,S=p==null?void 0:p.setFieldTouched,k=p==null?void 0:p.handleChange,M=p==null?void 0:p.handleBlur,N=b==null?void 0:b[t],D=x==null?void 0:x[t],P=y==null?void 0:y[t],T=(ae=p==null?void 0:p.validationSequence)!=null?ae:0,{onChange:O,onBlur:A,value:V,defaultValue:L,placeholder:_,status:z,...E}=v,[I,H]=X__namespace.useState((he=L!=null?L:s)!=null?he:null);X__namespace.useEffect(()=>{var K;V===void 0&&i===void 0&&N===void 0&&H((K=L!=null?L:s)!=null?K:null);},[L,V,s,N,i]);let j=V!==void 0?V!=null?V:null:N!==void 0?N!=null?N:null:i!==void 0?i!=null?i:null:I,U=(ve=P?D:void 0)!=null?ve:n,W=z!=null?z:U?"error":void 0,G=_!=null?_:r,{children:B,...Z}=m,q=X__namespace.useRef(T);X__namespace.useEffect(()=>{let K=!!h||o,ce=T!==q.current;if(!R||!K){q.current=T;return}if(!P&&!ce){q.current=T;return}let fe=qf(j!=null?j:null,h,o);fe!==D&&R(t,fe),q.current=T;},[j,D,R,P,t,o,h,T]);let le=X__namespace.useCallback((K,ce)=>{V===void 0&&i===void 0&&N===void 0&&H(K!=null?K:null);let fe=qf(K,h,o);R==null||R(t,fe),C?C(t,K!=null?K:null):k&&k({target:{name:t,value:ce}}),l==null||l(K!=null?K:null),O==null||O(K!=null?K:null,ce);},[O,V,k,R,C,N,t,l,o,h,i]),ee=X__namespace.useCallback(K=>{S==null||S(t,true),M==null||M({target:{name:t}}),c==null||c(),A==null||A(K);},[A,M,S,t,c]);return w(Ye,{className:u,children:[e&&a(_e,{htmlFor:t,...Z,children:B!=null?B:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),o&&a("span",{className:"text-destructive",children:"*"})]})}),d&&a("p",{className:"text-sm text-muted-foreground",children:d}),a(bi,{id:t,name:t,value:j!=null?j:null,onChange:le,onBlur:ee,placeholder:G,status:W,"aria-invalid":!!U,...E}),a(Xe,{message:U})]})}function qf(e,t,r){if(r&&!e)return t&&typeof t.required=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minDate&&e.isBefore(t.minDate.value,"day"))return t.minDate.message;if(t!=null&&t.maxDate&&e.isAfter(t.maxDate.value,"day"))return t.maxDate.message}if(t!=null&&t.validate){let o=t.validate(e!=null?e:null);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}var fR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e};function kA({label:e,name:t,placeholder:r,required:o=false,error:n,value:i,defaultValue:s=null,onChange:l,onBlur:c,className:u,description:d,labelProps:m={},timePickerProps:v={},form:g,rules:h}){var ae,he,ve;let p=fR(g),b=p==null?void 0:p.values,x=p==null?void 0:p.errors,y=p==null?void 0:p.touched,C=p==null?void 0:p.setFieldValue,R=p==null?void 0:p.setFieldError,S=p==null?void 0:p.setFieldTouched,k=p==null?void 0:p.handleChange,M=p==null?void 0:p.handleBlur,N=b==null?void 0:b[t],D=x==null?void 0:x[t],P=y==null?void 0:y[t],T=(ae=p==null?void 0:p.validationSequence)!=null?ae:0,{onChange:O,onBlur:A,value:V,defaultValue:L,placeholder:_,status:z,...E}=v,[I,H]=X__namespace.useState((he=L!=null?L:s)!=null?he:null);X__namespace.useEffect(()=>{var K;V===void 0&&i===void 0&&N===void 0&&H((K=L!=null?L:s)!=null?K:null);},[s,N,L,V,i]);let j=V!==void 0?V!=null?V:null:N!==void 0?N!=null?N:null:i!==void 0?i!=null?i:null:I,U=(ve=P?D:void 0)!=null?ve:n,W=z!=null?z:U?"error":void 0,G=_!=null?_:r,{children:B,...Z}=m,q=X__namespace.useRef(T);X__namespace.useEffect(()=>{let K=!!h||o,ce=T!==q.current;if(!R||!K){q.current=T;return}if(!P&&!ce){q.current=T;return}let fe=Kf(j!=null?j:null,h,o);fe!==D&&R(t,fe),q.current=T;},[j,D,R,P,t,o,h,T]);let le=X__namespace.useCallback((K,ce)=>{V===void 0&&i===void 0&&N===void 0&&H(K!=null?K:null);let fe=Kf(K,h,o);R==null||R(t,fe),C?C(t,K!=null?K:null):k&&k({target:{name:t,value:ce}}),l==null||l(K!=null?K:null),O==null||O(K!=null?K:null,ce);},[k,R,C,N,t,l,o,h,O,V,i]),ee=X__namespace.useCallback(K=>{S==null||S(t,true),M==null||M({target:{name:t}}),c==null||c(),A==null||A(K);},[M,S,t,c,A]);return w(Ye,{className:u,children:[e&&a(_e,{htmlFor:t,...Z,children:B!=null?B:w("span",{className:"flex items-center gap-1",children:[a("span",{children:e}),o&&a("span",{className:"text-destructive",children:"*"})]})}),d&&a("p",{className:"text-sm text-muted-foreground",children:d}),a(Ii,{id:t,name:t,value:j!=null?j:null,onChange:le,onBlur:ee,placeholder:G,status:W,"aria-invalid":!!U,...E}),a(Xe,{message:U})]})}function Kf(e,t,r){if(r&&!e)return t&&typeof t.required=="string"?t.required:"This field is required";if(t!=null&&t.validate){let o=t.validate(e!=null?e:null);if(typeof o=="string")return o;if(o===false)return "Invalid value"}}var mR=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange?e:(t=e.form)!=null?t:e},gR=({name:e,label:t,description:r,className:o,checked:n,defaultChecked:i,onCheckedChange:s,switchProps:l,error:c,form:u,rules:d})=>{var j,U;let m=X__namespace.useId(),{id:v,onCheckedChange:g,className:h,disabled:p,"aria-describedby":b,"aria-labelledby":x,...y}=l!=null?l:{},C=v!=null?v:m,R=mR(u),S=R==null?void 0:R.values,k=R==null?void 0:R.errors,M=R==null?void 0:R.touched,N=S==null?void 0:S[e],D=k==null?void 0:k[e],P=M==null?void 0:M[e],T=(j=R==null?void 0:R.validationSequence)!=null?j:0,O=(U=P?D:void 0)!=null?U:c,A=N!==void 0?!!N:n!==void 0?n:void 0,V=r?`${C}-description`:void 0,L=O?`${C}-error`:void 0,_=[b,V,L].filter(Boolean).join(" ").trim()||void 0,z=t?[x,`${C}-label`].filter(Boolean).join(" ").trim()||void 0:x,E=X__namespace.useCallback(W=>{if(p)return;let G=document.getElementById(C);if(G){if(W.preventDefault(),typeof G.focus=="function")try{G.focus({preventScroll:!0});}catch{G.focus();}G.click();}},[p,C]),I=W=>{var Z,q,le;let B=!!d?Yf(W,d):void 0;if((Z=R==null?void 0:R.setFieldError)==null||Z.call(R,e,B),(q=R==null?void 0:R.setFieldValue)==null||q.call(R,e,W),(le=R==null?void 0:R.setFieldTouched)==null||le.call(R,e,true),R!=null&&R.handleChange){let ee={target:{name:e,value:W,checked:W}};R.handleChange(ee);}s==null||s(W),g==null||g(W);},H=X__namespace.useRef(T);return X__namespace.useEffect(()=>{let W=!!d,G=T!==H.current;if(!(R!=null&&R.setFieldError)||!W){H.current=T;return}if(!P&&!G){H.current=T;return}let Z=Yf(N!==void 0?!!N:n!==void 0?n:!!i,d);Z!==D&&R.setFieldError(e,Z),H.current=T;},[n,i,D,P,N,e,R,d,T]),w("div",{className:f("flex items-start justify-between gap-4",o),children:[w("div",{className:"flex-1 space-y-2",children:[t?a(Fo,{id:`${C}-label`,htmlFor:C,onClick:E,className:f("text-sm leading-none font-medium",p?"cursor-not-allowed":"cursor-pointer"),children:t}):null,r?a(Oo,{id:V,children:r}):null,a(Ao,{id:L,children:O})]}),a(xd,{name:e,id:C,"aria-invalid":!!O,"aria-describedby":_,"aria-labelledby":z,className:f("cursor-pointer",h),disabled:p,...y,...A!==void 0?{checked:A}:{defaultChecked:i},onCheckedChange:I})]})};gR.displayName="FormSwitch";function Yf(e,t){if(t){if(t.required&&!e)return typeof t.required=="string"?t.required:"This field is required";if(t.validate){let r=t.validate(e);if(typeof r=="string")return r;if(r===false)return "Invalid value"}}}var IA=["sidebar","floating","inset"],_A=["offcanvas","icon","none"],OA=["centered","full-width"],AA=["sticky","scroll"];
49
- Object.defineProperty(exports,"toast",{enumerable:true,get:function(){return sonner.toast}});exports.Accordion=ik;exports.AccordionContent=ck;exports.AccordionItem=sk;exports.AccordionTrigger=lk;exports.Alert=mk;exports.AlertDescription=vk;exports.AlertDialog=Mk;exports.AlertDialogAction=Ok;exports.AlertDialogCancel=Ak;exports.AlertDialogContent=Ek;exports.AlertDialogDescription=_k;exports.AlertDialogFooter=Lk;exports.AlertDialogHeader=Dk;exports.AlertDialogOverlay=Um;exports.AlertDialogPortal=jm;exports.AlertDialogTitle=Ik;exports.AlertDialogTrigger=Nk;exports.AlertTitle=gk;exports.AspectRatio=Bk;exports.Avatar=Gk;exports.AvatarFallback=qk;exports.AvatarImage=$k;exports.Badge=cl;exports.Breadcrumb=aC;exports.BreadcrumbEllipsis=dC;exports.BreadcrumbItem=iC;exports.BreadcrumbLink=sC;exports.BreadcrumbList=nC;exports.BreadcrumbPage=lC;exports.BreadcrumbSeparator=cC;exports.Button=te;exports.CONTENT_LAYOUT_VALUES=OA;exports.Calendar=bC;exports.CalendarDayButton=tg;exports.Card=RC;exports.CardAction=SC;exports.CardContent=TC;exports.CardDescription=PC;exports.CardFooter=MC;exports.CardHeader=kC;exports.CardTitle=CC;exports.Carousel=OC;exports.CarouselContent=AC;exports.CarouselItem=FC;exports.CarouselNext=HC;exports.CarouselPrevious=zC;exports.ChartContainer=tS;exports.ChartLegend=aS;exports.ChartLegendContent=nS;exports.ChartStyle=Qg;exports.ChartTooltip=rS;exports.ChartTooltipContent=oS;exports.Chat=Yg;exports.ChatContainer=_l;exports.ChatForm=Ol;exports.ChatMessage=Ml;exports.ChatMessages=Xg;exports.Checkbox=Eo;exports.Collapsible=Cl;exports.CollapsibleContent=Sl;exports.CollapsibleTrigger=Pl;exports.Command=Jn;exports.CommandDialog=PS;exports.CommandEmpty=jl;exports.CommandGroup=SS;exports.CommandInput=Bl;exports.CommandItem=Ul;exports.CommandList=Vl;exports.CommandSeparator=TS;exports.CommandShortcut=MS;exports.ContextMenu=_S;exports.ContextMenuCheckboxItem=WS;exports.ContextMenuContent=jS;exports.ContextMenuGroup=AS;exports.ContextMenuItem=US;exports.ContextMenuLabel=$S;exports.ContextMenuPortal=FS;exports.ContextMenuRadioGroup=HS;exports.ContextMenuRadioItem=GS;exports.ContextMenuSeparator=qS;exports.ContextMenuShortcut=KS;exports.ContextMenuSub=zS;exports.ContextMenuSubContent=VS;exports.ContextMenuSubTrigger=BS;exports.ContextMenuTrigger=OS;exports.CopyButton=Un;exports.DataGrid=J0;exports.DataTable=Hd;exports.DataTableColumnHeader=Bd;exports.DataTablePagination=Vd;exports.DataTableViewOptions=Ff;exports.DatePicker=bi;exports.Dialog=ga;exports.DialogClose=hS;exports.DialogContent=va;exports.DialogDescription=wa;exports.DialogFooter=bS;exports.DialogHeader=ha;exports.DialogOverlay=ov;exports.DialogPortal=rv;exports.DialogTitle=ba;exports.DialogTrigger=vS;exports.DraggableRow=Ad;exports.Drawer=Qr;exports.DrawerClose=La;exports.DrawerContent=eo;exports.DrawerDescription=h1;exports.DrawerFooter=Dc;exports.DrawerHeader=to;exports.DrawerOverlay=ch;exports.DrawerPortal=lh;exports.DrawerTitle=ro;exports.DrawerTrigger=Da;exports.DropdownMenu=Oc;exports.DropdownMenuCheckboxItem=Fc;exports.DropdownMenuContent=Ac;exports.DropdownMenuGroup=A1;exports.DropdownMenuItem=F1;exports.DropdownMenuLabel=zc;exports.DropdownMenuPortal=_1;exports.DropdownMenuRadioGroup=z1;exports.DropdownMenuRadioItem=H1;exports.DropdownMenuSeparator=Hc;exports.DropdownMenuShortcut=B1;exports.DropdownMenuSub=V1;exports.DropdownMenuSubContent=U1;exports.DropdownMenuSubTrigger=j1;exports.DropdownMenuTrigger=O1;exports.ErrorBoundary=Bf;exports.FIELD_HEIGHT_MOBILE_CLASS=It;exports.Flex=Oh;exports.Form=Nh;exports.FormBlock=Ye;exports.FormCheckbox=Dh;exports.FormDatePicker=vA;exports.FormError=Xe;exports.FormInput=tR;exports.FormInputMask=oR;exports.FormInputNumeric=nR;exports.FormRadioGroup=uR;exports.FormSelect=XO;exports.FormSwitch=gR;exports.FormTextarea=cR;exports.FormTimePicker=kA;exports.HoverCard=hM;exports.HoverCardContent=wM;exports.HoverCardTrigger=bM;exports.HtmlRenderer=Kr;exports.Input=at;exports.InputMask=ui;exports.InputNumeric=di;exports.InputOTP=PM;exports.InputOTPGroup=SM;exports.InputOTPSeparator=MM;exports.InputOTPSlot=TM;exports.Label=_e;exports.MarkdownRenderer=xP;exports.Menubar=zM;exports.MenubarCheckboxItem=GM;exports.MenubarContent=UM;exports.MenubarGroup=BM;exports.MenubarItem=WM;exports.MenubarLabel=qM;exports.MenubarMenu=HM;exports.MenubarPortal=Uh;exports.MenubarRadioGroup=VM;exports.MenubarRadioItem=$M;exports.MenubarSeparator=KM;exports.MenubarShortcut=YM;exports.MenubarSub=XM;exports.MenubarSubContent=ZM;exports.MenubarSubTrigger=JM;exports.MenubarTrigger=jM;exports.MessageInput=$n;exports.MessageList=El;exports.MobileFooter=yi;exports.MobileHeader=Ri;exports.MobileHeaderProvider=Ql;exports.MobileLayout=ub;exports.MobileSelectDrawer=kr;exports.Modal=Xh;exports.MultiSelect=od;exports.MultiSelectContent=id;exports.MultiSelectItem=sd;exports.MultiSelectTrigger=ad;exports.MultiSelectValue=nd;exports.NAVBAR_STYLE_VALUES=AA;exports.NavigationMenu=qN;exports.NavigationMenuContent=JN;exports.NavigationMenuIndicator=QN;exports.NavigationMenuItem=YN;exports.NavigationMenuLink=ZN;exports.NavigationMenuList=KN;exports.NavigationMenuTrigger=XN;exports.NavigationMenuViewport=gb;exports.Pagination=iE;exports.PaginationContent=sE;exports.PaginationEllipsis=uE;exports.PaginationItem=lE;exports.PaginationLink=Xc;exports.PaginationNext=dE;exports.PaginationPrevious=cE;exports.Popover=Jr;exports.PopoverAnchor=Ea;exports.PopoverContent=Zr;exports.PopoverTrigger=Ec;exports.Progress=vE;exports.PromptSuggestions=Dl;exports.RadioGroup=Zc;exports.RadioGroupItem=Qc;exports.ResizableHandle=ME;exports.ResizablePanel=TE;exports.ResizablePanelGroup=SE;exports.RouterProvider=tl;exports.SIDEBAR_COLLAPSIBLE_VALUES=_A;exports.SIDEBAR_VARIANT_VALUES=IA;exports.SafeArea=Ua;exports.ScrollArea=IE;exports.ScrollBar=yb;exports.Select=Wa;exports.SelectContent=Sb;exports.SelectItem=Tb;exports.SelectRoot=Cb;exports.SelectScrollDownButton=Nb;exports.SelectScrollUpButton=Mb;exports.SelectTrigger=Pb;exports.SelectValue=Eb;exports.Separator=ld;exports.Sheet=cd;exports.SheetClose=c2;exports.SheetContent=dd;exports.SheetDescription=fd;exports.SheetFooter=d2;exports.SheetHeader=ud;exports.SheetTitle=pd;exports.SheetTrigger=l2;exports.Sidebar=wc;exports.SidebarContent=kc;exports.SidebarFooter=Rc;exports.SidebarGroup=I2;exports.SidebarGroupAction=O2;exports.SidebarGroupContent=A2;exports.SidebarGroupLabel=_2;exports.SidebarHeader=yc;exports.SidebarInput=D2;exports.SidebarInset=xc;exports.SidebarMenu=Cc;exports.SidebarMenuAction=F2;exports.SidebarMenuBadge=z2;exports.SidebarMenuButton=Sc;exports.SidebarMenuItem=Pc;exports.SidebarMenuSkeleton=H2;exports.SidebarMenuSub=B2;exports.SidebarMenuSubButton=j2;exports.SidebarMenuSubItem=V2;exports.SidebarProvider=bc;exports.SidebarRail=E2;exports.SidebarSeparator=L2;exports.SidebarTrigger=N2;exports.Skeleton=nr;exports.Slider=q2;exports.Switch=xd;exports.THEME_MODE_CHANGE_EVENT=ca;exports.THEME_MODE_STORAGE_KEY=Wr;exports.THEME_MODE_VALUES=ol;exports.THEME_PRESET_OPTIONS=wm;exports.THEME_PRESET_VALUES=IR;exports.Table=yd;exports.TableBody=kd;exports.TableCaption=iD;exports.TableCell=Sr;exports.TableFooter=nD;exports.TableHead=Cd;exports.TableHeader=Rd;exports.TableRow=lr;exports.Tabs=Md;exports.Textarea=Mi;exports.ThemeProvider=$T;exports.TimePicker=Ii;exports.Toaster=J2;exports.Toggle=xD;exports.ToggleGroup=SD;exports.ToggleGroupItem=TD;exports.Tooltip=md;exports.TooltipContent=vd;exports.TooltipProvider=ni;exports.TooltipTrigger=gd;exports.TypingIndicator=Nl;exports.__virtualKeyboardTesting=YR;exports.badgeVariants=qm;exports.buttonVariants=$t;exports.cn=f;exports.createStore=GR;exports.detectVirtualKeyboardDevice=Mm;exports.dragColumn=zf;exports.formatCurrency=VR;exports.getInitials=jR;exports.getMonitor=gc;exports.getThemeMode=AR;exports.initializeMonitoring=Ta;exports.isNullOrEmpty=ri;exports.isThemeMode=Ur;exports.maybeScrollElementIntoView=pa;exports.mobileFooterVariantMeta=Zh;exports.mobileFooterVariants=hN;exports.mobileHeaderVariantMeta=eb;exports.mobileHeaderVariants=yN;exports.navigationMenuTriggerStyle=mb;exports.redirect=rl;exports.resolveThemeMode=So;exports.setThemeMode=al;exports.showError=qv;exports.showInfo=Yv;exports.showSonner=Io;exports.showSuccess=$v;exports.showWarning=Kv;exports.toBool=br;exports.toggleVariants=Ni;exports.updateContentLayout=bR;exports.updateNavbarStyle=wR;exports.updateThemeMode=da;exports.updateThemePreset=FR;exports.useDataTableInstance=sl;exports.useForm=eT;exports.useIsMobile=ct;exports.useMobileHeader=ec;exports.useMonitor=Gv;exports.useNavigate=ER;exports.usePathname=NR;exports.useSidebar=Vo;exports.useStore=$R;exports.useTheme=Xt;exports.useThemeExtras=qT;exports.withDndColumn=eO;//# sourceMappingURL=index.cjs.map
7
+ `)}}):null},gh=Xt__namespace.Tooltip;function bh({active:e,payload:t,className:n,indicator:a="dot",hideLabel:r=false,hideIndicator:i=false,label:c,labelFormatter:d,labelClassName:l,formatter:g,color:m,nameKey:C,labelKey:R}){let{config:f}=Gr(),b=X__namespace.useMemo(()=>{var w;if(r||!(t!=null&&t.length))return null;let[v]=t,y=`${R||(v==null?void 0:v.dataKey)||(v==null?void 0:v.name)||"value"}`,x=Xn(f,v,y),N=!R&&typeof c=="string"?((w=f[c])==null?void 0:w.label)||c:x==null?void 0:x.label;return d?o("div",{className:s("font-medium",l),children:d(N,t)}):N?o("div",{className:s("font-medium",l),children:N}):null},[c,d,t,r,l,f,R]);if(!e||!(t!=null&&t.length))return null;let p=t.length===1&&a!=="dot";return u("div",{className:s("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",n),children:[p?null:b,o("div",{className:"grid gap-1.5",children:t.filter(v=>v.type!=="none").map((v,y)=>{let x=`${C||v.name||v.dataKey||"value"}`,N=Xn(f,v,x),w=m||v.payload.fill||v.color;return o("div",{className:s("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",a==="dot"&&"items-center"),children:g&&(v==null?void 0:v.value)!==void 0&&v.name?g(v.value,v.name,v,y,v.payload):u(jsxRuntime.Fragment,{children:[N!=null&&N.icon?o(N.icon,{}):!i&&o("div",{className:s("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":a==="dot","w-1":a==="line","w-0 border-[1.5px] border-dashed bg-transparent":a==="dashed","my-0.5":p&&a==="dashed"}),style:{"--color-bg":w,"--color-border":w}}),u("div",{className:s("flex flex-1 justify-between leading-none",p?"items-end":"items-center"),children:[u("div",{className:"grid gap-1.5",children:[p?b:null,o("span",{className:"text-muted-foreground",children:(N==null?void 0:N.label)||v.name})]}),v.value&&o("span",{className:"text-foreground font-mono font-medium tabular-nums",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}var vh=Xt__namespace.Legend;function hh({className:e,hideIcon:t=false,payload:n,verticalAlign:a="bottom",nameKey:r}){let{config:i}=Gr();return n!=null&&n.length?o("div",{className:s("flex items-center justify-center gap-4",a==="top"?"pb-3":"pt-3",e),children:n.filter(c=>c.type!=="none").map(c=>{let d=`${r||c.dataKey||"value"}`,l=Xn(i,c,d);return u("div",{className:s("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[l!=null&&l.icon&&!t?o(l.icon,{}):o("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),l==null?void 0:l.label]},c.value)})}):null}function Xn(e,t,n){if(typeof t!="object"||t===null)return;let a="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0,r=n;return n in t&&typeof t[n]=="string"?r=t[n]:a&&n in a&&typeof a[n]=="string"&&(r=a[n]),r in e?e[r]:e[n]}var Ro=X__namespace.forwardRef(function({className:t,...n},a){return o(radixUi.Checkbox.Root,{ref:a,"data-slot":"checkbox",className:s("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:o(radixUi.Checkbox.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:o(lucideReact.CheckIcon,{className:"size-3.5"})})})});function $o({...e}){return o(radixUi.Dialog.Root,{"data-slot":"dialog",...e})}function kh({...e}){return o(radixUi.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}function fd({...e}){return o(radixUi.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function Eh({...e}){return o(radixUi.Dialog.Close,{"data-slot":"dialog-close",...e})}function gd({className:e,...t}){return o(radixUi.Dialog.Overlay,{"data-slot":"dialog-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Yo({className:e,children:t,showCloseButton:n=true,...a}){return u(fd,{"data-slot":"dialog-portal",children:[o(gd,{}),u(radixUi.Dialog.Content,{"data-slot":"dialog-content",className:s("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a,children:[t,n&&u(radixUi.Dialog.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[o(lucideReact.XIcon,{}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function Ko({className:e,...t}){return o("div",{"data-slot":"dialog-header",className:s("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Dh({className:e,...t}){return o("div",{"data-slot":"dialog-footer",className:s("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Xo({className:e,...t}){return o(radixUi.Dialog.Title,{"data-slot":"dialog-title",className:s("text-lg leading-none font-semibold",e),...t})}function Jo({className:e,...t}){return o(radixUi.Dialog.Description,{"data-slot":"dialog-description",className:s("text-muted-foreground text-sm",e),...t})}function Jn({className:e,...t}){return o(cmdk.Command,{"data-slot":"command",className:s("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Ah({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:a,showCloseButton:r=true,...i}){return u($o,{...i,children:[u(Ko,{className:"sr-only",children:[o(Xo,{children:e}),o(Jo,{children:t})]}),o(Yo,{className:s("overflow-hidden p-0",a),showCloseButton:r,children:o(Jn,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function $r({className:e,...t}){return u("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[o(lucideReact.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),o(cmdk.Command.Input,{"data-slot":"command-input",className:s("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Yr({className:e,...t}){return o(cmdk.Command.List,{"data-slot":"command-list",className:s("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Kr({...e}){return o(cmdk.Command.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function zh({className:e,...t}){return o(cmdk.Command.Group,{"data-slot":"command-group",className:s("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Bh({className:e,...t}){return o(cmdk.Command.Separator,{"data-slot":"command-separator",className:s("bg-border -mx-1 h-px",e),...t})}function Xr({className:e,...t}){return o(cmdk.Command.Item,{"data-slot":"command-item",className:s("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Vh({className:e,...t}){return o("span",{"data-slot":"command-shortcut",className:s("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function $h({...e}){return o(radixUi.ContextMenu.Root,{"data-slot":"context-menu",...e})}function Yh({...e}){return o(radixUi.ContextMenu.Trigger,{"data-slot":"context-menu-trigger",...e})}function Kh({...e}){return o(radixUi.ContextMenu.Group,{"data-slot":"context-menu-group",...e})}function Xh({...e}){return o(radixUi.ContextMenu.Portal,{"data-slot":"context-menu-portal",...e})}function Jh({...e}){return o(radixUi.ContextMenu.Sub,{"data-slot":"context-menu-sub",...e})}function Qh({...e}){return o(radixUi.ContextMenu.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function Zh({className:e,inset:t,children:n,...a}){return u(radixUi.ContextMenu.SubTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:s("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[n,o(lucideReact.ChevronRightIcon,{className:"ml-auto"})]})}function ey({className:e,...t}){return o(radixUi.ContextMenu.SubContent,{"data-slot":"context-menu-sub-content",className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function ty({className:e,...t}){return o(radixUi.ContextMenu.Portal,{children:o(radixUi.ContextMenu.Content,{"data-slot":"context-menu-content",className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function oy({className:e,inset:t,variant:n="default",...a}){return o(radixUi.ContextMenu.Item,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function ny({className:e,children:t,checked:n,...a}){return u(radixUi.ContextMenu.CheckboxItem,{"data-slot":"context-menu-checkbox-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...a,children:[o("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o(radixUi.ContextMenu.ItemIndicator,{children:o(lucideReact.CheckIcon,{className:"size-4"})})}),t]})}function ay({className:e,children:t,...n}){return u(radixUi.ContextMenu.RadioItem,{"data-slot":"context-menu-radio-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o(radixUi.ContextMenu.ItemIndicator,{children:o(lucideReact.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function ry({className:e,inset:t,...n}){return o(radixUi.ContextMenu.Label,{"data-slot":"context-menu-label","data-inset":t,className:s("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function iy({className:e,...t}){return o(radixUi.ContextMenu.Separator,{"data-slot":"context-menu-separator",className:s("bg-border -mx-1 my-1 h-px",e),...t})}function sy({className:e,...t}){return o("span",{"data-slot":"context-menu-shortcut",className:s("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var Fd={YYYY:"yyyy",YY:"yy",MM:"MM",M:"M",DD:"dd",D:"d"},_d=e=>{var t;return (t=Fd[e])!=null?t:e},Hd=/(YYYY|YY|MM|M|DD|D|HH|H|mm|m|ss|s)/g,Qn=e=>e.replace(Hd,t=>t==="HH"?"HH":t==="H"?"H":t==="mm"?"mm":t==="m"?"m":t==="ss"?"ss":t==="s"?"s":_d(t)),Zo=e=>!Number.isNaN(e.getTime()),Lt=class e{constructor(t){this.value=t;}create(t){return new e(t)}clone(){return this.create(new Date(this.value.getTime()))}add(t,n){switch(n){case "month":return this.create(dateFns.addMonths(this.value,t));case "year":return this.create(dateFns.addYears(this.value,t));default:return this.create(dateFns.addDays(this.value,t))}}subtract(t,n){return this.add(-t,n)}startOf(t){switch(t){case "month":return this.create(dateFns.startOfMonth(this.value));case "year":return this.create(dateFns.startOfYear(this.value));case "week":return this.create(dateFns.startOfWeek(this.value,{weekStartsOn:0}));default:return this.create(dateFns.startOfDay(this.value))}}endOf(t){if(t==="year")return this.create(dateFns.endOfYear(this.value));if(t==="month"){let r=dateFns.startOfMonth(this.value),i=dateFns.addDays(dateFns.addMonths(r,1),-1);return this.create(i)}let n=dateFns.startOfDay(this.value),a=dateFns.addDays(n,1);return this.create(dateFns.addDays(a,-1))}isSame(t,n="day"){switch(n){case "month":return dateFns.isSameMonth(this.value,t.toDate());case "year":return dateFns.isSameYear(this.value,t.toDate());case "week":return this.startOf("week").valueOf()===t.startOf("week").valueOf();default:return dateFns.isSameDay(this.value,t.toDate())}}isBefore(t,n){if(n){let a=this.startOf(n),r=t.startOf(n);return a.valueOf()<r.valueOf()}return dateFns.isBefore(this.value,t.toDate())}isAfter(t,n){if(n){let a=this.startOf(n),r=t.startOf(n);return a.valueOf()>r.valueOf()}return dateFns.isAfter(this.value,t.toDate())}format(t){return dateFns.format(this.value,Qn(t))}daysInMonth(){return dateFns.getDaysInMonth(this.value)}month(t){return typeof t=="number"?this.create(dateFns.setMonth(this.value,t)):this.value.getMonth()}year(t){return typeof t=="number"?this.create(dateFns.setYear(this.value,t)):this.value.getFullYear()}date(t){return typeof t=="number"?this.create(dateFns.setDate(this.value,t)):this.value.getDate()}isValid(){return Zo(this.value)}toDate(){return new Date(this.value.getTime())}valueOf(){return this.value.getTime()}},Od=e=>{if(e instanceof Lt)return e.toDate();if(e instanceof Date)return new Date(e.getTime());if(typeof e=="number")return new Date(e);if(typeof e=="string"){let t=new Date(e);if(Zo(t))return t}return new Date},rt=(e,t)=>{if(typeof e=="string"&&t){let n=dateFns.parse(e,Qn(t),new Date);return Zo(n)?new Lt(n):new Lt(new Date(NaN))}return new Lt(Od(e))},ti=(e,t)=>{let n=dateFns.parse(e,Qn(t),new Date);return Zo(n)?new Lt(n):null};function Zn(e){return Object.keys(e).reduce((t,n)=>{let a=e[n];return a&&(t[n]=a),t},{})}function my(e){let[t,n]=X.useState({values:e.initialValues,errors:{},fieldErrors:{},touched:{},isSubmitting:false,isValid:false,validationSequence:0}),a=X.useCallback((f=t.values)=>{let b=e.validate?e.validate(f):{},p=Zn({...b,...t.fieldErrors}),v=Object.keys(p).length===0;return n(y=>({...y,errors:p,isValid:v})),v},[e.validate,t.fieldErrors,t.values]),r=X.useCallback((f,b)=>{n(p=>{let v={...p.values,[f]:b},y={...p.fieldErrors};delete y[f];let x=e.validate?e.validate(v):{},N=Zn({...x,...y}),w=Object.keys(N).length===0;return {...p,values:v,fieldErrors:y,errors:N,isValid:w}});},[e.validate]),i=X.useCallback((f,b=true)=>{n(p=>({...p,touched:{...p.touched,[f]:b}}));},[]),c=X.useCallback((f,b)=>{n(p=>{let v={...p.fieldErrors};b?v[f]=b:delete v[f];let y=e.validate?e.validate(p.values):{},x=Zn({...y,...v}),N=Object.keys(x).length===0;return {...p,fieldErrors:v,errors:x,isValid:N}});},[e.validate]),d=X.useCallback(()=>{n(f=>({...f,validationSequence:f.validationSequence+1}));},[]),l=X.useCallback(f=>{let{name:b,value:p}=f.target;r(b,p);},[r]),g=X.useCallback(f=>{let{name:b}=f.target;i(b,true),a();},[i,a]),m=X.useCallback(async f=>{f&&(f.preventDefault(),f.stopPropagation()),n(v=>{let y=Object.keys(v.values).reduce((x,N)=>(x[N]=true,x),{});return {...v,touched:y,validationSequence:v.validationSequence+1}});let b=t.values;if(a(b)&&!(Object.keys(t.fieldErrors).length>0)){n(v=>({...v,isSubmitting:true}));try{await e.onSubmit(b);}catch(v){console.error("Form submission error:",v);}finally{n(v=>({...v,isSubmitting:false}));}}},[e.onSubmit,a,t.values]),C=X.useCallback(()=>{n({values:e.initialValues,errors:{},fieldErrors:{},touched:{},isSubmitting:false,isValid:false,validationSequence:0});},[e.initialValues]);return {...t,...{setFieldValue:r,setFieldTouched:i,setFieldError:c,handleChange:l,handleBlur:g,handleSubmit:m,resetForm:C,validateForm:()=>a(),triggerValidation:d},form:{values:t.values,errors:t.errors,fieldErrors:t.fieldErrors,touched:t.touched,validationSequence:t.validationSequence,setFieldValue:(f,b)=>{r(f,b);},setFieldError:(f,b)=>{c(f,b);},setFieldTouched:(f,b)=>{i(f,b);},handleChange:l,handleBlur:g,handleSubmit:m,resetForm:C,validateForm:()=>a(),triggerValidation:d,isSubmitting:t.isSubmitting,isValid:t.isValid}}}var oi=768;function ea(){var i,c;if(typeof window=="undefined")return false;let e=window.innerWidth<oi,t=window.navigator,n=(t.userAgent||"").toLowerCase(),a=/android|iphone|ipad|ipod|blackberry|iemobile|opera mini/.test(n),r=(c=(i=t.userAgentData)==null?void 0:i.mobile)!=null?c:false;return e||a||r}function Ye(){let[e,t]=X__namespace.useState(()=>ea());return X__namespace.useEffect(()=>{let n=window.matchMedia(`(max-width: ${oi-1}px)`),a=()=>{t(ea());};return typeof n.addEventListener=="function"?n.addEventListener("change",a):typeof n.addListener=="function"&&n.addListener(a),t(ea()),()=>{typeof n.removeEventListener=="function"?n.removeEventListener("change",a):typeof n.removeListener=="function"&&n.removeListener(a);}},[]),e}var ni=e=>({title:"",subtitle:void 0,supportingText:void 0,heroBadge:void 0,icon:void 0,back:void 0,actions:void 0,variant:void 0,...e}),ai=e=>{let t=X.useMemo(()=>ni(e),[e]),[n,a]=X.useState([t]),r=n[n.length-1],i=n.length>1,c=X.useCallback(m=>{a(C=>{let R=[...C],f=R.length-1;return R[f]={...t,...m},R});},[t]),d=X.useCallback(m=>{a(C=>[...C,{...t,...m}]);},[t]),l=X.useCallback(()=>{i&&a(m=>m.slice(0,-1));},[i]),g=X.useCallback(m=>{a([ni(m!=null?m:t)]);},[t]);return {header:r,navigationState:r,navigationStack:n,setHeader:c,navigateTo:d,navigateBack:l,canGoBack:i,resetNavigation:g}},Ud=()=>{let e=globalThis;return e.__GOMENIUCIVAN_MOBILE_HEADER_CONTEXT__||(e.__GOMENIUCIVAN_MOBILE_HEADER_CONTEXT__=X.createContext(null)),e.__GOMENIUCIVAN_MOBILE_HEADER_CONTEXT__},ri=Ud(),ii=({initialState:e,children:t})=>{let n=ai(e);return o(ri.Provider,{value:n,children:t})},si=e=>{let t=X.useContext(ri);return t||ai(e)};var qd=400,di=200,ui=.95,pi=()=>typeof window=="undefined"?"":`${window.location.pathname}${window.location.search}${window.location.hash}`,mi=(e,t)=>{if(typeof window=="undefined")return ()=>{};let n=window.history,a=n[e];return a?(n[e]=function(...i){let c=a.apply(this,i);return t(),c},()=>{n[e]=a;}):()=>{}},Wd=(e,t)=>{if(typeof window=="undefined")return ()=>{};let n=[],a=null,r={current:pi()},i=()=>{a&&window.clearTimeout(a),a=window.setTimeout(()=>{a=null,t();},qd);},c=()=>{let m=pi();if(m===r.current){t();return}r.current=m,e(),i();};n.push(mi("pushState",c)),n.push(mi("replaceState",c));let d=()=>{c();};window.addEventListener("popstate",d),n.push(()=>window.removeEventListener("popstate",d));let l=()=>{c();};window.addEventListener("hashchange",l),n.push(()=>window.removeEventListener("hashchange",l));let g=()=>{a&&(window.clearTimeout(a),a=null),t();};return window.addEventListener("load",g),window.addEventListener("pageshow",g),n.push(()=>{window.removeEventListener("load",g),window.removeEventListener("pageshow",g);}),()=>{n.forEach(m=>m()),a&&window.clearTimeout(a);}},$d=({color:e,framework:t})=>{let[n,a]=X.useState(false),r=X.useRef(n),[i,c]=X.useState(0),d=X.useRef(null),l=X.useRef(null),g=X.useCallback(()=>{l.current&&(window.clearTimeout(l.current),l.current=null),r.current=true,a(true),c(R=>R>0&&R<.2?R:.2);},[]),m=X.useCallback(()=>{r.current&&(d.current&&(window.clearTimeout(d.current),d.current=null),c(1),l.current=window.setTimeout(()=>{r.current=false,a(false),c(0);},200));},[]);X.useEffect(()=>{r.current=n;},[n]),X.useEffect(()=>typeof window=="undefined"?()=>{}:Wd(g,m),[g,m,t]),X.useEffect(()=>{if(!n){d.current&&(window.clearTimeout(d.current),d.current=null);return}let R=()=>{c(f=>{if(f>=ui)return f;let b=(1-f)*.1;return Math.min(f+b,ui)}),d.current=window.setTimeout(R,di);};return d.current=window.setTimeout(R,di),()=>{d.current&&(window.clearTimeout(d.current),d.current=null);}},[n]),X.useEffect(()=>()=>{d.current&&window.clearTimeout(d.current),l.current&&window.clearTimeout(l.current);},[]);let C=X.useMemo(()=>({position:"fixed",top:0,left:0,height:"2px",width:`${Math.max(i*100,0)}%`,backgroundColor:e,boxShadow:"0 0 8px rgba(0, 0, 0, 0.15)",opacity:n?1:0,transition:"width 0.2s ease, opacity 0.2s ease",transform:"translateZ(0)",zIndex:9999}),[e,i,n]);return o("div",{"aria-hidden":"true",style:C})},nn=$d;var fi=({color:e,framework:t})=>o(nn,{color:e,framework:t});var gi=({color:e,framework:t})=>o(nn,{color:e,framework:t});var Yd={nextjs:gi},bi=e=>{var t;return (t=Yd[e])!=null?t:fi};var vi=({color:e,framework:t})=>{let n=bi(t);return typeof window=="undefined"?null:o(n,{color:e,framework:t})};var oa=e=>{if(e===void 0||e===""||e===null||e==="undefined"||e==="null")return true;let t=e.toString();try{t=t.trim();}catch{return true}return !t||t.length===0};var It=e=>{if(oa(e))return false;if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.toLowerCase();return t==="true"||t==="yes"||t==="1"}else return !!e};var xi,it=typeof process!="undefined"&&!!((xi=process==null?void 0:process.versions)!=null&&xi.node),na=null,aa=null,wi=Function("specifier","return import(specifier);"),Ft=()=>it?(na||(na=wi("node:"+["fs","promises"].join("/"))),na):null,Co=()=>it?(aa||(aa=wi("node:path")),aa):null,hi={debug:10,info:20,warning:30,error:40,critical:50},Kd=30,Xd=1e3,Jd=20,Qd=e=>e===false?null:typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):Kd,yi=e=>{var d,l,g,m,C,R,f;let t=typeof process!="undefined"?(d=process==null?void 0:process.env)==null?void 0:d.NODE_ENV:void 0,n=Qd(e==null?void 0:e.storeDays),a=(l=e==null?void 0:e.level)!=null?l:"info",r=(g=e==null?void 0:e.consoleLogging)!=null?g:t!=="production",c=!!(e!=null&&e.enable)&&(t==="production"||!!(e!=null&&e.writeToFileInDev))&&it;return {enable:!!(e!=null&&e.enable),level:a,retentionDays:n,json:!!(e!=null&&e.json),slowRequestThresholdMs:(m=e==null?void 0:e.slowRequestThresholdMs)!=null?m:Xd,maxFileSizeBytes:Math.max(1,(C=e==null?void 0:e.maxFileSizeMB)!=null?C:Jd)*1024*1024,directory:(R=e==null?void 0:e.directory)!=null?R:"monitoring",consoleLogging:r,captureUnhandled:(f=e==null?void 0:e.captureUnhandled)!=null?f:true,writeToFile:c}},Zd=(e,t)=>hi[e]>=hi[t],eu=e=>{var t;if(e)return e instanceof Error?{name:e.name,message:e.message,stack:e.stack}:typeof e=="object"?{name:e.name,message:String((t=e.message)!=null?t:e),stack:e.stack,raw:e}:{message:String(e)}},tu=e=>typeof(e==null?void 0:e.then)=="function",an=class{constructor(t){this.directoryCache=null;this.initialized=false;this.options=yi(t),this.publicApi=this.createPublicApi(),this.options.enable&&this.initialize();}get api(){return this.publicApi}updateOptions(t){let n=this.options.enable,a=this.options.level,r=this.options.json,i=this.options.slowRequestThresholdMs,c=this.options.retentionDays,d=this.options.directory,l=this.options.writeToFile;if(this.options=yi(t),this.options.directory!==d&&(this.directoryCache=null),!this.options.enable){this.detachProcessHandlers();return}(!n||this.options.level!==a||this.options.json!==r||this.options.slowRequestThresholdMs!==i||this.options.retentionDays!==c||this.options.directory!==d||this.options.writeToFile!==l)&&this.initialize();}async initialize(){if(this.initialized){await this.ensureDirectory(),this.options.retentionDays!==null&&await this.purgeLogs(),this.ensureProcessHandlers();return}await this.ensureDirectory(),this.options.retentionDays!==null&&await this.purgeLogs(),this.ensureProcessHandlers(),this.initialized=true;}createPublicApi(){return {log:(t,n,a)=>this.log(t,n,a),debug:(t,n)=>this.log("debug",t,n),info:(t,n)=>this.log("info",t,n),warning:(t,n)=>this.log("warning",t,n),error:(t,n)=>this.log("error",t,n),critical:(t,n)=>this.log("critical",t,n),logRequest:t=>this.logRequest(t),monitorRequest:(t,n)=>this.monitorRequest(t,n),deleteLogFile:t=>this.deleteLogFile(t),purgeLogs:()=>this.purgeLogs(),listLogFiles:()=>this.listLogFiles(),getLogDirectory:()=>this.getDirectoryPath(),getOptions:()=>this.options,updateOptions:t=>this.updateOptions(t)}}async getDirectoryPath(){if(!it)return null;if(this.directoryCache)return this.directoryCache;let t=await Co();if(!t)return null;let n=this.options.directory,a=t.isAbsolute(n)?n:t.join(process.cwd(),n);return this.directoryCache=a,a}async ensureDirectory(){if(!this.options.enable||!it)return;let t=await Ft(),n=await this.getDirectoryPath();if(!(!t||!n))try{await t.mkdir(n,{recursive:!0});}catch(a){this.options.consoleLogging&&console.error("[monitoring] Failed to create directory",a);}}ensureProcessHandlers(){if(!this.options.enable||!this.options.captureUnhandled||!it)return;let t=process;if(!(t!=null&&t.on)||this.processHandlers)return;let n=(...r)=>{let[i]=r;this.log("critical","Uncaught exception detected",{error:i});},a=(...r)=>{let[i]=r;this.log("error","Unhandled promise rejection detected",{error:i});};t.on("uncaughtException",n),t.on("unhandledRejection",a),this.processHandlers={exception:n,rejection:a};}detachProcessHandlers(){if(!this.processHandlers||!it)return;let t=process,{exception:n,rejection:a}=this.processHandlers;t!=null&&t.off?(t.off("uncaughtException",n),t.off("unhandledRejection",a)):t!=null&&t.removeListener&&(t.removeListener("uncaughtException",n),t.removeListener("unhandledRejection",a)),this.processHandlers=void 0;}resolveLogEntry(t,n,a){let r=a==null?void 0:a.context,i=eu(a==null?void 0:a.error),{error:c,context:d,metadata:l,...g}=a!=null?a:{},m={};return l&&typeof l=="object"&&(m.metadata=l),Object.assign(m,g),{timestamp:new Date,level:t,message:n,context:r,error:i,metadata:Object.keys(m).length>0?m:void 0}}async log(t,n,a){if(!Zd(t,this.options.level))return;let i=this.resolveLogEntry(t,n,a);this.options.consoleLogging&&this.consoleLog(i),!(!this.options.enable||!this.options.writeToFile||!it)&&(await this.writeLogEntry(i),this.options.retentionDays!==null&&await this.purgeLogs());}consoleLog(t){let n=t.timestamp.toISOString(),a={...t.metadata,context:t.context,error:t.error},r=[`[monitoring] ${n} [${t.level.toUpperCase()}] ${t.message}`,a];switch(t.level){case "error":case "critical":console.error(...r);break;case "warning":console.warn(...r);break;case "info":console.info(...r);break;default:console.debug(...r);break}}async writeLogEntry(t){let n=await Ft(),a=await Co(),r=await this.getDirectoryPath();if(!(!n||!a||!r))try{let i=await this.resolveLogFilePath(r);if(!i)return;let c=this.options.json?this.serializeJsonEntry(t):this.serializeTextEntry(t);await n.appendFile(i,c+`
8
+ `);}catch(i){this.options.consoleLogging&&console.error("[monitoring] Failed to write log entry",i);}}serializeTextEntry(t){let a=[`[${t.timestamp.toISOString()}]`,`[${t.level.toUpperCase()}]`,t.message];return t.context&&Object.keys(t.context).length>0&&a.push(`context=${JSON.stringify(t.context)}`),t.metadata&&Object.keys(t.metadata).length>0&&a.push(`metadata=${JSON.stringify(t.metadata)}`),t.error&&a.push(`error=${JSON.stringify(t.error)}`),a.join(" ")}serializeJsonEntry(t){return JSON.stringify({timestamp:t.timestamp.toISOString(),level:t.level,message:t.message,context:t.context,metadata:t.metadata,error:t.error})}async resolveLogFilePath(t){let n=await Ft(),a=await Co();if(!n||!a)return null;let r=new Date,i=[r.getFullYear(),String(r.getMonth()+1).padStart(2,"0"),String(r.getDate()).padStart(2,"0")].join("-"),c=this.options.json?"jsonl":"log",d=`${i}.${c}`,l=a.join(t,d);if(!await this.isFileExceedingSize(l))return l;let g=1;for(;;){let m=`${i}-${g}.${c}`,C=a.join(t,m);if(!await this.isFileExceedingSize(C))return C;g+=1;}}async isFileExceedingSize(t){let n=await Ft();if(!n)return false;try{return (await n.stat(t)).size>=this.options.maxFileSizeBytes}catch(a){if(a.code==="ENOENT")return false;throw a}}async logRequest(t){var c,d,l;let n=(c=t.thresholdMs)!=null?c:this.options.slowRequestThresholdMs;if(t.durationMs<n)return;let a=((d=t.method)!=null?d:"REQUEST").toUpperCase(),r=`Slow request detected for ${a} ${(l=t.url)!=null?l:""}`,i=t.durationMs>=n*2?"error":"warning";await this.log(i,r,{context:{method:a,url:t.url,durationMs:t.durationMs,statusCode:t.statusCode,thresholdMs:n},metadata:t.metadata});}async monitorRequest(t,n){let a=Date.now();try{let r=n();return tu(r)?await r:r}catch(r){throw await this.log("error","Monitored request failed",{context:{method:t.method,url:t.url,operationName:t.operationName,statusCode:t.statusCode},error:r}),r}finally{let r=Date.now()-a;await this.logRequest({...t,durationMs:r});}}async purgeLogs(){if(!this.options.enable||this.options.retentionDays===null)return;let t=await Ft(),n=await Co(),a=await this.getDirectoryPath();if(!(!t||!n||!a))try{let r=await t.readdir(a,{withFileTypes:!0}),i=Date.now()-this.options.retentionDays*24*60*60*1e3;await Promise.all(r.filter(c=>c.isFile()).map(async c=>{let d=n.join(a,c.name);try{(await t.stat(d)).mtime.getTime()<i&&await t.rm(d,{force:!0});}catch(l){this.options.consoleLogging&&console.warn("[monitoring] Failed to purge log file",l);}}));}catch(r){this.options.consoleLogging&&console.error("[monitoring] Failed to read monitoring directory",r);}}async deleteLogFile(t){if(!it)return;let n=await Ft(),a=await Co(),r=await this.getDirectoryPath();if(!(!n||!a||!r))try{if(!t){let d=await n.readdir(r,{withFileTypes:!0});await Promise.all(d.map(async l=>{let g=a.join(r,l.name);await n.rm(g,{force:!0,recursive:l.isDirectory()});}));return}let i=a.basename(t),c=a.join(r,i);await n.rm(c,{force:!0});}catch(i){this.options.consoleLogging&&console.error("[monitoring] Failed to delete log file",i);}}async listLogFiles(){if(!it)return [];let t=await Ft(),n=await this.getDirectoryPath();if(!t||!n)return [];try{return (await t.readdir(n)).sort()}catch(a){return this.options.consoleLogging&&console.error("[monitoring] Failed to list log files",a),[]}}},_t=null,ou=()=>(_t||(_t=new an),_t),rn=e=>(_t?_t.updateOptions(e):_t=new an(e),_t.api),Ri=()=>ou().api,nu=e=>{let t=X__namespace.useRef();return X__namespace.useEffect(()=>{if(!e)return;let n=t.current,a=JSON.stringify(e),r=n?JSON.stringify(n):void 0;a!==r&&(t.current=e,rn(e));},[e]),X__namespace.useMemo(()=>Ri(),[])};function To(e,t="info",n){let{title:a,description:r,duration:i=4e3,action:c}=n||{},d={duration:i,...c&&{action:{label:c.label,onClick:c.onClick}}};switch(t){case "success":sonner.toast.success(a||e,{description:r,...d});break;case "error":sonner.toast.error(a||e,{description:r,...d});break;case "warning":sonner.toast.warning(a||e,{description:r,...d});break;case "info":default:sonner.toast.info(a||e,{description:r,...d});break}}var au=(e,t)=>To(e,"success",t),ru=(e,t)=>To(e,"error",t),iu=(e,t)=>To(e,"warning",t),su=(e,t)=>To(e,"info",t);var lu=()=>{var e,t,n;if(typeof process!="undefined"){let a=(e=process.env)!=null?e:{};if(a.VERCEL==="1"||a.NODE_ENV==="development"||a.VITE_DEV_SERVER_URL||a.NEXT_PHASE||a.__NEXT_PREVIEW_MODE)return true}if(typeof window!="undefined"){let a=(n=(t=window.location)==null?void 0:t.hostname)!=null?n:"";if(a==="localhost"||a==="127.0.0.1")return true}return false},Ci="../styles/style.css",cu="@gomeniucivan/ui/style.css";(async()=>{if(lu()){await import(Ci);return}try{await import(cu);}catch{await import(Ci);}})();var Ti=X.createContext(void 0),pu={enabled:false,framework:"auto",fieldName:"auto",fieldCy:"auto"},mu=new Set(["","email","number","password","search","tel","text","url","date","datetime-local","month","time","week"]),fu=()=>{var n;if(typeof window!="undefined"){if(window.__NEXT_DATA__)return "nextjs";if(window.__vite_plugin_react_preamble_installed__)return "vite"}if(typeof document!="undefined"&&document.querySelector('script[src*="@vite/client"]'))return "vite";let e=typeof globalThis!="undefined"&&(n=globalThis.process)!=null?n:void 0,t=e==null?void 0:e.env;if(t){if(t.NEXT_PHASE||t.__NEXT_PREVIEW_MODE)return "nextjs";if(t.VITE_DEV_SERVER_URL||t.VITE_USER_NODE_ENV)return "vite";if(t.BABEL_ENV)return "babel";if(t.WEBPACK||t.WEBPACK_DEV_SERVER)return "webpack"}return typeof globalThis!="undefined"&&globalThis.__webpack_require__?"webpack":"unknown"},gu=e=>{var d;let t={...pu,...e!=null?e:{}},n=(d=t.framework)!=null?d:"auto",a=n==="auto"?fu():n,r=!!t.enabled,i=t.fieldName==="auto"?r:!!t.fieldName,c=t.fieldCy==="auto"?r:!!t.fieldCy;return {enabled:r,debug:r,framework:a,requestedFramework:n,fieldName:i,fieldCy:c}},ox=({children:e,defaultTheme:t="system",nativeApp:n=false,extras:a,monitoring:r,siderbar:i})=>{var P,T,H,O,W;let[c,d]=X.useState(!!n),l=Ye(),g=X.useMemo(()=>nr(),[]),m=X.useMemo(()=>{let D=gu(a);return rr(g,D),D},[a,g]),C=X.useMemo(()=>r||{enable:false},[r]);X.useEffect(()=>{rn(C);},[C]),X.useEffect(()=>()=>{ir(g);},[g]),X.useEffect(()=>{d(!!n);},[n]);let R=()=>{var F;if(typeof window=="undefined")return t==="system"?"auto":t;let D=(F=window.localStorage)==null?void 0:F.getItem(qt);return Gt(D)?D:t==="system"?"auto":t},[f,b]=X.useState(()=>R()),[p,v]=X.useState(()=>ho(R())),[y,x]=X.useState(null);X.useEffect(()=>{v(ho(f)),ur(f);},[f]),X.useEffect(()=>{var A;if(typeof window=="undefined")return;let D=(A=window.localStorage)==null?void 0:A.getItem(qt);if(Gt(D))return;let F=t==="system"?"auto":t;b(k=>k===F?k:F);},[t]),X.useEffect(()=>{if(typeof window=="undefined"||f!=="auto")return;let D=window.matchMedia("(prefers-color-scheme: dark)"),F=k=>{let U=k.matches?"dark":"light";v(V=>V===U?V:U),jo("auto");},A=ho("auto");return v(k=>k===A?k:A),jo("auto"),D.addEventListener("change",F),()=>D.removeEventListener("change",F)},[f]),X.useEffect(()=>{if(typeof window=="undefined")return;let D=F=>{let A=F.detail;A&&b(k=>k===A?k:A);};return window.addEventListener(Vo,D),()=>window.removeEventListener(Vo,D)},[]),X.useEffect(()=>{if(typeof window=="undefined")return;let D=F=>{if(F.key!==qt||!F.newValue||!Gt(F.newValue))return;let A=F.newValue;b(k=>k===A?k:A);};return window.addEventListener("storage",D),()=>window.removeEventListener("storage",D)},[]);let N=p==="dark";X.useEffect(()=>{if(typeof document=="undefined")return;let D=document.documentElement;D.dataset.framework=m.framework,D.dataset.debug=m.enabled?"true":"false";},[m]);let w=c,S=w||l;X.useEffect(()=>{if(typeof document=="undefined"||typeof window=="undefined"||!S)return;let D=150,F=q=>q instanceof HTMLElement?q.isContentEditable||q instanceof HTMLTextAreaElement?true:q instanceof HTMLInputElement?mu.has(q.type):false:false,A=q=>{let j=q.getBoundingClientRect(),G=window.innerHeight||document.documentElement.clientHeight,_=window.innerWidth||document.documentElement.clientWidth,te=j.top>=0&&j.bottom<=G,K=j.left>=0&&j.right<=_;return te&&K},k=q=>{window.setTimeout(()=>{A(q)||q.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});},D);},U=q=>{if(!(q instanceof Element))return null;if(F(q))return q;let j=q.closest('input, textarea, [contenteditable="true"]');return j&&F(j)?j:null},V=q=>{let j=U(q.target);j&&k(j);},B=q=>{if(q.pointerType&&q.pointerType!=="touch"&&q.pointerType!=="pen")return;let j=U(q.target);j&&k(j);};return document.addEventListener("focusin",V,true),document.addEventListener("pointerdown",B,true),()=>{document.removeEventListener("focusin",V,true),document.removeEventListener("pointerdown",B,true);}},[S]);let h=X.useCallback(D=>{b(F=>F===D?F:D);},[b]),E=X.useCallback(D=>{h(D?"dark":"light");},[h]),L=X.useMemo(()=>N?"#fff":"#000",[N]),M={isDarkMode:N,themeMode:f,isNativeApp:c,isNativeLike:w,isNative:w,extras:m,nativeOverlayContainer:y,setIsDarkMode:E,setThemeMode:h,setNativeApp:d,setNativeOverlayContainer:x};return o(Ti.Provider,{value:M,children:u(lr,{children:[o(vi,{color:L,framework:m.framework}),u(ra,{delayDuration:0,children:[It(i==null?void 0:i.show)&&u(Ni,{children:[u(Si,{...i==null?void 0:i.props,children:[It((P=i==null?void 0:i.header)==null?void 0:P.show)&&o(ki,{children:o(Li,{children:o(Ii,{children:o(Fi,{asChild:true,className:"data-[slot=sidebar-menu-button]:!p-1.5",children:"Header"})})})}),It((T=i==null?void 0:i.content)==null?void 0:T.show)&&o(Di,{children:(H=i==null?void 0:i.content)==null?void 0:H.children}),It((O=i==null?void 0:i.footer)==null?void 0:O.show)&&o(Ei,{children:(W=i==null?void 0:i.footer)==null?void 0:W.children})]}),o(Mi,{"data-content-layout":i==null?void 0:i.contentLayout,className:s("data-[content-layout=centered]:!mx-auto data-[content-layout=centered]:max-w-screen-2xl","max-[113rem]:peer-data-[variant=inset]:!mr-2 min-[101rem]:peer-data-[variant=inset]:peer-data-[state=collapsed]:!mr-auto"),children:o("div",{className:"h-full p-4 md:p-6",children:e})})]}),!It(i==null?void 0:i.show)&&o(jsxRuntime.Fragment,{children:e})]})]})})},vt=()=>{let e=X.useContext(Ti);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},nx=()=>{let{extras:e}=vt();return e};var ia=X__namespace.forwardRef(({className:e,...t},n)=>u("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[o("path",{d:"M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7Z"}),o("circle",{cx:12,cy:12,r:3})]}));ia.displayName="EyeIcon";var sa=X__namespace.forwardRef(({className:e,...t},n)=>u("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[o("path",{d:"M3.12 3.12 5.3 5.3C3.42 6.78 2 9 2 9s4 7 10 7a9.78 9.78 0 0 0 4.68-1.07l1.92 1.92M9.88 9.88a3 3 0 0 0 4.24 4.24"}),o("path",{d:"M10.73 5.08A9.77 9.77 0 0 1 12 5c6 0 10 7 10 7a16.85 16.85 0 0 1-3.24 4.13"}),o("line",{x1:1,x2:23,y1:1,y2:23})]}));sa.displayName="EyeOffIcon";var qe=X__namespace.forwardRef(({className:e,type:t,onFocus:n,...a},r)=>{let i=X__namespace.useCallback(b=>{typeof r=="function"?r(b):r&&(r.current=b);},[r]),c=X__namespace.useCallback(b=>{n==null||n(b),!b.defaultPrevented&&Go(b.currentTarget);},[n]),[d,l]=X__namespace.useState(false),g=t!=null?t:"text",m=g==="password",C=m&&d?"text":g;X__namespace.useEffect(()=>{!m&&d&&l(false);},[m,d]);let R=d?"Hide password":"Show password",f=s(at,"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-0","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",m?"pr-10":void 0,e);return m?u("div",{className:s("relative inline-flex w-full",e),children:[o("input",{ref:i,type:C,"data-slot":"input",onFocus:c,className:f,...a}),m&&o("button",{type:"button",onClick:()=>l(b=>!b),className:"ring-offset-background focus-visible:ring-ring absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground transition-colors hover:text-foreground focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1","aria-label":R,"aria-pressed":d,children:d?o(sa,{"aria-hidden":true,className:"size-4"}):o(ia,{"aria-hidden":true,className:"size-4"})})]}):o("input",{ref:i,type:C,"data-slot":"input",onFocus:c,className:f,...a})});qe.displayName="Input";var la=(e,t)=>{if(typeof t=="number"){let n=Math.pow(10,t);return (Math.round(e*n)/n).toString()}return e.toString()},bu=e=>e==null?"":typeof e=="number"?e.toString():e.trim(),vu=e=>e===0?/^-?\d*$/:typeof e=="number"?new RegExp(`^-?\\d*(\\.\\d{0,${e}})?$`):/^-?\d*(\.\d*)?$/,hu=e=>e===""||e==="-"||e==="."||e==="-.",ca=(e,t)=>{if(hu(e))return null;let n=Number(e);if(Number.isNaN(n))return null;if(typeof t=="number"){let a=Math.pow(10,t);return Math.round(n*a)/a}return n},da=X__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,min:a,max:r,decimals:i,formatter:c,parser:d,onBlur:l,onFocus:g,inputMode:m,pattern:C,...R},f)=>{let b=X__namespace.useMemo(()=>vu(i),[i]),p=X__namespace.useMemo(()=>{var P;let M=(P=e!=null?e:t)!=null?P:null;return M===null?"":la(M,i)},[e,t,i]),[v,y]=X__namespace.useState(p),[x,N]=X__namespace.useState(false);X__namespace.useEffect(()=>{if(e===void 0)return;let M=e===null?"":la(e,i);y(P=>P===M?P:M);},[e,i]);let w=X__namespace.useCallback(M=>{if(M===null)return null;let P=M;return typeof a=="number"&&(P=Math.max(a,P)),typeof r=="number"&&(P=Math.min(r,P)),P},[a,r]),S=M=>{let P=d?bu(d(M.target.value)):M.target.value;if(!b.test(P)&&P!=="")return;y(P);let T=ca(P,i);n==null||n(T);},h=M=>{N(true),g==null||g(M);},E=M=>{N(false);let P=ca(v,i),T=w(P);if(T===null)v!==""&&(y(""),n==null||n(null));else if(T!==P){let H=la(T,i);y(H),n==null||n(T);}l==null||l(M);},L=X__namespace.useMemo(()=>{if(x)return v;if(c){let M=ca(v,i),P=M!=null?M:v===""?null:v;return c(P)}return v},[c,x,v,i]);return o(qe,{ref:f,value:L,onChange:S,onFocus:h,onBlur:E,inputMode:m!=null?m:i===0?"numeric":"decimal",pattern:C!=null?C:i===0?"-?\\d*":void 0,...R})});da.displayName="InputNumeric";var Oi="X",yu=e=>e.replace(/\D/g,""),xu=(e,t)=>e.split("").reduce((n,a)=>a===t?n+1:n,0),wu=(e,t,n)=>{if(!t)return e;let a="",r=0;for(let i of t)if(i===n)if(r<e.length)a+=e[r],r+=1;else break;else (e.length>0||a.length>0)&&(a+=i);return a},ua=X__namespace.forwardRef(({mask:e,placeholderChar:t=Oi,value:n,defaultValue:a,onChange:r,inputMode:i,...c},d)=>{var p;let l=(p=t[0])!=null?p:Oi,g=X__namespace.useMemo(()=>xu(e,l),[e,l]),m=X__namespace.useCallback(v=>{if(!v)return "";let y=yu(v);return g===0?"":y.slice(0,g)},[g]),[C,R]=X__namespace.useState(()=>{var v;return m((v=n!=null?n:a)!=null?v:"")});X__namespace.useEffect(()=>{if(n===void 0)return;let v=m(n);R(y=>y===v?y:v);},[n,m]),X__namespace.useEffect(()=>{n===void 0&&R(v=>m(v));},[e,l,m,n]);let f=v=>{let y=m(v.target.value);n===void 0&&R(y),r==null||r(y);},b=X__namespace.useMemo(()=>wu(C,e,l),[e,l,C]);return o(qe,{ref:d,value:b,onChange:f,inputMode:i!=null?i:"numeric",...c})});ua.displayName="InputMask";function Qt({...e}){return o(radixUi.Popover.Root,{"data-slot":"popover",...e})}function Ai({...e}){return o(radixUi.Popover.Trigger,{"data-slot":"popover-trigger",...e})}function Zt({className:e,align:t="center",sideOffset:n=4,...a}){return o(radixUi.Popover.Portal,{children:o(radixUi.Popover.Content,{"data-slot":"popover-content",align:t,sideOffset:n,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a})})}function cn({...e}){return o(radixUi.Popover.Anchor,{"data-slot":"popover-anchor",...e})}function eo({...e}){return o(vaul.Drawer.Root,{"data-slot":"drawer",...e})}function dn({...e}){return o(vaul.Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function Ru({...e}){return o(vaul.Drawer.Portal,{"data-slot":"drawer-portal",...e})}function un({...e}){return o(vaul.Drawer.Close,{"data-slot":"drawer-close",...e})}function Cu({className:e,...t}){return o(vaul.Drawer.Overlay,{"data-slot":"drawer-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function to({className:e,children:t,...n}){return u(Ru,{"data-slot":"drawer-portal",children:[o(Cu,{}),u(vaul.Drawer.Content,{"data-slot":"drawer-content",className:s("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[o("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function oo({className:e,...t}){return o("div",{"data-slot":"drawer-header",className:s("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function zi({className:e,...t}){return o("div",{"data-slot":"drawer-footer",className:s("mt-auto flex flex-col gap-2 p-4",e),...t})}function no({className:e,...t}){return o(vaul.Drawer.Title,{"data-slot":"drawer-title",className:s("text-foreground font-semibold",e),...t})}function Sx({className:e,...t}){return o(vaul.Drawer.Description,{"data-slot":"drawer-description",className:s("text-muted-foreground text-sm",e),...t})}var va="YYYY-MM-DD",Eu=["Su","Mo","Tu","We","Th","Fr","Sa"],Du=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pa={bottomLeft:{side:"bottom",align:"start"},bottomRight:{side:"bottom",align:"end"},topLeft:{side:"top",align:"start"},topRight:{side:"top",align:"end"}},Lu=e=>{var t;return e&&(t=pa[e])!=null?t:pa.bottomLeft},ji=e=>e?typeof e=="function"?[va]:Array.isArray(e)?e:[e]:[va],pn=(e,t)=>{if(!e)return "";if(typeof t=="function")return t(e);let n=ji(t),[a]=n;return e.format(a!=null?a:va)},Iu=(e,t)=>{let n=e.trim();if(!n)return null;if(t&&typeof t=="function"){let i=rt(n);return i.isValid()?i:null}let a=ji(t);for(let i of a){let c=ti(n,i);if(c!=null&&c.isValid())return c}let r=rt(n);return r.isValid()?r:null},ma=(e,t,n)=>{if(!e||!t)return false;switch(n){case "month":return e.isSame(t,"month");case "year":case "decade":return e.isSame(t,"year");default:return e.isSame(t,"day")}},Fu=e=>{let t=Math.floor(e.year()/10)*10;return e.year(t).startOf("year")},mn=e=>{let t=Fu(e),n=t.add(9,"year").endOf("year");return {start:t,end:n}},Ht=(e,t,n)=>{let a=e;return t&&a.isBefore(t)&&(a=t),n&&a.isAfter(n)&&(a=n),a},Ot=44,fn=5,Bi=40,fa=6,Vi=(e,t)=>t<=0?0:Math.min(Math.max(e,0),t),ga=({label:e,options:t,selectedValue:n,onValueChange:a,open:r,infinite:i=true})=>{let c=X__namespace.useRef(null),d=X__namespace.useRef(null),[l,g]=X__namespace.useState(()=>({start:0,end:Math.min(t.length,fn+fa)}));X__namespace.useEffect(()=>{i||g(x=>{if(t.length===0)return {start:0,end:0};let N=t.length-1,w=Math.min(x.start,N),S=fn+fa,h=Math.max(w+S,w+1),E=Math.min(t.length,h);return x.start===w&&x.end===E?x:{start:w,end:E}});},[i,t.length]);let m=X__namespace.useCallback(x=>{if(i||t.length===0)return;let N=Vi(x,t.length-1),w=fn+fa,S=Math.floor(w/2),h=Math.max(0,N-S),E=Math.min(t.length,N+S+1);g(L=>L.start===h&&L.end===E?L:{start:h,end:E});},[i,t.length]),C=X__namespace.useMemo(()=>{if(t.length===0)return [];if(!i)return t;let x=[];for(let N=0;N<Bi;N+=1)for(let w of t)x.push(w);return x},[i,t]),R=X__namespace.useCallback((x,N="auto")=>{if(!c.current||t.length===0||C.length===0)return;let w=t.findIndex(M=>M.value===x),S=w>=0?w:0,h=Math.floor(Bi/2),L=(i?S+t.length*h:S)*Ot;c.current.scrollTo({top:L,behavior:N}),i||m(S);},[C.length,i,t,m]);X__namespace.useLayoutEffect(()=>{r&&R(n);},[R,r,t,n]),X__namespace.useEffect(()=>{if(i||!r)return;let x=t.findIndex(N=>N.value===n);m(x>=0?x:0);},[i,r,t,n,m]),X__namespace.useEffect(()=>()=>{d.current!==null&&clearTimeout(d.current);},[]);let f=X__namespace.useCallback(x=>{C.length===0||t.length===0||(d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{var h,E;if(!c.current)return;let N=Math.round(c.current.scrollTop/Ot);i||(N=Vi(N,C.length-1));let w=C[N];if(!w)return;if(!a(w.value)){R(n,"smooth");return}if(i){let L=t.length,M=C.length-t.length-1;if(N<=L||N>=M)R(w.value);else {let P=N*Ot;(h=c.current)==null||h.scrollTo({top:P});}}else {m(N);let L=N*Ot;(E=c.current)==null||E.scrollTo({top:L});}},80));},[R,C,i,a,t,t.length,n,m]);if(t.length===0)return o("div",{className:"flex-1",children:o("p",{className:"text-center text-sm text-muted-foreground",children:"No options"})});let b=(fn-1)/2*Ot,p=i?C:t.slice(l.start,l.end),v=l.start*Ot,y=t.length*Ot;return u("div",{className:"flex flex-1 flex-col items-center gap-2",children:[o("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),u("div",{className:"relative h-56 w-full overflow-hidden",children:[o("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 border-y border-primary/30"}),o("div",{ref:c,onScroll:f,className:"h-56 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",style:{paddingTop:b,paddingBottom:b,WebkitOverflowScrolling:"touch"},children:i?C.map((x,N)=>{let w=`${N}-${x.value}`,S=x.value===n;return o("div",{className:s("flex h-11 items-center justify-center text-base transition-colors",S?"font-medium text-foreground":"text-muted-foreground"),children:x.label},w)}):o("div",{style:{height:y},children:o("div",{style:{transform:`translateY(${v}px)`},children:p.map((x,N)=>{let S=`${l.start+N}-${x.value}`,h=x.value===n;return o("div",{className:s("flex h-11 items-center justify-center text-base transition-colors",h?"font-medium text-foreground":"text-muted-foreground"),children:x.label},S)})})})})]})]})},_u=(e,t)=>e&&e!=="time"?e:t==="month"?"month":t==="year"?"year":"date",Hu=e=>{switch(e){case "month":case "year":return e;case "decade":return "year";default:return "day"}},Ou=(e,t,n,a="date")=>{let r=Hu(a);return !(t&&e.isBefore(t,r)||n&&e.isAfter(n,r))},Au=e=>{var t,n,a,r,i,c,d;return {placeholder:(t=e==null?void 0:e.placeholder)!=null?t:"Select date",today:(n=e==null?void 0:e.today)!=null?n:"Today",clear:(a=e==null?void 0:e.clear)!=null?a:"Clear",months:(r=e==null?void 0:e.months)!=null?r:Du,weekDays:(i=e==null?void 0:e.weekDays)!=null?i:Eu,yearFormat:(c=e==null?void 0:e.yearFormat)!=null?c:"YYYY",decadeFormat:(d=e==null?void 0:e.decadeFormat)!=null?d:((l,g)=>`${l.format("YYYY")}-${g.format("YYYY")}`)}},ba=e=>{let t=X__namespace.useRef(e);return X__namespace.useEffect(()=>{t.current=e;},[e]),t},zu="hsl(var(--primary))",ha=X__namespace.forwardRef((e,t)=>{var Wa,$a,Ya,Ka,Xa,Ja,Qa;let{value:n,defaultValue:a=null,onChange:r,onOpenChange:i,allowClear:c=true,autoFocus:d=false,defaultOpen:l,disabled:g=false,disabledDate:m,format:C,preserveInvalidOnBlur:R=false,inputReadOnly:f=false,locale:b,minDate:p,maxDate:v,mode:y,needConfirm:x=false,open:N,panelRender:w,picker:S,placeholder:h,placement:E="bottomLeft",prefix:L,presets:M,size:P="middle",status:T,variant:H="outlined",className:O,style:W,inputClassName:D,inputStyle:F,onFocus:A,onBlur:k,name:U,id:V,...B}=e,{isNative:q}=vt(),j=Ye(),G=q||j,[_,te]=X__namespace.useState(null),K=X__namespace.useMemo(()=>Au(b),[b]),ce=ba(r),le=ba(i),re=ba(C),ge=n!==void 0,[fe,$]=X__namespace.useState(a),ie=(Wa=ge?n:fe)!=null?Wa:null,pe=X__namespace.useMemo(()=>_u(y,S),[y,S]),[he,Re]=X__namespace.useState(pe),ne=X__namespace.useCallback(I=>{var z;ge||$(I),(z=ce.current)==null||z.call(ce,I,pn(I,re.current));},[re,ge,ce]),[oe,ye]=X__namespace.useState(ie);X__namespace.useEffect(()=>{ye(ie);},[ie]);let[de,we]=X__namespace.useState(()=>{let I=ie!=null?ie:rt();return Ht(I,p,v)}),Te=N!==void 0,[me,De]=X__namespace.useState(!!l),Pe=Te?!!N:me,Ne=X__namespace.useCallback(I=>{var z;Te||De(I),(z=le.current)==null||z.call(le,I);},[Te,le]),be=x?oe:ie;X__namespace.useEffect(()=>{Pe&&(Re(pe),we(I=>Ht(be!=null?be:I,p,v)));},[be,pe,v,p,Pe]);let[dt,xe]=X__namespace.useState(()=>pn(be,re.current)),Mt=X__namespace.useRef(false);X__namespace.useEffect(()=>{Mt.current||xe(pn(be,re.current));},[be,re]);let Ve=X__namespace.useMemo(()=>({"--date-primary-color":zu}),[]),xt=X__namespace.useRef(null),ot=X__namespace.useCallback(I=>{g||(Ne(I),I&&(Re(pe),we(z=>Ht(be!=null?be:z,p,v))));},[be,g,pe,v,p,Ne]),wt=X__namespace.useCallback(I=>Iu(I,re.current),[re]),Ee=X__namespace.useCallback((I,z)=>Ou(I,p,v,z)?m?m(I,{type:z}):false:true,[m,v,p]),Ce=X__namespace.useCallback(I=>pn(I,re.current),[re]),kt=X__namespace.useCallback(I=>{Ee(I,"date")||(x?(ye(I),xe(Ce(I))):(ne(I),xe(Ce(I)),Ne(false)));},[ne,Ce,Ee,x,Ne]),Vt=I=>{let z=de.month(I);if(we(z),pe==="month"){let Y=z.startOf("month");if(Ee(Y,"month"))return;x?(ye(Y),xe(Ce(Y))):(ne(Y),xe(Ce(Y)),Ne(false));}else Re("date");},ae=I=>{let z=de.year(I);if(we(z),pe==="year"){let Y=z.startOf("year");if(Ee(Y,"year"))return;x?(ye(Y),xe(Ce(Y))):(ne(Y),xe(Ce(Y)),Ne(false));}else Re("month");},Ke=I=>{let z=de.year(I);we(z),Re("year");},je=I=>{we(z=>{let Y=I==="date"?z.subtract(1,"month"):I==="month"?z.subtract(1,"year"):z.subtract(10,"year");return Ht(Y,p,v)});},ut=I=>{we(z=>{let Y=I==="date"?z.add(1,"month"):I==="month"?z.add(1,"year"):z.add(10,"year");return Ht(Y,p,v)});},Mn=()=>{let z=de.startOf("month").startOf("week"),Y=[];for(let Z=0;Z<6;Z+=1){let Fe=[];for(let $e=0;$e<7;$e+=1){let Se=z.add(Z*7+$e,"day"),pt=Se.month()===de.month()&&Se.year()===de.year(),bo=ma(Se,be,"date"),Rl=Se.isSame(rt(),"day"),Hn=Ee(Se,"date");Fe.push(o("button",{type:"button",disabled:Hn,onClick:()=>kt(Se),className:s("flex h-8 w-8 items-center justify-center rounded-md text-sm transition",!pt&&"text-muted-foreground/70",bo&&"bg-[var(--date-primary-color)] text-white",Rl&&!bo&&"border border-[var(--date-primary-color)]",Hn&&"cursor-not-allowed opacity-40",!Hn&&!bo&&"hover:bg-muted"),style:Ve,children:Se.date()},Se.format("YYYY-MM-DD")));}Y.push(o("div",{className:"grid grid-cols-7 gap-1",children:Fe},`week-${Z}`));}return u("div",{className:"space-y-1",children:[o("div",{className:"grid grid-cols-7 gap-1 text-center text-xs text-muted-foreground",children:K.weekDays.map(Z=>o("div",{children:Z},Z))}),o("div",{className:"space-y-1",children:Y})]})},Oo=()=>o("div",{className:"grid grid-cols-3 gap-2",children:K.months.map((I,z)=>{let Y=de.month(z),Z=ma(Y,be,"month"),Fe=Ee(Y.startOf("month"),"month");return o("button",{type:"button",disabled:Fe,onClick:()=>Vt(z),className:s("flex h-12 flex-col items-center justify-center rounded-md text-sm transition",Z&&"bg-[var(--date-primary-color)] text-white",Fe&&"cursor-not-allowed opacity-40",!Fe&&!Z&&"hover:bg-muted"),style:Ve,children:I},I)})}),kn=()=>{let{start:I}=mn(de),z=[];for(let Y=-1;Y<11;Y+=1)z.push(I.year()+Y);return o("div",{className:"grid grid-cols-4 gap-2",children:z.map(Y=>{let Z=de.year(Y),Fe=ma(Z,be,"year"),$e=Ee(Z.startOf("year"),"year"),Se=Y<I.year()||Y>I.year()+9;return o("button",{type:"button",disabled:$e,onClick:()=>ae(Y),className:s("flex h-12 flex-col items-center justify-center rounded-md text-sm transition",Fe&&"bg-[var(--date-primary-color)] text-white",$e&&"cursor-not-allowed opacity-40",!$e&&!Fe&&"hover:bg-muted",Se&&"text-muted-foreground/70"),style:Ve,children:Y},Y)})})},Ao=()=>{let{start:I}=mn(de),z=I.year()-10,Y=[];for(let Z=0;Z<12;Z+=1)Y.push(z+Z*10);return o("div",{className:"grid grid-cols-4 gap-2",children:Y.map(Z=>{let Fe=Z+9,$e=be==null?void 0:be.year(),Se=$e!==void 0&&$e>=Z&&$e<=Fe,pt=Ee(de.year(Z).startOf("year"),"year"),bo=Fe<I.year()||Z>I.year()+9;return u("button",{type:"button",disabled:pt,onClick:()=>Ke(Z),className:s("flex h-12 flex-col items-center justify-center rounded-md text-sm transition",Se&&"bg-[var(--date-primary-color)] text-white",pt&&"cursor-not-allowed opacity-40",!pt&&!Se&&"hover:bg-muted",bo&&"text-muted-foreground/70"),style:Ve,children:[Z,"-",Fe]},`${Z}-${Fe}`)})})},En=()=>{switch(he){case "month":return Oo();case "year":return kn();case "decade":return Ao();default:return Mn()}},Dn=I=>{Mt.current=true,xe(I.target.value);},Ln=I=>{A==null||A(I),ot(true);},zo=I=>{k==null||k(I);let z=()=>{Mt.current=false;let Y=wt(dt);Y&&!Ee(Y,"date")?x?(ye(Y),xe(Ce(Y))):(ne(Y),xe(Ce(Y))):R||xe(Ce(be));};typeof window!="undefined"?window.setTimeout(z,50):z();},jt=I=>{I==null||I.preventDefault(),I==null||I.stopPropagation(),!g&&(ye(null),we(()=>Ht(rt(),p,v)),x?xe(""):(ne(null),xe(""),Ne(false)));},mo=()=>{let I=rt();Ee(I,"date")||(x?(ye(I),xe(Ce(I))):(ne(I),xe(Ce(I)),Ne(false)));},fo=()=>{x&&(ne(oe!=null?oe:null),Ne(false));},J=()=>{x&&(ye(ie),xe(Ce(ie)),Ne(false));},ue=typeof c=="object"&&c!==null&&!Array.isArray(c)?c:void 0,We=!!c&&!g&&!!dt,nt=($a=ue==null?void 0:ue.clearIcon)!=null?$a:o(lucideReact.X,{className:"h-4 w-4",strokeWidth:2}),{side:In,align:ll}=Lu(E),cl=(Ya={large:"lg",middle:"md",small:"sm"}[P])!=null?Ya:"md",dl={error:{borderColor:"hsl(var(--destructive))","--active-border-color":"hsl(var(--destructive))","--input-active-border-color":"hsl(var(--destructive))"},warning:{borderColor:"var(--warning, hsl(var(--primary)))","--active-border-color":"var(--warning, hsl(var(--primary)))","--input-active-border-color":"var(--warning, hsl(var(--primary)))"}},ul={outlined:"",borderless:"border-transparent shadow-none focus:border-transparent focus:ring-0 focus:ring-offset-0",filled:"border-transparent bg-muted/60 focus:bg-muted",underlined:"border-x-0 border-t-0 rounded-none focus:ring-offset-0"},pl={...T?dl[T]:{},...F!=null?F:{}},ml={sm:"h-8 text-sm",md:`${at} text-sm`,lg:"h-11 text-base"},fl={error:"border-destructive focus-visible:border-destructive focus-visible:ring-destructive/30",warning:"border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500/30"},za=u("div",{className:"w-[280px] select-none",role:"dialog","aria-modal":"true",children:[u("div",{className:"flex items-center justify-between px-2 pt-2",children:[u("div",{className:"flex items-center gap-1",children:[o("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>je(he==="date"?"month":he==="month"?"year":"decade"),children:o(lucideReact.ChevronsLeft,{className:"h-4 w-4"})}),he==="date"&&o("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>je("date"),children:o(lucideReact.ChevronLeft,{className:"h-4 w-4"})})]}),o("div",{className:"flex flex-col items-center",children:u("button",{type:"button",className:"text-sm font-medium hover:text-[var(--date-primary-color)]",style:Ve,onClick:()=>{he==="date"?Re("month"):he==="month"?Re("year"):he==="year"&&Re("decade");},children:[he==="date"&&`${K.months[de.month()]} ${de.format(K.yearFormat)}`,he==="month"&&de.format(K.yearFormat),he==="year"&&(()=>{let{start:I,end:z}=mn(de);return K.decadeFormat(I,z)})(),he==="decade"&&(()=>{let{start:I,end:z}=mn(de);return `${I.subtract(10,"year").format(K.yearFormat)}-${z.add(10,"year").format(K.yearFormat)}`})()]})}),u("div",{className:"flex items-center gap-1",children:[he==="date"&&o("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>ut("date"),children:o(lucideReact.ChevronRight,{className:"h-4 w-4"})}),o("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",onClick:()=>ut(he==="date"?"month":he==="month"?"year":"decade"),children:o(lucideReact.ChevronsRight,{className:"h-4 w-4"})})]})]}),o("div",{className:"px-2 pb-2 pt-3",children:En()}),u("div",{className:"flex items-center justify-between gap-2 border-t px-2 py-2",children:[o("div",{className:"flex flex-wrap items-center gap-2",children:M==null?void 0:M.map((I,z)=>{let Y=typeof I.value=="function"?I.value():I.value,Z=Y?Ee(Y,"date"):false;return o("button",{type:"button",disabled:Z,onClick:()=>{!Y||Z||(x?(ye(Y),xe(Ce(Y))):(ne(Y),xe(Ce(Y)),Ne(false)));},className:s("rounded-md px-2 py-1 text-xs transition",Z?"cursor-not-allowed bg-muted text-muted-foreground":"bg-muted hover:bg-muted/80"),children:I.label},z)})}),u("div",{className:"flex items-center gap-2",children:[o("button",{type:"button",onClick:mo,className:"text-xs font-medium text-[var(--date-primary-color)] hover:underline disabled:text-muted-foreground",disabled:Ee(rt(),"date"),style:Ve,children:K.today}),x?u("div",{className:"flex items-center gap-2",children:[o("button",{type:"button",className:"rounded-md px-2 py-1 text-xs hover:bg-muted",onClick:J,children:K.clear}),o("button",{type:"button",className:"rounded-md bg-[var(--date-primary-color)] px-2 py-1 text-xs font-medium text-white hover:opacity-90",style:Ve,onClick:fo,children:"OK"})]}):o("button",{type:"button",className:"rounded-md px-2 py-1 text-xs hover:bg-muted",onClick:I=>jt(I),disabled:!ie,children:K.clear})]})]})]}),gl=w?w(za):za;X__namespace.useEffect(()=>{if(!d)return;let I=()=>{var z;(z=xt.current)==null||z.focus();};typeof window!="undefined"?window.setTimeout(I,0):I();},[d]),X__namespace.useImperativeHandle(t,()=>xt.current);let bl=!g&&(f||G),Ba=u("div",{role:"combobox","aria-expanded":Pe,"aria-haspopup":"dialog",className:s("relative w-full",O),style:W,children:[L&&o("div",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center text-muted-foreground",children:L}),o(qe,{...B,ref:xt,value:dt,onChange:Dn,onFocus:Ln,onBlur:zo,autoFocus:d,readOnly:f||G,disabled:g,placeholder:h!=null?h:K.placeholder,name:U,id:V,className:s("pr-10 text-sm",ul[H],L&&"pl-10",g&&"cursor-not-allowed opacity-60",bl&&"cursor-pointer",ml[cl],T?fl[T]:void 0,D),style:pl,onClick:I=>{var z;(z=B.onClick)==null||z.call(B,I),!g&&G&&ot(true);}}),We&&o("button",{type:"button",className:"absolute inset-y-0 right-8 flex items-center text-muted-foreground transition hover:text-foreground",onMouseDown:I=>{I.preventDefault(),I.stopPropagation();},onClick:I=>jt(I),children:nt}),o("div",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-muted-foreground",children:o(lucideReact.Calendar,{className:"h-4 w-4"})})]}),go=X__namespace.useMemo(()=>{var z,Y;return ((Y=x?(z=oe!=null?oe:ie)!=null?z:de:be!=null?be:de)!=null?Y:rt()).clone()},[be,oe,x,ie,de]),vl=X__namespace.useMemo(()=>K.months.map((I,z)=>({label:I,value:z})),[K.months]),Va=go.daysInMonth(),hl=X__namespace.useMemo(()=>Array.from({length:Va},(I,z)=>({label:String(z+1).padStart(2,"0"),value:z+1})),[Va]),ja=go.year(),Ua=(Ka=p==null?void 0:p.year())!=null?Ka:ja-100,Ga=(Xa=v==null?void 0:v.year())!=null?Xa:ja+100,Fn=Math.min(Ua,Ga),qa=Math.max(Ua,Ga),yl=X__namespace.useMemo(()=>Array.from({length:qa-Fn+1},(I,z)=>{let Y=Fn+z;return {label:String(Y),value:Y}}),[qa,Fn]),_n=X__namespace.useCallback((I,z)=>{var Fe,$e;let Z=($e=x?(Fe=oe!=null?oe:ie)!=null?Fe:de:ie!=null?ie:de)!=null?$e:rt();if(I==="month"){let Se=Z.month(z),pt=Math.min(Z.date(),Se.daysInMonth());Z=Se.date(pt);}else if(I==="date"){let Se=Math.min(z,Z.daysInMonth());Z=Z.date(Se);}else {let Se=Z.year(z),pt=Math.min(Z.date(),Se.daysInMonth());Z=Se.date(pt);}return Z=Ht(Z,p,v),Ee(Z,"date")?false:(x?(ye(Z),xe(Ce(Z))):(ne(Z),xe(Ce(Z))),we(Z),true)},[ne,oe,Ce,Ee,v,p,x,ie,we,de]),xl=(Qa=(Ja=typeof B["aria-label"]=="string"?B["aria-label"]:void 0)!=null?Ja:h)!=null?Qa:K.placeholder,wl=X__namespace.useCallback(I=>{ot(I);},[ot]);if(X__namespace.useEffect(()=>{var z,Y;if(!G||!Pe||!V||typeof document=="undefined")return;te(null);let I=document.querySelector(`label[for="${V}"]`);I&&te((Y=(z=I.textContent)==null?void 0:z.trim())!=null?Y:null);},[V,Pe,G]),G){let I=_!=null?_:xl;return u(eo,{open:Pe,onOpenChange:wl,children:[o(dn,{asChild:true,children:Ba}),u(to,{className:"mt-10 max-h-[min(540px,calc(100dvh-6rem))] rounded-t-3xl bg-background",children:[o(oo,{className:"px-6 pb-2 pt-4",children:o(no,{className:"text-base font-medium text-foreground",children:I})}),u("div",{className:"flex flex-1 flex-col gap-6 px-6 pb-6",children:[u("div",{className:"flex gap-4",children:[o(ga,{open:Pe,label:"Month",options:vl,selectedValue:go.month(),onValueChange:z=>_n("month",z)}),o(ga,{open:Pe,label:"Day",options:hl,selectedValue:go.date(),onValueChange:z=>_n("date",z)}),o(ga,{open:Pe,label:"Year",options:yl,selectedValue:go.year(),onValueChange:z=>_n("year",z),infinite:false})]}),u("div",{className:"mt-auto flex items-center justify-between",children:[o(Q,{type:"button",variant:"ghost",size:"sm",className:"text-[var(--date-primary-color)] hover:bg-[var(--date-primary-color)]/10 focus-visible:ring-[var(--date-primary-color)]/30",style:Ve,onClick:mo,children:K.today}),u("div",{className:"flex items-center gap-3",children:[c?o(Q,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:z=>jt(z),children:K.clear}):null,x?u(jsxRuntime.Fragment,{children:[o(Q,{type:"button",variant:"ghost",size:"sm",className:"hover:bg-muted",onClick:J,children:"Cancel"}),o(Q,{type:"button",variant:"default",size:"sm",className:"bg-[var(--date-primary-color)] text-white hover:opacity-90 focus-visible:ring-[var(--date-primary-color)]/30",style:Ve,onClick:fo,children:"OK"})]}):o(un,{asChild:true,children:o(Q,{type:"button",variant:"default",size:"sm",className:"bg-[var(--date-primary-color)] text-white hover:opacity-90 focus-visible:ring-[var(--date-primary-color)]/30",style:Ve,children:"Done"})})]})]})]})]})]})}return u(Qt,{open:Pe,onOpenChange:ot,children:[o(cn,{asChild:true,children:Ba}),o(Zt,{className:"w-auto border border-border bg-popover p-0",align:ll,side:In,children:gl})]})});ha.displayName="DatePicker";function Ui({...e}){return o(radixUi.DropdownMenu.Root,{"data-slot":"dropdown-menu",...e})}function Gx({...e}){return o(radixUi.DropdownMenu.Portal,{"data-slot":"dropdown-menu-portal",...e})}var ya=X__namespace.forwardRef(({...e},t)=>o(radixUi.DropdownMenu.Trigger,{ref:t,"data-slot":"dropdown-menu-trigger",...e}));ya.displayName=radixUi.DropdownMenu.Trigger.displayName;var xa=X__namespace.forwardRef(({className:e,sideOffset:t=4,...n},a)=>o(radixUi.DropdownMenu.Portal,{children:o(radixUi.DropdownMenu.Content,{ref:a,"data-slot":"dropdown-menu-content",sideOffset:t,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})}));xa.displayName=radixUi.DropdownMenu.Content.displayName;function qx({...e}){return o(radixUi.DropdownMenu.Group,{"data-slot":"dropdown-menu-group",...e})}function Wx({className:e,inset:t,variant:n="default",...a}){return o(radixUi.DropdownMenu.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function Gi({className:e,children:t,checked:n,...a}){return u(radixUi.DropdownMenu.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...a,children:[o("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o(radixUi.DropdownMenu.ItemIndicator,{children:o(lucideReact.CheckIcon,{className:"size-4"})})}),t]})}function $x({...e}){return o(radixUi.DropdownMenu.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function Yx({className:e,children:t,...n}){return u(radixUi.DropdownMenu.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o(radixUi.DropdownMenu.ItemIndicator,{children:o(lucideReact.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function qi({className:e,inset:t,...n}){return o(radixUi.DropdownMenu.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Wi({className:e,...t}){return o(radixUi.DropdownMenu.Separator,{"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",e),...t})}function Kx({className:e,...t}){return o("span",{"data-slot":"dropdown-menu-shortcut",className:s("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function Xx({...e}){return o(radixUi.DropdownMenu.Sub,{"data-slot":"dropdown-menu-sub",...e})}var Uu=X__namespace.forwardRef(({className:e,inset:t,children:n,...a},r)=>u(radixUi.DropdownMenu.SubTrigger,{ref:r,"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:s("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...a,children:[n,o(lucideReact.ChevronRightIcon,{className:"ml-auto size-4"})]}));Uu.displayName=radixUi.DropdownMenu.SubTrigger.displayName;var Gu=X__namespace.forwardRef(({className:e,...t},n)=>o(radixUi.DropdownMenu.SubContent,{ref:n,"data-slot":"dropdown-menu-sub-content",className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t}));Gu.displayName=radixUi.DropdownMenu.SubContent.displayName;var qu=({children:e,...t})=>o("form",{...t,children:e});var Mo=({className:e,...t})=>o("p",{"data-slot":"form-description",className:s("text-muted-foreground text-sm",e),...t});Mo.displayName="FormDescription";var ko=({className:e,...t})=>{let n=t.children;return n?o("p",{"data-slot":"form-message",className:s("text-destructive text-sm",e),...t,children:n}):null};ko.displayName="FormMessage";var Eo=({className:e,...t})=>o(ke,{"data-slot":"form-label",className:e,...t});Eo.displayName="FormLabel";var Wu=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange?e:(t=e.form)!=null?t:e},$u=({name:e,label:t,description:n,className:a,checked:r,defaultChecked:i,onCheckedChange:c,checkboxProps:d,error:l,form:g,rules:m})=>{var M,P;let{onCheckedChange:C,...R}=d!=null?d:{},f=Wu(g),b=f==null?void 0:f.values,p=f==null?void 0:f.errors,v=f==null?void 0:f.touched,y=b==null?void 0:b[e],x=p==null?void 0:p[e],N=v==null?void 0:v[e],w=(M=f==null?void 0:f.validationSequence)!=null?M:0,S=(P=N?x:void 0)!=null?P:l,h=y!==void 0?!!y:r!==void 0?r:void 0,E=T=>{var D,F,A;let H=T===true,W=!!m?$i(H,m):void 0;if((D=f==null?void 0:f.setFieldError)==null||D.call(f,e,W),(F=f==null?void 0:f.setFieldValue)==null||F.call(f,e,H),(A=f==null?void 0:f.setFieldTouched)==null||A.call(f,e,true),f!=null&&f.handleChange){let k={target:{name:e,value:H,checked:H}};f.handleChange(k);}c==null||c(H),C==null||C(T);},L=X__namespace.useRef(w);return X__namespace.useEffect(()=>{let T=!!m,H=w!==L.current;if(!(f!=null&&f.setFieldError)||!T){L.current=w;return}if(!N&&!H){L.current=w;return}let W=$i(y!==void 0?!!y:r!==void 0?r:!!i,m);W!==x&&f.setFieldError(e,W),L.current=w;},[r,i,x,N,y,e,f,m,w]),u("div",{className:s("items-start gap-2",a),children:[u("div",{className:"flex items-start gap-3",children:[o("div",{children:o(Ro,{name:e,...R,...h!==void 0?{checked:h}:{defaultChecked:i},"aria-invalid":!!S,onCheckedChange:E})}),u("div",{className:"grid gap-1.5 leading-none",children:[t?o(Eo,{className:"text-sm font-medium leading-none",children:t}):null,n?o(Mo,{children:n}):null]})]}),o(ko,{children:S})]})};$u.displayName="FormCheckbox";function $i(e,t){if(t){if(t.required&&!e)return typeof t.required=="string"?t.required:"This field is required";if(t.validate){let n=t.validate(e);if(typeof n=="string")return n;if(n===false)return "Invalid value"}}}var Yu={row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},Ku={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Xu={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},bn={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},vn={none:{all:"gap-0",x:"gap-x-0",y:"gap-y-0"},xs:{all:"gap-1",x:"gap-x-1",y:"gap-y-1"},sm:{all:"gap-2",x:"gap-x-2",y:"gap-y-2"},md:{all:"gap-3",x:"gap-x-3",y:"gap-y-3"},lg:{all:"gap-4",x:"gap-x-4",y:"gap-y-4"},xl:{all:"gap-6",x:"gap-x-6",y:"gap-y-6"},"2xl":{all:"gap-8",x:"gap-x-8",y:"gap-y-8"}},wa={...vn,small:vn.sm,middle:vn.md,large:vn.lg},Ju=X__namespace.forwardRef(({direction:e,vertical:t,align:n,justify:a,wrap:r=false,gap:i,gapX:c,gapY:d,inline:l=false,className:g,children:m,...C},R)=>{var p;let f=e!=null?e:t?"column":"row",b=typeof r=="boolean"?r?bn.wrap:bn.nowrap:(p=bn[r])!=null?p:bn.nowrap;return o("div",{ref:R,"data-slot":"flex",className:s(l?"inline-flex":"flex",Yu[f],n?Ku[n]:null,a?Xu[a]:null,b,i?wa[i].all:null,c?wa[c].x:null,d?wa[d].y:null,g),...C,children:m})});Ju.displayName="Flex";function Pw({...e}){return o(radixUi.HoverCard.Root,{"data-slot":"hover-card",...e})}function Tw({...e}){return o(radixUi.HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function Nw({className:e,align:t="center",sideOffset:n=4,...a}){return o(radixUi.HoverCard.Portal,{"data-slot":"hover-card-portal",children:o(radixUi.HoverCard.Content,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a})})}function Lw({className:e,containerClassName:t,...n}){return o(inputOtp.OTPInput,{"data-slot":"input-otp",containerClassName:s("flex items-center gap-2 has-disabled:opacity-50",t),className:s("disabled:cursor-not-allowed",e),...n})}function Iw({className:e,...t}){return o("div",{"data-slot":"input-otp-group",className:s("flex items-center",e),...t})}function Fw({index:e,className:t,...n}){var d;let a=X__namespace.useContext(inputOtp.OTPInputContext),{char:r,hasFakeCaret:i,isActive:c}=(d=a==null?void 0:a.slots[e])!=null?d:{};return u("div",{"data-slot":"input-otp-slot","data-active":c,className:s("data-[active=true]:border-primary data-[active=true]:ring-primary/40 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[r,i&&o("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function _w({...e}){return o("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:o(lucideReact.MinusIcon,{})})}function ke({className:e,...t}){return o(radixUi.Label.Root,{"data-slot":"label",className:s("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function qw({className:e,...t}){return o(radixUi.Menubar.Root,{"data-slot":"menubar",className:s("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function Ww({...e}){return o(radixUi.Menubar.Menu,{"data-slot":"menubar-menu",...e})}function $w({...e}){return o(radixUi.Menubar.Group,{"data-slot":"menubar-group",...e})}function rp({...e}){return o(radixUi.Menubar.Portal,{"data-slot":"menubar-portal",...e})}function Yw({...e}){return o(radixUi.Menubar.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function Kw({className:e,...t}){return o(radixUi.Menubar.Trigger,{"data-slot":"menubar-trigger",className:s("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",e),...t})}function Xw({className:e,align:t="start",alignOffset:n=-4,sideOffset:a=8,...r}){return o(rp,{children:o(radixUi.Menubar.Content,{"data-slot":"menubar-content",align:t,alignOffset:n,sideOffset:a,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",e),...r})})}function Jw({className:e,inset:t,variant:n="default",...a}){return o(radixUi.Menubar.Item,{"data-slot":"menubar-item","data-inset":t,"data-variant":n,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function Qw({className:e,children:t,checked:n,...a}){return u(radixUi.Menubar.CheckboxItem,{"data-slot":"menubar-checkbox-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...a,children:[o("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o(radixUi.Menubar.ItemIndicator,{children:o(lucideReact.CheckIcon,{className:"size-4"})})}),t]})}function Zw({className:e,children:t,...n}){return u(radixUi.Menubar.RadioItem,{"data-slot":"menubar-radio-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o(radixUi.Menubar.ItemIndicator,{children:o(lucideReact.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function eR({className:e,inset:t,...n}){return o(radixUi.Menubar.Label,{"data-slot":"menubar-label","data-inset":t,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function tR({className:e,...t}){return o(radixUi.Menubar.Separator,{"data-slot":"menubar-separator",className:s("bg-border -mx-1 my-1 h-px",e),...t})}function oR({className:e,...t}){return o("span",{"data-slot":"menubar-shortcut",className:s("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function nR({...e}){return o(radixUi.Menubar.Sub,{"data-slot":"menubar-sub",...e})}function aR({className:e,inset:t,children:n,...a}){return u(radixUi.Menubar.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":t,className:s("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",e),...a,children:[n,o(lucideReact.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function rR({className:e,...t}){return o(radixUi.Menubar.SubContent,{"data-slot":"menubar-sub-content",className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var ip="relative isolate overflow-hidden rounded-md bg-muted text-transparent",sp="after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_1.6s_linear_infinite] after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent after:content-['']",xn=X__namespace.forwardRef(({className:e,...t},n)=>o("div",{ref:n,"data-slot":"skeleton",className:s(ip,sp,e),...t}));xn.displayName="Skeleton";var Xi=X__namespace.forwardRef(({className:e,...t},n)=>o(xn,{ref:n,className:s("h-9 w-32 rounded-md",e),...t}));Xi.displayName="Skeleton.Button";var Ji=X__namespace.forwardRef(({className:e,...t},n)=>o(xn,{ref:n,className:s("h-9 w-full rounded-md",e),...t}));Ji.displayName="Skeleton.Input";var Pt=Object.assign(xn,{Button:Xi,Input:Ji});var cp={sm:"sm:max-w-sm",md:"sm:max-w-lg",lg:"sm:max-w-2xl",xl:"sm:max-w-3xl"},dp=u("div",{className:"space-y-3","aria-hidden":true,children:[o(Pt,{className:"h-4 w-2/3"}),o(Pt,{className:"h-4 w-full"}),o(Pt,{className:"h-4 w-5/6"}),o(Pt,{className:"h-4 w-3/4"})]}),up=e=>{switch(e){case "destructive":return "destructive";case "default":return "outline";case "primary":default:return "default"}},pp=({title:e,description:t,closable:n=true,className:a,classNames:r,loading:i=false,maskClosable:c=false,style:d,footer:l,onOk:g,onCancel:m,children:C,onOpenChange:R,size:f="md",...b})=>{var L,M,P,T,H,O,W;let p={show:(L=l==null?void 0:l.show)!=null?L:true,render:l==null?void 0:l.render,onOk:l==null?void 0:l.onOk,onCancel:l==null?void 0:l.onCancel,showOk:(M=l==null?void 0:l.showOk)!=null?M:true,showCancel:(P=l==null?void 0:l.showCancel)!=null?P:true,okText:(T=l==null?void 0:l.okText)!=null?T:"Save changes",cancelText:(H=l==null?void 0:l.cancelText)!=null?H:"Cancel",okLoading:l==null?void 0:l.okLoading,cancelLoading:l==null?void 0:l.cancelLoading,okDisabled:l==null?void 0:l.okDisabled,cancelDisabled:(O=l==null?void 0:l.cancelDisabled)!=null?O:l==null?void 0:l.cancelDisable,okType:l==null?void 0:l.okType,okButtonProps:l==null?void 0:l.okButtonProps,cancelButtonProps:l==null?void 0:l.cancelButtonProps,size:(W=l==null?void 0:l.size)!=null?W:"default"},v=X__namespace.useCallback(()=>{var D;(D=p.onCancel)==null||D.call(p),m==null||m();},[p.onCancel,m]),y=X__namespace.useCallback(()=>{var D;(D=p.onOk)==null||D.call(p),g==null||g();},[p.onOk,g]),x=X__namespace.useCallback(D=>{D||v(),R==null||R(D);},[v,R]),N=X__namespace.useCallback(D=>{c||D.preventDefault();},[c]),w=X__namespace.useCallback(D=>{n||D.preventDefault();},[n]),S=s(cp[f],a,r==null?void 0:r.content),h=o(framerMotion.AnimatePresence,{mode:"wait",children:i?o(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18,ease:"easeInOut"},className:s("space-y-4",r==null?void 0:r.body),children:dp},"modal-loading"):o(framerMotion.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18,ease:"easeInOut"},className:s("space-y-3 text-sm text-muted-foreground",r==null?void 0:r.body),"aria-busy":i,children:C},"modal-content")}),E=()=>{var le,re,ge,fe,$,ie,pe,he,Re,ne;if(!p.show)return null;if(p.render)return o("div",{className:s("mt-2",r==null?void 0:r.footer),children:p.render});if(!p.showOk&&!p.showCancel)return null;let{onClick:D,variant:F,size:A,loading:k,disabled:U,...V}=(le=p.okButtonProps)!=null?le:{},{onClick:B,variant:q,size:j,loading:G,disabled:_,...te}=(re=p.cancelButtonProps)!=null?re:{},K=oe=>{D==null||D(oe),!oe.defaultPrevented&&y();},ce=oe=>{B==null||B(oe),!oe.defaultPrevented&&v();};return o("div",{className:s("mt-4",r==null?void 0:r.footer),children:u("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[p.showCancel?o(Q,{variant:q!=null?q:"outline",size:j!=null?j:p.size,loading:(fe=(ge=p.cancelLoading)!=null?ge:G)!=null?fe:false,disabled:(ie=($=p.cancelDisabled)!=null?$:_)!=null?ie:false,...te,onClick:ce,children:p.cancelText}):null,p.showOk?o(Q,{variant:F!=null?F:up(p.okType),size:A!=null?A:p.size,loading:(he=(pe=p.okLoading)!=null?pe:k)!=null?he:false,disabled:(ne=(Re=p.okDisabled)!=null?Re:U)!=null?ne:false,...V,onClick:K,children:p.okText}):null]})})};return o($o,{...b,onOpenChange:x,children:o(Yo,{showCloseButton:n,className:S,style:d,onInteractOutside:N,onEscapeKeyDown:w,children:u(framerMotion.motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.2,ease:"easeOut"},className:"flex flex-col gap-4",children:[(e||t)&&u(Ko,{className:r==null?void 0:r.header,children:[e?o(Xo,{className:r==null?void 0:r.title,children:e}):null,t?o(Jo,{className:r==null?void 0:r.description,children:t}):null]}),h,E()]})})})};pp.displayName="Modal";function At({open:e,onOpenChange:t,title:n,children:a,footer:r,footerClassName:i,contentClassName:c,disableContentWrapper:d=false,options:l,selectedValues:g,onSelect:m,isMulti:C=false}){let R=v=>{m==null||m(v),C||t(false);},f=v=>C&&Array.isArray(g)?g.includes(v):g===v,b=()=>l?o("div",{className:"max-h-[75vh] overflow-y-auto",children:l.map(v=>u("button",{className:s("w-full flex items-center justify-between px-4 py-4 text-left transition-colors","min-h-[50px] h-auto",v.disabled?"opacity-50 cursor-not-allowed":"hover:bg-accent active:bg-accent/80",f(v.value)&&"bg-accent"),onClick:()=>!v.disabled&&R(v.value),disabled:v.disabled,children:[o("span",{className:"flex-1",children:v.label}),f(v.value)&&o(lucideReact.CheckIcon,{className:"h-4 w-4 text-primary flex-shrink-0 ml-2"})]},v.value))}):null,p=d?a:o("div",{className:s(c),children:a});return o(eo,{open:e,onOpenChange:t,direction:"bottom",children:u(to,{className:"p-0 pb-4 rounded-t-2xl border-t bg-background",children:[n?o(oo,{className:"px-4 pb-2 pt-4 text-left border-b",children:typeof n=="string"||typeof n=="number"?o(no,{children:n}):n}):null,l?b():p,r?o(zi,{className:s("border-border/60 border-t px-4 pt-3",i),children:r}):null]})})}var fp={floating:{label:"Floating Glow",description:"Glassmorphism-inspired bar with a floating circular highlight around the active tab."},pill:{label:"Soft Pill",description:"Rounded pill navigation with a smooth capsule indicator that slides beneath the active item."},minimal:{label:"Minimal Line",description:"Lightweight footer that focuses on iconography with a subtle underline transition."},curved:{label:"Curved Wave",description:"Playful curved dock that mimics native device docks with a spotlighted active state."}},PR=Object.keys(fp),gp=()=>{},Ca=X__namespace.forwardRef(({items:e,value:t,defaultValue:n,onChange:a=gp,className:r,variant:i="floating",forceLabels:c=false,...d},l)=>{let[g,m]=X__namespace.useState(()=>{var P,T;return t!==void 0?t:n||((T=(P=e[0])==null?void 0:P.value)!=null?T:"")}),C=t!==void 0,R=C?t:g;X__namespace.useEffect(()=>{var T;if(!e.length)return;if(!e.some(H=>H.value===R)){let H=(T=e[0])==null?void 0:T.value;if(!H)return;C||m(H),a(H);}},[e,R,C,a]);let f=X__namespace.useCallback(P=>{P!==R&&(C||m(P),a(P));},[C,a,R]);if(!e.length)return null;let b=Math.max(e.findIndex(P=>P.value===R),0),p=100/e.length,v=X__namespace.useMemo(()=>{let T=p/2;return {width:72,height:72,left:`calc(${p}% * ${b} + ${T}% - ${72/2}px)`}},[b,p]),y=X__namespace.useMemo(()=>({width:`calc((100% / ${e.length}) - 0.75rem)`,left:`calc((100% / ${e.length}) * ${b} + 0.375rem)`}),[b,e.length]),x=X__namespace.useMemo(()=>({width:`calc((100% / ${e.length}) * 0.6)`,left:`calc((100% / ${e.length}) * ${b} + (100% / ${e.length}) * 0.2)`}),[b,e.length]),N=X__namespace.useMemo(()=>{let T=p/2;return {width:64,height:64,left:`calc(${p}% * ${b} + ${T}%)`}},[b,p]),w=()=>{switch(i){case "floating":return o("span",{"aria-hidden":true,style:v,className:"pointer-events-none absolute -top-7 z-0 rounded-full bg-primary/25 blur-2xl transition-[left] duration-500 ease-out"});case "pill":return o("span",{"aria-hidden":true,style:y,className:"pointer-events-none absolute inset-y-2 z-0 rounded-full border border-primary/20 bg-primary/10 shadow-inner transition-[left] duration-500 ease-out"});case "minimal":return o("span",{"aria-hidden":true,style:x,className:"pointer-events-none absolute bottom-1 left-0 h-1 rounded-full bg-primary transition-[left] duration-500 ease-out"});case "curved":return o("span",{"aria-hidden":true,style:N,className:"pointer-events-none absolute -top-6 z-0 -translate-x-1/2 rounded-full border border-primary/20 bg-primary/20 shadow-[0_12px_30px_-15px_rgba(59,130,246,0.65)] transition-[left] duration-500 ease-out"});default:return null}},S=P=>{switch(i){case "floating":return s("group relative z-10 flex flex-1 flex-col items-center gap-1 rounded-2xl px-2 pb-1 pt-3 text-[0.7rem] font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground");case "pill":return s("group relative z-10 flex flex-1 items-center justify-center gap-2 rounded-full px-3 text-sm font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground");case "minimal":return s("group relative flex flex-1 flex-col items-center gap-1 rounded-2xl px-2 py-2 text-[0.7rem] font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground/80");case "curved":return s("group relative z-10 flex flex-1 flex-col items-center gap-1 rounded-2xl px-3 pb-2 pt-5 text-[0.7rem] font-medium transition-all duration-300 ease-out",P?"text-primary":"text-muted-foreground/90");default:return ""}},h=P=>{switch(i){case "floating":return s("flex size-12 items-center justify-center rounded-full border border-border/50 bg-muted/60 text-base transition-all duration-300 ease-out",P?"scale-100 border-primary/40 bg-primary text-primary-foreground shadow-lg shadow-primary/30":"scale-95 text-muted-foreground");case "pill":return s("flex size-9 items-center justify-center rounded-full text-base transition-all duration-300 ease-out",P?"bg-primary text-primary-foreground shadow-lg shadow-primary/30":"bg-transparent text-muted-foreground");case "minimal":return s("flex size-10 items-center justify-center rounded-full text-base transition-all duration-300 ease-out",P?"scale-105 bg-primary/10 text-primary":"scale-95 text-muted-foreground/80");case "curved":return s("flex size-12 items-center justify-center rounded-full border border-border/60 bg-muted/70 text-base transition-all duration-300 ease-out",P?"-translate-y-3 border-primary/40 bg-primary text-primary-foreground shadow-xl shadow-primary/40":"translate-y-0 text-muted-foreground");default:return ""}},E=P=>{let T="transition-all duration-300 ease-out";switch(i){case "floating":return s(T,P?"translate-y-0 opacity-100":"translate-y-[2px] opacity-90",c?"block":"");case "pill":return s(T,"text-xs",P?"opacity-100":"opacity-90");case "minimal":return s(T,"text-xs",P||c?"opacity-100":"opacity-0");case "curved":return s(T,"text-xs",P||c?"opacity-100":"opacity-0 group-hover:opacity-80");default:return T}},L=(P,T)=>P?o("span",{className:s("pointer-events-none absolute -right-0.5 -top-0.5 min-w-4 rounded-full bg-destructive px-1.5 text-[10px] font-semibold leading-none text-destructive-foreground shadow-sm",T?"scale-105":"scale-100 opacity-95"),children:P}):null,M=()=>{switch(i){case "floating":return u("div",{className:"relative isolate flex h-24 w-full items-end rounded-[26px] border border-border/40 bg-card/90 px-4 pb-3 pt-5 shadow-[0_20px_40px_-24px_rgba(15,23,42,0.35)] backdrop-blur-xl",children:[w(),e.map(P=>{let T=P.value===R;return u("button",{type:"button",className:S(T),onClick:()=>f(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[u("span",{className:"relative",children:[o("span",{className:h(T),children:P.icon}),L(P.badge,T)]}),(T||c)&&P.label?o("span",{className:E(T),children:P.label}):P.label&&!c?o("span",{className:s(E(T),"sr-only"),children:P.label}):null]},P.value)})]});case "pill":return u("div",{className:"relative isolate flex h-20 w-full items-center rounded-full border border-border/40 bg-card/95 px-2 shadow-[0_24px_50px_-24px_rgba(15,23,42,0.45)] backdrop-blur",children:[w(),e.map(P=>{let T=P.value===R;return u("button",{type:"button",className:S(T),onClick:()=>f(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[u("span",{className:"relative flex items-center gap-2",children:[o("span",{className:h(T),children:P.icon}),(T||c)&&P.label?o("span",{className:E(T),children:P.label}):null]}),L(P.badge,T)]},P.value)})]});case "minimal":return u("div",{className:"relative isolate flex h-[4.5rem] w-full items-center justify-between rounded-3xl border border-border/30 bg-background/60 px-4 py-3 shadow-[0_18px_35px_-24px_rgba(15,23,42,0.35)]",children:[w(),e.map(P=>{let T=P.value===R;return u("button",{type:"button",className:S(T),onClick:()=>f(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[u("span",{className:"relative",children:[o("span",{className:h(T),children:P.icon}),L(P.badge,T)]}),(T||c)&&P.label?o("span",{className:E(T),children:P.label}):null]},P.value)})]});case "curved":return u("div",{className:"relative isolate flex h-28 w-full items-end justify-center",children:[o("div",{className:"absolute inset-x-3 bottom-0 h-20 rounded-t-[36px] border border-border/35 bg-card/95 shadow-[0_-30px_45px_-28px_rgba(15,23,42,0.55)]"}),u("div",{className:"relative z-10 flex h-24 w-[92%] items-end justify-between px-5 pb-4 pt-6",children:[w(),e.map(P=>{let T=P.value===R;return u("button",{type:"button",className:S(T),onClick:()=>f(P.value),"data-active":T?"true":void 0,"aria-pressed":T,"aria-current":T?"page":void 0,"aria-label":P.label,children:[u("span",{className:"relative",children:[o("span",{className:h(T),children:P.icon}),L(P.badge,T)]}),(T||c)&&P.label?o("span",{className:E(T),children:P.label}):null]},P.value)})]})]});default:return null}};return o("nav",{ref:l,className:s("relative flex w-full justify-center",r),...d,children:M()})});Ca.displayName="MobileFooter";var bp={hero:{label:"Hero Spotlight",description:"Immersive header with a leading action row, large title block, and optional hero media thumbnail."},stories:{label:"Stories Carousel",description:"Horizontal story rail with rounded action chips that mimic social media story pickers."},minimal:{label:"Minimal Bar",description:"Compact navigation bar with centered title and contextual leading/trailing actions."},search:{label:"Search Hub",description:"Two-line header with quick actions and an inline search field anchored by an avatar trigger."}},MR=Object.keys(bp),vp=()=>{},hp=()=>u("svg",{"aria-hidden":true,viewBox:"0 0 24 24",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[o("circle",{cx:11,cy:11,r:7}),o("path",{d:"m20 20-3-3"})]}),Do=(e,t=false)=>e?o("span",{className:s("pointer-events-none absolute -right-0.5 -top-0.5 min-w-4 rounded-full bg-destructive px-1.5 text-[10px] font-semibold leading-none text-destructive-foreground shadow-sm",t?"scale-105":"scale-100"),children:e}):null,Pa=X__namespace.forwardRef(({title:e,subtitle:t,supportingText:n,heroBadge:a,heroMedia:r,heroImage:i,heroAlt:c,leadingAction:d,trailingActions:l,trailingContent:g,stories:m,searchPlaceholder:C,searchValue:R,defaultSearchValue:f,onSearchChange:b=vp,searchIcon:p,variant:v="hero",className:y,children:x,...N},w)=>{let[S,h]=X__namespace.useState(()=>f!=null?f:""),E=R!==void 0,L=E?R:S,M=X__namespace.useCallback(k=>{let U=k.target.value;E||h(U),b(U);},[E,b]),P=(k,U)=>{var V,B,q;return k?u("button",{type:"button",onClick:k.onClick,"aria-label":(B=(V=k.ariaLabel)!=null?V:k.label)!=null?B:k.value,className:"relative inline-flex size-10 items-center justify-center rounded-full border border-border/50 bg-background/80 text-base font-medium text-foreground shadow-[0_8px_24px_-18px_rgba(59,130,246,0.8)] transition-transform duration-200 ease-out hover:-translate-y-0.5",children:[o("span",{className:"pointer-events-none text-lg",children:(q=k.icon)!=null?q:k.label}),Do(k.badge)]},k.value):U?o("span",{className:"size-10","aria-hidden":true},U):null},T=k=>{var U,V,B;return k?u("button",{type:"button",onClick:k.onClick,"aria-label":(V=(U=k.ariaLabel)!=null?U:k.label)!=null?V:k.value,className:"relative inline-flex size-10 items-center justify-center rounded-full border border-border/40 bg-card/80 text-base text-foreground shadow-sm transition-colors duration-200 ease-out hover:bg-card",children:[o("span",{className:"pointer-events-none text-lg",children:(B=k.icon)!=null?B:k.label}),Do(k.badge)]},k.value):null},H=k=>{var U,V,B;return k?u("button",{type:"button",onClick:k.onClick,"aria-label":(V=(U=k.ariaLabel)!=null?U:k.label)!=null?V:k.value,className:"relative inline-flex size-10 items-center justify-center rounded-full text-base text-muted-foreground transition-colors duration-200 ease-out hover:text-foreground",children:[o("span",{className:"pointer-events-none text-lg",children:(B=k.icon)!=null?B:k.label}),Do(k.badge)]},k.value):null},O=k=>{var U,V,B;return u("button",{type:"button",onClick:k.onClick,"aria-label":(V=(U=k.ariaLabel)!=null?U:k.label)!=null?V:k.value,className:"group relative flex w-24 shrink-0 flex-col items-center gap-2 rounded-2xl border border-border/40 bg-card/60 px-3 py-3 text-center shadow-[0_12px_30px_-22px_rgba(59,130,246,0.45)] transition-all duration-300 ease-out hover:-translate-y-1 hover:border-primary/40",children:[u("span",{className:"relative inline-flex size-14 items-center justify-center overflow-hidden rounded-full border border-border/40 bg-background/80 text-lg text-foreground shadow-sm",children:[(B=k.icon)!=null?B:k.label,Do(k.badge,true)]}),k.label?o("span",{className:"text-xs font-medium text-foreground transition-colors group-hover:text-primary",children:k.label}):null,k.description?o("span",{className:"text-[11px] text-muted-foreground transition-opacity group-hover:opacity-90",children:k.description}):null]},k.value)},W=()=>u("div",{className:"relative isolate w-full overflow-hidden rounded-[28px] border border-border/30 bg-gradient-to-br from-background/95 via-background/90 to-background/70 px-5 pb-6 pt-5 shadow-[0_28px_60px_-35px_rgba(15,23,42,0.55)] backdrop-blur",children:[o("div",{className:"pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(circle_at_top,_rgba(59,130,246,0.18),_transparent_55%)]"}),u("div",{className:"flex items-center justify-between",children:[P(d!=null?d:null,"hero-leading-placeholder"),o("div",{className:"flex items-center gap-2",children:l==null?void 0:l.map(k=>P(k))})]}),u("div",{className:"mt-7 flex items-end justify-between gap-6",children:[u("div",{className:"space-y-3",children:[a?o("span",{className:"inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-xs font-medium text-primary",children:a}):null,e?o("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:e}):null,t?o("p",{className:"text-sm text-muted-foreground",children:t}):null,n?o("p",{className:"text-xs text-muted-foreground/90",children:n}):null]}),o("div",{className:"shrink-0",children:r?o("div",{className:"relative h-24 w-24 overflow-hidden rounded-2xl border border-border/40 shadow-[0_24px_40px_-28px_rgba(59,130,246,0.75)]",children:r}):i?o("div",{className:"relative h-24 w-24 overflow-hidden rounded-2xl border border-border/40 shadow-[0_24px_40px_-28px_rgba(59,130,246,0.75)]",children:o("img",{src:i,alt:c!=null?c:"",className:"size-full object-cover"})}):null})]}),x?o("div",{className:"mt-6",children:x}):null]}),D=()=>{var k;return u("div",{className:"relative isolate w-full overflow-hidden rounded-[26px] border border-border/35 bg-background/90 px-4 pb-5 pt-4 shadow-[0_24px_50px_-35px_rgba(15,23,42,0.55)]",children:[u("div",{className:"flex items-center justify-between gap-3",children:[u("div",{className:"flex items-center gap-3",children:[d?u("div",{className:"flex items-center gap-2 rounded-full border border-border/40 bg-card/80 px-3 py-1.5 text-sm font-medium text-foreground shadow-sm",children:[o("span",{className:"text-base",children:(k=d.icon)!=null?k:d.label}),d.label?o("span",{children:d.label}):null]}):null,e?o("h2",{className:"text-lg font-semibold text-foreground",children:e}):null]}),o("div",{className:"flex items-center gap-2",children:l==null?void 0:l.map(U=>H(U))})]}),t?o("p",{className:"mt-2 text-sm text-muted-foreground",children:t}):null,o("div",{className:"mt-4 flex gap-3 overflow-x-auto pb-1",children:m==null?void 0:m.map(U=>O(U))}),x?o("div",{className:"mt-4",children:x}):null]})},F=()=>u("div",{className:"relative isolate flex h-16 w-full items-center gap-3 rounded-[22px] border border-border/40 bg-background/95 px-2 shadow-[0_18px_35px_-28px_rgba(15,23,42,0.45)]",children:[o("div",{className:"flex items-center",children:d?T(d):o("span",{className:"size-10","aria-hidden":true})}),u("div",{className:"flex flex-1 flex-col items-center justify-center text-center",children:[t?o("span",{className:"text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:t}):null,e?o("span",{className:"text-base font-semibold text-foreground",children:e}):null]}),o("div",{className:"flex items-center gap-2",children:g!=null?g:l==null?void 0:l.map(k=>T(k))})]}),A=()=>{var k,U,V;return u("div",{className:"relative isolate w-full overflow-hidden rounded-[26px] border border-border/35 bg-background/95 px-4 pb-5 pt-4 shadow-[0_26px_54px_-34px_rgba(15,23,42,0.55)]",children:[u("div",{className:"flex items-start justify-between gap-4",children:[u("div",{className:"space-y-1",children:[t?o("span",{className:"text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:t}):null,e?o("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,n?o("p",{className:"text-xs text-muted-foreground/90",children:n}):null]}),o("div",{className:"flex items-center gap-2",children:l==null?void 0:l.map(B=>H(B))})]}),u("div",{className:"mt-4 flex items-center gap-3",children:[d?u("button",{type:"button",onClick:d.onClick,"aria-label":(U=(k=d.ariaLabel)!=null?k:d.label)!=null?U:d.value,className:"relative inline-flex size-12 items-center justify-center rounded-full border border-border/40 bg-card/80 text-base text-foreground shadow-sm",children:[o("span",{className:"pointer-events-none text-lg",children:(V=d.icon)!=null?V:d.label}),Do(d.badge)]}):null,u("div",{className:"relative flex-1",children:[o("span",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center",children:p!=null?p:o(hp,{})}),o("input",{type:"search",value:L,onChange:M,placeholder:C,className:"h-12 w-full rounded-full border border-border/40 bg-card/70 pl-10 pr-4 text-sm text-foreground shadow-inner shadow-primary/5 outline-none transition focus:border-primary/40 focus:bg-card"})]})]}),x?o("div",{className:"mt-4",children:x}):null]})};return o("header",{ref:w,className:s("relative flex w-full justify-center",y),...N,children:(()=>{switch(v){case "hero":return W();case "stories":return D();case "minimal":return F();case "search":return A();default:return null}})()})});Pa.displayName="MobileHeader";function Qi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t);}function Zi(...e){return t=>{let n=false,a=e.map(r=>{let i=Qi(r,t);return !n&&typeof i=="function"&&(n=true),i});if(n)return ()=>{for(let r=0;r<a.length;r++){let i=a[r];typeof i=="function"?i():Qi(e[r],null);}}}}function xp(e){let t=wp(e),n=X__namespace.forwardRef((a,r)=>{let{children:i,...c}=a,d=X__namespace.Children.toArray(i),l=d.find(Cp);if(l){let g=l.props.children,m=d.map(C=>C===l?X__namespace.Children.count(g)>1?X__namespace.Children.only(null):X__namespace.isValidElement(g)?g.props.children:null:C);return jsxRuntime.jsx(t,{...c,ref:r,children:X__namespace.isValidElement(g)?X__namespace.cloneElement(g,void 0,m):null})}return jsxRuntime.jsx(t,{...c,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var ts=xp("Slot");function wp(e){let t=X__namespace.forwardRef((n,a)=>{let{children:r,...i}=n;if(X__namespace.isValidElement(r)){let c=Tp(r),d=Pp(i,r.props);return r.type!==X__namespace.Fragment&&(d.ref=a?Zi(a,c):c),X__namespace.cloneElement(r,d)}return X__namespace.Children.count(r)>1?X__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rp=Symbol("radix.slottable");function Cp(e){return X__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rp}function Pp(e,t){let n={...t};for(let a in t){let r=e[a],i=t[a];/^on[A-Z]/.test(a)?r&&i?n[a]=(...d)=>{let l=i(...d);return r(...d),l}:r&&(n[a]=r):a==="style"?n[a]={...r,...i}:a==="className"&&(n[a]=[r,i].filter(Boolean).join(" "));}return {...e,...n}}function Tp(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Np=["top","right","bottom","left"],wn=(e,t)=>e.includes(t)?`env(safe-area-inset-${t})`:void 0,Rn=X__namespace.forwardRef(({edges:e=Np,asChild:t,className:n,style:a,...r},i)=>{var d,l,g,m;return o(t?ts:"div",{ref:i,className:s("relative",n),style:{paddingTop:(d=a==null?void 0:a.paddingTop)!=null?d:wn(e,"top"),paddingRight:(l=a==null?void 0:a.paddingRight)!=null?l:wn(e,"right"),paddingBottom:(g=a==null?void 0:a.paddingBottom)!=null?g:wn(e,"bottom"),paddingLeft:(m=a==null?void 0:a.paddingLeft)!=null?m:wn(e,"left"),...a},...r})});Rn.displayName="SafeArea";var Mp=({header:e,footer:t,children:n,className:a,safeArea:r})=>{var L,M,P,T,H;let{header:i,navigateBack:c,canGoBack:d}=si(),l=X__namespace.useMemo(()=>{let O=[];return r.top&&O.push("top"),r.left&&O.push("left"),r.right&&O.push("right"),O},[r.top,r.left,r.right]),g=X__namespace.useMemo(()=>{let O=[];return r.bottom&&O.push("bottom"),r.left&&O.push("left"),r.right&&O.push("right"),O},[r.bottom,r.left,r.right]),m=X__namespace.useCallback(()=>{if(d){c();return}typeof window!="undefined"&&window.history.back();},[d,c]),C=(L=i.back)!=null?L:d,R=X__namespace.useMemo(()=>{if(C)return {value:"mobile-header-back",icon:o(lucideReact.ArrowLeft,{className:"size-5","aria-hidden":true}),ariaLabel:"Go back",onClick:m};if(i.icon)return {value:"mobile-header-icon",icon:i.icon}},[C,i.icon,m]),{show:f=true,className:b,variant:p,type:v}=e,y=(T=(P=(M=i.variant)!=null?M:p)!=null?P:v)!=null?T:"hero",{show:x=true,activeKey:N,onChange:w,...S}=t,h=(H=S.value)!=null?H:N,E=X__namespace.useCallback(O=>{w==null||w(O);},[w]);return u("div",{className:s("flex min-h-svh w-full flex-col bg-background",a),children:[f&&o("div",{className:"sticky top-0 z-20 bg-background",children:o(Rn,{edges:l,className:"bg-background",children:o(Pa,{variant:y,className:b,title:i.title,subtitle:i.subtitle,supportingText:i.supportingText,heroBadge:i.heroBadge,leadingAction:R,trailingContent:i.actions})})}),o("div",{className:"flex-1 overflow-y-auto bg-muted/10",children:n}),x&&o("div",{className:"sticky bottom-0 z-20 bg-background",children:o(Rn,{edges:g,className:"bg-background px-4 pb-4 pt-2",children:o(Ca,{...S,value:h,onChange:E})})})]})},kp=({header:e={show:true},footer:t={show:true,items:[]},children:n,className:a,safeArea:r={top:true,bottom:true,left:true,right:true}})=>o(ii,{children:o(Mp,{header:e,footer:t,className:a,safeArea:r,children:n})});function eC({className:e,children:t,viewport:n=true,...a}){return u(radixUi.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":n,className:s("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...a,children:[t,n&&o(Ip,{})]})}function tC({className:e,...t}){return o(radixUi.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:s("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function oC({className:e,...t}){return o(radixUi.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:s("relative",e),...t})}var Lp=classVarianceAuthority.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-primary/40 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function nC({className:e,children:t,...n}){return u(radixUi.NavigationMenu.Trigger,{"data-slot":"navigation-menu-trigger",className:s(Lp(),"group",e),...n,children:[t," ",o(lucideReact.ChevronDownIcon,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function aC({className:e,...t}){return o(radixUi.NavigationMenu.Content,{"data-slot":"navigation-menu-content",className:s("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",e),...t})}function Ip({className:e,...t}){return o("div",{className:s("absolute top-full left-0 isolate z-50 flex justify-center"),children:o(radixUi.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:s("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function rC({className:e,...t}){return o(radixUi.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:s("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-primary/40 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}function iC({className:e,...t}){return o(radixUi.NavigationMenu.Indicator,{"data-slot":"navigation-menu-indicator",className:s("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:o("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}function mC({className:e,...t}){return o("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:s("mx-auto flex w-full justify-center",e),...t})}function fC({className:e,...t}){return o("ul",{"data-slot":"pagination-content",className:s("flex flex-row items-center gap-1",e),...t})}function gC({...e}){return o("li",{"data-slot":"pagination-item",...e})}function ns({className:e,isActive:t,size:n="icon",...a}){return o("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:s(mt({variant:t?"outline":"ghost",size:n}),e),...a})}function bC({className:e,...t}){return u(ns,{"aria-label":"Go to previous page",size:"default",className:s("gap-1 px-2.5 sm:pl-2.5",e),...t,children:[o(lucideReact.ChevronLeftIcon,{}),o("span",{className:"hidden sm:block",children:"Previous"})]})}function vC({className:e,...t}){return u(ns,{"aria-label":"Go to next page",size:"default",className:s("gap-1 px-2.5 sm:pr-2.5",e),...t,children:[o("span",{className:"hidden sm:block",children:"Next"}),o(lucideReact.ChevronRightIcon,{})]})}function hC({className:e,...t}){return u("span",{"aria-hidden":true,"data-slot":"pagination-ellipsis",className:s("flex size-9 items-center justify-center",e),...t,children:[o(lucideReact.MoreHorizontalIcon,{className:"size-4"}),o("span",{className:"sr-only",children:"More pages"})]})}function CC({className:e,value:t,...n}){return o(radixUi.Progress.Root,{"data-slot":"progress",className:s("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:o(radixUi.Progress.Indicator,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function rs({className:e,...t}){return o(radixUi.RadioGroup.Root,{"data-slot":"radio-group",className:s("grid gap-3",e),...t})}function is({className:e,...t}){return o(radixUi.RadioGroup.Item,{"data-slot":"radio-group-item",className:s("border-input text-primary focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:o(radixUi.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:o(lucideReact.CircleIcon,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function IC({className:e,...t}){return o(io__namespace.PanelGroup,{"data-slot":"resizable-panel-group",className:s("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function FC({...e}){return o(io__namespace.Panel,{"data-slot":"resizable-panel",...e})}function _C({withHandle:e,className:t,...n}){return o(io__namespace.PanelResizeHandle,{"data-slot":"resizable-handle",className:s("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&o("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:o(lucideReact.GripVerticalIcon,{className:"size-2.5"})})})}function BC({className:e,children:t,...n}){return u(radixUi.ScrollArea.Root,{"data-slot":"scroll-area",className:s("relative",e),...n,children:[o(radixUi.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-primary/40 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),o(zp,{}),o(radixUi.ScrollArea.Corner,{})]})}function zp({className:e,orientation:t="vertical",...n}){return o(radixUi.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:t,className:s("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:o(radixUi.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var ls=X__namespace.createContext(void 0);function Na(){let e=X__namespace.useContext(ls);if(!e)throw new Error("useNativeSelectContext must be used within a Select component");return e}function jp({open:e,defaultOpen:t,onOpenChange:n,children:a,...r}){let{isNative:i}=vt(),c=Ye(),d=i||c,[l,g]=X__namespace.useState(t!=null?t:false),m=e!=null?e:l,C=X__namespace.useCallback(f=>{e===void 0&&g(f),n==null||n(f);},[e,n]),R=X__namespace.useMemo(()=>({isNative:d,open:m,setOpen:C,closeOnSelect:true}),[d,m,C]);return o(ls.Provider,{value:R,children:o(radixUi.Select.Root,{"data-slot":"select",open:m,onOpenChange:C,...r,children:a})})}function Up({className:e,size:t="default",children:n,...a}){let{isNative:r,open:i,setOpen:c}=Na();return u(radixUi.Select.Trigger,{"data-slot":"select-trigger","data-size":t,onClick:d=>{r&&(d.preventDefault(),d.stopPropagation(),c(!i));},className:s(at,"border-input flex w-full items-center gap-2 rounded-md border bg-transparent px-3 py-2 text-sm transition-colors cursor-pointer","data-[state=open]:border-primary focus-visible:ring-0 data-[state=open]:ring-0",e),...a,children:[o("span",{className:"flex-1 min-w-0 text-left [&_[data-slot=select-value]]:min-w-0 [&_[data-slot=select-value]]:flex [&_[data-slot=select-value]]:flex-1 [&_[data-slot=select-value]]:truncate",children:n}),o(radixUi.Select.Icon,{className:"pointer-events-none shrink-0 text-muted-foreground",children:o(lucideReact.ChevronDownIcon,{className:"size-4"})})]})}function Gp({className:e,children:t,position:n="popper",title:a,...r}){let i=Na();return o(radixUi.Select.Portal,{children:o(radixUi.Select.Content,{"data-slot":"select-content",className:s(i.isNative?"fixed inset-x-0 bottom-0 z-[9999] rounded-t-2xl border-t bg-background":"bg-popover text-popover-foreground relative z-50 rounded-md border",e),position:n,...r,children:i.isNative?o(At,{open:i.open,onOpenChange:i.setOpen,title:a,disableContentWrapper:true,children:o(radixUi.Select.Viewport,{className:"max-h-[75vh] overflow-y-auto",children:t})}):u(jsxRuntime.Fragment,{children:[o(Wp,{}),o(radixUi.Select.Viewport,{className:"p-1",children:t}),o($p,{})]})})})}function qp({className:e,children:t,onSelect:n,...a}){let r=Na(),i=X__namespace.useCallback(c=>{n==null||n(c),r.isNative&&r.closeOnSelect&&!c.defaultPrevented&&setTimeout(()=>{r.setOpen(false);});},[r,n]);return u(radixUi.Select.Item,{"data-slot":"select-item",onSelect:i,className:s("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm select-none",e),...a,children:[o("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:o(radixUi.Select.ItemIndicator,{children:o(lucideReact.CheckIcon,{className:"size-4"})})}),o(radixUi.Select.ItemText,{children:t})]})}function Wp({className:e,...t}){return o(radixUi.Select.ScrollUpButton,{className:s("flex items-center justify-center py-1",e),...t,children:o(lucideReact.ChevronUpIcon,{className:"size-4"})})}function $p({className:e,...t}){return o(radixUi.Select.ScrollDownButton,{className:s("flex items-center justify-center py-1",e),...t,children:o(lucideReact.ChevronDownIcon,{className:"size-4"})})}function Yp({className:e,...t}){return o(radixUi.Select.Value,{"data-slot":"select-value",className:s("flex-1 min-w-0 truncate text-left data-[placeholder]:text-muted-foreground",e),...t})}function Cn({options:e,placeholder:t="Select an option",triggerProps:n,contentProps:a,...r}){let i=n!=null?n:{},c=a!=null?a:{};return u(jp,{...r,children:[o(Up,{...i,children:o(Yp,{placeholder:t})}),o(Gp,{...c,children:e.map(d=>{var l,g;return o(qp,{value:d.value,disabled:d.disabled,className:d.className,children:(g=d.label)!=null?g:d.value},(l=d.key)!=null?l:d.value)})})]})}var Sa=()=>{},cs=X__namespace.createContext({isNative:false,selectedValues:[],setSelectedValues:Sa,toggleValue:Sa,isSelected:()=>false,open:false,setOpen:Sa});function Pn(){return X__namespace.useContext(cs)}function ds({value:e,defaultValue:t=[],onValueChange:n,open:a,defaultOpen:r,onOpenChange:i,children:c}){let{isNative:d}=vt(),l=Ye(),g=d||l,[m,C]=X__namespace.useState(t),[R,f]=X__namespace.useState(r!=null?r:false);X__namespace.useEffect(()=>{e!==void 0&&C(e);},[e]),X__namespace.useEffect(()=>{a!==void 0&&f(a);},[a]);let b=e!=null?e:m,p=a!=null?a:R,v=X__namespace.useCallback(h=>{let E=typeof h=="function"?h(b):h;e===void 0&&C(E),n==null||n(E);},[n,b,e]),y=X__namespace.useCallback(h=>{v(E=>E.includes(h)?E.filter(L=>L!==h):[...E,h]);},[v]),x=X__namespace.useCallback(h=>b.includes(h),[b]),N=X__namespace.useCallback(h=>{a===void 0&&f(h),i==null||i(h);},[i,a]),w=X__namespace.useMemo(()=>({isNative:g,selectedValues:b,setSelectedValues:v,toggleValue:y,isSelected:x,open:p,setOpen:N}),[g,p,N,b,v,y,x]),S=g?c:o(Qt,{open:p,onOpenChange:N,children:c});return o(cs.Provider,{value:w,children:S})}function us({className:e,children:t,disabled:n,onClick:a,...r}){let i=Pn(),c=X__namespace.useCallback(l=>{a==null||a(l),i.isNative&&!n&&i.setOpen(!i.open);},[i,n,a]),d=u("button",{type:"button","data-slot":"multi-select-trigger","data-state":i.open?"open":"closed",className:s(at,"border-input focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 relative flex w-full min-w-0 items-center gap-2 rounded-md border bg-transparent py-2 pl-3 pr-9 text-sm transition-colors outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),"aria-haspopup":"listbox","aria-expanded":i.open,disabled:n,onClick:c,...r,children:[o("span",{className:"flex-1 min-w-0 text-left",children:t}),o(lucideReact.ChevronDownIcon,{className:"pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 opacity-50"})]});return i.isNative?d:o(Ai,{asChild:true,children:d})}function ps({placeholder:e="Select options",className:t,separator:n=", ",formatValue:a}){let{selectedValues:r,isNative:i}=Pn(),c=X__namespace.useMemo(()=>a?a(r):r.length===0?e:i?r.map(d=>o(br,{variant:"secondary",children:d},d)):r.join(n),[a,i,e,r,n]);return o("span",{"data-slot":"multi-select-value",className:s("flex min-h-4 flex-wrap items-center gap-1 text-sm",r.length===0&&"text-muted-foreground",t),children:c})}function ms({className:e,title:t,children:n,commandClassName:a,showSearch:r=false,searchPlaceholder:i="Search...",emptyMessage:c="No options found.",sideOffset:d=4,align:l="start",...g}){let m=Pn(),C=u(Jn,{className:s("w-full",a),children:[r?o($r,{placeholder:i}):null,u(Yr,{children:[c!==null?o(Kr,{children:c}):null,n]})]});return m.isNative?o(At,{open:m.open,onOpenChange:m.setOpen,title:t,contentClassName:s("px-2 pb-2",e),footer:o(Q,{type:"button",variant:"outline",onClick:()=>m.setOpen(false),children:"Close"}),children:C}):o(Zt,{"data-slot":"multi-select-content",className:s("w-64 p-0",e),sideOffset:d,align:l,...g,children:C})}function fs({value:e,children:t,className:n,disabled:a,...r}){let i=Pn(),c=i.isSelected(e);return u(Xr,{...r,value:e,onSelect:()=>{a||i.toggleValue(e);},"data-slot":"multi-select-item",disabled:a,className:s("gap-2",n),children:[o("span",{className:"flex size-4 items-center justify-center",children:o(lucideReact.CheckIcon,{className:s("size-4",c?"opacity-100":"opacity-0")})}),o("span",{children:t})]})}function gs({className:e,orientation:t="horizontal",decorative:n=true,...a}){return o(radixUi.Separator.Root,{"data-slot":"separator",decorative:n,orientation:t,className:s("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function bs({...e}){return o(radixUi.Dialog.Root,{"data-slot":"sheet",...e})}function gP({...e}){return o(radixUi.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}function bP({...e}){return o(radixUi.Dialog.Close,{"data-slot":"sheet-close",...e})}function Zp({...e}){return o(radixUi.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function em({className:e,...t}){return o(radixUi.Dialog.Overlay,{"data-slot":"sheet-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function vs({className:e,children:t,side:n="right",...a}){return u(Zp,{children:[o(em,{}),u(radixUi.Dialog.Content,{"data-slot":"sheet-content",className:s("bg-background fixed z-50 flex flex-col gap-4 shadow-lg outline-none transition-transform ease-in-out data-[state=open]:duration-300 data-[state=closed]:duration-200",n==="right"&&"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",n==="left"&&"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0",n==="top"&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0",n==="bottom"&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0",e),...a,children:[t,u(radixUi.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o(lucideReact.XIcon,{className:"size-4"}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function hs({className:e,...t}){return o("div",{"data-slot":"sheet-header",className:s("flex flex-col gap-1.5 p-4",e),...t})}function vP({className:e,...t}){return o("div",{"data-slot":"sheet-footer",className:s("mt-auto flex flex-col gap-2 p-4",e),...t})}function ys({className:e,...t}){return o(radixUi.Dialog.Title,{"data-slot":"sheet-title",className:s("text-foreground font-semibold",e),...t})}function xs({className:e,...t}){return o(radixUi.Dialog.Description,{"data-slot":"sheet-description",className:s("text-muted-foreground text-sm",e),...t})}function ra({delayDuration:e=0,...t}){return o(radixUi.Tooltip.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ws({...e}){return o(ra,{children:o(radixUi.Tooltip.Root,{"data-slot":"tooltip",...e})})}function Rs({...e}){return o(radixUi.Tooltip.Trigger,{"data-slot":"tooltip-trigger",...e})}function Cs({className:e,sideOffset:t=0,children:n,...a}){return o(radixUi.Tooltip.Portal,{children:u(radixUi.Tooltip.Content,{"data-slot":"tooltip-content",sideOffset:t,className:s("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...a,children:[n,o(radixUi.Tooltip.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}var nm="sidebar_state",am=3600*24*7,rm="16rem",im="18rem",sm="3rem",lm="b",Ps=X__namespace.createContext(null);function Fo(){let e=X__namespace.useContext(Ps);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ni({defaultOpen:e=true,open:t,onOpenChange:n,className:a,style:r,children:i,...c}){let d=Ye(),[l,g]=X__namespace.useState(false),[m,C]=X__namespace.useState(e),R=t!=null?t:m,f=X__namespace.useCallback(y=>{let x=typeof y=="function"?y(R):y;n?n(x):C(x),document.cookie=`${nm}=${x}; path=/; max-age=${am}`;},[n,R]),b=X__namespace.useCallback(()=>d?g(y=>!y):f(y=>!y),[d,f,g]);X__namespace.useEffect(()=>{let y=x=>{x.key===lm&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),b());};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[b]);let p=R?"expanded":"collapsed",v=X__namespace.useMemo(()=>({state:p,open:R,setOpen:f,isMobile:d,openMobile:l,setOpenMobile:g,toggleSidebar:b}),[p,R,f,d,l,g,b]);return o(Ps.Provider,{value:v,children:o("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":rm,"--sidebar-width-icon":sm,...r},className:s("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...c,children:i})})}function Si({side:e="left",variant:t="sidebar",collapsible:n="icon",className:a,children:r,...i}){let{isMobile:c,state:d,openMobile:l,setOpenMobile:g}=Fo();return n==="none"?o("div",{"data-slot":"sidebar",className:s("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),...i,children:r}):c?o(bs,{open:l,onOpenChange:g,...i,children:u(vs,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":im},side:e,children:[u(hs,{className:"sr-only",children:[o(ys,{children:"Sidebar"}),o(xs,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:r})]})}):u("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[o("div",{"data-slot":"sidebar-gap",className:s("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o("div",{"data-slot":"sidebar-container",className:s("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...i,children:o("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:r})})]})}function HP({className:e,onClick:t,...n}){let{toggleSidebar:a}=Fo();return u(Q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:s("size-7",e),onClick:r=>{t==null||t(r),a();},...n,children:[o(lucideReact.PanelLeftIcon,{}),o("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function OP({className:e,...t}){let{toggleSidebar:n}=Fo();return o("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:s("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Mi({className:e,...t}){return o("main",{"data-slot":"sidebar-inset",className:s("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function AP({className:e,...t}){return o(qe,{"data-slot":"sidebar-input","data-sidebar":"input",className:s("bg-background h-8 w-full shadow-none",e),...t})}function ki({className:e,sticky:t=false,...n}){return o("div",{"data-slot":"sidebar-header","data-sidebar":"header","data-sticky":t?"true":void 0,className:s("flex flex-col gap-2 p-2",t&&"sticky top-0 z-20 bg-sidebar/95 backdrop-blur supports-[backdrop-filter]:bg-sidebar/75",e),...n})}function Ei({className:e,...t}){return o("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s("flex flex-col gap-2 p-2",e),...t})}function zP({className:e,...t}){return o(gs,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:s("bg-sidebar-border mx-2 w-auto",e),...t})}function Di({className:e,...t}){return o("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function BP({className:e,...t}){return o("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s("relative flex w-full min-w-0 flex-col p-2",e),...t})}function VP({className:e,asChild:t=false,...n}){let a=t?radixUi.Slot.Slot:"div";return o(a,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:s("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function jP({className:e,asChild:t=false,...n}){let a=t?radixUi.Slot.Slot:"button";return o(a,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:s("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})}function UP({className:e,...t}){return o("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s("w-full text-sm",e),...t})}function Li({className:e,...t}){return o("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s("flex w-full min-w-0 flex-col gap-1",e),...t})}function Ii({className:e,...t}){return o("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s("group/menu-item relative",e),...t})}var cm=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Fi({asChild:e=false,isActive:t=false,variant:n="default",size:a="default",tooltip:r,className:i,onClick:c,...d}){let l=e?radixUi.Slot.Slot:"button",{isMobile:g,setOpenMobile:m,state:C}=Fo(),R=X__namespace.useCallback(b=>{c&&c(b),!b.defaultPrevented&&g&&m(false);},[g,c,m]),f=o(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":a,"data-active":t,className:s(cm({variant:n,size:a}),i),onClick:R,...d});return r?(typeof r=="string"&&(r={children:r}),u(ws,{children:[o(Rs,{asChild:true,children:f}),o(Cs,{side:"right",align:"center",hidden:C!=="collapsed"||g,...r})]})):f}function GP({className:e,asChild:t=false,showOnHover:n=false,...a}){let r=t?radixUi.Slot.Slot:"button";return o(r,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:s("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...a})}function qP({className:e,...t}){return o("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:s("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}function WP({className:e,showIcon:t=false,...n}){let a=X__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return u("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:s("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&o(Pt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o(Pt,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})}function $P({className:e,...t}){return o("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:s("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function YP({className:e,...t}){return o("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:s("group/menu-sub-item relative",e),...t})}function KP({asChild:e=false,size:t="md",isActive:n=false,className:a,onClick:r,...i}){let c=e?radixUi.Slot.Slot:"a",{isMobile:d,setOpenMobile:l}=Fo(),g=X__namespace.useCallback(m=>{r&&r(m),!m.defaultPrevented&&d&&l(false);},[d,r,l]);return o(c,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:s("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),onClick:g,...i})}function eT({className:e,defaultValue:t,value:n,min:a=0,max:r=100,...i}){let c=X__namespace.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[a,r],[n,t,a,r]);return u(radixUi.Slider.Root,{"data-slot":"slider",defaultValue:t,value:n,min:a,max:r,className:s("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...i,children:[o(radixUi.Slider.Track,{"data-slot":"slider-track",className:s("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:o(radixUi.Slider.Range,{"data-slot":"slider-range",className:s("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(d,l)=>o(radixUi.Slider.Thumb,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-primary/40 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}var aT=({...e})=>o(sonner.Toaster,{theme:"dark",className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e});function Ss({className:e,...t}){return o(radixUi.Switch.Root,{"data-slot":"switch",className:s("peer cursor-pointer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-primary focus-visible:ring-primary/40 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:o(radixUi.Switch.Thumb,{"data-slot":"switch-thumb",className:s("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function Ms({className:e,...t}){return o("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-visible",children:o("table",{"data-slot":"table",className:s("w-full caption-bottom text-sm",e),...t})})}function ks({className:e,...t}){return o("thead",{"data-slot":"table-header",className:s("[&_tr]:border-b",e),...t})}function Es({className:e,...t}){return o("tbody",{"data-slot":"table-body",className:s("[&_tr:last-child]:border-0",e),...t})}function pT({className:e,...t}){return o("tfoot",{"data-slot":"table-footer",className:s("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function Nt({className:e,...t}){return o("tr",{"data-slot":"table-row",className:s("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Ds({className:e,...t}){return o("th",{"data-slot":"table-head",className:s("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Bt({className:e,...t}){return o("td",{"data-slot":"table-cell",className:s("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function mT({className:e,...t}){return o("caption",{"data-slot":"table-caption",className:s("text-muted-foreground mt-4 text-sm",e),...t})}var Ls=X__namespace.createContext(null),Ma=e=>{let t=X__namespace.useContext(Ls);if(!t)throw new Error(`${e} must be used within <Tabs>`);return t},Is=X__namespace.createContext("default"),ka=e=>{let t=X__namespace.useContext(Is);return e!=null?e:t},um={default:"h-10 justify-start rounded-md bg-muted p-1 text-muted-foreground md:justify-center",solid:"justify-start gap-1 rounded-full bg-muted/80 p-1 text-muted-foreground",segmented:"justify-start gap-1 rounded-xl bg-muted/70 p-1 text-muted-foreground",underline:"justify-start gap-6 border-b border-border bg-transparent p-0 text-muted-foreground",boxed:"justify-start gap-1 rounded-t-xl border border-border/60 bg-muted/40 p-1 text-muted-foreground"},pm="relative z-10 inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",mm={default:"min-w-[120px] rounded-md px-3 py-1.5 text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-foreground",solid:"rounded-full px-4 py-1.5 text-foreground/80 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-background",segmented:"rounded-lg px-4 py-1.5 text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-foreground",underline:"rounded-none border-b-2 border-transparent px-1 pb-2 pt-1 text-sm text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0 data-[state=active]:border-foreground data-[state=active]:text-foreground",boxed:"rounded-md border border-transparent px-4 py-2 text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:text-foreground"},fm={default:"mt-2",solid:"mt-3",segmented:"mt-3",underline:"mt-4",boxed:"mt-0 rounded-b-xl border border-border border-t-0 bg-card p-6 shadow-sm"},gm=new Set(["default","solid","segmented","boxed"]),bm={default:"rounded-md bg-background shadow-sm",solid:"rounded-full bg-foreground",segmented:"rounded-lg bg-background shadow-sm",boxed:"rounded-md border border-border bg-background shadow-sm"},vm="pointer-events-none absolute left-0 top-0 z-0 transition-all duration-300 ease-out will-change-transform",Fs=(...e)=>t=>{e.forEach(n=>{if(typeof n=="function")n(t);else if(n!=null){let a=n;a.current=t;}});},_s=X__namespace.forwardRef(({className:e,value:t,defaultValue:n,onValueChange:a,activationMode:r="automatic",variant:i="default",orientation:c="horizontal",items:d,listClassName:l,triggerClassName:g,contentClassName:m,renderList:C,...R},f)=>{var W;let b=X__namespace.useId(),p=t!==void 0,[v,y]=X__namespace.useState(()=>n!=null?n:null),x=(W=p?t:v)!=null?W:null,N=X__namespace.useRef(new Map),w=X__namespace.useCallback(D=>{p||y(D),a==null||a(D);},[p,a]),S=X__namespace.useCallback((D,F)=>{if(F){let A=N.current.size===0;N.current.set(D,F),!p&&x==null&&n==null&&A&&y(D);}else N.current.delete(D);},[n,p,y,x]),h=X__namespace.useCallback(D=>{var F;return D&&(F=N.current.get(D))!=null?F:null},[]),E=X__namespace.useCallback(D=>{let F=Array.from(N.current.keys());if(!F.length)return;let A=(D%F.length+F.length)%F.length,k=F[A],U=N.current.get(k);U==null||U.focus(),r!=="manual"&&w(k);},[r,w]),L=X__namespace.useCallback((D,F)=>{let k=Array.from(N.current.keys()).indexOf(D);k!==-1&&E(k+F);},[E]),M=X__namespace.useCallback(D=>{let F=Array.from(N.current.keys());F.length&&E(D==="first"?0:F.length-1);},[E]),[P,T]=X__namespace.useState(c),H=X__namespace.useCallback(D=>{T(D);},[]);X__namespace.useEffect(()=>{T(c);},[c]),X__namespace.useEffect(()=>{!p&&x==null&&n&&y(n);},[n,p,y,x]);let O=X__namespace.useMemo(()=>({id:b,value:x,setValue:w,activationMode:r,registerTrigger:S,getTriggerNode:h,focusNextTrigger:L,focusEdgeTrigger:M,orientation:P,setOrientation:H}),[b,x,w,r,S,L,M,P,H]);return o(Is.Provider,{value:i,children:o(Ls.Provider,{value:O,children:u("div",{ref:f,className:s("flex flex-col gap-2",e),...R,children:[(C!=null?C:(D=>D))(o(Hs,{className:l,variant:i,orientation:c,children:d.map(D=>{let{triggerProps:F,contentProps:A,...k}=D,{className:U,...V}=F!=null?F:{};return o(Os,{value:k.key,disabled:k.disabled,className:s(g,k.triggerClassName,U),variant:i,...V,children:k.label},k.key)})})),d.map(D=>{let{triggerProps:F,contentProps:A,...k}=D,{className:U,...V}=A!=null?A:{};return o(As,{value:k.key,variant:i,className:s(m,k.contentClassName,U),...V,children:k.children},k.key)})]})})})});_s.displayName="Tabs";var Hs=X__namespace.forwardRef(({className:e,variant:t,orientation:n="horizontal",...a},r)=>{let{value:i,setOrientation:c,getTriggerNode:d}=Ma("TabsList"),l=ka(t),g=bm[l],m=X__namespace.useRef(null),[C,R]=X__namespace.useState(null),f=gm.has(l),[b,p]=X__namespace.useState(false),[v,y]=X__namespace.useState(false),x=X__namespace.useCallback(S=>{if(n!=="horizontal")return;let h=m.current;if(!h||!S)return;let E=d(S);if(!E)return;let L=32,M=h.scrollLeft,P=M+h.clientWidth,T=E.offsetLeft,H=T+E.offsetWidth;if(T<M){let O=Math.max(0,T-L);typeof h.scrollTo=="function"?h.scrollTo({left:O,behavior:"smooth"}):h.scrollLeft=O;}else if(H>P){let O=Math.max(0,h.scrollWidth-h.clientWidth),W=Math.min(O,H-h.clientWidth+L);typeof h.scrollTo=="function"?h.scrollTo({left:W,behavior:"smooth"}):h.scrollLeft=W;}},[d,n]),N=X__namespace.useCallback(()=>{if(!f){R(null);return}let S=m.current,h=d(i);if(!S||!h){R(null);return}let E=h.offsetWidth,L=h.offsetHeight,M=h.offsetLeft,P=h.offsetTop,T=h.offsetParent;for(;T&&T!==S;)M+=T.offsetLeft-T.scrollLeft,P+=T.offsetTop-T.scrollTop,T=T.offsetParent;if(T!==S){let H=h.getBoundingClientRect(),O=S.getBoundingClientRect();M=H.left-O.left+S.scrollLeft,P=H.top-O.top+S.scrollTop;}R({width:E,height:L,transform:`translate3d(${M}px, ${P}px, 0)`});},[i,d,f]);X__namespace.useEffect(()=>{c(n);},[n,c]),X__namespace.useLayoutEffect(()=>{N();},[N]),X__namespace.useEffect(()=>{if(n!=="horizontal"){p(false),y(false);return}let S=m.current;if(!S)return;let h=()=>{let{scrollLeft:P,scrollWidth:T,clientWidth:H}=S;if(!(T-H>1)){p(false),y(false);return}p(P>1),y(P<T-H-1);};h(),x(i);let E=()=>h(),L=()=>{h(),x(i);},M=typeof ResizeObserver!="undefined"?new ResizeObserver(()=>L()):null;return S.addEventListener("scroll",E,{passive:true}),M==null||M.observe(S),window.addEventListener("resize",L),()=>{S.removeEventListener("scroll",E),M==null||M.disconnect(),window.removeEventListener("resize",L);}},[i,x,n]),X__namespace.useEffect(()=>{x(i);},[i,x]),X__namespace.useEffect(()=>{if(!f||typeof ResizeObserver=="undefined")return;let S=m.current;if(!S)return;let h=new ResizeObserver(()=>{N();});h.observe(S);let E=d(i);return E&&h.observe(E),()=>{h.disconnect();}},[i,d,f,N]),X__namespace.useEffect(()=>{if(!f||typeof MutationObserver=="undefined")return;let S=m.current;if(!S)return;let h=new MutationObserver(()=>{N();});return h.observe(S,{childList:true,subtree:true}),()=>{h.disconnect();}},[f,N]),X__namespace.useEffect(()=>{if(!f)return;let S=()=>{N();};return window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S);}},[f,N]);let w=n==="horizontal";return u("div",{className:s("relative",w&&"max-w-full overflow-hidden"),children:[u("div",{ref:Fs(m,r),role:"tablist","aria-orientation":n,className:s("relative inline-flex items-center",w&&"w-full max-w-full overflow-x-auto overflow-y-hidden [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",um[l],e),...a,children:[f&&C&&g?o("span",{"aria-hidden":"true",className:s(vm,g),style:C}):null,a.children]}),w&&b?o("div",{className:"pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r from-background to-transparent"}):null,w&&v?o("div",{className:"pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-background to-transparent"}):null]})});Hs.displayName="TabsList";var Os=X__namespace.forwardRef(({className:e,variant:t,value:n,disabled:a,onClick:r,onKeyDown:i,...c},d)=>{let{id:l,value:g,setValue:m,registerTrigger:C,focusNextTrigger:R,focusEdgeTrigger:f,orientation:b}=Ma("TabsTrigger"),p=ka(t),v=X__namespace.useRef(null),y=g===n,x=`${l}-trigger-${n}`,N=`${l}-content-${n}`;X__namespace.useEffect(()=>(C(n,v.current),()=>C(n,null)),[C,n]);let w=h=>{r==null||r(h),!(h.defaultPrevented||a)&&m(n);},S=h=>{if(i==null||i(h),!h.defaultPrevented){if(b==="horizontal"){if(h.key==="ArrowRight"){h.preventDefault(),R(n,1);return}if(h.key==="ArrowLeft"){h.preventDefault(),R(n,-1);return}}else {if(h.key==="ArrowDown"){h.preventDefault(),R(n,1);return}if(h.key==="ArrowUp"){h.preventDefault(),R(n,-1);return}}if(h.key==="Home"){h.preventDefault(),f("first");return}if(h.key==="End"){h.preventDefault(),f("last");return}(h.key===" "||h.key==="Enter")&&(h.preventDefault(),m(n));}};return o("button",{type:"button",role:"tab",id:x,"aria-selected":y,"aria-controls":N,tabIndex:y?0:-1,"data-state":y?"active":"inactive",disabled:a,ref:Fs(v,d),className:s(pm,mm[p],e),onClick:w,onKeyDown:S,...c})});Os.displayName="TabsTrigger";var As=X__namespace.forwardRef(({className:e,variant:t,value:n,...a},r)=>{let{id:i,value:c}=Ma("TabsContent"),d=ka(t),l=c===n,g=`${i}-trigger-${n}`,m=`${i}-content-${n}`;return o("div",{ref:r,role:"tabpanel",id:m,"aria-labelledby":g,hidden:!l,"data-state":l?"active":"inactive",className:s("focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",fm[d],e),...a})});As.displayName="TabsContent";var Ea=X__namespace.forwardRef(({className:e,onFocus:t,...n},a)=>{let r=X__namespace.useCallback(c=>{typeof a=="function"?a(c):a&&(a.current=c);},[a]),i=X__namespace.useCallback(c=>{t==null||t(c),!c.defaultPrevented&&Go(c.currentTarget);},[t]);return o("textarea",{ref:r,"data-slot":"textarea",onFocus:i,className:s("border-input placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-primary/40 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...n})});Ea.displayName="Textarea";var Da=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-primary focus-visible:ring-primary/40 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function ST({className:e,variant:t,size:n,...a}){return o(radixUi.Toggle.Root,{"data-slot":"toggle",className:s(Da({variant:t,size:n,className:e})),...a})}var Bs=X__namespace.createContext({size:"default",variant:"default"});function IT({className:e,variant:t,size:n,children:a,...r}){return o(radixUi.ToggleGroup.Root,{"data-slot":"toggle-group","data-variant":t,"data-size":n,className:s("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",e),...r,children:o(Bs.Provider,{value:{variant:t,size:n},children:a})})}function FT({className:e,children:t,variant:n,size:a,...r}){let i=X__namespace.useContext(Bs);return o(radixUi.ToggleGroup.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||n,"data-size":i.size||a,className:s(Da({variant:i.variant||n,size:i.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...r,children:t})}var Rm="hsl(var(--primary))",La={bottomLeft:{side:"bottom",align:"start"},bottomRight:{side:"bottom",align:"end"},topLeft:{side:"top",align:"start"},topRight:{side:"top",align:"end"}},Cm=e=>{var t;return e&&(t=La[e])!=null?t:La.bottomLeft},Ze=e=>String(e).padStart(2,"0"),Pm=(e,t)=>{let n=e.hour>=12?"PM":"AM",a=(e.hour+11)%12+1,r={HH:Ze(e.hour),H:String(e.hour),hh:Ze(a),h:String(a),mm:Ze(e.minute),m:String(e.minute),ss:Ze(e.second),s:String(e.second),A:n,a:n.toLowerCase()};return t.replace(/HH|H|hh|h|mm|m|ss|s|A|a/g,i=>r[i])},Tm=(e,t)=>t?`${Ze(e.hour)}:${Ze(e.minute)}:${Ze(e.second)}`:`${Ze(e.hour)}:${Ze(e.minute)}`,Nm=e=>{let t=e.match(/\b(AM|PM)\b/i);return t?t[1].toUpperCase()==="AM"?"AM":"PM":null},Vs=e=>{if(!e)return null;let t=e.trim();if(!t)return null;let n=Nm(t),a=n?t.replace(/\s?(AM|PM)\b/i,"").trim():t,[r,i,c]=a.split(":");if(!r||!i)return null;let d=Number.parseInt(r,10),l=Number.parseInt(i,10),g=c?Number.parseInt(c,10):0;if([d,l,g].some(C=>Number.isNaN(C)))return null;let m=d;if(n){let C=Math.min(Math.max(m%12||12,1),12);m=n==="PM"?C%12+12:C%12,n==="AM"&&C===12&&(m=0),n==="PM"&&C===12&&(m=12);}return {hour:Math.min(Math.max(m,0),23),minute:Math.min(Math.max(l,0),59),second:Math.min(Math.max(g,0),59)}},Sm=e=>{let t=e%12;return t===0?12:t},Mm=(e,t)=>{let n=e%12;return t==="PM"?n+12:n===12?0:n},Ia=({label:e,options:t,selectedValue:n,onSelect:a})=>u("div",{className:"flex w-20 min-w-0 flex-col gap-2",children:[o("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),o("div",{role:"listbox",className:"max-h-48 overflow-y-auto rounded-md border border-border/60 p-1","aria-label":e,children:t.map(r=>{let i=r.value===n;return o("button",{type:"button",role:"option","aria-selected":i,className:s("w-full rounded-sm px-2 py-1 text-sm transition-colors",i?"bg-primary text-primary-foreground":"hover:bg-muted hover:text-foreground"),onClick:()=>a(r.value),children:r.label},r.value)})})]}),Sn=44,km=5,js=40;function Fa({label:e,options:t,selectedValue:n,onValueChange:a,open:r,infinite:i=true}){let c=X__namespace.useRef(null),d=X__namespace.useRef(null),l=X__namespace.useMemo(()=>{if(t.length===0)return [];if(!i)return t;let R=[];for(let f=0;f<js;f+=1)for(let b of t)R.push(b);return R},[i,t]),g=X__namespace.useCallback((R,f="auto")=>{if(!c.current||t.length===0||l.length===0)return;let b=t.findIndex(N=>N.value===R),p=b>=0?b:0,v=Math.floor(js/2),x=(i?p+t.length*v:p)*Sn;c.current.scrollTo({top:x,behavior:f});},[l.length,i,t]);X__namespace.useLayoutEffect(()=>{r&&g(n);},[g,r,t,n]),X__namespace.useEffect(()=>()=>{d.current!==null&&clearTimeout(d.current);},[]);let m=X__namespace.useCallback(R=>{if(l.length===0||t.length===0)return;let f=R.currentTarget,b=Math.round(f.scrollTop/Sn),p=l.length-1,v=Math.max(0,Math.min(b,p));d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{var N;let y=l[v];if(!y)return;if(!a(y.value)){g(n,"smooth");return}if(i){let w=t.length,S=l.length-t.length-1;if(b<=w||b>=S)g(y.value);else {let h=b*Sn;(N=c.current)==null||N.scrollTo({top:h});}return}g(y.value);},80);},[g,l,i,a,t,n]);if(t.length===0)return o("div",{className:"flex-1",children:o("p",{className:"text-center text-sm text-muted-foreground",children:"No options"})});let C=(km-1)/2*Sn;return u("div",{className:"flex flex-1 flex-col items-center gap-2",children:[o("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),u("div",{className:"relative h-56 w-full overflow-hidden",children:[o("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 border-y border-primary/30"}),o("div",{ref:c,onScroll:m,className:"h-56 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",style:{paddingTop:C,paddingBottom:C,WebkitOverflowScrolling:"touch"},children:l.map((R,f)=>{let b=`${f}-${R.value}`,p=R.value===n;return o("div",{className:s("flex h-11 items-center justify-center text-base transition-colors",p?"font-medium text-foreground":"text-muted-foreground"),children:R.label},b)})})]})]})}var Em=({value:e,onChange:t})=>u("div",{className:"flex w-20 min-w-0 flex-col gap-2",children:[o("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Period"}),o("div",{role:"radiogroup",className:"grid gap-2",children:["AM","PM"].map(n=>{let a=n===e;return o("button",{type:"button",role:"radio","aria-checked":a,className:s("rounded-sm px-2 py-1 text-sm transition-colors",a?"bg-primary text-primary-foreground":"border border-border/60 hover:bg-muted hover:text-foreground"),onClick:()=>t(n),children:n},n)})})]}),_a=X__namespace.forwardRef((e,t)=>{var zo,jt,mo,fo;let{value:n,defaultValue:a=null,onChange:r,onOpenChange:i,hourStep:c=1,minuteStep:d=1,secondStep:l=1,showSeconds:g,use12Hours:m=false,allowClear:C=true,format:R,placeholder:f,placement:b="bottomLeft",size:p="middle",status:v,variant:y="outlined",inputClassName:x,inputStyle:N,prefix:w,open:S,defaultOpen:h,inputReadOnly:E=true,className:L,style:M,disabled:P=false,name:T,id:H,...O}=e,{onBlur:W,onFocus:D,onClick:F,...A}=O,{isNative:k}=vt(),U=Ye(),V=k||U,B=n!==void 0,[q,j]=X__namespace.useState(a),G=(zo=B?n:q)!=null?zo:null,_=X__namespace.useMemo(()=>Vs(G),[G]),te=X__namespace.useMemo(()=>{var J;return ((J=_==null?void 0:_.hour)!=null?J:0)>=12?"PM":"AM"},[_==null?void 0:_.hour]),[K,ce]=X__namespace.useState(te);X__namespace.useEffect(()=>{ce(te);},[te]);let le=X__namespace.useMemo(()=>typeof g=="boolean"?g:typeof R=="string"?/s/.test(R):!!(G&&G.split(":").length===3),[G,R,g]),re=X__namespace.useMemo(()=>m?le?"hh:mm:ss A":"hh:mm A":le?"HH:mm:ss":"HH:mm",[le,m]),ge=typeof R=="string"?R:re,fe=X__namespace.useCallback(J=>J?typeof R=="function"?R(J):Pm(J,ge):"",[R,ge]),[$,ie]=X__namespace.useState(()=>fe(_));X__namespace.useEffect(()=>{ie(fe(_));},[fe,_]);let pe=typeof C=="object"&&C!==null&&!Array.isArray(C)?C:void 0,he=(jt=pe==null?void 0:pe.clearIcon)!=null?jt:o(lucideReact.X,{className:"h-4 w-4",strokeWidth:2}),Re=!!C&&!P&&!!G,ne=X__namespace.useMemo(()=>({"--date-primary-color":Rm}),[]),oe=S!==void 0,[ye,de]=X__namespace.useState(!!h),we=oe?!!S:ye,Te=X__namespace.useCallback(J=>{P||(oe||de(J),i==null||i(J));},[P,oe,i]),me=X__namespace.useCallback(J=>{if(!J){B||j(null),ie(""),r==null||r(null,"");return}let ue=Tm(J,le);B||j(ue);let We=fe(J);ie(We),r==null||r(ue,We);},[fe,le,B,r]),De=_!=null?_:{hour:0,minute:0,second:0},Pe=Math.max(1,Math.floor(c)),Ne=Math.max(1,Math.floor(d)),be=Math.max(1,Math.floor(l)),dt=X__namespace.useMemo(()=>{if(m){let ue=[];for(let nt=1;nt<=12;nt+=Pe)ue.push(Math.min(nt,12));return ue.includes(12)||ue.push(12),Array.from(new Set(ue)).sort((nt,In)=>nt-In).map(nt=>({label:Ze(nt),value:nt}))}let J=[];for(let ue=0;ue<24;ue+=Pe)J.push({label:Ze(ue),value:ue});return J},[Pe,m]),xe=X__namespace.useMemo(()=>{let J=[];for(let ue=0;ue<60;ue+=Ne)J.push({label:Ze(ue),value:ue});return J},[Ne]),Mt=X__namespace.useMemo(()=>{if(!le)return [];let J=[];for(let ue=0;ue<60;ue+=be)J.push({label:Ze(ue),value:ue});return J},[le,be]),Ve=X__namespace.useMemo(()=>_?m?Sm(_.hour):_.hour:m?12:0,[_,m]),xt=(mo=_==null?void 0:_.minute)!=null?mo:0,ot=(fo=_==null?void 0:_.second)!=null?fo:0,wt=X__namespace.useCallback(J=>{if(m){let ue=Mm(J,K);me({...De,hour:ue});}else me({...De,hour:J});},[De,me,K,m]),Ee=X__namespace.useCallback(J=>{me({...De,minute:J});},[De,me]),Ce=X__namespace.useCallback(J=>{me({...De,second:J});},[De,me]),kt=X__namespace.useCallback(J=>{ce(J);let ue=_!=null?_:De,We=ue.hour;J==="AM"&&We>=12&&(We-=12),J==="PM"&&We<12&&(We+=12),me({...ue,hour:We});},[De,me,_]),Vt=X__namespace.useCallback(J=>{let ue=J.target.value;if(ie(ue),!ue.trim()){me(null);return}let We=Vs(ue);We&&me(We);},[me]),{side:ae,align:Ke}=Cm(b),je={small:"h-8 text-sm",middle:`${at} text-sm`,large:"h-11 text-base"},ut={error:"border-destructive focus-visible:border-destructive focus-visible:ring-destructive/30",warning:"border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500/30"},Mn={outlined:"",borderless:"border-transparent shadow-none focus:border-transparent focus:ring-0 focus:ring-offset-0",filled:"border-transparent bg-muted/60 focus:bg-muted",underlined:"border-x-0 border-t-0 rounded-none focus:ring-offset-0"},Oo=E||V,kn=f!=null?f:"Select time",Ao=u("div",{role:"combobox","aria-expanded":we,"aria-haspopup":"dialog",className:s("relative w-full",L),style:M,children:[w&&o("div",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center text-muted-foreground",children:w}),o(qe,{...A,ref:t,value:$,onChange:Oo?void 0:Vt,onFocus:D,onBlur:W,readOnly:Oo,disabled:P,placeholder:kn,name:T,id:H,className:s("pr-10 text-sm",Mn[y],w&&"pl-10",P&&"cursor-not-allowed opacity-60",!P&&"cursor-pointer",je[p],v?ut[v]:void 0,x),style:{...v==="error"?{borderColor:"hsl(var(--destructive))",boxShadow:"0 0 0 3px hsl(var(--destructive) / 0.2)"}:{},...v==="warning"?{borderColor:"var(--warning, hsl(var(--primary)))",boxShadow:"0 0 0 3px hsl(var(--primary) / 0.2)"}:{},...N!=null?N:{}},onClick:J=>{F==null||F(J),!P&&Te(true);}}),Re&&o("button",{type:"button",className:"absolute inset-y-0 right-8 flex items-center text-muted-foreground transition hover:text-foreground",onMouseDown:J=>{J.preventDefault(),J.stopPropagation();},onClick:J=>{J.preventDefault(),J.stopPropagation(),me(null);},children:he}),o("div",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-muted-foreground",children:o(lucideReact.Clock,{className:"h-4 w-4"})})]}),En=X__namespace.useMemo(()=>[{label:"AM",value:"AM"},{label:"PM",value:"PM"}],[]),Dn=u("div",{className:"flex w-max gap-4 p-4",role:"dialog","aria-modal":"true",children:[o(Ia,{label:"Hour",options:dt,selectedValue:Ve,onSelect:wt}),o(Ia,{label:"Minute",options:xe,selectedValue:xt,onSelect:Ee}),le?o(Ia,{label:"Second",options:Mt,selectedValue:ot,onSelect:Ce}):null,m?o(Em,{value:K,onChange:kt}):null]}),Ln=u("div",{className:"flex w-full gap-4",children:[o(Fa,{open:we,label:"Hour",options:dt,selectedValue:Ve,onValueChange:J=>(wt(J),true)}),o(Fa,{open:we,label:"Minute",options:xe,selectedValue:xt,onValueChange:J=>(Ee(J),true)}),m?o(Fa,{open:we,label:"Period",options:En,selectedValue:K,infinite:false,onValueChange:J=>(kt(J),true)}):null]});return V?u(eo,{open:we,onOpenChange:Te,children:[o(dn,{asChild:true,children:Ao}),u(to,{className:"mt-10 max-h-[min(540px,calc(100dvh-6rem))] rounded-t-3xl bg-background",children:[o(oo,{className:"px-6 pb-2 pt-4",children:o(no,{className:"text-base font-medium text-foreground",children:"Select time"})}),u("div",{className:"flex flex-1 flex-col gap-6 px-6 pb-6",children:[o("div",{className:"flex w-full gap-4",children:Ln}),u("div",{className:"mt-auto flex items-center justify-between",children:[o("div",{className:"flex-1"}),u("div",{className:"flex items-center gap-3",children:[C?o(Q,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:()=>me(null),children:"Clear"}):null,o(un,{asChild:true,children:o(Q,{type:"button",variant:"default",size:"sm",className:"bg-[var(--date-primary-color)] text-white hover:opacity-90 focus-visible:ring-[var(--date-primary-color)]/30",style:ne,children:"Done"})})]})]})]})]})]}):u(Qt,{open:we,onOpenChange:Te,children:[o(cn,{asChild:true,children:Ao}),o(Zt,{className:"w-auto border border-border bg-popover p-0 shadow-lg",align:Ke,side:ae,children:Dn})]})});_a.displayName="TimePicker";function Us({row:e}){let{transform:t,transition:n,setNodeRef:a,isDragging:r}=sortable.useSortable({id:e.original.id});return o(Nt,{"data-state":e.getIsSelected()&&"selected","data-dragging":r,ref:a,className:"relative z-0 data-[dragging=true]:z-10 data-[dragging=true]:opacity-80",style:{transform:utilities.CSS.Transform.toString(t),transition:n},children:e.getVisibleCells().map(i=>o(Bt,{children:reactTable.flexRender(i.column.columnDef.cell,i.getContext())},i.id))})}function Gm({columns:e,dndEnabled:t,dataIds:n,rows:a}){return a.length?t?o(sortable.SortableContext,{items:n,strategy:sortable.verticalListSortingStrategy,children:a.map(r=>o(Us,{row:r},r.id))}):a.map(r=>o(Nt,{"data-state":r.getIsSelected()&&"selected",children:r.getVisibleCells().map(i=>{let c=i.column.columnDef.meta;return o(Bt,{className:c==null?void 0:c.cellClassName,style:c==null?void 0:c.cellStyle,children:reactTable.flexRender(i.column.columnDef.cell,i.getContext())},i.id)})},r.id)):o(Nt,{children:o(Bt,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})}function Ws({table:e,columns:t,dndEnabled:n=false,onReorder:a,virtualizedRows:r}){var C;let i=(C=r==null?void 0:r.rows)!=null?C:e.getRowModel().rows,c=n?i.map(R=>Number(R.id)):[],d=X__namespace.useId(),l=core.useSensors(core.useSensor(core.MouseSensor,{}),core.useSensor(core.TouchSensor,{}),core.useSensor(core.KeyboardSensor,{}));function g(R){let{active:f,over:b}=R;if(f&&b&&f.id!==b.id&&a){let p=c.indexOf(f.id),v=c.indexOf(b.id),y=sortable.arrayMove(e.options.data,p,v);a(y);}}let m=u(Ms,{className:"table-fixed min-w-full",children:[o(ks,{className:"sticky top-0 z-20 bg-muted",children:e.getHeaderGroups().map(R=>o(Nt,{children:R.headers.map(f=>{let b=f.column.columnDef.meta;return o(Ds,{colSpan:f.colSpan,className:s("sticky top-0 z-30 bg-muted",b==null?void 0:b.headerClassName),style:b==null?void 0:b.headerStyle,children:f.isPlaceholder?null:reactTable.flexRender(f.column.columnDef.header,f.getContext())},f.id)})},R.id))}),u(Es,{className:"**:data-[slot=table-cell]:first:w-8",children:[r!=null&&r.paddingTop?o(Nt,{className:"pointer-events-none border-0",children:o(Bt,{colSpan:t.length,className:"p-0",style:{height:r.paddingTop}})}):null,Gm({columns:t,dndEnabled:n,dataIds:c,rows:i}),r!=null&&r.paddingBottom?o(Nt,{className:"pointer-events-none border-0",children:o(Bt,{colSpan:t.length,className:"p-0",style:{height:r.paddingBottom}})}):null]})]});return n?o(core.DndContext,{collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToVerticalAxis],onDragEnd:g,sensors:l,id:d,children:m}):m}function Ym(e){switch(e){case "desc":return o(lucideReact.ArrowDown,{className:"ml-2 h-4 w-4"});case "asc":return o(lucideReact.ArrowUp,{className:"ml-2 h-4 w-4"});default:return o(lucideReact.ChevronsUpDown,{className:"ml-2 h-4 w-4"})}}function $s({column:e,title:t,className:n}){if(!e.getCanSort())return o("div",{className:s(n),children:t});let a=r=>{let i=r.shiftKey||r.metaKey||r.ctrlKey,c=e.getNextSortingOrder();if(!c){e.clearSorting();return}e.toggleSorting(c==="desc",i);};return o("div",{className:s("flex items-center space-x-2",n),children:u(Q,{type:"button",variant:"ghost",size:"sm",className:"-ml-3 h-8 justify-start",onClick:a,children:[o("span",{children:t}),Ym(e.getIsSorted())]})})}function Ys({table:e,showPageSize:t=true,pageSizeOptions:n=[10,20,30,40,50]}){return u("div",{className:"flex items-center justify-between px-4",children:[u("div",{className:"text-muted-foreground hidden flex-1 text-sm lg:flex",children:[e.getFilteredSelectedRowModel().rows.length," of ",e.getFilteredRowModel().rows.length," row(s) selected."]}),u("div",{className:"flex w-full items-center gap-8 lg:w-fit",children:[t?u("div",{className:"hidden items-center gap-2 lg:flex",children:[o(ke,{htmlFor:"rows-per-page",className:"text-sm font-medium",children:"Rows per page"}),o(Cn,{value:`${e.getState().pagination.pageSize}`,onValueChange:a=>{e.setPageSize(Number(a));},options:n.map(a=>({value:`${a}`,label:a})),triggerProps:{size:"sm",className:"w-20",id:"rows-per-page"},contentProps:{side:"top"}})]}):null,u("div",{className:"flex w-fit items-center justify-center text-sm font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),u("div",{className:"ml-auto flex items-center gap-2 lg:ml-0",children:[u(Q,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[o("span",{className:"sr-only",children:"Go to first page"}),o(lucideReact.ChevronsLeft,{})]}),u(Q,{variant:"outline",className:"size-8",size:"icon",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[o("span",{className:"sr-only",children:"Go to previous page"}),o(lucideReact.ChevronLeft,{})]}),u(Q,{variant:"outline",className:"size-8",size:"icon",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[o("span",{className:"sr-only",children:"Go to next page"}),o(lucideReact.ChevronRight,{})]}),u(Q,{variant:"outline",className:"hidden size-8 lg:flex",size:"icon",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[o("span",{className:"sr-only",children:"Go to last page"}),o(lucideReact.ChevronsRight,{})]})]})]})]})}function Ks({table:e}){return u(Ui,{children:[o(ya,{asChild:true,children:u(Q,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[o(lucideReact.Settings2,{}),"View"]})}),u(xa,{align:"end",className:"w-[150px]",children:[o(qi,{children:"Toggle columns"}),o(Wi,{}),e.getAllColumns().filter(t=>typeof t.accessorFn!="undefined"&&t.getCanHide()).map(t=>o(Gi,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:n=>t.toggleVisibility(!!n),children:t.id},t.id))]})]})}function of({id:e}){let{attributes:t,listeners:n}=sortable.useSortable({id:e});return u(Q,{...t,...n,variant:"ghost",size:"icon",className:"text-muted-foreground size-7 hover:bg-transparent",children:[o(lucideReact.GripVertical,{className:"text-muted-foreground size-3"}),o("span",{className:"sr-only",children:"Drag to reorder"})]})}var Xs={id:"drag",header:()=>null,cell:({row:e})=>o(of,{id:e.original.id}),enableSorting:false,enableHiding:false};function IN(e){return [Xs,...e]}function Oa(e,t){return t?t.split(".").reduce((n,a)=>{if(!(n===null||typeof n!="object"))return n[a]},e):e}function rf(e){if(e)return typeof e=="number"?{width:e,minWidth:e}:{width:e,minWidth:e}}function sf(e){var l,g,m;if(!e)return null;let t=(l=e.body)!=null?l:e.payload,n=e.params,a=e.headers,r=e.resultKey,i=e.mapData,c=e.delay;if(typeof e.get=="string")return {method:"get",url:e.get,params:n,headers:a,resultKey:r,mapData:i,delay:c};if(typeof e.post=="string")return {method:"post",url:e.post,body:t,params:n,headers:a,resultKey:r,mapData:i,delay:c};let d=(g=e.url)!=null?g:e.reul;return typeof d=="string"?{method:(m=e.method)!=null?m:"get",url:d,body:t,params:n,headers:a,resultKey:r,mapData:i,delay:c}:null}function lf(e,t){return e.map(n=>{var l,g,m,C;let a=n.item?R=>Oa(R,n.item):R=>R,r=n.align==="right"?"text-right justify-end":n.align==="center"?"text-center justify-center":void 0,i=s(r,n.headerClassName),c=s(n.align==="right"?"text-right":n.align==="center"?"text-center":void 0,n.cellClassName),d=rf(n.width);return {id:n.key,accessorFn:a,header:({column:R})=>o($s,{column:R,title:n.title,className:r}),cell:({row:R})=>{let f=R.original,b=n.item?Oa(f,n.item):a(f);return n.func?n.func(f,{value:b,rowIndex:R.index}):b},enableSorting:t&&((l=n.sortable)!=null?l:true)&&!!n.item,enableHiding:(g=n.hiddeable)!=null?g:true,meta:{headerClassName:i,headerStyle:(m=n.headerStyle)!=null?m:d,cellClassName:c,cellStyle:(C=n.cellStyle)!=null?C:d}}})}function cf(e,t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){if(t&&Array.isArray(e[t]))return e[t];if(Array.isArray(e.data))return e.data}return []}function df(e,t){if(!t||Object.keys(t).length===0)return e;try{let n=new URL(e,typeof window!="undefined"?window.location.origin:"http://localhost");return Object.entries(t).forEach(([a,r])=>{r!=null&&n.searchParams.set(a,String(r));}),n.toString()}catch{let a=new URLSearchParams(Object.entries(t).reduce((i,[c,d])=>(d==null||(i[c]=String(d)),i),{})),r=e.includes("?")?"&":"?";return `${e}${r}${a.toString()}`}}function uf({data:e,columns:t,pagination:n=true,sortable:a=true,reload:r=false,filterable:i=false,selectable:c=false,height:d=480,rowHeight:l=48,overscan:g=5,defaultPageSize:m=25,pageSize:C,className:R,emptyState:f,onDataChange:b,loading:p}){var pe,he,Re;let v=X__namespace.useMemo(()=>sf(e.read),[e.read]),y=X__namespace.useMemo(()=>{var ne;return (ne=e.bind)!=null?ne:[]},[e.bind]),x=(pe=C==null?void 0:C.count)!=null?pe:m,N=(he=C==null?void 0:C.options)!=null?he:[10,20,30,40,50],w=(Re=C==null?void 0:C.visible)!=null?Re:true,[S,h]=X__namespace.useState(()=>y),[E,L]=X__namespace.useState(false),[M,P]=X__namespace.useState(null),T=X__namespace.useRef(null),[H,O]=X__namespace.useState(0),[W,D]=X__namespace.useState(d),F=X__namespace.useRef(null),[A,k]=X__namespace.useState(""),U=X__namespace.useMemo(()=>lf(t,a),[t,a]),V=X__namespace.useMemo(()=>c?[{id:"__select",enableHiding:false,enableSorting:false,size:44,header:({table:oe})=>o("div",{className:"flex items-center justify-center",children:o(Ro,{"aria-label":"Select all rows",checked:oe.getIsAllPageRowsSelected()||oe.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:ye=>oe.toggleAllPageRowsSelected(ye===true)})}),cell:({row:oe})=>o("div",{className:"flex items-center justify-center",children:o(Ro,{"aria-label":"Select row",checked:oe.getIsSelected(),onCheckedChange:ye=>oe.toggleSelected(ye===true)})}),meta:{headerClassName:"w-11 px-2",headerStyle:{width:44,minWidth:44},cellClassName:"w-11 px-2",cellStyle:{width:44,minWidth:44}}},...U]:U,[U,c]),B=X__namespace.useMemo(()=>t.filter(ne=>!!ne.item),[t]),q=X__namespace.useMemo(()=>{if(!i||!A.trim())return S;let ne=A.trim().toLowerCase();return S.filter(oe=>B.some(ye=>{let de=Oa(oe,ye.item);return de==null?false:String(de).toLowerCase().includes(ne)}))},[S,i,A,B]),j=fr({data:q,columns:V,enableRowSelection:c,defaultPageSize:n?x:q.length||10,getRowId:(ne,oe)=>oe.toString()});X__namespace.useEffect(()=>{n||(j.setPageIndex(0),j.setPageSize(q.length||1));},[n,q.length,j]),X__namespace.useEffect(()=>{n&&j.setPageSize(x);},[n,x,j]),X__namespace.useEffect(()=>{h(y);},[y]),X__namespace.useEffect(()=>{i||k("");},[i]);let G=X__namespace.useCallback(async()=>{var oe,ye;if(!v)return;(oe=F.current)==null||oe.abort();let ne=new AbortController;F.current=ne,L(true),P(null);try{let de=df(v.url,v.params),we=new Headers(v.headers),Te;v.method==="post"&&v.body!==void 0&&(Te=typeof v.body=="string"?v.body:JSON.stringify(v.body),we.has("Content-Type")||we.set("Content-Type","application/json"));let me=await fetch(de,{method:v.method.toUpperCase(),headers:we,body:Te,signal:ne.signal});if(!me.ok)throw new Error(`Request failed with status ${me.status}`);v.delay&&v.delay>0&&await new Promise(Ne=>setTimeout(Ne,v.delay));let De=await me.json(),Pe=v.mapData?v.mapData(De):cf(De,v.resultKey);h(Pe),P(null),b==null||b(Pe);}catch(de){if(de.name==="AbortError")return;P((ye=de.message)!=null?ye:"Unable to fetch data");}finally{L(false);}},[v,b]);X__namespace.useEffect(()=>(v&&G().catch(()=>{}),()=>{var ne;(ne=F.current)==null||ne.abort();}),[v,G]),X__namespace.useEffect(()=>{if(!T.current)return;let ne=T.current;D(ne.clientHeight||d);let oe=()=>{D(ne.clientHeight||d);};return typeof window!="undefined"&&window.addEventListener("resize",oe),()=>{typeof window!="undefined"&&window.removeEventListener("resize",oe);}},[d]);let _=j.getRowModel().rows,te=_.length,K=j.getFilteredSelectedRowModel().rows.length,ce=j.getFilteredRowModel().rows.length;X__namespace.useEffect(()=>{T.current&&(T.current.scrollTop=0),O(0);},[te]);let le=te*l,re=Math.max(0,Math.floor(H/l)-g),ge=Math.min(_.length,Math.ceil((H+W)/l)+g),fe=X__namespace.useMemo(()=>{if(!_.length)return null;let ne=_.slice(re,ge),oe=re*l,ye=ne.length*l,de=Math.max(le-oe-ye,0);return {rows:ne,paddingTop:oe,paddingBottom:de}},[_,re,ge,l,le]),$=!!p||E,ie=!$&&S.length===0&&!!f;return u("div",{className:s("flex w-full flex-col gap-4",R),children:[u("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[i?u("div",{className:"relative flex w-full max-w-md items-center",children:[o(lucideReact.Search,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),o(qe,{className:"pl-9",placeholder:"Search rows...",value:A,onChange:ne=>k(ne.target.value)})]}):o("div",{className:"h-9"}),u("div",{className:"flex items-center justify-end gap-2",children:[r&&v?u(Q,{variant:"outline",size:"sm",onClick:()=>{G().catch(()=>{});},disabled:E||!!p,children:[E||p?o(lucideReact.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):o(lucideReact.RotateCcw,{className:"mr-2 h-4 w-4"}),"Reload"]}):null,o(Ks,{table:j})]})]}),u("div",{className:"relative overflow-hidden rounded-lg border",children:[ie?o("div",{className:"flex items-center justify-center p-6 text-sm text-muted-foreground",children:f}):o("div",{ref:T,className:"max-h-full overflow-auto",style:{maxHeight:d},onScroll:ne=>O(ne.currentTarget.scrollTop),children:o(Ws,{table:j,columns:V,virtualizedRows:fe!=null?fe:void 0})}),$?o("div",{className:"absolute inset-0 flex items-center justify-center bg-background/70 backdrop-blur-sm",children:u("div",{className:"flex flex-col items-center gap-2 text-sm text-muted-foreground",children:[o(lucideReact.Loader2,{className:"h-5 w-5 animate-spin"}),o("span",{children:"Loading data\u2026"})]})}):null]}),M?o("div",{className:"text-destructive text-sm",children:M}):null,n?o(Ys,{table:j,showPageSize:w,pageSizeOptions:N}):c?o("div",{className:"flex items-center justify-between px-4 text-sm text-muted-foreground",children:u("span",{children:[K," of ",ce," row(s) selected."]})}):null]})}uf.displayName="DataGrid";function mf({onReset:e}){return u("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-background px-6 py-16 text-center",children:[u("div",{className:"space-y-3",children:[o("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Something went wrong"}),o("p",{className:"text-base text-muted-foreground",children:"We hit an unexpected error. You can try again or head back to the dashboard."})]}),u("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[o(Q,{onClick:()=>{e(),cr("/dashboard/default");},children:"Back to home"}),o(Q,{variant:"outline",onClick:()=>{e();},children:"Try again"})]})]})}var Qs=class extends X.Component{constructor(){super(...arguments);this.state={hasError:false};this.resetBoundary=()=>{this.setState({hasError:false});};}static getDerivedStateFromError(){return {hasError:true}}componentDidCatch(n,a){var r,i;process.env.NODE_ENV!=="production"&&console.error("ErrorBoundary caught an error",n,a),(i=(r=this.props).onError)==null||i.call(r,n,a);}render(){if(this.state.hasError){let{fallback:n}=this.props;return n?typeof n=="function"?n(this.resetBoundary):n:o(mf,{onReset:this.resetBoundary})}return this.props.children}};var Ae=X__namespace.forwardRef(({className:e,...t},n)=>o("div",{ref:n,className:s("flex flex-col gap-2",e),...t}));Ae.displayName="FormBlock";var ze=X__namespace.forwardRef(({message:e,children:t,className:n,...a},r)=>!e&&!t?null:o("p",{ref:r,className:s("text-sm text-destructive",n),role:"alert",...a,children:e!=null?e:t}));ze.displayName="FormError";var ff=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},gf=X__namespace.forwardRef(({label:e,name:t,type:n="text",placeholder:a,required:r=false,error:i,value:c,onChange:d,onBlur:l,className:g,description:m,autoComplete:C,labelProps:R={},inputProps:f={},form:b,rules:p},v)=>{var ce,le;let y=ff(b),x=y==null?void 0:y.values,N=y==null?void 0:y.errors,w=y==null?void 0:y.touched,S=x==null?void 0:x[t],h=N==null?void 0:N[t],E=w==null?void 0:w[t],L=(ce=y==null?void 0:y.validationSequence)!=null?ce:0,M=y==null?void 0:y.handleChange,P=y==null?void 0:y.handleBlur,T=y==null?void 0:y.setFieldValue,H=y==null?void 0:y.setFieldError,O=y==null?void 0:y.setFieldTouched,{onChange:W,onBlur:D,className:F,type:A,autoComplete:k,...U}=f,{children:V,...B}=R,q=A!=null?A:n,j=re=>{let ge=re.target.value,$=!!p||r?tl(ge,p,r):void 0;H==null||H(t,$),T==null||T(t,ge),M==null||M(re),d==null||d(ge),W==null||W(re);},G=re=>{O==null||O(t,true),P==null||P(re),l==null||l(),D==null||D(re);},_=S!==void 0?S:c!==void 0?c:"",te=(le=E?h:void 0)!=null?le:i,K=X__namespace.useRef(L);return X__namespace.useEffect(()=>{let re=!!p||r,ge=L!==K.current;if(!H||!re){K.current=L;return}if(!E&&!ge){K.current=L;return}let fe=typeof _=="string"?_:_!=null?String(_):"",$=tl(fe,p,r);$!==h&&H(t,$),K.current=L;},[_,h,H,E,t,r,p,L]),u(Ae,{className:g,children:[e&&o(ke,{htmlFor:t,...B,children:V!=null?V:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),r&&o("span",{className:"text-destructive",children:"*"})]})}),m&&o("p",{className:"text-sm text-muted-foreground",children:m}),o(qe,{ref:v,id:t,name:t,type:q,placeholder:a,value:_,onChange:j,onBlur:G,"aria-invalid":!!te,autoComplete:k!=null?k:C,className:F,...U}),o(ze,{message:te})]})});function tl(e,t,n){if(n&&!e)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minLength&&e.length<t.minLength.value)return t.minLength.message;if(t!=null&&t.maxLength&&e.length>t.maxLength.value)return t.maxLength.message;if(t!=null&&t.pattern&&!t.pattern.value.test(e))return t.pattern.message;if(t!=null&&t.validate){let a=t.validate(e);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}}gf.displayName="FormInput";var bf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},vf=X__namespace.forwardRef(({label:e,name:t,mask:n,placeholderChar:a,placeholder:r,required:i=false,error:c,value:d,onChange:l,onBlur:g,className:m,description:C,labelProps:R={},inputProps:f={},form:b,rules:p},v)=>{var j,G;let y=bf(b),x=y==null?void 0:y.values,N=y==null?void 0:y.errors,w=y==null?void 0:y.touched,S=x==null?void 0:x[t],h=N==null?void 0:N[t],E=w==null?void 0:w[t],L=(j=y==null?void 0:y.validationSequence)!=null?j:0,M=y==null?void 0:y.setFieldValue,P=y==null?void 0:y.setFieldError,T=y==null?void 0:y.setFieldTouched,{className:H,onBlur:O,onChange:W,...D}=f,{children:F,...A}=R,k=_=>{let K=!!p||i?ol(_,p,i):void 0;P==null||P(t,K),M==null||M(t,_),l==null||l(_),W==null||W(_);},U=_=>{T==null||T(t,true),g==null||g(),O==null||O(_);},V=S!==void 0?S:d!==void 0?d:"",B=(G=E?h:void 0)!=null?G:c,q=X__namespace.useRef(L);return X__namespace.useEffect(()=>{let _=!!p||i,te=L!==q.current;if(!P||!_){q.current=L;return}if(!E&&!te){q.current=L;return}let K=ol(V,p,i);K!==h&&P(t,K),q.current=L;},[V,h,P,E,t,i,p,L]),u(Ae,{className:m,children:[e&&o(ke,{htmlFor:t,...A,children:F!=null?F:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),i&&o("span",{className:"text-destructive",children:"*"})]})}),C&&o("p",{className:"text-sm text-muted-foreground",children:C}),o(ua,{ref:v,id:t,name:t,mask:n,placeholderChar:a,placeholder:r,value:V,onChange:k,onBlur:U,"aria-invalid":!!B,className:H,...D}),o(ze,{message:B})]})});vf.displayName="FormInputMask";function ol(e,t,n){if(n&&!e)return t&&typeof t.required=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minLength&&e.length<t.minLength.value)return t.minLength.message;if(t!=null&&t.maxLength&&e.length>t.maxLength.value)return t.maxLength.message;if(t!=null&&t.pattern&&!t.pattern.value.test(e))return t.pattern.message;if(t!=null&&t.validate){let a=t.validate(e);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}}var hf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},yf=X__namespace.forwardRef(({label:e,name:t,placeholder:n,required:a=false,error:r,value:i,onChange:c,onBlur:d,className:l,description:g,labelProps:m={},inputProps:C={},form:R,min:f,max:b,decimals:p,formatter:v,parser:y,rules:x},N)=>{var te,K;let w=hf(R),S=w==null?void 0:w.values,h=w==null?void 0:w.errors,E=w==null?void 0:w.touched,L=S==null?void 0:S[t],M=h==null?void 0:h[t],P=E==null?void 0:E[t],T=(te=w==null?void 0:w.validationSequence)!=null?te:0,H=w==null?void 0:w.setFieldValue,O=w==null?void 0:w.setFieldError,W=w==null?void 0:w.setFieldTouched,{className:D,onBlur:F,onChange:A,...k}=C,{children:U,...V}=m,B=ce=>{let re=!!x||a?nl(ce,x,a):void 0;O==null||O(t,re),H==null||H(t,ce),c==null||c(ce),A==null||A(ce);},q=ce=>{W==null||W(t,true),d==null||d(),F==null||F(ce);},j=L!==void 0?L:i!==void 0?i:null,G=(K=P?M:void 0)!=null?K:r,_=X__namespace.useRef(T);return X__namespace.useEffect(()=>{let ce=!!x||a,le=T!==_.current;if(!O||!ce){_.current=T;return}if(!P&&!le){_.current=T;return}let re=nl(j,x,a);re!==M&&O(t,re),_.current=T;},[j,M,O,P,t,a,x,T]),u(Ae,{className:l,children:[e&&o(ke,{htmlFor:t,...V,children:U!=null?U:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),a&&o("span",{className:"text-destructive",children:"*"})]})}),g&&o("p",{className:"text-sm text-muted-foreground",children:g}),o(da,{ref:N,id:t,name:t,placeholder:n,value:j,onChange:B,onBlur:q,"aria-invalid":!!G,min:f,max:b,decimals:p,formatter:v,parser:y,className:D,...k}),o(ze,{message:G})]})});yf.displayName="FormInputNumeric";function nl(e,t,n){if(n&&e==null)return t&&typeof t.required=="string"?t.required:"This field is required";if(e!=null){if(t!=null&&t.min&&e<t.min.value)return t.min.message;if(t!=null&&t.max&&e>t.max.value)return t.max.message;if(t!=null&&t.validate){let a=t.validate(e);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}}var wf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e};function k0({label:e,name:t,description:n,placeholder:a="Select an option",required:r=false,error:i,value:c,defaultValue:d,onChange:l,onBlur:g,className:m,disabled:C,labelProps:R={},selectProps:f={},triggerProps:b={},contentProps:p={},multiSelectProps:v={},multiSelectTriggerProps:y={},multiSelectValueProps:x={},multiSelectContentProps:N={},form:w,options:S,isMulti:h=false,rules:E}){var Ce,kt,Vt;let L=Ye(),M=wf(w),P=M==null?void 0:M.values,T=M==null?void 0:M.errors,H=M==null?void 0:M.touched,O=P==null?void 0:P[t],W=T==null?void 0:T[t],D=H==null?void 0:H[t],F=M==null?void 0:M.setFieldValue,A=M==null?void 0:M.setFieldError,k=M==null?void 0:M.setFieldTouched,U=M==null?void 0:M.handleChange,V=M==null?void 0:M.handleBlur,B=(Ce=M==null?void 0:M.validationSequence)!=null?Ce:0,{onValueChange:q,value:j,defaultValue:G,..._}=f,{onBlur:te,...K}=b,ce={...K,disabled:C!=null?C:K.disabled},{title:le,...re}=p,{onValueChange:ge,value:fe,defaultValue:$,...ie}=v,{onBlur:pe,...he}=y,{title:Re,...ne}=N,[oe,ye]=X__namespace.useState(typeof d=="string"?d:""),[de,we]=X__namespace.useState(Array.isArray(d)?d:[]);X__namespace.useEffect(()=>{typeof d=="string"&&j===void 0&&O===void 0&&c===void 0&&ye(d);},[d,O,j,c]),X__namespace.useEffect(()=>{Array.isArray(d)&&fe===void 0&&!Array.isArray(O)&&!Array.isArray(c)&&we(d);},[d,O,fe,c]);let Te=typeof j=="string"?j:typeof O=="string"?O:typeof c=="string"?c:oe,me=Array.isArray(fe)?fe:Array.isArray(O)?O:Array.isArray(c)?c:de,De=(kt=D?W:void 0)!=null?kt:i,Pe=X__namespace.useRef(B);X__namespace.useEffect(()=>{let ae=!!E||r,Ke=B!==Pe.current;if(!A||!ae){Pe.current=B;return}if(!D&&!Ke){Pe.current=B;return}let je=h?me:Te!=null?Te:"",ut=Aa(je,E,r);ut!==W&&A(t,ut),Pe.current=B;},[me,Te,W,A,D,h,t,r,E,B]);let Ne=X__namespace.useCallback(ae=>{Array.isArray(ae)?(F==null||F(t,ae),U&&U({target:{name:t,value:ae}})):(F==null||F(t,ae),U&&U({target:{name:t,value:ae}}));},[U,F,t]),be=X__namespace.useCallback(ae=>{j===void 0&&O===void 0&&c===void 0&&ye(ae);let je=!!E||r?Aa(ae,E,r):void 0;A==null||A(t,je),Ne(ae),l==null||l(ae),q==null||q(ae);},[O,Ne,l,q,j,c,E,r,A,t]),dt=X__namespace.useCallback(ae=>{fe===void 0&&!Array.isArray(O)&&!Array.isArray(c)&&we(ae);let je=!!E||r?Aa(ae,E,r):void 0;A==null||A(t,je),Ne(ae),l==null||l(ae),ge==null||ge(ae);},[O,Ne,ge,fe,l,c,E,r,A,t]),xe=X__namespace.useCallback(ae=>{k==null||k(t,true),V==null||V({target:{name:t}}),g==null||g(),te==null||te(ae);},[V,k,t,g,te]),Mt=X__namespace.useCallback(ae=>{k==null||k(t,true),V==null||V({target:{name:t}}),g==null||g(),pe==null||pe(ae);},[V,k,t,pe,g]),Ve=G!=null?G:typeof d=="string"?d:void 0,xt=$!=null?$:Array.isArray(d)?d:void 0,[ot,wt]=X__namespace.useState(false),Ee=({isMulti:ae=false})=>{var je;let Ke=ae?me.length>0?`${me.length} selected`:a:((je=S.find(ut=>ut.value===Te))==null?void 0:je.label)||a;return u(Q,{variant:"outline",className:s("w-full justify-between border-input bg-transparent px-3 py-2 text-sm","flex items-center gap-2",ce.disabled&&"opacity-50 cursor-not-allowed",!!De&&"border-destructive",ce.className),onClick:()=>!ce.disabled&&wt(true),disabled:ce.disabled,type:"button",children:[o("span",{className:"flex-1 text-left truncate",children:Ke}),o(lucideReact.ChevronDownIcon,{className:"h-4 w-4 opacity-50 flex-shrink-0"})]})};return u(Ae,{className:m,children:[e&&o(ke,{htmlFor:t,...R,children:(Vt=R.children)!=null?Vt:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),r&&o("span",{className:"text-destructive",children:"*"})]})}),h?u(jsxRuntime.Fragment,{children:[L?u(jsxRuntime.Fragment,{children:[o(Ee,{isMulti:true}),o(At,{open:ot,onOpenChange:wt,title:Re!=null?Re:e,options:S,selectedValues:me,onSelect:ae=>{let Ke=me.includes(ae)?me.filter(je=>je!==ae):[...me,ae];dt(Ke);},isMulti:true})]}):u(ds,{...ie,value:me,defaultValue:xt,onValueChange:dt,children:[o(us,{"data-name":t,"aria-invalid":!!De,...he,...ce,onBlur:Mt,children:o(ps,{placeholder:a,...x})}),o(ms,{title:Re!=null?Re:e,...ne,children:S.map(ae=>o(fs,{value:ae.value,disabled:ae.disabled,children:ae.label},ae.value))})]}),o("input",{type:"hidden",name:t,value:me.join(",")})]}):u(jsxRuntime.Fragment,{children:[L?u(jsxRuntime.Fragment,{children:[o(Ee,{}),o(At,{open:ot,onOpenChange:wt,title:le!=null?le:e,options:S,selectedValues:Te,onSelect:be,isMulti:false})]}):o(Cn,{..._,value:Te,defaultValue:Ve,onValueChange:be,options:S.map(ae=>({value:ae.value,label:ae.label,disabled:ae.disabled})),placeholder:a,triggerProps:{...ce,id:t,"aria-invalid":!!De,onBlur:xe},contentProps:{...re,title:le!=null?le:e}}),o("input",{type:"hidden",name:t,value:Te!=null?Te:""})]}),o(ze,{message:De}),n&&o("p",{className:"text-sm text-muted-foreground",children:n})]})}function Aa(e,t,n){if(n){if(Array.isArray(e)){if(e.length===0)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required"}else if(!e)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required"}if(t!=null&&t.validate){let a=t.validate(e);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}var Rf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e},Cf=X__namespace.forwardRef(({label:e,name:t,placeholder:n,required:a=false,error:r,value:i,onChange:c,onBlur:d,className:l,labelProps:g={},textareaProps:m={},form:C,rules:R},f)=>{var q,j;let b=Rf(C),p=b==null?void 0:b.values,v=b==null?void 0:b.errors,y=b==null?void 0:b.touched,x=p==null?void 0:p[t],N=v==null?void 0:v[t],w=y==null?void 0:y[t],S=(q=b==null?void 0:b.validationSequence)!=null?q:0,h=b==null?void 0:b.handleChange,E=b==null?void 0:b.handleBlur,L=b==null?void 0:b.setFieldError,M=b==null?void 0:b.setFieldValue,P=b==null?void 0:b.setFieldTouched,{onChange:T,onBlur:H,className:O,...W}=m,{children:D,...F}=g,A=G=>{let _=G.target.value,K=!!R||a?al(_,R,a):void 0;L==null||L(t,K),M==null||M(t,_),h==null||h(G),c==null||c(_),T==null||T(G);},k=G=>{P==null||P(t,true),E==null||E(G),d==null||d(),H==null||H(G);},U=x!==void 0?String(x):i!==void 0?i:"",V=(j=w?N:void 0)!=null?j:r,B=X__namespace.useRef(S);return X__namespace.useEffect(()=>{let G=!!R||a,_=S!==B.current;if(!L||!G){B.current=S;return}if(!w&&!_){B.current=S;return}let te=al(U,R,a);te!==N&&L(t,te),B.current=S;},[U,N,L,w,t,a,R,S]),u(Ae,{className:l,children:[e&&o(ke,{htmlFor:t,...F,children:D!=null?D:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),a&&o("span",{className:"text-destructive",children:"*"})]})}),o(Ea,{ref:f,id:t,name:t,placeholder:n,value:U,onChange:A,onBlur:k,"aria-invalid":!!V,className:O,...W}),o(ze,{message:V})]})});function al(e,t,n){if(n&&!e)return typeof(t==null?void 0:t.required)=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minLength&&e.length<t.minLength.value)return t.minLength.message;if(t!=null&&t.maxLength&&e.length>t.maxLength.value)return t.maxLength.message;if(t!=null&&t.pattern&&!t.pattern.value.test(e))return t.pattern.message;if(t!=null&&t.validate){let a=t.validate(e);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}}Cf.displayName="FormTextarea";var Pf=e=>{var t;if(e)return e.setFieldValue||e.setFieldTouched||e.handleBlur?e:(t=e.form)!=null?t:e},Tf=X__namespace.forwardRef(({label:e,description:t,name:n,required:a=false,error:r,value:i,defaultValue:c,onChange:d,onBlur:l,form:g,options:m,className:C,labelProps:R={},radioGroupProps:f={},optionLabelProps:b={},optionWrapperClassName:p,...v},y)=>{var q,j;let x=Pf(g),N=x==null?void 0:x.values,w=x==null?void 0:x.errors,S=x==null?void 0:x.touched,h=N==null?void 0:N[n],E=w==null?void 0:w[n],M=(q=(S==null?void 0:S[n])?E:void 0)!=null?q:r,{className:P,onValueChange:T,onBlur:H,value:O,defaultValue:W,...D}=f,F=(j=i!=null?i:O!==void 0?O:void 0)!=null?j:h!=null?String(h):void 0,A=F===void 0?c!=null?c:W:void 0,k=X__namespace.useCallback(G=>{var _;(_=x==null?void 0:x.setFieldValue)==null||_.call(x,n,G),d==null||d(G),T==null||T(G);},[x,n,d,T]),U=X__namespace.useCallback(G=>{var _,te;(_=x==null?void 0:x.setFieldTouched)==null||_.call(x,n,true),(te=x==null?void 0:x.handleBlur)==null||te.call(x,{target:{name:n}}),l==null||l(),H==null||H(G);},[x,n,l,H]),{className:V,...B}=b;return u(Ae,{ref:y,className:s("gap-3",C),...v,children:[(e||t)&&u("div",{className:"space-y-1",children:[e&&o(ke,{...R,children:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),a&&o("span",{className:"text-destructive",children:"*"})]})}),t?o("p",{className:"text-sm text-muted-foreground",children:t}):null]}),o(rs,{"aria-invalid":!!M,...D,...F!==void 0?{value:F}:A!==void 0?{defaultValue:A}:{},onValueChange:k,onBlur:U,className:s("grid gap-3",P),children:m.map(G=>{let _=`${n}-${G.value}`;return u("div",{className:s("flex items-start gap-3 rounded-lg border border-input bg-background p-3 shadow-xs",p,G.className,G.disabled&&"opacity-60"),children:[o(is,{id:_,value:G.value,disabled:G.disabled,"aria-invalid":!!M,className:"mt-1"}),u(ke,{htmlFor:_,className:s("flex-col items-start gap-1 font-normal sm:flex-row sm:items-center sm:gap-2",V),...B,children:[o("span",{className:"text-sm font-medium text-foreground",children:G.label}),G.description?o("span",{className:"block text-sm text-muted-foreground",children:G.description}):null]})]},G.value)})}),o(ze,{message:M})]})});Tf.displayName="FormRadioGroup";var Nf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e};function K0({label:e,name:t,placeholder:n,required:a=false,error:r,value:i,defaultValue:c=null,onChange:d,onBlur:l,className:g,description:m,labelProps:C={},datePickerProps:R={},form:f,rules:b}){var re,ge,fe;let p=Nf(f),v=p==null?void 0:p.values,y=p==null?void 0:p.errors,x=p==null?void 0:p.touched,N=p==null?void 0:p.setFieldValue,w=p==null?void 0:p.setFieldError,S=p==null?void 0:p.setFieldTouched,h=p==null?void 0:p.handleChange,E=p==null?void 0:p.handleBlur,L=v==null?void 0:v[t],M=y==null?void 0:y[t],P=x==null?void 0:x[t],T=(re=p==null?void 0:p.validationSequence)!=null?re:0,{onChange:H,onBlur:O,value:W,defaultValue:D,placeholder:F,status:A,...k}=R,[U,V]=X__namespace.useState((ge=D!=null?D:c)!=null?ge:null);X__namespace.useEffect(()=>{var $;W===void 0&&i===void 0&&L===void 0&&V(($=D!=null?D:c)!=null?$:null);},[D,W,c,L,i]);let B=W!==void 0?W!=null?W:null:L!==void 0?L!=null?L:null:i!==void 0?i!=null?i:null:U,q=(fe=P?M:void 0)!=null?fe:r,j=A!=null?A:q?"error":void 0,G=F!=null?F:n,{children:_,...te}=C,K=X__namespace.useRef(T);X__namespace.useEffect(()=>{let $=!!b||a,ie=T!==K.current;if(!w||!$){K.current=T;return}if(!P&&!ie){K.current=T;return}let pe=rl(B!=null?B:null,b,a);pe!==M&&w(t,pe),K.current=T;},[B,M,w,P,t,a,b,T]);let ce=X__namespace.useCallback(($,ie)=>{W===void 0&&i===void 0&&L===void 0&&V($!=null?$:null);let pe=rl($,b,a);w==null||w(t,pe),N?N(t,$!=null?$:null):h&&h({target:{name:t,value:ie}}),d==null||d($!=null?$:null),H==null||H($!=null?$:null,ie);},[H,W,h,w,N,L,t,d,a,b,i]),le=X__namespace.useCallback($=>{S==null||S(t,true),E==null||E({target:{name:t}}),l==null||l(),O==null||O($);},[O,E,S,t,l]);return u(Ae,{className:g,children:[e&&o(ke,{htmlFor:t,...te,children:_!=null?_:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),a&&o("span",{className:"text-destructive",children:"*"})]})}),m&&o("p",{className:"text-sm text-muted-foreground",children:m}),o(ha,{id:t,name:t,value:B!=null?B:null,onChange:ce,onBlur:le,placeholder:G,status:j,"aria-invalid":!!q,...k}),o(ze,{message:q})]})}function rl(e,t,n){if(n&&!e)return t&&typeof t.required=="string"?t.required:"This field is required";if(e){if(t!=null&&t.minDate&&e.isBefore(t.minDate.value,"day"))return t.minDate.message;if(t!=null&&t.maxDate&&e.isAfter(t.maxDate.value,"day"))return t.maxDate.message}if(t!=null&&t.validate){let a=t.validate(e!=null?e:null);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}var Sf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange||e.handleBlur?e:(t=e.form)!=null?t:e};function oS({label:e,name:t,placeholder:n,required:a=false,error:r,value:i,defaultValue:c=null,onChange:d,onBlur:l,className:g,description:m,labelProps:C={},timePickerProps:R={},form:f,rules:b}){var re,ge,fe;let p=Sf(f),v=p==null?void 0:p.values,y=p==null?void 0:p.errors,x=p==null?void 0:p.touched,N=p==null?void 0:p.setFieldValue,w=p==null?void 0:p.setFieldError,S=p==null?void 0:p.setFieldTouched,h=p==null?void 0:p.handleChange,E=p==null?void 0:p.handleBlur,L=v==null?void 0:v[t],M=y==null?void 0:y[t],P=x==null?void 0:x[t],T=(re=p==null?void 0:p.validationSequence)!=null?re:0,{onChange:H,onBlur:O,value:W,defaultValue:D,placeholder:F,status:A,...k}=R,[U,V]=X__namespace.useState((ge=D!=null?D:c)!=null?ge:null);X__namespace.useEffect(()=>{var $;W===void 0&&i===void 0&&L===void 0&&V(($=D!=null?D:c)!=null?$:null);},[c,L,D,W,i]);let B=W!==void 0?W!=null?W:null:L!==void 0?L!=null?L:null:i!==void 0?i!=null?i:null:U,q=(fe=P?M:void 0)!=null?fe:r,j=A!=null?A:q?"error":void 0,G=F!=null?F:n,{children:_,...te}=C,K=X__namespace.useRef(T);X__namespace.useEffect(()=>{let $=!!b||a,ie=T!==K.current;if(!w||!$){K.current=T;return}if(!P&&!ie){K.current=T;return}let pe=il(B!=null?B:null,b,a);pe!==M&&w(t,pe),K.current=T;},[B,M,w,P,t,a,b,T]);let ce=X__namespace.useCallback(($,ie)=>{W===void 0&&i===void 0&&L===void 0&&V($!=null?$:null);let pe=il($,b,a);w==null||w(t,pe),N?N(t,$!=null?$:null):h&&h({target:{name:t,value:ie}}),d==null||d($!=null?$:null),H==null||H($!=null?$:null,ie);},[h,w,N,L,t,d,a,b,H,W,i]),le=X__namespace.useCallback($=>{S==null||S(t,true),E==null||E({target:{name:t}}),l==null||l(),O==null||O($);},[E,S,t,l,O]);return u(Ae,{className:g,children:[e&&o(ke,{htmlFor:t,...te,children:_!=null?_:u("span",{className:"flex items-center gap-1",children:[o("span",{children:e}),a&&o("span",{className:"text-destructive",children:"*"})]})}),m&&o("p",{className:"text-sm text-muted-foreground",children:m}),o(_a,{id:t,name:t,value:B!=null?B:null,onChange:ce,onBlur:le,placeholder:G,status:j,"aria-invalid":!!q,...k}),o(ze,{message:q})]})}function il(e,t,n){if(n&&!e)return t&&typeof t.required=="string"?t.required:"This field is required";if(t!=null&&t.validate){let a=t.validate(e!=null?e:null);if(typeof a=="string")return a;if(a===false)return "Invalid value"}}var Mf=e=>{var t;if(e)return e.setFieldValue||e.setFieldError||e.setFieldTouched||e.handleChange?e:(t=e.form)!=null?t:e},kf=({name:e,label:t,description:n,className:a,checked:r,defaultChecked:i,onCheckedChange:c,switchProps:d,error:l,form:g,rules:m})=>{var B,q;let C=X__namespace.useId(),{id:R,onCheckedChange:f,className:b,disabled:p,"aria-describedby":v,"aria-labelledby":y,...x}=d!=null?d:{},N=R!=null?R:C,w=Mf(g),S=w==null?void 0:w.values,h=w==null?void 0:w.errors,E=w==null?void 0:w.touched,L=S==null?void 0:S[e],M=h==null?void 0:h[e],P=E==null?void 0:E[e],T=(B=w==null?void 0:w.validationSequence)!=null?B:0,H=(q=P?M:void 0)!=null?q:l,O=L!==void 0?!!L:r!==void 0?r:void 0,W=n?`${N}-description`:void 0,D=H?`${N}-error`:void 0,F=[v,W,D].filter(Boolean).join(" ").trim()||void 0,A=t?[y,`${N}-label`].filter(Boolean).join(" ").trim()||void 0:y,k=X__namespace.useCallback(j=>{if(p)return;let G=document.getElementById(N);if(G){if(j.preventDefault(),typeof G.focus=="function")try{G.focus({preventScroll:!0});}catch{G.focus();}G.click();}},[p,N]),U=j=>{var te,K,ce;let _=!!m?sl(j,m):void 0;if((te=w==null?void 0:w.setFieldError)==null||te.call(w,e,_),(K=w==null?void 0:w.setFieldValue)==null||K.call(w,e,j),(ce=w==null?void 0:w.setFieldTouched)==null||ce.call(w,e,true),w!=null&&w.handleChange){let le={target:{name:e,value:j,checked:j}};w.handleChange(le);}c==null||c(j),f==null||f(j);},V=X__namespace.useRef(T);return X__namespace.useEffect(()=>{let j=!!m,G=T!==V.current;if(!(w!=null&&w.setFieldError)||!j){V.current=T;return}if(!P&&!G){V.current=T;return}let te=sl(L!==void 0?!!L:r!==void 0?r:!!i,m);te!==M&&w.setFieldError(e,te),V.current=T;},[r,i,M,P,L,e,w,m,T]),u("div",{className:s("flex items-start justify-between gap-4",a),children:[u("div",{className:"flex-1 space-y-2",children:[t?o(Eo,{id:`${N}-label`,htmlFor:N,onClick:k,className:s("text-sm leading-none font-medium",p?"cursor-not-allowed":"cursor-pointer"),children:t}):null,n?o(Mo,{id:W,children:n}):null,o(ko,{id:D,children:H})]}),o(Ss,{name:e,id:N,"aria-invalid":!!H,"aria-describedby":F,"aria-labelledby":A,className:s("cursor-pointer",b),disabled:p,...x,...O!==void 0?{checked:O}:{defaultChecked:i},onCheckedChange:U})]})};kf.displayName="FormSwitch";function sl(e,t){if(t){if(t.required&&!e)return typeof t.required=="string"?t.required:"This field is required";if(t.validate){let n=t.validate(e);if(typeof n=="string")return n;if(n===false)return "Invalid value"}}}var pS=["sidebar","floating","inset"],mS=["offcanvas","icon","none"],fS=["centered","full-width"],gS=["sticky","scroll"];
9
+ Object.defineProperty(exports,"toast",{enumerable:true,get:function(){return sonner.toast}});exports.Accordion=yg;exports.AccordionContent=Rg;exports.AccordionItem=xg;exports.AccordionTrigger=wg;exports.Alert=Sg;exports.AlertDescription=kg;exports.AlertDialog=Vg;exports.AlertDialogAction=Yg;exports.AlertDialogCancel=Kg;exports.AlertDialogContent=Ug;exports.AlertDialogDescription=$g;exports.AlertDialogFooter=qg;exports.AlertDialogHeader=Gg;exports.AlertDialogOverlay=tc;exports.AlertDialogPortal=ec;exports.AlertDialogTitle=Wg;exports.AlertDialogTrigger=jg;exports.AlertTitle=Mg;exports.AspectRatio=Zg;exports.Avatar=ab;exports.AvatarFallback=ib;exports.AvatarImage=rb;exports.Badge=br;exports.Breadcrumb=vb;exports.BreadcrumbEllipsis=Cb;exports.BreadcrumbItem=yb;exports.BreadcrumbLink=xb;exports.BreadcrumbList=hb;exports.BreadcrumbPage=wb;exports.BreadcrumbSeparator=Rb;exports.Button=Q;exports.CONTENT_LAYOUT_VALUES=fS;exports.Calendar=Db;exports.CalendarDayButton=mc;exports.Card=_b;exports.CardAction=zb;exports.CardContent=Bb;exports.CardDescription=Ab;exports.CardFooter=Vb;exports.CardHeader=Hb;exports.CardTitle=Ob;exports.Carousel=Yb;exports.CarouselContent=Kb;exports.CarouselItem=Xb;exports.CarouselNext=Qb;exports.CarouselPrevious=Jb;exports.ChartContainer=fh;exports.ChartLegend=vh;exports.ChartLegendContent=hh;exports.ChartStyle=ud;exports.ChartTooltip=gh;exports.ChartTooltipContent=bh;exports.Chat=sd;exports.ChatContainer=Vr;exports.ChatForm=jr;exports.ChatMessage=_r;exports.ChatMessages=ld;exports.Checkbox=Ro;exports.Collapsible=Dr;exports.CollapsibleContent=Ir;exports.CollapsibleTrigger=Lr;exports.Command=Jn;exports.CommandDialog=Ah;exports.CommandEmpty=Kr;exports.CommandGroup=zh;exports.CommandInput=$r;exports.CommandItem=Xr;exports.CommandList=Yr;exports.CommandSeparator=Bh;exports.CommandShortcut=Vh;exports.ContextMenu=$h;exports.ContextMenuCheckboxItem=ny;exports.ContextMenuContent=ty;exports.ContextMenuGroup=Kh;exports.ContextMenuItem=oy;exports.ContextMenuLabel=ry;exports.ContextMenuPortal=Xh;exports.ContextMenuRadioGroup=Qh;exports.ContextMenuRadioItem=ay;exports.ContextMenuSeparator=iy;exports.ContextMenuShortcut=sy;exports.ContextMenuSub=Jh;exports.ContextMenuSubContent=ey;exports.ContextMenuSubTrigger=Zh;exports.ContextMenuTrigger=Yh;exports.CopyButton=Un;exports.DataGrid=uf;exports.DataTable=Ws;exports.DataTableColumnHeader=$s;exports.DataTablePagination=Ys;exports.DataTableViewOptions=Ks;exports.DatePicker=ha;exports.Dialog=$o;exports.DialogClose=Eh;exports.DialogContent=Yo;exports.DialogDescription=Jo;exports.DialogFooter=Dh;exports.DialogHeader=Ko;exports.DialogOverlay=gd;exports.DialogPortal=fd;exports.DialogTitle=Xo;exports.DialogTrigger=kh;exports.DraggableRow=Us;exports.Drawer=eo;exports.DrawerClose=un;exports.DrawerContent=to;exports.DrawerDescription=Sx;exports.DrawerFooter=zi;exports.DrawerHeader=oo;exports.DrawerOverlay=Cu;exports.DrawerPortal=Ru;exports.DrawerTitle=no;exports.DrawerTrigger=dn;exports.DropdownMenu=Ui;exports.DropdownMenuCheckboxItem=Gi;exports.DropdownMenuContent=xa;exports.DropdownMenuGroup=qx;exports.DropdownMenuItem=Wx;exports.DropdownMenuLabel=qi;exports.DropdownMenuPortal=Gx;exports.DropdownMenuRadioGroup=$x;exports.DropdownMenuRadioItem=Yx;exports.DropdownMenuSeparator=Wi;exports.DropdownMenuShortcut=Kx;exports.DropdownMenuSub=Xx;exports.DropdownMenuSubContent=Gu;exports.DropdownMenuSubTrigger=Uu;exports.DropdownMenuTrigger=ya;exports.ErrorBoundary=Qs;exports.FIELD_HEIGHT_MOBILE_CLASS=at;exports.Flex=Ju;exports.Form=qu;exports.FormBlock=Ae;exports.FormCheckbox=$u;exports.FormDatePicker=K0;exports.FormError=ze;exports.FormInput=gf;exports.FormInputMask=vf;exports.FormInputNumeric=yf;exports.FormRadioGroup=Tf;exports.FormSelect=k0;exports.FormSwitch=kf;exports.FormTextarea=Cf;exports.FormTimePicker=oS;exports.HoverCard=Pw;exports.HoverCardContent=Nw;exports.HoverCardTrigger=Tw;exports.HtmlRenderer=Kt;exports.Input=qe;exports.InputMask=ua;exports.InputNumeric=da;exports.InputOTP=Lw;exports.InputOTPGroup=Iw;exports.InputOTPSeparator=_w;exports.InputOTPSlot=Fw;exports.Label=ke;exports.MarkdownRenderer=Iv;exports.Menubar=qw;exports.MenubarCheckboxItem=Qw;exports.MenubarContent=Xw;exports.MenubarGroup=$w;exports.MenubarItem=Jw;exports.MenubarLabel=eR;exports.MenubarMenu=Ww;exports.MenubarPortal=rp;exports.MenubarRadioGroup=Yw;exports.MenubarRadioItem=Zw;exports.MenubarSeparator=tR;exports.MenubarShortcut=oR;exports.MenubarSub=nR;exports.MenubarSubContent=rR;exports.MenubarSubTrigger=aR;exports.MenubarTrigger=Kw;exports.MessageInput=Wn;exports.MessageList=Or;exports.MobileFooter=Ca;exports.MobileHeader=Pa;exports.MobileHeaderProvider=ii;exports.MobileLayout=kp;exports.MobileSelectDrawer=At;exports.Modal=pp;exports.MultiSelect=ds;exports.MultiSelectContent=ms;exports.MultiSelectItem=fs;exports.MultiSelectTrigger=us;exports.MultiSelectValue=ps;exports.NAVBAR_STYLE_VALUES=gS;exports.NavigationMenu=eC;exports.NavigationMenuContent=aC;exports.NavigationMenuIndicator=iC;exports.NavigationMenuItem=oC;exports.NavigationMenuLink=rC;exports.NavigationMenuList=tC;exports.NavigationMenuTrigger=nC;exports.NavigationMenuViewport=Ip;exports.Pagination=mC;exports.PaginationContent=fC;exports.PaginationEllipsis=hC;exports.PaginationItem=gC;exports.PaginationLink=ns;exports.PaginationNext=vC;exports.PaginationPrevious=bC;exports.Popover=Qt;exports.PopoverAnchor=cn;exports.PopoverContent=Zt;exports.PopoverTrigger=Ai;exports.Progress=CC;exports.PromptSuggestions=Ar;exports.RadioGroup=rs;exports.RadioGroupItem=is;exports.ResizableHandle=_C;exports.ResizablePanel=FC;exports.ResizablePanelGroup=IC;exports.RouterProvider=lr;exports.SIDEBAR_COLLAPSIBLE_VALUES=mS;exports.SIDEBAR_VARIANT_VALUES=pS;exports.SafeArea=Rn;exports.ScrollArea=BC;exports.ScrollBar=zp;exports.Select=Cn;exports.SelectContent=Gp;exports.SelectItem=qp;exports.SelectRoot=jp;exports.SelectScrollDownButton=$p;exports.SelectScrollUpButton=Wp;exports.SelectTrigger=Up;exports.SelectValue=Yp;exports.Separator=gs;exports.Sheet=bs;exports.SheetClose=bP;exports.SheetContent=vs;exports.SheetDescription=xs;exports.SheetFooter=vP;exports.SheetHeader=hs;exports.SheetTitle=ys;exports.SheetTrigger=gP;exports.Sidebar=Si;exports.SidebarContent=Di;exports.SidebarFooter=Ei;exports.SidebarGroup=BP;exports.SidebarGroupAction=jP;exports.SidebarGroupContent=UP;exports.SidebarGroupLabel=VP;exports.SidebarHeader=ki;exports.SidebarInput=AP;exports.SidebarInset=Mi;exports.SidebarMenu=Li;exports.SidebarMenuAction=GP;exports.SidebarMenuBadge=qP;exports.SidebarMenuButton=Fi;exports.SidebarMenuItem=Ii;exports.SidebarMenuSkeleton=WP;exports.SidebarMenuSub=$P;exports.SidebarMenuSubButton=KP;exports.SidebarMenuSubItem=YP;exports.SidebarProvider=Ni;exports.SidebarRail=OP;exports.SidebarSeparator=zP;exports.SidebarTrigger=HP;exports.Skeleton=Pt;exports.Slider=eT;exports.Switch=Ss;exports.THEME_MODE_CHANGE_EVENT=Vo;exports.THEME_MODE_STORAGE_KEY=qt;exports.THEME_MODE_VALUES=dr;exports.THEME_PRESET_OPTIONS=Dl;exports.THEME_PRESET_VALUES=Wf;exports.Table=Ms;exports.TableBody=Es;exports.TableCaption=mT;exports.TableCell=Bt;exports.TableFooter=pT;exports.TableHead=Ds;exports.TableHeader=ks;exports.TableRow=Nt;exports.Tabs=_s;exports.Textarea=Ea;exports.ThemeProvider=ox;exports.TimePicker=_a;exports.Toaster=aT;exports.Toggle=ST;exports.ToggleGroup=IT;exports.ToggleGroupItem=FT;exports.Tooltip=ws;exports.TooltipContent=Cs;exports.TooltipProvider=ra;exports.TooltipTrigger=Rs;exports.TypingIndicator=Hr;exports.__virtualKeyboardTesting=lg;exports.badgeVariants=rc;exports.buttonVariants=mt;exports.cn=s;exports.createStore=ag;exports.detectVirtualKeyboardDevice=Bl;exports.dragColumn=Xs;exports.formatCurrency=eg;exports.getInitials=tg;exports.getMonitor=Ri;exports.getThemeMode=Kf;exports.initializeMonitoring=rn;exports.isNullOrEmpty=oa;exports.isThemeMode=Gt;exports.maybeScrollElementIntoView=Go;exports.mobileFooterVariantMeta=fp;exports.mobileFooterVariants=PR;exports.mobileHeaderVariantMeta=bp;exports.mobileHeaderVariants=MR;exports.navigationMenuTriggerStyle=Lp;exports.redirect=cr;exports.resolveThemeMode=ho;exports.setThemeMode=ur;exports.showError=ru;exports.showInfo=su;exports.showSonner=To;exports.showSuccess=au;exports.showWarning=iu;exports.toBool=It;exports.toggleVariants=Da;exports.updateContentLayout=Df;exports.updateNavbarStyle=Lf;exports.updateThemeMode=jo;exports.updateThemePreset=Xf;exports.useDataTableInstance=fr;exports.useForm=my;exports.useIsMobile=Ye;exports.useMobileHeader=si;exports.useMonitor=nu;exports.useNavigate=Uf;exports.usePathname=jf;exports.useSidebar=Fo;exports.useStore=rg;exports.useTheme=vt;exports.useThemeExtras=nx;exports.withDndColumn=IN;//# sourceMappingURL=index.cjs.map
50
10
  //# sourceMappingURL=index.cjs.map