@moontra/moonui 6.19.2 → 6.20.0

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.
@@ -0,0 +1,612 @@
1
+ /** @license MoonUI v6.20.0 — MIT — https://moonui.dev
2
+ * CDN build (IIFE — window.React bekler). React bundle'a DAHIL DEGILDIR — sayfadan gelir.
3
+ * Stil icin moonui.css de yuklenmelidir.
4
+ */
5
+ var MoonUI=(()=>{var GE=Object.create;var uu=Object.defineProperty;var zE=Object.getOwnPropertyDescriptor;var WE=Object.getOwnPropertyNames;var qE=Object.getPrototypeOf,$E=Object.prototype.hasOwnProperty;var jE=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var KE=(e,t)=>()=>(e&&(t=e(e=0)),t);var yy=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),by=(e,t)=>{for(var o in t)uu(e,o,{get:t[o],enumerable:!0})},Cy=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of WE(t))!$E.call(e,a)&&a!==o&&uu(e,a,{get:()=>t[a],enumerable:!(r=zE(t,a))||r.enumerable});return e};var XE=(e,t,o)=>(o=e!=null?GE(qE(e)):{},Cy(t||!e||!e.__esModule?uu(o,"default",{value:e,enumerable:!0}):o,e)),wy=e=>Cy(uu({},"__esModule",{value:!0}),e);var Sy=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)};var ct=(e,t,o)=>(Sy(e,t,"read from private field"),o?o.call(e):t.get(e)),If=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o)},cu=(e,t,o,r)=>(Sy(e,t,"write to private field"),r?r.call(e,o):t.set(e,o),o);var B={};by(B,{Children:()=>Pe,Component:()=>Es,Fragment:()=>Je,Profiler:()=>YE,PureComponent:()=>ZE,StrictMode:()=>QE,Suspense:()=>JE,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>eA,act:()=>tA,cloneElement:()=>Fe,createContext:()=>ue,createElement:()=>pe,createFactory:()=>oA,createRef:()=>rA,default:()=>Ie,forwardRef:()=>C,isValidElement:()=>Ee,lazy:()=>aA,memo:()=>Pf,startTransition:()=>nA,unstable_act:()=>sA,useCallback:()=>H,useContext:()=>re,useDebugValue:()=>iA,useDeferredValue:()=>lA,useEffect:()=>D,useId:()=>qe,useImperativeHandle:()=>ra,useInsertionEffect:()=>As,useLayoutEffect:()=>dt,useMemo:()=>Z,useReducer:()=>qt,useRef:()=>E,useState:()=>k,useSyncExternalStore:()=>Lf,useTransition:()=>uA,version:()=>cA});var Se,Ie,Pe,Es,Je,YE,ZE,QE,JE,eA,tA,Fe,ue,pe,oA,rA,C,Ee,aA,Pf,nA,sA,H,re,iA,lA,D,qe,ra,As,dt,Z,qt,E,k,Lf,uA,cA,N=KE(()=>{Se=globalThis.React;if(!Se)throw new Error(`[MoonUI CDN] window.React bulunamadi. MoonUI bundle'indan ONCE React ve ReactDOM script'lerini yukleyin ("react" bu global'e baglidir).`);Ie=Se,Pe=Se.Children,Es=Se.Component,Je=Se.Fragment,YE=Se.Profiler,ZE=Se.PureComponent,QE=Se.StrictMode,JE=Se.Suspense,eA=Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,tA=Se.act,Fe=Se.cloneElement,ue=Se.createContext,pe=Se.createElement,oA=Se.createFactory,rA=Se.createRef,C=Se.forwardRef,Ee=Se.isValidElement,aA=Se.lazy,Pf=Se.memo,nA=Se.startTransition,sA=Se.unstable_act,H=Se.useCallback,re=Se.useContext,iA=Se.useDebugValue,lA=Se.useDeferredValue,D=Se.useEffect,qe=Se.useId,ra=Se.useImperativeHandle,As=Se.useInsertionEffect,dt=Se.useLayoutEffect,Z=Se.useMemo,qt=Se.useReducer,E=Se.useRef,k=Se.useState,Lf=Se.useSyncExternalStore,uA=Se.useTransition,cA=Se.version});var fb=yy(db=>{"use strict";var hn=(N(),wy(B));function C1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var w1=typeof Object.is=="function"?Object.is:C1,S1=hn.useState,R1=hn.useEffect,I1=hn.useLayoutEffect,P1=hn.useDebugValue;function L1(e,t){var o=t(),r=S1({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return I1(function(){a.value=o,a.getSnapshot=t,Yf(a)&&n({inst:a})},[e,o,t]),R1(function(){return Yf(a)&&n({inst:a}),e(function(){Yf(a)&&n({inst:a})})},[e]),P1(o),o}function Yf(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!w1(e,o)}catch{return!0}}function T1(e,t){return t()}var M1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?T1:L1;db.useSyncExternalStore=hn.useSyncExternalStore!==void 0?hn.useSyncExternalStore:M1});var mb=yy((J$,pb)=>{"use strict";pb.exports=fb()});var e5={};by(e5,{Accordion:()=>ib,AccordionContent:()=>qf,AccordionItem:()=>zf,AccordionTrigger:()=>Wf,Alert:()=>$f,AlertDescription:()=>Kf,AlertTitle:()=>jf,AspectRatio:()=>Xf,Avatar:()=>bu,AvatarFallback:()=>Cu,AvatarGroup:()=>op,AvatarImage:()=>tp,Badge:()=>It,Breadcrumb:()=>ap,BreadcrumbEllipsis:()=>wu,BreadcrumbItem:()=>sp,BreadcrumbLink:()=>lp,BreadcrumbList:()=>np,BreadcrumbPage:()=>up,BreadcrumbSeparator:()=>ip,Button:()=>Le,ButtonGroup:()=>$x,Card:()=>vm,CardCVCInput:()=>Mm,CardContent:()=>Cm,CardDescription:()=>bm,CardExpiryInput:()=>Tm,CardFooter:()=>wm,CardHeader:()=>xm,CardNumberInput:()=>Lm,CardTitle:()=>ym,CardZipInput:()=>km,Carousel:()=>Fm,CarouselContent:()=>Vm,CarouselItem:()=>Hm,CarouselNext:()=>Gm,CarouselPrevious:()=>Um,Checkbox:()=>Xc,CheckboxGroup:()=>qm,CheckboxLabel:()=>pl,CheckboxWithLabel:()=>$m,Collapsible:()=>FR,CollapsibleContent:()=>Xm,CollapsibleTrigger:()=>Km,ColorPicker:()=>yd,Command:()=>Td,CommandDialog:()=>GP,CommandEmpty:()=>eh,CommandGroup:()=>th,CommandInput:()=>Qg,CommandItem:()=>rh,CommandList:()=>Jg,CommandSeparator:()=>oh,CommandShortcut:()=>ah,DatePicker:()=>Nd,DateRangePicker:()=>Ih,DateTimePicker:()=>Ph,Dialog:()=>Id,DialogClose:()=>HP,DialogContent:()=>kl,DialogDescription:()=>Ld,DialogFooter:()=>Yg,DialogForm:()=>Zg,DialogHeader:()=>Pd,DialogTitle:()=>fs,DialogTrigger:()=>BP,DraggableList:()=>uL,DropdownMenu:()=>yT,DropdownMenuCheckboxItem:()=>Qh,DropdownMenuContent:()=>Yh,DropdownMenuGroup:()=>CT,DropdownMenuItem:()=>Zh,DropdownMenuLabel:()=>ev,DropdownMenuPortal:()=>wT,DropdownMenuRadioGroup:()=>RT,DropdownMenuRadioItem:()=>Jh,DropdownMenuSeparator:()=>tv,DropdownMenuShortcut:()=>ov,DropdownMenuSub:()=>ST,DropdownMenuSubContent:()=>Xh,DropdownMenuSubTrigger:()=>Kh,DropdownMenuTrigger:()=>bT,FileUpload:()=>av,FreeBadge:()=>FT,GestureDrawer:()=>nv,GitHubStarButton:()=>hU,GitHubStars:()=>PT,GradientPicker:()=>lP,Input:()=>mt,InputOTP:()=>lv,InputOTPGroup:()=>uv,InputOTPSeparator:()=>fv,InputOTPSlot:()=>dv,Kbd:()=>Hx,Label:()=>Pt,LockedComponent:()=>pv,MonthPicker:()=>Lh,MoonLogo:()=>Hd,MoonLogoAnimated:()=>EU,MoonLogoIcon:()=>kU,MoonUIAccordion:()=>ib,MoonUIAccordionContent:()=>qf,MoonUIAccordionItem:()=>zf,MoonUIAccordionTrigger:()=>Wf,MoonUIAlert:()=>$f,MoonUIAlertDescription:()=>Kf,MoonUIAlertTitle:()=>jf,MoonUIAspectRatio:()=>Xf,MoonUIAvatar:()=>bu,MoonUIAvatarFallback:()=>Cu,MoonUIAvatarGroup:()=>op,MoonUIAvatarImage:()=>tp,MoonUIBadge:()=>It,MoonUIBreadcrumb:()=>ap,MoonUIBreadcrumbEllipsis:()=>wu,MoonUIBreadcrumbItem:()=>sp,MoonUIBreadcrumbLink:()=>lp,MoonUIBreadcrumbList:()=>np,MoonUIBreadcrumbPage:()=>up,MoonUIBreadcrumbSeparator:()=>ip,MoonUIButton:()=>Le,MoonUIButtonGroup:()=>$x,MoonUICalendar:()=>Qn,MoonUICard:()=>vm,MoonUICardCVCInput:()=>Mm,MoonUICardContent:()=>Cm,MoonUICardDescription:()=>bm,MoonUICardExpiryInput:()=>Tm,MoonUICardFooter:()=>wm,MoonUICardHeader:()=>xm,MoonUICardNumberInput:()=>Lm,MoonUICardTitle:()=>ym,MoonUICardZipInput:()=>km,MoonUICarousel:()=>Fm,MoonUICarouselContent:()=>Vm,MoonUICarouselItem:()=>Hm,MoonUICarouselNext:()=>Gm,MoonUICarouselPrevious:()=>Um,MoonUICheckbox:()=>Xc,MoonUICheckboxGroup:()=>qm,MoonUICheckboxLabel:()=>pl,MoonUICheckboxWithLabel:()=>$m,MoonUICollapsible:()=>FR,MoonUICollapsibleContent:()=>Xm,MoonUICollapsibleTrigger:()=>Km,MoonUIColorPicker:()=>yd,MoonUICommand:()=>Td,MoonUICommandDialog:()=>GP,MoonUICommandEmpty:()=>eh,MoonUICommandGroup:()=>th,MoonUICommandInput:()=>Qg,MoonUICommandItem:()=>rh,MoonUICommandList:()=>Jg,MoonUICommandSeparator:()=>oh,MoonUICommandShortcut:()=>ah,MoonUIDataTableBasic:()=>iL,MoonUIDatePicker:()=>Nd,MoonUIDateRangePicker:()=>Ih,MoonUIDateTimePicker:()=>Ph,MoonUIDialog:()=>Id,MoonUIDialogClose:()=>HP,MoonUIDialogContent:()=>kl,MoonUIDialogDescription:()=>Ld,MoonUIDialogFooter:()=>Yg,MoonUIDialogForm:()=>Zg,MoonUIDialogHeader:()=>Pd,MoonUIDialogTitle:()=>fs,MoonUIDialogTrigger:()=>BP,MoonUIDraggableList:()=>uL,MoonUIDropdownMenu:()=>yT,MoonUIDropdownMenuCheckboxItem:()=>Qh,MoonUIDropdownMenuContent:()=>Yh,MoonUIDropdownMenuGroup:()=>CT,MoonUIDropdownMenuItem:()=>Zh,MoonUIDropdownMenuLabel:()=>ev,MoonUIDropdownMenuPortal:()=>wT,MoonUIDropdownMenuRadioGroup:()=>RT,MoonUIDropdownMenuRadioItem:()=>Jh,MoonUIDropdownMenuSeparator:()=>tv,MoonUIDropdownMenuShortcut:()=>ov,MoonUIDropdownMenuSub:()=>ST,MoonUIDropdownMenuSubContent:()=>Xh,MoonUIDropdownMenuSubTrigger:()=>Kh,MoonUIDropdownMenuTrigger:()=>bT,MoonUIFileUpload:()=>av,MoonUIFreeBadge:()=>FT,MoonUIGestureDrawer:()=>nv,MoonUIGitHubStars:()=>PT,MoonUIGradientPicker:()=>lP,MoonUIInput:()=>mt,MoonUIInputOTP:()=>lv,MoonUIInputOTPGroup:()=>uv,MoonUIInputOTPSeparator:()=>fv,MoonUIInputOTPSlot:()=>dv,MoonUIKbd:()=>Hx,MoonUILabel:()=>Pt,MoonUILockedComponent:()=>pv,MoonUIMonthPicker:()=>Lh,MoonUIMoonLogo:()=>Hd,MoonUIPagination:()=>mv,MoonUIPaginationContent:()=>gv,MoonUIPaginationEllipsis:()=>yv,MoonUIPaginationItem:()=>hv,MoonUIPaginationLink:()=>ql,MoonUIPaginationNext:()=>xv,MoonUIPaginationPrevious:()=>vv,MoonUIPhoneInput:()=>_v,MoonUIPopover:()=>zo,MoonUIPopoverAnchor:()=>_I,MoonUIPopoverClose:()=>VI,MoonUIPopoverContent:()=>Ro,MoonUIPopoverFooter:()=>Mg,MoonUIPopoverHeader:()=>Tg,MoonUIPopoverSeparator:()=>Lg,MoonUIPopoverTrigger:()=>Wo,MoonUIProBadge:()=>OT,MoonUIProComponentWrapper:()=>NT,MoonUIProgress:()=>zl,MoonUIRadioGroup:()=>Vv,MoonUIRadioGroupItem:()=>jd,MoonUIRadioItemWithLabel:()=>Bv,MoonUIRadioLabel:()=>Kd,MoonUIRating:()=>Gx,MoonUIRichTextEditor:()=>IM,MoonUIScrollArea:()=>qv,MoonUIScrollBar:()=>tf,MoonUIScrollReveal:()=>$v,MoonUIScrollRevealContainer:()=>jv,MoonUIScrollRevealItem:()=>Kv,MoonUISelect:()=>Ja,MoonUISelectContent:()=>tn,MoonUISelectGroup:()=>wM,MoonUISelectItem:()=>wt,MoonUISelectLabel:()=>Ov,MoonUISelectScrollDownButton:()=>$d,MoonUISelectScrollUpButton:()=>qd,MoonUISelectSeparator:()=>Fv,MoonUISelectTrigger:()=>en,MoonUISelectValue:()=>gs,MoonUISeparator:()=>Gt,MoonUISimpleColorPicker:()=>iP,MoonUISimpleEditor:()=>px,MoonUISimpleTooltip:()=>fx,MoonUISkeleton:()=>hr,MoonUISkeletonAvatar:()=>cf,MoonUISkeletonCard:()=>gx,MoonUISkeletonText:()=>uf,MoonUISlider:()=>qo,MoonUISpinner:()=>Wx,MoonUISwipeableCard:()=>hx,MoonUISwitch:()=>xx,MoonUITable:()=>Dl,MoonUITableBody:()=>Ol,MoonUITableCaption:()=>Sh,MoonUITableCell:()=>ps,MoonUITableFooter:()=>wh,MoonUITableHead:()=>Fl,MoonUITableHeader:()=>Nl,MoonUITableRow:()=>Xa,MoonUITabs:()=>Rl,MoonUITabsContent:()=>$a,MoonUITabsList:()=>Il,MoonUITabsTrigger:()=>qa,MoonUITagsInput:()=>yx,MoonUITextarea:()=>bx,MoonUIToast:()=>vf,MoonUIToastAction:()=>Fx,MoonUIToastClose:()=>xf,MoonUIToastDescription:()=>bf,MoonUIToastProvider:()=>Ox,MoonUIToastTitle:()=>yf,MoonUIToastViewport:()=>hf,MoonUIToaster:()=>Kk,MoonUIToggle:()=>Jl,MoonUIToggleGroup:()=>dy,MoonUIToggleGroupItem:()=>fy,MoonUITooltip:()=>ou,MoonUITooltipArrow:()=>lf,MoonUITooltipContent:()=>ws,MoonUITooltipProvider:()=>sf,MoonUITooltipTrigger:()=>ru,Pagination:()=>mv,PaginationContent:()=>gv,PaginationEllipsis:()=>yv,PaginationItem:()=>hv,PaginationLink:()=>ql,PaginationNext:()=>xv,PaginationPrevious:()=>vv,Palette:()=>ua,PhoneInput:()=>_v,Pipette:()=>ni,Popover:()=>zo,PopoverAnchor:()=>_I,PopoverClose:()=>VI,PopoverContent:()=>Ro,PopoverFooter:()=>Mg,PopoverHeader:()=>Tg,PopoverSeparator:()=>Lg,PopoverTrigger:()=>Wo,ProBadge:()=>OT,ProComponentWrapper:()=>NT,Progress:()=>zl,REGEXP_ONLY_CHARS:()=>AT,REGEXP_ONLY_DIGITS:()=>ET,REGEXP_ONLY_DIGITS_AND_CHARS:()=>DT,RadioGroup:()=>Vv,RadioGroupItem:()=>jd,RadioItemWithLabel:()=>Bv,RadioLabel:()=>Kd,Rating:()=>Gx,RichTextEditor:()=>IM,ScrollArea:()=>qv,ScrollBar:()=>tf,ScrollReveal:()=>$v,ScrollRevealContainer:()=>jv,ScrollRevealItem:()=>Kv,Select:()=>Ja,SelectContent:()=>tn,SelectGroup:()=>wM,SelectItem:()=>wt,SelectLabel:()=>Ov,SelectScrollDownButton:()=>$d,SelectScrollUpButton:()=>qd,SelectSeparator:()=>Fv,SelectTrigger:()=>en,SelectValue:()=>gs,Separator:()=>Gt,SimpleColorPicker:()=>iP,SimpleEditor:()=>px,SimpleTooltip:()=>fx,Skeleton:()=>hr,SkeletonAvatar:()=>cf,SkeletonCard:()=>gx,SkeletonText:()=>uf,Slider:()=>qo,Spinner:()=>Wx,SwipeableCard:()=>hx,Switch:()=>xx,Table:()=>Dl,TableBody:()=>Ol,TableCaption:()=>Sh,TableCell:()=>ps,TableFooter:()=>wh,TableHead:()=>Fl,TableHeader:()=>Nl,TableRow:()=>Xa,Tabs:()=>Rl,TabsContent:()=>$a,TabsList:()=>Il,TabsTrigger:()=>qa,TagsInput:()=>yx,Textarea:()=>bx,Toast:()=>vf,ToastAction:()=>Fx,ToastClose:()=>xf,ToastDescription:()=>bf,ToastProvider:()=>Ox,ToastTitle:()=>yf,ToastViewport:()=>hf,Toaster:()=>Kk,Toggle:()=>Jl,ToggleGroup:()=>dy,ToggleGroupItem:()=>fy,Tooltip:()=>ou,TooltipArrow:()=>lf,TooltipContent:()=>ws,TooltipProvider:()=>sf,TooltipTrigger:()=>ru,aspectRatioVariants:()=>cb,badgeVariants:()=>rp,breadcrumbVariants:()=>Rb,buttonGroupVariants:()=>qx,buttonVariants:()=>hi,cardVariants:()=>US,carouselContentVariants:()=>_m,carouselItemVariants:()=>Bm,cn:()=>L,collapsibleContentVariants:()=>_R,collapsibleTriggerVariants:()=>jm,format:()=>Kt,inputOTPSlotVariants:()=>cv,kbdVariants:()=>Bx,moonUIBadgeVariants:()=>rp,moonUIButtonGroupVariants:()=>qx,moonUIButtonVariants:()=>hi,moonUICarouselContentVariants:()=>_m,moonUICarouselItemVariants:()=>Bm,moonUICreateSortableHeader:()=>lL,moonUIInputOTPSlotVariants:()=>cv,moonUIKbdVariants:()=>Bx,moonUIPopoverContentVariants:()=>Pg,moonUIRatingVariants:()=>Ux,moonUISkeletonVariants:()=>mx,moonUISpinnerVariants:()=>zx,moonUIToggleVariants:()=>Ql,moonUITooltipVariants:()=>dx,popoverContentVariants:()=>Pg,progressVariants:()=>IT,ratingVariants:()=>Ux,separatorVariants:()=>ZM,skeletonVariants:()=>mx,spinnerVariants:()=>zx,switchVariants:()=>Ek,tabsListVariants:()=>tP,tabsTriggerVariants:()=>oP,toast:()=>_x,toggleVariants:()=>Ql,tooltipVariants:()=>dx,useCarousel:()=>Jn,useToast:()=>Vx});N();N();N();var Tf=globalThis.React;if(!Tf)throw new Error("[MoonUI CDN] window.React bulunamadi \u2014 MoonUI'den once React script'ini yukleyin.");var Ve=Tf.Fragment;function d(e,t,o){return Tf.createElement(e,o===void 0?t:Object.assign({},t,{key:o}))}var P=d;function Ry(e,t){let o=ue(t),r=n=>{let{children:s,...i}=n,l=Z(()=>i,Object.values(i));return d(o.Provider,{value:l,children:s})};r.displayName=e+"Provider";function a(n){let s=re(o);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[r,a]}function ke(e,t=[]){let o=[];function r(n,s){let i=ue(s),l=o.length;o=[...o,s];let u=f=>{let{scope:p,children:m,...h}=f,g=p?.[e]?.[l]||i,v=Z(()=>h,Object.values(h));return d(g.Provider,{value:v,children:m})};u.displayName=n+"Provider";function c(f,p){let m=p?.[e]?.[l]||i,h=re(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${n}\``)}return[u,c]}let a=()=>{let n=o.map(s=>ue(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,dA(a,...t)]}function dA(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){let s=r.reduce((i,{useScope:l,scopeName:u})=>{let f=l(n)[`__scope${u}`];return{...i,...f}},{});return Z(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}N();N();function Iy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ft(...e){return t=>{let o=!1,r=e.map(a=>{let n=Iy(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():Iy(e[a],null)}}}}function fe(...e){return H(Ft(...e),e)}N();function Tt(e){let t=fA(e),o=C((r,a)=>{let{children:n,...s}=r,i=Pe.toArray(n),l=i.find(pA);if(l){let u=l.props.children,c=i.map(f=>f===l?Pe.count(u)>1?Pe.only(null):Ee(u)?u.props.children:null:f);return d(t,{...s,ref:a,children:Ee(u)?Fe(u,void 0,c):null})}return d(t,{...s,ref:a,children:n})});return o.displayName=`${e}.Slot`,o}var du=Tt("Slot");function fA(e){let t=C((o,r)=>{let{children:a,...n}=o;if(Ee(a)){let s=gA(a),i=mA(n,a.props);return a.type!==Je&&(i.ref=r?Ft(r,s):s),Fe(a,i)}return Pe.count(a)>1?Pe.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Py=Symbol("radix.slottable");function Ly(e){let t=({children:o})=>d(Ve,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=Py,t}function pA(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Py}function mA(e,t){let o={...t};for(let r in t){let a=e[r],n=t[r];/^on[A-Z]/.test(r)?a&&n?o[r]=(...i)=>{let l=n(...i);return a(...i),l}:a&&(o[r]=a):r==="style"?o[r]={...a,...n}:r==="className"&&(o[r]=[a,n].filter(Boolean).join(" "))}return{...e,...o}}function gA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}N();function Eo(e){let t=e+"CollectionProvider",[o,r]=ke(t),[a,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{let{scope:v,children:x}=g,y=Ie.useRef(null),b=Ie.useRef(new Map).current;return d(a,{scope:v,itemMap:b,collectionRef:y,children:x})};s.displayName=t;let i=e+"CollectionSlot",l=Tt(i),u=Ie.forwardRef((g,v)=>{let{scope:x,children:y}=g,b=n(i,x),R=fe(v,b.collectionRef);return d(l,{ref:R,children:y})});u.displayName=i;let c=e+"CollectionItemSlot",f="data-radix-collection-item",p=Tt(c),m=Ie.forwardRef((g,v)=>{let{scope:x,children:y,...b}=g,R=Ie.useRef(null),w=fe(v,R),I=n(c,x);return Ie.useEffect(()=>(I.itemMap.set(R,{ref:R,...b}),()=>void I.itemMap.delete(R))),d(p,{[f]:"",ref:w,children:y})});m.displayName=c;function h(g){let v=n(e+"CollectionConsumer",g);return Ie.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((I,S)=>b.indexOf(I.ref.current)-b.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},h,r]}var x5=!!(typeof window<"u"&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a.defaultPrevented)return t?.(a)}}N();N();var Ae=globalThis?.document?dt:()=>{};N();var hA=B[" useInsertionEffect ".trim().toString()]||Ae;function Be({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=vA({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;{let c=E(e!==void 0);D(()=>{let f=c.current;f!==i&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${i?"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.`),c.current=i},[i,r])}let u=H(c=>{if(i){let f=xA(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}function vA({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return hA(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function xA(e){return typeof e=="function"}var w5=Symbol("RADIX:SYNC_STATE");N();var Mt=globalThis.ReactDOM;if(!Mt)throw new Error(`[MoonUI CDN] window.ReactDOM bulunamadi. MoonUI bundle'indan ONCE React ve ReactDOM script'lerini yukleyin ("react-dom" bu global'e baglidir).`);var Ty=Mt,R5=Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ds=Mt.createPortal,I5=Mt.createRoot,P5=Mt.findDOMNode,jo=Mt.flushSync,L5=Mt.hydrate,T5=Mt.hydrateRoot,M5=Mt.render,k5=Mt.unmountComponentAtNode,E5=Mt.unstable_batchedUpdates,A5=Mt.unstable_renderSubtreeIntoContainer,D5=Mt.version;var yA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=yA.reduce((e,t)=>{let o=Tt(`Primitive.${t}`),r=C((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function an(e,t){e&&jo(()=>e.dispatchEvent(t))}N();N();N();function bA(e,t){return qt((o,r)=>t[o][r]??o,e)}var $e=e=>{let{present:t,children:o}=e,r=CA(t),a=typeof o=="function"?o({present:r.isPresent}):Pe.only(o),n=fe(r.ref,wA(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};$e.displayName="Presence";function CA(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=e?"mounted":"unmounted",[i,l]=bA(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{let u=fu(r.current);n.current=i==="mounted"?u:"none"},[i]),Ae(()=>{let u=r.current,c=a.current;if(c!==e){let p=n.current,m=fu(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Ae(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,f=m=>{let g=fu(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!a.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(n.current=fu(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:H(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function fu(e){return e?.animationName||"none"}function wA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}N();var SA=B[" useId ".trim().toString()]||(()=>{}),RA=0;function Te(e){let[t,o]=k(SA());return Ae(()=>{e||o(r=>r??String(RA++))},[e]),e||(t?`radix-${t}`:"")}var pu="Collapsible",[IA,Mf]=ke(pu),[PA,kf]=IA(pu),My=C((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:a,disabled:n,onOpenChange:s,...i}=e,[l,u]=Be({prop:r,defaultProp:a??!1,onChange:s,caller:pu});return d(PA,{scope:o,disabled:n,contentId:Te(),open:l,onOpenToggle:H(()=>u(c=>!c),[u]),children:d(Y.div,{"data-state":Af(l),"data-disabled":n?"":void 0,...i,ref:t})})});My.displayName=pu;var ky="CollapsibleTrigger",Ey=C((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=kf(ky,o);return d(Y.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Af(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:X(e.onClick,a.onOpenToggle)})});Ey.displayName=ky;var Ef="CollapsibleContent",Ay=C((e,t)=>{let{forceMount:o,...r}=e,a=kf(Ef,e.__scopeCollapsible);return d($e,{present:o||a.open,children:({present:n})=>d(LA,{...r,ref:t,present:n})})});Ay.displayName=Ef;var LA=C((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=kf(Ef,o),[i,l]=k(r),u=E(null),c=fe(t,u),f=E(0),p=f.current,m=E(0),h=m.current,g=s.open||i,v=E(g),x=E(void 0);return D(()=>{let y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Ae(()=>{let y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let b=y.getBoundingClientRect();f.current=b.height,m.current=b.width,v.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),l(r)}},[s.open,r]),d(Y.div,{"data-state":Af(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...n,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&a})});function Af(e){return e?"open":"closed"}var mu=My,nn=Ey,Ns=Ay;N();var TA=ue(void 0);function Ao(e){let t=re(TA);return e||t||"ltr"}var lo="Accordion",MA=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Nf,kA,EA]=Eo(lo),[hu,cW]=ke(lo,[EA,Mf]),Of=Mf(),Ny=Ie.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return d(Nf.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?d(OA,{...n,ref:t}):d(NA,{...a,ref:t})})});Ny.displayName=lo;var[Oy,AA]=hu(lo),[Fy,DA]=hu(lo,{collapsible:!1}),NA=Ie.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},collapsible:n=!1,...s}=e,[i,l]=Be({prop:o,defaultProp:r??"",onChange:a,caller:lo});return d(Oy,{scope:e.__scopeAccordion,value:Ie.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:Ie.useCallback(()=>n&&l(""),[n,l]),children:d(Fy,{scope:e.__scopeAccordion,collapsible:n,children:d(_y,{...s,ref:t})})})}),OA=Ie.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},...n}=e,[s,i]=Be({prop:o,defaultProp:r??[],onChange:a,caller:lo}),l=Ie.useCallback(c=>i((f=[])=>[...f,c]),[i]),u=Ie.useCallback(c=>i((f=[])=>f.filter(p=>p!==c)),[i]);return d(Oy,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:d(Fy,{scope:e.__scopeAccordion,collapsible:!0,children:d(_y,{...n,ref:t})})})}),[FA,vu]=hu(lo),_y=Ie.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:a,orientation:n="vertical",...s}=e,i=Ie.useRef(null),l=fe(i,t),u=kA(o),f=Ao(a)==="ltr",p=X(e.onKeyDown,m=>{if(!MA.includes(m.key))return;let h=m.target,g=u().filter(T=>!T.ref.current?.disabled),v=g.findIndex(T=>T.ref.current===h),x=g.length;if(v===-1)return;m.preventDefault();let y=v,b=0,R=x-1,w=()=>{y=v+1,y>R&&(y=b)},I=()=>{y=v-1,y<b&&(y=R)};switch(m.key){case"Home":y=b;break;case"End":y=R;break;case"ArrowRight":n==="horizontal"&&(f?w():I());break;case"ArrowDown":n==="vertical"&&w();break;case"ArrowLeft":n==="horizontal"&&(f?I():w());break;case"ArrowUp":n==="vertical"&&I();break}let S=y%x;g[S].ref.current?.focus()});return d(FA,{scope:o,disabled:r,direction:a,orientation:n,children:d(Nf.Slot,{scope:o,children:d(Y.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:p})})})}),gu="AccordionItem",[_A,Ff]=hu(gu),Vy=Ie.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=vu(gu,o),s=AA(gu,o),i=Of(o),l=Te(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return d(_A,{scope:o,open:u,disabled:c,triggerId:l,children:d(mu,{"data-orientation":n.orientation,"data-state":Wy(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:f=>{f?s.onItemOpen(r):s.onItemClose(r)}})})});Vy.displayName=gu;var By="AccordionHeader",Hy=Ie.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=vu(lo,o),n=Ff(By,o);return d(Y.h3,{"data-orientation":a.orientation,"data-state":Wy(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Hy.displayName=By;var Df="AccordionTrigger",Uy=Ie.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=vu(lo,o),n=Ff(Df,o),s=DA(Df,o),i=Of(o);return d(Nf.ItemSlot,{scope:o,children:d(nn,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});Uy.displayName=Df;var Gy="AccordionContent",zy=Ie.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=vu(lo,o),n=Ff(Gy,o),s=Of(o);return d(Ns,{role:"region","aria-labelledby":n.triggerId,"data-orientation":a.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});zy.displayName=Gy;function Wy(e){return e?"open":"closed"}var qy=Ny,$y=Vy,jy=Hy,_f=Uy,Vf=zy;N();var Ky=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),Bf=e=>{let t=BA(e);return t.charAt(0).toUpperCase()+t.slice(1)},xu=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),Xy=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};N();var Yy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Zy=C(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>pe("svg",{ref:l,...Yy,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:xu("lucide",a),...!n&&!Xy(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,c])=>pe(u,c)),...Array.isArray(n)?n:[n]]));var j=(e,t)=>{let o=C(({className:r,...a},n)=>pe(Zy,{ref:n,iconNode:t,className:xu(`lucide-${Ky(Bf(e))}`,`lucide-${e}`,r),...a}));return o.displayName=Bf(e),o};var HA=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Os=j("align-center",HA);var UA=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Fs=j("align-justify",UA);var GA=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],_s=j("align-left",GA);var zA=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Vs=j("align-right",zA);var WA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],sn=j("arrow-down",WA);var qA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Bs=j("arrow-left",qA);var $A=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Hs=j("arrow-right",$A);var jA=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ln=j("arrow-up-down",jA);var KA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],un=j("arrow-up",KA);var XA=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Us=j("bold",XA);var YA=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],na=j("calendar",YA);var ZA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gt=j("check",ZA);var QA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Do=j("chevron-down",QA);var JA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uo=j("chevron-left",JA);var eD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Rt=j("chevron-right",eD);var tD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Gs=j("chevron-up",tD);var oD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],co=j("circle-alert",oD);var rD=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],br=j("circle-check-big",rD);var aD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],sa=j("circle",aD);var nD=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zs=j("clock",nD);var sD=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ws=j("code",sD);var iD=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],qs=j("copy",iD);var lD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],$s=j("credit-card",lD);var uD=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],cn=j("crown",uD);var cD=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],js=j("dot",cD);var dD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],No=j("ellipsis",dD);var fD=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ks=j("external-link",fD);var pD=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ia=j("eye",pD);var mD=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Xs=j("file-text",mD);var gD=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Ys=j("file",gD);var hD=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Zs=j("git-fork",hD);var vD=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],la=j("image",vD);var xD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],dn=j("info",xD);var yD=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Qs=j("italic",yD);var bD=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Js=j("link",bD);var CD=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],ei=j("list-ordered",CD);var wD=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],ti=j("list",wD);var SD=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],rt=j("loader-circle",SD);var RD=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],fn=j("lock",RD);var ID=[["path",{d:"M5 12h14",key:"1ays0h"}]],oi=j("minus",ID);var PD=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],ri=j("music",PD);var LD=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],ua=j("palette",LD);var TD=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ai=j("phone",TD);var MD=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],ni=j("pipette",MD);var kD=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],si=j("quote",kD);var ED=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],ii=j("redo",ED);var AD=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ca=j("search",AD);var DD=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],kt=j("square-pen",DD);var ND=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Cr=j("star",ND);var OD=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],li=j("strikethrough",OD);var FD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],wr=j("triangle-alert",FD);var _D=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],ui=j("underline",_D);var VD=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],ci=j("undo",VD);var BD=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],di=j("upload",BD);var HD=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],fi=j("video",HD);var UD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_t=j("x",UD);var GD=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],pn=j("zap",GD);N();function Qy(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=Qy(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function yu(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Qy(e))&&(r&&(r+=" "),r+=t);return r}var Gf="-",zD=e=>{let t=qD(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split(Gf);return i[0]===""&&i.length!==1&&i.shift(),tb(i,t)||WD(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},tb=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?tb(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(Gf);return t.validators.find(({validator:s})=>s(n))?.classGroupId},Jy=/^\[(.+)\]$/,WD=e=>{if(Jy.test(e)){let t=Jy.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},qD=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return jD(Object.entries(e.classGroups),o).forEach(([n,s])=>{Uf(s,r,n,t)}),r},Uf=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:eb(t,a);n.classGroupId=o;return}if(typeof a=="function"){if($D(a)){Uf(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{Uf(s,eb(t,n),o,r)})})},eb=(e,t)=>{let o=e;return t.split(Gf).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},$D=e=>e.isThemeGetter,jD=(e,t)=>t?e.map(([o,r])=>{let a=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,i])=>[t+s,i])):n);return[o,a]}):e,KD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,s)=>{o.set(n,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let s=o.get(n);if(s!==void 0)return s;if((s=r.get(n))!==void 0)return a(n,s),s},set(n,s){o.has(n)?o.set(n,s):a(n,s)}}},ob="!",XD=e=>{let{separator:t,experimentalParseClassName:o}=e,r=t.length===1,a=t[0],n=t.length,s=i=>{let l=[],u=0,c=0,f;for(let v=0;v<i.length;v++){let x=i[v];if(u===0){if(x===a&&(r||i.slice(v,v+n)===t)){l.push(i.slice(c,v)),c=v+n;continue}if(x==="/"){f=v;continue}}x==="["?u++:x==="]"&&u--}let p=l.length===0?i:i.substring(c),m=p.startsWith(ob),h=m?p.substring(1):p,g=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};return o?i=>o({className:i,parseClassName:s}):s},YD=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},ZD=e=>({cache:KD(e.cacheSize),parseClassName:XD(e),...zD(e)}),QD=/\s+/,JD=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],s=e.trim().split(QD),i="";for(let l=s.length-1;l>=0;l-=1){let u=s[l],{modifiers:c,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=o(u),h=!!m,g=r(h?p.substring(0,m):p);if(!g){if(!h){i=u+(i.length>0?" "+i:i);continue}if(g=r(p),!g){i=u+(i.length>0?" "+i:i);continue}h=!1}let v=YD(c).join(":"),x=f?v+ob:v,y=x+g;if(n.includes(y))continue;n.push(y);let b=a(g,h);for(let R=0;R<b.length;++R){let w=b[R];n.push(x+w)}i=u+(i.length>0?" "+i:i)}return i};function e1(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=rb(t))&&(r&&(r+=" "),r+=o);return r}var rb=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=rb(e[r]))&&(o&&(o+=" "),o+=t);return o};function t1(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,f)=>f(c),e());return o=ZD(u),r=o.cache.get,a=o.cache.set,n=i,i(l)}function i(l){let u=r(l);if(u)return u;let c=JD(l,o);return a(l,c),c}return function(){return n(e1.apply(null,arguments))}}var Ge=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},ab=/^\[(?:([a-z-]+):)?(.+)\]$/i,o1=/^\d+\/\d+$/,r1=new Set(["px","full","screen"]),a1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,n1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,s1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,i1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ko=e=>mn(e)||r1.has(e)||o1.test(e),Sr=e=>gn(e,"length",h1),mn=e=>!!e&&!Number.isNaN(Number(e)),Hf=e=>gn(e,"number",mn),pi=e=>!!e&&Number.isInteger(Number(e)),u1=e=>e.endsWith("%")&&mn(e.slice(0,-1)),be=e=>ab.test(e),Rr=e=>a1.test(e),c1=new Set(["length","size","percentage"]),d1=e=>gn(e,c1,nb),f1=e=>gn(e,"position",nb),p1=new Set(["image","url"]),m1=e=>gn(e,p1,x1),g1=e=>gn(e,"",v1),mi=()=>!0,gn=(e,t,o)=>{let r=ab.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},h1=e=>n1.test(e)&&!s1.test(e),nb=()=>!1,v1=e=>i1.test(e),x1=e=>l1.test(e);var y1=()=>{let e=Ge("colors"),t=Ge("spacing"),o=Ge("blur"),r=Ge("brightness"),a=Ge("borderColor"),n=Ge("borderRadius"),s=Ge("borderSpacing"),i=Ge("borderWidth"),l=Ge("contrast"),u=Ge("grayscale"),c=Ge("hueRotate"),f=Ge("invert"),p=Ge("gap"),m=Ge("gradientColorStops"),h=Ge("gradientColorStopPositions"),g=Ge("inset"),v=Ge("margin"),x=Ge("opacity"),y=Ge("padding"),b=Ge("saturate"),R=Ge("scale"),w=Ge("sepia"),I=Ge("skew"),S=Ge("space"),T=Ge("translate"),M=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",be,t],V=()=>[be,t],q=()=>["",Ko,Sr],F=()=>["auto",mn,be],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",be],ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[mn,be];return{cacheSize:500,separator:":",theme:{colors:[mi],spacing:[Ko,Sr],blur:["none","",Rr,be],brightness:ie(),borderColor:[e],borderRadius:["none","","full",Rr,be],borderSpacing:V(),borderWidth:q(),contrast:ie(),grayscale:_(),hueRotate:ie(),invert:_(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[u1,Sr],inset:O(),margin:O(),opacity:ie(),padding:V(),saturate:ie(),scale:ie(),sepia:_(),skew:ie(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[Rr]}],"break-after":[{"break-after":ae()}],"break-before":[{"break-before":ae()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),be]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pi,be]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",pi,be]}],"grid-cols":[{"grid-cols":[mi]}],"col-start-end":[{col:["auto",{span:["full",pi,be]},be]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[mi]}],"row-start-end":[{row:["auto",{span:[pi,be]},be]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[Rr]},Rr]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Rr,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hf]}],"font-family":[{font:[mi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",be]}],"line-clamp":[{"line-clamp":["none",mn,Hf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ko,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ko,Sr]}],"underline-offset":[{"underline-offset":["auto",Ko,be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),f1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",d1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},m1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:U()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Ko,be]}],"outline-w":[{outline:[Ko,Sr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ko,Sr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Rr,g1]}],"shadow-color":[{shadow:[mi]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Rr,be]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[pi,be]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ko,Sr,Hf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var sb=t1(y1);function L(...e){return sb(yu(e))}function gi(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(gi).filter(Boolean).join(" ").trim();if(Ee(e)){let t=e.props;return gi(t.children)}return""}var ib=qy,zf=C(({className:e,...t},o)=>d($y,{ref:o,className:L("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));zf.displayName="AccordionItem";var Wf=C(({className:e,children:t,...o},r)=>d(jy,{className:"flex",children:P(_f,{ref:r,className:L("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary","[&[data-state=open]>svg]:rotate-180",e),...o,children:[t,d(Do,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));Wf.displayName=_f.displayName;var qf=C(({className:e,children:t,...o},r)=>d(Vf,{ref:r,className:L("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:d("div",{className:"pb-4 pt-0",children:t})}));qf.displayName=Vf.displayName;N();var lb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ub=yu,Q=(e,t)=>o=>{var r;if(t?.variants==null)return ub(e,o?.class,o?.className);let{variants:a,defaultVariants:n}=t,s=Object.keys(a).map(u=>{let c=o?.[u],f=n?.[u];if(c===null)return null;let p=lb(c)||lb(f);return a[u][p]}),i=o&&Object.entries(o).reduce((u,c)=>{let[f,p]=c;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:p,...m}=c;return Object.entries(m).every(h=>{let[g,v]=h;return Array.isArray(v)?v.includes({...n,...i}[g]):{...n,...i}[g]===v})?[...u,f,p]:u},[]);return ub(e,s,l,o?.class,o?.className)};var b1=Q("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-info/10 text-info border-info/30"},size:{sm:"py-2 text-xs",md:"py-3 text-sm",lg:"py-4 text-base",default:"py-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"md",radius:"default",withClose:!1}}),$f=C(({className:e,variant:t="default",size:o,radius:r,hideIcon:a=!1,closable:n=!1,onClose:s,children:i,...l},u)=>{let c=Z(()=>{switch(t){case"success":return gt;case"warning":return wr;case"error":return co;case"info":return dn;default:return dn}},[t]);return P("div",{ref:u,role:"alert",className:L("moonui-theme",b1({variant:t,size:o,radius:r,withClose:n}),e),...l,children:[!a&&d(c,{className:"h-5 w-5"}),d("div",{className:"flex-1",children:i}),n&&s&&d("button",{onClick:s,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Close alert",children:d(_t,{className:"h-4 w-4"})})]})});$f.displayName="Alert";var jf=C(({className:e,as:t="div",...o},r)=>d(t,{ref:r,className:L("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...o}));jf.displayName="AlertTitle";var Kf=C(({className:e,...t},o)=>d("div",{ref:o,className:L("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));Kf.displayName="AlertDescription";N();var cb=Q("relative overflow-hidden",{variants:{variant:{default:"bg-muted/10",ghost:"bg-transparent",outline:"border border-border",card:"bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",radius:"md"}}),Xf=C(({className:e,variant:t,radius:o,ratio:r=16/9,style:a,children:n,...s},i)=>d("div",{ref:i,className:L("moonui-theme",cb({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:d("div",{className:"absolute inset-0",children:n})}));Xf.displayName="AspectRatio";N();N();N();function ze(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}var gb=XE(mb(),1);function hb(){return(0,gb.useSyncExternalStore)(k1,()=>!0,()=>!1)}function k1(){return()=>{}}var Zf="Avatar",[E1,ij]=ke(Zf),[A1,xb]=E1(Zf),yb=C((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=k("idle");return d(A1,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:d(Y.span,{...r,ref:t})})});yb.displayName=Zf;var bb="AvatarImage",Cb=C((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=xb(bb,o),i=D1(r,n),l=ze(u=>{a(u),s.onImageLoadingStatusChange(u)});return Ae(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d(Y.img,{...n,ref:t,src:r}):null});Cb.displayName=bb;var wb="AvatarFallback",Sb=C((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=xb(wb,o),[s,i]=k(r===void 0);return D(()=>{if(r!==void 0){let l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&n.imageLoadingStatus!=="loaded"?d(Y.span,{...a,ref:t}):null});Sb.displayName=wb;function vb(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function D1(e,{referrerPolicy:t,crossOrigin:o}){let r=hb(),a=E(null),n=(()=>r?(a.current||(a.current=new window.Image),a.current):null)(),[s,i]=k(()=>vb(n,e));return Ae(()=>{i(vb(n,e))},[n,e]),Ae(()=>{let l=f=>()=>{i(f)};if(!n)return;let u=l("loaded"),c=l("error");return n.addEventListener("load",u),n.addEventListener("error",c),t&&(n.referrerPolicy=t),typeof o=="string"&&(n.crossOrigin=o),()=>{n.removeEventListener("load",u),n.removeEventListener("error",c)}},[n,o,t]),s}var Qf=yb,Jf=Cb,ep=Sb;var O1=Q("relative flex shrink-0 overflow-hidden",{variants:{size:{xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20",default:"h-10 w-10"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"md",radius:"default",variant:"default"}}),bu=C(({className:e,size:t,radius:o,variant:r,...a},n)=>d(Qf,{ref:n,className:L("moonui-theme",O1({size:t,radius:o,variant:r}),e),...a}));bu.displayName=Qf.displayName;var tp=C(({className:e,alt:t="",...o},r)=>d(Jf,{ref:r,alt:t,className:L("moonui-theme","aspect-square h-full w-full",e),...o}));tp.displayName=Jf.displayName;var Cu=C(({className:e,...t},o)=>d(ep,{ref:o,className:L("flex h-full w-full items-center justify-center bg-muted",e),...t}));Cu.displayName=ep.displayName;var op=C(({className:e,max:t,children:o,overlapOffset:r=-8,...a},n)=>{let s=Pe.toArray(o),i=t?s.slice(0,t):s,l=t?Math.max(0,s.length-t):0;return d("div",{ref:n,className:L("moonui-theme","flex items-center",e),...a,children:P("div",{className:"flex",children:[i.map((u,c)=>d("div",{className:"relative",style:{marginLeft:c===0?0:`${r}px`,zIndex:i.length-c},children:u},c)),l>0&&d("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:d(bu,{variant:"border",children:P(Cu,{children:["+",l]})})})]})})});op.displayName="AvatarGroup";N();var rp=Q(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40","dark:bg-primary/90 dark:shadow-inner dark:shadow-primary/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-success-foreground","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-success-foreground dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-warning-foreground","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-warning-foreground dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}}),It=C(({className:e,variant:t,size:o,radius:r,withDot:a,dotColor:n,removable:s,onRemove:i,removeLabel:l,leftIcon:u,rightIcon:c,noAutoSpacing:f,children:p,...m},h)=>{let g=u,v=p;return t==="pro"&&(g=u||P("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[d("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),d("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),d("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),v=p||"Pro"),t==="admin"&&(g=u||d("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:d("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),v=p||"Admin Pro"),P("div",{ref:h,className:L("moonui-theme",rp({variant:t,size:o,radius:r}),f&&"mr-0 mb-0",e),"data-removable":s?"":void 0,...m,children:[a&&d("span",{className:L("h-2 w-2 rounded-full",n||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),g&&d("span",{className:"inline-flex shrink-0 items-center",children:g}),d("span",{className:"inline-flex items-center",children:v}),c&&d("span",{className:"inline-flex shrink-0 items-center",children:c}),s&&i&&d("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:x=>{x.stopPropagation(),i()},"aria-label":l||(gi(v)?`Remove ${gi(v)}`:"Remove badge"),children:d("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:d("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});It.displayName="Badge";N();var Rb=Q("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{md:"text-sm",sm:"text-xs",lg:"text-base",default:"text-sm"}},defaultVariants:{variant:"default",size:"md"}}),Ib=ue(void 0),ap=C(({className:e,variant:t,size:o,separator:r,showHomeIcon:a,...n},s)=>d(Ib.Provider,{value:r,children:d("nav",{ref:s,className:L("moonui-theme",Rb({variant:t,size:o}),e),"aria-label":"breadcrumb",...n})}));ap.displayName="Breadcrumb";var np=C(({className:e,collapsed:t,collapsedWidth:o=3,...r},a)=>{let n=Pe.toArray(r.children).filter(Boolean),s=n.length;if(t&&s>o){let i=n[0],l=n.slice(-2);return P("ol",{ref:a,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[i,d(wu,{}),l]})}return d("ol",{ref:a,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});np.displayName="BreadcrumbList";var sp=C(({className:e,isCurrent:t,href:o,asChild:r=!1,children:a,...n},s)=>{let i=r?du:o?"a":"span",l=!r&&o?{href:o}:{};return d("li",{ref:s,className:L("moonui-theme","inline-flex items-center gap-1.5",e),...n,children:d(i,{"aria-current":t?"page":void 0,className:L("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...l,children:a})})});sp.displayName="BreadcrumbItem";var ip=({children:e,className:t,icon:o,...r})=>{let a=re(Ib);return d("span",{role:"presentation","aria-hidden":"true",className:L("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||o||a||d(Rt,{className:"h-3.5 w-3.5"})})};ip.displayName="BreadcrumbSeparator";var wu=({className:e,icon:t,...o})=>P("span",{role:"presentation",className:L("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...o,children:[d("span",{"aria-hidden":"true",className:"flex items-center",children:t||d(No,{className:"h-4 w-4"})}),d("span",{className:"sr-only",children:"More pages"})]});wu.displayName="BreadcrumbEllipsis";var lp=C(({className:e,href:t,...o},r)=>d("a",{ref:r,href:t,className:L("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));lp.displayName="BreadcrumbLink";var up=C(({className:e,...t},o)=>d("span",{ref:o,className:L("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));up.displayName="BreadcrumbPage";N();var hi=Q(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-input","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),Le=C(({className:e,variant:t,size:o,rounded:r,fullWidth:a,asChild:n=!1,loading:s=!1,leftIcon:i,rightIcon:l,children:u,disabled:c,...f},p)=>P("button",{className:L("moonui-theme",hi({variant:t,size:o,rounded:r,fullWidth:a,className:e})),ref:p,disabled:c||s,"aria-busy":s||void 0,"data-loading":s?"":void 0,...f,children:[s&&d(rt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,u,!s&&l]}));Le.displayName="Button";N();N();N();var vn=ue({});N();function Oo(e){let t=E(null);return t.current===null&&(t.current=e()),t.current}N();var xn=typeof window<"u";var yn=xn?dt:D;N();N();N();var Ir=ue(null);function da(e,t){e.indexOf(t)===-1&&e.push(t)}function fo(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var it=(e,t,o)=>o>t?t:o<e?e:o;var Xo=()=>{},ft=()=>{};var ht={};var vi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xi(e){return typeof e=="object"&&e!==null}var yi=e=>/^0[^.\s]+$/u.test(e);function fa(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ke=e=>e;var F1=(e,t)=>o=>t(e(o)),po=(...e)=>e.reduce(F1);var $t=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var Yo=class{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>fo(this.subscriptions,t)}notify(t,o,r){let a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,o,r);else for(let n=0;n<a;n++){let s=this.subscriptions[n];s&&s(t,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var et=e=>e*1e3,at=e=>e/1e3;function bi(e,t){return t?e*(1e3/t):0}var Pb=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var Lb=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,_1=1e-7,V1=12;function B1(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=Lb(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>_1&&++i<V1);return s}function Pr(e,t,o,r){if(e===t&&o===r)return Ke;let a=n=>B1(n,0,1,e,o);return n=>n===0||n===1?n:Lb(a(n),t,r)}var Su=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Ru=e=>t=>1-e(1-t);var Iu=Pr(.33,1.53,.69,.99),bn=Ru(Iu),Ci=Su(bn);var wi=e=>(e*=2)<1?.5*bn(e):.5*(2-Math.pow(2,-10*(e-1)));var Si=e=>1-Math.sin(Math.acos(e)),Ri=Ru(Si),Ii=Su(Si);var cp=Pr(.42,0,1,1),dp=Pr(0,0,.58,1),Pi=Pr(.42,0,.58,1);var Li=e=>Array.isArray(e)&&typeof e[0]!="number";function Ti(e,t){return Li(e)?e[Pb(0,e.length,t)]:e}var Mi=e=>Array.isArray(e)&&typeof e[0]=="number";var Tb={linear:Ke,easeIn:cp,easeInOut:Pi,easeOut:dp,circIn:Si,circInOut:Ii,circOut:Ri,backIn:bn,backInOut:Ci,backOut:Iu,anticipate:wi},H1=e=>typeof e=="string",Pu=e=>{if(Mi(e)){ft(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,a]=e;return Pr(t,o,r,a)}else if(H1(e))return ft(Tb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Tb[e];return e};var ki=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Et={value:null,addProjectionMetrics:null};function Mb(e,t){let o=new Set,r=new Set,a=!1,n=!1,s=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1},l=0;function u(f){s.has(f)&&(c.schedule(f),e()),l++,f(i)}let c={schedule:(f,p=!1,m=!1)=>{let g=m&&a?o:r;return p&&s.add(f),g.has(f)||g.add(f),f},cancel:f=>{r.delete(f),s.delete(f)},process:f=>{if(i=f,a){n=!0;return}a=!0,[o,r]=[r,o],o.forEach(u),t&&Et.value&&Et.value.frameloop[t].push(l),l=0,o.clear(),a=!1,n&&(n=!1,c.process(f))}};return c}var U1=40;function Lu(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=ki.reduce((b,R)=>(b[R]=Mb(n,t?R:void 0),b),{}),{setup:i,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:p,render:m,postRender:h}=s,g=()=>{let b=ht.useManualTiming?a.timestamp:performance.now();o=!1,ht.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(b-a.timestamp,U1),1)),a.timestamp=b,a.isProcessing=!0,i.process(a),l.process(a),u.process(a),c.process(a),f.process(a),p.process(a),m.process(a),h.process(a),a.isProcessing=!1,o&&t&&(r=!1,e(g))},v=()=>{o=!0,r=!0,a.isProcessing||e(g)};return{schedule:ki.reduce((b,R)=>{let w=s[R];return b[R]=(I,S=!1,T=!1)=>(o||v(),w.schedule(I,S,T)),b},{}),cancel:b=>{for(let R=0;R<ki.length;R++)s[ki[R]].cancel(b)},state:a,steps:s}}var{schedule:Ce,cancel:vt,state:Ye,steps:Ei}=Lu(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ke,!0);var Tu;function G1(){Tu=void 0}var Ze={now:()=>(Tu===void 0&&Ze.set(Ye.isProcessing||ht.useManualTiming?Ye.timestamp:performance.now()),Tu),set:e=>{Tu=e,queueMicrotask(G1)}};var mo={layout:0,mainThread:0,waapi:0};var kb=e=>t=>typeof t=="string"&&t.startsWith(e),pa=kb("--"),z1=kb("var(--"),ma=e=>z1(e)?W1.test(e.split("/*")[0].trim()):!1,W1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Fo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zo={...Fo,transform:e=>it(0,1,e)},Ai={...Fo,default:1};var Lr=e=>Math.round(e*1e5)/1e5;var Cn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Eb(e){return e==null}var Ab=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var wn=(e,t)=>o=>!!(typeof o=="string"&&Ab.test(o)&&o.startsWith(e)||t&&!Eb(o)&&Object.prototype.hasOwnProperty.call(o,t)),Mu=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(Cn);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var q1=e=>it(0,255,e),fp={...Fo,transform:e=>Math.round(q1(e))},_o={test:wn("rgb","red"),parse:Mu("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+fp.transform(e)+", "+fp.transform(t)+", "+fp.transform(o)+", "+Lr(Zo.transform(r))+")"};function $1(e){let t="",o="",r="",a="";return e.length>5?(t=e.substring(1,3),o=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),o=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,o+=o,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}var Di={test:wn("#"),parse:$1,transform:_o.transform};var Ni=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),go=Ni("deg"),xt=Ni("%"),ce=Ni("px"),pp=Ni("vh"),mp=Ni("vw"),ku=(()=>({...xt,parse:e=>xt.parse(e)/100,transform:e=>xt.transform(e*100)}))();var Tr={test:wn("hsl","hue"),parse:Mu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+xt.transform(Lr(t))+", "+xt.transform(Lr(o))+", "+Lr(Zo.transform(r))+")"};var je={test:e=>_o.test(e)||Di.test(e)||Tr.test(e),parse:e=>_o.test(e)?_o.parse(e):Tr.test(e)?Tr.parse(e):Di.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_o.transform(e):Tr.transform(e),getAnimatableNone:e=>{let t=je.parse(e);return t.alpha=0,je.transform(t)}};var Db=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function j1(e){return isNaN(e)&&typeof e=="string"&&(e.match(Cn)?.length||0)+(e.match(Db)?.length||0)>0}var Ob="number",Fb="color",K1="var",X1="var(",Nb="${}",Y1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Mr(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},a=[],n=0,i=t.replace(Y1,l=>(je.test(l)?(r.color.push(n),a.push(Fb),o.push(je.parse(l))):l.startsWith(X1)?(r.var.push(n),a.push(K1),o.push(l)):(r.number.push(n),a.push(Ob),o.push(parseFloat(l))),++n,Nb)).split(Nb);return{values:o,split:i,indexes:r,types:a}}function _b(e){return Mr(e).values}function Vb(e){let{split:t,types:o}=Mr(e),r=t.length;return a=>{let n="";for(let s=0;s<r;s++)if(n+=t[s],a[s]!==void 0){let i=o[s];i===Ob?n+=Lr(a[s]):i===Fb?n+=je.transform(a[s]):n+=a[s]}return n}}var Z1=e=>typeof e=="number"?0:je.test(e)?je.getAnimatableNone(e):e;function Q1(e){let t=_b(e);return Vb(e)(t.map(Z1))}var yt={test:j1,parse:_b,createTransformer:Vb,getAnimatableNone:Q1};function gp(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function Bb({hue:e,saturation:t,lightness:o,alpha:r}){e/=360,t/=100,o/=100;let a=0,n=0,s=0;if(!t)a=n=s=o;else{let i=o<.5?o*(1+t):o+t-o*t,l=2*o-i;a=gp(l,i,e+1/3),n=gp(l,i,e),s=gp(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function Sn(e,t){return o=>o>0?t:e}var Re=(e,t,o)=>e+(t-e)*o;var hp=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},J1=[Di,_o,Tr],eN=e=>J1.find(t=>t.test(e));function Hb(e){let t=eN(e);if(Xo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let o=t.parse(e);return t===Tr&&(o=Bb(o)),o}var vp=(e,t)=>{let o=Hb(e),r=Hb(t);if(!o||!r)return Sn(e,t);let a={...o};return n=>(a.red=hp(o.red,r.red,n),a.green=hp(o.green,r.green,n),a.blue=hp(o.blue,r.blue,n),a.alpha=Re(o.alpha,r.alpha,n),_o.transform(a))};var Eu=new Set(["none","hidden"]);function Ub(e,t){return Eu.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function tN(e,t){return o=>Re(e,t,o)}function Au(e){return typeof e=="number"?tN:typeof e=="string"?ma(e)?Sn:je.test(e)?vp:aN:Array.isArray(e)?Gb:typeof e=="object"?je.test(e)?vp:oN:Sn}function Gb(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>Au(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function oN(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=Au(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function rN(e,t){let o=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let n=t.types[a],s=e.indexes[n][r[n]],i=e.values[s]??0;o[a]=i,r[n]++}return o}var aN=(e,t)=>{let o=yt.createTransformer(t),r=Mr(e),a=Mr(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?Eu.has(e)&&!a.values.length||Eu.has(t)&&!r.values.length?Ub(e,t):po(Gb(rN(r,a),a.values),o):(Xo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Sn(e,t))};function Du(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Re(e,t,o):Au(e)(e,t)}var zb=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>Ce.update(t,o),stop:()=>vt(t),now:()=>Ye.isProcessing?Ye.timestamp:Ze.now()}};var Nu=(e,t,o=10)=>{let r="",a=Math.max(Math.round(t/o),2);for(let n=0;n<a;n++)r+=Math.round(e(n/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function Rn(e){let t=0,o=50,r=e.next(t);for(;!r.done&&t<2e4;)t+=o,r=e.next(t);return t>=2e4?1/0:t}function Oi(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(Rn(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:at(a)}}var nN=5;function Ou(e,t,o){let r=Math.max(t-nN,0);return bi(o-e(r),t-r)}var We={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var yp=.001;function Wb({duration:e=We.duration,bounce:t=We.bounce,velocity:o=We.velocity,mass:r=We.mass}){let a,n;Xo(e<=et(We.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=it(We.minDamping,We.maxDamping,s),e=it(We.minDuration,We.maxDuration,at(e)),s<1?(a=u=>{let c=u*s,f=c*e,p=c-o,m=Fu(u,s),h=Math.exp(-f);return yp-p/m*h},n=u=>{let f=u*s*e,p=f*o+o,m=Math.pow(s,2)*Math.pow(u,2)*e,h=Math.exp(-f),g=Fu(Math.pow(u,2),s);return(-a(u)+yp>0?-1:1)*((p-m)*h)/g}):(a=u=>{let c=Math.exp(-u*e),f=(u-o)*e+1;return-yp+c*f},n=u=>{let c=Math.exp(-u*e),f=(o-u)*(e*e);return c*f});let i=5/e,l=iN(a,n,i);if(e=et(e),isNaN(l))return{stiffness:We.stiffness,damping:We.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}var sN=12;function iN(e,t,o){let r=o;for(let a=1;a<sN;a++)r=r-e(r)/t(r);return r}function Fu(e,t){return e*Math.sqrt(1-t*t)}var lN=["duration","bounce"],uN=["stiffness","damping","mass"];function qb(e,t){return t.some(o=>e[o]!==void 0)}function cN(e){let t={velocity:We.velocity,stiffness:We.stiffness,damping:We.damping,mass:We.mass,isResolvedFromDuration:!1,...e};if(!qb(e,uN)&&qb(e,lN))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),a=r*r,n=2*it(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:We.mass,stiffness:a,damping:n}}else{let o=Wb(e);t={...t,...o,mass:We.mass},t.isResolvedFromDuration=!0}return t}function Qo(e=We.visualDuration,t=We.bounce){let o=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:a}=o,n=o.keyframes[0],s=o.keyframes[o.keyframes.length-1],i={done:!1,value:n},{stiffness:l,damping:u,mass:c,duration:f,velocity:p,isResolvedFromDuration:m}=cN({...o,velocity:-at(o.velocity||0)}),h=p||0,g=u/(2*Math.sqrt(l*c)),v=s-n,x=at(Math.sqrt(l/c)),y=Math.abs(v)<5;r||(r=y?We.restSpeed.granular:We.restSpeed.default),a||(a=y?We.restDelta.granular:We.restDelta.default);let b;if(g<1){let w=Fu(x,g);b=I=>{let S=Math.exp(-g*x*I);return s-S*((h+g*x*v)/w*Math.sin(w*I)+v*Math.cos(w*I))}}else if(g===1)b=w=>s-Math.exp(-x*w)*(v+(h+x*v)*w);else{let w=x*Math.sqrt(g*g-1);b=I=>{let S=Math.exp(-g*x*I),T=Math.min(w*I,300);return s-S*((h+g*x*v)*Math.sinh(T)+w*v*Math.cosh(T))/w}}let R={calculatedDuration:m&&f||null,next:w=>{let I=b(w);if(m)i.done=w>=f;else{let S=w===0?h:0;g<1&&(S=w===0?et(h):Ou(b,w,I));let T=Math.abs(S)<=r,M=Math.abs(s-I)<=a;i.done=T&&M}return i.value=i.done?s:I,i},toString:()=>{let w=Math.min(Rn(R),2e4),I=Nu(S=>R.next(w*S).value,w,30);return w+"ms "+I},toTransition:()=>{}};return R}Qo.applyToOptions=e=>{let t=Oi(e,100,Qo);return e.ease=t.ease,e.duration=et(t.duration),e.type="keyframes",e};function Fi({keyframes:e,velocity:t=0,power:o=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:n=500,modifyTarget:s,min:i,max:l,restDelta:u=.5,restSpeed:c}){let f=e[0],p={done:!1,value:f},m=T=>i!==void 0&&T<i||l!==void 0&&T>l,h=T=>i===void 0?l:l===void 0||Math.abs(i-T)<Math.abs(l-T)?i:l,g=o*t,v=f+g,x=s===void 0?v:s(v);x!==v&&(g=x-f);let y=T=>-g*Math.exp(-T/r),b=T=>x+y(T),R=T=>{let M=y(T),A=b(T);p.done=Math.abs(M)<=u,p.value=p.done?x:A},w,I,S=T=>{m(p.value)&&(w=T,I=Qo({keyframes:[p.value,h(p.value)],velocity:Ou(b,T,p.value),damping:a,stiffness:n,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:T=>{let M=!1;return!I&&w===void 0&&(M=!0,R(T),S(T)),w!==void 0&&T>=w?I.next(T-w):(!M&&R(T),p)}}}function dN(e,t,o){let r=[],a=o||ht.mix||Du,n=e.length-1;for(let s=0;s<n;s++){let i=a(e[s],e[s+1]);if(t){let l=Array.isArray(t)?t[s]||Ke:t;i=po(l,i)}r.push(i)}return r}function _u(e,t,{clamp:o=!0,ease:r,mixer:a}={}){let n=e.length;if(ft(n===t.length,"Both input and output ranges must be the same length","range-length"),n===1)return()=>t[0];if(n===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let i=dN(t,r,a),l=i.length,u=c=>{if(s&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);let p=$t(e[f],e[f+1],c);return i[f](p)};return o?c=>u(it(e[0],e[n-1],c)):u}function _i(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let a=$t(0,t,r);e.push(Re(o,1,a))}}function Vi(e){let t=[0];return _i(t,e.length-1),t}function $b(e,t){return e.map(o=>o*t)}function fN(e,t){return e.map(()=>t||Pi).splice(0,e.length-1)}function ga({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=Li(r)?r.map(Pu):Pu(r),n={done:!1,value:t[0]},s=$b(o&&o.length===t.length?o:Vi(t),e),i=_u(s,t,{ease:Array.isArray(a)?a:fN(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var pN=e=>e!==null;function In(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(pN),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var mN={decay:Fi,inertia:Fi,tween:ga,keyframes:ga,spring:Qo};function Vu(e){typeof e.type=="string"&&(e.type=mN[e.type])}var kr=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,o){return this.finished.then(t,o)}};var gN=e=>e/100,Jo=class extends kr{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==Ze.now()&&this.tick(Ze.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},mo.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Vu(t);let{type:o=ga,repeat:r=0,repeatDelay:a=0,repeatType:n,velocity:s=0}=t,{keyframes:i}=t,l=o||ga;l!==ga&&typeof i[0]!="number"&&(this.mixKeyframes=po(gN,Du(i[0],i[1])),i=[0,100]);let u=l({...t,keyframes:i});n==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...i].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Rn(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=u}updateTime(t){let o=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(t,o=!1){let{generator:r,totalDuration:a,mixKeyframes:n,mirroredGenerator:s,resolvedDuration:i,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:f,repeatType:p,repeatDelay:m,type:h,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),o?this.currentTime=t:this.updateTime(t);let x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>a;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let b=this.currentTime,R=r;if(f){let T=Math.min(this.currentTime,a)/i,M=Math.floor(T),A=T%1;!A&&T>=1&&(A=1),A===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/i)):p==="mirror"&&(R=s)),b=it(0,1,A)*i}let w=y?{done:!1,value:c[0]}:R.next(b);n&&(w.value=n(w.value));let{done:I}=w;!y&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return S&&h!==Fi&&(w.value=In(c,this.options,v,this.speed)),g&&g(w.value),S&&this.finish(),w}then(t,o){return this.finished.then(t,o)}get duration(){return at(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+at(t)}get time(){return at(this.currentTime)}set time(t){t=et(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ze.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=at(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=zb,startTime:o}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ze.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,mo.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function jb(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ha=e=>e*180/Math.PI,bp=e=>{let t=ha(Math.atan2(e[1],e[0]));return Cp(t)},hN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:bp,rotateZ:bp,skewX:e=>ha(Math.atan(e[1])),skewY:e=>ha(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cp=e=>(e=e%360,e<0&&(e+=360),e),Kb=bp,Xb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xb,scaleY:Yb,scale:e=>(Xb(e)+Yb(e))/2,rotateX:e=>Cp(ha(Math.atan2(e[6],e[5]))),rotateY:e=>Cp(ha(Math.atan2(-e[2],e[0]))),rotateZ:Kb,rotate:Kb,skewX:e=>ha(Math.atan(e[4])),skewY:e=>ha(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Bi(e){return e.includes("scale")?1:0}function Hi(e,t){if(!e||e==="none")return Bi(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=vN,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=hN,a=i}if(!a)return Bi(t);let n=r[t],s=a[1].split(",").map(xN);return typeof n=="function"?n(s):s[n]}var wp=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return Hi(o,t)};function xN(e){return parseFloat(e.trim())}var ho=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=(()=>new Set(ho))();var Sp=e=>e===Fo||e===ce,yN=new Set(["x","y","z"]),bN=ho.filter(e=>!yN.has(e));function Zb(e){let t=[];return bN.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var Er={width:({x:e},{paddingLeft:t="0",paddingRight:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),height:({y:e},{paddingTop:t="0",paddingBottom:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hi(t,"x"),y:(e,{transform:t})=>Hi(t,"y")};Er.translateX=Er.x;Er.translateY=Er.y;var va=new Set,Rp=!1,Ip=!1,Pp=!1;function Qb(){if(Ip){let e=Array.from(va).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let a=Zb(r);a.length&&(o.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();let a=o.get(r);a&&a.forEach(([n,s])=>{r.getValue(n)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ip=!1,Rp=!1,va.forEach(e=>e.complete(Pp)),va.clear()}function Jb(){va.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ip=!0)})}function Lp(){Pp=!0,Jb(),Qb(),Pp=!1}var er=class{constructor(t,o,r,a,n,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=o,this.name=r,this.motionValue=a,this.element=n,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(va.add(this),Rp||(Rp=!0,Ce.read(Jb),Ce.resolveKeyframes(Qb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:o,element:r,motionValue:a}=this;if(t[0]===null){let n=a?.get(),s=t[t.length-1];if(n!==void 0)t[0]=n;else if(r&&o){let i=r.readValue(o,s);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=s),a&&n===void 0&&a.set(t[0])}jb(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),va.delete(this)}cancel(){this.state==="scheduled"&&(va.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var eC=e=>e.startsWith("--");function tC(e,t,o){eC(t)?e.style.setProperty(t,o):e.style[t]=o}var oC=fa(()=>window.ScrollTimeline!==void 0);var rC={};function aC(e,t){let o=fa(e);return()=>rC[t]??o()}var Bu=aC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var xa=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var Tp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xa([0,.65,.55,1]),circOut:xa([.55,0,1,.45]),backIn:xa([.31,.01,.66,-.59]),backOut:xa([.33,1.53,.69,.99])};function Mp(e,t){if(e)return typeof e=="function"?Bu()?Nu(e,t):"ease-out":Mi(e)?xa(e):Array.isArray(e)?e.map(o=>Mp(o,t)||Tp.easeOut):Tp[e]}function nC(e,t,o,{delay:r=0,duration:a=300,repeat:n=0,repeatType:s="loop",ease:i="easeOut",times:l}={},u=void 0){let c={[t]:o};l&&(c.offset=l);let f=Mp(i,a);Array.isArray(f)&&(c.easing=f),Et.value&&mo.waapi++;let p={delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:n+1,direction:s==="reverse"?"alternate":"normal"};u&&(p.pseudoElement=u);let m=e.animate(c,p);return Et.value&&m.finished.finally(()=>{mo.waapi--}),m}function ya(e){return typeof e=="function"&&"applyToOptions"in e}function sC({type:e,...t}){return ya(e)&&Bu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Hu=class extends kr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:o,name:r,keyframes:a,pseudoElement:n,allowFlatten:s=!1,finalKeyframe:i,onComplete:l}=t;this.isPseudoElement=!!n,this.allowFlatten=s,this.options=t,ft(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=sC(t);this.animation=nC(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=In(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):tC(o,r,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return at(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+at(t)}get time(){return at(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=et(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&oC()?(this.animation.timeline=t,Ke):o(this)}};var iC={anticipate:wi,backInOut:Ci,circInOut:Ii};function CN(e){return e in iC}function lC(e){typeof e.ease=="string"&&CN(e.ease)&&(e.ease=iC[e.ease])}var uC=10,Uu=class extends Hu{constructor(t){lC(t),Vu(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:o,onUpdate:r,onComplete:a,element:n,...s}=this.options;if(!o)return;if(t!==void 0){o.set(t);return}let i=new Jo({...s,autoplay:!1}),l=et(this.finishedTime??this.time);o.setWithVelocity(i.sample(l-uC).value,i.sample(l).value,uC),i.stop()}};var kp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(yt.test(e)||e==="0")&&!e.startsWith("url("));function wN(e){let t=e[0];if(e.length===1)return!0;for(let o=0;o<e.length;o++)if(e[o]!==t)return!0}function cC(e,t,o,r){let a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;let n=e[e.length-1],s=kp(a,t),i=kp(n,t);return Xo(s===i,`You are trying to animate ${t} from "${a}" to "${n}". "${s?n:a}" is not an animatable value.`,"value-not-animatable"),!s||!i?!1:wN(e)||(o==="spring"||ya(o))&&r}function Pn(e){e.duration=0,e.type="keyframes"}var SN=new Set(["opacity","clipPath","filter","transform"]),RN=fa(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dC(e){let{motionValue:t,name:o,repeatDelay:r,repeatType:a,damping:n,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return RN()&&o&&SN.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var IN=40,Ui=class extends kr{constructor({autoplay:t=!0,delay:o=0,type:r="keyframes",repeat:a=0,repeatDelay:n=0,repeatType:s="loop",keyframes:i,name:l,motionValue:u,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ze.now();let p={autoplay:t,delay:o,type:r,repeat:a,repeatDelay:n,repeatType:s,name:l,motionValue:u,element:c,...f},m=c?.KeyframeResolver||er;this.keyframeResolver=new m(i,(h,g,v)=>this.onKeyframesResolved(h,g,p,!v),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,o,r,a){this.keyframeResolver=void 0;let{name:n,type:s,velocity:i,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Ze.now(),cC(t,n,s,i)||((ht.instantAnimations||!l)&&c?.(In(t,r,o)),t[0]=t[t.length-1],Pn(r),r.repeat=0);let p={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>IN?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},m=!u&&dC(p)?new Uu({...p,element:p.motionValue.owner.current}):new Jo(p);m.finished.then(()=>this.notifyFinished()).catch(Ke),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Lp()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var Gu=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,o){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=o}attachTimeline(t){let o=this.animations.map(r=>r.attachTimeline(t));return()=>{o.forEach((r,a)=>{r&&r(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return fC(this.animations,"duration")}get iterationDuration(){return fC(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(o=>o[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function fC(e,t){let o=0;for(let r=0;r<e.length;r++){let a=e[r][t];a!==null&&a>o&&(o=a)}return o}var Gi=class extends Gu{then(t,o){return this.finished.finally(t).then(()=>{})}};var PN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LN(e){let t=PN.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var TN=4;function Ep(e,t,o=1){ft(o<=TN,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=LN(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return vi(s)?parseFloat(s):s}return ma(a)?Ep(a,t,o+1):a}function ba(e,t){return e?.[t]??e?.default??e}var zi=new Set(["width","height","top","left","right","bottom",...ho]);var pC={test:e=>e==="auto",parse:e=>e};var zu=e=>t=>t.test(e);var Ap=[Fo,ce,xt,go,mp,pp,pC],Dp=e=>Ap.find(zu(e));function mC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yi(e):!0}var MN=new Set(["brightness","contrast","saturate","opacity"]);function kN(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(Cn)||[];if(!r)return e;let a=o.replace(r,""),n=MN.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var EN=/\b([a-z-]*)\(.*?\)/gu,Wi={...yt,getAnimatableNone:e=>{let t=e.match(EN);return t?t.map(kN).join(" "):e}};var Np={...Fo,transform:Math.round};var gC={rotate:go,rotateX:go,rotateY:go,rotateZ:go,scale:Ai,scaleX:Ai,scaleY:Ai,scaleZ:Ai,skew:go,skewX:go,skewY:go,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Zo,originX:ku,originY:ku,originZ:ce};var Ca={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,backgroundPositionX:ce,backgroundPositionY:ce,...gC,zIndex:Np,fillOpacity:Zo,strokeOpacity:Zo,numOctaves:Np};var hC={...Ca,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:Wi,WebkitFilter:Wi},qi=e=>hC[e];function $i(e,t){let o=qi(e);return o!==Wi&&(o=yt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var AN=new Set(["auto","none","0"]);function vC(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!AN.has(n)&&Mr(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=$i(o,a)}var ji=class extends er{constructor(t,o,r,a,n){super(t,o,r,a,n,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),ma(u))){let c=Ep(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!zi.has(r)||t.length!==2)return;let[a,n]=t,s=Dp(a),i=Dp(n);if(s!==i)if(Sp(s)&&Sp(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Er[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||mC(t[a]))&&r.push(a);r.length&&vC(t,r,o)}measureInitialState(){let{element:t,unresolvedKeyframes:o,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Er[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o[0]=this.measuredOrigin;let a=o[o.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){let{element:t,name:o,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let a=t.getValue(o);a&&a.jump(this.measuredOrigin,!1);let n=r.length-1,s=r[n];r[n]=Er[o](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,l])=>{t.getValue(i).set(l)}),this.resolveNoneKeyframes()}};function Ki(e,t,o){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);let a=o?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}var Xi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Yi(e){return xi(e)&&"offsetHeight"in e}var xC=30,DN=e=>!isNaN(parseFloat(e)),wa={current:void 0},Wu=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let a=Ze.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=o.owner}setCurrent(t){this.current=t,this.updatedAt=Ze.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=DN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,o){this.events[t]||(this.events[t]=new Yo);let r=this.events[t].add(o);return t==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,o){this.passiveEffect=t,this.stopPassiveEffect=o}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,o=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return wa.current&&wa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ze.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xC)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,xC);return bi(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(t){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=t(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function At(e,t){return new Wu(e,t)}var{schedule:Sa,cancel:NN}=Lu(queueMicrotask,!1);var jt={x:!1,y:!1};function qu(){return jt.x||jt.y}function Op(e){return e==="x"||e==="y"?jt[e]?null:(jt[e]=!0,()=>{jt[e]=!1}):jt.x||jt.y?null:(jt.x=jt.y=!0,()=>{jt.x=jt.y=!1})}function $u(e,t){let o=Ki(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function yC(e){return!(e.pointerType==="touch"||qu())}function Fp(e,t,o={}){let[r,a,n]=$u(e,o),s=i=>{if(!yC(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=f=>{yC(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var _p=(e,t)=>t?e===t?!0:_p(e,t.parentElement):!1;var Ra=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var ON=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bC(e){return ON.has(e.tagName)||e.tabIndex!==-1}var Ln=new WeakSet;function CC(e){return t=>{t.key==="Enter"&&e(t)}}function Vp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var wC=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=CC(()=>{if(Ln.has(o))return;Vp(o,"down");let a=CC(()=>{Vp(o,"up")}),n=()=>Vp(o,"cancel");o.addEventListener("keyup",a,t),o.addEventListener("blur",n,t)});o.addEventListener("keydown",r,t),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),t)};function SC(e){return Ra(e)&&!qu()}function Bp(e,t,o={}){let[r,a,n]=$u(e,o),s=i=>{let l=i.currentTarget;if(!SC(i))return;Ln.add(l);let u=t(l,i),c=(m,h)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),Ln.has(l)&&Ln.delete(l),SC(m)&&typeof u=="function"&&u(m,{success:h})},f=m=>{c(m,l===window||l===document||o.useGlobalTarget||_p(l,m.target))},p=m=>{c(m,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",p,a)};return r.forEach(i=>{(o.useGlobalTarget?window:i).addEventListener("pointerdown",s,a),Yi(i)&&(i.addEventListener("focus",u=>wC(u,a)),!bC(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Ia(e){return xi(e)&&"ownerSVGElement"in e}function Zi(e){return Ia(e)&&e.tagName==="svg"}function Hp(...e){let t=!Array.isArray(e[0]),o=t?0:-1,r=e[0+o],a=e[1+o],n=e[2+o],s=e[3+o],i=_u(a,n,s);return t?i(r):i}var De=e=>!!(e&&e.getVelocity);var FN=[...Ap,je,yt],Up=e=>FN.find(zu(e));N();N();N();var Ar=ue({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});N();function RC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _N(...e){return t=>{let o=!1,r=e.map(a=>{let n=RC(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():RC(e[a],null)}}}}function IC(...e){return H(_N(...e),e)}var Gp=class extends Es{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=Yi(r)&&r.offsetWidth||0,n=this.props.sizeRef.current;n.height=o.offsetHeight||0,n.width=o.offsetWidth||0,n.top=o.offsetTop,n.left=o.offsetLeft,n.right=a-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}};function PC({children:e,isPresent:t,anchorX:o,root:r}){let a=qe(),n=E(null),s=E({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=re(Ar),l=IC(n,e?.ref);return As(()=>{let{width:u,height:c,top:f,left:p,right:m}=s.current;if(t||!n.current||!u||!c)return;let h=o==="left"?`left: ${p}`:`right: ${m}`;n.current.dataset.motionPopId=a;let g=document.createElement("style");i&&(g.nonce=i);let v=r??document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule(`
6
+ [data-motion-pop-id="${a}"] {
7
+ position: absolute !important;
8
+ width: ${u}px !important;
9
+ height: ${c}px !important;
10
+ ${h}px !important;
11
+ top: ${f}px !important;
12
+ }
13
+ `),()=>{v.contains(g)&&v.removeChild(g)}},[t]),d(Gp,{isPresent:t,childRef:n,sizeRef:s,children:Fe(e,{ref:l})})}var LC=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:a,presenceAffectsLayout:n,mode:s,anchorX:i,root:l})=>{let u=Oo(VN),c=qe(),f=!0,p=Z(()=>(f=!1,{id:c,initial:t,isPresent:o,custom:a,onExitComplete:m=>{u.set(m,!0);for(let h of u.values())if(!h)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[o,u,r]);return n&&f&&(p={...p}),Z(()=>{u.forEach((m,h)=>u.set(h,!1))},[o]),D(()=>{!o&&!u.size&&r&&r()},[o]),s==="popLayout"&&(e=d(PC,{isPresent:o,anchorX:i,root:l,children:e})),d(Ir.Provider,{value:p,children:e})};function VN(){return new Map}N();function ju(e=!0){let t=re(Ir);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:a}=t,n=qe();D(()=>{if(e)return a(n)},[e]);let s=H(()=>e&&r&&r(n),[n,r,e]);return!o&&r?[!1,s]:[!0]}N();var Qi=e=>e.key||"";function zp(e){let t=[];return Pe.forEach(e,o=>{Ee(o)&&t.push(o)}),t}var tr=({children:e,custom:t,initial:o=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:n="sync",propagate:s=!1,anchorX:i="left",root:l})=>{let[u,c]=ju(s),f=Z(()=>zp(e),[e]),p=s&&!u?[]:f.map(Qi),m=E(!0),h=E(f),g=Oo(()=>new Map),[v,x]=k(f),[y,b]=k(f);yn(()=>{m.current=!1,h.current=f;for(let I=0;I<y.length;I++){let S=Qi(y[I]);p.includes(S)?g.delete(S):g.get(S)!==!0&&g.set(S,!1)}},[y,p.length,p.join("-")]);let R=[];if(f!==v){let I=[...f];for(let S=0;S<y.length;S++){let T=y[S],M=Qi(T);p.includes(M)||(I.splice(S,0,T),R.push(T))}return n==="wait"&&R.length&&(I=R),b(zp(I)),x(f),null}let{forceRender:w}=re(vn);return d(Ve,{children:y.map(I=>{let S=Qi(I),T=s&&!u?!1:f===y||p.includes(S),M=()=>{if(g.has(S))g.set(S,!0);else return;let A=!0;g.forEach(O=>{O||(A=!1)}),A&&(w?.(),b(h.current),s&&c?.(),r&&r())};return d(LC,{isPresent:T,initial:!m.current||o?void 0:!1,custom:t,presenceAffectsLayout:a,mode:n,root:l,onExitComplete:T?void 0:M,anchorX:i,children:I},S)})})};N();var Ku=ue({strict:!1});var TC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},or={};for(let e in TC)or[e]={isEnabled:t=>TC[e].some(o=>!!t[o])};function MC(e){for(let t in e)or[t]={...or[t],...e[t]}}var BN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ji(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||BN.has(e)}var kC=e=>!Ji(e);function HN(e){typeof e=="function"&&(kC=t=>t.startsWith("on")?!Ji(t):e(t))}try{HN(jE("@emotion/is-prop-valid").default)}catch{}function EC(e,t,o){let r={};for(let a in e)a==="values"&&typeof e.values=="object"||(kC(a)||o===!0&&Ji(a)||!t&&!Ji(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}N();N();var Dr=ue({});N();function Nr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function rr(e){return typeof e=="string"||Array.isArray(e)}var Xu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],el=["initial",...Xu];function Pa(e){return Nr(e.animate)||el.some(t=>rr(e[t]))}function Yu(e){return!!(Pa(e)||e.variants)}function AC(e,t){if(Pa(e)){let{initial:o,animate:r}=e;return{initial:o===!1||rr(o)?o:void 0,animate:rr(r)?r:void 0}}return e.inherit!==!1?t:{}}function NC(e){let{initial:t,animate:o}=AC(e,re(Dr));return Z(()=>({initial:t,animate:o}),[DC(t),DC(o)])}function DC(e){return Array.isArray(e)?e.join(" "):e}N();N();var La={};function OC(e){for(let t in e)La[t]=e[t],pa(t)&&(La[t].isCSSVariable=!0)}function Zu(e,{layout:t,layoutId:o}){return Vt.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!La[e]||e==="opacity")}var UN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GN=ho.length;function FC(e,t,o){let r="",a=!0;for(let n=0;n<GN;n++){let s=ho[n],i=e[s];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(s.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||o){let u=Xi(i,Ca[s]);if(!l){a=!1;let c=UN[s]||s;r+=`${c}(${u}) `}o&&(t[s]=u)}}return r=r.trim(),o?r=o(t,a?"":r):a&&(r="none"),r}function Tn(e,t,o){let{style:r,vars:a,transformOrigin:n}=e,s=!1,i=!1;for(let l in t){let u=t[l];if(Vt.has(l)){s=!0;continue}else if(pa(l)){a[l]=u;continue}else{let c=Xi(u,Ca[l]);l.startsWith("origin")?(i=!0,n[l]=c):r[l]=c}}if(t.transform||(s||o?r.transform=FC(t,e.transform,o):r.transform&&(r.transform="none")),i){let{originX:l="50%",originY:u="50%",originZ:c=0}=n;r.transformOrigin=`${l} ${u} ${c}`}}var Mn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wp(e,t,o){for(let r in t)!De(t[r])&&!Zu(r,o)&&(e[r]=t[r])}function zN({transformTemplate:e},t){return Z(()=>{let o=Mn();return Tn(o,t,e),Object.assign({},o.vars,o.style)},[t])}function WN(e,t){let o=e.style||{},r={};return Wp(r,o,e),Object.assign(r,zN(e,t)),r}function _C(e,t){let o={},r=WN(e,t);return e.drag&&e.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(o.tabIndex=0),o.style=r,o}N();var qN={offset:"stroke-dashoffset",array:"stroke-dasharray"},$N={offset:"strokeDashoffset",array:"strokeDasharray"};function VC(e,t,o=1,r=0,a=!0){e.pathLength=1;let n=a?qN:$N;e[n.offset]=ce.transform(-r);let s=ce.transform(t),i=ce.transform(o);e[n.array]=`${s} ${i}`}function Qu(e,{attrX:t,attrY:o,attrScale:r,pathLength:a,pathSpacing:n=1,pathOffset:s=0,...i},l,u,c){if(Tn(e,i,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=c?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),o!==void 0&&(f.y=o),r!==void 0&&(f.scale=r),a!==void 0&&VC(f,a,n,s,!1)}var Ju=()=>({...Mn(),attrs:{}});var ec=e=>typeof e=="string"&&e.toLowerCase()==="svg";function BC(e,t,o,r){let a=Z(()=>{let n=Ju();return Qu(n,t,ec(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};Wp(n,e.style,e),a.style={...n,...a.style}}return a}var HC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function kn(e){return typeof e!="string"||e.includes("-")?!1:!!(HC.indexOf(e)>-1||/[A-Z]/u.test(e))}function UC(e,t,o,{latestValues:r},a,n=!1){let i=(kn(e)?BC:_C)(t,r,a,e),l=EC(t,typeof e=="string",n),u=e!==Je?{...l,...i,ref:o}:{},{children:c}=t,f=Z(()=>De(c)?c.get():c,[c]);return pe(e,{...u,children:f})}N();function GC(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function En(e,t,o,r){if(typeof t=="function"){let[a,n]=GC(r);t=t(o!==void 0?o:e.custom,a,n)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[a,n]=GC(r);t=t(o!==void 0?o:e.custom,a,n)}return t}function An(e){return De(e)?e.get():e}function jN({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,a){return{latestValues:KN(o,r,a,e),renderState:t()}}function KN(e,t,o,r){let a={},n=r(e,{});for(let p in n)a[p]=An(n[p]);let{initial:s,animate:i}=e,l=Pa(e),u=Yu(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let c=o?o.initial===!1:!1;c=c||s===!1;let f=c?i:s;if(f&&typeof f!="boolean"&&!Nr(f)){let p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){let h=En(e,p[m]);if(h){let{transitionEnd:g,transition:v,...x}=h;for(let y in x){let b=x[y];if(Array.isArray(b)){let R=c?b.length-1:0;b=b[R]}b!==null&&(a[y]=b)}for(let y in g)a[y]=g[y]}}}return a}var tc=e=>(t,o)=>{let r=re(Dr),a=re(Ir),n=()=>jN(e,t,r,a);return o?n():Oo(n)};function Dn(e,t,o){let{style:r}=e,a={};for(let n in r)(De(r[n])||t.style&&De(t.style[n])||Zu(n,e)||o?.getValue(n)?.liveStyle!==void 0)&&(a[n]=r[n]);return a}var zC=tc({scrapeMotionValuesFromProps:Dn,createRenderState:Mn});function oc(e,t,o){let r=Dn(e,t,o);for(let a in e)if(De(e[a])||De(t[a])){let n=ho.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[n]=e[a]}return r}var WC=tc({scrapeMotionValuesFromProps:oc,createRenderState:Ju});var qC=Symbol.for("motionComponentSymbol");N();function ar(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $C(e,t,o){return H(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):ar(o)&&(o.current=r))},[t])}N();var Nn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var XN="framerAppearId",rc="data-"+Nn(XN);N();var ac=ue({});function jC(e,t,o,r,a){let{visualElement:n}=re(Dr),s=re(Ku),i=re(Ir),l=re(Ar).reducedMotion,u=E(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:n,props:o,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,f=re(ac);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&YN(u.current,o,a,f);let p=E(!1);As(()=>{c&&p.current&&c.update(o,i)});let m=o[rc],h=E(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return yn(()=>{c&&(p.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),h.current&&c.animationState&&c.animationState.animateChanges())}),D(()=>{c&&(!h.current&&c.animationState&&c.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),h.current=!1),c.enteringChildren=void 0)}),c}function YN(e,t,o,r){let{layoutId:a,layout:n,drag:s,dragConstraints:i,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:KC(e.parent)),e.projection.setOptions({layoutId:a,layout:n,alwaysMeasureLayout:!!s||i&&ar(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function KC(e){if(e)return e.options.allowProjection!==!1?e.projection:KC(e.parent)}function nc(e,{forwardMotionProps:t=!1}={},o,r){o&&MC(o);let a=kn(e)?WC:zC;function n(i,l){let u,c={...re(Ar),...i,layoutId:ZN(i)},{isStatic:f}=c,p=NC(i),m=a(i,f);if(!f&&xn){QN(c,o);let h=JN(c);u=h.MeasureLayout,p.visualElement=jC(e,m,c,r,h.ProjectionNode)}return P(Dr.Provider,{value:p,children:[u&&p.visualElement?d(u,{visualElement:p.visualElement,...c}):null,UC(e,i,$C(m,p.visualElement,l),m,f,t)]})}n.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let s=C(n);return s[qC]=e,s}function ZN({layoutId:e}){let t=re(vn).id;return t&&e!==void 0?t+"-"+e:e}function QN(e,t){let o=re(Ku).strict}function JN(e){let{drag:t,layout:o}=or;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function XC(e,t){if(typeof Proxy>"u")return nc;let o=new Map,r=(n,s)=>nc(n,s,e,t),a=(n,s)=>r(n,s);return new Proxy(a,{get:(n,s)=>s==="create"?r:(o.has(s)||o.set(s,nc(s,void 0,e,t)),o.get(s))})}N();function sc({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function YC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZC(e,t){if(!t)return e;let o=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function qp(e){return e===void 0||e===1}function ic({scale:e,scaleX:t,scaleY:o}){return!qp(e)||!qp(t)||!qp(o)}function nr(e){return ic(e)||$p(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $p(e){return QC(e.x)||QC(e.y)}function QC(e){return e&&e!=="0%"}function tl(e,t,o){let r=e-o,a=t*r;return o+a}function JC(e,t,o,r,a){return a!==void 0&&(e=tl(e,a,r)),tl(e,o,r)+t}function jp(e,t=0,o=1,r,a){e.min=JC(e.min,t,o,r,a),e.max=JC(e.max,t,o,r,a)}function Kp(e,{x:t,y:o}){jp(e.x,t.translate,t.scale,t.originPoint),jp(e.y,o.translate,o.scale,o.originPoint)}var ew=.999999999999,tw=1.0000000000001;function rw(e,t,o,r=!1){let a=o.length;if(!a)return;t.x=t.y=1;let n,s;for(let i=0;i<a;i++){n=o[i],s=n.projectionDelta;let{visualElement:l}=n.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&n.options.layoutScroll&&n.scroll&&n!==n.root&&Ta(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Kp(e,s)),r&&nr(n.latestValues)&&Ta(e,n.latestValues))}t.x<tw&&t.x>ew&&(t.x=1),t.y<tw&&t.y>ew&&(t.y=1)}function Or(e,t){e.min=e.min+t,e.max=e.max+t}function ow(e,t,o,r,a=.5){let n=Re(e.min,e.max,a);jp(e,t,o,n,r)}function Ta(e,t){ow(e.x,t.x,t.scaleX,t.scale,t.originX),ow(e.y,t.y,t.scaleY,t.scale,t.originY)}function Xp(e,t){return sc(ZC(e.getBoundingClientRect(),t))}function aw(e,t,o){let r=Xp(e,o),{scroll:a}=t;return a&&(Or(r.x,a.offset.x),Or(r.y,a.offset.y)),r}var nw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ma=()=>({x:nw(),y:nw()}),sw=()=>({min:0,max:0}),He=()=>({x:sw(),y:sw()});var ol={current:null},lc={current:!1};function iw(){if(lc.current=!0,!!xn)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ol.current=e.matches;e.addEventListener("change",t),t()}else ol.current=!1}var Fr=new WeakMap;function lw(e,t,o){for(let r in t){let a=t[r],n=o[r];if(De(a))e.addValue(r,a);else if(De(n))e.addValue(r,At(a,{owner:e}));else if(n!==a)if(e.hasValue(r)){let s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{let s=e.getStaticValue(r);e.addValue(r,At(s!==void 0?s:a,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var uw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],On=class{scrapeMotionValuesFromProps(t,o,r){return{}}constructor({parent:t,props:o,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=er,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=Ze.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Ce.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=o.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=o,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=i,this.blockInitialAnimation=!!n,this.isControllingVariants=Pa(o),this.isVariantNode=Yu(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...f}=this.scrapeMotionValuesFromProps(o,{},this);for(let p in f){let m=f[p];l[p]!==void 0&&De(m)&&m.set(l[p])}}mount(t){this.current=t,Fr.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),lc.current||iw(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ol.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),vt(this.notifyUpdate),vt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let o=this.features[t];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,o){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let r=Vt.has(t);r&&this.onBindTransform&&this.onBindTransform();let a=o.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),n;window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{a(),n&&n(),o.owner&&o.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in or){let o=or[t];if(!o)continue;let{isEnabled:r,Feature:a}=o;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){let n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):He()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,o){this.latestValues[t]=o}update(t,o){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<uw.length;r++){let a=uw[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);let n="on"+a,s=t[n];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=lw(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(t),()=>o.variantChildren.delete(t)}addValue(t,o){let r=this.values.get(t);o!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,o),this.values.set(t,o),this.latestValues[t]=o.get())}removeValue(t){this.values.delete(t);let o=this.valueSubscriptions.get(t);o&&(o(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,o){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&o!==void 0&&(r=At(o===null?void 0:o,{owner:this}),this.addValue(t,r)),r}readValue(t,o){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(vi(r)||yi(r))?r=parseFloat(r):!Up(r)&&yt.test(o)&&(r=$i(t,o)),this.setBaseTarget(t,De(r)?r.get():r)),De(r)?r.get():r}setBaseTarget(t,o){this.baseTarget[t]=o}getBaseTarget(t){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let n=En(this.props,o,this.presenceContext?.custom);n&&(r=n[t])}if(o&&r!==void 0)return r;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!De(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new Yo),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){Sa.render(this.render)}};var Fn=class extends On{constructor(){super(...arguments),this.KeyframeResolver=ji}sortInstanceNodePosition(t,o){return t.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(t,o){return t.style?t.style[o]:void 0}removeValueFromRenderState(t,{vars:o,style:r}){delete o[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;De(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function uc(e,{style:t,vars:o},r,a){let n=e.style,s;for(s in t)n[s]=t[s];a?.applyProjectionStyles(n,r);for(s in o)n.setProperty(s,o[s])}function eO(e){return window.getComputedStyle(e)}var _n=class extends Fn{constructor(){super(...arguments),this.type="html",this.renderInstance=uc}readValueFromInstance(t,o){if(Vt.has(o))return this.projection?.isProjecting?Bi(o):wp(t,o);{let r=eO(t),a=(pa(o)?r.getPropertyValue(o):r[o])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:o}){return Xp(t,o)}build(t,o,r){Tn(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return Dn(t,o,r)}};var cc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function cw(e,t,o,r){uc(e,t,void 0,r);for(let a in t.attrs)e.setAttribute(cc.has(a)?a:Nn(a),t.attrs[a])}var Vn=class extends Fn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=He}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(Vt.has(o)){let r=qi(o);return r&&r.default||0}return o=cc.has(o)?o:Nn(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return oc(t,o,r)}build(t,o,r){Qu(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,a){cw(t,o,r,a)}mount(t){this.isSVGTag=ec(t.tagName),super.mount(t)}};var dw=(e,t)=>kn(e)?new Vn(t):new _n(t,{allowProjection:e!==Je});function Vo(e,t,o){let r=e.getProps();return En(r,t,o!==void 0?o:r.custom,e)}var rl=e=>Array.isArray(e);function tO(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,At(o))}function oO(e){return rl(e)?e[e.length-1]||0:e}function fw(e,t){let o=Vo(e,t),{transitionEnd:r={},transition:a={},...n}=o||{};n={...n,...r};for(let s in n){let i=oO(n[s]);tO(e,s,i)}}function pw(e){return!!(De(e)&&e.add)}function al(e,t){let o=e.getValue("willChange");if(pw(o))return o.add(t);if(!o&&ht.WillChange){let r=new ht.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function dc(e){return e.props[rc]}var rO=e=>e!==null;function mw(e,{repeat:t,repeatType:o="loop"},r){let a=e.filter(rO),n=t&&o!=="loop"&&t%2===1?0:a.length-1;return!n||r===void 0?a[n]:r}var aO={type:"spring",stiffness:500,damping:25,restSpeed:10},nO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sO={type:"keyframes",duration:.8},iO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},gw=(e,{keyframes:t})=>t.length>2?sO:Vt.has(e)?e.startsWith("scale")?nO(t[1]):aO:iO;function hw({when:e,delay:t,delayChildren:o,staggerChildren:r,staggerDirection:a,repeat:n,repeatType:s,repeatDelay:i,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var Bn=(e,t,o,r={},a,n)=>s=>{let i=ba(r,e)||{},l=i.delay||r.delay||0,{elapsed:u=0}=r;u=u-et(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:n?void 0:a};hw(i)||Object.assign(c,gw(e,c)),c.duration&&(c.duration=et(c.duration)),c.repeatDelay&&(c.repeatDelay=et(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Pn(c),c.delay===0&&(f=!0)),(ht.instantAnimations||ht.skipAnimations)&&(f=!0,Pn(c),c.delay=0),c.allowFlatten=!i.type&&!i.ease,f&&!n&&t.get()!==void 0){let p=mw(c.keyframes,i);if(p!==void 0){Ce.update(()=>{c.onUpdate(p),c.onComplete()});return}}return i.isSync?new Jo(c):new Ui(c)};function lO({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function Hn(e,t,{delay:o=0,transitionOverride:r,type:a}={}){let{transition:n=e.getDefaultTransition(),transitionEnd:s,...i}=t;r&&(n=r);let l=[],u=a&&e.animationState&&e.animationState.getState()[a];for(let c in i){let f=e.getValue(c,e.latestValues[c]??null),p=i[c];if(p===void 0||u&&lO(u,c))continue;let m={delay:o,...ba(n||{},c)},h=f.get();if(h!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===h&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){let x=dc(e);if(x){let y=window.MotionHandoffAnimation(x,c,Ce);y!==null&&(m.startTime=y,g=!0)}}al(e,c),f.start(Bn(c,f,p,e.shouldReduceMotion&&zi.has(c)?{type:!1}:m,e,g));let v=f.animation;v&&l.push(v)}return s&&Promise.all(l).then(()=>{Ce.update(()=>{s&&fw(e,s)})}),l}function fc(e,t,o,r=0,a=1){let n=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,i=(s-1)*r;return typeof o=="function"?o(n,s):a===1?n*r:i-n*r}function pc(e,t,o={}){let r=Vo(e,t,o.type==="exit"?e.presenceContext?.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(a=o.transitionOverride);let n=r?()=>Promise.all(Hn(e,r,o)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=a;return uO(e,t,l,u,c,f,o)}:()=>Promise.resolve(),{when:i}=a;if(i){let[l,u]=i==="beforeChildren"?[n,s]:[s,n];return l().then(()=>u())}else return Promise.all([n(),s(o.delay)])}function uO(e,t,o=0,r=0,a=0,n=1,s){let i=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),i.push(pc(l,t,{...s,delay:o+(typeof r=="function"?0:r)+fc(e.variantChildren,l,r,a,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function vw(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let a=t.map(n=>pc(e,n,o));r=Promise.all(a)}else if(typeof t=="string")r=pc(e,t,o);else{let a=typeof t=="function"?Vo(e,t,o.custom):t;r=Promise.all(Hn(e,a,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Yp(e,t){if(!Array.isArray(t))return!1;let o=t.length;if(o!==e.length)return!1;for(let r=0;r<o;r++)if(t[r]!==e[r])return!1;return!0}var cO=el.length;function Zp(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?Zp(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<cO;o++){let r=el[o],a=e.props[r];(rr(a)||a===!1)&&(t[r]=a)}return t}var dO=[...Xu].reverse(),fO=Xu.length;function pO(e){return t=>Promise.all(t.map(({animation:o,options:r})=>vw(e,o,r)))}function yw(e){let t=pO(e),o=xw(),r=!0,a=l=>(u,c)=>{let f=Vo(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(f){let{transition:p,transitionEnd:m,...h}=f;u={...u,...h,...m}}return u};function n(l){t=l(e)}function s(l){let{props:u}=e,c=Zp(e.parent)||{},f=[],p=new Set,m={},h=1/0;for(let v=0;v<fO;v++){let x=dO[v],y=o[x],b=u[x]!==void 0?u[x]:c[x],R=rr(b),w=x===l?y.isActive:null;w===!1&&(h=v);let I=b===c[x]&&b!==u[x]&&R;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),y.protectedKeys={...m},!y.isActive&&w===null||!b&&!y.prevProp||Nr(b)||typeof b=="boolean")continue;let S=mO(y.prevProp,b),T=S||x===l&&y.isActive&&!I&&R||v>h&&R,M=!1,A=Array.isArray(b)?b:[b],O=A.reduce(a(x),{});w===!1&&(O={});let{prevResolvedValues:V={}}=y,q={...V,...O},F=G=>{T=!0,p.has(G)&&(M=!0,p.delete(G)),y.needsAnimating[G]=!0;let z=e.getValue(G);z&&(z.liveStyle=!1)};for(let G in q){let z=O[G],_=V[G];if(m.hasOwnProperty(G))continue;let ae=!1;rl(z)&&rl(_)?ae=!Yp(z,_):ae=z!==_,ae?z!=null?F(G):p.add(G):z!==void 0&&p.has(G)?F(G):y.protectedKeys[G]=!0}y.prevProp=b,y.prevResolvedValues=O,y.isActive&&(m={...m,...O}),r&&e.blockInitialAnimation&&(T=!1);let $=I&&S;T&&(!$||M)&&f.push(...A.map(G=>{let z={type:x};if(typeof G=="string"&&r&&!$&&e.manuallyAnimateOnMount&&e.parent){let{parent:_}=e,ae=Vo(_,G);if(_.enteringChildren&&ae){let{delayChildren:ie}=ae.transition||{};z.delay=fc(_.enteringChildren,e,ie)}}return{animation:G,options:z}}))}if(p.size){let v={};if(typeof u.initial!="boolean"){let x=Vo(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}p.forEach(x=>{let y=e.getBaseTarget(x),b=e.getValue(x);b&&(b.liveStyle=!0),v[x]=y??null}),f.push({animation:v})}let g=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function i(l,u){if(o[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),o[l].isActive=u;let c=s(l);for(let f in o)o[f].protectedKeys={};return c}return{animateChanges:s,setActive:i,setAnimateFunction:n,getState:()=>o,reset:()=>{o=xw()}}}function mO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Yp(t,e):!1}function ka(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xw(){return{animate:ka(!0),whileInView:ka(),whileHover:ka(),whileTap:ka(),whileDrag:ka(),whileFocus:ka(),exit:ka()}}var lt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var mc=class extends lt{constructor(t){super(t),t.animationState||(t.animationState=yw(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Nr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:o}=this.node.prevProps||{};t!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var gO=0,gc=class extends lt{constructor(){super(...arguments),this.id=gO++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;let a=this.node.animationState.setActive("exit",!t);o&&!t&&a.then(()=>{o(this.id)})}mount(){let{register:t,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var bw={animation:{Feature:mc},exit:{Feature:gc}};function sr(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function ir(e){return{point:{x:e.pageX,y:e.pageY}}}var Cw=e=>t=>Ra(t)&&e(t,ir(t));function _r(e,t,o,r){return sr(e,t,Cw(o),r)}var Iw=1e-4,hO=1-Iw,vO=1+Iw,Pw=.01,xO=0-Pw,yO=0+Pw;function nt(e){return e.max-e.min}function Lw(e,t,o){return Math.abs(e-t)<=o}function ww(e,t,o,r=.5){e.origin=r,e.originPoint=Re(t.min,t.max,e.origin),e.scale=nt(o)/nt(t),e.translate=Re(o.min,o.max,e.origin)-e.originPoint,(e.scale>=hO&&e.scale<=vO||isNaN(e.scale))&&(e.scale=1),(e.translate>=xO&&e.translate<=yO||isNaN(e.translate))&&(e.translate=0)}function Un(e,t,o,r){ww(e.x,t.x,o.x,r?r.originX:void 0),ww(e.y,t.y,o.y,r?r.originY:void 0)}function Sw(e,t,o){e.min=o.min+t.min,e.max=e.min+nt(t)}function Tw(e,t,o){Sw(e.x,t.x,o.x),Sw(e.y,t.y,o.y)}function Rw(e,t,o){e.min=t.min-o.min,e.max=e.min+nt(t)}function Gn(e,t,o){Rw(e.x,t.x,o.x),Rw(e.y,t.y,o.y)}function Dt(e){return[e("x"),e("y")]}var hc=({current:e})=>e?e.ownerDocument.defaultView:null;var Mw=(e,t)=>Math.abs(e-t);function kw(e,t){let o=Mw(e.x,t.x),r=Mw(e.y,t.y);return Math.sqrt(o**2+r**2)}var zn=class{constructor(t,o,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:n=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let p=Jp(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,h=kw(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!h)return;let{point:g}=p,{timestamp:v}=Ye;this.history.push({...g,timestamp:v});let{onStart:x,onMove:y}=this.handlers;m||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Qp(m,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();let{onEnd:h,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let x=Jp(p.type==="pointercancel"?this.lastMoveEventInfo:Qp(m,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,x),g&&g(p,x)},!Ra(t))return;this.dragSnapToOrigin=n,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=a||window;let i=ir(t),l=Qp(i,this.transformPagePoint),{point:u}=l,{timestamp:c}=Ye;this.history=[{...u,timestamp:c}];let{onSessionStart:f}=o;f&&f(t,Jp(l,this.history)),this.removeListeners=po(_r(this.contextWindow,"pointermove",this.handlePointerMove),_r(this.contextWindow,"pointerup",this.handlePointerUp),_r(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),vt(this.updatePoint)}};function Qp(e,t){return t?{point:t(e.point)}:e}function Ew(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jp({point:e},t){return{point:e,delta:Ew(e,Aw(t)),offset:Ew(e,bO(t)),velocity:CO(t,.1)}}function bO(e){return e[0]}function Aw(e){return e[e.length-1]}function CO(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,a=Aw(e);for(;o>=0&&(r=e[o],!(a.timestamp-r.timestamp>et(t)));)o--;if(!r)return{x:0,y:0};let n=at(a.timestamp-r.timestamp);if(n===0)return{x:0,y:0};let s={x:(a.x-r.x)/n,y:(a.y-r.y)/n};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function _w(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?Re(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?Re(o,e,r.max):Math.min(e,o)),e}function Dw(e,t,o){return{min:t!==void 0?e.min+t:void 0,max:o!==void 0?e.max+o-(e.max-e.min):void 0}}function Vw(e,{top:t,left:o,bottom:r,right:a}){return{x:Dw(e.x,o,a),y:Dw(e.y,t,r)}}function Nw(e,t){let o=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([o,r]=[r,o]),{min:o,max:r}}function Bw(e,t){return{x:Nw(e.x,t.x),y:Nw(e.y,t.y)}}function Hw(e,t){let o=.5,r=nt(e),a=nt(t);return a>r?o=$t(t.min,t.max-r,e.min):r>a&&(o=$t(e.min,e.max-a,t.min)),it(0,1,o)}function Uw(e,t){let o={};return t.min!==void 0&&(o.min=t.min-e.min),t.max!==void 0&&(o.max=t.max-e.min),o}var vc=.35;function Gw(e=vc){return e===!1?e=0:e===!0&&(e=vc),{x:Ow(e,"left","right"),y:Ow(e,"top","bottom")}}function Ow(e,t,o){return{min:Fw(e,t),max:Fw(e,o)}}function Fw(e,t){return typeof e=="number"?e:e[t]||0}var wO=new WeakMap,yc=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=He(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;let n=f=>{let{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(ir(f).point)},s=(f,p)=>{let{drag:m,dragPropagation:h,onDragStart:g}=this.getProps();if(m&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Op(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Dt(x=>{let y=this.getAxisMotionValue(x).get()||0;if(xt.test(y)){let{projection:b}=this.visualElement;if(b&&b.layout){let R=b.layout.layoutBox[x];R&&(y=nt(R)*(parseFloat(y)/100))}}this.originPoint[x]=y}),g&&Ce.postRender(()=>g(f,p)),al(this.visualElement,"transform");let{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},i=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;let{dragPropagation:m,dragDirectionLock:h,onDirectionLock:g,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;let{offset:x}=p;if(h&&this.currentDirection===null){this.currentDirection=SO(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,x),this.updateAxis("y",p.point,x),this.visualElement.render(),v&&v(f,p)},l=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Dt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new zn(t,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:hc(this.visualElement)})}stop(t,o){let r=t||this.latestPointerEvent,a=o||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!a||!r)return;let{velocity:s}=a;this.startAnimation(s);let{onDragEnd:i}=this.getProps();i&&Ce.postRender(()=>i(r,a))}cancel(){this.isDragging=!1;let{projection:t,animationState:o}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(t,o,r){let{drag:a}=this.getProps();if(!r||!xc(t,a,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=_w(s,this.constraints[t],this.elastic[t])),n.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,a=this.constraints;t&&ar(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Vw(r.layoutBox,t):this.constraints=!1,this.elastic=Gw(o),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Dt(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=Uw(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!ar(t))return!1;let r=t.current;ft(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:a}=this.visualElement;if(!a||!a.layout)return!1;let n=aw(r,a.root,this.visualElement.getTransformPagePoint()),s=Bw(a.layout.layoutBox,n);if(o){let i=o(YC(s));this.hasMutatedConstraints=!!i,i&&(s=sc(i))}return s}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:a,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=Dt(c=>{if(!xc(c,o,this.currentDirection))return;let f=l&&l[c]||{};s&&(f={min:0,max:0});let p=a?200:1e6,m=a?40:1e7,h={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...n,...f};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(i)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return al(this.visualElement,t),r.start(Bn(t,r,0,o,this.visualElement,!1))}stopAnimation(){Dt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Dt(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let o=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[o];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Dt(o=>{let{drag:r}=this.getProps();if(!xc(o,r,this.currentDirection))return;let{projection:a}=this.visualElement,n=this.getAxisMotionValue(o);if(a&&a.layout){let{min:s,max:i}=a.layout.layoutBox[o];n.set(t[o]-Re(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!ar(o)||!r||!this.constraints)return;this.stopAnimation();let a={x:0,y:0};Dt(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();a[s]=Hw({min:l,max:l},this.constraints[s])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Dt(s=>{if(!xc(s,t,null))return;let i=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];i.set(Re(l,u,a[s]))})}addListeners(){if(!this.visualElement.current)return;wO.set(this.visualElement,this);let t=this.visualElement.current,o=_r(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();ar(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,n=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Ce.read(r);let s=sr(window,"resize",()=>this.scalePositionWithinConstraints()),i=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Dt(c=>{let f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),o(),n(),i&&i()}}getProps(){let t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:n=!1,dragElastic:s=vc,dragMomentum:i=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:a,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function xc(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function SO(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var bc=class extends lt{constructor(t){super(t),this.removeGroupControls=Ke,this.removeListeners=Ke,this.controls=new yc(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ke}unmount(){this.removeGroupControls(),this.removeListeners()}};var zw=e=>(t,o)=>{e&&Ce.postRender(()=>e(t,o))},Cc=class extends lt{constructor(){super(...arguments),this.removePointerDownListener=Ke}onPointerDown(t){this.session=new zn(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hc(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:zw(t),onStart:zw(o),onMove:r,onEnd:(n,s)=>{delete this.session,a&&Ce.postRender(()=>a(n,s))}}}mount(){this.removePointerDownListener=_r(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};N();var Wn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ww(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var qn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ce.test(e))e=parseFloat(e);else return e;let o=Ww(e,t.target.x),r=Ww(e,t.target.y);return`${o}% ${r}%`}};var qw={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,a=yt.parse(e);if(a.length>5)return r;let n=yt.createTransformer(e),s=typeof a[0]!="number"?1:0,i=o.x.scale*t.x,l=o.y.scale*t.y;a[0+s]/=i,a[1+s]/=l;let u=Re(i,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=u),typeof a[3+s]=="number"&&(a[3+s]/=u),n(a)}};var em=!1,tm=class extends Es{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:a}=this.props,{projection:n}=t;OC(RO),n&&(o.group&&o.group.add(n),r&&r.register&&a&&r.register(n),em&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),Wn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:a,isPresent:n}=this.props,{projection:s}=r;return s&&(s.isPresent=n,em=!0,a||t.layoutDependency!==o||o===void 0||t.isPresent!==n?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||Ce.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sa.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:a}=t;em=!0,a&&(a.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function wc(e){let[t,o]=ju(),r=re(vn);return d(tm,{...e,layoutGroup:r,switchLayoutGroup:re(ac),isPresent:t,safeToRemove:o})}var RO={borderRadius:{...qn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qn,borderTopRightRadius:qn,borderBottomLeftRadius:qn,borderBottomRightRadius:qn,boxShadow:qw};function Sc(e,t,o){let r=De(e)?e:At(e);return r.start(Bn("",r,t,o)),r.animation}var $w=(e,t)=>e.depth-t.depth;var Rc=class{constructor(){this.children=[],this.isDirty=!1}add(t){da(this.children,t),this.isDirty=!0}remove(t){fo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($w),this.isDirty=!1,this.children.forEach(t)}};function jw(e,t){let o=Ze.now(),r=({timestamp:a})=>{let n=a-o;n>=t&&(vt(r),e(n-t))};return Ce.setup(r,!0),()=>vt(r)}var Zw=["TopLeft","TopRight","BottomLeft","BottomRight"],IO=Zw.length,Kw=e=>typeof e=="string"?parseFloat(e):e,Xw=e=>typeof e=="number"||ce.test(e);function Qw(e,t,o,r,a,n){a?(e.opacity=Re(0,o.opacity??1,PO(r)),e.opacityExit=Re(t.opacity??1,0,LO(r))):n&&(e.opacity=Re(t.opacity??1,o.opacity??1,r));for(let s=0;s<IO;s++){let i=`border${Zw[s]}Radius`,l=Yw(t,i),u=Yw(o,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xw(l)===Xw(u)?(e[i]=Math.max(Re(Kw(l),Kw(u),r),0),(xt.test(u)||xt.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||o.rotate)&&(e.rotate=Re(t.rotate||0,o.rotate||0,r))}function Yw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var PO=Jw(0,.5,Ri),LO=Jw(.5,.95,Ke);function Jw(e,t,o){return r=>r<e?0:r>t?1:o($t(e,t,r))}function eS(e,t){e.min=t.min,e.max=t.max}function Bt(e,t){eS(e.x,t.x),eS(e.y,t.y)}function om(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function tS(e,t,o,r,a){return e-=t,e=tl(e,1/o,r),a!==void 0&&(e=tl(e,1/a,r)),e}function TO(e,t=0,o=1,r=.5,a,n=e,s=e){if(xt.test(t)&&(t=parseFloat(t),t=Re(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=Re(n.min,n.max,r);e===n&&(i-=t),e.min=tS(e.min,t,o,i,a),e.max=tS(e.max,t,o,i,a)}function oS(e,t,[o,r,a],n,s){TO(e,t[o],t[r],t[a],t.scale,n,s)}var MO=["x","scaleX","originX"],kO=["y","scaleY","originY"];function rm(e,t,o,r){oS(e.x,t,MO,o?o.x:void 0,r?r.x:void 0),oS(e.y,t,kO,o?o.y:void 0,r?r.y:void 0)}function rS(e){return e.translate===0&&e.scale===1}function am(e){return rS(e.x)&&rS(e.y)}function aS(e,t){return e.min===t.min&&e.max===t.max}function sS(e,t){return aS(e.x,t.x)&&aS(e.y,t.y)}function nS(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nm(e,t){return nS(e.x,t.x)&&nS(e.y,t.y)}function sm(e){return nt(e.x)/nt(e.y)}function im(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ic=class{constructor(){this.members=[]}add(t){da(this.members,t),t.scheduleRender()}remove(t){if(fo(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(t){let o=this.members.findIndex(a=>t===a);if(o===0)return!1;let r;for(let a=o;a>=0;a--){let n=this.members[a];if(n.isPresent!==!1){r=n;break}}return r?(this.promote(r),!0):!1}promote(t,o){let r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,o&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:o,resumingFrom:r}=t;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function iS(e,t,o){let r="",a=e.x.translate/t.x,n=e.y.translate/t.y,s=o?.z||0;if((a||n||s)&&(r=`translate3d(${a}px, ${n}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),o){let{transformPerspective:u,rotate:c,rotateX:f,rotateY:p,skewX:m,skewY:h}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),h&&(r+=`skewY(${h}deg) `)}let i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(r+=`scale(${i}, ${l})`),r||"none"}var Ea={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},lm=["","X","Y","Z"],EO=1e3,AO=0;function um(e,t,o,r){let{latestValues:a}=t;a[e]&&(o[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function hS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=dc(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:a,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",Ce,!(a||n))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hS(r)}function Pc({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},i=t?.()){this.id=AO++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Et.value&&(Ea.nodes=Ea.calculatedTargetDeltas=Ea.calculatedProjections=0),this.nodes.forEach(OO),this.nodes.forEach(BO),this.nodes.forEach(HO),this.nodes.forEach(FO),Et.addProjectionMetrics&&Et.addProjectionMetrics(Ea)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Rc)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Yo),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){let l=this.eventHandlers.get(s);l&&l.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Ia(s)&&!Zi(s),this.instance=s;let{layoutId:i,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let c,f=0,p=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{f=window.innerWidth}),e(s,()=>{let m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=jw(p,250),Wn.hasAnimatedSinceResize&&(Wn.hasAnimatedSinceResize=!1,this.nodes.forEach(cS)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||qO,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!nm(this.targetLayout,m),y=!f&&p;if(this.options.layoutRoot||this.resumeFrom||y||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let b={...ba(h,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(c,y)}else f||cS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),vt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(UO),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(VO),this.nodes.forEach(DO),this.nodes.forEach(NO)):this.nodes.forEach(uS),this.clearAllSnapshots();let i=Ze.now();Ye.delta=it(0,1e3/60,i-Ye.timestamp),Ye.timestamp=i,Ye.isProcessing=!0,Ei.update.process(Ye),Ei.preRender.process(Ye),Ei.render.process(Ye),Ye.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_O),this.sharedNodes.forEach(GO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!nt(this.snapshot.measuredBox.x)&&!nt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=He(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i&&this.instance){let l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!a)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!am(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||nr(this.latestValues)||c)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let i=this.measurePageBox(),l=this.removeElementScroll(i);return s&&(l=this.removeTransform(l)),$O(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return He();let i=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(jO))){let{scroll:u}=this.root;u&&(Or(i.x,u.offset.x),Or(i.y,u.offset.y))}return i}removeElementScroll(s){let i=He();if(Bt(i,s),this.scroll?.wasRoot)return i;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Bt(i,s),Or(i.x,c.offset.x),Or(i.y,c.offset.y))}return i}applyTransform(s,i=!1){let l=He();Bt(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];!i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ta(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nr(c.latestValues)&&Ta(l,c.latestValues)}return nr(this.latestValues)&&Ta(l,this.latestValues),l}removeTransform(s){let i=He();Bt(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!nr(u.latestValues))continue;ic(u.latestValues)&&u.updateSnapshot();let c=He(),f=u.measurePageBox();Bt(c,f),rm(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nr(this.latestValues)&&rm(i,this.latestValues),i}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ye.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){let i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==i;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=Ye.timestamp,!this.targetDelta&&!this.relativeTarget){let p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=He(),this.relativeTargetOrigin=He(),Gn(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Bt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=He(),this.targetWithTransforms=He()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tw(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Bt(this.target,this.layout.layoutBox),Kp(this.target,this.targetDelta)):Bt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=He(),this.relativeTargetOrigin=He(),Gn(this.relativeTargetOrigin,this.target,p.target),Bt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Et.value&&Ea.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ic(this.parent.latestValues)||$p(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let s=this.getLead(),i=!!this.resumingFrom||this!==s,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ye.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Bt(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;rw(this.layoutCorrected,this.treeScale,this.path,i),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=He());let{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(om(this.prevProjectionDelta.x,this.projectionDelta.x),om(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!im(this.projectionDelta.x,this.prevProjectionDelta.x)||!im(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Et.value&&Ea.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){let i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ma(),this.projectionDelta=Ma(),this.projectionDeltaWithTransform=Ma()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Ma();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let p=He(),m=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=m!==h,v=this.getStack(),x=!v||v.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(WO));this.animationProgress=0;let b;this.mixTargetDelta=R=>{let w=R/1e3;dS(f.x,s.x,w),dS(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gn(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zO(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&sS(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=He()),Bt(b,this.relativeTarget)),g&&(this.animationValues=c,Qw(c,u,this.latestValues,w,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(vt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{Wn.hasAnimatedSinceResize=!0,mo.layout++,this.motionValue||(this.motionValue=At(0)),this.currentAnimation=Sc(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onStop:()=>{mo.layout--},onComplete:()=>{mo.layout--,s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(EO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:i,target:l,layout:u,latestValues:c}=s;if(!(!i||!l||!u)){if(this!==s&&this.layout&&u&&vS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||He();let f=nt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;let p=nt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+p}Bt(i,l),Ta(i,c),Un(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Ic),this.sharedNodes.get(s).add(i);let u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let i=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;let u={};l.z&&um("z",s,u,this.animationValues);for(let c=0;c<lm.length;c++)um(`rotate${lm[c]}`,s,u,this.animationValues),um(`skew${lm[c]}`,s,u,this.animationValues);s.render();for(let c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}applyProjectionStyles(s,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=An(i?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=An(i?.pointerEvents)||""),this.hasProjected&&!nr(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=iS(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),s.transform=f;let{x:p,y:m}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,u.animationValues?s.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let h in La){if(c[h]===void 0)continue;let{correct:g,applyTo:v,isCSSVariable:x}=La[h],y=f==="none"?c[h]:g(c[h],u);if(v){let b=v.length;for(let R=0;R<b;R++)s[v[R]]=y}else x?this.options.visualElement.renderState.vars[h]=y:s[h]=y}this.options.layoutId&&(s.pointerEvents=u===this?An(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(lS),this.root.sharedNodes.clear()}}}function DO(e){e.updateLayout()}function NO(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=e.layout,{animationType:a}=e.options,n=t.source!==e.layout.source;a==="size"?Dt(c=>{let f=n?t.measuredBox[c]:t.layoutBox[c],p=nt(f);f.min=o[c].min,f.max=f.min+p}):vS(a,t.layoutBox,o)&&Dt(c=>{let f=n?t.measuredBox[c]:t.layoutBox[c],p=nt(o[c]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});let s=Ma();Un(s,o,t.layoutBox);let i=Ma();n?Un(i,e.applyTransform(r,!0),t.measuredBox):Un(i,o,t.layoutBox);let l=!am(s),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:f,layout:p}=c;if(f&&p){let m=He();Gn(m,t.layoutBox,f.layoutBox);let h=He();Gn(h,o,p.layoutBox),nm(m,h)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:i,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function OO(e){Et.value&&Ea.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function FO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _O(e){e.clearSnapshot()}function lS(e){e.clearMeasurements()}function uS(e){e.isLayoutDirty=!1}function VO(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function BO(e){e.resolveTargetDelta()}function HO(e){e.calcProjection()}function UO(e){e.resetSkewAndRotation()}function GO(e){e.removeLeadSnapshot()}function dS(e,t,o){e.translate=Re(t.translate,0,o),e.scale=Re(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function fS(e,t,o,r){e.min=Re(t.min,o.min,r),e.max=Re(t.max,o.max,r)}function zO(e,t,o,r){fS(e.x,t.x,o.x,r),fS(e.y,t.y,o.y,r)}function WO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var qO={duration:.45,ease:[.4,0,.1,1]},pS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mS=pS("applewebkit/")&&!pS("chrome/")?Math.round:Ke;function gS(e){e.min=mS(e.min),e.max=mS(e.max)}function $O(e){gS(e.x),gS(e.y)}function vS(e,t,o){return e==="position"||e==="preserve-aspect"&&!Lw(sm(t),sm(o),.2)}function jO(e){return e!==e.root&&e.scroll?.wasRoot}var xS=Pc({attachResizeListener:(e,t)=>sr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var cm={current:void 0},Lc=Pc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cm.current){let e=new xS({});e.mount(window),e.setOptions({layoutScroll:!0}),cm.current=e}return cm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var yS={pan:{Feature:Cc},drag:{Feature:bc,ProjectionNode:Lc,MeasureLayout:wc}};function bS(e,t,o){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",o==="Start");let a="onHover"+o,n=r[a];n&&Ce.postRender(()=>n(t,ir(t)))}var Tc=class extends lt{mount(){let{current:t}=this.node;t&&(this.unmount=Fp(t,(o,r)=>(bS(this.node,r,"Start"),a=>bS(this.node,a,"End"))))}unmount(){}};var Mc=class extends lt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=po(sr(this.node.current,"focus",()=>this.onFocus()),sr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function CS(e,t,o){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",o==="Start");let a="onTap"+(o==="End"?"":o),n=r[a];n&&Ce.postRender(()=>n(t,ir(t)))}var kc=class extends lt{mount(){let{current:t}=this.node;t&&(this.unmount=Bp(t,(o,r)=>(CS(this.node,r,"Start"),(a,{success:n})=>CS(this.node,a,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var fm=new WeakMap,dm=new WeakMap,KO=e=>{let t=fm.get(e.target);t&&t(e)},XO=e=>{e.forEach(KO)};function YO({root:e,...t}){let o=e||document;dm.has(o)||dm.set(o,{});let r=dm.get(o),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(XO,{root:e,...t})),r[a]}function wS(e,t,o){let r=YO(t);return fm.set(e,o),r.observe(e),()=>{fm.delete(e),r.unobserve(e)}}var ZO={some:0,all:1},Ec=class extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:o,margin:r,amount:a="some",once:n}=t,s={root:o?o.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:ZO[a]},i=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,n&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),p=u?c:f;p&&p(l)};return wS(this.node.current,s,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:o}=this.node;["amount","margin","root"].some(QO(t,o))&&this.startObserver()}unmount(){}};function QO({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var SS={inView:{Feature:Ec},tap:{Feature:kc},focus:{Feature:Mc},hover:{Feature:Tc}};var RS={layout:{ProjectionNode:Lc,MeasureLayout:wc}};var IS={...bw,...SS,...yS,...RS};var _e=XC(IS,dw);N();function $n(e){let t=Oo(()=>At(e)),{isStatic:o}=re(Ar);if(o){let[,r]=k(e);D(()=>t.on("change",r),[])}return t}function Ac(e,t){let o=$n(t()),r=()=>o.set(t());return r(),yn(()=>{let a=()=>Ce.preRender(r,!1,!0),n=e.map(s=>s.on("change",a));return()=>{n.forEach(s=>s()),vt(r)}}),o}function PS(e){wa.current=[],e();let t=Ac(wa.current,e);return wa.current=void 0,t}function pm(e,t,o,r){if(typeof e=="function")return PS(e);let a=typeof t=="function"?t:Hp(t,o,r);return Array.isArray(e)?LS(e,a):LS([e],([n])=>a(n))}function LS(e,t){let o=Oo(()=>[]);return Ac(e,()=>{o.length=0;let r=e.length;for(let a=0;a<r;a++)o[a]=e[a].get();return t(o)})}function nl(e){return typeof e=="object"&&!Array.isArray(e)}function Dc(e,t,o,r){return typeof e=="string"&&nl(t)?Ki(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function TS(e,t,o){return e*(t+1)}function mm(e,t,o,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?o:t.startsWith("<")?Math.max(0,o+parseFloat(t.slice(1))):r.get(t)??e}function JO(e,t,o){for(let r=0;r<e.length;r++){let a=e[r];a.at>t&&a.at<o&&(fo(e,a),r--)}}function MS(e,t,o,r,a,n){JO(e,a,n);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Re(a,n,r[s]),easing:Ti(o,s)})}function kS(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function ES(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var e2="easeInOut",t2=20;function NS(e,{defaultTransition:t={},...o}={},r,a){let n=t.duration||.3,s=new Map,i=new Map,l={},u=new Map,c=0,f=0,p=0;for(let m=0;m<e.length;m++){let h=e[m];if(typeof h=="string"){u.set(h,f);continue}else if(!Array.isArray(h)){u.set(h.name,mm(f,h.at,c,u));continue}let[g,v,x={}]=h;x.at!==void 0&&(f=mm(f,x.at,c,u));let y=0,b=(R,w,I,S=0,T=0)=>{let M=o2(R),{delay:A=0,times:O=Vi(M),type:V="keyframes",repeat:q,repeatType:F,repeatDelay:$=0,...U}=w,{ease:G=t.ease||"easeOut",duration:z}=w,_=typeof A=="function"?A(S,T):A,ae=M.length,ie=ya(V)?V:a?.[V||"keyframes"];if(ae<=2&&ie){let ee=100;if(ae===2&&n2(M)){let se=M[1]-M[0];ee=Math.abs(se)}let de={...U};z!==void 0&&(de.duration=et(z));let K=Oi(de,ee,ie);G=K.ease,z=K.duration}z??(z=n);let W=f+_;O.length===1&&O[0]===0&&(O[1]=1);let te=O.length-M.length;if(te>0&&_i(O,te),M.length===1&&M.unshift(null),q){ft(q<t2,"Repeat count too high, must be less than 20","repeat-count-high"),z=TS(z,q);let ee=[...M],de=[...O];G=Array.isArray(G)?[...G]:[G];let K=[...G];for(let se=0;se<q;se++){M.push(...ee);for(let ve=0;ve<ee.length;ve++)O.push(de[ve]+(se+1)),G.push(ve===0?"linear":Ti(K,ve-1))}kS(O,q)}let ne=W+z;MS(I,M,G,O,W,ne),y=Math.max(_+z,y),p=Math.max(ne,p)};if(De(g)){let R=AS(g,i);b(v,x,DS("default",R))}else{let R=Dc(g,v,r,l),w=R.length;for(let I=0;I<w;I++){v=v,x=x;let S=R[I],T=AS(S,i);for(let M in v)b(v[M],r2(x,M),DS(M,T),I,w)}}c=f,f+=y}return i.forEach((m,h)=>{for(let g in m){let v=m[g];v.sort(ES);let x=[],y=[],b=[];for(let w=0;w<v.length;w++){let{at:I,value:S,easing:T}=v[w];x.push(S),y.push($t(0,p,I)),b.push(T||"easeOut")}y[0]!==0&&(y.unshift(0),x.unshift(x[0]),b.unshift(e2)),y[y.length-1]!==1&&(y.push(1),x.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});let R=s.get(h);R.keyframes[g]=x,R.transition[g]={...t,duration:p,ease:b,times:y,...o}}}),s}function AS(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function DS(e,t){return t[e]||(t[e]=[]),t[e]}function o2(e){return Array.isArray(e)?e:[e]}function r2(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var a2=e=>typeof e=="number",n2=e=>e.every(a2);function s2(e,t){return e in t}var Nc=class extends On{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(s2(o,t)){let r=t[o];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,o){delete o.output[t]}measureInstanceViewportBox(){return He()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function OS(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=Ia(e)&&!Zi(e)?new Vn(t):new _n(t);o.mount(e),Fr.set(e,o)}function FS(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new Nc(t);o.mount(e),Fr.set(e,o)}function i2(e,t){return De(e)||typeof e=="number"||typeof e=="string"&&!nl(t)}function Oc(e,t,o,r){let a=[];if(i2(e,t))a.push(Sc(e,nl(t)&&t.default||t,o&&(o.default||o)));else{let n=Dc(e,t,r),s=n.length;ft(!!s,"No valid elements provided.","no-valid-elements");for(let i=0;i<s;i++){let l=n[i];ft(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?OS:FS;Fr.has(l)||u(l);let c=Fr.get(l),f={...o};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(i,s)),a.push(...Hn(c,{...t,transition:f},{}))}}return a}function _S(e,t,o){let r=[];return NS(e,t,o,{spring:Qo}).forEach(({keyframes:n,transition:s},i)=>{r.push(...Oc(i,n,s))}),r}function l2(e){return Array.isArray(e)&&e.some(Array.isArray)}function VS(e){function t(o,r,a){let n=[],s;if(l2(o))n=_S(o,r,e);else{let{onComplete:l,...u}=a||{};typeof l=="function"&&(s=l),n=Oc(o,r,u,e)}let i=new Gi(n);return s&&i.finished.then(s),e&&(e.animations.push(i),i.finished.then(()=>{fo(e.animations,i)})),i}return t}var gm=VS();var Gse=Q("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),vo={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},Fc={lift:{y:-2,transition:vo.smooth},scale:{scale:1.05,transition:vo.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:vo.smooth},rotate:{rotate:2,transition:vo.bouncy}},BS={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},zse={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:vo.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:vo.smooth}},Wse={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:vo.smooth}}},qse={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:vo.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:vo.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:vo.smooth}},HS={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var $se={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:vo.bouncy};var US=Q("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-card dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{md:"",sm:"",lg:"",xl:"",default:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"md",radius:"default"}}),hm={sm:"p-4",md:"p-6",lg:"p-8",xl:"p-10"},jn=ue("md"),u2=e=>e&&e!=="default"?e:"md",vm=C(({className:e,variant:t,size:o,radius:r,interactive:a,asChild:n=!1,microInteraction:s="lift",...i},l)=>{let u=u2(o),c=L("moonui-theme",US({variant:t,size:o,radius:r,interactive:a,className:e}));if(n)return d(jn.Provider,{value:u,children:d(du,{ref:l,className:c,...i})});if(a&&s!=="none"){let f={whileHover:s==="scale"?Fc.scale:s==="glow"?Fc.glow:Fc.lift,whileTap:BS.scale};return d(jn.Provider,{value:u,children:d(_e.div,{ref:l,className:c,...f,...i})})}return d(jn.Provider,{value:u,children:d("div",{ref:l,className:c,...i})})});vm.displayName="Card";var xm=C(({className:e,...t},o)=>{let r=hm[re(jn)];return d("div",{ref:o,className:L("moonui-theme","flex flex-col space-y-1.5",r,e),...t})});xm.displayName="CardHeader";var ym=C(({className:e,as:t="h3",...o},r)=>d(t,{ref:r,className:L("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...o}));ym.displayName="CardTitle";var bm=C(({className:e,...t},o)=>d("p",{ref:o,className:L("moonui-theme","text-sm text-muted-foreground",e),...t}));bm.displayName="CardDescription";var Cm=C(({className:e,...t},o)=>{let r=hm[re(jn)];return d("div",{ref:o,className:L("moonui-theme",r,"pt-0",e),...t})});Cm.displayName="CardContent";var wm=C(({className:e,...t},o)=>{let r=hm[re(jn)];return d("div",{ref:o,className:L("moonui-theme","flex items-center",r,"pt-0",e),...t})});wm.displayName="CardFooter";N();function we(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function pt(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function _c(e,t){let o=we(e);if(isNaN(t))return pt(e,NaN);if(!t)return o;let r=o.getDate(),a=pt(e,o.getTime());a.setMonth(o.getMonth()+t+1,0);let n=a.getDate();return r>=n?a:(o.setFullYear(a.getFullYear(),a.getMonth(),r),o)}var c2=Math.pow(10,8)*24*60*60*1e3,iie=-c2,Vc=6048e5,GS=864e5;var d2=3600;var zS=d2*24,lie=zS*7,f2=zS*365.2425,p2=f2/12,uie=p2*3;var m2={};function Bo(){return m2}function xo(e,t){let o=Bo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=we(e),n=a.getDay(),s=(n<r?7:0)+n-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Aa(e){return xo(e,{weekStartsOn:1})}function Bc(e){let t=we(e),o=t.getFullYear(),r=pt(e,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);let a=Aa(r),n=pt(e,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);let s=Aa(n);return t.getTime()>=a.getTime()?o+1:t.getTime()>=s.getTime()?o:o-1}function Kn(e){let t=we(e);return t.setHours(0,0,0,0),t}function Sm(e){let t=we(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function WS(e,t){let o=Kn(e),r=Kn(t),a=+o-Sm(o),n=+r-Sm(r);return Math.round((a-n)/GS)}function qS(e){let t=Bc(e),o=pt(e,0);return o.setFullYear(t,0,4),o.setHours(0,0,0,0),Aa(o)}function $S(e){return pt(e,Date.now())}function Da(e,t){let o=Kn(e),r=Kn(t);return+o==+r}function jS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hc(e){if(!jS(e)&&typeof e!="number")return!1;let t=we(e);return!isNaN(Number(t))}function KS(e){let t=we(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function Uc(e,t){let o=we(e.start),r=we(e.end),a=+o>+r,n=a?+o:+r,s=a?r:o;s.setHours(0,0,0,0);let i=t?.step??1;if(!i)return[];i<0&&(i=-i,a=!a);let l=[];for(;+s<=n;)l.push(we(s)),s.setDate(s.getDate()+i),s.setHours(0,0,0,0);return a?l.reverse():l}function XS(e){let t=we(e);return t.setDate(1),t.setHours(0,0,0,0),t}function YS(e){let t=we(e),o=pt(e,0);return o.setFullYear(t.getFullYear(),0,1),o.setHours(0,0,0,0),o}function ZS(e,t){let o=Bo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=we(e),n=a.getDay(),s=(n<r?-7:0)+6-(n-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}var g2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},QS=(e,t,o)=>{let r,a=g2[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function Gc(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var h2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},v2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},JS={date:Gc({formats:h2,defaultWidth:"full"}),time:Gc({formats:v2,defaultWidth:"full"}),dateTime:Gc({formats:x2,defaultWidth:"full"})};var y2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eR=(e,t,o,r)=>y2[e];function Xn(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",a;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,i=o?.width?String(o.width):s;a=e.formattingValues[i]||e.formattingValues[s]}else{let s=e.defaultWidth,i=o?.width?String(o.width):e.defaultWidth;a=e.values[i]||e.values[s]}let n=e.argumentCallback?e.argumentCallback(t):t;return a[n]}}var b2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},C2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},w2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},S2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},R2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},I2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P2=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},tR={ordinalNumber:P2,era:Xn({values:b2,defaultWidth:"wide"}),quarter:Xn({values:C2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xn({values:w2,defaultWidth:"wide"}),day:Xn({values:S2,defaultWidth:"wide"}),dayPeriod:Xn({values:R2,defaultWidth:"wide",formattingValues:I2,defaultFormattingWidth:"wide"})};function Yn(e){return(t,o={})=>{let r=o.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],n=t.match(a);if(!n)return null;let s=n[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?T2(i,f=>f.test(s)):L2(i,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let c=t.slice(s.length);return{value:u,rest:c}}}function L2(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function T2(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function oR(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let a=r[0],n=t.match(e.parsePattern);if(!n)return null;let s=e.valueCallback?e.valueCallback(n[0]):n[0];s=o.valueCallback?o.valueCallback(s):s;let i=t.slice(a.length);return{value:s,rest:i}}}var M2=/^(\d+)(th|st|nd|rd)?/i,k2=/\d+/i,E2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},A2={any:[/^b/i,/^(a|c)/i]},D2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},N2={any:[/1/i,/2/i,/3/i,/4/i]},O2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},F2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},V2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},B2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},H2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rR={ordinalNumber:oR({matchPattern:M2,parsePattern:k2,valueCallback:e=>parseInt(e,10)}),era:Yn({matchPatterns:E2,defaultMatchWidth:"wide",parsePatterns:A2,defaultParseWidth:"any"}),quarter:Yn({matchPatterns:D2,defaultMatchWidth:"wide",parsePatterns:N2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Yn({matchPatterns:O2,defaultMatchWidth:"wide",parsePatterns:F2,defaultParseWidth:"any"}),day:Yn({matchPatterns:_2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),dayPeriod:Yn({matchPatterns:B2,defaultMatchWidth:"any",parsePatterns:H2,defaultParseWidth:"any"})};var Rm={code:"en-US",formatDistance:QS,formatLong:JS,formatRelative:eR,localize:tR,match:rR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aR(e){let t=we(e);return WS(t,YS(t))+1}function nR(e){let t=we(e),o=+Aa(t)-+qS(t);return Math.round(o/Vc)+1}function zc(e,t){let o=we(e),r=o.getFullYear(),a=Bo(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=pt(e,0);s.setFullYear(r+1,0,n),s.setHours(0,0,0,0);let i=xo(s,t),l=pt(e,0);l.setFullYear(r,0,n),l.setHours(0,0,0,0);let u=xo(l,t);return o.getTime()>=i.getTime()?r+1:o.getTime()>=u.getTime()?r:r-1}function sR(e,t){let o=Bo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=zc(e,t),n=pt(e,0);return n.setFullYear(a,0,r),n.setHours(0,0,0,0),xo(n,t)}function iR(e,t){let o=we(e),r=+xo(o,t)-+sR(o,t);return Math.round(r/Vc)+1}function Ne(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var lr={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ne(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ne(o+1,2)},d(e,t){return Ne(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,t){return Ne(e.getHours()%12||12,t.length)},H(e,t){return Ne(e.getHours(),t.length)},m(e,t){return Ne(e.getMinutes(),t.length)},s(e,t){return Ne(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,o-3));return Ne(a,t.length)}};var Zn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Im={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),a=r>0?r:1-r;return o.ordinalNumber(a,{unit:"year"})}return lr.y(e,t)},Y:function(e,t,o,r){let a=zc(e,r),n=a>0?a:1-a;if(t==="YY"){let s=n%100;return Ne(s,2)}return t==="Yo"?o.ordinalNumber(n,{unit:"year"}):Ne(n,t.length)},R:function(e,t){let o=Bc(e);return Ne(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ne(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ne(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ne(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return lr.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ne(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let a=iR(e,r);return t==="wo"?o.ordinalNumber(a,{unit:"week"}):Ne(a,t.length)},I:function(e,t,o){let r=nR(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ne(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):lr.d(e,t)},D:function(e,t,o){let r=aR(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ne(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let a=e.getDay(),n=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return Ne(n,2);case"eo":return o.ordinalNumber(n,{unit:"day"});case"eee":return o.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(a,{width:"short",context:"formatting"});case"eeee":default:return o.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let a=e.getDay(),n=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return Ne(n,t.length);case"co":return o.ordinalNumber(n,{unit:"day"});case"ccc":return o.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(a,{width:"narrow",context:"standalone"});case"cccccc":return o.day(a,{width:"short",context:"standalone"});case"cccc":default:return o.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Ne(a,t.length);case"io":return o.ordinalNumber(a,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});case"iiii":default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),a;switch(r===12?a=Zn.noon:r===0?a=Zn.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),a;switch(r>=17?a=Zn.evening:r>=12?a=Zn.afternoon:r>=4?a=Zn.morning:a=Zn.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return lr.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):lr.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):lr.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):lr.s(e,t)},S:function(e,t){return lr.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return uR(r);case"XXXX":case"XX":return Na(r);case"XXXXX":case"XXX":default:return Na(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return uR(r);case"xxxx":case"xx":return Na(r);case"xxxxx":case"xxx":default:return Na(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lR(r,":");case"OOOO":default:return"GMT"+Na(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lR(r,":");case"zzzz":default:return"GMT"+Na(r,":")}},t:function(e,t,o){let r=Math.trunc(e.getTime()/1e3);return Ne(r,t.length)},T:function(e,t,o){let r=e.getTime();return Ne(r,t.length)}};function lR(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),n=r%60;return n===0?o+String(a):o+String(a)+t+Ne(n,2)}function uR(e,t){return e%60===0?(e>0?"-":"+")+Ne(Math.abs(e)/60,2):Na(e,t)}function Na(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=Ne(Math.trunc(r/60),2),n=Ne(r%60,2);return o+a+t+n}var cR=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},dR=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},U2=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],a=o[2];if(!a)return cR(e,t);let n;switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",cR(r,t)).replace("{{time}}",dR(a,t))},fR={p:dR,P:U2};var G2=/^D+$/,z2=/^Y+$/,W2=["D","DD","YY","YYYY"];function pR(e){return G2.test(e)}function mR(e){return z2.test(e)}function gR(e,t,o){let r=q2(e,t,o);if(console.warn(r),W2.includes(e))throw new RangeError(r)}function q2(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var $2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,j2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,K2=/^'([^]*?)'?$/,X2=/''/g,Y2=/[a-zA-Z]/;function Kt(e,t,o){let r=Bo(),a=o?.locale??r.locale??Rm,n=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=we(e);if(!Hc(i))throw new RangeError("Invalid time value");let l=t.match(j2).map(c=>{let f=c[0];if(f==="p"||f==="P"){let p=fR[f];return p(c,a.formatLong)}return c}).join("").match($2).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let f=c[0];if(f==="'")return{isToken:!1,value:Z2(c)};if(Im[f])return{isToken:!0,value:c};if(f.match(Y2))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});a.localize.preprocessor&&(l=a.localize.preprocessor(i,l));let u={firstWeekContainsDate:n,weekStartsOn:s,locale:a};return l.map(c=>{if(!c.isToken)return c.value;let f=c.value;(!o?.useAdditionalWeekYearTokens&&mR(f)||!o?.useAdditionalDayOfYearTokens&&pR(f))&&gR(f,t,String(e));let p=Im[f[0]];return p(i,f,a.localize,u)}).join("")}function Z2(e){let t=e.match(K2);return t?t[1].replace(X2,"'"):e}function Pm(e){return we(e).getDay()}function hR(e,t){let o=we(e),r=we(t);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function vR(e){return Da(e,$S(e))}function xR(e,t){return _c(e,-t)}function Qn({mode:e="single",selected:t,onSelect:o,disabled:r,showOutsideDays:a=!1,className:n,classNames:s,numberOfMonths:i=1,defaultMonth:l,...u}){let[c,f]=k(l||t&&t||new Date),p=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],m=()=>{f(xR(c,1))},h=()=>{f(_c(c,1))},g=I=>{if(!r?.(I)){if(e==="single")o?.(I);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?o?.({from:I,to:void 0}):I<S.from?o?.({from:I,to:S.from}):o?.({from:S.from,to:I})}}},v=I=>{if(!t)return!1;if(e==="single")return Da(I,t);if(e==="range"){let S=t;return S.from&&S.to?I>=S.from&&I<=S.to:S.from?Da(I,S.from):!1}return!1},x=I=>{if(e!=="range"||!t)return!1;let S=t;return S.from?Da(I,S.from):!1},y=I=>{if(e!=="range"||!t)return!1;let S=t;return S.to?Da(I,S.to):!1},b=I=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:I>S.from&&I<S.to},w=(()=>{let I=XS(c),S=KS(c),T=Uc({start:I,end:S}),M=Pm(I),A=[];if(M>0&&a){let F=xo(I),$=new Date(I);$.setDate($.getDate()-1),A.push(...Uc({start:F,end:$}))}let O=Pm(S),V=[];if(O<6&&a){let F=new Date(S);F.setDate(F.getDate()+1);let $=ZS(S);V.push(...Uc({start:F,end:$}))}let q=[];if(!a&&M>0)for(let F=0;F<M;F++)q.push(null);return[...A,...q,...T,...V]})();return P("div",{className:L("moonui-theme","p-0",n),children:[P("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[d("button",{onClick:m,className:L("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:d(uo,{className:"h-5 w-5"})}),d("h2",{className:"text-base font-medium",children:Kt(c,"MMMM yyyy")}),d("button",{onClick:h,className:L("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:d(Rt,{className:"h-5 w-5"})})]}),P("div",{className:"px-6 pb-4",children:[d("div",{className:"grid grid-cols-7 mb-2",children:p.map((I,S)=>d("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:I.full,children:I.short},`weekday-${S}`))}),d("div",{className:"grid grid-cols-7 gap-1",children:w.map((I,S)=>{if(!I)return d("div",{className:"h-10 w-10"},`empty-${S}`);let T=!hR(I,c),M=r?.(I)||!1,A=v(I),O=vR(I),V=x(I),q=y(I),F=b(I);return d("button",{onClick:()=>g(I),disabled:M,className:L("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",T&&"text-muted-foreground/50",M&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",A&&!F&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",O&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",F&&"bg-accent/30 text-accent-foreground rounded-none",V&&"rounded-r-none",q&&"rounded-l-none"),type:"button",children:Kt(I,"d")},I.toISOString())})})]})]})}Qn.displayName="Calendar";N();var Q2=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[o,r]of Object.entries(t))if(r.test(e))return o;return"unknown"},yR=(e,t)=>{let o=e.replace(/\s+/g,""),r=t==="amex"?[4,6,5]:[4,4,4,4],a="",n=0;for(let s of r){if(n>=o.length)break;a&&(a+=" "),a+=o.slice(n,n+s),n+=s}return a},Lm=C(({className:e,value:t="",onChange:o,showIcon:r=!0,size:a,...n},s)=>{let[i,l]=k("unknown"),u=c=>{let f=c.target.value.replace(/\D/g,""),p=Q2(f);l(p);let m=p==="amex"?15:16,h=f.slice(0,m),g=yR(h,p);o?.(h,p),c.target.value=g};return P("div",{className:"relative",children:[d(mt,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:yR(t,i),onChange:u,className:L(r&&"pl-10",e),...n}),r&&d($s,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});Lm.displayName="CardNumberInput";var Tm=C(({className:e,value:t="",onChange:o,size:r,...a},n)=>{let s=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let f=parseInt(u.slice(0,2));f>12?u="12"+u.slice(2):f===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),o?.(u),l.target.value=c},i=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return d(mt,{ref:n,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:i,onChange:s,className:e,...a})});Tm.displayName="CardExpiryInput";var Mm=C(({className:e,value:t="",onChange:o,cardType:r="unknown",size:a,...n},s)=>{let i=r==="amex"?4:3;return d(mt,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:r==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,i);o?.(c)},maxLength:i,className:e,...n})});Mm.displayName="CardCVCInput";var km=C(({className:e,value:t="",onChange:o,format:r="US",size:a,...n},s)=>{let i=u=>{let c=u.target.value;switch(r){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}o?.(c.replace(/\s/g,"")),u.target.value=c};return d(mt,{ref:s,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(r){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:i,className:e,...n})});km.displayName="CardZipInput";N();N();function J2(e){return Object.prototype.toString.call(e)==="[object Object]"}function bR(e){return J2(e)||Array.isArray(e)}function wR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Wc(e,t){let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;let a=JSON.stringify(Object.keys(e.breakpoints||{})),n=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==n?!1:o.every(s=>{let i=e[s],l=t[s];return typeof i=="function"?`${i}`==`${l}`:!bR(i)||!bR(l)?i===l:Wc(i,l)})}function CR(e){return e.concat().sort((t,o)=>t.name>o.name?1:-1).map(t=>t.options)}function SR(e,t){if(e.length!==t.length)return!1;let o=CR(e),r=CR(t);return o.every((a,n)=>{let s=r[n];return Wc(a,s)})}function Dm(e){return typeof e=="number"}function Em(e){return typeof e=="string"}function qc(e){return typeof e=="boolean"}function RR(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xe(e){return Math.abs(e)}function Nm(e){return Math.sign(e)}function il(e,t){return Xe(e-t)}function eF(e,t){if(e===0||t===0||Xe(e)<=Xe(t))return 0;let o=il(Xe(e),Xe(t));return Xe(o/e)}function tF(e){return Math.round(e*100)/100}function ll(e){return ul(e).map(Number)}function yo(e){return e[dl(e)]}function dl(e){return Math.max(0,e.length-1)}function Om(e,t){return t===dl(e)}function IR(e,t=0){return Array.from(Array(e),(o,r)=>t+r)}function ul(e){return Object.keys(e)}function PR(e,t){return[e,t].reduce((o,r)=>(ul(r).forEach(a=>{let n=o[a],s=r[a],i=RR(n)&&RR(s);o[a]=i?PR(n,s):s}),o),{})}function Am(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function oF(e,t){let o={start:r,center:a,end:n};function r(){return 0}function a(l){return n(l)/2}function n(l){return t-l}function s(l,u){return Em(e)?o[e](l):e(t,l,u)}return{measure:s}}function cl(){let e=[];function t(a,n,s,i={passive:!0}){let l;if("addEventListener"in a)a.addEventListener(n,s,i),l=()=>a.removeEventListener(n,s,i);else{let u=a;u.addListener(s),l=()=>u.removeListener(s)}return e.push(l),r}function o(){e=e.filter(a=>a())}let r={add:t,clear:o};return r}function rF(e,t,o,r){let a=cl(),n=1e3/60,s=null,i=0,l=0;function u(){a.add(e,"visibilitychange",()=>{e.hidden&&h()})}function c(){m(),a.clear()}function f(v){if(!l)return;s||(s=v,o(),o());let x=v-s;for(s=v,i+=x;i>=n;)o(),i-=n;let y=i/n;r(y),l&&(l=t.requestAnimationFrame(f))}function p(){l||(l=t.requestAnimationFrame(f))}function m(){t.cancelAnimationFrame(l),s=null,i=0,l=0}function h(){s=null,i=0}return{init:u,destroy:c,start:p,stop:m,update:o,render:r}}function aF(e,t){let o=t==="rtl",r=e==="y",a=r?"y":"x",n=r?"x":"y",s=!r&&o?-1:1,i=c(),l=f();function u(h){let{height:g,width:v}=h;return r?g:v}function c(){return r?"top":o?"right":"left"}function f(){return r?"bottom":o?"left":"right"}function p(h){return h*s}return{scroll:a,cross:n,startEdge:i,endEdge:l,measureSize:u,direction:p}}function Oa(e=0,t=0){let o=Xe(e-t);function r(u){return u<e}function a(u){return u>t}function n(u){return r(u)||a(u)}function s(u){return n(u)?r(u)?e:t:u}function i(u){return o?u-o*Math.ceil((u-t)/o):u}return{length:o,max:t,min:e,constrain:s,reachedAny:n,reachedMax:a,reachedMin:r,removeOffset:i}}function LR(e,t,o){let{constrain:r}=Oa(0,e),a=e+1,n=s(t);function s(p){return o?Xe((a+p)%a):r(p)}function i(){return n}function l(p){return n=s(p),f}function u(p){return c().set(i()+p)}function c(){return LR(e,i(),o)}let f={get:i,set:l,add:u,clone:c};return f}function nF(e,t,o,r,a,n,s,i,l,u,c,f,p,m,h,g,v,x,y){let{cross:b,direction:R}=e,w=["INPUT","SELECT","TEXTAREA"],I={passive:!1},S=cl(),T=cl(),M=Oa(50,225).constrain(m.measure(20)),A={mouse:300,touch:400},O={mouse:500,touch:600},V=h?43:25,q=!1,F=0,$=0,U=!1,G=!1,z=!1,_=!1;function ae(J){if(!y)return;function ye(le){(qc(y)||y(J,le))&&de(le)}let oe=t;S.add(oe,"dragstart",le=>le.preventDefault(),I).add(oe,"touchmove",()=>{},I).add(oe,"touchend",()=>{}).add(oe,"touchstart",ye).add(oe,"mousedown",ye).add(oe,"touchcancel",se).add(oe,"contextmenu",se).add(oe,"click",ve,!0)}function ie(){S.clear(),T.clear()}function W(){let J=_?o:t;T.add(J,"touchmove",K,I).add(J,"touchend",se).add(J,"mousemove",K,I).add(J,"mouseup",se)}function te(J){let ye=J.nodeName||"";return w.includes(ye)}function ne(){return(h?O:A)[_?"mouse":"touch"]}function ee(J,ye){let oe=f.add(Nm(J)*-1),le=c.byDistance(J,!h).distance;return h||Xe(J)<M?le:v&&ye?le*.5:c.byIndex(oe.get(),0).distance}function de(J){let ye=Am(J,r);_=ye,z=h&&ye&&!J.buttons&&q,q=il(a.get(),s.get())>=2,!(ye&&J.button!==0)&&(te(J.target)||(U=!0,n.pointerDown(J),u.useFriction(0).useDuration(0),a.set(s),W(),F=n.readPoint(J),$=n.readPoint(J,b),p.emit("pointerDown")))}function K(J){if(!Am(J,r)&&J.touches.length>=2)return se(J);let oe=n.readPoint(J),le=n.readPoint(J,b),Oe=il(oe,F),Ue=il(le,$);if(!G&&!_&&(!J.cancelable||(G=Oe>Ue,!G)))return se(J);let tt=n.pointerMove(J);Oe>g&&(z=!0),u.useFriction(.3).useDuration(.75),i.start(),a.add(R(tt)),J.preventDefault()}function se(J){let oe=c.byDistance(0,!1).index!==f.get(),le=n.pointerUp(J)*ne(),Oe=ee(R(le),oe),Ue=eF(le,Oe),tt=V-10*Ue,Me=x+Ue/50;G=!1,U=!1,T.clear(),u.useDuration(tt).useFriction(Me),l.distance(Oe,!h),_=!1,p.emit("pointerUp")}function ve(J){z&&(J.stopPropagation(),J.preventDefault(),z=!1)}function xe(){return U}return{init:ae,destroy:ie,pointerDown:xe}}function sF(e,t){let r,a;function n(f){return f.timeStamp}function s(f,p){let h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Am(f,t)?f:f.touches[0])[h]}function i(f){return r=f,a=f,s(f)}function l(f){let p=s(f)-s(a),m=n(f)-n(r)>170;return a=f,m&&(r=f),p}function u(f){if(!r||!a)return 0;let p=s(a)-s(r),m=n(f)-n(r),h=n(f)-n(a)>170,g=p/m;return m&&!h&&Xe(g)>.1?g:0}return{pointerDown:i,pointerMove:l,pointerUp:u,readPoint:s}}function iF(){function e(o){let{offsetTop:r,offsetLeft:a,offsetWidth:n,offsetHeight:s}=o;return{top:r,right:a+n,bottom:r+s,left:a,width:n,height:s}}return{measure:e}}function lF(e){function t(r){return e*(r/100)}return{measure:t}}function uF(e,t,o,r,a,n,s){let i=[e].concat(r),l,u,c=[],f=!1;function p(v){return a.measureSize(s.measure(v))}function m(v){if(!n)return;u=p(e),c=r.map(p);function x(y){for(let b of y){if(f)return;let R=b.target===e,w=r.indexOf(b.target),I=R?u:c[w],S=p(R?e:r[w]);if(Xe(S-I)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(y=>{(qc(n)||n(v,y))&&x(y)}),o.requestAnimationFrame(()=>{i.forEach(y=>l.observe(y))})}function h(){f=!0,l&&l.disconnect()}return{init:m,destroy:h}}function cF(e,t,o,r,a,n){let s=0,i=0,l=a,u=n,c=e.get(),f=0;function p(){let I=r.get()-e.get(),S=!l,T=0;return S?(s=0,o.set(r),e.set(r),T=I):(o.set(e),s+=I/l,s*=u,c+=s,e.add(s),T=c-f),i=Nm(T),f=c,w}function m(){let I=r.get()-t.get();return Xe(I)<.001}function h(){return l}function g(){return i}function v(){return s}function x(){return b(a)}function y(){return R(n)}function b(I){return l=I,w}function R(I){return u=I,w}let w={direction:g,duration:h,velocity:v,seek:p,settled:m,useBaseFriction:y,useBaseDuration:x,useFriction:R,useDuration:b};return w}function dF(e,t,o,r,a){let n=a.measure(10),s=a.measure(50),i=Oa(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(o.get())||!e.reachedAny(t.get()))}function c(m){if(!u())return;let h=e.reachedMin(t.get())?"min":"max",g=Xe(e[h]-t.get()),v=o.get()-t.get(),x=i.constrain(g/s);o.subtract(v*x),!m&&Xe(v)<n&&(o.set(e.constrain(o.get())),r.useDuration(25).useBaseFriction())}function f(m){l=!m}return{shouldConstrain:u,constrain:c,toggleActive:f}}function fF(e,t,o,r,a){let n=Oa(-t+e,0),s=f(),i=c(),l=p();function u(h,g){return il(h,g)<=1}function c(){let h=s[0],g=yo(s),v=s.lastIndexOf(h),x=s.indexOf(g)+1;return Oa(v,x)}function f(){return o.map((h,g)=>{let{min:v,max:x}=n,y=n.constrain(h),b=!g,R=Om(o,g);return b?x:R||u(v,y)?v:u(x,y)?x:y}).map(h=>parseFloat(h.toFixed(3)))}function p(){if(t<=e+a)return[n.max];if(r==="keepSnaps")return s;let{min:h,max:g}=i;return s.slice(h,g)}return{snapsContained:l,scrollContainLimit:i}}function pF(e,t,o){let r=t[0],a=o?r-e:yo(t);return{limit:Oa(a,r)}}function mF(e,t,o,r){let n=t.min+.1,s=t.max+.1,{reachedMin:i,reachedMax:l}=Oa(n,s);function u(p){return p===1?l(o.get()):p===-1?i(o.get()):!1}function c(p){if(!u(p))return;let m=e*(p*-1);r.forEach(h=>h.add(m))}return{loop:c}}function gF(e){let{max:t,length:o}=e;function r(n){let s=n-t;return o?s/-o:0}return{get:r}}function hF(e,t,o,r,a){let{startEdge:n,endEdge:s}=e,{groupSlides:i}=a,l=f().map(t.measure),u=p(),c=m();function f(){return i(r).map(g=>yo(g)[s]-g[0][n]).map(Xe)}function p(){return r.map(g=>o[n]-g[n]).map(g=>-Xe(g))}function m(){return i(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function vF(e,t,o,r,a,n){let{groupSlides:s}=a,{min:i,max:l}=r,u=c();function c(){let p=s(n),m=!e||t==="keepSnaps";return o.length===1?[n]:m?p:p.slice(i,l).map((h,g,v)=>{let x=!g,y=Om(v,g);if(x){let b=yo(v[0])+1;return IR(b)}if(y){let b=dl(n)-yo(v)[0]+1;return IR(b,yo(v)[0])}return h})}return{slideRegistry:u}}function xF(e,t,o,r,a){let{reachedAny:n,removeOffset:s,constrain:i}=r;function l(h){return h.concat().sort((g,v)=>Xe(g)-Xe(v))[0]}function u(h){let g=e?s(h):i(h),v=t.map((y,b)=>({diff:c(y-g,0),index:b})).sort((y,b)=>Xe(y.diff)-Xe(b.diff)),{index:x}=v[0];return{index:x,distance:g}}function c(h,g){let v=[h,h+o,h-o];if(!e)return h;if(!g)return l(v);let x=v.filter(y=>Nm(y)===g);return x.length?l(x):yo(v)-o}function f(h,g){let v=t[h]-a.get(),x=c(v,g);return{index:h,distance:x}}function p(h,g){let v=a.get()+h,{index:x,distance:y}=u(v),b=!e&&n(v);if(!g||b)return{index:x,distance:h};let R=t[x]-y,w=h+c(R,0);return{index:x,distance:w}}return{byDistance:p,byIndex:f,shortcut:c}}function yF(e,t,o,r,a,n,s){function i(f){let p=f.distance,m=f.index!==t.get();n.add(p),p&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(o.set(t.get()),t.set(f.index),s.emit("select"))}function l(f,p){let m=a.byDistance(f,p);i(m)}function u(f,p){let m=t.clone().set(f),h=a.byIndex(m.get(),p);i(h)}return{distance:l,index:u}}function bF(e,t,o,r,a,n,s,i){let l={passive:!0,capture:!0},u=0;function c(m){if(!i)return;function h(g){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;let y=o.findIndex(b=>b.includes(g));Dm(y)&&(a.useDuration(0),r.index(y,0),s.emit("slideFocus"))}n.add(document,"keydown",f,!1),t.forEach((g,v)=>{n.add(g,"focus",x=>{(qc(i)||i(m,x))&&h(v)},l)})}function f(m){m.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function sl(e){let t=e;function o(){return t}function r(l){t=s(l)}function a(l){t+=s(l)}function n(l){t-=s(l)}function s(l){return Dm(l)?l:l.get()}return{get:o,set:r,add:a,subtract:n}}function TR(e,t){let o=e.scroll==="x"?s:i,r=t.style,a=null,n=!1;function s(p){return`translate3d(${p}px,0px,0px)`}function i(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(n)return;let m=tF(e.direction(p));m!==a&&(r.transform=o(m),a=m)}function u(p){n=!p}function c(){n||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function CF(e,t,o,r,a,n,s,i,l){let c=ll(a),f=ll(a).reverse(),p=x().concat(y());function m(S,T){return S.reduce((M,A)=>M-a[A],T)}function h(S,T){return S.reduce((M,A)=>m(M,T)>0?M.concat([A]):M,[])}function g(S){return n.map((T,M)=>({start:T-r[M]+.5+S,end:T+t-.5+S}))}function v(S,T,M){let A=g(T);return S.map(O=>{let V=M?0:-o,q=M?o:0,F=M?"end":"start",$=A[O][F];return{index:O,loopPoint:$,slideLocation:sl(-1),translate:TR(e,l[O]),target:()=>i.get()>$?V:q}})}function x(){let S=s[0],T=h(f,S);return v(T,o,!1)}function y(){let S=t-s[0]-1,T=h(c,S);return v(T,-o,!0)}function b(){return p.every(({index:S})=>{let T=c.filter(M=>M!==S);return m(T,t)<=.1})}function R(){p.forEach(S=>{let{target:T,translate:M,slideLocation:A}=S,O=T();O!==A.get()&&(M.to(O),A.set(O))})}function w(){p.forEach(S=>S.translate.clear())}return{canLoop:b,clear:w,loop:R,loopPoints:p}}function wF(e,t,o){let r,a=!1;function n(l){if(!o)return;function u(c){for(let f of c)if(f.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(c=>{a||(qc(o)||o(l,c))&&u(c)}),r.observe(e,{childList:!0})}function s(){r&&r.disconnect(),a=!0}return{init:n,destroy:s}}function SF(e,t,o,r){let a={},n=null,s=null,i,l=!1;function u(){i=new IntersectionObserver(h=>{l||(h.forEach(g=>{let v=t.indexOf(g.target);a[v]=g}),n=null,s=null,o.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(h=>i.observe(h))}function c(){i&&i.disconnect(),l=!0}function f(h){return ul(a).reduce((g,v)=>{let x=parseInt(v),{isIntersecting:y}=a[x];return(h&&y||!h&&!y)&&g.push(x),g},[])}function p(h=!0){if(h&&n)return n;if(!h&&s)return s;let g=f(h);return h&&(n=g),h||(s=g),g}return{init:u,destroy:c,get:p}}function RF(e,t,o,r,a,n){let{measureSize:s,startEdge:i,endEdge:l}=e,u=o[0]&&a,c=h(),f=g(),p=o.map(s),m=v();function h(){if(!u)return 0;let y=o[0];return Xe(t[i]-y[i])}function g(){if(!u)return 0;let y=n.getComputedStyle(yo(r));return parseFloat(y.getPropertyValue(`margin-${l}`))}function v(){return o.map((y,b,R)=>{let w=!b,I=Om(R,b);return w?p[b]+c:I?p[b]+f:R[b+1][i]-y[i]}).map(Xe)}return{slideSizes:p,slideSizesWithGaps:m,startGap:c,endGap:f}}function IF(e,t,o,r,a,n,s,i,l){let{startEdge:u,endEdge:c,direction:f}=e,p=Dm(o);function m(x,y){return ll(x).filter(b=>b%y===0).map(b=>x.slice(b,b+y))}function h(x){return x.length?ll(x).reduce((y,b,R)=>{let w=yo(y)||0,I=w===0,S=b===dl(x),T=a[u]-n[w][u],M=a[u]-n[b][c],A=!r&&I?f(s):0,O=!r&&S?f(i):0,V=Xe(M-O-(T+A));return R&&V>t+l&&y.push(b),S&&y.push(x.length),y},[]).map((y,b,R)=>{let w=Math.max(R[b-1]||0);return x.slice(w,y)}):[]}function g(x){return p?m(x,o):h(x)}return{groupSlides:g}}function PF(e,t,o,r,a,n,s){let{align:i,axis:l,direction:u,startIndex:c,loop:f,duration:p,dragFree:m,dragThreshold:h,inViewThreshold:g,slidesToScroll:v,skipSnaps:x,containScroll:y,watchResize:b,watchSlides:R,watchDrag:w,watchFocus:I}=n,S=2,T=iF(),M=T.measure(t),A=o.map(T.measure),O=aF(l,u),V=O.measureSize(M),q=lF(V),F=oF(i,V),$=!f&&!!y,U=f||!!y,{slideSizes:G,slideSizesWithGaps:z,startGap:_,endGap:ae}=RF(O,M,A,o,U,a),ie=IF(O,V,v,f,M,A,_,ae,S),{snaps:W,snapsAligned:te}=hF(O,F,M,A,ie),ne=-yo(W)+yo(z),{snapsContained:ee,scrollContainLimit:de}=fF(V,ne,te,y,S),K=$?ee:te,{limit:se}=pF(ne,K,f),ve=LR(dl(K),c,f),xe=ve.clone(),me=ll(o),J=({dragHandler:yr,scrollBody:Ts,scrollBounds:Ms,options:{loop:Wt}})=>{Wt||Ms.constrain(yr.pointerDown()),Ts.seek()},ye=({scrollBody:yr,translate:Ts,location:Ms,offsetLocation:Wt,previousLocation:ks,scrollLooper:Rf,slideLooper:FE,dragHandler:_E,animation:VE,eventHandler:py,scrollBounds:BE,options:{loop:my}},gy)=>{let hy=yr.settled(),HE=!BE.shouldConstrain(),vy=my?hy:hy&&HE,xy=vy&&!_E.pointerDown();xy&&VE.stop();let UE=Ms.get()*gy+ks.get()*(1-gy);Wt.set(UE),my&&(Rf.loop(yr.direction()),FE.loop()),Ts.to(Wt.get()),xy&&py.emit("settle"),vy||py.emit("scroll")},oe=rF(r,a,()=>J(rn),yr=>ye(rn,yr)),le=.68,Oe=K[ve.get()],Ue=sl(Oe),tt=sl(Oe),Me=sl(Oe),Qe=sl(Oe),To=cF(Ue,Me,tt,Qe,p,le),St=xF(f,K,ne,se,Qe),so=yF(oe,ve,xe,To,St,Qe,s),zt=gF(se),io=cl(),Mo=SF(t,o,s,g),{slideRegistry:ko}=vF($,y,K,de,ie,me),lu=bF(e,o,ko,so,To,io,s,I),rn={ownerDocument:r,ownerWindow:a,eventHandler:s,containerRect:M,slideRects:A,animation:oe,axis:O,dragHandler:nF(O,e,r,a,Qe,sF(O,a),Ue,oe,so,To,St,ve,s,q,m,h,x,le,w),eventStore:io,percentOfView:q,index:ve,indexPrevious:xe,limit:se,location:Ue,offsetLocation:Me,previousLocation:tt,options:n,resizeHandler:uF(t,s,a,o,O,b,T),scrollBody:To,scrollBounds:dF(se,Me,Qe,To,q),scrollLooper:mF(ne,se,Me,[Ue,Me,tt,Qe]),scrollProgress:zt,scrollSnapList:K.map(zt.get),scrollSnaps:K,scrollTarget:St,scrollTo:so,slideLooper:CF(O,V,ne,G,z,W,K,Me,o),slideFocus:lu,slidesHandler:wF(t,s,R),slidesInView:Mo,slideIndexes:me,slideRegistry:ko,slidesToScroll:ie,target:Qe,translate:TR(O,t)};return rn}function LF(){let e={},t;function o(u){t=u}function r(u){return e[u]||[]}function a(u){return r(u).forEach(c=>c(t,u)),l}function n(u,c){return e[u]=r(u).concat([c]),l}function s(u,c){return e[u]=r(u).filter(f=>f!==c),l}function i(){e={}}let l={init:o,emit:a,off:s,on:n,clear:i};return l}var TF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function MF(e){function t(n,s){return PR(n,s||{})}function o(n){let s=n.breakpoints||{},i=ul(s).filter(l=>e.matchMedia(l).matches).map(l=>s[l]).reduce((l,u)=>t(l,u),{});return t(n,i)}function r(n){return n.map(s=>ul(s.breakpoints||{})).reduce((s,i)=>s.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:o,optionsMediaQueries:r}}function kF(e){let t=[];function o(n,s){return t=s.filter(({options:i})=>e.optionsAtMedia(i).active!==!1),t.forEach(i=>i.init(n,e)),s.reduce((i,l)=>Object.assign(i,{[l.name]:l}),{})}function r(){t=t.filter(n=>n.destroy())}return{init:o,destroy:r}}function fl(e,t,o){let r=e.ownerDocument,a=r.defaultView,n=MF(a),s=kF(n),i=cl(),l=LF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:f}=n,{on:p,off:m,emit:h}=l,g=O,v=!1,x,y=u(TF,fl.globalOptions),b=u(y),R=[],w,I,S;function T(){let{container:me,slides:J}=b;I=(Em(me)?e.querySelector(me):me)||e.children[0];let oe=Em(J)?I.querySelectorAll(J):J;S=[].slice.call(oe||I.children)}function M(me){let J=PF(e,I,S,r,a,me,l);if(me.loop&&!J.slideLooper.canLoop()){let ye=Object.assign({},me,{loop:!1});return M(ye)}return J}function A(me,J){v||(y=u(y,me),b=c(y),R=J||R,T(),x=M(b),f([y,...R.map(({options:ye})=>ye)]).forEach(ye=>i.add(ye,"change",O)),b.active&&(x.translate.to(x.location.get()),x.animation.init(),x.slidesInView.init(),x.slideFocus.init(xe),x.eventHandler.init(xe),x.resizeHandler.init(xe),x.slidesHandler.init(xe),x.options.loop&&x.slideLooper.loop(),I.offsetParent&&S.length&&x.dragHandler.init(xe),w=s.init(xe,R)))}function O(me,J){let ye=ie();V(),A(u({startIndex:ye},me),J),l.emit("reInit")}function V(){x.dragHandler.destroy(),x.eventStore.clear(),x.translate.clear(),x.slideLooper.clear(),x.resizeHandler.destroy(),x.slidesHandler.destroy(),x.slidesInView.destroy(),x.animation.destroy(),s.destroy(),i.clear()}function q(){v||(v=!0,i.clear(),V(),l.emit("destroy"),l.clear())}function F(me,J,ye){!b.active||v||(x.scrollBody.useBaseFriction().useDuration(J===!0?0:b.duration),x.scrollTo.index(me,ye||0))}function $(me){let J=x.index.add(1).get();F(J,me,-1)}function U(me){let J=x.index.add(-1).get();F(J,me,1)}function G(){return x.index.add(1).get()!==ie()}function z(){return x.index.add(-1).get()!==ie()}function _(){return x.scrollSnapList}function ae(){return x.scrollProgress.get(x.offsetLocation.get())}function ie(){return x.index.get()}function W(){return x.indexPrevious.get()}function te(){return x.slidesInView.get()}function ne(){return x.slidesInView.get(!1)}function ee(){return w}function de(){return x}function K(){return e}function se(){return I}function ve(){return S}let xe={canScrollNext:G,canScrollPrev:z,containerNode:se,internalEngine:de,destroy:q,off:m,on:p,emit:h,plugins:ee,previousScrollSnap:W,reInit:g,rootNode:K,scrollNext:$,scrollPrev:U,scrollProgress:ae,scrollSnapList:_,scrollTo:F,selectedScrollSnap:ie,slideNodes:ve,slidesInView:te,slidesNotInView:ne};return A(t,o),setTimeout(()=>l.emit("init"),0),xe}fl.globalOptions=void 0;function $c(e={},t=[]){let o=E(e),r=E(t),[a,n]=k(),[s,i]=k(),l=H(()=>{a&&a.reInit(o.current,r.current)},[a]);return D(()=>{Wc(o.current,e)||(o.current=e,l())},[e,l]),D(()=>{SR(r.current,t)||(r.current=t,l())},[t,l]),D(()=>{if(wR()&&s){fl.globalOptions=$c.globalOptions;let u=fl(s,o.current,r.current);return n(u),()=>u.destroy()}else n(void 0)},[s,n]),[i,a]}$c.globalOptions=void 0;var MR=ue(null);function Jn(){let e=re(MR);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Fm=C(({orientation:e="horizontal",opts:t,setApi:o,plugins:r,className:a,children:n,...s},i)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=$c({...t,axis:l==="horizontal"?"x":"y"},r),[f,p]=k(!1),[m,h]=k(!1),[g,v]=k({current:0,total:0}),x=H(w=>{w&&(p(w.canScrollPrev()),h(w.canScrollNext()),v({current:w.selectedScrollSnap()+1,total:w.scrollSnapList().length}))},[]),y=H(()=>{c?.scrollPrev()},[c]),b=H(()=>{c?.scrollNext()},[c]),R=H(w=>{let I=l==="horizontal"?"ArrowLeft":"ArrowUp",S=l==="horizontal"?"ArrowRight":"ArrowDown";w.key===I?(w.preventDefault(),y()):w.key===S&&(w.preventDefault(),b())},[l,y,b]);return D(()=>{!c||!o||o(c)},[c,o]),D(()=>{if(c)return x(c),c.on("reInit",x),c.on("select",x),()=>{c.off("reInit",x),c.off("select",x)}},[c,x]),d(MR.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:y,scrollNext:b,canScrollPrev:f,canScrollNext:m,orientation:l},children:P("div",{ref:i,onKeyDownCapture:R,className:L("moonui-theme","relative",a),role:"region","aria-roledescription":"carousel",...s,children:[n,d("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:g.total>0?`Slide ${g.current} of ${g.total}`:""})]})})});Fm.displayName="Carousel";var _m=Q("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),Vm=C(({className:e,...t},o)=>{let{carouselRef:r,orientation:a}=Jn();return d("div",{ref:r,className:"overflow-hidden",children:d("div",{ref:o,className:L(_m({orientation:a}),e),...t})})});Vm.displayName="CarouselContent";var Bm=Q("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),Hm=C(({className:e,...t},o)=>{let{orientation:r}=Jn();return d("div",{ref:o,role:"group","aria-roledescription":"slide",className:L(Bm({orientation:r}),e),...t})});Hm.displayName="CarouselItem";var Um=C(({className:e,variant:t="outline",size:o="icon-sm",...r},a)=>{let{orientation:n,scrollPrev:s,canScrollPrev:i}=Jn();return P(Le,{ref:a,variant:t,size:o,rounded:"full",className:L("absolute",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!i,onClick:s,...r,children:[d(Bs,{className:"h-4 w-4","aria-hidden":"true"}),d("span",{className:"sr-only",children:"Previous slide"})]})});Um.displayName="CarouselPrevious";var Gm=C(({className:e,variant:t="outline",size:o="icon-sm",...r},a)=>{let{orientation:n,scrollNext:s,canScrollNext:i}=Jn();return P(Le,{ref:a,variant:t,size:o,rounded:"full",className:L("absolute",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!i,onClick:s,...r,children:[d(Hs,{className:"h-4 w-4","aria-hidden":"true"}),d("span",{className:"sr-only",children:"Next slide"})]})});Gm.displayName="CarouselNext";N();N();N();function es(e){let t=E({value:e,previous:e});return Z(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}N();function ts(e){let[t,o]=k(void 0);return Ae(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let n=a[0],s,i;if("borderBoxSize"in n){let l=n.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var jc="Checkbox",[EF,tce]=ke(jc),[AF,zm]=EF(jc);function DF(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:a,disabled:n,form:s,name:i,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:f}=e,[p,m]=Be({prop:o,defaultProp:a??!1,onChange:l,caller:jc}),[h,g]=k(null),[v,x]=k(null),y=E(!1),b=h?!!s||!!h.closest("form"):!0,R={checked:p,disabled:n,setChecked:m,control:h,setControl:g,name:i,form:s,value:c,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Vr(a)?!1:a,isFormControl:b,bubbleInput:v,setBubbleInput:x};return d(AF,{scope:t,...R,children:NF(f)?f(R):r})}var kR="CheckboxTrigger",ER=C(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},a)=>{let{control:n,value:s,disabled:i,checked:l,required:u,setControl:c,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:h}=zm(kR,e),g=fe(a,c),v=E(l);return D(()=>{let x=n?.form;if(x){let y=()=>f(v.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[n,f]),d(Y.button,{type:"button",role:"checkbox","aria-checked":Vr(l)?"mixed":l,"aria-required":u,"data-state":OR(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:X(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:X(o,x=>{f(y=>Vr(y)?!0:!y),h&&m&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})})});ER.displayName=kR;var Kc=C((e,t)=>{let{__scopeCheckbox:o,name:r,checked:a,defaultChecked:n,required:s,disabled:i,value:l,onCheckedChange:u,form:c,...f}=e;return d(DF,{__scopeCheckbox:o,checked:a,defaultChecked:n,disabled:i,required:s,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:p})=>P(Ve,{children:[d(ER,{...f,ref:t,__scopeCheckbox:o}),p&&d(NR,{__scopeCheckbox:o})]})})});Kc.displayName=jc;var AR="CheckboxIndicator",Wm=C((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...a}=e,n=zm(AR,o);return d($e,{present:r||Vr(n.checked)||n.checked===!0,children:d(Y.span,{"data-state":OR(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Wm.displayName=AR;var DR="CheckboxBubbleInput",NR=C(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:a,checked:n,defaultChecked:s,required:i,disabled:l,name:u,value:c,form:f,bubbleInput:p,setBubbleInput:m}=zm(DR,e),h=fe(o,m),g=es(n),v=ts(r);D(()=>{let y=p;if(!y)return;let b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set,I=!a.current;if(g!==n&&w){let S=new Event("click",{bubbles:I});y.indeterminate=Vr(n),w.call(y,Vr(n)?!1:n),y.dispatchEvent(S)}},[p,g,n,a]);let x=E(Vr(n)?!1:n);return d(Y.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??x.current,required:i,disabled:l,name:u,value:c,form:f,...t,tabIndex:-1,ref:h,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});NR.displayName=DR;function NF(e){return typeof e=="function"}function Vr(e){return e==="indeterminate"}function OR(e){return Vr(e)?"indeterminate":e?"checked":"unchecked"}var FF=Q("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary"},size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6",default:"h-4 w-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"md",radius:"default",animation:"default"}}),Xc=C(({className:e,variant:t,size:o,radius:r,animation:a,indeterminate:n=!1,icon:s,checked:i,...l},u)=>d(Kc,{ref:u,checked:n?"indeterminate":i,className:L("moonui-theme",FF({variant:t,size:o,radius:r,animation:a}),e),...l,children:d(Wm,{className:L("flex items-center justify-center text-current",a==="bounce"&&"data-[state=checked]:animate-bounce"),children:n?d(oi,{className:"h-[65%] w-[65%]"}):s||d(gt,{className:"h-[65%] w-[65%]"})})}));Xc.displayName=Kc.displayName;var qm=C(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...a},n)=>d("div",{ref:n,className:L("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...a,children:r}));qm.displayName="CheckboxGroup";var pl=C(({className:e,htmlFor:t,children:o,position:r="end",disabled:a=!1,...n},s)=>d("label",{ref:s,htmlFor:t,className:L("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r==="start"?"mr-2":"ml-2",a&&"cursor-not-allowed opacity-70",e),...n,children:o}));pl.displayName="CheckboxLabel";var $m=C(({id:e,label:t,labelPosition:o="end",labelClassName:r,...a},n)=>{let s=qe(),i=e||s;return P("div",{className:"flex items-center",children:[o==="start"&&d(pl,{htmlFor:i,position:"start",disabled:a.disabled,className:r,children:t}),d(Xc,{ref:n,id:i,...a}),o==="end"&&d(pl,{htmlFor:i,position:"end",disabled:a.disabled,className:r,children:t})]})});$m.displayName="CheckboxWithLabel";N();var FR=mu,jm=Q("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",md:"text-sm py-3 px-4",lg:"text-base py-4 px-4",xl:"text-lg py-5 px-5",default:"text-sm py-3 px-4"}},defaultVariants:{variant:"default",size:"md"}}),Km=C(({className:e,children:t,variant:o,size:r,asChild:a,...n},s)=>a?d(nn,{ref:s,className:L("moonui-theme",jm({variant:o,size:r}),e),asChild:a,...n,children:t}):P(nn,{ref:s,className:L("moonui-theme",jm({variant:o,size:r}),e),...n,children:[t,d(Do,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));Km.displayName=nn.displayName;var _R=Q("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg",default:"text-sm"}},defaultVariants:{variant:"default",size:"md"}}),Xm=C(({className:e,children:t,variant:o,size:r,...a},n)=>d(Ns,{ref:n,className:L("moonui-theme",_R({variant:o,size:r}),e),...a,children:d("div",{className:"p-4",children:t})}));Xm.displayName=Ns.displayName;N();N();var _F=Q("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),VF=Q(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-input rounded-md px-3 py-2 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 py-2 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300 dark:bg-transparent"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),mt=C(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:a,isError:n,disabled:s,error:i,success:l,loading:u,leftIcon:c,rightIcon:f,rightButton:p,alwaysShowMessage:m=!1,label:h,floatingLabel:g=!1,floatingLabelClassName:v,value:x,defaultValue:y,onChange:b,onFocus:R,onBlur:w,placeholder:I,...S},T)=>{let M=qe(),A=S.id||M,[O,V]=k(!1),[q,F]=k(x||y||""),U=O||q!==""&&q!==null&&q!==void 0,G=W=>{V(!0),R?.(W)},z=W=>{V(!1),w?.(W)},_=W=>{F(W.target.value),b?.(W)};D(()=>{x!==void 0&&F(x)},[x]);let ae=m||i||l,ie=i?"error":l?"success":"normal";return P("div",{className:"space-y-1.5 w-full",children:[P("div",{className:L("moonui-theme",_F({size:a}),t),children:[g&&h&&d("label",{htmlFor:S.id,className:L("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",U?"top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1":"top-1/2 -translate-y-1/2 text-sm",O&&"text-primary dark:text-primary",!!i&&"text-error",s&&"opacity-50",v),children:h}),c&&d("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?d(rt,{className:"h-4 w-4 animate-spin"}):c}),d("input",{className:L(VF({variant:r,size:a,isError:!!i||n,isSuccess:!!l,isDisabled:s||u,hasLeftIcon:!!c||u,hasRightIcon:!!f,hasRightButton:!!p}),e),ref:T,disabled:s||u,"data-loading":u?"":void 0,"data-error":i?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!i||!!n||void 0,"aria-describedby":i?`${A}-error`:l?`${A}-success`:void 0,value:x,defaultValue:y,onChange:_,onFocus:G,onBlur:z,placeholder:g?U?I:"":I,...S}),f&&!u&&d("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:f}),p&&d("div",{className:"absolute right-3",children:p}),u&&!c&&d("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d(rt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),ae&&d("p",{className:L("text-xs transition-all",ie==="error"&&"text-error",ie==="success"&&"text-success",ie==="normal"&&"text-muted-foreground",o),id:i?`${A}-error`:l?`${A}-success`:void 0,children:i||l||""})]})});mt.displayName="Input";N();N();var BF="Label",VR=C((e,t)=>d(Y.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));VR.displayName=BF;var Ym=VR;var UF=Q("text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Pt=C(({className:e,...t},o)=>d(Ym,{ref:o,className:L(UF(),e),...t}));Pt.displayName=Ym.displayName;N();N();N();N();function BR(e,t=globalThis?.document){let o=ze(e);D(()=>{let r=a=>{a.key==="Escape"&&o(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var GF="DismissableLayer",Zm="dismissableLayer.update",zF="dismissableLayer.pointerDownOutside",WF="dismissableLayer.focusOutside",HR,GR=ue({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xt=C((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:s,onDismiss:i,...l}=e,u=re(GR),[c,f]=k(null),p=c?.ownerDocument??globalThis?.document,[,m]=k({}),h=fe(t,S=>f(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(v),y=c?g.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=x,w=$F(S=>{let T=S.target,M=[...u.branches].some(A=>A.contains(T));!R||M||(a?.(S),s?.(S),S.defaultPrevented||i?.())},p),I=jF(S=>{let T=S.target;[...u.branches].some(A=>A.contains(T))||(n?.(S),s?.(S),S.defaultPrevented||i?.())},p);return BR(S=>{y===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&i&&(S.preventDefault(),i()))},p),D(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(HR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),UR(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=HR)}},[c,p,o,u]),D(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),UR())},[c,u]),D(()=>{let S=()=>m({});return document.addEventListener(Zm,S),()=>document.removeEventListener(Zm,S)},[]),d(Y.div,{...l,ref:h,style:{pointerEvents:b?R?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,I.onFocusCapture),onBlurCapture:X(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,w.onPointerDownCapture)})});Xt.displayName=GF;var qF="DismissableLayerBranch",zR=C((e,t)=>{let o=re(GR),r=E(null),a=fe(t,r);return D(()=>{let n=r.current;if(n)return o.branches.add(n),()=>{o.branches.delete(n)}},[o.branches]),d(Y.div,{...e,ref:a})});zR.displayName=qF;function $F(e,t=globalThis?.document){let o=ze(e),r=E(!1),a=E(()=>{});return D(()=>{let n=i=>{if(i.target&&!r.current){let u=function(){WR(zF,o,c,{discrete:!0})};var l=u;let c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function jF(e,t=globalThis?.document){let o=ze(e),r=E(!1);return D(()=>{let a=n=>{n.target&&!r.current&&WR(WF,o,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function UR(){let e=new CustomEvent(Zm);document.dispatchEvent(e)}function WR(e,t,o,{discrete:r}){let a=o.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),r?an(a,n):a.dispatchEvent(n)}var qR=Xt,$R=zR;N();var Qm=0;function Br(){D(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jR()),document.body.insertAdjacentElement("beforeend",e[1]??jR()),Qm++,()=>{Qm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qm--}},[])}function jR(){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}N();var Jm="focusScope.autoFocusOnMount",eg="focusScope.autoFocusOnUnmount",KR={bubbles:!1,cancelable:!0},XF="FocusScope",ur=C((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...s}=e,[i,l]=k(null),u=ze(a),c=ze(n),f=E(null),p=fe(t,g=>l(g)),m=E({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D(()=>{if(r){let y=function(I){if(m.paused||!i)return;let S=I.target;i.contains(S)?f.current=S:Hr(f.current,{select:!0})},b=function(I){if(m.paused||!i)return;let S=I.relatedTarget;S!==null&&(i.contains(S)||Hr(f.current,{select:!0}))},R=function(I){if(document.activeElement===document.body)for(let T of I)T.removedNodes.length>0&&Hr(i)};var g=y,v=b,x=R;document.addEventListener("focusin",y),document.addEventListener("focusout",b);let w=new MutationObserver(R);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),D(()=>{if(i){YR.add(m);let g=document.activeElement;if(!i.contains(g)){let x=new CustomEvent(Jm,KR);i.addEventListener(Jm,u),i.dispatchEvent(x),x.defaultPrevented||(YF(t_(QR(i)),{select:!0}),document.activeElement===g&&Hr(i))}return()=>{i.removeEventListener(Jm,u),setTimeout(()=>{let x=new CustomEvent(eg,KR);i.addEventListener(eg,c),i.dispatchEvent(x),x.defaultPrevented||Hr(g??document.body,{select:!0}),i.removeEventListener(eg,c),YR.remove(m)},0)}}},[i,u,c,m]);let h=H(g=>{if(!o&&!r||m.paused)return;let v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(v&&x){let y=g.currentTarget,[b,R]=ZF(y);b&&R?!g.shiftKey&&x===R?(g.preventDefault(),o&&Hr(b,{select:!0})):g.shiftKey&&x===b&&(g.preventDefault(),o&&Hr(R,{select:!0})):x===y&&g.preventDefault()}},[o,r,m.paused]);return d(Y.div,{tabIndex:-1,...s,ref:p,onKeyDown:h})});ur.displayName=XF;function YF(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(Hr(r,{select:t}),document.activeElement!==o)return}function ZF(e){let t=QR(e),o=XR(t,e),r=XR(t.reverse(),e);return[o,r]}function QR(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function XR(e,t){for(let o of e)if(!QF(o,{upTo:t}))return o}function QF(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JF(e){return e instanceof HTMLInputElement&&"select"in e}function Hr(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&JF(e)&&t&&e.select()}}var YR=e_();function e_(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=ZR(e,t),e.unshift(t)},remove(t){e=ZR(e,t),e[0]?.resume()}}}function ZR(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function t_(e){return e.filter(t=>t.tagName!=="A")}N();var t0=["top","right","bottom","left"];var Ho=Math.min,Lt=Math.max,gl=Math.round,hl=Math.floor,bo=e=>({x:e,y:e}),o_={left:"right",right:"left",bottom:"top",top:"bottom"},r_={start:"end",end:"start"};function Zc(e,t,o){return Lt(e,Ho(t,o))}function Uo(e,t){return typeof e=="function"?e(t):e}function Go(e){return e.split("-")[0]}function Fa(e){return e.split("-")[1]}function Qc(e){return e==="x"?"y":"x"}function Jc(e){return e==="y"?"height":"width"}var a_=new Set(["top","bottom"]);function Co(e){return a_.has(Go(e))?"y":"x"}function ed(e){return Qc(Co(e))}function o0(e,t,o){o===void 0&&(o=!1);let r=Fa(e),a=ed(e),n=Jc(a),s=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=ml(s)),[s,ml(s)]}function r0(e){let t=ml(e);return[Yc(e),t,Yc(t)]}function Yc(e){return e.replace(/start|end/g,t=>r_[t])}var JR=["left","right"],e0=["right","left"],n_=["top","bottom"],s_=["bottom","top"];function i_(e,t,o){switch(e){case"top":case"bottom":return o?t?e0:JR:t?JR:e0;case"left":case"right":return t?n_:s_;default:return[]}}function a0(e,t,o,r){let a=Fa(e),n=i_(Go(e),o==="start",r);return a&&(n=n.map(s=>s+"-"+a),t&&(n=n.concat(n.map(Yc)))),n}function ml(e){return e.replace(/left|right|bottom|top/g,t=>o_[t])}function l_(e){return{top:0,right:0,bottom:0,left:0,...e}}function tg(e){return typeof e!="number"?l_(e):{top:e,right:e,bottom:e,left:e}}function _a(e){let{x:t,y:o,width:r,height:a}=e;return{width:r,height:a,top:o,left:t,right:t+r,bottom:o+a,x:t,y:o}}function n0(e,t,o){let{reference:r,floating:a}=e,n=Co(t),s=ed(t),i=Jc(s),l=Go(t),u=n==="y",c=r.x+r.width/2-a.width/2,f=r.y+r.height/2-a.height/2,p=r[i]/2-a[i]/2,m;switch(l){case"top":m={x:c,y:r.y-a.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-a.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Fa(t)){case"start":m[s]-=p*(o&&u?-1:1);break;case"end":m[s]+=p*(o&&u?-1:1);break}return m}var l0=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:s}=o,i=n.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:f}=n0(u,r,l),p=r,m={},h=0;for(let g=0;g<i.length;g++){let{name:v,fn:x}=i[g],{x:y,y:b,data:R,reset:w}=await x({x:c,y:f,initialPlacement:r,placement:p,strategy:a,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=y??c,f=b??f,m={...m,[v]:{...m[v],...R}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):w.rects),{x:c,y:f}=n0(u,p,l)),g=-1)}return{x:c,y:f,placement:p,strategy:a,middlewareData:m}};async function os(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Uo(t,e),h=tg(m),v=i[p?f==="floating"?"reference":"floating":f],x=_a(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(v)))==null||o?v:v.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:u,rootBoundary:c,strategy:l})),y=f==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,b=await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),R=await(n.isElement==null?void 0:n.isElement(b))?await(n.getScale==null?void 0:n.getScale(b))||{x:1,y:1}:{x:1,y:1},w=_a(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:b,strategy:l}):y);return{top:(x.top-w.top+h.top)/R.y,bottom:(w.bottom-x.bottom+h.bottom)/R.y,left:(x.left-w.left+h.left)/R.x,right:(w.right-x.right+h.right)/R.x}}var u0=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:a,rects:n,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:c=0}=Uo(e,t)||{};if(u==null)return{};let f=tg(c),p={x:o,y:r},m=ed(a),h=Jc(m),g=await s.getDimensions(u),v=m==="y",x=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",R=n.reference[h]+n.reference[m]-p[m]-n.floating[h],w=p[m]-n.reference[m],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),S=I?I[b]:0;(!S||!await(s.isElement==null?void 0:s.isElement(I)))&&(S=i.floating[b]||n.floating[h]);let T=R/2-w/2,M=S/2-g[h]/2-1,A=Ho(f[x],M),O=Ho(f[y],M),V=A,q=S-g[h]-O,F=S/2-g[h]/2+T,$=Zc(V,F,q),U=!l.arrow&&Fa(a)!=null&&F!==$&&n.reference[h]/2-(F<V?A:O)-g[h]/2<0,G=U?F<V?F-V:F-q:0;return{[m]:p[m]+G,data:{[m]:$,centerOffset:F-$-G,...U&&{alignmentOffset:G}},reset:U}}});var c0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:a,middlewareData:n,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=Uo(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};let x=Go(a),y=Co(i),b=Go(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=p||(b||!g?[ml(i)]:r0(i)),I=h!=="none";!p&&I&&w.push(...a0(i,g,h,R));let S=[i,...w],T=await os(t,v),M=[],A=((r=n.flip)==null?void 0:r.overflows)||[];if(c&&M.push(T[x]),f){let F=o0(a,s,R);M.push(T[F[0]],T[F[1]])}if(A=[...A,{placement:a,overflows:M}],!M.every(F=>F<=0)){var O,V;let F=(((O=n.flip)==null?void 0:O.index)||0)+1,$=S[F];if($&&(!(f==="alignment"?y!==Co($):!1)||A.every(z=>Co(z.placement)===y?z.overflows[0]>0:!0)))return{data:{index:F,overflows:A},reset:{placement:$}};let U=(V=A.filter(G=>G.overflows[0]<=0).sort((G,z)=>G.overflows[1]-z.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(m){case"bestFit":{var q;let G=(q=A.filter(z=>{if(I){let _=Co(z.placement);return _===y||_==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(_=>_>0).reduce((_,ae)=>_+ae,0)]).sort((z,_)=>z[1]-_[1])[0])==null?void 0:q[0];G&&(U=G);break}case"initialPlacement":U=i;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function s0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function i0(e){return t0.some(t=>e[t]>=0)}var d0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...a}=Uo(e,t);switch(r){case"referenceHidden":{let n=await os(t,{...a,elementContext:"reference"}),s=s0(n,o.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:i0(s)}}}case"escaped":{let n=await os(t,{...a,altBoundary:!0}),s=s0(n,o.floating);return{data:{escapedOffsets:s,escaped:i0(s)}}}default:return{}}}}};var f0=new Set(["left","top"]);async function u_(e,t){let{placement:o,platform:r,elements:a}=e,n=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=Go(o),i=Fa(o),l=Co(o)==="y",u=f0.has(s)?-1:1,c=n&&l?-1:1,f=Uo(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof h=="number"&&(m=i==="end"?h*-1:h),l?{x:m*c,y:p*u}:{x:p*u,y:m*c}}var p0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:a,y:n,placement:s,middlewareData:i}=t,l=await u_(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:a+l.x,y:n+l.y,data:{...l,placement:s}}}}},m0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:i={fn:v=>{let{x,y}=v;return{x,y}}},...l}=Uo(e,t),u={x:o,y:r},c=await os(t,l),f=Co(Go(a)),p=Qc(f),m=u[p],h=u[f];if(n){let v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",y=m+c[v],b=m-c[x];m=Zc(y,m,b)}if(s){let v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=h+c[v],b=h-c[x];h=Zc(y,h,b)}let g=i.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-o,y:g.y-r,enabled:{[p]:n,[f]:s}}}}}},g0=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:a,rects:n,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Uo(e,t),c={x:o,y:r},f=Co(a),p=Qc(f),m=c[p],h=c[f],g=Uo(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){let b=p==="y"?"height":"width",R=n.reference[p]-n.floating[b]+v.mainAxis,w=n.reference[p]+n.reference[b]-v.mainAxis;m<R?m=R:m>w&&(m=w)}if(u){var x,y;let b=p==="y"?"width":"height",R=f0.has(Go(a)),w=n.reference[f]-n.floating[b]+(R&&((x=s.offset)==null?void 0:x[f])||0)+(R?0:v.crossAxis),I=n.reference[f]+n.reference[b]+(R?0:((y=s.offset)==null?void 0:y[f])||0)-(R?v.crossAxis:0);h<w?h=w:h>I&&(h=I)}return{[p]:m,[f]:h}}}},h0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:a,rects:n,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Uo(e,t),c=await os(t,u),f=Go(a),p=Fa(a),m=Co(a)==="y",{width:h,height:g}=n.floating,v,x;f==="top"||f==="bottom"?(v=f,x=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(x=f,v=p==="end"?"top":"bottom");let y=g-c.top-c.bottom,b=h-c.left-c.right,R=Ho(g-c[v],y),w=Ho(h-c[x],b),I=!t.middlewareData.shift,S=R,T=w;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(T=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=y),I&&!p){let A=Lt(c.left,0),O=Lt(c.right,0),V=Lt(c.top,0),q=Lt(c.bottom,0);m?T=h-2*(A!==0||O!==0?A+O:Lt(c.left,c.right)):S=g-2*(V!==0||q!==0?V+q:Lt(c.top,c.bottom))}await l({...t,availableWidth:T,availableHeight:S});let M=await s.getDimensions(i.floating);return h!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function td(){return typeof window<"u"}function Ba(e){return x0(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wo(e){var t;return(t=(x0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x0(e){return td()?e instanceof Node||e instanceof Nt(e).Node:!1}function Yt(e){return td()?e instanceof Element||e instanceof Nt(e).Element:!1}function So(e){return td()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function v0(e){return!td()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}var c_=new Set(["inline","contents"]);function rs(e){let{overflow:t,overflowX:o,overflowY:r,display:a}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!c_.has(a)}var d_=new Set(["table","td","th"]);function y0(e){return d_.has(Ba(e))}var f_=[":popover-open",":modal"];function vl(e){return f_.some(t=>{try{return e.matches(t)}catch{return!1}})}var p_=["transform","translate","scale","rotate","perspective"],m_=["transform","translate","scale","rotate","perspective","filter"],g_=["paint","layout","strict","content"];function od(e){let t=rd(),o=Yt(e)?Zt(e):e;return p_.some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||m_.some(r=>(o.willChange||"").includes(r))||g_.some(r=>(o.contain||"").includes(r))}function b0(e){let t=cr(e);for(;So(t)&&!Ha(t);){if(od(t))return t;if(vl(t))return null;t=cr(t)}return null}function rd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var h_=new Set(["html","body","#document"]);function Ha(e){return h_.has(Ba(e))}function Zt(e){return Nt(e).getComputedStyle(e)}function xl(e){return Yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(Ba(e)==="html")return e;let t=e.assignedSlot||e.parentNode||v0(e)&&e.host||wo(e);return v0(t)?t.host:t}function C0(e){let t=cr(e);return Ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:So(t)&&rs(t)?t:C0(t)}function Va(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=C0(e),n=a===((r=e.ownerDocument)==null?void 0:r.body),s=Nt(a);if(n){let i=ad(s);return t.concat(s,s.visualViewport||[],rs(a)?a:[],i&&o?Va(i):[])}return t.concat(a,Va(a,[],o))}function ad(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function I0(e){let t=Zt(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=So(e),n=a?e.offsetWidth:o,s=a?e.offsetHeight:r,i=gl(o)!==n||gl(r)!==s;return i&&(o=n,r=s),{width:o,height:r,$:i}}function rg(e){return Yt(e)?e:e.contextElement}function as(e){let t=rg(e);if(!So(t))return bo(1);let o=t.getBoundingClientRect(),{width:r,height:a,$:n}=I0(t),s=(n?gl(o.width):o.width)/r,i=(n?gl(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}var v_=bo(0);function P0(e){let t=Nt(e);return!rd()||!t.visualViewport?v_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function x_(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==Nt(e)?!1:t}function Ua(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),n=rg(e),s=bo(1);t&&(r?Yt(r)&&(s=as(r)):s=as(e));let i=x_(n,o,r)?P0(n):bo(0),l=(a.left+i.x)/s.x,u=(a.top+i.y)/s.y,c=a.width/s.x,f=a.height/s.y;if(n){let p=Nt(n),m=r&&Yt(r)?Nt(r):r,h=p,g=ad(h);for(;g&&r&&m!==h;){let v=as(g),x=g.getBoundingClientRect(),y=Zt(g),b=x.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,R=x.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,f*=v.y,l+=b,u+=R,h=Nt(g),g=ad(h)}}return _a({width:c,height:f,x:l,y:u})}function nd(e,t){let o=xl(e).scrollLeft;return t?t.left+o:Ua(wo(e)).left+o}function L0(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-nd(e,o),a=o.top+t.scrollTop;return{x:r,y:a}}function y_(e){let{elements:t,rect:o,offsetParent:r,strategy:a}=e,n=a==="fixed",s=wo(r),i=t?vl(t.floating):!1;if(r===s||i&&n)return o;let l={scrollLeft:0,scrollTop:0},u=bo(1),c=bo(0),f=So(r);if((f||!f&&!n)&&((Ba(r)!=="body"||rs(s))&&(l=xl(r)),So(r))){let m=Ua(r);u=as(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}let p=s&&!f&&!n?L0(s,l):bo(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:o.y*u.y-l.scrollTop*u.y+c.y+p.y}}function b_(e){return Array.from(e.getClientRects())}function C_(e){let t=wo(e),o=xl(e),r=e.ownerDocument.body,a=Lt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=Lt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+nd(e),i=-o.scrollTop;return Zt(r).direction==="rtl"&&(s+=Lt(t.clientWidth,r.clientWidth)-a),{width:a,height:n,x:s,y:i}}var w0=25;function w_(e,t){let o=Nt(e),r=wo(e),a=o.visualViewport,n=r.clientWidth,s=r.clientHeight,i=0,l=0;if(a){n=a.width,s=a.height;let c=rd();(!c||c&&t==="fixed")&&(i=a.offsetLeft,l=a.offsetTop)}let u=nd(r);if(u<=0){let c=r.ownerDocument,f=c.body,p=getComputedStyle(f),m=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(r.clientWidth-f.clientWidth-m);h<=w0&&(n-=h)}else u<=w0&&(n+=u);return{width:n,height:s,x:i,y:l}}var S_=new Set(["absolute","fixed"]);function R_(e,t){let o=Ua(e,!0,t==="fixed"),r=o.top+e.clientTop,a=o.left+e.clientLeft,n=So(e)?as(e):bo(1),s=e.clientWidth*n.x,i=e.clientHeight*n.y,l=a*n.x,u=r*n.y;return{width:s,height:i,x:l,y:u}}function S0(e,t,o){let r;if(t==="viewport")r=w_(e,o);else if(t==="document")r=C_(wo(e));else if(Yt(t))r=R_(t,o);else{let a=P0(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return _a(r)}function T0(e,t){let o=cr(e);return o===t||!Yt(o)||Ha(o)?!1:Zt(o).position==="fixed"||T0(o,t)}function I_(e,t){let o=t.get(e);if(o)return o;let r=Va(e,[],!1).filter(i=>Yt(i)&&Ba(i)!=="body"),a=null,n=Zt(e).position==="fixed",s=n?cr(e):e;for(;Yt(s)&&!Ha(s);){let i=Zt(s),l=od(s);!l&&i.position==="fixed"&&(a=null),(n?!l&&!a:!l&&i.position==="static"&&!!a&&S_.has(a.position)||rs(s)&&!l&&T0(e,s))?r=r.filter(c=>c!==s):a=i,s=cr(s)}return t.set(e,r),r}function P_(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,s=[...o==="clippingAncestors"?vl(t)?[]:I_(t,this._c):[].concat(o),r],i=s[0],l=s.reduce((u,c)=>{let f=S0(t,c,a);return u.top=Lt(f.top,u.top),u.right=Ho(f.right,u.right),u.bottom=Ho(f.bottom,u.bottom),u.left=Lt(f.left,u.left),u},S0(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function L_(e){let{width:t,height:o}=I0(e);return{width:t,height:o}}function T_(e,t,o){let r=So(t),a=wo(t),n=o==="fixed",s=Ua(e,!0,n,t),i={scrollLeft:0,scrollTop:0},l=bo(0);function u(){l.x=nd(a)}if(r||!r&&!n)if((Ba(t)!=="body"||rs(a))&&(i=xl(t)),r){let m=Ua(t,!0,n,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else a&&u();n&&!r&&a&&u();let c=a&&!r&&!n?L0(a,i):bo(0),f=s.left+i.scrollLeft-l.x-c.x,p=s.top+i.scrollTop-l.y-c.y;return{x:f,y:p,width:s.width,height:s.height}}function og(e){return Zt(e).position==="static"}function R0(e,t){if(!So(e)||Zt(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return wo(e)===o&&(o=o.ownerDocument.body),o}function M0(e,t){let o=Nt(e);if(vl(e))return o;if(!So(e)){let a=cr(e);for(;a&&!Ha(a);){if(Yt(a)&&!og(a))return a;a=cr(a)}return o}let r=R0(e,t);for(;r&&y0(r)&&og(r);)r=R0(r,t);return r&&Ha(r)&&og(r)&&!od(r)?o:r||b0(e)||o}var M_=async function(e){let t=this.getOffsetParent||M0,o=this.getDimensions,r=await o(e.floating);return{reference:T_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function k_(e){return Zt(e).direction==="rtl"}var k0={convertOffsetParentRelativeRectToViewportRelativeRect:y_,getDocumentElement:wo,getClippingRect:P_,getOffsetParent:M0,getElementRects:M_,getClientRects:b_,getDimensions:L_,getScale:as,isElement:Yt,isRTL:k_};function E0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function E_(e,t){let o=null,r,a=wo(e);function n(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),n();let u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:m}=u;if(i||t(),!p||!m)return;let h=hl(f),g=hl(a.clientWidth-(c+p)),v=hl(a.clientHeight-(f+m)),x=hl(c),b={rootMargin:-h+"px "+-g+"px "+-v+"px "+-x+"px",threshold:Lt(0,Ho(1,l))||1},R=!0;function w(I){let S=I[0].intersectionRatio;if(S!==l){if(!R)return s();S?s(!1,S):r=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!E0(u,e.getBoundingClientRect())&&s(),R=!1}try{o=new IntersectionObserver(w,{...b,root:a.ownerDocument})}catch{o=new IntersectionObserver(w,b)}o.observe(e)}return s(!0),n}function ag(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:a=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=rg(e),c=a||n?[...u?Va(u):[],...Va(t)]:[];c.forEach(x=>{a&&x.addEventListener("scroll",o,{passive:!0}),n&&x.addEventListener("resize",o)});let f=u&&i?E_(u,o):null,p=-1,m=null;s&&(m=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),o()}),u&&!l&&m.observe(u),m.observe(t));let h,g=l?Ua(e):null;l&&v();function v(){let x=Ua(e);g&&!E0(g,x)&&o(),g=x,h=requestAnimationFrame(v)}return o(),()=>{var x;c.forEach(y=>{a&&y.removeEventListener("scroll",o),n&&y.removeEventListener("resize",o)}),f?.(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(h)}}var A0=p0;var D0=m0,N0=c0,O0=h0,F0=d0,ng=u0;var _0=g0,sg=(e,t,o)=>{let r=new Map,a={platform:k0,...o},n={...a.platform,_c:r};return l0(e,t,{...a,platform:n})};N();N();var A_=typeof document<"u",D_=function(){},sd=A_?dt:D_;function id(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!id(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),o=a.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=o;r--!==0;){let n=a[r];if(!(n==="_owner"&&e.$$typeof)&&!id(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function B0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V0(e,t){let o=B0(e);return Math.round(t*o)/o}function ig(e){let t=E(e);return sd(()=>{t.current=e}),t}function H0(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:a,elements:{reference:n,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[c,f]=k({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=k(r);id(p,r)||m(r);let[h,g]=k(null),[v,x]=k(null),y=H(z=>{z!==I.current&&(I.current=z,g(z))},[]),b=H(z=>{z!==S.current&&(S.current=z,x(z))},[]),R=n||h,w=s||v,I=E(null),S=E(null),T=E(c),M=l!=null,A=ig(l),O=ig(a),V=ig(u),q=H(()=>{if(!I.current||!S.current)return;let z={placement:t,strategy:o,middleware:p};O.current&&(z.platform=O.current),sg(I.current,S.current,z).then(_=>{let ae={..._,isPositioned:V.current!==!1};F.current&&!id(T.current,ae)&&(T.current=ae,jo(()=>{f(ae)}))})},[p,t,o,O,V]);sd(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);let F=E(!1);sd(()=>(F.current=!0,()=>{F.current=!1}),[]),sd(()=>{if(R&&(I.current=R),w&&(S.current=w),R&&w){if(A.current)return A.current(R,w,q);q()}},[R,w,q,A,M]);let $=Z(()=>({reference:I,floating:S,setReference:y,setFloating:b}),[y,b]),U=Z(()=>({reference:R,floating:w}),[R,w]),G=Z(()=>{let z={position:o,left:0,top:0};if(!U.floating)return z;let _=V0(U.floating,c.x),ae=V0(U.floating,c.y);return i?{...z,transform:"translate("+_+"px, "+ae+"px)",...B0(U.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:_,top:ae}},[o,i,U.floating,c.x,c.y]);return Z(()=>({...c,update:q,refs:$,elements:U,floatingStyles:G}),[c,q,$,U,G])}var N_=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){let{element:r,padding:a}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?ng({element:r.current,padding:a}).fn(o):{}:r?ng({element:r,padding:a}).fn(o):{}}}},U0=(e,t)=>({...A0(e),options:[e,t]}),G0=(e,t)=>({...D0(e),options:[e,t]}),z0=(e,t)=>({..._0(e),options:[e,t]}),W0=(e,t)=>({...N0(e),options:[e,t]}),q0=(e,t)=>({...O0(e),options:[e,t]});var $0=(e,t)=>({...F0(e),options:[e,t]});var j0=(e,t)=>({...N_(e),options:[e,t]});N();var O_="Arrow",K0=C((e,t)=>{let{children:o,width:r=10,height:a=5,...n}=e;return d(Y.svg,{...n,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d("polygon",{points:"0,0 30,0 15,10"})})});K0.displayName=O_;var X0=K0;var lg="Popper",[Y0,Qt]=ke(lg),[__,Z0]=Y0(lg),Q0=e=>{let{__scopePopper:t,children:o}=e,[r,a]=k(null);return d(__,{scope:t,anchor:r,onAnchorChange:a,children:o})};Q0.displayName=lg;var J0="PopperAnchor",eI=C((e,t)=>{let{__scopePopper:o,virtualRef:r,...a}=e,n=Z0(J0,o),s=E(null),i=fe(t,s),l=E(null);return D(()=>{let u=l.current;l.current=r?.current||s.current,u!==l.current&&n.onAnchorChange(l.current)}),r?null:d(Y.div,{...a,ref:i})});eI.displayName=J0;var ug="PopperContent",[V_,B_]=Y0(ug),tI=C((e,t)=>{let{__scopePopper:o,side:r="bottom",sideOffset:a=0,align:n="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=e,v=Z0(ug,o),[x,y]=k(null),b=fe(t,K=>y(K)),[R,w]=k(null),I=ts(R),S=I?.width??0,T=I?.height??0,M=r+(n!=="center"?"-"+n:""),A=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},O=Array.isArray(u)?u:[u],V=O.length>0,q={padding:A,boundary:O.filter(U_),altBoundary:V},{refs:F,floatingStyles:$,placement:U,isPositioned:G,middlewareData:z}=H0({strategy:"fixed",placement:M,whileElementsMounted:(...K)=>ag(...K,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[U0({mainAxis:a+T,alignmentAxis:s}),l&&G0({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?z0():void 0,...q}),l&&W0({...q}),q0({...q,apply:({elements:K,rects:se,availableWidth:ve,availableHeight:xe})=>{let{width:me,height:J}=se.reference,ye=K.floating.style;ye.setProperty("--radix-popper-available-width",`${ve}px`),ye.setProperty("--radix-popper-available-height",`${xe}px`),ye.setProperty("--radix-popper-anchor-width",`${me}px`),ye.setProperty("--radix-popper-anchor-height",`${J}px`)}}),R&&j0({element:R,padding:i}),G_({arrowWidth:S,arrowHeight:T}),p&&$0({strategy:"referenceHidden",...q})]}),[_,ae]=aI(U),ie=ze(h);Ae(()=>{G&&ie?.()},[G,ie]);let W=z.arrow?.x,te=z.arrow?.y,ne=z.arrow?.centerOffset!==0,[ee,de]=k();return Ae(()=>{x&&de(window.getComputedStyle(x).zIndex)},[x]),d("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:G?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d(V_,{scope:o,placedSide:_,onArrowChange:w,arrowX:W,arrowY:te,shouldHideArrow:ne,children:d(Y.div,{"data-side":_,"data-align":ae,...g,ref:b,style:{...g.style,animation:G?void 0:"none"}})})})});tI.displayName=ug;var oI="PopperArrow",H_={top:"bottom",right:"left",bottom:"top",left:"right"},rI=C(function(t,o){let{__scopePopper:r,...a}=t,n=B_(oI,r),s=H_[n.placedSide];return d("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:d(X0,{...a,ref:o,style:{...a.style,display:"block"}})})});rI.displayName=oI;function U_(e){return e!==null}var G_=e=>({name:"transformOrigin",options:e,fn(t){let{placement:o,rects:r,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=aI(o),f={start:"0%",center:"50%",end:"100%"}[c],p=(a.arrow?.x??0)+i/2,m=(a.arrow?.y??0)+l/2,h="",g="";return u==="bottom"?(h=s?f:`${p}px`,g=`${-l}px`):u==="top"?(h=s?f:`${p}px`,g=`${r.floating.height+l}px`):u==="right"?(h=`${-l}px`,g=s?f:`${m}px`):u==="left"&&(h=`${r.floating.width+l}px`,g=s?f:`${m}px`),{data:{x:h,y:g}}}});function aI(e){let[t,o="center"]=e.split("-");return[t,o]}var dr=Q0,fr=eI,Ur=tI,Gr=rI;N();var z_="Portal",Ht=C((e,t)=>{let{container:o,...r}=e,[a,n]=k(!1);Ae(()=>n(!0),[]);let s=o||a&&globalThis?.document?.body;return s?Ty.createPortal(d(Y.div,{...r,ref:t}),s):null});Ht.displayName=z_;var W_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ns=new WeakMap,ud=new WeakMap,cd={},cg=0,nI=function(e){return e&&(e.host||nI(e.parentNode))},q_=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=nI(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},$_=function(e,t,o,r){var a=q_(t,Array.isArray(e)?e:[e]);cd[o]||(cd[o]=new WeakMap);var n=cd[o],s=[],i=new Set,l=new Set(a),u=function(f){!f||i.has(f)||(i.add(f),u(f.parentNode))};a.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(i.has(p))c(p);else try{var m=p.getAttribute(r),h=m!==null&&m!=="false",g=(ns.get(p)||0)+1,v=(n.get(p)||0)+1;ns.set(p,g),n.set(p,v),s.push(p),g===1&&h&&ud.set(p,!0),v===1&&p.setAttribute(o,"true"),h||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return c(t),i.clear(),cg++,function(){s.forEach(function(f){var p=ns.get(f)-1,m=n.get(f)-1;ns.set(f,p),n.set(f,m),p||(ud.has(f)||f.removeAttribute(r),ud.delete(f)),m||f.removeAttribute(o)}),cg--,cg||(ns=new WeakMap,ns=new WeakMap,ud=new WeakMap,cd={})}},zr=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||W_(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),$_(r,a,o,"aria-hidden")):function(){return null}};var Ot=function(){return Ot=Object.assign||function(t){for(var o,r=1,a=arguments.length;r<a;r++){o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},Ot.apply(this,arguments)};function dd(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(o[r[a]]=e[r[a]]);return o}function sI(e,t,o){if(o||arguments.length===2)for(var r=0,a=t.length,n;r<a;r++)(n||!(r in t))&&(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}N();N();var Ga="right-scroll-bar-position",za="width-before-scroll-bar",dg="with-scroll-bars-hidden",fg="--removed-body-scroll-bar-size";function fd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}N();function iI(e,t){var o=k(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var a=o.value;a!==r&&(o.value=r,o.callback(r,a))}}}})[0];return o.callback=t,o.facade}N();var j_=typeof window<"u"?dt:D,lI=new WeakMap;function pg(e,t){var o=iI(t||null,function(r){return e.forEach(function(a){return fd(a,r)})});return j_(function(){var r=lI.get(o);if(r){var a=new Set(r),n=new Set(e),s=o.current;a.forEach(function(i){n.has(i)||fd(i,null)}),n.forEach(function(i){a.has(i)||fd(i,s)})}lI.set(o,e)},[e]),o}function K_(e){return e}function X_(e,t){t===void 0&&(t=K_);var o=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(n){var s=t(n,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(n){for(r=!0;o.length;){var s=o;o=[],s.forEach(n)}o={push:function(i){return n(i)},filter:function(){return o}}},assignMedium:function(n){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(n),s=o}var l=function(){var c=s;s=[],c.forEach(n)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),o}}}};return a}function mg(e){e===void 0&&(e={});var t=X_(null);return t.options=Ot({async:!0,ssr:!1},e),t}N();var uI=function(e){var t=e.sideCar,o=dd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return pe(r,Ot({},o))};uI.isSideCarExport=!0;function gg(e,t){return e.useMedium(t),uI}var pd=mg();var hg=function(){},yl=C(function(e,t){var o=E(null),r=k({onScrollCapture:hg,onWheelCapture:hg,onTouchMoveCapture:hg}),a=r[0],n=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,R=dd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,I=pg([o,t]),S=Ot(Ot({},R),a);return pe(Je,null,c&&pe(w,{sideCar:pd,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:n,allowPinchZoom:!!v,lockRef:o,gapMode:b}),s?Fe(Pe.only(i),Ot(Ot({},S),{ref:I})):pe(y,Ot({},S,{className:l,ref:I}),i))});yl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yl.classNames={fullWidth:za,zeroRight:Ga};N();N();N();var cI;var dI=function(){if(cI)return cI;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Y_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dI();return t&&e.setAttribute("nonce",t),e}function Z_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Q_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vg=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Y_())&&(Z_(t,o),Q_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var xg=function(){var e=vg();return function(t,o){D(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var bl=function(){var e=xg(),t=function(o){var r=o.styles,a=o.dynamic;return e(r,a),null};return t};var J_={left:0,top:0,right:0,gap:0},yg=function(e){return parseInt(e||"",10)||0},eV=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[yg(o),yg(r),yg(a)]},bg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return J_;var t=eV(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}};var tV=bl(),ss="data-scroll-locked",oV=function(e,t,o,r){var a=e.left,n=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
14
+ .`.concat(dg,` {
15
+ overflow: hidden `).concat(r,`;
16
+ padding-right: `).concat(i,"px ").concat(r,`;
17
+ }
18
+ body[`).concat(ss,`] {
19
+ overflow: hidden `).concat(r,`;
20
+ overscroll-behavior: contain;
21
+ `).concat([t&&"position: relative ".concat(r,";"),o==="margin"&&`
22
+ padding-left: `.concat(a,`px;
23
+ padding-top: `).concat(n,`px;
24
+ padding-right: `).concat(s,`px;
25
+ margin-left:0;
26
+ margin-top:0;
27
+ margin-right: `).concat(i,"px ").concat(r,`;
28
+ `),o==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
29
+ }
30
+
31
+ .`).concat(Ga,` {
32
+ right: `).concat(i,"px ").concat(r,`;
33
+ }
34
+
35
+ .`).concat(za,` {
36
+ margin-right: `).concat(i,"px ").concat(r,`;
37
+ }
38
+
39
+ .`).concat(Ga," .").concat(Ga,` {
40
+ right: 0 `).concat(r,`;
41
+ }
42
+
43
+ .`).concat(za," .").concat(za,` {
44
+ margin-right: 0 `).concat(r,`;
45
+ }
46
+
47
+ body[`).concat(ss,`] {
48
+ `).concat(fg,": ").concat(i,`px;
49
+ }
50
+ `)},fI=function(){var e=parseInt(document.body.getAttribute(ss)||"0",10);return isFinite(e)?e:0},rV=function(){D(function(){return document.body.setAttribute(ss,(fI()+1).toString()),function(){var e=fI()-1;e<=0?document.body.removeAttribute(ss):document.body.setAttribute(ss,e.toString())}},[])},Cg=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;rV();var n=Z(function(){return bg(a)},[a]);return pe(tV,{styles:oV(n,!t,a,o?"":"!important")})};var wg=!1;if(typeof window<"u")try{Cl=Object.defineProperty({},"passive",{get:function(){return wg=!0,!0}}),window.addEventListener("test",Cl,Cl),window.removeEventListener("test",Cl,Cl)}catch{wg=!1}var Cl,Wa=wg?{passive:!1}:!1;var aV=function(e){return e.tagName==="TEXTAREA"},pI=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!aV(e)&&o[t]==="visible")},nV=function(e){return pI(e,"overflowY")},sV=function(e){return pI(e,"overflowX")},Sg=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=mI(e,r);if(a){var n=gI(e,r),s=n[1],i=n[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},iV=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},lV=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},mI=function(e,t){return e==="v"?nV(t):sV(t)},gI=function(e,t){return e==="v"?iV(t):lV(t)},uV=function(e,t){return e==="h"&&t==="rtl"?-1:1},hI=function(e,t,o,r,a){var n=uV(e,window.getComputedStyle(t).direction),s=n*r,i=o.target,l=t.contains(i),u=!1,c=s>0,f=0,p=0;do{if(!i)break;var m=gI(e,i),h=m[0],g=m[1],v=m[2],x=g-v-n*h;(h||x)&&mI(e,i)&&(f+=x,p+=h);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&(a&&Math.abs(f)<1||!a&&s>f)||!c&&(a&&Math.abs(p)<1||!a&&-s>p))&&(u=!0),u};var md=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vI=function(e){return[e.deltaX,e.deltaY]},xI=function(e){return e&&"current"in e?e.current:e},cV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dV=function(e){return`
51
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
52
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
53
+ `)},fV=0,is=[];function yI(e){var t=E([]),o=E([0,0]),r=E(),a=k(fV++)[0],n=k(bl)[0],s=E(e);D(function(){s.current=e},[e]),D(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=sI([e.lockRef.current],(e.shards||[]).map(xI),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=H(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var x=md(g),y=o.current,b="deltaX"in g?g.deltaX:y[0]-x[0],R="deltaY"in g?g.deltaY:y[1]-x[1],w,I=g.target,S=Math.abs(b)>Math.abs(R)?"h":"v";if("touches"in g&&S==="h"&&I.type==="range")return!1;var T=Sg(S,I);if(!T)return!0;if(T?w=S:(w=S==="v"?"h":"v",T=Sg(S,I)),!T)return!1;if(!r.current&&"changedTouches"in g&&(b||R)&&(r.current=w),!w)return!0;var M=r.current||w;return hI(M,v,g,M==="h"?b:R,!0)},[]),l=H(function(g){var v=g;if(!(!is.length||is[is.length-1]!==n)){var x="deltaY"in v?vI(v):md(v),y=t.current.filter(function(w){return w.name===v.type&&(w.target===v.target||v.target===w.shadowParent)&&cV(w.delta,x)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var b=(s.current.shards||[]).map(xI).filter(Boolean).filter(function(w){return w.contains(v.target)}),R=b.length>0?i(v,b[0]):!s.current.noIsolation;R&&v.cancelable&&v.preventDefault()}}},[]),u=H(function(g,v,x,y){var b={name:g,delta:v,target:x,should:y,shadowParent:pV(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(R){return R!==b})},1)},[]),c=H(function(g){o.current=md(g),r.current=void 0},[]),f=H(function(g){u(g.type,vI(g),g.target,i(g,e.lockRef.current))},[]),p=H(function(g){u(g.type,md(g),g.target,i(g,e.lockRef.current))},[]);D(function(){return is.push(n),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Wa),document.addEventListener("touchmove",l,Wa),document.addEventListener("touchstart",c,Wa),function(){is=is.filter(function(g){return g!==n}),document.removeEventListener("wheel",l,Wa),document.removeEventListener("touchmove",l,Wa),document.removeEventListener("touchstart",c,Wa)}},[]);var m=e.removeScrollBar,h=e.inert;return pe(Je,null,h?pe(n,{styles:dV(a)}):null,m?pe(Cg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bI=gg(pd,yI);var CI=C(function(e,t){return pe(yl,Ot({},e,{ref:t,sideCar:bI}))});CI.classNames=yl.classNames;var pr=CI;var gd="Popover",[wI,zfe]=ke(gd,[Qt]),wl=Qt(),[mV,Wr]=wI(gd),SI=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!1}=e,i=wl(t),l=E(null),[u,c]=k(!1),[f,p]=Be({prop:r,defaultProp:a??!1,onChange:n,caller:gd});return d(dr,{...i,children:d(mV,{scope:t,contentId:Te(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:H(()=>p(m=>!m),[p]),hasCustomAnchor:u,onCustomAnchorAdd:H(()=>c(!0),[]),onCustomAnchorRemove:H(()=>c(!1),[]),modal:s,children:o})})};SI.displayName=gd;var RI="PopoverAnchor",II=C((e,t)=>{let{__scopePopover:o,...r}=e,a=Wr(RI,o),n=wl(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=a;return D(()=>(s(),()=>i()),[s,i]),d(fr,{...n,...r,ref:t})});II.displayName=RI;var PI="PopoverTrigger",LI=C((e,t)=>{let{__scopePopover:o,...r}=e,a=Wr(PI,o),n=wl(o),s=fe(t,a.triggerRef),i=d(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":AI(a.open),...r,ref:s,onClick:X(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:d(fr,{asChild:!0,...n,children:i})});LI.displayName=PI;var Rg="PopoverPortal",[gV,hV]=wI(Rg,{forceMount:void 0}),vV=e=>{let{__scopePopover:t,forceMount:o,children:r,container:a}=e,n=Wr(Rg,t);return d(gV,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Ht,{asChild:!0,container:a,children:r})})})};vV.displayName=Rg;var ls="PopoverContent",TI=C((e,t)=>{let o=hV(ls,e.__scopePopover),{forceMount:r=o.forceMount,...a}=e,n=Wr(ls,e.__scopePopover);return d($e,{present:r||n.open,children:n.modal?d(yV,{...a,ref:t}):d(bV,{...a,ref:t})})});TI.displayName=ls;var xV=Tt("PopoverContent.RemoveScroll"),yV=C((e,t)=>{let o=Wr(ls,e.__scopePopover),r=E(null),a=fe(t,r),n=E(!1);return D(()=>{let s=r.current;if(s)return zr(s)},[]),d(pr,{as:xV,allowPinchZoom:!0,children:d(MI,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{s.preventDefault(),n.current||o.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{let i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;n.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),bV=C((e,t)=>{let o=Wr(ls,e.__scopePopover),r=E(!1),a=E(!1);return d(MI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),MI=C((e,t)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...f}=e,p=Wr(ls,o),m=wl(o);return Br(),d(ur,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d(Xt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d(Ur,{"data-state":AI(p.open),role:"dialog",id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),kI="PopoverClose",EI=C((e,t)=>{let{__scopePopover:o,...r}=e,a=Wr(kI,o);return d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>a.onOpenChange(!1))})});EI.displayName=kI;var CV="PopoverArrow",wV=C((e,t)=>{let{__scopePopover:o,...r}=e,a=wl(o);return d(Gr,{...a,...r,ref:t})});wV.displayName=CV;function AI(e){return e?"open":"closed"}var DI=SI,NI=II,OI=LI;var Ig=TI,FI=EI;var Pg=Q("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",md:"w-72 p-4",lg:"w-96 p-5",default:"w-72 p-4"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"md",radius:"default",shadow:"default"}}),zo=DI,Wo=OI,_I=NI,Ro=C(({className:e,variant:t,size:o,side:r,position:a,radius:n,shadow:s,backdrop:i=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...f},p)=>P(Ve,{children:[u&&d("div",{className:"fixed inset-0 z-40 bg-black/50"}),d(Ig,{ref:p,side:r,sideOffset:c,collisionPadding:8,onInteractOutside:m=>{l||m.preventDefault()},className:L(Pg({variant:t,size:o,side:r,position:a,radius:n,shadow:s}),i&&"backdrop-blur-md bg-opacity-80",e),...f})]}));Ro.displayName=Ig.displayName;var VI=FI,Lg=({className:e,...t})=>d("div",{className:L("moonui-theme","my-2 h-px bg-border",e),...t});Lg.displayName="PopoverSeparator";var Tg=({className:e,...t})=>d("div",{className:L("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});Tg.displayName="PopoverHeader";var Mg=({className:e,...t})=>d("div",{className:L("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});Mg.displayName="PopoverFooter";N();N();N();var kg="rovingFocusGroup.onEntryFocus",RV={bubbles:!1,cancelable:!0},Sl="RovingFocusGroup",[Eg,BI,IV]=Eo(Sl),[PV,us]=ke(Sl,[IV]),[LV,TV]=PV(Sl),HI=C((e,t)=>d(Eg.Provider,{scope:e.__scopeRovingFocusGroup,children:d(Eg.Slot,{scope:e.__scopeRovingFocusGroup,children:d(MV,{...e,ref:t})})}));HI.displayName=Sl;var MV=C((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:r,loop:a=!1,dir:n,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...f}=e,p=E(null),m=fe(t,p),h=Ao(n),[g,v]=Be({prop:s,defaultProp:i??null,onChange:l,caller:Sl}),[x,y]=k(!1),b=ze(u),R=BI(o),w=E(!1),[I,S]=k(0);return D(()=>{let T=p.current;if(T)return T.addEventListener(kg,b),()=>T.removeEventListener(kg,b)},[b]),d(LV,{scope:o,orientation:r,dir:h,loop:a,currentTabStopId:g,onItemFocus:H(T=>v(T),[v]),onItemShiftTab:H(()=>y(!0),[]),onFocusableItemAdd:H(()=>S(T=>T+1),[]),onFocusableItemRemove:H(()=>S(T=>T-1),[]),children:d(Y.div,{tabIndex:x||I===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{w.current=!0}),onFocus:X(e.onFocus,T=>{let M=!w.current;if(T.target===T.currentTarget&&M&&!x){let A=new CustomEvent(kg,RV);if(T.currentTarget.dispatchEvent(A),!A.defaultPrevented){let O=R().filter(U=>U.focusable),V=O.find(U=>U.active),q=O.find(U=>U.id===g),$=[V,q,...O].filter(Boolean).map(U=>U.ref.current);zI($,c)}}w.current=!1}),onBlur:X(e.onBlur,()=>y(!1))})})}),UI="RovingFocusGroupItem",GI=C((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:n,children:s,...i}=e,l=Te(),u=n||l,c=TV(UI,o),f=c.currentTabStopId===u,p=BI(o),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=c;return D(()=>{if(r)return m(),()=>h()},[r,m,h]),d(Eg.ItemSlot,{scope:o,id:u,focusable:r,active:a,children:d(Y.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:X(e.onMouseDown,v=>{r?c.onItemFocus(u):v.preventDefault()}),onFocus:X(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:X(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;let x=AV(v,c.orientation,c.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=p().filter(R=>R.focusable).map(R=>R.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();let R=b.indexOf(v.currentTarget);b=c.loop?DV(b,R+1):b.slice(R+1)}setTimeout(()=>zI(b))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});GI.displayName=UI;var kV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AV(e,t,o){let r=EV(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return kV[r]}function zI(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function DV(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var hd=HI,vd=GI;var xd="Tabs",[NV,ppe]=ke(xd,[us]),qI=us(),[OV,Ag]=NV(xd),$I=C((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:a,defaultValue:n,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,c=Ao(i),[f,p]=Be({prop:r,onChange:a,defaultProp:n??"",caller:xd});return d(OV,{scope:o,baseId:Te(),value:f,onValueChange:p,orientation:s,dir:c,activationMode:l,children:d(Y.div,{dir:c,"data-orientation":s,...u,ref:t})})});$I.displayName=xd;var jI="TabsList",KI=C((e,t)=>{let{__scopeTabs:o,loop:r=!0,...a}=e,n=Ag(jI,o),s=qI(o);return d(hd,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:r,children:d(Y.div,{role:"tablist","aria-orientation":n.orientation,...a,ref:t})})});KI.displayName=jI;var XI="TabsTrigger",YI=C((e,t)=>{let{__scopeTabs:o,value:r,disabled:a=!1,...n}=e,s=Ag(XI,o),i=qI(o),l=JI(s.baseId,r),u=eP(s.baseId,r),c=r===s.value;return d(vd,{asChild:!0,...i,focusable:!a,active:c,children:d(Y.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:l,...n,ref:t,onMouseDown:X(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:X(e.onFocus,()=>{let f=s.activationMode!=="manual";!c&&!a&&f&&s.onValueChange(r)})})})});YI.displayName=XI;var ZI="TabsContent",QI=C((e,t)=>{let{__scopeTabs:o,value:r,forceMount:a,children:n,...s}=e,i=Ag(ZI,o),l=JI(i.baseId,r),u=eP(i.baseId,r),c=r===i.value,f=E(c);return D(()=>{let p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),d($e,{present:a||c,children:({present:p})=>d(Y.div,{"data-state":c?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&n})})});QI.displayName=ZI;function JI(e,t){return`${e}-trigger-${t}`}function eP(e,t){return`${e}-content-${t}`}var Dg=$I,Ng=KI,Og=YI,Fg=QI;var _g=ue("horizontal"),Rl=C(({vertical:e=!1,orientation:t,className:o,...r},a)=>{let n=t??(e?"vertical":"horizontal");return d(_g.Provider,{value:n,children:d(Dg,{ref:a,className:L("moonui-theme",o),orientation:n,...r})})});Rl.displayName=Dg.displayName;var tP=Q("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-3 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),Il=C(({className:e,variant:t,orientation:o,fullWidth:r,scrollable:a,...n},s)=>{let i=re(_g);return d(Ng,{ref:s,className:L("moonui-theme",tP({variant:t,orientation:o??i,fullWidth:r,scrollable:a,className:e})),...n})});Il.displayName=Ng.displayName;var oP=Q("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),qa=C(({className:e,variant:t,size:o,icon:r,iconPosition:a="left",badge:n,fadeTabs:s=!1,orientation:i,fullWidth:l,children:u,...c},f)=>{let p=re(_g);return P(Og,{ref:f,className:L("moonui-theme",oP({variant:t,size:o,orientation:i??p,fullWidth:l}),s&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&a==="left"&&d("span",{className:"mr-2",children:r}),u,r&&a==="right"&&d("span",{className:"ml-2",children:r}),n&&d("span",{className:"ml-2",children:n})]})});qa.displayName=Og.displayName;var $a=C(({className:e,animated:t=!1,...o},r)=>d(Fg,{ref:r,className:L("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...o}));$a.displayName=Fg.displayName;N();var _V=Q("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",md:"h-6",lg:"h-8",xl:"h-10",default:"h-6"}},defaultVariants:{size:"md"}}),VV=Q("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),BV=Q("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-[rgb(var(--secondary-500))]",accent:"bg-[rgb(var(--secondary-700))] dark:bg-[rgb(var(--secondary-400))]",success:"bg-success",warning:"bg-[rgb(var(--warning-700))] dark:bg-warning",error:"bg-[rgb(var(--error-700))] dark:bg-error"}},defaultVariants:{variant:"primary"}}),HV=Q("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-[rgb(var(--secondary-500))] bg-background",accent:"border-[rgb(var(--secondary-700))] dark:border-[rgb(var(--secondary-400))] bg-background",success:"border-success bg-background",warning:"border-[rgb(var(--warning-700))] dark:border-warning bg-background",error:"border-[rgb(var(--error-700))] dark:border-error bg-background"},size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6",default:"h-4 w-4"}},defaultVariants:{variant:"primary",size:"md"}}),qo=C(({className:e,size:t,trackVariant:o,rangeVariant:r,thumbVariant:a,thumbSize:n,showValueLabel:s=!1,valueLabelFormat:i,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:f,disabled:p,...m},h)=>{let[g,v]=k(u||c||[0]);D(()=>{u!==void 0&&v(u)},[u]);let x=O=>i?i(O):`${Math.round(O*100)/100}`,y=(O,V,q)=>(O-V)/(q-V)*100,b=E(null),R=m.min||0,w=m.max||100,I=m.step||1,S=O=>{let V=O.map(q=>{if(I<1){let F=I.toString().split(".")[1]?.length||0;return Math.round(q*Math.pow(10,F))/Math.pow(10,F)}return Math.round(q)});v(V),f&&f(V)},T=O=>{if(p)return;let V=b.current;if(!V)return;let q=V.getBoundingClientRect(),F=(O.clientX-q.left)/q.width,$=R+F*(w-R),U=Math.round($/I)*I,G=Math.max(R,Math.min(w,U)),z=[...g];z[0]=G,S(z)},M=O=>V=>{if(p)return;V.preventDefault();let q=$=>{let U=b.current;if(!U)return;let G=U.getBoundingClientRect(),z=($.clientX-G.left)/G.width,_=R+z*(w-R),ae=Math.round(_/I)*I,ie=Math.max(R,Math.min(w,ae)),W=[...g];W[O]=ie,S(W)},F=()=>{document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",F)};document.addEventListener("mousemove",q),document.addEventListener("mouseup",F)},A=O=>V=>{if(p)return;let q=I*10,F=g[O],$;switch(V.key){case"ArrowRight":case"ArrowUp":$=F+I;break;case"ArrowLeft":case"ArrowDown":$=F-I;break;case"PageUp":$=F+q;break;case"PageDown":$=F-q;break;case"Home":$=R;break;case"End":$=w;break;default:return}V.preventDefault();let U=O>0?g[O-1]:R,G=O<g.length-1?g[O+1]:w,z=Math.max(U,Math.min(G,$)),_=[...g];_[O]=z,S(_)};return P("div",{className:"w-full",ref:h,...m,children:[s&&d("div",{className:L("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?d("span",{children:x(g[0])}):P("span",{children:[x(g[0])," - ",x(g[g.length-1])]})}),P("div",{className:L("moonui-theme",_V({size:t}),e),"data-disabled":p?!0:void 0,children:[d("div",{ref:b,className:L(VV({variant:o||a||"default"})),onClick:T,children:d("div",{className:L(BV({variant:r||a||"primary"})),style:{left:"0%",width:`${y(g[0],R,w)}%`}})}),g.map((O,V)=>d("div",{className:L(HV({variant:a||"primary",size:n})),style:{left:`${y(O,R,w)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:n==="sm"?"-6px":n==="lg"?"-12px":"-8px",cursor:p?"not-allowed":"pointer"},onMouseDown:M(V),onKeyDown:A(V),"aria-label":`Thumb ${V+1}`,tabIndex:p?-1:0,role:"slider","aria-valuemin":R,"aria-valuemax":w,"aria-valuenow":O,"aria-disabled":p},V))]})]})});qo.displayName="Slider";var rP=Q("relative inline-flex items-center justify-center",{variants:{size:{md:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16",default:"h-10 w-10"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"md",shape:"square"}});function aP(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function nP(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function UV(e){let t=aP(e);if(!t)return null;let o=t.r/255,r=t.g/255,a=t.b/255,n=Math.max(o,r,a),s=Math.min(o,r,a),i=0,l=0,u=(n+s)/2;if(n!==s){let c=n-s;switch(l=u>.5?c/(2-n-s):c/(n+s),n){case o:i=((r-a)/c+(r<a?6:0))/6;break;case r:i=((a-o)/c+2)/6;break;case a:i=((o-r)/c+4)/6;break}}return{h:Math.round(i*360),s:Math.round(l*100),l:Math.round(u*100)}}function GV(e,t,o){e=e/360,t=t/100,o=o/100;let r,a,n;if(t===0)r=a=n=o;else{let s=(u,c,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?u+(c-u)*6*f:f<.5?c:f<.6666666666666666?u+(c-u)*(.6666666666666666-f)*6:u),i=o<.5?o*(1+t):o+t-o*t,l=2*o-i;r=s(l,i,e+1/3),a=s(l,i,e),n=s(l,i,e-1/3)}return nP(Math.round(r*255),Math.round(a*255),Math.round(n*255))}var sP=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function yd({className:e,size:t,shape:o,value:r="#000000",onChange:a,showInput:n=!0,showPresets:s=!0,presets:i=sP,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:f="click",disabled:p,...m}){let[h,g]=k(!1),[v,x]=k(r),[y,b]=k(100),[R,w]=k(!1),[I,S]=k(r),T=Z(()=>UV(v)||{h:0,s:0,l:0},[v]),M=Z(()=>aP(v)||{r:0,g:0,b:0},[v]);D(()=>{x(r),S(r)},[r]);let A=U=>{x(U),S(U),a?.(U)},O=(U,G)=>{let z={...T,[U]:G},_=GV(z.h,z.s,z.l);A(_)},V=(U,G)=>{let z={...M,[U]:G},_=nP(z.r,z.g,z.b);A(_)},q=U=>{let G=U.target.value;S(G),/^#[0-9A-F]{6}$/i.test(G)&&A(G)},F=async()=>{try{let U=v;u==="rgb"?U=`rgb(${M.r}, ${M.g}, ${M.b})`:u==="hsl"&&(U=`hsl(${T.h}, ${T.s}%, ${T.l}%)`),await navigator.clipboard.writeText(U),w(!0),setTimeout(()=>w(!1),2e3)}catch(U){console.error("Failed to copy:",U)}},$=()=>u==="rgb"?`rgb(${M.r}, ${M.g}, ${M.b})`:u==="hsl"?`hsl(${T.h}, ${T.s}%, ${T.l}%)`:v;return P(zo,{open:h,onOpenChange:g,children:[d(Wo,{asChild:!0,children:d(Le,{variant:"outline",className:L(rP({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:v},disabled:p,...m,children:d("span",{className:"sr-only",children:"Pick a color"})})}),P(Ro,{className:"w-80",align:"start",sideOffset:8,children:[P(Rl,{defaultValue:"picker",className:"w-full",children:[P(Il,{className:"grid w-full grid-cols-3",children:[d(qa,{value:"picker",children:"Picker"}),d(qa,{value:"sliders",children:"Sliders"}),d(qa,{value:"input",children:"Input"})]}),P($a,{value:"picker",className:"space-y-4",children:[P("div",{className:"relative h-48 rounded-md overflow-hidden",children:[d("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${T.h}, 100%, 50%))`}}),d("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),d(_e.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:v,left:`${T.s/100*280-8}px`,top:`${(1-T.l/100)*192-8}px`}})]}),P("div",{className:"space-y-2",children:[d(Pt,{children:"Hue"}),d("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:d(qo,{value:[T.h],onValueChange:([U])=>O("h",U),max:360,step:1,className:"absolute inset-0"})})]}),l&&P("div",{className:"space-y-2",children:[d(Pt,{children:"Opacity"}),P("div",{className:"flex items-center gap-3",children:[d(qo,{value:[y],onValueChange:([U])=>b(U),max:100,step:1,className:"flex-1"}),P("span",{className:"text-sm w-10 text-right",children:[y,"%"]})]})]})]}),P($a,{value:"sliders",className:"space-y-4",children:[P("div",{className:"space-y-3",children:[P("div",{className:"space-y-2",children:[P("div",{className:"flex items-center justify-between",children:[d(Pt,{children:"Red"}),d("span",{className:"text-sm text-muted-foreground",children:M.r})]}),d(qo,{value:[M.r],onValueChange:([U])=>V("r",U),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),P("div",{className:"space-y-2",children:[P("div",{className:"flex items-center justify-between",children:[d(Pt,{children:"Green"}),d("span",{className:"text-sm text-muted-foreground",children:M.g})]}),d(qo,{value:[M.g],onValueChange:([U])=>V("g",U),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),P("div",{className:"space-y-2",children:[P("div",{className:"flex items-center justify-between",children:[d(Pt,{children:"Blue"}),d("span",{className:"text-sm text-muted-foreground",children:M.b})]}),d(qo,{value:[M.b],onValueChange:([U])=>V("b",U),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),d("div",{className:"pt-2 border-t",children:P("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[P("div",{children:[d("p",{className:"text-muted-foreground",children:"H"}),P("p",{className:"font-medium",children:[T.h,"\xB0"]})]}),P("div",{children:[d("p",{className:"text-muted-foreground",children:"S"}),P("p",{className:"font-medium",children:[T.s,"%"]})]}),P("div",{children:[d("p",{className:"text-muted-foreground",children:"L"}),P("p",{className:"font-medium",children:[T.l,"%"]})]})]})})]}),P($a,{value:"input",className:"space-y-4",children:[P("div",{className:"space-y-2",children:[d(Pt,{children:"Hex Color"}),P("div",{className:"flex gap-2",children:[d(mt,{value:I,onChange:q,placeholder:"#000000",className:"font-mono"}),d(Le,{size:"icon",variant:"outline",onClick:()=>A(I),children:d(gt,{className:"h-4 w-4"})})]})]}),P("div",{className:"space-y-2",children:[d(Pt,{children:"RGB Values"}),P("div",{className:"grid grid-cols-3 gap-2",children:[d(mt,{type:"number",value:M.r,onChange:U=>V("r",parseInt(U.target.value)||0),min:0,max:255,className:"text-center"}),d(mt,{type:"number",value:M.g,onChange:U=>V("g",parseInt(U.target.value)||0),min:0,max:255,className:"text-center"}),d(mt,{type:"number",value:M.b,onChange:U=>V("b",parseInt(U.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),P("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[P("div",{className:"flex items-center gap-3",children:[d("div",{className:L("h-10 w-10 rounded border-2",rP({shape:o})),style:{backgroundColor:v}}),P("div",{children:[d("p",{className:"text-sm font-medium",children:$()}),d("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&d(Le,{size:"icon",variant:"ghost",onClick:F,className:"h-8 w-8",children:d(tr,{mode:"wait",children:R?d(_e.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:d(gt,{className:"h-4 w-4 text-green-600"})},"check"):d(_e.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:d(qs,{className:"h-4 w-4"})},"copy")})})]}),s&&i.length>0&&P("div",{className:"mt-4 space-y-2",children:[d(Pt,{children:"Preset Colors"}),d("div",{className:"grid grid-cols-10 gap-1",children:i.map(U=>d("button",{type:"button","aria-label":`Select color ${U}`,"aria-pressed":v===U,className:L("h-7 w-7 rounded border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",v===U?"border-primary":"border-transparent"),style:{backgroundColor:U},onClick:()=>A(U)},U))})]})]})]})}function iP({value:e="#000000",onChange:t,colors:o=sP.slice(0,10),className:r,size:a="md"}){let n={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",default:"h-8 w-8"};return d("div",{className:L("moonui-theme","flex flex-wrap gap-2",r),children:o.map(s=>d("button",{type:"button","aria-label":`Select color ${s}`,"aria-pressed":e===s,className:L("rounded-full border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n[a],e===s?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:s},onClick:()=>t?.(s)},s))})}function lP({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,a]=k(e),n=(s,i)=>{let l={...r,[s]:i};a(l),t?.(l)};return P("div",{className:L("moonui-theme","space-y-4",o),children:[d("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),P("div",{className:"grid grid-cols-2 gap-4",children:[P("div",{className:"space-y-2",children:[d(Pt,{children:"Start Color"}),d(yd,{value:r.start,onChange:s=>n("start",s),size:"sm"})]}),P("div",{className:"space-y-2",children:[d(Pt,{children:"End Color"}),d(yd,{value:r.end,onChange:s=>n("end",s),size:"sm"})]})]}),P("div",{className:"space-y-2",children:[P("div",{className:"flex items-center justify-between",children:[d(Pt,{children:"Angle"}),P("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),d(qo,{value:[r.angle||90],onValueChange:([s])=>n("angle",s),max:360,step:1})]})]})}N();var uP=1,zV=.9,WV=.8,qV=.17,Vg=.1,Bg=.999,$V=.9999,jV=.99,KV=/[\\\/_+.#"@\[\(\{&]/,XV=/[\\\/_+.#"@\[\(\{&]/g,YV=/[\s-]/,dP=/[\s-]/g;function Hg(e,t,o,r,a,n,s){if(n===t.length)return a===e.length?uP:jV;var i=`${a},${n}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(n),u=o.indexOf(l,a),c=0,f,p,m,h;u>=0;)f=Hg(e,t,o,r,u+1,n+1,s),f>c&&(u===a?f*=uP:KV.test(e.charAt(u-1))?(f*=WV,m=e.slice(a,u-1).match(XV),m&&a>0&&(f*=Math.pow(Bg,m.length))):YV.test(e.charAt(u-1))?(f*=zV,h=e.slice(a,u-1).match(dP),h&&a>0&&(f*=Math.pow(Bg,h.length))):(f*=qV,a>0&&(f*=Math.pow(Bg,u-a))),e.charAt(u)!==t.charAt(n)&&(f*=$V)),(f<Vg&&o.charAt(u-1)===r.charAt(n+1)||r.charAt(n+1)===r.charAt(n)&&o.charAt(u-1)!==r.charAt(n))&&(p=Hg(e,t,o,r,u+1,n+2,s),p*Vg>f&&(f=p*Vg)),f>c&&(c=f),u=o.indexOf(l,u+1);return s[i]=c,c}function cP(e){return e.toLowerCase().replace(dP," ")}function fP(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Hg(e,t,cP(e),cP(t),0,0,{})}N();var Cd="Dialog",[pP,Jpe]=ke(Cd),[ZV,Io]=pP(Cd),mP=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!0}=e,i=E(null),l=E(null),[u,c]=Be({prop:r,defaultProp:a??!1,onChange:n,caller:Cd});return d(ZV,{scope:t,triggerRef:i,contentRef:l,contentId:Te(),titleId:Te(),descriptionId:Te(),open:u,onOpenChange:c,onOpenToggle:H(()=>c(f=>!f),[c]),modal:s,children:o})};mP.displayName=Cd;var gP="DialogTrigger",hP=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Io(gP,o),n=fe(t,a.triggerRef);return d(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":zg(a.open),...r,ref:n,onClick:X(e.onClick,a.onOpenToggle)})});hP.displayName=gP;var Ug="DialogPortal",[QV,vP]=pP(Ug,{forceMount:void 0}),xP=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:a}=e,n=Io(Ug,t);return d(QV,{scope:t,forceMount:o,children:Pe.map(r,s=>d($e,{present:o||n.open,children:d(Ht,{asChild:!0,container:a,children:s})}))})};xP.displayName=Ug;var bd="DialogOverlay",yP=C((e,t)=>{let o=vP(bd,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=Io(bd,e.__scopeDialog);return n.modal?d($e,{present:r||n.open,children:d(eB,{...a,ref:t})}):null});yP.displayName=bd;var JV=Tt("DialogOverlay.RemoveScroll"),eB=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Io(bd,o);return d(pr,{as:JV,allowPinchZoom:!0,shards:[a.contentRef],children:d(Y.div,{"data-state":zg(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ja="DialogContent",bP=C((e,t)=>{let o=vP(ja,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=Io(ja,e.__scopeDialog);return d($e,{present:r||n.open,children:n.modal?d(tB,{...a,ref:t}):d(oB,{...a,ref:t})})});bP.displayName=ja;var tB=C((e,t)=>{let o=Io(ja,e.__scopeDialog),r=E(null),a=fe(t,o.contentRef,r);return D(()=>{let n=r.current;if(n)return zr(n)},[]),d(CP,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,n=>{let s=n.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&n.preventDefault()}),onFocusOutside:X(e.onFocusOutside,n=>n.preventDefault())})}),oB=C((e,t)=>{let o=Io(ja,e.__scopeDialog),r=E(!1),a=E(!1);return d(CP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),CP=C((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,...s}=e,i=Io(ja,o),l=E(null),u=fe(t,l);return Br(),P(Ve,{children:[d(ur,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d(Xt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":zg(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),P(Ve,{children:[d(rB,{titleId:i.titleId}),d(nB,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Gg="DialogTitle",wP=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Io(Gg,o);return d(Y.h2,{id:a.titleId,...r,ref:t})});wP.displayName=Gg;var SP="DialogDescription",RP=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Io(SP,o);return d(Y.p,{id:a.descriptionId,...r,ref:t})});RP.displayName=SP;var IP="DialogClose",PP=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Io(IP,o);return d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>a.onOpenChange(!1))})});PP.displayName=IP;function zg(e){return e?"open":"closed"}var LP="DialogTitleWarning",[eme,TP]=Ry(LP,{contentName:ja,titleName:Gg,docsSlug:"dialog"}),rB=({titleId:e})=>{let t=TP(LP),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
54
+
55
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
56
+
57
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return D(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},aB="DialogDescriptionWarning",nB=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${TP(aB).contentName}}.`;return D(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},wd=mP,MP=hP,Sd=xP,Pl=yP,Ll=bP,Wg=wP,qg=RP,$g=PP;N();var Tl='[cmdk-group=""]',jg='[cmdk-group-items=""]',sB='[cmdk-group-heading=""]',AP='[cmdk-item=""]',EP=`${AP}:not([aria-disabled="true"])`,Kg="cmdk-item-select",cs="data-value",iB=(e,t,o)=>fP(e,t,o),DP=ue(void 0),Ml=()=>re(DP),NP=ue(void 0),Xg=()=>re(NP),OP=ue(void 0),FP=C((e,t)=>{let o=ds(()=>{var W,te;return{search:"",value:(te=(W=e.value)!=null?W:e.defaultValue)!=null?te:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ds(()=>new Set),a=ds(()=>new Map),n=ds(()=>new Map),s=ds(()=>new Set),i=_P(e),{label:l,children:u,value:c,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:v=!0,...x}=e,y=Te(),b=Te(),R=Te(),w=E(null),I=xB();Ka(()=>{if(c!==void 0){let W=c.trim();o.current.value=W,S.emit()}},[c]),Ka(()=>{I(6,q)},[]);let S=Z(()=>({subscribe:W=>(s.current.add(W),()=>s.current.delete(W)),snapshot:()=>o.current,setState:(W,te,ne)=>{var ee,de,K,se;if(!Object.is(o.current[W],te)){if(o.current[W]=te,W==="search")V(),A(),I(1,O);else if(W==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ve=document.getElementById(R);ve?ve.focus():(ee=document.getElementById(y))==null||ee.focus()}if(I(7,()=>{var ve;o.current.selectedItemId=(ve=F())==null?void 0:ve.id,S.emit()}),ne||I(5,q),((de=i.current)==null?void 0:de.value)!==void 0){let ve=te??"";(se=(K=i.current).onValueChange)==null||se.call(K,ve);return}}S.emit()}},emit:()=>{s.current.forEach(W=>W())}}),[]),T=Z(()=>({value:(W,te,ne)=>{var ee;te!==((ee=n.current.get(W))==null?void 0:ee.value)&&(n.current.set(W,{value:te,keywords:ne}),o.current.filtered.items.set(W,M(te,ne)),I(2,()=>{A(),S.emit()}))},item:(W,te)=>(r.current.add(W),te&&(a.current.has(te)?a.current.get(te).add(W):a.current.set(te,new Set([W]))),I(3,()=>{V(),A(),o.current.value||O(),S.emit()}),()=>{n.current.delete(W),r.current.delete(W),o.current.filtered.items.delete(W);let ne=F();I(4,()=>{V(),ne?.getAttribute("id")===W&&O(),S.emit()})}),group:W=>(a.current.has(W)||a.current.set(W,new Set),()=>{n.current.delete(W),a.current.delete(W)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:R,labelId:b,listInnerRef:w}),[]);function M(W,te){var ne,ee;let de=(ee=(ne=i.current)==null?void 0:ne.filter)!=null?ee:iB;return W?de(W,o.current.search,te):0}function A(){if(!o.current.search||i.current.shouldFilter===!1)return;let W=o.current.filtered.items,te=[];o.current.filtered.groups.forEach(ee=>{let de=a.current.get(ee),K=0;de.forEach(se=>{let ve=W.get(se);K=Math.max(ve,K)}),te.push([ee,K])});let ne=w.current;$().sort((ee,de)=>{var K,se;let ve=ee.getAttribute("id"),xe=de.getAttribute("id");return((K=W.get(xe))!=null?K:0)-((se=W.get(ve))!=null?se:0)}).forEach(ee=>{let de=ee.closest(jg);de?de.appendChild(ee.parentElement===de?ee:ee.closest(`${jg} > *`)):ne.appendChild(ee.parentElement===ne?ee:ee.closest(`${jg} > *`))}),te.sort((ee,de)=>de[1]-ee[1]).forEach(ee=>{var de;let K=(de=w.current)==null?void 0:de.querySelector(`${Tl}[${cs}="${encodeURIComponent(ee[0])}"]`);K?.parentElement.appendChild(K)})}function O(){let W=$().find(ne=>ne.getAttribute("aria-disabled")!=="true"),te=W?.getAttribute(cs);S.setState("value",te||void 0)}function V(){var W,te,ne,ee;if(!o.current.search||i.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let de=0;for(let K of r.current){let se=(te=(W=n.current.get(K))==null?void 0:W.value)!=null?te:"",ve=(ee=(ne=n.current.get(K))==null?void 0:ne.keywords)!=null?ee:[],xe=M(se,ve);o.current.filtered.items.set(K,xe),xe>0&&de++}for(let[K,se]of a.current)for(let ve of se)if(o.current.filtered.items.get(ve)>0){o.current.filtered.groups.add(K);break}o.current.filtered.count=de}function q(){var W,te,ne;let ee=F();ee&&(((W=ee.parentElement)==null?void 0:W.firstChild)===ee&&((ne=(te=ee.closest(Tl))==null?void 0:te.querySelector(sB))==null||ne.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function F(){var W;return(W=w.current)==null?void 0:W.querySelector(`${AP}[aria-selected="true"]`)}function $(){var W;return Array.from(((W=w.current)==null?void 0:W.querySelectorAll(EP))||[])}function U(W){let te=$()[W];te&&S.setState("value",te.getAttribute(cs))}function G(W){var te;let ne=F(),ee=$(),de=ee.findIndex(se=>se===ne),K=ee[de+W];(te=i.current)!=null&&te.loop&&(K=de+W<0?ee[ee.length-1]:de+W===ee.length?ee[0]:ee[de+W]),K&&S.setState("value",K.getAttribute(cs))}function z(W){let te=F(),ne=te?.closest(Tl),ee;for(;ne&&!ee;)ne=W>0?hB(ne,Tl):vB(ne,Tl),ee=ne?.querySelector(EP);ee?S.setState("value",ee.getAttribute(cs)):G(W)}let _=()=>U($().length-1),ae=W=>{W.preventDefault(),W.metaKey?_():W.altKey?z(1):G(1)},ie=W=>{W.preventDefault(),W.metaKey?U(0):W.altKey?z(-1):G(-1)};return pe(Y.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:W=>{var te;(te=x.onKeyDown)==null||te.call(x,W);let ne=W.nativeEvent.isComposing||W.keyCode===229;if(!(W.defaultPrevented||ne))switch(W.key){case"n":case"j":{v&&W.ctrlKey&&ae(W);break}case"ArrowDown":{ae(W);break}case"p":case"k":{v&&W.ctrlKey&&ie(W);break}case"ArrowUp":{ie(W);break}case"Home":{W.preventDefault(),U(0);break}case"End":{W.preventDefault(),_();break}case"Enter":{W.preventDefault();let ee=F();if(ee){let de=new Event(Kg);ee.dispatchEvent(de)}}}}},pe("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:bB},l),Rd(e,W=>pe(NP.Provider,{value:S},pe(DP.Provider,{value:T},W))))}),lB=C((e,t)=>{var o,r;let a=Te(),n=E(null),s=re(OP),i=Ml(),l=_P(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:s?.forceMount;Ka(()=>{if(!u)return i.item(a,s?.id)},[u]);let c=VP(a,n,[e.value,e.children,n],e.keywords),f=Xg(),p=qr(I=>I.value&&I.value===c.current),m=qr(I=>u||i.filter()===!1?!0:I.search?I.filtered.items.get(a)>0:!0);D(()=>{let I=n.current;if(!(!I||e.disabled))return I.addEventListener(Kg,h),()=>I.removeEventListener(Kg,h)},[m,e.onSelect,e.disabled]);function h(){var I,S;g(),(S=(I=l.current).onSelect)==null||S.call(I,c.current)}function g(){f.setState("value",c.current,!0)}if(!m)return null;let{disabled:v,value:x,onSelect:y,forceMount:b,keywords:R,...w}=e;return pe(Y.div,{ref:Ft(n,t),...w,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||i.getDisablePointerSelection()?void 0:g,onClick:v?void 0:h},e.children)}),uB=C((e,t)=>{let{heading:o,children:r,forceMount:a,...n}=e,s=Te(),i=E(null),l=E(null),u=Te(),c=Ml(),f=qr(m=>a||c.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);Ka(()=>c.group(s),[]),VP(s,i,[e.value,e.heading,l]);let p=Z(()=>({id:s,forceMount:a}),[a]);return pe(Y.div,{ref:Ft(i,t),...n,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},o&&pe("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),Rd(e,m=>pe("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},pe(OP.Provider,{value:p},m))))}),cB=C((e,t)=>{let{alwaysRender:o,...r}=e,a=E(null),n=qr(s=>!s.search);return!o&&!n?null:pe(Y.div,{ref:Ft(a,t),...r,"cmdk-separator":"",role:"separator"})}),dB=C((e,t)=>{let{onValueChange:o,...r}=e,a=e.value!=null,n=Xg(),s=qr(u=>u.search),i=qr(u=>u.selectedItemId),l=Ml();return D(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),pe(Y.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:a?e.value:s,onChange:u=>{a||n.setState("search",u.target.value),o?.(u.target.value)}})}),fB=C((e,t)=>{let{children:o,label:r="Suggestions",...a}=e,n=E(null),s=E(null),i=qr(u=>u.selectedItemId),l=Ml();return D(()=>{if(s.current&&n.current){let u=s.current,c=n.current,f,p=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=u.offsetHeight;c.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(f),p.unobserve(u)}}},[]),pe(Y.div,{ref:Ft(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},Rd(e,u=>pe("div",{ref:Ft(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),pB=C((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:a,contentClassName:n,container:s,...i}=e;return pe(wd,{open:o,onOpenChange:r},pe(Sd,{container:s},pe(Pl,{"cmdk-overlay":"",className:a}),pe(Ll,{"aria-label":e.label,"cmdk-dialog":"",className:n},pe(FP,{ref:t,...i}))))}),mB=C((e,t)=>qr(o=>o.filtered.count===0)?pe(Y.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),gB=C((e,t)=>{let{progress:o,children:r,label:a="Loading...",...n}=e;return pe(Y.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Rd(e,s=>pe("div",{"aria-hidden":!0},s)))}),$r=Object.assign(FP,{List:fB,Item:lB,Input:dB,Group:uB,Separator:cB,Dialog:pB,Empty:mB,Loading:gB});function hB(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function vB(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function _P(e){let t=E(e);return Ka(()=>{t.current=e}),t}var Ka=typeof window>"u"?D:dt;function ds(e){let t=E();return t.current===void 0&&(t.current=e()),t}function qr(e){let t=Xg(),o=()=>e(t.snapshot());return Lf(t.subscribe,o,o)}function VP(e,t,o,r=[]){let a=E(),n=Ml();return Ka(()=>{var s;let i=(()=>{var u;for(let c of o){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():a.current}})(),l=r.map(u=>u.trim());n.value(e,i,l),(s=t.current)==null||s.setAttribute(cs,i),a.current=i}),a}var xB=()=>{let[e,t]=k(),o=ds(()=>new Map);return Ka(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,a)=>{o.current.set(r,a),t({})}};function yB(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Rd({asChild:e,children:t},o){return e&&Ee(t)?Fe(yB(t),{ref:t.ref},o(t.props.children)):o(t)}var bB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};N();var Id=wd,BP=MP,CB=Sd,HP=$g,wB=Q("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),UP=C(({className:e,variant:t,animation:o,...r},a)=>d(Pl,{ref:a,className:L("moonui-theme",wB({variant:t,animation:o}),e),...r}));UP.displayName=Pl.displayName;var SB=Q("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",lg:"max-w-lg p-6",md:"max-w-md p-6",xl:"max-w-2xl p-7","2xl":"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6",default:"max-w-lg p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"lg",radius:"default",animation:"default",position:"default"}}),kl=C(({className:e,children:t,variant:o,size:r,radius:a,animation:n,position:s,overlayVariant:i="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:f,icon:p,loading:m=!1,success:h=!1,onClose:g,...v},x)=>{let y=()=>{g&&g()};return P(CB,{children:[d(UP,{variant:i,animation:l,onClick:u?void 0:y}),P(Ll,{ref:x,onEscapeKeyDown:u?void 0:y,onInteractOutside:u?void 0:y,className:L(SB({variant:o,size:r,radius:a,animation:n,position:s}),"outline-none",m&&"pointer-events-none",h&&"border-success/40",e),...v,children:[(c||f||p)&&P(Pd,{className:"flex gap-4",children:[(p||m||h)&&P("div",{className:"flex shrink-0 items-center justify-center",children:[m&&d(rt,{className:"h-5 w-5 animate-spin text-primary"}),h&&d(gt,{className:"h-5 w-5 text-success"}),!m&&!h&&p&&d("span",{className:"text-primary",children:p})]}),P("div",{className:"flex-1",children:[c&&d(fs,{children:c}),f&&d(Ld,{children:f})]})]}),t,!u&&P($g,{onClick:y,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[d(_t,{className:"h-4 w-4"}),d("span",{className:"sr-only",children:"Close"})]})]})]})});kl.displayName=Ll.displayName;var Pd=({className:e,...t})=>d("div",{className:L("flex flex-col space-y-2 text-center sm:text-left",e),...t});Pd.displayName="DialogHeader";var Yg=({className:e,...t})=>d("div",{className:L("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});Yg.displayName="DialogFooter";var fs=C(({className:e,...t},o)=>d(Wg,{ref:o,className:L("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));fs.displayName=Wg.displayName;var Ld=C(({className:e,...t},o)=>d(qg,{ref:o,className:L("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));Ld.displayName=qg.displayName;var Zg=C(({className:e,...t},o)=>d("form",{ref:o,className:L("moonui-theme","flex flex-col gap-4",e),...t}));Zg.displayName="DialogForm";var RB=Q("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",md:"min-h-[300px]",lg:"min-h-[400px]",default:"min-h-[300px]"}},defaultVariants:{variant:"default",size:"md"}}),Td=C(({className:e,variant:t,size:o,...r},a)=>d($r,{ref:a,className:L("moonui-theme",RB({variant:t,size:o}),e),...r}));Td.displayName="Command";var GP=({children:e,commandClassName:t,...o})=>d(Id,{...o,children:P(kl,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[d(fs,{className:"sr-only",children:"Command Menu"}),d(Td,{className:L("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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",t),children:e})]})}),Qg=C(({className:e,...t},o)=>P("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d(ca,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),d($r.Input,{ref:o,className:L("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Qg.displayName="CommandInput";var Jg=C(({className:e,...t},o)=>d($r.List,{ref:o,className:L("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Jg.displayName="CommandList";var eh=C(({className:e,...t},o)=>d($r.Empty,{ref:o,className:L("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));eh.displayName="CommandEmpty";var th=C(({className:e,...t},o)=>d($r.Group,{ref:o,className:L("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));th.displayName="CommandGroup";var oh=C(({className:e,...t},o)=>d($r.Separator,{ref:o,"aria-hidden":"true",className:L("moonui-theme","-mx-1 h-px bg-border",e),...t}));oh.displayName="CommandSeparator";var rh=C(({className:e,...t},o)=>d($r.Item,{ref:o,className:L("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));rh.displayName="CommandItem";var ah=({className:e,...t})=>d("span",{className:L("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ah.displayName="CommandShortcut";N();N();function jr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return o=>{t.setState(r=>({...r,[e]:jr(o,r[e])}))}}function Ad(e){return e instanceof Function}function IB(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function PB(e,t){let o=[],r=a=>{a.forEach(n=>{o.push(n);let s=t(n);s!=null&&s.length&&r(s)})};return r(e),o}function ge(e,t,o){let r=[],a;return n=>{let s;o.key&&o.debug&&(s=Date.now());let i=e(n);if(!(i.length!==r.length||i.some((c,f)=>r[f]!==c)))return a;r=i;let u;if(o.key&&o.debug&&(u=Date.now()),a=t(...i),o==null||o.onChange==null||o.onChange(a),o.key&&o.debug&&o!=null&&o.debug()){let c=Math.round((Date.now()-s)*100)/100,f=Math.round((Date.now()-u)*100)/100,p=f/16,m=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c\u23F1 ${m(f,5)} /${m(c,5)} ms`,`
58
+ font-size: .6rem;
59
+ font-weight: bold;
60
+ color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,o?.key)}return a}}function he(e,t,o,r){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function LB(e,t,o,r){let a=()=>{var s;return(s=n.getValue())!=null?s:e.options.renderFallbackValue},n={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(r),renderValue:a,getContext:ge(()=>[e,o,t,n],(s,i,l,u)=>({table:s,column:i,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),he(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(n,o,t,e)},{}),n}function TB(e,t,o,r){var a,n;let i={...e._getDefaultColumnDef(),...t},l=i.accessorKey,u=(a=(n=i.id)!=null?n:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?a:typeof i.header=="string"?i.header:void 0,c;if(i.accessorFn?c=i.accessorFn:l&&(l.includes(".")?c=p=>{let m=p;for(let g of l.split(".")){var h;m=(h=m)==null?void 0:h[g]}return m}:c=p=>p[i.accessorKey]),!u)throw new Error;let f={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:i,columns:[],getFlatColumns:ge(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},he(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ge(()=>[e._getOrderColumnsFn()],p=>{var m;if((m=f.columns)!=null&&m.length){let h=f.columns.flatMap(g=>g.getLeafColumns());return p(h)}return[f]},he(e.options,"debugColumns","column.getLeafColumns"))};for(let p of e._features)p.createColumn==null||p.createColumn(f,e);return f}var bt="debugHeaders";function zP(e,t,o){var r;let n={id:(r=o.id)!=null?r:t.id,column:t,index:o.index,isPlaceholder:!!o.isPlaceholder,placeholderId:o.placeholderId,depth:o.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let s=[],i=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(i),s.push(l)};return i(n),s},getContext:()=>({table:e,header:n,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(n,e)}),n}var MB={createTable:e=>{e.getHeaderGroups=ge(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,a)=>{var n,s;let i=(n=r?.map(f=>o.find(p=>p.id===f)).filter(Boolean))!=null?n:[],l=(s=a?.map(f=>o.find(p=>p.id===f)).filter(Boolean))!=null?s:[],u=o.filter(f=>!(r!=null&&r.includes(f.id))&&!(a!=null&&a.includes(f.id)));return Md(t,[...i,...u,...l],e)},he(e.options,bt,"getHeaderGroups")),e.getCenterHeaderGroups=ge(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,a)=>(o=o.filter(n=>!(r!=null&&r.includes(n.id))&&!(a!=null&&a.includes(n.id))),Md(t,o,e,"center")),he(e.options,bt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ge(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,o,r)=>{var a;let n=(a=r?.map(s=>o.find(i=>i.id===s)).filter(Boolean))!=null?a:[];return Md(t,n,e,"left")},he(e.options,bt,"getLeftHeaderGroups")),e.getRightHeaderGroups=ge(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,o,r)=>{var a;let n=(a=r?.map(s=>o.find(i=>i.id===s)).filter(Boolean))!=null?a:[];return Md(t,n,e,"right")},he(e.options,bt,"getRightHeaderGroups")),e.getFooterGroups=ge(()=>[e.getHeaderGroups()],t=>[...t].reverse(),he(e.options,bt,"getFooterGroups")),e.getLeftFooterGroups=ge(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),he(e.options,bt,"getLeftFooterGroups")),e.getCenterFooterGroups=ge(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),he(e.options,bt,"getCenterFooterGroups")),e.getRightFooterGroups=ge(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),he(e.options,bt,"getRightFooterGroups")),e.getFlatHeaders=ge(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),he(e.options,bt,"getFlatHeaders")),e.getLeftFlatHeaders=ge(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),he(e.options,bt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ge(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),he(e.options,bt,"getCenterFlatHeaders")),e.getRightFlatHeaders=ge(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),he(e.options,bt,"getRightFlatHeaders")),e.getCenterLeafHeaders=ge(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),he(e.options,bt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ge(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),he(e.options,bt,"getLeftLeafHeaders")),e.getRightLeafHeaders=ge(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),he(e.options,bt,"getRightLeafHeaders")),e.getLeafHeaders=ge(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,o,r)=>{var a,n,s,i,l,u;return[...(a=(n=t[0])==null?void 0:n.headers)!=null?a:[],...(s=(i=o[0])==null?void 0:i.headers)!=null?s:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},he(e.options,bt,"getLeafHeaders"))}};function Md(e,t,o,r){var a,n;let s=0,i=function(p,m){m===void 0&&(m=1),s=Math.max(s,m),p.filter(h=>h.getIsVisible()).forEach(h=>{var g;(g=h.columns)!=null&&g.length&&i(h.columns,m+1)},0)};i(e);let l=[],u=(p,m)=>{let h={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];p.forEach(v=>{let x=[...g].reverse()[0],y=v.column.depth===h.depth,b,R=!1;if(y&&v.column.parent?b=v.column.parent:(b=v.column,R=!0),x&&x?.column===b)x.subHeaders.push(v);else{let w=zP(o,b,{id:[r,m,b.id,v?.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${g.filter(I=>I.column===b).length}`:void 0,depth:m,index:g.length});w.subHeaders.push(v),g.push(w)}h.headers.push(v),v.headerGroup=h}),l.push(h),m>0&&u(g,m-1)},c=t.map((p,m)=>zP(o,p,{depth:s,index:m}));u(c,s-1),l.reverse();let f=p=>p.filter(h=>h.column.getIsVisible()).map(h=>{let g=0,v=0,x=[0];h.subHeaders&&h.subHeaders.length?(x=[],f(h.subHeaders).forEach(b=>{let{colSpan:R,rowSpan:w}=b;g+=R,x.push(w)})):g=1;let y=Math.min(...x);return v=v+y,h.colSpan=g,h.rowSpan=v,{colSpan:g,rowSpan:v}});return f((a=(n=l[0])==null?void 0:n.headers)!=null?a:[]),l}var vh=(e,t,o,r,a,n,s)=>{let i={id:t,index:r,original:o,depth:a,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(i._valuesCache.hasOwnProperty(l))return i._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return i._valuesCache[l]=u.accessorFn(i.original,r),i._valuesCache[l]},getUniqueValues:l=>{if(i._uniqueValuesCache.hasOwnProperty(l))return i._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(i._uniqueValuesCache[l]=u.columnDef.getUniqueValues(i.original,r),i._uniqueValuesCache[l]):(i._uniqueValuesCache[l]=[i.getValue(l)],i._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=i.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:n??[],getLeafRows:()=>PB(i.subRows,l=>l.subRows),getParentRow:()=>i.parentId?e.getRow(i.parentId,!0):void 0,getParentRows:()=>{let l=[],u=i;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:ge(()=>[e.getAllLeafColumns()],l=>l.map(u=>LB(e,i,u,u.id)),he(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ge(()=>[i.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),he(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(i,e)}return i},kB={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},qP=(e,t,o)=>{var r,a;let n=o==null||(r=o.toString())==null?void 0:r.toLowerCase();return!!(!((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(n))};qP.autoRemove=e=>Po(e);var $P=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};$P.autoRemove=e=>Po(e);var jP=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};jP.autoRemove=e=>Po(e);var KP=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};KP.autoRemove=e=>Po(e);var XP=(e,t,o)=>!o.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});XP.autoRemove=e=>Po(e)||!(e!=null&&e.length);var YP=(e,t,o)=>o.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});YP.autoRemove=e=>Po(e)||!(e!=null&&e.length);var ZP=(e,t,o)=>e.getValue(t)===o;ZP.autoRemove=e=>Po(e);var QP=(e,t,o)=>e.getValue(t)==o;QP.autoRemove=e=>Po(e);var xh=(e,t,o)=>{let[r,a]=o,n=e.getValue(t);return n>=r&&n<=a};xh.resolveFilterValue=e=>{let[t,o]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof o!="number"?parseFloat(o):o,n=t===null||Number.isNaN(r)?-1/0:r,s=o===null||Number.isNaN(a)?1/0:a;if(n>s){let i=n;n=s,s=i}return[n,s]};xh.autoRemove=e=>Po(e)||Po(e[0])&&Po(e[1]);var mr={includesString:qP,includesStringSensitive:$P,equalsString:jP,arrIncludes:KP,arrIncludesAll:XP,arrIncludesSome:YP,equals:ZP,weakEquals:QP,inNumberRange:xh};function Po(e){return e==null||e===""}var EB={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ut("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);return typeof r=="string"?mr.includesString:typeof r=="number"?mr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?mr.equals:Array.isArray(r)?mr.arrIncludes:mr.weakEquals},e.getFilterFn=()=>{var o,r;return Ad(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(o=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?o:mr[e.columnDef.filterFn]},e.getCanFilter=()=>{var o,r,a;return((o=e.columnDef.enableColumnFilter)!=null?o:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var o;return(o=t.getState().columnFilters)==null||(o=o.find(r=>r.id===e.id))==null?void 0:o.value},e.getFilterIndex=()=>{var o,r;return(o=(r=t.getState().columnFilters)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?o:-1},e.setFilterValue=o=>{t.setColumnFilters(r=>{let a=e.getFilterFn(),n=r?.find(c=>c.id===e.id),s=jr(o,n?n.value:void 0);if(WP(a,s,e)){var i;return(i=r?.filter(c=>c.id!==e.id))!=null?i:[]}let l={id:e.id,value:s};if(n){var u;return(u=r?.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let o=e.getAllLeafColumns(),r=a=>{var n;return(n=jr(t,a))==null?void 0:n.filter(s=>{let i=o.find(l=>l.id===s.id);if(i){let l=i.getFilterFn();if(WP(l,s.value,i))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var o,r;e.setColumnFilters(t?[]:(o=(r=e.initialState)==null?void 0:r.columnFilters)!=null?o:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function WP(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var AB=(e,t,o)=>o.reduce((r,a)=>{let n=a.getValue(e);return r+(typeof n=="number"?n:0)},0),DB=(e,t,o)=>{let r;return o.forEach(a=>{let n=a.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},NB=(e,t,o)=>{let r;return o.forEach(a=>{let n=a.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},OB=(e,t,o)=>{let r,a;return o.forEach(n=>{let s=n.getValue(e);s!=null&&(r===void 0?s>=s&&(r=a=s):(r>s&&(r=s),a<s&&(a=s)))}),[r,a]},FB=(e,t)=>{let o=0,r=0;if(t.forEach(a=>{let n=a.getValue(e);n!=null&&(n=+n)>=n&&(++o,r+=n)}),o)return r/o},_B=(e,t)=>{if(!t.length)return;let o=t.map(n=>n.getValue(e));if(!IB(o))return;if(o.length===1)return o[0];let r=Math.floor(o.length/2),a=o.sort((n,s)=>n-s);return o.length%2!==0?a[r]:(a[r-1]+a[r])/2},VB=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),BB=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,HB=(e,t)=>t.length,nh={sum:AB,min:DB,max:NB,extent:OB,mean:FB,median:_B,unique:VB,uniqueCount:BB,count:HB},UB={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,o;return(t=(o=e.getValue())==null||o.toString==null?void 0:o.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ut("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(o=>o!=null&&o.includes(e.id)?o.filter(r=>r!==e.id):[...o??[],e.id])},e.getCanGroup=()=>{var o,r;return((o=e.columnDef.enableGrouping)!=null?o:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.includes(e.id)},e.getGroupedIndex=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let o=e.getCanGroup();return()=>{o&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);if(typeof r=="number")return nh.sum;if(Object.prototype.toString.call(r)==="[object Date]")return nh.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return Ad(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(o=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?o:nh[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var o,r;e.setGrouping(t?[]:(o=(r=e.initialState)==null?void 0:r.grouping)!=null?o:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=o=>{if(e._groupingValuesCache.hasOwnProperty(o))return e._groupingValuesCache[o];let r=t.getColumn(o);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[o]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[o]):e.getValue(o)},e._groupingValuesCache={}},createCell:(e,t,o,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===o.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=o.subRows)!=null&&a.length)}}};function GB(e,t,o){if(!(t!=null&&t.length)||!o)return e;let r=e.filter(n=>!t.includes(n.id));return o==="remove"?r:[...t.map(n=>e.find(s=>s.id===n)).filter(Boolean),...r]}var zB={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ut("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ge(o=>[Al(t,o)],o=>o.findIndex(r=>r.id===e.id),he(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=Al(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let a=Al(t,o);return((r=a[a.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var o;e.setColumnOrder(t?[]:(o=e.initialState.columnOrder)!=null?o:[])},e._getOrderColumnsFn=ge(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,o,r)=>a=>{let n=[];if(!(t!=null&&t.length))n=a;else{let s=[...t],i=[...a];for(;i.length&&s.length;){let l=s.shift(),u=i.findIndex(c=>c.id===l);u>-1&&n.push(i.splice(u,1)[0])}n=[...n,...i]}return GB(n,o,r)},he(e.options,"debugTable","_getOrderColumnsFn"))}},sh=()=>({left:[],right:[]}),WB={getInitialState:e=>({columnPinning:sh(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ut("columnPinning",e)}),createColumn:(e,t)=>{e.pin=o=>{let r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var n,s;if(o==="right"){var i,l;return{left:((i=a?.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=a?.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(o==="left"){var u,c;return{left:[...((u=a?.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=a?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((n=a?.left)!=null?n:[]).filter(f=>!(r!=null&&r.includes(f))),right:((s=a?.right)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,n,s;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((n=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?n:!0)}),e.getIsPinned=()=>{let o=e.getLeafColumns().map(i=>i.id),{left:r,right:a}=t.getState().columnPinning,n=o.some(i=>r?.includes(i)),s=o.some(i=>a?.includes(i));return n?"left":s?"right":!1},e.getPinnedIndex=()=>{var o,r;let a=e.getIsPinned();return a?(o=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?o:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ge(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(o,r,a)=>{let n=[...r??[],...a??[]];return o.filter(s=>!n.includes(s.column.id))},he(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ge(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(o,r)=>(r??[]).map(n=>o.find(s=>s.column.id===n)).filter(Boolean).map(n=>({...n,position:"left"})),he(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ge(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(o,r)=>(r??[]).map(n=>o.find(s=>s.column.id===n)).filter(Boolean).map(n=>({...n,position:"right"})),he(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var o,r;return e.setColumnPinning(t?sh():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:sh())},e.getIsSomeColumnsPinned=t=>{var o;let r=e.getState().columnPinning;if(!t){var a,n;return!!((a=r.left)!=null&&a.length||(n=r.right)!=null&&n.length)}return!!((o=r[t])!=null&&o.length)},e.getLeftLeafColumns=ge(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),he(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ge(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),he(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ge(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r)=>{let a=[...o??[],...r??[]];return t.filter(n=>!a.includes(n.id))},he(e.options,"debugColumns","getCenterLeafColumns"))}};function qB(e){return e||(typeof document<"u"?document:null)}var kd={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ih=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),$B={getDefaultColumnDef:()=>kd,getInitialState:e=>({columnSizing:{},columnSizingInfo:ih(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ut("columnSizing",e),onColumnSizingInfoChange:Ut("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var o,r,a;let n=t.getState().columnSizing[e.id];return Math.min(Math.max((o=e.columnDef.minSize)!=null?o:kd.minSize,(r=n??e.columnDef.size)!=null?r:kd.size),(a=e.columnDef.maxSize)!=null?a:kd.maxSize)},e.getStart=ge(o=>[o,Al(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((a,n)=>a+n.getSize(),0),he(t.options,"debugColumns","getStart")),e.getAfter=ge(o=>[o,Al(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((a,n)=>a+n.getSize(),0),he(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(o=>{let{[e.id]:r,...a}=o;return a})},e.getCanResize=()=>{var o,r;return((o=e.columnDef.enableResizing)!=null?o:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let o=0,r=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var n;o+=(n=a.column.getSize())!=null?n:0}};return r(e),o},e.getStart=()=>{if(e.index>0){let o=e.headerGroup.headers[e.index-1];return o.getStart()+o.getSize()}return 0},e.getResizeHandler=o=>{let r=t.getColumn(e.column.id),a=r?.getCanResize();return n=>{if(!r||!a||(n.persist==null||n.persist(),lh(n)&&n.touches&&n.touches.length>1))return;let s=e.getSize(),i=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[r.id,r.getSize()]],l=lh(n)?Math.round(n.touches[0].clientX):n.clientX,u={},c=(x,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(b=>{var R,w;let I=t.options.columnResizeDirection==="rtl"?-1:1,S=(y-((R=b?.startOffset)!=null?R:0))*I,T=Math.max(S/((w=b?.startSize)!=null?w:0),-.999999);return b.columnSizingStart.forEach(M=>{let[A,O]=M;u[A]=Math.round(Math.max(O+O*T,0)*100)/100}),{...b,deltaOffset:S,deltaPercentage:T}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(b=>({...b,...u})))},f=x=>c("move",x),p=x=>{c("end",x),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=qB(o),h={moveHandler:x=>f(x.clientX),upHandler:x=>{m?.removeEventListener("mousemove",h.moveHandler),m?.removeEventListener("mouseup",h.upHandler),p(x.clientX)}},g={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),f(x.touches[0].clientX),!1),upHandler:x=>{var y;m?.removeEventListener("touchmove",g.moveHandler),m?.removeEventListener("touchend",g.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),p((y=x.touches[0])==null?void 0:y.clientX)}},v=jB()?{passive:!1}:!1;lh(n)?(m?.addEventListener("touchmove",g.moveHandler,v),m?.addEventListener("touchend",g.upHandler,v)):(m?.addEventListener("mousemove",h.moveHandler,v),m?.addEventListener("mouseup",h.upHandler,v)),t.setColumnSizingInfo(x=>({...x,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var o;e.setColumnSizing(t?{}:(o=e.initialState.columnSizing)!=null?o:{})},e.resetHeaderSizeInfo=t=>{var o;e.setColumnSizingInfo(t?ih():(o=e.initialState.columnSizingInfo)!=null?o:ih())},e.getTotalSize=()=>{var t,o;return(t=(o=e.getHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,o;return(t=(o=e.getLeftHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,o;return(t=(o=e.getCenterHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,o;return(t=(o=e.getRightHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}},Ed=null;function jB(){if(typeof Ed=="boolean")return Ed;let e=!1;try{let t={get passive(){return e=!0,!1}},o=()=>{};window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch{e=!1}return Ed=e,Ed}function lh(e){return e.type==="touchstart"}var KB={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ut("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=o=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:o??!e.getIsVisible()}))},e.getIsVisible=()=>{var o,r;let a=e.columns;return(o=a.length?a.some(n=>n.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?o:!0},e.getCanHide=()=>{var o,r;return((o=e.columnDef.enableHiding)!=null?o:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>o=>{e.toggleVisibility==null||e.toggleVisibility(o.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ge(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),he(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ge(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,a)=>[...o,...r,...a],he(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>ge(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(n=>n.getIsVisible==null?void 0:n.getIsVisible()),he(e.options,"debugColumns",o));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=o=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(o),e.resetColumnVisibility=o=>{var r;e.setColumnVisibility(o?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=o=>{var r;o=(r=o)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,n)=>({...a,[n.id]:o||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(o=>!(o.getIsVisible!=null&&o.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(o=>o.getIsVisible==null?void 0:o.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>o=>{var r;e.toggleAllColumnsVisible((r=o.target)==null?void 0:r.checked)}}};function Al(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var XB={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},YB={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ut("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var o;let r=(o=e.getCoreRowModel().flatRows[0])==null||(o=o._getAllCellsByColumnId()[t.id])==null?void 0:o.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var o,r,a,n;return((o=e.columnDef.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((n=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?n:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>mr.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return Ad(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:mr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},ZB={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ut("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(o)return;o=!0,e._queue(()=>{e.resetExpanded(),o=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var a,n;e.setExpanded(r?{}:(a=(n=e.initialState)==null?void 0:n.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{let r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(n=>{let s=n.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=o=>{t.setExpanded(r=>{var a;let n=r===!0?!0:!!(r!=null&&r[e.id]),s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(i=>{s[i]=!0}):s=r,o=(a=o)!=null?a:!n,!n&&o)return{...s,[e.id]:!0};if(n&&!o){let{[e.id]:i,...l}=s;return l}return r})},e.getIsExpanded=()=>{var o;let r=t.getState().expanded;return!!((o=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?o:r===!0||r?.[e.id])},e.getCanExpand=()=>{var o,r,a;return(o=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?o:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let o=!0,r=e;for(;o&&r.parentId;)r=t.getRow(r.parentId,!0),o=r.getIsExpanded();return o},e.getToggleExpandedHandler=()=>{let o=e.getCanExpand();return()=>{o&&e.toggleExpanded()}}}},fh=0,ph=10,uh=()=>({pageIndex:fh,pageSize:ph}),QB={getInitialState:e=>({...e,pagination:{...uh(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ut("pagination",e)}),createTable:e=>{let t=!1,o=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(o)return;o=!0,e._queue(()=>{e.resetPageIndex(),o=!1})}},e.setPagination=r=>{let a=n=>jr(r,n);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?uh():(a=e.initialState.pagination)!=null?a:uh())},e.setPageIndex=r=>{e.setPagination(a=>{let n=jr(r,a.pageIndex),s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return n=Math.max(0,Math.min(n,s)),{...a,pageIndex:n}})},e.resetPageIndex=r=>{var a,n;e.setPageIndex(r?fh:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)!=null?a:fh)},e.resetPageSize=r=>{var a,n;e.setPageSize(r?ph:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)!=null?a:ph)},e.setPageSize=r=>{e.setPagination(a=>{let n=Math.max(1,jr(r,a.pageSize)),s=a.pageSize*a.pageIndex,i=Math.floor(s/n);return{...a,pageIndex:i,pageSize:n}})},e.setPageCount=r=>e.setPagination(a=>{var n;let s=jr(r,(n=e.options.pageCount)!=null?n:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=ge(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((n,s)=>s)),a},he(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:r<a-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},ch=()=>({top:[],bottom:[]}),JB={getInitialState:e=>({rowPinning:ch(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ut("rowPinning",e)}),createRow:(e,t)=>{e.pin=(o,r,a)=>{let n=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],s=a?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],i=new Set([...s,e.id,...n]);t.setRowPinning(l=>{var u,c;if(o==="bottom"){var f,p;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(i!=null&&i.has(g))),bottom:[...((p=l?.bottom)!=null?p:[]).filter(g=>!(i!=null&&i.has(g))),...Array.from(i)]}}if(o==="top"){var m,h;return{top:[...((m=l?.top)!=null?m:[]).filter(g=>!(i!=null&&i.has(g))),...Array.from(i)],bottom:((h=l?.bottom)!=null?h:[]).filter(g=>!(i!=null&&i.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(i!=null&&i.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(i!=null&&i.has(g)))}})},e.getCanPin=()=>{var o;let{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(o=r??a)!=null?o:!0},e.getIsPinned=()=>{let o=[e.id],{top:r,bottom:a}=t.getState().rowPinning,n=o.some(i=>r?.includes(i)),s=o.some(i=>a?.includes(i));return n?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var o,r;let a=e.getIsPinned();if(!a)return-1;let n=(o=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:o.map(s=>{let{id:i}=s;return i});return(r=n?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var o,r;return e.setRowPinning(t?ch():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:ch())},e.getIsSomeRowsPinned=t=>{var o;let r=e.getState().rowPinning;if(!t){var a,n;return!!((a=r.top)!=null&&a.length||(n=r.bottom)!=null&&n.length)}return!!((o=r[t])!=null&&o.length)},e._getPinnedRows=(t,o,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(o??[]).map(s=>{let i=e.getRow(s,!0);return i.getIsAllParentsExpanded()?i:null}):(o??[]).map(s=>t.find(i=>i.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=ge(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),he(e.options,"debugRows","getTopRows")),e.getBottomRows=ge(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),he(e.options,"debugRows","getBottomRows")),e.getCenterRows=ge(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,o,r)=>{let a=new Set([...o??[],...r??[]]);return t.filter(n=>!a.has(n.id))},he(e.options,"debugRows","getCenterRows"))}},eH={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ut("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var o;return e.setRowSelection(t?{}:(o=e.initialState.rowSelection)!=null?o:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(o=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let r={...o},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(n=>{n.getCanSelect()&&(r[n.id]=!0)}):a.forEach(n=>{delete r[n.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(o=>{let r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...o};return e.getRowModel().rows.forEach(n=>{mh(a,n.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ge(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?dh(e,o):{rows:[],flatRows:[],rowsById:{}},he(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ge(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?dh(e,o):{rows:[],flatRows:[],rowsById:{}},he(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ge(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?dh(e,o):{rows:[],flatRows:[],rowsById:{}},he(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:o}=e.getState(),r=!!(t.length&&Object.keys(o).length);return r&&t.some(a=>a.getCanSelect()&&!o[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:o}=e.getState(),r=!!t.length;return r&&t.some(a=>!o[a.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let o=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return o>0&&o<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(o=>o.getCanSelect()).some(o=>o.getIsSelected()||o.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(o,r)=>{let a=e.getIsSelected();t.setRowSelection(n=>{var s;if(o=typeof o<"u"?o:!a,e.getCanSelect()&&a===o)return n;let i={...n};return mh(i,e.id,o,(s=r?.selectChildren)!=null?s:!0,t),i})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return yh(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return gh(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return gh(e,o)==="all"},e.getCanSelect=()=>{var o;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(o=t.options.enableRowSelection)!=null?o:!0},e.getCanSelectSubRows=()=>{var o;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(o=t.options.enableSubRowSelection)!=null?o:!0},e.getCanMultiSelect=()=>{var o;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(o=t.options.enableMultiRowSelection)!=null?o:!0},e.getToggleSelectedHandler=()=>{let o=e.getCanSelect();return r=>{var a;o&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},mh=(e,t,o,r,a)=>{var n;let s=a.getRow(t,!0);o?(s.getCanMultiSelect()||Object.keys(e).forEach(i=>delete e[i]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(n=s.subRows)!=null&&n.length&&s.getCanSelectSubRows()&&s.subRows.forEach(i=>mh(e,i.id,o,r,a))};function dh(e,t){let o=e.getState().rowSelection,r=[],a={},n=function(s,i){return s.map(l=>{var u;let c=yh(l,o);if(c&&(r.push(l),a[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:n(l.subRows)}),c)return l}).filter(Boolean)};return{rows:n(t.rows),flatRows:r,rowsById:a}}function yh(e,t){var o;return(o=t[e.id])!=null?o:!1}function gh(e,t,o){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,n=!1;return e.subRows.forEach(s=>{if(!(n&&!a)&&(s.getCanSelect()&&(yh(s,t)?n=!0:a=!1),s.subRows&&s.subRows.length)){let i=gh(s,t);i==="all"?n=!0:(i==="some"&&(n=!0),a=!1)}}),a?"all":n?"some":!1}var hh=/([0-9]+)/gm,tH=(e,t,o)=>JP(Kr(e.getValue(o)).toLowerCase(),Kr(t.getValue(o)).toLowerCase()),oH=(e,t,o)=>JP(Kr(e.getValue(o)),Kr(t.getValue(o))),rH=(e,t,o)=>bh(Kr(e.getValue(o)).toLowerCase(),Kr(t.getValue(o)).toLowerCase()),aH=(e,t,o)=>bh(Kr(e.getValue(o)),Kr(t.getValue(o))),nH=(e,t,o)=>{let r=e.getValue(o),a=t.getValue(o);return r>a?1:r<a?-1:0},sH=(e,t,o)=>bh(e.getValue(o),t.getValue(o));function bh(e,t){return e===t?0:e>t?1:-1}function Kr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function JP(e,t){let o=e.split(hh).filter(Boolean),r=t.split(hh).filter(Boolean);for(;o.length&&r.length;){let a=o.shift(),n=r.shift(),s=parseInt(a,10),i=parseInt(n,10),l=[s,i].sort();if(isNaN(l[0])){if(a>n)return 1;if(n>a)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>i)return 1;if(i>s)return-1}return o.length-r.length}var El={alphanumeric:tH,alphanumericCaseSensitive:oH,text:rH,textCaseSensitive:aH,datetime:nH,basic:sH},iH={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ut("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let o=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let a of o){let n=a?.getValue(e.id);if(Object.prototype.toString.call(n)==="[object Date]")return El.datetime;if(typeof n=="string"&&(r=!0,n.split(hh).length>1))return El.alphanumeric}return r?El.text:El.basic},e.getAutoSortDir=()=>{let o=t.getFilteredRowModel().flatRows[0];return typeof o?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var o,r;if(!e)throw new Error;return Ad(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(o=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?o:El[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let a=e.getNextSortingOrder(),n=typeof o<"u"&&o!==null;t.setSorting(s=>{let i=s?.find(m=>m.id===e.id),l=s?.findIndex(m=>m.id===e.id),u=[],c,f=n?o:a==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?i?c="toggle":c="add":s!=null&&s.length&&l!==s.length-1?c="replace":i?c="toggle":c="replace",c==="toggle"&&(n||a||(c="remove")),c==="add"){var p;u=[...s,{id:e.id,desc:f}],u.splice(0,u.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=s.map(m=>m.id===e.id?{...m,desc:f}:m):c==="remove"?u=s.filter(m=>m.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var o,r;return((o=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?o:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=o=>{var r,a;let n=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==n&&((r=t.options.enableSortingRemoval)==null||r)&&(!(o&&(a=t.options.enableMultiRemove)!=null)||a)?!1:s==="desc"?"asc":"desc":n},e.getCanSort=()=>{var o,r;return((o=e.columnDef.enableSorting)!=null?o:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var o,r;return(o=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?o:!!e.accessorFn},e.getIsSorted=()=>{var o;let r=(o=t.getState().sorting)==null?void 0:o.find(a=>a.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var o,r;return(o=(r=t.getState().sorting)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?o:-1},e.clearSorting=()=>{t.setSorting(o=>o!=null&&o.length?o.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{let o=e.getCanSort();return r=>{o&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var o,r;e.setSorting(t?[]:(o=(r=e.initialState)==null?void 0:r.sorting)!=null?o:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},lH=[MB,KB,zB,WB,kB,EB,XB,YB,iH,UB,ZB,QB,JB,eH,$B];function eL(e){var t,o;let r=[...lH,...(t=e._features)!=null?t:[]],a={_features:r},n=a._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(a)),{}),s=p=>a.options.mergeOptions?a.options.mergeOptions(n,p):{...n,...p},l={...{},...(o=e.initialState)!=null?o:{}};a._features.forEach(p=>{var m;l=(m=p.getInitialState==null?void 0:p.getInitialState(l))!=null?m:l});let u=[],c=!1,f={_features:r,options:{...n,...e},initialState:l,_queue:p=>{u.push(p),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{a.setState(a.initialState)},setOptions:p=>{let m=jr(p,a.options);a.options=s(m)},getState:()=>a.options.state,setState:p=>{a.options.onStateChange==null||a.options.onStateChange(p)},_getRowId:(p,m,h)=>{var g;return(g=a.options.getRowId==null?void 0:a.options.getRowId(p,m,h))!=null?g:`${h?[h.id,m].join("."):m}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(p,m)=>{let h=(m?a.getPrePaginationRowModel():a.getRowModel()).rowsById[p];if(!h&&(h=a.getCoreRowModel().rowsById[p],!h))throw new Error;return h},_getDefaultColumnDef:ge(()=>[a.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:h=>{let g=h.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:h=>{var g,v;return(g=(v=h.renderValue())==null||v.toString==null?void 0:v.toString())!=null?g:null},...a._features.reduce((h,g)=>Object.assign(h,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...p}},he(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>a.options.columns,getAllColumns:ge(()=>[a._getColumnDefs()],p=>{let m=function(h,g,v){return v===void 0&&(v=0),h.map(x=>{let y=TB(a,x,v,g),b=x;return y.columns=b.columns?m(b.columns,y,v+1):[],y})};return m(p)},he(e,"debugColumns","getAllColumns")),getAllFlatColumns:ge(()=>[a.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),he(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ge(()=>[a.getAllFlatColumns()],p=>p.reduce((m,h)=>(m[h.id]=h,m),{}),he(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ge(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(p,m)=>{let h=p.flatMap(g=>g.getLeafColumns());return m(h)},he(e,"debugColumns","getAllLeafColumns")),getColumn:p=>a._getAllFlatColumnsById()[p]};Object.assign(a,f);for(let p=0;p<a._features.length;p++){let m=a._features[p];m==null||m.createTable==null||m.createTable(a)}return a}function tL(){return e=>ge(()=>[e.options.data],t=>{let o={rows:[],flatRows:[],rowsById:{}},r=function(a,n,s){n===void 0&&(n=0);let i=[];for(let u=0;u<a.length;u++){let c=vh(e,e._getRowId(a[u],u,s),a[u],u,n,void 0,s?.id);if(o.flatRows.push(c),o.rowsById[c.id]=c,i.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(a[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,n+1,c))}}return i};return o.rows=r(t),o},he(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function uH(e){let t=[],o=r=>{var a;t.push(r),(a=r.subRows)!=null&&a.length&&r.getIsExpanded()&&r.subRows.forEach(o)};return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function cH(e,t,o){return o.options.filterFromLeafRows?dH(e,t,o):fH(e,t,o)}function dH(e,t,o){var r;let a=[],n={},s=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,i=function(l,u){u===void 0&&(u=0);let c=[];for(let p=0;p<l.length;p++){var f;let m=l[p],h=vh(o,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(h.columnFilters=m.columnFilters,(f=m.subRows)!=null&&f.length&&u<s){if(h.subRows=i(m.subRows,u+1),m=h,t(m)&&!h.subRows.length){c.push(m),n[m.id]=m,a.push(m);continue}if(t(m)||h.subRows.length){c.push(m),n[m.id]=m,a.push(m);continue}}else m=h,t(m)&&(c.push(m),n[m.id]=m,a.push(m))}return c};return{rows:i(e),flatRows:a,rowsById:n}}function fH(e,t,o){var r;let a=[],n={},s=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,i=function(l,u){u===void 0&&(u=0);let c=[];for(let p=0;p<l.length;p++){let m=l[p];if(t(m)){var f;if((f=m.subRows)!=null&&f.length&&u<s){let g=vh(o,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=i(m.subRows,u+1),m=g}c.push(m),a.push(m),n[m.id]=m}}return c};return{rows:i(e),flatRows:a,rowsById:n}}function oL(){return e=>ge(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,o,r)=>{if(!t.rows.length||!(o!=null&&o.length)&&!r){for(let p=0;p<t.flatRows.length;p++)t.flatRows[p].columnFilters={},t.flatRows[p].columnFiltersMeta={};return t}let a=[],n=[];(o??[]).forEach(p=>{var m;let h=e.getColumn(p.id);if(!h)return;let g=h.getFilterFn();g&&a.push({id:p.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(p.value))!=null?m:p.value})});let s=(o??[]).map(p=>p.id),i=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());r&&i&&l.length&&(s.push("__global__"),l.forEach(p=>{var m;n.push({id:p.id,filterFn:i,resolvedValue:(m=i.resolveFilterValue==null?void 0:i.resolveFilterValue(r))!=null?m:r})}));let u,c;for(let p=0;p<t.flatRows.length;p++){let m=t.flatRows[p];if(m.columnFilters={},a.length)for(let h=0;h<a.length;h++){u=a[h];let g=u.id;m.columnFilters[g]=u.filterFn(m,g,u.resolvedValue,v=>{m.columnFiltersMeta[g]=v})}if(n.length){for(let h=0;h<n.length;h++){c=n[h];let g=c.id;if(c.filterFn(m,g,c.resolvedValue,v=>{m.columnFiltersMeta[g]=v})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}let f=p=>{for(let m=0;m<s.length;m++)if(p.columnFilters[s[m]]===!1)return!1;return!0};return cH(t.rows,f,e)},he(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function rL(e){return t=>ge(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(o,r)=>{if(!r.rows.length)return r;let{pageSize:a,pageIndex:n}=o,{rows:s,flatRows:i,rowsById:l}=r,u=a*n,c=u+a;s=s.slice(u,c);let f;t.options.paginateExpandedRows?f={rows:s,flatRows:i,rowsById:l}:f=uH({rows:s,flatRows:i,rowsById:l}),f.flatRows=[];let p=m=>{f.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return f.rows.forEach(p),f},he(t.options,"debugTable","getPaginationRowModel"))}function aL(){return e=>ge(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,o)=>{if(!o.rows.length||!(t!=null&&t.length))return o;let r=e.getState().sorting,a=[],n=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),s={};n.forEach(l=>{let u=e.getColumn(l.id);u&&(s[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let i=l=>{let u=l.map(c=>({...c}));return u.sort((c,f)=>{for(let m=0;m<n.length;m+=1){var p;let h=n[m],g=s[h.id],v=g.sortUndefined,x=(p=h?.desc)!=null?p:!1,y=0;if(v){let b=c.getValue(h.id),R=f.getValue(h.id),w=b===void 0,I=R===void 0;if(w||I){if(v==="first")return w?-1:1;if(v==="last")return w?1:-1;y=w&&I?0:w?v:-v}}if(y===0&&(y=g.sortingFn(c,f,h.id)),y!==0)return x&&(y*=-1),g.invertSorting&&(y*=-1),y}return c.index-f.index}),u.forEach(c=>{var f;a.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=i(c.subRows))}),u};return{rows:i(o.rows),flatRows:a,rowsById:o.rowsById}},he(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Ch(e,t){return e?pH(e)?pe(e,t):e:null}function pH(e){return mH(e)||typeof e=="function"||gH(e)}function mH(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function gH(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function nL(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=k(()=>({current:eL(t)})),[r,a]=k(()=>o.current.initialState);return o.current.setOptions(n=>({...n,...e,state:{...r,...e.state},onStateChange:s=>{a(s),e.onStateChange==null||e.onStateChange(s)}})),o.current}N();var sL=ue(null),Dd=ue(!1),hH="odd:bg-muted/50 hover:bg-accent";function vH(e){return e==="asc"?"desc":e==="desc"?null:"asc"}var xH=Q("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",md:"text-sm",lg:"text-base",default:"text-sm"}},defaultVariants:{variant:"default",size:"md"}}),Dl=C(({className:e,variant:t,size:o,loading:r,emptyContent:a,sortColumn:n,sortDirection:s,onSortChange:i,selectedRowIds:l,onRowSelectionChange:u,disableRowSelection:c,getRowId:f,children:p,...m},h)=>{let g=t==="striped",v=Z(()=>({sortColumn:n,sortDirection:s,onSortChange:i}),[n,s,i]);return P("div",{className:"relative w-full overflow-auto",children:[r&&d("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:d("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),d(sL.Provider,{value:v,children:d(Dd.Provider,{value:g,children:d("table",{ref:h,className:L(xH({variant:t,size:o}),r&&"opacity-70",e),...m,children:p})})})]})});Dl.displayName="Table";var Nl=C(({className:e,children:t,...o},r)=>d("thead",{ref:r,className:L("moonui-theme","[&_tr]:border-b",e),...o,children:d(Dd.Provider,{value:!1,children:t})}));Nl.displayName="TableHeader";var Ol=C(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...a},n)=>{let s=Pe.count(r)>0;return d("tbody",{ref:n,className:L("moonui-theme","[&_tr:last-child]:border-0",e),...a,children:s?r:d("tr",{children:d("td",{colSpan:100,className:"h-24 text-center",children:t||d("div",{className:"py-6 text-muted-foreground",children:d("div",{className:"text-sm",children:o})})})})})});Ol.displayName="TableBody";var wh=C(({className:e,children:t,...o},r)=>d("tfoot",{ref:r,className:L("moonui-theme","bg-primary text-primary-foreground font-medium",e),...o,children:d(Dd.Provider,{value:!1,children:t})}));wh.displayName="TableFooter";var Xa=C(({className:e,...t},o)=>{let r=re(Dd);return d("tr",{ref:o,className:L("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r&&hH,e),...t})});Xa.displayName="TableRow";var Fl=C(({className:e,sortable:t,sorted:o,onSort:r,columnId:a,align:n="left",children:s,...i},l)=>{let u=re(sL),c=a&&u&&u.sortColumn===a?u.sortDirection??null:null,f=o!==void 0?o:c,p=H(()=>{if(r){r();return}a&&u?.onSortChange&&u.onSortChange(a,vH(c))},[r,a,u,c]),m=!!(t&&(r||a&&u?.onSortChange)),h=()=>t?o==="asc"?d("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:d("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):o==="desc"?d("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:d("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):d("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:d("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,g={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return d("th",{ref:l,className:L("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",g[n].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),"aria-sort":t?f==="asc"?"ascending":f==="desc"?"descending":"none":void 0,onClick:m?p:void 0,...i,children:t||n!=="left"?P("div",{className:L("flex items-center",g[n].split(" ")[1]),role:m?"button":void 0,tabIndex:m?0:void 0,onKeyDown:m?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),p())}:void 0,children:[s,t&&h()]}):s})});Fl.displayName="TableHead";var ps=C(({className:e,align:t="left",...o},r)=>{let a={left:"text-left",center:"text-center",right:"text-right"}[t];return d("td",{ref:r,className:L("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",a,e),...o})});ps.displayName="TableCell";var Sh=C(({className:e,...t},o)=>d("caption",{ref:o,className:L("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));Sh.displayName="TableCaption";function iL({columns:e,data:t,enableSorting:o=!0,enablePagination:r=!0,enableSearch:a=!0,pageSize:n=10,searchPlaceholder:s="Search...",emptyMessage:i="No results found.",className:l}){let[u,c]=k([]),[f,p]=k(""),m=nL({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:a?p:void 0,getCoreRowModel:tL(),getPaginationRowModel:r?rL():void 0,getSortedRowModel:o?aL():void 0,getFilteredRowModel:a?oL():void 0,state:{sorting:u,globalFilter:f},initialState:{pagination:{pageSize:n}}});return P("div",{className:L("space-y-4",l),children:[a&&d("div",{className:"flex items-center",children:P("div",{className:"relative max-w-sm",children:[d(ca,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),d(mt,{placeholder:s,value:f,onChange:h=>p(h.target.value),className:"pl-8"})]})}),d("div",{className:"rounded-md border",children:P(Dl,{children:[d(Nl,{children:m.getHeaderGroups().map(h=>d(Xa,{children:h.headers.map(g=>{let v=o&&g.column.getCanSort(),x=g.column.getIsSorted(),y=g.column.columnDef.header;return d(Fl,{"aria-sort":v?x==="asc"?"ascending":x==="desc"?"descending":"none":void 0,children:g.isPlaceholder?null:P("div",{className:L("flex items-center gap-2",v&&"cursor-pointer select-none"),onClick:v?g.column.getToggleSortingHandler():void 0,children:[Ch(g.column.columnDef.header,g.getContext()),v&&d("button",{type:"button",onClick:b=>{b.stopPropagation(),g.column.getToggleSortingHandler()?.(b)},"aria-label":`Sort by ${typeof y=="string"?y:g.column.id}`,className:"ml-auto inline-flex items-center rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring",children:x==="desc"?d(sn,{className:"h-4 w-4"}):x==="asc"?d(un,{className:"h-4 w-4"}):d(ln,{className:"h-4 w-4 opacity-50"})})]})},g.id)})},h.id))}),d(Ol,{children:m.getRowModel().rows?.length?m.getRowModel().rows.map(h=>d(Xa,{"data-state":h.getIsSelected()&&"selected",children:h.getVisibleCells().map(g=>d(ps,{children:Ch(g.column.columnDef.cell,g.getContext())},g.id))},h.id)):d(Xa,{children:d(ps,{colSpan:e.length,className:"h-24 text-center",children:i})})})]})}),r&&P("div",{className:"flex items-center justify-end space-x-2",children:[P("div",{className:"flex-1 text-sm text-muted-foreground",children:[m.getFilteredRowModel().rows.length," row(s)"]}),P("div",{className:"space-x-2",children:[P(Le,{variant:"outline",size:"sm",onClick:()=>m.previousPage(),disabled:!m.getCanPreviousPage(),children:[d(uo,{className:"h-4 w-4"}),"Previous"]}),P("span",{className:"text-sm",children:["Page ",m.getState().pagination.pageIndex+1," of"," ",m.getPageCount()]}),P(Le,{variant:"outline",size:"sm",onClick:()=>m.nextPage(),disabled:!m.getCanNextPage(),children:["Next",d(Rt,{className:"h-4 w-4"})]})]})]})]})}function lL(e){return({column:t})=>P(Le,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?d(sn,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?d(un,{className:"ml-2 h-4 w-4"}):d(ln,{className:"ml-2 h-4 w-4"})]})}N();var yH={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},Rh=Q("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{md:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10",default:"h-10 px-4 py-2"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"md",state:"default"}}),Nd=C(function({className:t,variant:o,size:r,state:a,value:n,onChange:s,placeholder:i="Pick a date",formatString:l="PPP",minDate:u,maxDate:c,disabledDates:f,disabledDaysOfWeek:p,showWeekNumbers:m,iconPosition:h="left",icon:g,allowClear:v=!0,readOnly:x=!1,showTodayButton:y=!0,calendarProps:b,disabled:R,...w},I){let[S,T]=k(!1),[M,A]=k(n);D(()=>{A(n)},[n]);let O=G=>{let z=Array.isArray(G)?G[0]:G&&typeof G=="object"&&"from"in G?G.from:G;A(z),s?.(z),z&&T(!1)},V=G=>{G.stopPropagation(),O(void 0)},q=()=>{O(new Date)},F=G=>!!(u&&G<u||c&&G>c||f?.some(z=>z.toDateString()===G.toDateString())||p?.includes(G.getDay())),$=M&&Hc(M)?Kt(M,l):null,U=g||d(na,{className:"h-4 w-4"});return d("div",{ref:I,className:"moonui-theme",children:P("div",{className:"relative",children:[P(zo,{open:S,onOpenChange:T,children:[d(Wo,{asChild:!0,children:d(Le,{variant:o==="ghost"?"ghost":"outline",className:L(Rh({variant:o,size:r,state:a}),!$&&"text-muted-foreground",v&&$&&!x&&!R&&"pr-9",t),disabled:R||x,...w,children:d(tr,{mode:"wait",children:P(_e.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[h==="left"&&U,d("span",{className:"flex-1 truncate",children:$||i}),h==="right"&&U]},$||"placeholder")})})}),d(Ro,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:P(_e.div,{...yH,className:"rounded-2xl bg-background overflow-hidden",children:[d(Qn,{mode:"single",selected:M,onSelect:O,disabled:F,showOutsideDays:!1,className:L("rounded-2xl",b?.className),...b}),y&&d("div",{className:"border-t px-4 py-3",children:d(Le,{variant:"ghost",size:"sm",onClick:q,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]}),v&&$&&!x&&!R&&d("button",{type:"button",onClick:V,"aria-label":"Clear date",className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity",children:d("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]})})});Nd.displayName="DatePicker";var Ih=C(function({className:t,value:o,onChange:r,placeholder:a="Pick a date range",formatString:n="LLL dd, y",separator:s=" - ",...i},l){let[u,c]=k(!1),[f,p]=k(o);D(()=>{p(o)},[o]);let m=g=>{p(g),r?.(g),g?.from&&g?.to&&c(!1)},h=Z(()=>f?.from?f?.to?`${Kt(f.from,n)}${s}${Kt(f.to,n)}`:Kt(f.from,n):null,[f,n,s]);return P(zo,{open:u,onOpenChange:c,children:[d(Wo,{asChild:!0,children:P(Le,{ref:l,variant:i.variant==="ghost"?"ghost":"outline",className:L(Rh({variant:i.variant,size:i.size,state:i.state}),!h&&"text-muted-foreground",t),disabled:i.disabled||i.readOnly,children:[d(na,{className:"mr-2 h-4 w-4"}),d("span",{className:"flex-1 truncate text-left",children:h||a})]})}),d(Ro,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:d(Qn,{mode:"range",defaultMonth:f?.from,selected:f,onSelect:m,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})});Ih.displayName="DateRangePicker";var Ph=C(function({value:t,onChange:o,formatString:r="PPP",showTimePicker:a=!0,timeFormat:n="24",timeInterval:s=15,...i},l){let[u,c]=k(t),[f,p]=k(t?Kt(t,n==="24"?"HH:mm":"hh:mm a"):"00:00"),m=v=>{if(!v){c(void 0),o?.(void 0);return}let[x,y]=f.split(":").map(Number);v.setHours(x,y),c(v),o?.(v)},h=v=>{let x=v.target.value;if(p(x),u){let[y,b]=x.split(":").map(Number),R=new Date(u);R.setHours(y,b),c(R),o?.(R)}},g=Z(()=>{let v=[];for(let x=0;x<24;x++)for(let y=0;y<60;y+=s){let b=x.toString().padStart(2,"0"),R=y.toString().padStart(2,"0"),w=`${b}:${R}`;if(n==="12"){let I=x===0?12:x>12?x-12:x,S=x<12?"AM":"PM",T=`${I}:${R} ${S}`;v.push({value:w,label:T})}else v.push({value:w,label:w})}return v},[n,s]);return P("div",{ref:l,className:"flex flex-col gap-2",children:[d(Nd,{...i,value:u,onChange:m,formatString:r,showTodayButton:!1}),a&&u&&P(_e.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[d(zs,{className:"h-4 w-4 text-muted-foreground"}),d("select",{value:f,onChange:h,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:g.map(v=>d("option",{value:v.value,children:v.label},v.value))})]})]})});Ph.displayName="DateTimePicker";var Lh=C(function({value:t,onChange:o,placeholder:r="Pick a month",formatString:a="MMMM yyyy",...n},s){let[i,l]=k(!1),[u,c]=k(t||new Date),f=["January","February","March","April","May","June","July","August","September","October","November","December"],p=g=>{let v=new Date(u);v.setMonth(g),o?.(v),l(!1)},m=g=>{let v=new Date(u);v.setFullYear(v.getFullYear()+g),c(v)},h=t?Kt(t,a):null;return P(zo,{open:i,onOpenChange:l,children:[d(Wo,{asChild:!0,children:P(Le,{ref:s,variant:n.variant==="default"?"outline":n.variant||"outline",className:L(Rh({variant:n.variant,size:n.size,state:n.state}),!h&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[d(na,{className:"mr-2 h-4 w-4"}),h||r]})}),d(Ro,{className:"w-64 p-0 shadow-2xl border border-border bg-background !z-[9999]",align:"start",children:P("div",{className:"p-3",children:[P("div",{className:"flex items-center justify-between mb-3",children:[d(Le,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>m(-1),children:d(uo,{className:"h-4 w-4"})}),d("span",{className:"font-semibold",children:u.getFullYear()}),d(Le,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>m(1),children:d(Rt,{className:"h-4 w-4"})})]}),d("div",{className:"grid grid-cols-3 gap-2",children:f.map((g,v)=>d(Le,{variant:t&&t.getMonth()===v?"primary":"outline",size:"sm",onClick:()=>p(v),className:"h-8 text-xs",children:g.slice(0,3)},g))})]})})]})});Lh.displayName="MonthPicker";N();function uL({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:a,disabled:n=!1}){let[s,i]=k(null),l=(p,m)=>{n||(i(m),p.dataTransfer.effectAllowed="move")},u=p=>{p.preventDefault(),p.dataTransfer.dropEffect="move"},c=(p,m)=>{if(p.preventDefault(),n||s===null||s===m){i(null);return}let h=[...e],g=h[s];h.splice(s,1),h.splice(m,0,g),t(h),i(null)},f=()=>{i(null)};return d("div",{className:L("moonui-theme","space-y-2",a),children:e.map((p,m)=>d("div",{draggable:!n,onDragStart:h=>l(h,m),onDragOver:u,onDrop:h=>c(h,m),onDragEnd:f,className:L("transition-opacity duration-200",!n&&"cursor-move hover:opacity-80",s===m&&"opacity-50",n&&"cursor-not-allowed"),children:o(p,m)},r(p)))})}N();N();N();var Th=["Enter"," "],bH=["ArrowDown","PageUp","Home"],dL=["ArrowUp","PageDown","End"],CH=[...bH,...dL],wH={ltr:[...Th,"ArrowRight"],rtl:[...Th,"ArrowLeft"]},SH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Hl="Menu",[Vl,RH,IH]=Eo(Hl),[Ya,Mh]=ke(Hl,[IH,Qt,us]),Ul=Qt(),fL=us(),[pL,Xr]=Ya(Hl),[PH,Gl]=Ya(Hl),mL=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:a,onOpenChange:n,modal:s=!0}=e,i=Ul(t),[l,u]=k(null),c=E(!1),f=ze(n),p=Ao(a);return D(()=>{let m=()=>{c.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>c.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),d(dr,{...i,children:d(pL,{scope:t,open:o,onOpenChange:f,content:l,onContentChange:u,children:d(PH,{scope:t,onClose:H(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:p,modal:s,children:r})})})};mL.displayName=Hl;var LH="MenuAnchor",kh=C((e,t)=>{let{__scopeMenu:o,...r}=e,a=Ul(o);return d(fr,{...a,...r,ref:t})});kh.displayName=LH;var Eh="MenuPortal",[TH,gL]=Ya(Eh,{forceMount:void 0}),hL=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:a}=e,n=Xr(Eh,t);return d(TH,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Ht,{asChild:!0,container:a,children:r})})})};hL.displayName=Eh;var Jt="MenuContent",[MH,Ah]=Ya(Jt),vL=C((e,t)=>{let o=gL(Jt,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=Xr(Jt,e.__scopeMenu),s=Gl(Jt,e.__scopeMenu);return d(Vl.Provider,{scope:e.__scopeMenu,children:d($e,{present:r||n.open,children:d(Vl.Slot,{scope:e.__scopeMenu,children:s.modal?d(kH,{...a,ref:t}):d(EH,{...a,ref:t})})})})}),kH=C((e,t)=>{let o=Xr(Jt,e.__scopeMenu),r=E(null),a=fe(t,r);return D(()=>{let n=r.current;if(n)return zr(n)},[]),d(Dh,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),EH=C((e,t)=>{let o=Xr(Jt,e.__scopeMenu);return d(Dh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),AH=Tt("MenuContent.ScrollLock"),Dh=C((e,t)=>{let{__scopeMenu:o,loop:r=!1,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...g}=e,v=Xr(Jt,o),x=Gl(Jt,o),y=Ul(o),b=fL(o),R=RH(o),[w,I]=k(null),S=E(null),T=fe(t,S,v.onContentChange),M=E(0),A=E(""),O=E(0),V=E(null),q=E("right"),F=E(0),$=h?pr:Je,U=h?{as:AH,allowPinchZoom:!0}:void 0,G=_=>{let ae=A.current+_,ie=R().filter(K=>!K.disabled),W=document.activeElement,te=ie.find(K=>K.ref.current===W)?.textValue,ne=ie.map(K=>K.textValue),ee=WH(ne,ae,te),de=ie.find(K=>K.textValue===ee)?.ref.current;(function K(se){A.current=se,window.clearTimeout(M.current),se!==""&&(M.current=window.setTimeout(()=>K(""),1e3))})(ae),de&&setTimeout(()=>de.focus())};D(()=>()=>window.clearTimeout(M.current),[]),Br();let z=H(_=>q.current===V.current?.side&&$H(_,V.current?.area),[]);return d(MH,{scope:o,searchRef:A,onItemEnter:H(_=>{z(_)&&_.preventDefault()},[z]),onItemLeave:H(_=>{z(_)||(S.current?.focus(),I(null))},[z]),onTriggerLeave:H(_=>{z(_)&&_.preventDefault()},[z]),pointerGraceTimerRef:O,onPointerGraceIntentChange:H(_=>{V.current=_},[]),children:d($,{...U,children:d(ur,{asChild:!0,trapped:a,onMountAutoFocus:X(n,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d(Xt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:d(hd,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:I,onEntryFocus:X(l,_=>{x.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:d(Ur,{role:"menu","aria-orientation":"vertical","data-state":NL(v.open),"data-radix-menu-content":"",dir:x.dir,...y,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:X(g.onKeyDown,_=>{let ie=_.target.closest("[data-radix-menu-content]")===_.currentTarget,W=_.ctrlKey||_.altKey||_.metaKey,te=_.key.length===1;ie&&(_.key==="Tab"&&_.preventDefault(),!W&&te&&G(_.key));let ne=S.current;if(_.target!==ne||!CH.includes(_.key))return;_.preventDefault();let de=R().filter(K=>!K.disabled).map(K=>K.ref.current);dL.includes(_.key)&&de.reverse(),GH(de)}),onBlur:X(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(M.current),A.current="")}),onPointerMove:X(e.onPointerMove,Bl(_=>{let ae=_.target,ie=F.current!==_.clientX;if(_.currentTarget.contains(ae)&&ie){let W=_.clientX>F.current?"right":"left";q.current=W,F.current=_.clientX}}))})})})})})})});vL.displayName=Jt;var DH="MenuGroup",Nh=C((e,t)=>{let{__scopeMenu:o,...r}=e;return d(Y.div,{role:"group",...r,ref:t})});Nh.displayName=DH;var NH="MenuLabel",xL=C((e,t)=>{let{__scopeMenu:o,...r}=e;return d(Y.div,{...r,ref:t})});xL.displayName=NH;var Od="MenuItem",cL="menu.itemSelect",_d=C((e,t)=>{let{disabled:o=!1,onSelect:r,...a}=e,n=E(null),s=Gl(Od,e.__scopeMenu),i=Ah(Od,e.__scopeMenu),l=fe(t,n),u=E(!1),c=()=>{let f=n.current;if(!o&&f){let p=new CustomEvent(cL,{bubbles:!0,cancelable:!0});f.addEventListener(cL,m=>r?.(m),{once:!0}),an(f,p),p.defaultPrevented?u.current=!1:s.onClose()}};return d(yL,{...a,ref:l,disabled:o,onClick:X(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:X(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,f=>{let p=i.searchRef.current!=="";o||p&&f.key===" "||Th.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_d.displayName=Od;var yL=C((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:a,...n}=e,s=Ah(Od,o),i=fL(o),l=E(null),u=fe(t,l),[c,f]=k(!1),[p,m]=k("");return D(()=>{let h=l.current;h&&m((h.textContent??"").trim())},[n.children]),d(Vl.ItemSlot,{scope:o,disabled:r,textValue:a??p,children:d(vd,{asChild:!0,...i,focusable:!r,children:d(Y.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...n,ref:u,onPointerMove:X(e.onPointerMove,Bl(h=>{r?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,Bl(h=>s.onItemLeave(h))),onFocus:X(e.onFocus,()=>f(!0)),onBlur:X(e.onBlur,()=>f(!1))})})})}),OH="MenuCheckboxItem",bL=C((e,t)=>{let{checked:o=!1,onCheckedChange:r,...a}=e;return d(IL,{scope:e.__scopeMenu,checked:o,children:d(_d,{role:"menuitemcheckbox","aria-checked":Fd(o)?"mixed":o,...a,ref:t,"data-state":_h(o),onSelect:X(a.onSelect,()=>r?.(Fd(o)?!0:!o),{checkForDefaultPrevented:!1})})})});bL.displayName=OH;var CL="MenuRadioGroup",[FH,_H]=Ya(CL,{value:void 0,onValueChange:()=>{}}),wL=C((e,t)=>{let{value:o,onValueChange:r,...a}=e,n=ze(r);return d(FH,{scope:e.__scopeMenu,value:o,onValueChange:n,children:d(Nh,{...a,ref:t})})});wL.displayName=CL;var SL="MenuRadioItem",RL=C((e,t)=>{let{value:o,...r}=e,a=_H(SL,e.__scopeMenu),n=o===a.value;return d(IL,{scope:e.__scopeMenu,checked:n,children:d(_d,{role:"menuitemradio","aria-checked":n,...r,ref:t,"data-state":_h(n),onSelect:X(r.onSelect,()=>a.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});RL.displayName=SL;var Oh="MenuItemIndicator",[IL,VH]=Ya(Oh,{checked:!1}),PL=C((e,t)=>{let{__scopeMenu:o,forceMount:r,...a}=e,n=VH(Oh,o);return d($e,{present:r||Fd(n.checked)||n.checked===!0,children:d(Y.span,{...a,ref:t,"data-state":_h(n.checked)})})});PL.displayName=Oh;var BH="MenuSeparator",LL=C((e,t)=>{let{__scopeMenu:o,...r}=e;return d(Y.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});LL.displayName=BH;var HH="MenuArrow",TL=C((e,t)=>{let{__scopeMenu:o,...r}=e,a=Ul(o);return d(Gr,{...a,...r,ref:t})});TL.displayName=HH;var Fh="MenuSub",[UH,ML]=Ya(Fh),kL=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:a}=e,n=Xr(Fh,t),s=Ul(t),[i,l]=k(null),[u,c]=k(null),f=ze(a);return D(()=>(n.open===!1&&f(!1),()=>f(!1)),[n.open,f]),d(dr,{...s,children:d(pL,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:c,children:d(UH,{scope:t,contentId:Te(),triggerId:Te(),trigger:i,onTriggerChange:l,children:o})})})};kL.displayName=Fh;var _l="MenuSubTrigger",EL=C((e,t)=>{let o=Xr(_l,e.__scopeMenu),r=Gl(_l,e.__scopeMenu),a=ML(_l,e.__scopeMenu),n=Ah(_l,e.__scopeMenu),s=E(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=n,u={__scopeMenu:e.__scopeMenu},c=H(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return D(()=>c,[c]),D(()=>{let f=i.current;return()=>{window.clearTimeout(f),l(null)}},[i,l]),d(kh,{asChild:!0,...u,children:d(yL,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":NL(o.open),...e,ref:Ft(t,a.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,Bl(f=>{n.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!o.open&&!s.current&&(n.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{o.onOpenChange(!0),c()},100))})),onPointerLeave:X(e.onPointerLeave,Bl(f=>{c();let p=o.content?.getBoundingClientRect();if(p){let m=o.content?.dataset.side,h=m==="right",g=h?-5:5,v=p[h?"left":"right"],x=p[h?"right":"left"];n.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:v,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:v,y:p.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>n.onPointerGraceIntentChange(null),300)}else{if(n.onTriggerLeave(f),f.defaultPrevented)return;n.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,f=>{let p=n.searchRef.current!=="";e.disabled||p&&f.key===" "||wH[r.dir].includes(f.key)&&(o.onOpenChange(!0),o.content?.focus(),f.preventDefault())})})})});EL.displayName=_l;var AL="MenuSubContent",DL=C((e,t)=>{let o=gL(Jt,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=Xr(Jt,e.__scopeMenu),s=Gl(Jt,e.__scopeMenu),i=ML(AL,e.__scopeMenu),l=E(null),u=fe(t,l);return d(Vl.Provider,{scope:e.__scopeMenu,children:d($e,{present:r||n.open,children:d(Vl.Slot,{scope:e.__scopeMenu,children:d(Dh,{id:i.contentId,"aria-labelledby":i.triggerId,...a,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{s.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:X(e.onFocusOutside,c=>{c.target!==i.trigger&&n.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,c=>{s.onClose(),c.preventDefault()}),onKeyDown:X(e.onKeyDown,c=>{let f=c.currentTarget.contains(c.target),p=SH[s.dir].includes(c.key);f&&p&&(n.onOpenChange(!1),i.trigger?.focus(),c.preventDefault())})})})})})});DL.displayName=AL;function NL(e){return e?"open":"closed"}function Fd(e){return e==="indeterminate"}function _h(e){return Fd(e)?"indeterminate":e?"checked":"unchecked"}function GH(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function zH(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function WH(e,t,o){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=o?e.indexOf(o):-1,s=zH(e,Math.max(n,0));a.length===1&&(s=s.filter(u=>u!==o));let l=s.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return l!==o?l:void 0}function qH(e,t){let{x:o,y:r}=e,a=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let i=t[n],l=t[s],u=i.x,c=i.y,f=l.x,p=l.y;c>r!=p>r&&o<(f-u)*(r-c)/(p-c)+u&&(a=!a)}return a}function $H(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return qH(o,t)}function Bl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var OL=mL,FL=kh,_L=hL,VL=vL,BL=Nh,HL=xL,UL=_d,GL=bL,zL=wL,WL=RL,qL=PL,$L=LL,jL=TL,KL=kL,XL=EL,YL=DL;var Vd="DropdownMenu",[KH,Rge]=ke(Vd,[Mh]),Ct=Mh(),[XH,ZL]=KH(Vd),QL=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:a,defaultOpen:n,onOpenChange:s,modal:i=!0}=e,l=Ct(t),u=E(null),[c,f]=Be({prop:a,defaultProp:n??!1,onChange:s,caller:Vd});return d(XH,{scope:t,triggerId:Te(),triggerRef:u,contentId:Te(),open:c,onOpenChange:f,onOpenToggle:H(()=>f(p=>!p),[f]),modal:i,children:d(OL,{...l,open:c,onOpenChange:f,dir:r,modal:i,children:o})})};QL.displayName=Vd;var JL="DropdownMenuTrigger",eT=C((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...a}=e,n=ZL(JL,o),s=Ct(o);return d(FL,{asChild:!0,...s,children:d(Y.button,{type:"button",id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":n.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Ft(t,n.triggerRef),onPointerDown:X(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(n.onOpenToggle(),n.open||i.preventDefault())}),onKeyDown:X(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&n.onOpenToggle(),i.key==="ArrowDown"&&n.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});eT.displayName=JL;var YH="DropdownMenuPortal",tT=e=>{let{__scopeDropdownMenu:t,...o}=e,r=Ct(t);return d(_L,{...r,...o})};tT.displayName=YH;var oT="DropdownMenuContent",rT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ZL(oT,o),n=Ct(o),s=E(!1);return d(VL,{id:a.contentId,"aria-labelledby":a.triggerId,...n,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,i=>{s.current||a.triggerRef.current?.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:X(e.onInteractOutside,i=>{let l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!a.modal||c)&&(s.current=!0)}),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)"}})});rT.displayName=oT;var ZH="DropdownMenuGroup",aT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(BL,{...a,...r,ref:t})});aT.displayName=ZH;var QH="DropdownMenuLabel",nT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(HL,{...a,...r,ref:t})});nT.displayName=QH;var JH="DropdownMenuItem",sT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(UL,{...a,...r,ref:t})});sT.displayName=JH;var eU="DropdownMenuCheckboxItem",iT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(GL,{...a,...r,ref:t})});iT.displayName=eU;var tU="DropdownMenuRadioGroup",lT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(zL,{...a,...r,ref:t})});lT.displayName=tU;var oU="DropdownMenuRadioItem",uT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(WL,{...a,...r,ref:t})});uT.displayName=oU;var rU="DropdownMenuItemIndicator",cT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(qL,{...a,...r,ref:t})});cT.displayName=rU;var aU="DropdownMenuSeparator",dT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d($L,{...a,...r,ref:t})});dT.displayName=aU;var nU="DropdownMenuArrow",sU=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(jL,{...a,...r,ref:t})});sU.displayName=nU;var iU=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:a,defaultOpen:n}=e,s=Ct(t),[i,l]=Be({prop:r,defaultProp:n??!1,onChange:a,caller:"DropdownMenuSub"});return d(KL,{...s,open:i,onOpenChange:l,children:o})},lU="DropdownMenuSubTrigger",fT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(XL,{...a,...r,ref:t})});fT.displayName=lU;var uU="DropdownMenuSubContent",pT=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ct(o);return d(YL,{...a,...r,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)"}})});pT.displayName=uU;var mT=QL,gT=eT,Vh=tT,Bh=rT,hT=aT,Hh=nT,Uh=sT,Gh=iT,vT=lT,zh=uT,Wh=cT,qh=dT;var xT=iU,$h=fT,jh=pT;var yT=mT,bT=gT,CT=hT,wT=Vh,ST=xT,RT=vT,Kh=C(({className:e,inset:t,children:o,...r},a)=>P($h,{ref:a,className:L("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[o,d(Rt,{className:"ml-auto h-4 w-4"})]}));Kh.displayName=$h.displayName;var Xh=C(({className:e,...t},o)=>d(jh,{ref:o,className:L("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Xh.displayName=jh.displayName;var Yh=C(({className:e,sideOffset:t=4,...o},r)=>d(Vh,{children:d(Bh,{ref:r,sideOffset:t,className:L("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Yh.displayName=Bh.displayName;var Zh=C(({className:e,inset:t,...o},r)=>d(Uh,{ref:r,className:L("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Zh.displayName=Uh.displayName;var Qh=C(({className:e,children:t,checked:o,...r},a)=>P(Gh,{ref:a,className:L("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[d("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d(Wh,{children:d(gt,{className:"h-4 w-4"})})}),t]}));Qh.displayName=Gh.displayName;var Jh=C(({className:e,children:t,...o},r)=>P(zh,{ref:r,className:L("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[d("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d(Wh,{children:d(sa,{className:"h-2 w-2 fill-current"})})}),t]}));Jh.displayName=zh.displayName;var ev=C(({className:e,inset:t,...o},r)=>d(Hh,{ref:r,className:L("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));ev.displayName=Hh.displayName;var tv=C(({className:e,...t},o)=>d(qh,{ref:o,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));tv.displayName=qh.displayName;var ov=({className:e,...t})=>d("span",{className:L("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});ov.displayName="DropdownMenuShortcut";N();N();var IT=Q("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-2.5",xl:"h-3","2xl":"h-4",default:"h-2"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"md",radius:"full",animation:"default"}}),dU=Q("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-[rgb(var(--secondary-500))]",success:"bg-success",warning:"bg-[rgb(var(--warning-700))] dark:bg-warning",error:"bg-[rgb(var(--error-700))] dark:bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),zl=C(({className:e,value:t=0,variant:o,size:r,radius:a,animation:n,indicatorVariant:s,showValueLabel:i=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:f=100,...p},m)=>{let h=Math.max(0,Math.min(t,f)),g=f>0?h/f*100:0,v=l||`${Math.round(g)}%`,x=p["aria-label"]!=null||p["aria-labelledby"]!=null;return P(Ve,{children:[i&&d("div",{className:"flex justify-between items-center mb-1",children:d("span",{className:L("text-sm font-medium text-muted-foreground",u),children:v})}),d("div",{ref:m,className:L("moonui-theme",IT({variant:o,size:r,radius:a,animation:n}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":f,"aria-valuenow":c?void 0:h,"aria-label":x?void 0:"Progress","aria-valuetext":l,...p,children:d("div",{className:L(dU({variant:s??o??"primary",animation:n}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});zl.displayName="Progress";var fU=e=>e.startsWith("image/")?d(la,{className:"h-4 w-4"}):e.startsWith("video/")?d(fi,{className:"h-4 w-4"}):e.startsWith("audio/")?d(ri,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?d(Xs,{className:"h-4 w-4"}):d(Ys,{className:"h-4 w-4"}),rv=e=>{if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+o[r]},pU=(e,t)=>{let o=t.trim().toLowerCase();return o?o==="*"||o==="*/*"?!0:o.startsWith(".")?e.name.toLowerCase().endsWith(o):o.endsWith("/*")?e.type.toLowerCase().startsWith(o.slice(0,-1)):e.type.toLowerCase()===o:!1},mU=(e,t)=>{let o=t.trim();return o===""||o==="*"?!0:o.split(",").some(r=>pU(e,r))},gU=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:a,status:n,preview:s}=e;return P(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[d("div",{className:"flex-shrink-0",children:s?d("img",{src:s,alt:r.name,className:"h-10 w-10 object-cover rounded"}):d("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:fU(r.type)})}),P("div",{className:"flex-1 min-w-0",children:[P("div",{className:"flex items-center justify-between",children:[d("p",{className:"text-sm font-medium truncate",children:r.name}),d(Le,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),"aria-label":`Remove ${r.name}`,children:d(_t,{className:"h-3 w-3"})})]}),P("div",{className:"flex items-center space-x-2 mt-1",children:[d("p",{className:"text-xs text-muted-foreground",children:rv(r.size)}),n==="uploading"&&P(It,{variant:"secondary",className:"h-5",children:[d(rt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),n==="success"&&P(It,{variant:"success",className:"h-5",children:[d(br,{className:"h-3 w-3 mr-1"}),"Done"]}),n==="error"&&P(It,{variant:"destructive",className:"h-5",children:[d(co,{className:"h-3 w-3 mr-1"}),"Error"]})]}),n==="uploading"&&d("div",{className:"mt-2",children:d(zl,{value:a,className:"h-1"})})]})]})},av=Ie.forwardRef(({accept:e="*",multiple:t=!0,maxSize:o=10*1024*1024,maxFiles:r=5,disabled:a=!1,className:n,onUpload:s,onRemove:i,children:l,...u},c)=>{let[f,p]=k([]),[m,h]=k(!1),[g,v]=k(null),x=T=>T.size>o?`File size exceeds ${rv(o)}`:mU(T,e)?null:"File type not supported",y=H(async T=>{let M=Array.from(T);if(v(null),f.length+M.length>r){v(`Maximum ${r} files allowed`);return}let A=[],O=[];if(M.forEach(F=>{let $=x(F);$?O.push(`${F.name}: ${$}`):A.push(F)}),O.length>0){v(O.join(", "));return}let V=A.map((F,$)=>({id:`${Date.now()}-${$}-${F.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:F,progress:0,status:"uploading",preview:F.type.startsWith("image/")?URL.createObjectURL(F):void 0}));p(F=>[...F,...V]);let q=new Map;for(let F of V){let $=0,U=setInterval(()=>{$+=15+F.file.size%10,$>=100?($=100,clearInterval(U),q.delete(F.id),p(G=>G.map(z=>z.id===F.id&&z.status==="uploading"?{...z,progress:100,status:"success"}:z))):p(G=>G.map(z=>z.id===F.id&&z.status==="uploading"?{...z,progress:$}:z))},200);q.set(F.id,U)}if(s)try{await s(V)}catch(F){console.error("Upload failed:",F),q.forEach($=>clearInterval($)),q.clear(),p($=>$.map(U=>V.some(G=>G.id===U.id)?{...U,status:"error"}:U))}},[f.length,r,o,e,s]),b=H(T=>{if(T.preventDefault(),h(!1),a)return;let M=T.dataTransfer.files;M.length>0&&y(M)},[y,a]),R=H(T=>{T.preventDefault(),a||h(!0)},[a]),w=H(T=>{T.preventDefault(),h(!1)},[]),I=H(T=>{let M=T.target.files;M&&M.length>0&&y(M),T.target.value=""},[y]),S=H(T=>{p(M=>{let A=M.find(O=>O.id===T);return A?.preview&&URL.revokeObjectURL(A.preview),M.filter(O=>O.id!==T)}),i&&i(T)},[i]);return P("div",{ref:c,className:L("moonui-theme","space-y-4",n),...u,children:[P(_e.div,{className:L("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",m&&"border-primary bg-primary/5",a&&"opacity-50 cursor-not-allowed",!a&&"hover:border-primary/50 cursor-pointer"),onDrop:b,onDragOver:R,onDragLeave:w,animate:{scale:m?1.02:1,borderColor:m?"hsl(var(--primary))":"hsl(var(--border))"},children:[d("input",{type:"file",accept:e,multiple:t,disabled:a,onChange:I,"aria-label":t?"Choose files to upload":"Choose a file to upload",className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||P("div",{className:"space-y-4",children:[d("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:d(di,{className:"h-full w-full"})}),P("div",{children:[d("p",{className:"text-lg font-medium",children:m?"Drop files here":"Upload files"}),d("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),P("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",rv(o)," each"]})]}),d(Le,{variant:"outline",disabled:a,children:"Select Files"})]})]}),d(tr,{children:g&&P(_e.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[d(co,{className:"h-4 w-4"}),d("span",{children:g})]})}),d(tr,{children:f.length>0&&P(_e.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[P("h4",{className:"text-sm font-medium",children:["Uploaded Files (",f.length,")"]}),d("div",{className:"space-y-2",children:d(tr,{children:f.map(T=>d(gU,{uploadedFile:T,onRemove:S},T.id))})})]})})]})});av.displayName="FileUpload";N();var nv=Ie.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:a=50,className:n,overlayClassName:s,enableSwipeToClose:i=!0,...l},u)=>{let c=$n(0),f=$n(0),p=r==="up"||r==="down",m=p?c:f,h=pm(m,[0,a],[1,.5]),g=(y,b)=>{if(!i)return;let R=p?b.offset.y:b.offset.x,w=p?b.velocity.y:b.velocity.x,I=!1;switch(r){case"up":I=R>a||w>500;break;case"down":I=R<-a||w<-500;break;case"left":I=R>a||w>500;break;case"right":I=R<-a||w<-500;break}I?o(!1):gm(m,0,{type:"spring",stiffness:300,damping:20})},v=()=>{switch(r){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},x=()=>p?{y:0}:{x:0};return t?P("div",{className:"fixed inset-0 z-50",children:[d(_e.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:L("absolute inset-0 bg-black/50",s)}),P(_e.div,{ref:u,drag:i?p?"y":"x":!1,dragConstraints:{top:r==="up"?0:void 0,bottom:r==="down"?0:void 0,left:r==="left"?0:void 0,right:r==="right"?0:void 0},dragElastic:.2,onDragEnd:g,style:{[p?"y":"x"]:m,opacity:h},initial:v(),animate:x(),exit:v(),transition:{type:"spring",damping:30,stiffness:300},className:L("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":r==="up","top-0 left-0 right-0 rounded-b-lg":r==="down","top-0 bottom-0 right-0 rounded-l-lg":r==="left","top-0 bottom-0 left-0 rounded-r-lg":r==="right"},n),...l,children:[(r==="up"||r==="down")&&d("div",{className:"flex justify-center p-2",children:d("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});nv.displayName="GestureDrawer";N();function PT({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:a="https://github.com/moonui/moonui"}){let[n,s]=k(null),[i,l]=k(!0);D(()=>{(async()=>{try{let h=await(await fetch("/api/github-stars")).json();s(h)}catch(m){console.error("Failed to fetch GitHub stats:",m),s({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=p=>p>=1e3?(p/1e3).toFixed(1)+"k":p.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},f={sm:14,md:16,lg:20};return i?P("div",{className:L("flex items-center animate-pulse",c[t],e),children:[P("div",{className:"flex items-center gap-1",children:[d("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),d("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),o&&P("div",{className:"flex items-center gap-1",children:[d("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),d("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):n?P("div",{className:L("flex items-center",c[t],e),children:[P("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[d(Cr,{className:"fill-current text-yellow-500",size:f[t]}),d("span",{className:"font-medium",children:u(n.stars)})]}),o&&P("a",{href:`${a}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[d(Zs,{size:f[t]}),d("span",{className:"font-medium",children:u(n.forks)})]}),r&&P("a",{href:`${a}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[d(ia,{size:f[t]}),d("span",{className:"font-medium",children:u(n.watchers)})]}),!n.isLive&&d("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function hU({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,a]=k(null),[n,s]=k(!0);D(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();a(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),a(1240)}finally{s(!1)}})()},[]);let i=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return d(Le,{variant:"outline",size:t,className:L("moonui-theme","group",e),asChild:!0,children:P("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[d(Cr,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),d("span",{children:"Star on GitHub"}),!n&&r&&d("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:i(r)}),d(Ks,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}N();N();N();N();var vU=Object.defineProperty,xU=Object.defineProperties,yU=Object.getOwnPropertyDescriptors,Bd=Object.getOwnPropertySymbols,TT=Object.prototype.hasOwnProperty,MT=Object.prototype.propertyIsEnumerable,LT=(e,t,o)=>t in e?vU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,bU=(e,t)=>{for(var o in t||(t={}))TT.call(t,o)&&LT(e,o,t[o]);if(Bd)for(var o of Bd(t))MT.call(t,o)&&LT(e,o,t[o]);return e},CU=(e,t)=>xU(e,yU(t)),wU=(e,t)=>{var o={};for(var r in e)TT.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Bd)for(var r of Bd(e))t.indexOf(r)<0&&MT.call(e,r)&&(o[r]=e[r]);return o};function SU(e){let t=setTimeout(e,0),o=setTimeout(e,10),r=setTimeout(e,50);return[t,o,r]}function RU(e){let t=E();return D(()=>{t.current=e}),t.current}var IU=18,kT=40,PU=`${kT}px`,LU=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function TU({containerRef:e,inputRef:t,pushPasswordManagerStrategy:o,isFocused:r}){let[a,n]=k(!1),[s,i]=k(!1),[l,u]=k(!1),c=Z(()=>o==="none"?!1:(o==="increase-width"||o==="experimental-no-flickering")&&a&&s,[a,s,o]),f=H(()=>{let p=e.current,m=t.current;if(!p||!m||l||o==="none")return;let h=p,g=h.getBoundingClientRect().left+h.offsetWidth,v=h.getBoundingClientRect().top+h.offsetHeight/2,x=g-IU,y=v;document.querySelectorAll(LU).length===0&&document.elementFromPoint(x,y)===p||(n(!0),u(!0))},[e,t,l,o]);return D(()=>{let p=e.current;if(!p||o==="none")return;function m(){let g=window.innerWidth-p.getBoundingClientRect().right;i(g>=kT)}m();let h=setInterval(m,1e3);return()=>{clearInterval(h)}},[e,o]),D(()=>{let p=r||document.activeElement===t.current;if(o==="none"||!p)return;let m=setTimeout(f,0),h=setTimeout(f,2e3),g=setTimeout(f,5e3),v=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(h),clearTimeout(g),clearTimeout(v)}},[t,r,o,f]),{hasPWMBadge:a,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:PU}}var sv=ue({}),iv=C((e,t)=>{var o=e,{value:r,onChange:a,maxLength:n,textAlign:s="left",pattern:i,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:p,containerClassName:m,noScriptCSSFallback:h=MU,render:g,children:v}=o,x=wU(o,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),y,b,R,w,I;let[S,T]=k(typeof x.defaultValue=="string"?x.defaultValue:""),M=r??S,A=RU(M),O=H(oe=>{a?.(oe),T(oe)},[a]),V=Z(()=>i?typeof i=="string"?new RegExp(i):i:null,[i]),q=E(null),F=E(null),$=E({value:M,onChange:O,isIOS:typeof window<"u"&&((b=(y=window?.CSS)==null?void 0:y.supports)==null?void 0:b.call(y,"-webkit-touch-callout","none"))}),U=E({prev:[(R=q.current)==null?void 0:R.selectionStart,(w=q.current)==null?void 0:w.selectionEnd,(I=q.current)==null?void 0:I.selectionDirection]});ra(t,()=>q.current,[]),D(()=>{let oe=q.current,le=F.current;if(!oe||!le)return;$.current.value!==oe.value&&$.current.onChange(oe.value),U.current.prev=[oe.selectionStart,oe.selectionEnd,oe.selectionDirection];function Oe(){if(document.activeElement!==oe){W(null),ne(null);return}let Me=oe.selectionStart,Qe=oe.selectionEnd,To=oe.selectionDirection,St=oe.maxLength,so=oe.value,zt=U.current.prev,io=-1,Mo=-1,ko;if(so.length!==0&&Me!==null&&Qe!==null){let Ts=Me===Qe,Ms=Me===so.length&&so.length<St;if(Ts&&!Ms){let Wt=Me;if(Wt===0)io=0,Mo=1,ko="forward";else if(Wt===St)io=Wt-1,Mo=Wt,ko="backward";else if(St>1&&so.length>1){let ks=0;if(zt[0]!==null&&zt[1]!==null){ko=Wt<zt[1]?"backward":"forward";let Rf=zt[0]===zt[1]&&zt[0]<St;ko==="backward"&&!Rf&&(ks=-1)}io=ks+Wt,Mo=ks+Wt+1}}io!==-1&&Mo!==-1&&io!==Mo&&q.current.setSelectionRange(io,Mo,ko)}let lu=io!==-1?io:Me,rn=Mo!==-1?Mo:Qe,yr=ko??To;W(lu),ne(rn),U.current.prev=[lu,rn,yr]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===oe&&ae(!0),!document.getElementById("input-otp-style")){let Me=document.createElement("style");if(Me.id="input-otp-style",document.head.appendChild(Me),Me.sheet){let Qe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Wl(Me.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Wl(Me.sheet,`[data-input-otp]:autofill { ${Qe} }`),Wl(Me.sheet,`[data-input-otp]:-webkit-autofill { ${Qe} }`),Wl(Me.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Wl(Me.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ue=()=>{le&&le.style.setProperty("--root-height",`${oe.clientHeight}px`)};Ue();let tt=new ResizeObserver(Ue);return tt.observe(oe),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),tt.disconnect()}},[]);let[G,z]=k(!1),[_,ae]=k(!1),[ie,W]=k(null),[te,ne]=k(null);D(()=>{SU(()=>{var oe,le,Oe,Ue;(oe=q.current)==null||oe.dispatchEvent(new Event("input"));let tt=(le=q.current)==null?void 0:le.selectionStart,Me=(Oe=q.current)==null?void 0:Oe.selectionEnd,Qe=(Ue=q.current)==null?void 0:Ue.selectionDirection;tt!==null&&Me!==null&&(W(tt),ne(Me),U.current.prev=[tt,Me,Qe])})},[M,_]),D(()=>{A!==void 0&&M!==A&&A.length<n&&M.length===n&&c?.(M)},[n,c,A,M]);let ee=TU({containerRef:F,inputRef:q,pushPasswordManagerStrategy:f,isFocused:_}),de=H(oe=>{let le=oe.currentTarget.value.slice(0,n);if(le.length>0&&V&&!V.test(le)){oe.preventDefault();return}typeof A=="string"&&le.length<A.length&&document.dispatchEvent(new Event("selectionchange")),O(le)},[n,O,A,V]),K=H(()=>{var oe;if(q.current){let le=Math.min(q.current.value.length,n-1),Oe=q.current.value.length;(oe=q.current)==null||oe.setSelectionRange(le,Oe),W(le),ne(Oe)}ae(!0)},[n]),se=H(oe=>{var le,Oe;let Ue=q.current;if(!p&&(!$.current.isIOS||!oe.clipboardData||!Ue))return;let tt=oe.clipboardData.getData("text/plain"),Me=p?p(tt):tt;oe.preventDefault();let Qe=(le=q.current)==null?void 0:le.selectionStart,To=(Oe=q.current)==null?void 0:Oe.selectionEnd,St=(Qe!==To?M.slice(0,Qe)+Me+M.slice(To):M.slice(0,Qe)+Me+M.slice(Qe)).slice(0,n);if(St.length>0&&V&&!V.test(St))return;Ue.value=St,O(St);let so=Math.min(St.length,n-1),zt=St.length;Ue.setSelectionRange(so,zt),W(so),ne(zt)},[n,O,V,M]),ve=Z(()=>({position:"relative",cursor:x.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[x.disabled]),xe=Z(()=>({position:"absolute",inset:0,width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ee.PWM_BADGE_SPACE_WIDTH,ee.willPushPWMBadge,s]),me=Z(()=>pe("input",CU(bU({autoComplete:x.autoComplete||"one-time-code"},x),{"data-input-otp":!0,"data-input-otp-placeholder-shown":M.length===0||void 0,"data-input-otp-mss":ie,"data-input-otp-mse":te,inputMode:u,pattern:V?.source,"aria-placeholder":l,style:xe,maxLength:n,value:M,ref:q,onPaste:oe=>{var le;se(oe),(le=x.onPaste)==null||le.call(x,oe)},onChange:de,onMouseOver:oe=>{var le;z(!0),(le=x.onMouseOver)==null||le.call(x,oe)},onMouseLeave:oe=>{var le;z(!1),(le=x.onMouseLeave)==null||le.call(x,oe)},onFocus:oe=>{var le;K(),(le=x.onFocus)==null||le.call(x,oe)},onBlur:oe=>{var le;ae(!1),(le=x.onBlur)==null||le.call(x,oe)}})),[de,K,se,u,xe,n,te,ie,x,V?.source,M]),J=Z(()=>({slots:Array.from({length:n}).map((oe,le)=>{var Oe;let Ue=_&&ie!==null&&te!==null&&(ie===te&&le===ie||le>=ie&&le<te),tt=M[le]!==void 0?M[le]:null,Me=M[0]!==void 0?null:(Oe=l?.[le])!=null?Oe:null;return{char:tt,placeholderChar:Me,isActive:Ue,hasFakeCaret:Ue&&tt===null}}),isFocused:_,isHovering:!x.disabled&&G}),[_,G,n,te,ie,x.disabled,M]),ye=Z(()=>g?g(J):pe(sv.Provider,{value:J},v),[v,J,g]);return pe(Je,null,h!==null&&pe("noscript",null,pe("style",null,h)),pe("div",{ref:F,"data-input-otp-container":!0,style:ve,className:m},ye,pe("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},me)))});iv.displayName="Input";function Wl(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var MU=`
61
+ [data-input-otp] {
62
+ --nojs-bg: white !important;
63
+ --nojs-fg: black !important;
64
+
65
+ background-color: var(--nojs-bg) !important;
66
+ color: var(--nojs-fg) !important;
67
+ caret-color: var(--nojs-fg) !important;
68
+ letter-spacing: .25em !important;
69
+ text-align: center !important;
70
+ border: 1px solid var(--nojs-fg) !important;
71
+ border-radius: 4px !important;
72
+ width: 100% !important;
73
+ }
74
+ @media (prefers-color-scheme: dark) {
75
+ [data-input-otp] {
76
+ --nojs-bg: black !important;
77
+ --nojs-fg: white !important;
78
+ }
79
+ }`,ET="^\\d+$",AT="^[a-zA-Z]+$",DT="^[a-zA-Z0-9]+$";var lv=C(({className:e,containerClassName:t,...o},r)=>d(iv,{ref:r,"aria-label":"One-time password",containerClassName:L("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:L("disabled:cursor-not-allowed",e),...o}));lv.displayName="InputOTP";var uv=C(({className:e,...t},o)=>d("div",{ref:o,className:L("flex items-center",e),...t}));uv.displayName="InputOTPGroup";var cv=Q(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),dv=C(({index:e,className:t,...o},r)=>{let n=re(sv)?.slots?.[e],s=n?.char,i=n?.hasFakeCaret,l=n?.isActive;return P("div",{ref:r,"data-active":l?"":void 0,className:L(cv({isActive:!!l}),t),...o,children:[s,i&&d("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:d("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});dv.displayName="InputOTPSlot";var fv=C(({className:e,...t},o)=>d("div",{ref:o,role:"separator",className:L("text-muted-foreground",e),...t,children:d(js,{"aria-hidden":"true"})}));fv.displayName="InputOTPSeparator";N();function pv({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:a=2e3}){let[n,s]=k(!1),[i,l]=k(null),u=()=>{if(!r)return;s(!0),i&&clearTimeout(i);let f=setTimeout(()=>{s(!1)},a);l(f)},c=()=>{i&&(clearTimeout(i),l(null)),s(!1)};return P("div",{className:L("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[d("div",{className:L("transition-all duration-300",!n&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),d("div",{className:L("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",n?"opacity-0":"opacity-100"),children:P("div",{className:"text-center space-y-3 p-6",children:[d("div",{className:"flex justify-center",children:P(It,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[d(cn,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),d("div",{className:"flex justify-center",children:d("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:d(fn,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),d("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),d("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),P(Le,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[d(pn,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!n&&d("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:d("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function NT({children:e,componentId:t,componentName:o,className:r,fallback:a,requireCLI:n=!0}){let[s,i]=k({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if(D(()=>{if(!(()=>{let f={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:f.nodeEnv&&f.localhost&&!f.vercelEnv&&!f.ciEnv})()||!n){i({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let f=localStorage.getItem("moonui_cli_token"),p=localStorage.getItem("moonui_device_id");if(!f||!p){i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let m=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${f}`,"X-Device-ID":p,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(m.ok){let h=await m.json();i({isAuthenticated:!0,deviceValid:h.valid,hasProAccess:h.hasProAccess,loading:!1})}else i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[n]),s.loading)return d("div",{className:L("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:d("div",{className:"flex items-center justify-center h-full",children:d("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&n){if(!s.isAuthenticated)return P("div",{className:L("relative",r),children:[d("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),d("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:P("div",{className:"text-center space-y-3 p-6",children:[P(It,{variant:"destructive",className:"mb-2",children:[d(fn,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),d("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),d("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),d("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!s.deviceValid)return P("div",{className:L("relative",r),children:[d("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),d("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:P("div",{className:"text-center space-y-3 p-6",children:[P(It,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[d(pn,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),d("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),d("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),d(Le,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!s.hasProAccess)return d(pv,{componentName:o||t,className:r,children:a||e})}return d("div",{className:r,children:e})}function OT({className:e}){return P(It,{variant:"secondary",className:L("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[d(cn,{className:"w-3 h-3 mr-1"}),"PRO"]})}function FT({className:e}){return d(It,{variant:"outline",className:L("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}N();function Hd({className:e,variant:t="default",showText:o=!0,...r}){let a=qe(),n=`moon-gradient-${a}`,s=`moon-mask-${a}`;return P("div",{className:L("flex items-center gap-2",e),children:[P("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...r,children:[P("defs",{children:[t==="gradient"&&P("linearGradient",{id:n,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#3B82F6"}),d("stop",{offset:"50%",stopColor:"#8B5CF6"}),d("stop",{offset:"100%",stopColor:"#EC4899"})]}),P("mask",{id:s,children:[d("rect",{width:"32",height:"32",fill:"white"}),d("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),d("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${n})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${s})`})]}),o&&P("span",{className:"text-xl font-bold",children:[d("span",{className:"text-foreground",children:"Moon"}),d("span",{className:"text-primary",children:"UI"})]})]})}function kU({className:e,variant:t="default",...o}){return d(Hd,{showText:!1,className:e,variant:t,...o})}function EU({className:e,variant:t="default",showText:o=!0,...r}){return d(Hd,{className:L("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}N();var mv=C(({className:e,...t},o)=>d("nav",{ref:o,role:"navigation","aria-label":"pagination",className:L("moonui-theme","mx-auto flex w-full justify-center",e),...t}));mv.displayName="Pagination";var gv=C(({className:e,...t},o)=>d("ul",{ref:o,className:L("moonui-theme","flex flex-row items-center gap-1",e),...t}));gv.displayName="PaginationContent";var hv=C(({className:e,...t},o)=>d("li",{ref:o,className:L("moonui-theme","",e),...t}));hv.displayName="PaginationItem";var ql=C(({className:e,isActive:t,size:o="icon",...r},a)=>d("a",{ref:a,"aria-current":t?"page":void 0,className:L(hi({variant:t?"outline":"ghost",size:o}),e),...r}));ql.displayName="PaginationLink";var _T="hidden sm:inline",vv=C(({className:e,...t},o)=>P(ql,{ref:o,"aria-label":"Go to previous page",size:"md",className:L("moonui-theme","gap-1 pl-2.5",e),...t,children:[d(uo,{className:"h-4 w-4"}),d("span",{className:_T,children:"Previous"})]}));vv.displayName="PaginationPrevious";var xv=C(({className:e,...t},o)=>P(ql,{ref:o,"aria-label":"Go to next page",size:"md",className:L("moonui-theme","gap-1 pr-2.5",e),...t,children:[d("span",{className:_T,children:"Next"}),d(Rt,{className:"h-4 w-4"})]}));xv.displayName="PaginationNext";var yv=C(({className:e,...t},o)=>P("span",{ref:o,className:L("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[d("span",{"aria-hidden":"true",className:"flex items-center",children:d(No,{className:"h-4 w-4"})}),d("span",{className:"sr-only",children:"More pages"})]}));yv.displayName="PaginationEllipsis";N();N();N();function bv(e,[t,o]){return Math.min(o,Math.max(t,e))}N();var Cv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),AU="VisuallyHidden",$l=C((e,t)=>d(Y.span,{...e,ref:t,style:{...Cv,...e.style}}));$l.displayName=AU;var VT=$l;var NU=[" ","Enter","ArrowUp","ArrowDown"],OU=[" ","Enter"],Za="Select",[Gd,zd,FU]=Eo(Za),[ms,tve]=ke(Za,[FU,Qt]),Wd=Qt(),[_U,Yr]=ms(Za),[VU,BU]=ms(Za),BT=e=>{let{__scopeSelect:t,children:o,open:r,defaultOpen:a,onOpenChange:n,value:s,defaultValue:i,onValueChange:l,dir:u,name:c,autoComplete:f,disabled:p,required:m,form:h}=e,g=Wd(t),[v,x]=k(null),[y,b]=k(null),[R,w]=k(!1),I=Ao(u),[S,T]=Be({prop:r,defaultProp:a??!1,onChange:n,caller:Za}),[M,A]=Be({prop:s,defaultProp:i,onChange:l,caller:Za}),O=E(null),V=v?h||!!v.closest("form"):!0,[q,F]=k(new Set),$=Array.from(q).map(U=>U.props.value).join(";");return d(dr,{...g,children:P(_U,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:R,onValueNodeHasChildrenChange:w,contentId:Te(),value:M,onValueChange:A,open:S,onOpenChange:T,dir:I,triggerPointerDownPosRef:O,disabled:p,children:[d(Gd.Provider,{scope:t,children:d(VU,{scope:e.__scopeSelect,onNativeOptionAdd:H(U=>{F(G=>new Set(G).add(U))},[]),onNativeOptionRemove:H(U=>{F(G=>{let z=new Set(G);return z.delete(U),z})},[]),children:o})}),V?P(cM,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:f,value:M,onChange:U=>A(U.target.value),disabled:p,form:h,children:[M===void 0?d("option",{value:""}):null,Array.from(q)]},$):null]})})};BT.displayName=Za;var HT="SelectTrigger",UT=C((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Wd(o),s=Yr(HT,o),i=s.disabled||r,l=fe(t,s.onTriggerChange),u=zd(o),c=E("touch"),[f,p,m]=fM(g=>{let v=u().filter(b=>!b.disabled),x=v.find(b=>b.value===s.value),y=pM(v,g,x);y!==void 0&&s.onValueChange(y.value)}),h=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d(fr,{asChild:!0,...n,children:d(Y.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":dM(s.value)?"":void 0,...a,ref:l,onClick:X(a.onClick,g=>{g.currentTarget.focus(),c.current!=="mouse"&&h(g)}),onPointerDown:X(a.onPointerDown,g=>{c.current=g.pointerType;let v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(h(g),g.preventDefault())}),onKeyDown:X(a.onKeyDown,g=>{let v=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&NU.includes(g.key)&&(h(),g.preventDefault())})})})});UT.displayName=HT;var GT="SelectValue",zT=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=Yr(GT,o),{onValueNodeHasChildrenChange:u}=l,c=n!==void 0,f=fe(t,l.onValueNodeChange);return Ae(()=>{u(c)},[u,c]),d(Y.span,{...i,ref:f,style:{pointerEvents:"none"},children:dM(l.value)?d(Ve,{children:s}):n})});zT.displayName=GT;var HU="SelectIcon",WT=C((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return d(Y.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});WT.displayName=HU;var UU="SelectPortal",qT=e=>d(Ht,{asChild:!0,...e});qT.displayName=UU;var Qa="SelectContent",$T=C((e,t)=>{let o=Yr(Qa,e.__scopeSelect),[r,a]=k();if(Ae(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?Ds(d(jT,{scope:e.__scopeSelect,children:d(Gd.Slot,{scope:e.__scopeSelect,children:d("div",{children:e.children})})}),n):null}return d(KT,{...e,ref:t})});$T.displayName=Qa;var Lo=10,[jT,Zr]=ms(Qa),GU="SelectContentImpl",zU=Tt("SelectContent.RemoveScroll"),KT=C((e,t)=>{let{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:n,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:v,...x}=e,y=Yr(Qa,o),[b,R]=k(null),[w,I]=k(null),S=fe(t,K=>R(K)),[T,M]=k(null),[A,O]=k(null),V=zd(o),[q,F]=k(!1),$=E(!1);D(()=>{if(b)return zr(b)},[b]),Br();let U=H(K=>{let[se,...ve]=V().map(J=>J.ref.current),[xe]=ve.slice(-1),me=document.activeElement;for(let J of K)if(J===me||(J?.scrollIntoView({block:"nearest"}),J===se&&w&&(w.scrollTop=0),J===xe&&w&&(w.scrollTop=w.scrollHeight),J?.focus(),document.activeElement!==me))return},[V,w]),G=H(()=>U([T,b]),[U,T,b]);D(()=>{q&&G()},[q,G]);let{onOpenChange:z,triggerPointerDownPosRef:_}=y;D(()=>{if(b){let K={x:0,y:0},se=xe=>{K={x:Math.abs(Math.round(xe.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(_.current?.y??0))}},ve=xe=>{K.x<=10&&K.y<=10?xe.preventDefault():b.contains(xe.target)||z(!1),document.removeEventListener("pointermove",se),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",ve,{capture:!0})}}},[b,z,_]),D(()=>{let K=()=>z(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[z]);let[ae,ie]=fM(K=>{let se=V().filter(me=>!me.disabled),ve=se.find(me=>me.ref.current===document.activeElement),xe=pM(se,K,ve);xe&&setTimeout(()=>xe.ref.current.focus())}),W=H((K,se,ve)=>{let xe=!$.current&&!ve;(y.value!==void 0&&y.value===se||xe)&&(M(K),xe&&($.current=!0))},[y.value]),te=H(()=>b?.focus(),[b]),ne=H((K,se,ve)=>{let xe=!$.current&&!ve;(y.value!==void 0&&y.value===se||xe)&&O(K)},[y.value]),ee=r==="popper"?wv:XT,de=ee===wv?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:v}:{};return d(jT,{scope:o,content:b,viewport:w,onViewportChange:I,itemRefCallback:W,selectedItem:T,onItemLeave:te,itemTextRefCallback:ne,focusSelectedItem:G,selectedItemText:A,position:r,isPositioned:q,searchRef:ae,children:d(pr,{as:zU,allowPinchZoom:!0,children:d(ur,{asChild:!0,trapped:y.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:X(a,K=>{y.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:d(Xt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d(ee,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:K=>K.preventDefault(),...x,...de,onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:X(x.onKeyDown,K=>{let se=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!se&&K.key.length===1&&ie(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let xe=V().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(K.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){let me=K.target,J=xe.indexOf(me);xe=xe.slice(J+1)}setTimeout(()=>U(xe)),K.preventDefault()}})})})})})})});KT.displayName=GU;var WU="SelectItemAlignedPosition",XT=C((e,t)=>{let{__scopeSelect:o,onPlaced:r,...a}=e,n=Yr(Qa,o),s=Zr(Qa,o),[i,l]=k(null),[u,c]=k(null),f=fe(t,S=>c(S)),p=zd(o),m=E(!1),h=E(!0),{viewport:g,selectedItem:v,selectedItemText:x,focusSelectedItem:y}=s,b=H(()=>{if(n.trigger&&n.valueNode&&i&&u&&g&&v&&x){let S=n.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),M=n.valueNode.getBoundingClientRect(),A=x.getBoundingClientRect();if(n.dir!=="rtl"){let me=A.left-T.left,J=M.left-me,ye=S.left-J,oe=S.width+ye,le=Math.max(oe,T.width),Oe=window.innerWidth-Lo,Ue=bv(J,[Lo,Math.max(Lo,Oe-le)]);i.style.minWidth=oe+"px",i.style.left=Ue+"px"}else{let me=T.right-A.right,J=window.innerWidth-M.right-me,ye=window.innerWidth-S.right-J,oe=S.width+ye,le=Math.max(oe,T.width),Oe=window.innerWidth-Lo,Ue=bv(J,[Lo,Math.max(Lo,Oe-le)]);i.style.minWidth=oe+"px",i.style.right=Ue+"px"}let O=p(),V=window.innerHeight-Lo*2,q=g.scrollHeight,F=window.getComputedStyle(u),$=parseInt(F.borderTopWidth,10),U=parseInt(F.paddingTop,10),G=parseInt(F.borderBottomWidth,10),z=parseInt(F.paddingBottom,10),_=$+U+q+z+G,ae=Math.min(v.offsetHeight*5,_),ie=window.getComputedStyle(g),W=parseInt(ie.paddingTop,10),te=parseInt(ie.paddingBottom,10),ne=S.top+S.height/2-Lo,ee=V-ne,de=v.offsetHeight/2,K=v.offsetTop+de,se=$+U+K,ve=_-se;if(se<=ne){let me=O.length>0&&v===O[O.length-1].ref.current;i.style.bottom="0px";let J=u.clientHeight-g.offsetTop-g.offsetHeight,ye=Math.max(ee,de+(me?te:0)+J+G),oe=se+ye;i.style.height=oe+"px"}else{let me=O.length>0&&v===O[0].ref.current;i.style.top="0px";let ye=Math.max(ne,$+g.offsetTop+(me?W:0)+de)+ve;i.style.height=ye+"px",g.scrollTop=se-ne+g.offsetTop}i.style.margin=`${Lo}px 0`,i.style.minHeight=ae+"px",i.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,n.trigger,n.valueNode,i,u,g,v,x,n.dir,r]);Ae(()=>b(),[b]);let[R,w]=k();Ae(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]);let I=H(S=>{S&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return d($U,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:I,children:d("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:d(Y.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});XT.displayName=WU;var qU="SelectPopperPosition",wv=C((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=Lo,...n}=e,s=Wd(o);return d(Ur,{...s,...n,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...n.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wv.displayName=qU;var[$U,Lv]=ms(Qa,{}),Sv="SelectViewport",YT=C((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=Zr(Sv,o),s=Lv(Sv,o),i=fe(t,n.onViewportChange),l=E(0);return P(Ve,{children:[d("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d(Gd.Slot,{scope:o,children:d(Y.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:X(a.onScroll,u=>{let c=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=s;if(p?.current&&f){let m=Math.abs(l.current-c.scrollTop);if(m>0){let h=window.innerHeight-Lo*2,g=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(g,v);if(x<h){let y=x+m,b=Math.min(h,y),R=y-b;f.style.height=b+"px",f.style.bottom==="0px"&&(c.scrollTop=R>0?R:0,f.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});YT.displayName=Sv;var ZT="SelectGroup",[jU,KU]=ms(ZT),QT=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Te();return d(jU,{scope:o,id:a,children:d(Y.div,{role:"group","aria-labelledby":a,...r,ref:t})})});QT.displayName=ZT;var JT="SelectLabel",eM=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=KU(JT,o);return d(Y.div,{id:a.id,...r,ref:t})});eM.displayName=JT;var Ud="SelectItem",[XU,tM]=ms(Ud),oM=C((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=Yr(Ud,o),l=Zr(Ud,o),u=i.value===r,[c,f]=k(n??""),[p,m]=k(!1),h=fe(t,y=>l.itemRefCallback?.(y,r,a)),g=Te(),v=E("touch"),x=()=>{a||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d(XU,{scope:o,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:H(y=>{f(b=>b||(y?.textContent??"").trim())},[]),children:d(Gd.ItemSlot,{scope:o,value:r,disabled:a,textValue:c,children:d(Y.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:h,onFocus:X(s.onFocus,()=>m(!0)),onBlur:X(s.onBlur,()=>m(!1)),onClick:X(s.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:X(s.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:X(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:X(s.onPointerMove,y=>{v.current=y.pointerType,a?l.onItemLeave?.():v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:X(s.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(OU.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});oM.displayName=Ud;var jl="SelectItemText",rM=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=Yr(jl,o),i=Zr(jl,o),l=tM(jl,o),u=BU(jl,o),[c,f]=k(null),p=fe(t,x=>f(x),l.onItemTextChange,x=>i.itemTextRefCallback?.(x,l.value,l.disabled)),m=c?.textContent,h=Z(()=>d("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return Ae(()=>(g(h),()=>v(h)),[g,v,h]),P(Ve,{children:[d(Y.span,{id:l.textId,...n,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ds(n.children,s.valueNode):null]})});rM.displayName=jl;var aM="SelectItemIndicator",nM=C((e,t)=>{let{__scopeSelect:o,...r}=e;return tM(aM,o).isSelected?d(Y.span,{"aria-hidden":!0,...r,ref:t}):null});nM.displayName=aM;var Rv="SelectScrollUpButton",sM=C((e,t)=>{let o=Zr(Rv,e.__scopeSelect),r=Lv(Rv,e.__scopeSelect),[a,n]=k(!1),s=fe(t,r.onScrollButtonChange);return Ae(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollTop>0;n(c)};var i=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),a?d(lM,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});sM.displayName=Rv;var Iv="SelectScrollDownButton",iM=C((e,t)=>{let o=Zr(Iv,e.__scopeSelect),r=Lv(Iv,e.__scopeSelect),[a,n]=k(!1),s=fe(t,r.onScrollButtonChange);return Ae(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<c;n(f)};var i=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),a?d(lM,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});iM.displayName=Iv;var lM=C((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=Zr("SelectScrollButton",o),s=E(null),i=zd(o),l=H(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return D(()=>()=>l(),[l]),Ae(()=>{i().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),d(Y.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:X(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(a.onPointerMove,()=>{n.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(a.onPointerLeave,()=>{l()})})}),YU="SelectSeparator",uM=C((e,t)=>{let{__scopeSelect:o,...r}=e;return d(Y.div,{"aria-hidden":!0,...r,ref:t})});uM.displayName=YU;var Pv="SelectArrow",ZU=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Wd(o),n=Yr(Pv,o),s=Zr(Pv,o);return n.open&&s.position==="popper"?d(Gr,{...a,...r,ref:t}):null});ZU.displayName=Pv;var QU="SelectBubbleInput",cM=C(({__scopeSelect:e,value:t,...o},r)=>{let a=E(null),n=fe(r,a),s=es(t);return D(()=>{let i=a.current;if(!i)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&c){let f=new Event("change",{bubbles:!0});c.call(i,t),i.dispatchEvent(f)}},[s,t]),d(Y.select,{...o,style:{...Cv,...o.style},ref:n,defaultValue:t})});cM.displayName=QU;function dM(e){return e===""||e===void 0}function fM(e){let t=ze(e),o=E(""),r=E(0),a=H(s=>{let i=o.current+s;t(i),function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),n=H(()=>{o.current="",window.clearTimeout(r.current)},[]);return D(()=>()=>window.clearTimeout(r.current),[]),[o,a,n]}function pM(e,t,o){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=o?e.indexOf(o):-1,s=JU(e,Math.max(n,0));a.length===1&&(s=s.filter(u=>u!==o));let l=s.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==o?l:void 0}function JU(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var mM=BT,Tv=UT,gM=zT,hM=WT,vM=qT,Mv=$T,xM=YT,yM=QT,kv=eM,Ev=oM,bM=rM,CM=nM,Av=sM,Dv=iM,Nv=uM;var Ja=mM;Ja.displayName="Select";var wM=yM,gs=gM,tG=Q(["flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),en=C(({className:e,children:t,variant:o,size:r,error:a,success:n,loading:s,leftIcon:i,rightIcon:l,...u},c)=>{let f=qe(),p=u["aria-label"]!=null||u["aria-labelledby"]!=null;return P(Tv,{ref:c,className:L(tG({variant:o,size:r,state:a?"error":n?"success":"none"}),e),...u,disabled:u.disabled||s,"aria-invalid":a?!0:void 0,"data-error":a?!0:void 0,"data-success":n?!0:void 0,"data-loading":s?!0:void 0,"aria-labelledby":p?u["aria-labelledby"]:f,children:[P("div",{id:f,className:"flex items-center flex-1 gap-2",children:[i&&d("span",{className:"flex items-center justify-center text-muted-foreground",children:i}),s?P("div",{className:"flex items-center gap-2",children:[d(rt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),d("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!s&&d(hM,{asChild:!0,children:l?d("span",{className:"opacity-60",children:l}):d(Do,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]})});en.displayName=Tv.displayName;var qd=C(({className:e,...t},o)=>d(Av,{ref:o,className:L("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:d(Gs,{className:"h-4 w-4"})}));qd.displayName=Av.displayName;var $d=C(({className:e,...t},o)=>d(Dv,{ref:o,className:L("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:d(Do,{className:"h-4 w-4"})}));$d.displayName=Dv.displayName;var tn=C(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>d(vM,{children:P(Mv,{ref:i,side:r,sideOffset:a,align:n,avoidCollisions:!1,className:L(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-input","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","shadow-lg dark:shadow-gray-900/20","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=open]:duration-150"],o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...s,children:[d(qd,{}),d(xM,{className:L("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d($d,{})]})}));tn.displayName=Mv.displayName;var Ov=C(({className:e,...t},o)=>d(kv,{ref:o,className:L("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ov.displayName=kv.displayName;var wt=C(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>P(Ev,{ref:i,className:L("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",r==="sm"&&"py-1 pl-7 pr-2 text-xs",r==="md"&&"py-1.5 pl-8 pr-2 text-sm",r==="lg"&&"py-2 pl-9 pr-3 text-base",o==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",o==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",o==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",o==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",o==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...s,children:[d("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d(CM,{children:n||d(gt,{className:"h-4 w-4"})})}),d(bM,{children:t}),a&&d("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));wt.displayName=Ev.displayName;var Fv=C(({className:e,...t},o)=>d(Nv,{ref:o,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));Fv.displayName=Nv.displayName;var oG=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],SM=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let a=0;a<o.length;a++)a>0&&a%3===0&&(r+=" "),r+=o[a];return r}},rG=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},_v=C(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=oG,size:i,...l},u)=>{let[c,f]=k(r),[p,m]=k(t),h=s.find(y=>y.code===c)||s[0],g=y=>{let b=y.target.value.replace(/\D/g,""),R=rG(c),w=b.slice(0,R),I=SM(w,c);m(w),o?.(w,c),y.target.value=I},v=y=>{f(y),o?.(p,y)},x=SM(p,c);return P("div",{className:L("relative flex gap-2",e),children:[n&&P(Ja,{value:c,onValueChange:v,children:[d(en,{className:"w-[120px]",children:d(gs,{children:P("div",{className:"flex items-center gap-2",children:[d("span",{children:h.flag}),d("span",{children:h.code})]})})}),d(tn,{children:s.map(y=>d(wt,{value:y.code,children:P("div",{className:"flex items-center gap-2",children:[d("span",{children:y.flag}),d("span",{children:y.code}),d("span",{className:"text-muted-foreground",children:y.name})]})},y.code))})]}),P("div",{className:"relative flex-1",children:[d(mt,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:x,onChange:g,className:L(a&&"pl-10",e),...l}),a&&d(ai,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});_v.displayName="PhoneInput";N();var aG=Q("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6",default:"h-4 w-4"}},defaultVariants:{variant:"default",size:"md"}}),RM=ue({}),Vv=C(({className:e,value:t,defaultValue:o,onValueChange:r,disabled:a,name:n,...s},i)=>{let[l,u]=k(o),c=t!==void 0,f=c?t:l,p=H(m=>{c||u(m),r?.(m)},[c,r]);return d(RM.Provider,{value:{value:f,onValueChange:p,disabled:a,name:n},children:d("div",{ref:i,role:"radiogroup",className:L("moonui-theme","grid gap-2",e),...s})})});Vv.displayName="RadioGroup";var jd=C(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=re(RM),c=qe(),f=a||c,p=u.value===n,m=h=>{u.onValueChange&&u.onValueChange(h.target.value),i.onChange&&i.onChange(h)};return P("div",{className:"relative flex items-center",children:[d("input",{type:"radio",id:f,ref:l,value:n,checked:p,disabled:s||u.disabled,name:u.name,onChange:m,className:"peer sr-only",...i}),d("label",{htmlFor:f,className:L(aG({variant:t,size:o}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",s&&"cursor-not-allowed opacity-50",e),children:d("span",{className:L("absolute inset-0 pointer-events-none",p&&"flex items-center justify-center"),children:p&&(r||d(sa,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});jd.displayName="RadioGroupItem";var Kd=C(({className:e,htmlFor:t,children:o,disabled:r=!1,...a},n)=>d("label",{ref:n,htmlFor:t,className:L("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...a,children:o}));Kd.displayName="RadioLabel";var Bv=C(({id:e,label:t,labelClassName:o,...r},a)=>{let n=qe(),s=e||n;return P("div",{className:"flex items-center",children:[d(jd,{ref:a,id:s,...r}),d(Kd,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});Bv.displayName="RadioItemWithLabel";function IM({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:a=!1}){let n=s=>{!a&&t&&t(s.target.value)};return P("div",{className:L("border border-input rounded-md",r),children:[d("div",{className:"border-b border-border p-2 bg-muted/50",children:P("div",{className:"flex gap-1",children:[d("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Bold (Pro feature)",children:"B"}),d("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Italic (Pro feature)",children:"I"}),d("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Underline (Pro feature)",children:"U"})]})}),d("textarea",{value:e,onChange:n,placeholder:o,disabled:a,className:L("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}N();N();N();N();N();function PM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nG(...e){return t=>{let o=!1,r=e.map(a=>{let n=PM(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():PM(e[a],null)}}}}function gr(...e){return H(nG(...e),e)}function TM(e){let t=C((o,r)=>{let{children:a,...n}=o,s=null,i=!1,l=[];LM(a)&&typeof Xd=="function"&&(a=Xd(a._payload)),Pe.forEach(a,p=>{if(cG(p)){i=!0;let m=p,h="child"in m.props?m.props.child:m.props.children;LM(h)&&typeof Xd=="function"&&(h=Xd(h._payload)),s=iG(m,h),l.push(s?.props?.children)}else l.push(p)}),s?s=Fe(s,void 0,l):!i&&Pe.count(a)===1&&Ee(a)&&(s=a);let u=s?uG(s):void 0,c=gr(r,u);if(!s){if(a||a===0)throw new Error(i?mG(e):pG(e));return a}let f=lG(n,s.props??{});return s.type!==Je&&(f.ref=r?c:u),Fe(s,f)});return t.displayName=`${e}.Slot`,t}var sG=Symbol.for("radix.slottable");var iG=(e,t)=>{if("child"in e.props){let o=e.props.child;return Ee(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Ee(t)?t:null};function lG(e,t){let o={...t};for(let r in t){let a=e[r],n=t[r];/^on[A-Z]/.test(r)?a&&n?o[r]=(...i)=>{let l=n(...i);return a(...i),l}:a&&(o[r]=a):r==="style"?o[r]={...a,...n}:r==="className"&&(o[r]=[a,n].filter(Boolean).join(" "))}return{...e,...o}}function uG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function cG(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sG}var dG=Symbol.for("react.lazy");function LM(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dG&&"_payload"in e&&fG(e._payload)}function fG(e){return typeof e=="object"&&e!==null&&"then"in e}var pG=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mG=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Xd=B[" use ".trim().toString()];var gG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hs=gG.reduce((e,t)=>{let o=TM(`Primitive.${t}`),r=C((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});N();N();var Kl=globalThis?.document?dt:()=>{};N();function hG(e,t){return qt((o,r)=>t[o][r]??o,e)}var vs=e=>{let{present:t,children:o}=e,r=vG(t),a=typeof o=="function"?o({present:r.isPresent}):Pe.only(o),n=xG(r.ref,yG(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};vs.displayName="Presence";function vG(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=E(void 0),i=e?"mounted":"unmounted",[l,u]=hG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{l==="mounted"?(n.current=s.current??Xl(r.current),s.current=void 0):n.current="none"},[l]),Kl(()=>{let c=r.current,f=a.current;if(f!==e){let m=n.current,h=Xl(c);e?(s.current=h,u("MOUNT")):h==="none"||c?.display==="none"?u("UNMOUNT"):u(f&&m!==h?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),Kl(()=>{if(t){let c,f=t.ownerDocument.defaultView??window,p=h=>{let v=Xl(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(u("ANIMATION_END"),!a.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=h=>{h.target===t&&(n.current=Xl(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:H(c=>{if(c){let f=getComputedStyle(c);r.current=f,s.current=Xl(f)}else r.current=null;o(c)},[])}}function MM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xG(...e){let t=E(e);return t.current=e,H(o=>{let r=t.current,a=!1,n=r.map(s=>{let i=MM(s,o);return!a&&typeof i=="function"&&(a=!0),i});if(a)return()=>{for(let s=0;s<n.length;s++){let i=n[s];typeof i=="function"?i():MM(r[s],null)}}},[])}function Xl(e){return e?.animationName||"none"}function yG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}N();function kM(e,t=[]){let o=[];function r(n,s){let i=ue(s);i.displayName=n+"Context";let l=o.length;o=[...o,s];let u=f=>{let{scope:p,children:m,...h}=f,g=p?.[e]?.[l]||i,v=Z(()=>h,Object.values(h));return d(g.Provider,{value:v,children:m})};u.displayName=n+"Provider";function c(f,p,m={}){let{optional:h=!1}=m,g=p?.[e]?.[l]||i,v=re(g);if(v)return v;if(s!==void 0)return s;if(!h)throw new Error(`\`${f}\` must be used within \`${n}\``)}return[u,c]}let a=()=>{let n=o.map(s=>ue(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,bG(a,...t)]}function bG(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){let s=r.reduce((i,{useScope:l,scopeName:u})=>{let f=l(n)[`__scope${u}`];return{...i,...f}},{});return Z(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}N();function Qr(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}N();var CG=ue(void 0);function EM(e){let t=re(CG);return e||t||"ltr"}function AM(e,[t,o]){return Math.min(o,Math.max(t,e))}var Fve=!!(typeof window<"u"&&window.document&&window.document.createElement);function Jr(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)}}N();function wG(e,t){return qt((o,r)=>t[o][r]??o,e)}var Hv="ScrollArea",[NM,Kve]=kM(Hv),[SG,eo]=NM(Hv),OM=C((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:a,scrollHideDelay:n=600,...s}=e,[i,l]=k(null),[u,c]=k(null),[f,p]=k(null),[m,h]=k(null),[g,v]=k(null),[x,y]=k(0),[b,R]=k(0),[w,I]=k(!1),[S,T]=k(!1),M=gr(t,l),A=EM(a);return d(SG,{scope:o,type:r,dir:A,scrollHideDelay:n,scrollArea:i,viewport:u,onViewportChange:c,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:h,scrollbarXEnabled:w,onScrollbarXEnabledChange:I,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:S,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:R,children:d(hs.div,{dir:A,...s,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});OM.displayName=Hv;var FM="ScrollAreaViewport",_M=C((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=eo(FM,o),i=E(null),l=gr(t,i,s.onViewportChange);return P(Ve,{children:[d(RG,{nonce:a}),d(hs.div,{"data-radix-scroll-area-viewport":"",...n,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});_M.displayName=FM;var RG=Pf(({nonce:e})=>d("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),$o="ScrollAreaScrollbar",Qd=C((e,t)=>{let{forceMount:o,...r}=e,a=eo($o,e.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=a,i=e.orientation==="horizontal";return D(()=>(i?n(!0):s(!0),()=>{i?n(!1):s(!1)}),[i,n,s]),a.type==="hover"?d(IG,{...r,ref:t,forceMount:o}):a.type==="scroll"?d(PG,{...r,ref:t,forceMount:o}):a.type==="auto"?d(VM,{...r,ref:t,forceMount:o}):a.type==="always"?d(Uv,{...r,ref:t,"data-state":"visible"}):null});Qd.displayName=$o;var IG=C((e,t)=>{let{forceMount:o,...r}=e,a=eo($o,e.__scopeScrollArea),[n,s]=k(!1);return D(()=>{let i=a.scrollArea,l=0;if(i){let u=()=>{window.clearTimeout(l),s(!0)},c=()=>{l=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",c)}}},[a.scrollArea,a.scrollHideDelay]),d(vs,{present:o||n,children:d(VM,{"data-state":n?"visible":"hidden",...r,ref:t})})}),PG=C((e,t)=>{let{forceMount:o,...r}=e,a=eo($o,e.__scopeScrollArea),n=e.orientation==="horizontal",s=ef(()=>l("SCROLL_END"),100),[i,l]=wG("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D(()=>{if(i==="idle"){let u=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,a.scrollHideDelay,l]),D(()=>{let u=a.viewport,c=n?"scrollLeft":"scrollTop";if(u){let f=u[c],p=()=>{let m=u[c];f!==m&&(l("SCROLL"),s()),f=m};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[a.viewport,n,l,s]),d(vs,{present:o||i!=="hidden",children:d(Uv,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Jr(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Jr(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),VM=C((e,t)=>{let o=eo($o,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=k(!1),i=e.orientation==="horizontal",l=ef(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return xs(o.viewport,l),xs(o.content,l),d(vs,{present:r||n,children:d(Uv,{"data-state":n?"visible":"hidden",...a,ref:t})})}),Uv=C((e,t)=>{let{orientation:o="vertical",...r}=e,a=eo($o,e.__scopeScrollArea),n=E(null),s=E(0),[i,l]=k({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=GM(i.viewport,i.content),c={...r,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>n.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function f(p,m){return AG(p,s.current,i,m)}return o==="horizontal"?d(LG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollLeft,m=DM(p,i,a.dir);n.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollLeft=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollLeft=f(p,a.dir))}}):o==="vertical"?d(TG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollTop,m=DM(p,i);n.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollTop=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollTop=f(p))}}):null}),LG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=eo($o,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=gr(t,l,n.onScrollbarXChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(HM,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Jd(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(n.viewport){let p=n.viewport.scrollLeft+c.deltaX;e.onWheelScroll(p),WM(p,f)&&c.preventDefault()}},onResize:()=>{l.current&&n.viewport&&s&&r({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Zd(s.paddingLeft),paddingEnd:Zd(s.paddingRight)}})}})}),TG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=eo($o,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=gr(t,l,n.onScrollbarYChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(HM,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Jd(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(n.viewport){let p=n.viewport.scrollTop+c.deltaY;e.onWheelScroll(p),WM(p,f)&&c.preventDefault()}},onResize:()=>{l.current&&n.viewport&&s&&r({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Zd(s.paddingTop),paddingEnd:Zd(s.paddingBottom)}})}})}),[MG,BM]=NM($o),HM=C((e,t)=>{let{__scopeScrollArea:o,sizes:r,hasThumb:a,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:f,...p}=e,m=eo($o,o),[h,g]=k(null),v=gr(t,g),x=E(null),y=E(""),b=m.viewport,R=r.content-r.viewport,w=Qr(c),I=Qr(l),S=ef(f,10);function T(M){if(x.current){let A=M.clientX-x.current.left,O=M.clientY-x.current.top;u({x:A,y:O})}}return D(()=>{let M=A=>{let O=A.target;h?.contains(O)&&w(A,R)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[b,h,R,w]),D(I,[r,I]),xs(h,S),xs(m.content,S),d(MG,{scope:o,scrollbar:h,hasThumb:a,onThumbChange:Qr(n),onThumbPointerUp:Qr(s),onThumbPositionChange:I,onThumbPointerDown:Qr(i),children:d(hs.div,{...p,ref:v,style:{position:"absolute",...p.style},onPointerDown:Jr(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),x.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),T(M))}),onPointerMove:Jr(e.onPointerMove,T),onPointerUp:Jr(e.onPointerUp,M=>{let A=M.target;A.hasPointerCapture(M.pointerId)&&A.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),x.current=null})})})}),Yd="ScrollAreaThumb",Gv=C((e,t)=>{let{forceMount:o,...r}=e,a=BM(Yd,e.__scopeScrollArea);return d(vs,{present:o||a.hasThumb,children:d(kG,{ref:t,...r})})}),kG=C((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=eo(Yd,o),s=BM(Yd,o),{onThumbPositionChange:i}=s,l=gr(t,s.onThumbChange),u=E(void 0),c=ef(()=>{u.current&&(u.current(),u.current=void 0)},100);return D(()=>{let f=n.viewport;if(f){let p=()=>{if(c(),!u.current){let m=DG(f,i);u.current=m,i()}};return i(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[n.viewport,c,i]),d(hs.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Jr(e.onPointerDownCapture,f=>{let m=f.target.getBoundingClientRect(),h=f.clientX-m.left,g=f.clientY-m.top;s.onThumbPointerDown({x:h,y:g})}),onPointerUp:Jr(e.onPointerUp,s.onThumbPointerUp)})});Gv.displayName=Yd;var zv="ScrollAreaCorner",UM=C((e,t)=>{let o=eo(zv,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d(EG,{...e,ref:t}):null});UM.displayName=zv;var EG=C((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=eo(zv,o),[n,s]=k(0),[i,l]=k(0),u=!!(n&&i),{onCornerWidthChange:c,onCornerHeightChange:f}=a;return xs(a.scrollbarX,()=>{let p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),l(p)}),xs(a.scrollbarY,()=>{let p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),s(p)}),D(()=>()=>{c(0),f(0)},[c,f]),u?d(hs.div,{...r,ref:t,style:{width:n,height:i,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Zd(e){return e?parseInt(e,10):0}function GM(e,t){let o=e/t;return isNaN(o)?0:o}function Jd(e){let t=GM(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function AG(e,t,o,r="ltr"){let a=Jd(o),n=a/2,s=t||n,i=a-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,c=o.content-o.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return zM([l,u],f)(e)}function DM(e,t,o="ltr"){let r=Jd(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=t.scrollbar.size-a,s=t.content-t.viewport,i=n-r,l=o==="ltr"?[0,s]:[s*-1,0],u=AM(e,l);return zM([0,s],[0,i])(u)}function zM(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function WM(e,t){return e>0&&e<t}var DG=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){let n={left:e.scrollLeft,top:e.scrollTop},s=o.left!==n.left,i=o.top!==n.top;(s||i)&&t(),o=n,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function ef(e,t){let o=Qr(e),r=E(0);return D(()=>()=>window.clearTimeout(r.current),[]),H(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function xs(e,t){let o=Qr(t);Kl(()=>{let r=0;if(e){let a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,o])}var Wv=OM,qM=_M;var $M=UM;var qv=C(({className:e,children:t,focusable:o=!0,...r},a)=>P(Wv,{ref:a,className:L("relative overflow-hidden",e),...r,children:[d(qM,{tabIndex:o?0:void 0,className:"h-full w-full rounded-[inherit]",children:t}),d(tf,{}),d($M,{})]}));qv.displayName=Wv.displayName;var tf=C(({className:e,orientation:t="vertical",...o},r)=>d(Qd,{ref:r,orientation:t,className:L("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:d(Gv,{className:"relative flex-1 rounded-full bg-border"})}));tf.displayName=Qd.displayName;N();var jM=(e,t)=>{let o={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return o[e]||o.up},KM={duration:.5,ease:[.25,.46,.45,.94]},$v=C(({children:e,direction:t="up",delay:o=0,duration:r=.5,distance:a=50,threshold:n=.3,once:s=!0,triggerOnce:i,stagger:l=0,className:u,variants:c,animate:f=!0,style:p,id:m,viewport:h},g)=>{let v=i!==void 0?i:s,x=Z(()=>c||jM(t,a),[t,a,c]),y=Z(()=>({...KM,duration:r,delay:o+l}),[r,o,l]),b=Z(()=>({once:v,amount:n,...h}),[v,n,h]);return f?d(_e.div,{ref:g,initial:"hidden",whileInView:"visible",viewport:b,variants:x,transition:y,className:L(u),style:p,id:m,children:e}):d("div",{ref:g,className:u,style:p,id:m,children:e})});$v.displayName="ScrollReveal";var jv=C(({children:e,stagger:t=.1,className:o,style:r,id:a,threshold:n=.3,once:s=!0,triggerOnce:i,viewport:l},u)=>{let c=i!==void 0?i:s,f=Z(()=>({once:c,amount:n,...l}),[c,n,l]),p={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return d(_e.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:f,variants:p,className:L(o),style:r,id:a,children:e})});jv.displayName="ScrollRevealContainer";var Kv=C(({children:e,direction:t="up",duration:o=.5,distance:r=50,className:a,variants:n,style:s,id:i},l)=>{let u=Z(()=>n||jM(t,r),[t,r,n]),c=Z(()=>({...KM,duration:o}),[o]);return d(_e.div,{ref:l,variants:u,transition:c,className:L(a),style:s,id:i,children:e})});Kv.displayName="ScrollRevealItem";N();N();var OG="Separator",XM="horizontal",FG=["horizontal","vertical"],YM=C((e,t)=>{let{decorative:o,orientation:r=XM,...a}=e,n=_G(r)?r:XM,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return d(Y.div,{"data-orientation":n,...i,...a,ref:t})});YM.displayName=OG;function _G(e){return FG.includes(e)}var Xv=YM;var ZM=Q("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Gt=C(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:a=!0,...n},s)=>d(Xv,{ref:s,decorative:a,orientation:t||void 0,className:L(ZM({orientation:t,variant:o,size:r}),e),...n}));Gt.displayName=Xv.displayName;N();N();N();var BG=Object.defineProperty,ys=(e,t)=>BG(e,"name",{value:t,configurable:!0}),QM=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zv(e,t,{checkForDefaultPrevented:o=!0}={}){return ys(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ys(Zv,"composeEventHandlers");function HG(e){if(!QM)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ys(HG,"getOwnerWindow");function Yv(e){if(!QM)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ys(Yv,"getOwnerDocument");function JM(e,t=!1){let{activeElement:o}=Yv(e);if(!o?.nodeName)return null;if(ek(o)&&o.contentDocument)return JM(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=Yv(o).getElementById(r);if(a)return a}}return o}ys(JM,"getActiveElement");function ek(e){return e.tagName==="IFRAME"}ys(ek,"isFrame");N();var bs=!1;N();var of=globalThis?.document?dt:()=>{};N();N();var UG=Object.defineProperty,GG=(e,t)=>UG(e,"name",{value:t,configurable:!0}),tk=B[" useEffectEvent ".trim().toString()],ok=B[" useInsertionEffect ".trim().toString()];function Qv(e){if(typeof tk=="function")return tk(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof ok=="function"?ok(()=>{t.current=e}):of(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}GG(Qv,"useEffectEvent");var zG=Object.defineProperty,Yl=(e,t)=>zG(e,"name",{value:t,configurable:!0}),WG=B[" useInsertionEffect ".trim().toString()]||of;function Jv({prop:e,defaultProp:t,onChange:o=Yl(()=>{},"onChange"),caller:r}){let[a,n,s]=ak({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(bs){let c=E(e!==void 0);D(()=>{let f=c.current;f!==i&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${i?"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.`),c.current=i},[i,r])}let u=H(c=>{if(i){let f=nk(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}Yl(Jv,"useControllableState");function ak({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return WG(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}Yl(ak,"useUncontrolledState");function nk(e){return typeof e=="function"}Yl(nk,"isFunction");var rk=Symbol("RADIX:SYNC_STATE");function qG(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=Qv(s);if(bs){let v=E(a!==void 0);D(()=>{let x=v.current;x!==l&&console.warn(`${i} is changing from ${x?"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.`),v.current=l},[l,i])}let c=[{...o,state:n}];r&&c.push(r);let[f,p]=qt((v,x)=>{if(x.type===rk)return{...v,state:x.state};let y=e(v,x);return l&&!Object.is(y.state,v.state)&&u(y.state),y},...c),m=f.state,h=E(m);D(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=Z(()=>a!==void 0?{...f,state:a}:f,[f,a]);return D(()=>{l&&!Object.is(a,f.state)&&p({type:rk,state:a})},[a,f.state,l]),[g,p]}Yl(qG,"useControllableStateReducer");N();N();N();var $G=Object.defineProperty,tx=(e,t)=>$G(e,"name",{value:t,configurable:!0});function ex(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}tx(ex,"setRef");function sk(...e){return t=>{let o=!1,r=e.map(a=>{let n=ex(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():ex(e[a],null)}}}}tx(sk,"composeRefs");function ox(...e){return H(sk(...e),e)}tx(ox,"useComposedRefs");var jG=Object.defineProperty,to=(e,t)=>jG(e,"name",{value:t,configurable:!0}),KG=to((e,t)=>{let o={...t};for(let r in t){let a=e[r],n=t[r];if(/^on[A-Z]/.test(r))if(a&&n){let i=typeof a=="function",l=typeof n=="function";bs&&(!i||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof a,typeof n].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?n(...u):void 0;return i&&a(...u),c}}else a&&(o[r]=a);else r==="style"?o[r]={...typeof a=="object"?a:null,...typeof n=="object"?n:null}:r==="className"?o[r]=[a,n].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=ik(n,a))}return{...e,...o}},"mergeProps");function ik(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}to(ik,"concatAriaDescribedby");var lk=ue(KG);lk.displayName="SlotContext";function ax(e){let t=C((o,r)=>{let a=re(lk),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];rx(n)&&typeof rf=="function"&&(n=rf(n._payload)),Pe.forEach(n,h=>{if(dk(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;rx(v)&&typeof rf=="function"&&(v=rf(v._payload)),l=YG(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Pe.count(n)===1&&Ee(n)&&(l=n);let f=l?ck(l):void 0,p=ox(r,f);if(!l){if(n||n===0)throw new Error(u?JG(e):QG(e));return n}let m=s(i,l.props??{});return l.type!==Je&&(m.ref=r?p:f),Fe(l,m)});return t.displayName=`${e}.Slot`,t}to(ax,"createSlot");var uk=Symbol.for("radix.slottable");function XG(e){let t=to(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=uk,t}to(XG,"createSlottable");var YG=to((e,t)=>{if("child"in e.props){let o=e.props.child;return Ee(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Ee(t)?t:null},"getSlottableElementFromSlottable");function ck(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}to(ck,"getElementRef");function dk(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uk}to(dk,"isSlottable");var ZG=Symbol.for("react.lazy");function rx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ZG&&"_payload"in e&&fk(e._payload)}to(rx,"isLazyComponent");function fk(e){return typeof e=="object"&&e!==null&&"then"in e}to(fk,"isPromiseLike");var QG=to(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),JG=to(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),rf=B[" use ".trim().toString()];var ez=Object.defineProperty,tz=(e,t)=>ez(e,"name",{value:t,configurable:!0}),oz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pk=oz.reduce((e,t)=>{let o=ax(`Primitive.${t}`),r=C((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function rz(e,t){e&&jo(()=>e.dispatchEvent(t))}tz(rz,"dispatchDiscreteCustomEvent");var az=Object.defineProperty,nz=(e,t)=>az(e,"name",{value:t,configurable:!0}),sz="Toggle",Zl=C(nz(function(t,o){let{pressed:r,defaultPressed:a,onPressedChange:n,...s}=t,[i,l]=Jv({prop:r,onChange:n,defaultProp:a??!1,caller:sz});return d(pk.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:o,onClick:Zv(t.onClick,()=>{t.disabled||l(!i)})})},"Toggle"));var Ql=Q("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{md:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5",default:"h-10 px-3"}},defaultVariants:{variant:"default",size:"md"}}),Jl=C(({className:e,variant:t,size:o,...r},a)=>d(Zl,{ref:a,className:L("moonui-theme",Ql({variant:t,size:o,className:e})),...r}));Jl.displayName=Zl.displayName;N();N();var[af,Xxe]=ke("Tooltip",[Qt]),nf=Qt(),mk="TooltipProvider",lz=700,nx="tooltip.open",[uz,ix]=af(mk),gk=e=>{let{__scopeTooltip:t,delayDuration:o=lz,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:n}=e,s=E(!0),i=E(!1),l=E(0);return D(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),d(uz,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:H(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:H(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:H(u=>{i.current=u},[]),disableHoverableContent:a,children:n})};gk.displayName=mk;var eu="Tooltip",[cz,tu]=af(eu),hk=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=ix(eu,e.__scopeTooltip),u=nf(t),[c,f]=k(null),p=Te(),m=E(0),h=s??l.disableHoverableContent,g=i??l.delayDuration,v=E(!1),[x,y]=Be({prop:r,defaultProp:a??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(nx))):l.onClose(),n?.(S)},caller:eu}),b=Z(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),R=H(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,y(!0)},[y]),w=H(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),I=H(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,y(!0),m.current=0},g)},[g,y]);return D(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d(dr,{...u,children:d(cz,{scope:t,contentId:p,open:x,stateAttribute:b,trigger:c,onTriggerChange:f,onTriggerEnter:H(()=>{l.isOpenDelayedRef.current?I():R()},[l.isOpenDelayedRef,I,R]),onTriggerLeave:H(()=>{h?w():(window.clearTimeout(m.current),m.current=0)},[w,h]),onOpen:R,onClose:w,disableHoverableContent:h,children:o})})};hk.displayName=eu;var sx="TooltipTrigger",vk=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=tu(sx,o),n=ix(sx,o),s=nf(o),i=E(null),l=fe(t,i,a.onTriggerChange),u=E(!1),c=E(!1),f=H(()=>u.current=!1,[]);return D(()=>()=>document.removeEventListener("pointerup",f),[f]),d(fr,{asChild:!0,...s,children:d(Y.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:X(e.onPointerMove,p=>{p.pointerType!=="touch"&&!c.current&&!n.isPointerInTransitRef.current&&(a.onTriggerEnter(),c.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{a.onTriggerLeave(),c.current=!1}),onPointerDown:X(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:X(e.onBlur,a.onClose),onClick:X(e.onClick,a.onClose)})})});vk.displayName=sx;var lx="TooltipPortal",[dz,fz]=af(lx,{forceMount:void 0}),pz=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=tu(lx,t);return d(dz,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Ht,{asChild:!0,container:a,children:r})})})};pz.displayName=lx;var Cs="TooltipContent",xk=C((e,t)=>{let o=fz(Cs,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=tu(Cs,e.__scopeTooltip);return d($e,{present:r||s.open,children:s.disableHoverableContent?d(yk,{side:a,...n,ref:t}):d(mz,{side:a,...n,ref:t})})}),mz=C((e,t)=>{let o=tu(Cs,e.__scopeTooltip),r=ix(Cs,e.__scopeTooltip),a=E(null),n=fe(t,a),[s,i]=k(null),{trigger:l,onClose:u}=o,c=a.current,{onPointerInTransitChange:f}=r,p=H(()=>{i(null),f(!1)},[f]),m=H((h,g)=>{let v=h.currentTarget,x={x:h.clientX,y:h.clientY},y=xz(x,v.getBoundingClientRect()),b=yz(x,y),R=bz(g.getBoundingClientRect()),w=wz([...b,...R]);i(w),f(!0)},[f]);return D(()=>()=>p(),[p]),D(()=>{if(l&&c){let h=v=>m(v,c),g=v=>m(v,l);return l.addEventListener("pointerleave",h),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",h),c.removeEventListener("pointerleave",g)}}},[l,c,m,p]),D(()=>{if(s){let h=g=>{let v=g.target,x={x:g.clientX,y:g.clientY},y=l?.contains(v)||c?.contains(v),b=!Cz(x,s);y?p():b&&(p(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,c,s,u,p]),d(yk,{...e,ref:n})}),[gz,hz]=af(eu,{isInside:!1}),vz=Ly("TooltipContent"),yk=C((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=tu(Cs,o),u=nf(o),{onClose:c}=l;return D(()=>(document.addEventListener(nx,c),()=>document.removeEventListener(nx,c)),[c]),D(()=>{if(l.trigger){let f=p=>{p.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),d(Xt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:P(Ur,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d(vz,{children:r}),d(gz,{scope:o,isInside:!0,children:d(VT,{id:l.contentId,role:"tooltip",children:a||r})})]})})});xk.displayName=Cs;var bk="TooltipArrow",Ck=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=nf(o);return hz(bk,o).isInside?null:d(Gr,{...a,...r,ref:t})});Ck.displayName=bk;function xz(e,t){let o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),n=Math.abs(t.left-e.x);switch(Math.min(o,r,a,n)){case n:return"left";case a:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function yz(e,t,o=5){let r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function bz(e){let{top:t,right:o,bottom:r,left:a}=e;return[{x:a,y:t},{x:o,y:t},{x:o,y:r},{x:a,y:r}]}function Cz(e,t){let{x:o,y:r}=e,a=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let i=t[n],l=t[s],u=i.x,c=i.y,f=l.x,p=l.y;c>r!=p>r&&o<(f-u)*(r-c)/(p-c)+u&&(a=!a)}return a}function wz(e){let t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Sz(t)}function Sz(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let a=e[r];for(;t.length>=2;){let n=t[t.length-1],s=t[t.length-2];if((n.x-s.x)*(a.y-s.y)>=(n.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();let o=[];for(let r=e.length-1;r>=0;r--){let a=e[r];for(;o.length>=2;){let n=o[o.length-1],s=o[o.length-2];if((n.x-s.x)*(a.y-s.y)>=(n.y-s.y)*(a.x-s.x))o.pop();else break}o.push(a)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var wk=gk,Sk=hk,Rk=vk;var ux=xk,cx=Ck;var sf=wk,dx=Q("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground border-success",warning:"bg-warning text-warning-foreground border-warning",destructive:"bg-destructive text-destructive-foreground",info:"bg-info text-info-foreground border-info"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),ou=Sk,ru=Rk,lf=C(({className:e,...t},o)=>d(cx,{ref:o,className:L("moonui-theme","fill-current",e),...t}));lf.displayName=cx.displayName;var ws=C(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>P(ux,{ref:s,sideOffset:a,className:L("moonui-theme",dx({variant:t,size:o}),e),...n,children:[n.children,r&&d(lf,{})]}));ws.displayName=ux.displayName;var fx=C(({children:e,content:t,variant:o="default",size:r="md",side:a="top",align:n="center",delayDuration:s=400,sideOffset:i=4,showArrow:l=!1,className:u,open:c,defaultOpen:f,onOpenChange:p,...m},h)=>P(ou,{open:c,defaultOpen:f,onOpenChange:p,delayDuration:s,children:[d(ru,{asChild:!0,children:e}),d(ws,{ref:h,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...m,children:t})]}));fx.displayName="SimpleTooltip";var st=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>P(ou,{children:[d(ru,{asChild:!0,children:d(Jl,{pressed:o,onPressedChange:()=>r(),disabled:a,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),d(ws,{children:d("p",{children:t})})]}),Iz=({onColorSelect:e})=>d("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(o=>d("button",{type:"button","aria-label":`Select color ${o}`,className:"w-6 h-6 rounded border-2 border-border hover:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",style:{backgroundColor:o},onClick:()=>e(o)},o))}),px=Ie.forwardRef(({value:e="",onChange:t,placeholder:o="Start writing...",disabled:r=!1,className:a,minHeight:n=200,maxHeight:s=500,showToolbar:i=!0,showPreview:l=!0,...u},c)=>{let[f,p]=k(e),[m,h]=k(!1),[g,v]=k(e),[x,y]=k(null),b=Ie.useRef(null),R=Ie.useRef(null),[w,I]=k({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),S=H(_=>{p(_),t?.(_)},[t]),T=H(()=>{let _=window.getSelection();return _&&_.rangeCount>0?_.getRangeAt(0):null},[]),M=H(_=>{if(!_)return;let ae=window.getSelection();ae&&(ae.removeAllRanges(),ae.addRange(_))},[]),A=H((_,ae)=>{if(r)return;b.current&&b.current.focus();let ie=T();if(document.execCommand(_,!1,ae)||console.warn(`Command '${_}' failed to execute`),b.current){let te=b.current.innerHTML;S(te)}I({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),b.current&&b.current.focus()},[r,T,S]),O=H(_=>{let ae=_.currentTarget.innerHTML;S(ae)},[S]),V=H(_=>{if(_.ctrlKey||_.metaKey)switch(_.key){case"b":_.preventDefault(),A("bold");break;case"i":_.preventDefault(),A("italic");break;case"u":_.preventDefault(),A("underline");break;case"z":_.preventDefault(),_.shiftKey?A("redo"):A("undo");break}_.key==="Tab"&&(_.preventDefault(),A("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[A]),q=H(()=>{let _=prompt("Enter URL:");_&&A("createLink",_)},[A]),F=H(()=>{let _=prompt("Enter image URL:");_&&A("insertImage",_)},[A]),$=H(_=>{A("formatBlock",`<h${_}>`)},[A]),U=H(_=>{let ae=window.getSelection();if(ae&&ae.rangeCount>0){let ie=ae.getRangeAt(0),W=document.createElement("span");W.style.color=_;try{ie.surroundContents(W)}catch{A("foreColor",_)}if(b.current){let te=b.current.innerHTML;S(te)}}},[A,S]),G=_=>{if(typeof window>"u")return _.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'");let ae=document.createElement("div");return ae.innerHTML=_,ae.textContent||ae.innerText||""};Ie.useEffect(()=>{b.current&&f&&f!==b.current.innerHTML&&(b.current.innerHTML=f)},[f]),Ie.useEffect(()=>{e!==void 0&&e!==f&&(p(e),v(e))},[e,f]);let z=i&&d(sf,{children:P(_e.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!m&&P(Ve,{children:[P("div",{className:"flex items-center gap-1",children:[d(st,{icon:d(Us,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:w.bold,onClick:()=>A("bold"),disabled:r}),d(st,{icon:d(Qs,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:w.italic,onClick:()=>A("italic"),disabled:r}),d(st,{icon:d(ui,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:w.underline,onClick:()=>A("underline"),disabled:r}),d(st,{icon:d(li,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:w.strikethrough,onClick:()=>A("strikeThrough"),disabled:r})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P(Ja,{onValueChange:_=>{_.startsWith("h")?$(_.substring(1)):_==="normal"?A("formatBlock","p"):A("fontSize",_)},disabled:r,children:[d(en,{className:"w-24 h-8",children:d(gs,{placeholder:"Size"})}),P(tn,{children:[d(wt,{value:"1",children:"Small"}),d(wt,{value:"3",children:"Normal"}),d(wt,{value:"5",children:"Large"}),d(wt,{value:"7",children:"X-Large"}),d(Gt,{className:"my-1"}),d(wt,{value:"h1",children:"Heading 1"}),d(wt,{value:"h2",children:"Heading 2"}),d(wt,{value:"h3",children:"Heading 3"}),d(wt,{value:"h4",children:"Heading 4"}),d(wt,{value:"h5",children:"Heading 5"}),d(wt,{value:"h6",children:"Heading 6"})]})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(st,{icon:d(_s,{className:"h-3 w-3"}),tooltip:"Align Left",active:w.alignLeft,onClick:()=>A("justifyLeft"),disabled:r}),d(st,{icon:d(Os,{className:"h-3 w-3"}),tooltip:"Align Center",active:w.alignCenter,onClick:()=>A("justifyCenter"),disabled:r}),d(st,{icon:d(Vs,{className:"h-3 w-3"}),tooltip:"Align Right",active:w.alignRight,onClick:()=>A("justifyRight"),disabled:r}),d(st,{icon:d(Fs,{className:"h-3 w-3"}),tooltip:"Justify",active:w.alignJustify,onClick:()=>A("justifyFull"),disabled:r})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(st,{icon:d(ti,{className:"h-3 w-3"}),tooltip:"Bullet List",active:w.unorderedList,onClick:()=>A("insertUnorderedList"),disabled:r}),d(st,{icon:d(ei,{className:"h-3 w-3"}),tooltip:"Numbered List",active:w.orderedList,onClick:()=>A("insertOrderedList"),disabled:r}),d(st,{icon:d(si,{className:"h-3 w-3"}),tooltip:"Quote",active:w.quote,onClick:()=>A("formatBlock","blockquote"),disabled:r}),d(st,{icon:d(Ws,{className:"h-3 w-3"}),tooltip:"Code Block",active:w.code,onClick:()=>A("formatBlock","pre"),disabled:r})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(st,{icon:d("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>A("outdent"),disabled:r}),d(st,{icon:d("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>A("indent"),disabled:r})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(st,{icon:d(Js,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:q,disabled:r}),d(st,{icon:d(la,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:F,disabled:r})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P(zo,{children:[d(Wo,{asChild:!0,children:d(Le,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:d(ua,{className:"h-3 w-3"})})}),d(Ro,{className:"w-auto p-0",children:d(Iz,{onColorSelect:U})})]}),d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(st,{icon:d(ci,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>A("undo"),disabled:r}),d(st,{icon:d(ii,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>A("redo"),disabled:r})]})]}),l&&P(Ve,{children:[!m&&d(Gt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),d(st,{icon:m?d(kt,{className:"h-3 w-3"}):d(ia,{className:"h-3 w-3"}),tooltip:m?"Edit Mode":"View Source Code",active:m,onClick:()=>{m?S(g):v(f),h(!m)},disabled:r})]})]})});return P("div",{ref:c,className:L("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",r&&"opacity-50 cursor-not-allowed",a),...u,children:[z,P("div",{className:"relative",children:[m?d(_e.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:n,maxHeight:s,overflow:"auto"},children:d("textarea",{ref:R,value:g,onChange:_=>v(_.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:n-32},disabled:r,placeholder:"HTML source code..."})}):d(_e.div,{ref:b,contentEditable:!r,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":o,"aria-disabled":r||void 0,className:L("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-background text-foreground","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:n,maxHeight:s},onInput:O,onKeyDown:V,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!f&&!m&&d("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),d("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:d(Pz,{content:f})})]})});px.displayName="SimpleEditor";var Pz=({content:e})=>{let[t,o]=k(0);return D(()=>{o((a=>{let n=document.createElement("div");return n.innerHTML=a,n.textContent||n.innerText||""})(e).length)},[e]),P(Ve,{children:[t," characters"]})};N();var mx=Q("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{md:"",sm:"scale-90",lg:"scale-110",default:""},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"md",shape:"rect",animation:"pulse"}}),hr=C(({className:e,variant:t,size:o,shape:r,animation:a,height:n,width:s,isLoaded:i=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:f,...p},m)=>{let{onDrag:h,onDragEnd:g,onDragStart:v,onAnimationStart:x,onAnimationEnd:y,onAnimationIteration:b,...R}=p;if(i&&l)return c?d(_e.div,{ref:m,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:L("moonui-theme",e),style:{height:n,width:s,...f},...R,children:l}):d("div",{ref:m,className:L("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:n,width:s,...f},...p,children:l});let w=c?_e.div:"div";return d(w,{ref:m,"aria-hidden":"true",className:L("moonui-theme",mx({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...f},...c?HS:{},...R})});hr.displayName="Skeleton";var uf=C(({className:e,lines:t=3,lineHeight:o="0.85rem",spacing:r="0.5rem",lastLineWidth:a=80,randomWidths:n=!1,variant:s="default",animation:i="pulse",...l},u)=>d("div",{ref:u,className:L("moonui-theme","flex flex-col",e),style:{gap:r},...l,children:Array.from({length:t}).map((c,f)=>{let m=f===t-1?a:n?85+f%3*5:100;return d(hr,{variant:s,animation:i,className:"w-full",style:{height:o,width:`${m}%`}},f)})}));uf.displayName="SkeletonText";var cf=C(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...a},n)=>d(hr,{ref:n,variant:o,animation:r,shape:"circle",className:L("moonui-theme","shrink-0",e),style:{height:t,width:t},...a}));cf.displayName="SkeletonAvatar";var gx=C(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:a="default",animation:n="pulse",...s},i)=>P("div",{ref:i,className:L("overflow-hidden rounded-md border border-border bg-background p-4",e),...s,children:[t&&P("div",{className:"mb-4 flex items-center gap-4",children:[d(cf,{size:"2.5rem",variant:a,animation:n}),P("div",{className:"flex-1",children:[d(hr,{variant:a,animation:n,className:"mb-2 h-4 w-1/3"}),d(hr,{variant:a,animation:n,className:"h-3 w-1/4"})]})]}),d(uf,{lines:o,variant:a,animation:n,className:"mb-4"}),r&&P("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[d(hr,{variant:a,animation:n,className:"h-4 w-1/4"}),d(hr,{variant:a,animation:n,className:"h-4 w-1/5"})]})]}));gx.displayName="SkeletonCard";N();var hx=C(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:a=100,disabled:n=!1,...s},i)=>{let[l,u]=k(0),[c,f]=k(0),[p,m]=k(!1),h=x=>{n||(u(x.touches[0].clientX),m(!0))},g=x=>{n||!p||f(x.touches[0].clientX)},v=()=>{if(n||!p)return;let x=c-l;Math.abs(x)>a&&(x>0&&r?r():x<0&&o&&o()),m(!1),f(0),u(0)};return d("div",{ref:i,className:L("touch-pan-y select-none transition-transform duration-200",p&&"cursor-grabbing",e),onTouchStart:h,onTouchMove:g,onTouchEnd:v,...s,children:t})});hx.displayName="SwipeableCard";N();N();var df="Switch",[Lz,kye]=ke(df),[Tz,Mz]=Lz(df),Ik=C((e,t)=>{let{__scopeSwitch:o,name:r,checked:a,defaultChecked:n,required:s,disabled:i,value:l="on",onCheckedChange:u,form:c,...f}=e,[p,m]=k(null),h=fe(t,b=>m(b)),g=E(!1),v=p?c||!!p.closest("form"):!0,[x,y]=Be({prop:a,defaultProp:n??!1,onChange:u,caller:df});return P(Tz,{scope:o,checked:x,disabled:i,children:[d(Y.button,{type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":Mk(x),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:h,onClick:X(e.onClick,b=>{y(R=>!R),v&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),v&&d(Tk,{control:p,bubbles:!g.current,name:r,value:l,checked:x,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});Ik.displayName=df;var Pk="SwitchThumb",Lk=C((e,t)=>{let{__scopeSwitch:o,...r}=e,a=Mz(Pk,o);return d(Y.span,{"data-state":Mk(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Lk.displayName=Pk;var kz="SwitchBubbleInput",Tk=C(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=E(null),i=fe(s,n),l=es(o),u=ts(t);return D(()=>{let c=s.current;if(!c)return;let f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==o&&m){let h=new Event("click",{bubbles:r});m.call(c,o),c.dispatchEvent(h)}},[l,o,r]),d("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:i,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tk.displayName=kz;function Mk(e){return e?"checked":"unchecked"}var vx=Ik,kk=Lk;var Ek=Q(["peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full","border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=unchecked]:bg-input","dark:focus-visible:ring-primary/40"],{variants:{size:{sm:"h-4 w-8",md:"h-6 w-11",lg:"h-7 w-14"},variant:{primary:"data-[state=checked]:bg-primary",success:"data-[state=checked]:bg-success",warning:"data-[state=checked]:bg-[rgb(var(--warning-700))] dark:data-[state=checked]:bg-warning",destructive:"data-[state=checked]:bg-error",secondary:"data-[state=checked]:bg-[rgb(var(--secondary-500))]"}},defaultVariants:{size:"md",variant:"primary"}}),Az=Q("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",{variants:{size:{sm:"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",md:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",lg:"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"md"}}),xx=C(({className:e,size:t,variant:o,loading:r,leftIcon:a,rightIcon:n,description:s,"aria-describedby":i,...l},u)=>{let c=qe(),f=s?`${c}-description`:void 0,p=[i,f].filter(Boolean).join(" ")||void 0;return P("div",{className:"moonui-theme inline-flex items-center gap-2",children:[a&&d("span",{className:"text-muted-foreground",children:a}),P(vx,{className:L(Ek({size:t,variant:o}),r&&"opacity-80 cursor-wait",e),disabled:r||l.disabled,"aria-describedby":p,...l,ref:u,children:[r?d("div",{className:"absolute inset-0 flex items-center justify-center",children:d("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,d(kk,{className:L(Az({size:t}))})]}),n&&d("span",{className:"text-muted-foreground",children:n}),s&&d("span",{id:f,className:"text-sm text-muted-foreground",children:s})]})});xx.displayName=vx.displayName;N();var yx=C(({value:e=[],onChange:t,maxTags:o,variant:r="primary",allowDuplicates:a=!1,delimiter:n=",",placeholder:s="Add tag and press Enter",className:i,disabled:l,...u},c)=>{let[f,p]=k(""),[m,h]=k(""),g=E(null);ra(c,()=>g.current);let v=E([]),x=qe(),y=S=>{if(e.length===0)return;let T=Math.max(0,Math.min(e.length-1,S));v.current[T]?.focus()},b=S=>{S.key==="Enter"||S.key===n?(S.preventDefault(),w()):S.key==="Backspace"&&f===""&&e.length>0?I(e.length-1):S.key==="ArrowLeft"&&f===""&&e.length>0&&(S.preventDefault(),y(e.length-1))},R=S=>T=>{switch(T.key){case"ArrowLeft":T.preventDefault(),y(S-1);break;case"ArrowRight":T.preventDefault(),S>=e.length-1?g.current?.focus():y(S+1);break;case"Home":T.preventDefault(),y(0);break;case"End":T.preventDefault(),y(e.length-1);break;case"Delete":case"Backspace":{T.preventDefault();let M=e.length-1;I(S),requestAnimationFrame(()=>{M>0?y(Math.min(S,M-1)):g.current?.focus()});break}default:break}},w=()=>{let S=f.trim();if(S){if(!a&&e.includes(S)){h("This tag already exists"),setTimeout(()=>h(""),2e3);return}if(o&&e.length>=o){h(`Maximum ${o} tags allowed`),setTimeout(()=>h(""),2e3);return}t([...e,S]),p(""),h("")}},I=S=>{l||t(e.filter((T,M)=>M!==S))};return P("div",{className:"relative",children:[P("div",{className:L("flex items-center min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",i),children:[e.map((S,T)=>P(It,{variant:r,className:"gap-1 pr-1.5",children:[d("span",{className:"text-xs",children:S}),!l&&d("button",{ref:M=>{v.current[T]=M},type:"button","aria-label":`Remove ${S}`,onClick:()=>I(T),onKeyDown:R(T),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:d(_t,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},T)),d("input",{ref:g,type:"text",value:f,onChange:S=>p(S.target.value),onKeyDown:b,onBlur:w,disabled:l,placeholder:e.length===0?s:"","aria-label":"Add tag","aria-describedby":m?x:void 0,"aria-invalid":m?!0:void 0,className:L("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),m&&d("p",{id:x,role:"status",className:"mt-1 text-xs text-destructive",children:m})]})});yx.displayName="TagsInput";N();var Dz=Q(["flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200","text-foreground placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none dark:text-gray-200","resize-none"],{variants:{variant:{default:"border border-input bg-background dark:bg-gray-800/80 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",outline:"border-2 border-input bg-transparent focus-visible:border-primary dark:focus-visible:border-primary/80",ghost:"border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b-2 border-input rounded-none px-0 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"},size:{sm:"min-h-[60px] text-xs",md:"min-h-[80px] text-sm",lg:"min-h-[120px] text-base"},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""}},defaultVariants:{variant:"default",size:"md",isError:!1,isSuccess:!1}}),bx=C(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:a,error:n,success:s,loading:i,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:f,maxLength:p,value:m,defaultValue:h,onChange:g,...v},x)=>{let y=qe(),b=v.id||y,R=E(null),[w,I]=k(m||h||"");ra(x,()=>R.current);let S=H(()=>{let F=R.current;if(!F||!l)return;F.style.height="auto";let $=F.scrollHeight;u&&$>u?(F.style.height=`${u}px`,F.style.overflowY="auto"):(F.style.height=`${$}px`,F.style.overflowY="hidden")},[l,u]);D(()=>{S()},[w,S]),D(()=>{m!==void 0&&I(m)},[m]);let T=F=>{I(F.target.value),g?.(F)},M=String(w).length,A=c&&(p!==void 0||M>0),O=typeof n=="string"?n:void 0,V=typeof s=="string"?s:void 0,q=O||V;return P("div",{className:L("moonui-theme","space-y-1.5 w-full",t),children:[P("div",{className:"relative",children:[d("textarea",{ref:R,className:L(Dz({variant:r,size:a,isError:!!n,isSuccess:!!s}),i&&"pr-10",e),disabled:f||i,value:m,defaultValue:h,onChange:T,maxLength:p,"aria-invalid":!!n||void 0,"aria-describedby":O?`${b}-error`:V?`${b}-success`:void 0,...v}),i&&d("div",{className:"absolute top-3 right-3 text-gray-500",children:d(rt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),P("div",{className:"flex items-center justify-between",children:[q&&d("p",{className:L("text-xs transition-all",O&&"text-error",V&&"text-success",o),id:O?`${b}-error`:V?`${b}-success`:void 0,children:O||V}),A&&P("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[M,p!==void 0&&` / ${p}`]})]})]})});bx.displayName="Textarea";N();N();var Ix="ToastProvider",[Px,Nz,Oz]=Eo("Toast"),[Dk,rbe]=ke("Toast",[Oz]),[Fz,pf]=Dk(Ix),Nk=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:n=50,children:s}=e,[i,l]=k(null),[u,c]=k(0),f=E(!1),p=E(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ix}\`. Expected non-empty \`string\`.`),d(Px.Provider,{scope:t,children:d(Fz,{scope:t,label:o,duration:r,swipeDirection:a,swipeThreshold:n,toastCount:u,viewport:i,onViewportChange:l,onToastAdd:H(()=>c(m=>m+1),[]),onToastRemove:H(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:s})})};Nk.displayName=Ix;var Ok="ToastViewport",_z=["F8"],wx="toast.viewportPause",Sx="toast.viewportResume",Fk=C((e,t)=>{let{__scopeToast:o,hotkey:r=_z,label:a="Notifications ({hotkey})",...n}=e,s=pf(Ok,o),i=Nz(o),l=E(null),u=E(null),c=E(null),f=E(null),p=fe(t,f,s.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=s.toastCount>0;D(()=>{let v=x=>{r.length!==0&&r.every(b=>x[b]||x.code===b)&&f.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),D(()=>{let v=l.current,x=f.current;if(h&&v&&x){let y=()=>{if(!s.isClosePausedRef.current){let I=new CustomEvent(wx);x.dispatchEvent(I),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){let I=new CustomEvent(Sx);x.dispatchEvent(I),s.isClosePausedRef.current=!1}},R=I=>{!v.contains(I.relatedTarget)&&b()},w=()=>{v.contains(document.activeElement)||b()};return v.addEventListener("focusin",y),v.addEventListener("focusout",R),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",R),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[h,s.isClosePausedRef]);let g=H(({tabbingDirection:v})=>{let y=i().map(b=>{let R=b.ref.current,w=[R,...Yz(R)];return v==="forwards"?w:w.reverse()});return(v==="forwards"?y.reverse():y).flat()},[i]);return D(()=>{let v=f.current;if(v){let x=y=>{let b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){let w=document.activeElement,I=y.shiftKey;if(y.target===v&&I){u.current?.focus();return}let M=g({tabbingDirection:I?"backwards":"forwards"}),A=M.findIndex(O=>O===w);Cx(M.slice(A+1))?y.preventDefault():I?u.current?.focus():c.current?.focus()}};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)}},[i,g]),P($R,{ref:l,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&d(Rx,{ref:u,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"forwards"});Cx(v)}}),d(Px.Slot,{scope:o,children:d(Y.ol,{tabIndex:-1,...n,ref:p})}),h&&d(Rx,{ref:c,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"backwards"});Cx(v)}})]})});Fk.displayName=Ok;var _k="ToastFocusProxy",Rx=C((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=pf(_k,o);return d($l,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});Rx.displayName=_k;var au="Toast",Vz="toast.swipeStart",Bz="toast.swipeMove",Hz="toast.swipeCancel",Uz="toast.swipeEnd",Vk=C((e,t)=>{let{forceMount:o,open:r,defaultOpen:a,onOpenChange:n,...s}=e,[i,l]=Be({prop:r,defaultProp:a??!0,onChange:n,caller:au});return d($e,{present:o||i,children:d(Wz,{open:i,...s,ref:t,onClose:()=>l(!1),onPause:ze(e.onPause),onResume:ze(e.onResume),onSwipeStart:X(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:X(e.onSwipeMove,u=>{let{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:X(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:X(e.onSwipeEnd,u=>{let{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Vk.displayName=au;var[Gz,zz]=Dk(au,{onClose(){}}),Wz=C((e,t)=>{let{__scopeToast:o,type:r="foreground",duration:a,open:n,onClose:s,onEscapeKeyDown:i,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:m,...h}=e,g=pf(au,o),[v,x]=k(null),y=fe(t,F=>x(F)),b=E(null),R=E(null),w=a||g.duration,I=E(0),S=E(w),T=E(0),{onToastAdd:M,onToastRemove:A}=g,O=ze(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),V=H(F=>{!F||F===1/0||(window.clearTimeout(T.current),I.current=new Date().getTime(),T.current=window.setTimeout(O,F))},[O]);D(()=>{let F=g.viewport;if(F){let $=()=>{V(S.current),u?.()},U=()=>{let G=new Date().getTime()-I.current;S.current=S.current-G,window.clearTimeout(T.current),l?.()};return F.addEventListener(wx,U),F.addEventListener(Sx,$),()=>{F.removeEventListener(wx,U),F.removeEventListener(Sx,$)}}},[g.viewport,w,l,u,V]),D(()=>{n&&!g.isClosePausedRef.current&&V(w)},[n,w,g.isClosePausedRef,V]),D(()=>(M(),()=>A()),[M,A]);let q=Z(()=>v?qk(v):null,[v]);return g.viewport?P(Ve,{children:[q&&d(qz,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:q}),d(Gz,{scope:o,onClose:O,children:Ds(d(Px.ItemSlot,{scope:o,children:d(qR,{asChild:!0,onEscapeKeyDown:X(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:d(Y.li,{tabIndex:0,"data-state":n?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:X(e.onKeyDown,F=>{F.key==="Escape"&&(i?.(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:X(e.onPointerDown,F=>{F.button===0&&(b.current={x:F.clientX,y:F.clientY})}),onPointerMove:X(e.onPointerMove,F=>{if(!b.current)return;let $=F.clientX-b.current.x,U=F.clientY-b.current.y,G=!!R.current,z=["left","right"].includes(g.swipeDirection),_=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,ae=z?_(0,$):0,ie=z?0:_(0,U),W=F.pointerType==="touch"?10:2,te={x:ae,y:ie},ne={originalEvent:F,delta:te};G?(R.current=te,ff(Bz,f,ne,{discrete:!1})):Ak(te,g.swipeDirection,W)?(R.current=te,ff(Vz,c,ne,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs($)>W||Math.abs(U)>W)&&(b.current=null)}),onPointerUp:X(e.onPointerUp,F=>{let $=R.current,U=F.target;if(U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),R.current=null,b.current=null,$){let G=F.currentTarget,z={originalEvent:F,delta:$};Ak($,g.swipeDirection,g.swipeThreshold)?ff(Uz,m,z,{discrete:!0}):ff(Hz,p,z,{discrete:!0}),G.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),qz=e=>{let{__scopeToast:t,children:o,...r}=e,a=pf(au,t),[n,s]=k(!1),[i,l]=k(!1);return Kz(()=>s(!0)),D(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:d(Ht,{asChild:!0,children:d($l,{...r,children:n&&P(Ve,{children:[a.label," ",o]})})})},$z="ToastTitle",Bk=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});Bk.displayName=$z;var jz="ToastDescription",Hk=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});Hk.displayName=jz;var Uk="ToastAction",Gk=C((e,t)=>{let{altText:o,...r}=e;return o.trim()?d(Wk,{altText:o,asChild:!0,children:d(Lx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Uk}\`. Expected non-empty \`string\`.`),null)});Gk.displayName=Uk;var zk="ToastClose",Lx=C((e,t)=>{let{__scopeToast:o,...r}=e,a=zz(zk,o);return d(Wk,{asChild:!0,children:d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,a.onClose)})})});Lx.displayName=zk;var Wk=C((e,t)=>{let{__scopeToast:o,altText:r,...a}=e;return d(Y.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function qk(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Xz(r)){let a=r.ariaHidden||r.hidden||r.style.display==="none",n=r.dataset.radixToastAnnounceExclude==="";if(!a)if(n){let s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...qk(r))}}),t}function ff(e,t,o,{discrete:r}){let a=o.originalEvent.currentTarget,n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),r?an(a,n):a.dispatchEvent(n)}var Ak=(e,t,o=0)=>{let r=Math.abs(e.x),a=Math.abs(e.y),n=r>a;return t==="left"||t==="right"?n&&r>o:!n&&a>o};function Kz(e=()=>{}){let t=ze(e);Ae(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function Xz(e){return e.nodeType===e.ELEMENT_NODE}function Yz(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function Cx(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var $k=Nk,Tx=Fk,Mx=Vk,kx=Bk,Ex=Hk,Ax=Gk,Dx=Lx;var Ox=$k,hf=C(({className:e,...t},o)=>d(Tx,{ref:o,className:L("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));hf.displayName=Tx.displayName;var Qz=Q("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-success-subtle-foreground/20 bg-success-subtle text-success-subtle-foreground",warning:"border-warning-subtle-foreground/20 bg-warning-subtle text-warning-subtle-foreground",info:"border-info-subtle-foreground/20 bg-info-subtle text-info-subtle-foreground"}},defaultVariants:{variant:"default"}}),vf=C(({className:e,variant:t,...o},r)=>d(Mx,{ref:r,className:L("moonui-theme",Qz({variant:t}),e),...o}));vf.displayName=Mx.displayName;var Fx=C(({className:e,...t},o)=>d(Ax,{ref:o,className:L("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Fx.displayName=Ax.displayName;var xf=C(({className:e,...t},o)=>P(Dx,{ref:o,className:L("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground/70 group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive-foreground/40 group-[.destructive]:focus:ring-offset-destructive",e),"toast-close":"",...t,children:[d(_t,{className:"h-4 w-4"}),d("span",{className:"sr-only",children:"Close"})]}));xf.displayName=Dx.displayName;var yf=C(({className:e,...t},o)=>d(kx,{ref:o,className:L("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));yf.displayName=kx.displayName;var bf=C(({className:e,...t},o)=>d(Ex,{ref:o,className:L("moonui-theme","text-sm opacity-90",e),...t}));bf.displayName=Ex.displayName;var Jz=5,e3=1e6,Nx=new Map,jk=e=>{if(Nx.has(e))return;let t=setTimeout(()=>{Nx.delete(e),nu({type:"REMOVE_TOAST",toastId:e})},e3);Nx.set(e,t)},t3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Jz)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{let{toastId:o}=t;return o?jk(o):e.toasts.forEach(r=>{jk(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};default:return e}},mf=[],gf={toasts:[]},o3=0;function nu(e){gf=t3(gf,e),mf.forEach(t=>{t(gf)})}function _x({...e}){let t=`toast-${Date.now()}-${++o3}`,o=a=>nu({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>nu({type:"DISMISS_TOAST",toastId:t});return nu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function Vx(){let[e,t]=k(gf);return D(()=>(mf.push(t),()=>{let o=mf.indexOf(t);o>-1&&mf.splice(o,1)}),[e]),{...e,toast:_x,dismiss:o=>nu({type:"DISMISS_TOAST",toastId:o})}}function Kk(){let{toasts:e}=Vx();return P(Ox,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return P(vf,{variant:n,open:s,onOpenChange:i,...l,children:[P("div",{className:"grid gap-1",children:[o&&d(yf,{children:o}),r&&d(bf,{children:r})]}),a,d(xf,{})]},t)}),d(hf,{})]})}N();var Bx=Q(["inline-flex items-center justify-center rounded","border border-border bg-muted","px-1.5 font-mono font-medium text-muted-foreground","shadow-[0_1px_0_1px_hsl(var(--border))]","select-none whitespace-nowrap"],{variants:{size:{sm:"h-5 min-w-5 text-[10px]",md:"h-6 min-w-6 text-xs"}},defaultVariants:{size:"md"}}),Hx=C(({className:e,size:t,children:o,...r},a)=>d("kbd",{ref:a,className:L("moonui-theme",Bx({size:t}),e),...r,children:o}));Hx.displayName="Kbd";N();var Ux=Q(["moonui-theme inline-flex items-center rounded-md outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"],{variants:{size:{sm:"gap-0.5",md:"gap-1",lg:"gap-1.5"}},defaultVariants:{size:"md"}}),r3={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},Gx=C(({className:e,value:t,defaultValue:o,onValueChange:r,max:a=5,readOnly:n=!1,precision:s="full",icon:i,size:l,"aria-label":u="Rating",...c},f)=>{let m=r3[l??"md"],h=s==="half"?.5:1,g=t!==void 0,[v,x]=k(o??0),y=g?t??0:v,[b,R]=k(null),w=b!==null?b:y,I=H(A=>{n||(g||x(A),r?.(A))},[n,g,r]),S=H(A=>{if(n)return;let O=null;switch(A.key){case"ArrowRight":case"ArrowUp":O=Math.min(a,y+h);break;case"ArrowLeft":case"ArrowDown":O=Math.max(h,y-h);break;case"Home":O=h;break;case"End":O=a;break;default:return}A.preventDefault(),I(O)},[n,a,y,h,I]),T=A=>{if(Ee(i)){let O=i;return Fe(O,{className:L(m,"shrink-0",A&&"fill-current",O.props?.className)})}return d(Cr,{className:L(m,"shrink-0",A&&"fill-current"),"aria-hidden":"true"})},M=Array.from({length:a},(A,O)=>O+1);return d("div",{ref:f,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":n||void 0,tabIndex:n?void 0:0,onKeyDown:S,onMouseLeave:()=>R(null),className:L(Ux({size:l}),e),...c,children:M.map(A=>{let O=Math.max(0,Math.min(1,w-(A-1))),V=A-.5;return P("span",{"data-slot":"rating-star",className:L("relative inline-flex shrink-0",!n&&"cursor-pointer"),children:[d("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:T(!1)}),d("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-amber-400",style:{width:`${O*100}%`},children:T(!0)}),!n&&s==="half"&&P(Ve,{children:[d("button",{type:"button",role:"radio","aria-checked":y===V,"aria-label":`${V} stars`,tabIndex:-1,onClick:()=>I(V),onMouseEnter:()=>R(V),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),d("button",{type:"button",role:"radio","aria-checked":y===A,"aria-label":`${A} stars`,tabIndex:-1,onClick:()=>I(A),onMouseEnter:()=>R(A),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!n&&s==="full"&&d("button",{type:"button",role:"radio","aria-checked":y===A,"aria-label":`${A} ${A===1?"star":"stars"}`,tabIndex:-1,onClick:()=>I(A),onMouseEnter:()=>R(A),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},A)})})});Gx.displayName="Rating";N();var zx=Q(["inline-block shrink-0 rounded-full","border-current border-t-transparent","animate-spin motion-reduce:animate-none"],{variants:{size:{sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-[3px]",xl:"h-10 w-10 border-4"}},defaultVariants:{size:"md"}}),a3={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},Wx=C(({className:e,size:t,variant:o="default",label:r="Loading",...a},n)=>P("div",{ref:n,role:"status","aria-live":"polite",className:L("moonui-theme inline-flex items-center justify-center",e),...a,children:[o==="dots"?d("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(s=>d("span",{className:L("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",a3[t??"md"]),style:{animationDelay:`${s*.15}s`}},s))}):d("span",{className:L(zx({size:t})),"aria-hidden":"true"}),d("span",{className:"sr-only",children:r})]}));Wx.displayName="Spinner";N();var qx=Q("moonui-theme inline-flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-stretch"},attached:{true:"",false:"gap-2"}},compoundVariants:[{orientation:"horizontal",attached:!0,class:["[&>*:not(:first-child)]:rounded-l-none","[&>*:not(:last-child)]:rounded-r-none","[&>*:not(:first-child)]:-ml-px"]},{orientation:"vertical",attached:!0,class:["[&>*:not(:first-child)]:rounded-t-none","[&>*:not(:last-child)]:rounded-b-none","[&>*:not(:first-child)]:-mt-px"]}],defaultVariants:{orientation:"horizontal",attached:!0}}),$x=C(({className:e,orientation:t,attached:o,size:r,variant:a,children:n,...s},i)=>{let u=r!==void 0||a!==void 0?Pe.map(n,c=>{if(!Ee(c)||c.type!==Le)return c;let f=c.props;return Fe(c,{size:f.size??r,variant:f.variant??a})}):n;return d("div",{ref:i,role:"group",className:L(qx({orientation:t,attached:o}),e),...s,children:u})});$x.displayName="ButtonGroup";N();N();N();var n3=Object.defineProperty,oo=(e,t)=>n3(e,"name",{value:t,configurable:!0});function s3(e,t){let o=ue(t);o.displayName=e+"Context";let r=oo(n=>{let{children:s,...i}=n,l=Z(()=>i,Object.values(i));return d(o.Provider,{value:l,children:s})},"Provider");r.displayName=e+"Provider";function a(n,s={}){let{optional:i=!1}=s,l=re(o);if(l)return l;if(t!==void 0)return t;if(!i)throw new Error(`\`${n}\` must be used within \`${e}\``)}return oo(a,"useContext"),[r,a]}oo(s3,"createContext");function vr(e,t=[]){let o=[];function r(n,s){let i=ue(s);i.displayName=n+"Context";let l=o.length;o=[...o,s];let u=oo(f=>{let{scope:p,children:m,...h}=f,g=p?.[e]?.[l]||i,v=Z(()=>h,Object.values(h));return d(g.Provider,{value:v,children:m})},"Provider");u.displayName=n+"Provider";function c(f,p,m={}){let{optional:h=!1}=m,g=p?.[e]?.[l]||i,v=re(g);if(v)return v;if(s!==void 0)return s;if(!h)throw new Error(`\`${f}\` must be used within \`${n}\``)}return oo(c,"useContext"),[u,c]}oo(r,"createContext");let a=oo(()=>{let n=o.map(s=>ue(s));return oo(function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])},"useScope")},"createScope");return a.scopeName=e,[r,Xk(a,...t)]}oo(vr,"createContextScope");function Xk(...e){let t=e[0];if(e.length===1)return t;let o=oo(()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return oo(function(n){let s=r.reduce((i,{useScope:l,scopeName:u})=>{let f=l(n)[`__scope${u}`];return{...i,...f}},{});return Z(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}oo(Xk,"composeContextScopes");N();N();N();var i3=Object.defineProperty,Kx=(e,t)=>i3(e,"name",{value:t,configurable:!0});function jx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Kx(jx,"setRef");function Yk(...e){return t=>{let o=!1,r=e.map(a=>{let n=jx(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():jx(e[a],null)}}}}Kx(Yk,"composeRefs");function ro(...e){return H(Yk(...e),e)}Kx(ro,"useComposedRefs");var Ss=!1;var l3=Object.defineProperty,ao=(e,t)=>l3(e,"name",{value:t,configurable:!0}),u3=ao((e,t)=>{let o={...t};for(let r in t){let a=e[r],n=t[r];if(/^on[A-Z]/.test(r))if(a&&n){let i=typeof a=="function",l=typeof n=="function";Ss&&(!i||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof a,typeof n].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?n(...u):void 0;return i&&a(...u),c}}else a&&(o[r]=a);else r==="style"?o[r]={...typeof a=="object"?a:null,...typeof n=="object"?n:null}:r==="className"?o[r]=[a,n].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=Zk(n,a))}return{...e,...o}},"mergeProps");function Zk(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}ao(Zk,"concatAriaDescribedby");var Qk=ue(u3);Qk.displayName="SlotContext";function xr(e){let t=C((o,r)=>{let a=re(Qk),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];Xx(n)&&typeof Cf=="function"&&(n=Cf(n._payload)),Pe.forEach(n,h=>{if(tE(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;Xx(v)&&typeof Cf=="function"&&(v=Cf(v._payload)),l=d3(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Pe.count(n)===1&&Ee(n)&&(l=n);let f=l?eE(l):void 0,p=ro(r,f);if(!l){if(n||n===0)throw new Error(u?m3(e):p3(e));return n}let m=s(i,l.props??{});return l.type!==Je&&(m.ref=r?p:f),Fe(l,m)});return t.displayName=`${e}.Slot`,t}ao(xr,"createSlot");var Jk=Symbol.for("radix.slottable");function c3(e){let t=ao(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Jk,t}ao(c3,"createSlottable");var d3=ao((e,t)=>{if("child"in e.props){let o=e.props.child;return Ee(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Ee(t)?t:null},"getSlottableElementFromSlottable");function eE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}ao(eE,"getElementRef");function tE(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jk}ao(tE,"isSlottable");var f3=Symbol.for("react.lazy");function Xx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===f3&&"_payload"in e&&oE(e._payload)}ao(Xx,"isLazyComponent");function oE(e){return typeof e=="object"&&e!==null&&"then"in e}ao(oE,"isPromiseLike");var p3=ao(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),m3=ao(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Cf=B[" use ".trim().toString()];var g3=Object.defineProperty,h3=(e,t)=>g3(e,"name",{value:t,configurable:!0}),v3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rs=v3.reduce((e,t)=>{let o=xr(`Primitive.${t}`),r=C((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function x3(e,t){e&&jo(()=>e.dispatchEvent(t))}h3(x3,"dispatchDiscreteCustomEvent");N();var y3=Object.defineProperty,Is=(e,t)=>y3(e,"name",{value:t,configurable:!0}),rE=!!(typeof window<"u"&&window.document&&window.document.createElement);function ea(e,t,{checkForDefaultPrevented:o=!0}={}){return Is(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}Is(ea,"composeEventHandlers");function b3(e){if(!rE)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Is(b3,"getOwnerWindow");function Yx(e){if(!rE)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Is(Yx,"getOwnerDocument");function aE(e,t=!1){let{activeElement:o}=Yx(e);if(!o?.nodeName)return null;if(nE(o)&&o.contentDocument)return aE(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=Yx(o).getElementById(r);if(a)return a}}return o}Is(aE,"getActiveElement");function nE(e){return e.tagName==="IFRAME"}Is(nE,"isFrame");N();N();var C3=Object.defineProperty,ut=(e,t)=>C3(e,"name",{value:t,configurable:!0});function Jx(e){let t=e+"CollectionProvider",[o,r]=vr(t),[a,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=ut(g=>{let{scope:v,children:x}=g,y=E(null),b=E(new Map).current;return d(a,{scope:v,itemMap:b,collectionRef:y,children:x})},"CollectionProvider");s.displayName=t;let i=e+"CollectionSlot",l=xr(i),u=C((g,v)=>{let{scope:x,children:y}=g,b=n(i,x),R=ro(v,b.collectionRef);return d(l,{ref:R,children:y})});u.displayName=i;let c=e+"CollectionItemSlot",f="data-radix-collection-item",p=xr(c),m=C((g,v)=>{let{scope:x,children:y,...b}=g,R=E(null),w=ro(v,R),I=n(c,x);return D(()=>(I.itemMap.set(R,{ref:R,...b}),()=>void I.itemMap.delete(R))),d(p,{[f]:"",ref:w,children:y})});m.displayName=c;function h(g){let v=n(e+"CollectionConsumer",g);return H(()=>{let y=v.collectionRef.current;if(!y)return[];let b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((I,S)=>b.indexOf(I.ref.current)-b.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return ut(h,"useCollection"),[{Provider:s,Slot:u,ItemSlot:m},h,r]}ut(Jx,"createCollection");var sE=new WeakMap,ot,no,Zx=(no=class extends Map{constructor(o){super(o);If(this,ot,void 0);cu(this,ot,[...super.keys()]),sE.set(this,!0)}set(o,r){return sE.get(this)&&(this.has(o)?ct(this,ot)[ct(this,ot).indexOf(o)]=o:ct(this,ot).push(o)),super.set(o,r),this}insert(o,r,a){let n=this.has(r),s=ct(this,ot).length,i=ey(o),l=i>=0?i:s+i,u=l<0||l>=s?-1:l;if(u===this.size||n&&u===this.size-1||u===-1)return this.set(r,a),this;let c=this.size+(n?0:1);i<0&&l++;let f=[...ct(this,ot)],p,m=!1;for(let h=l;h<c;h++)if(l===h){let g=f[h];f[h]===r&&(g=f[h+1]),n&&this.delete(r),p=this.get(g),this.set(r,a)}else{!m&&f[h-1]===r&&(m=!0);let g=f[m?h:h-1],v=p;p=this.get(g),this.delete(g),this.set(g,v)}return this}with(o,r,a){let n=new no(this);return n.insert(o,r,a),n}before(o){let r=ct(this,ot).indexOf(o)-1;if(!(r<0))return this.entryAt(r)}setBefore(o,r,a){let n=ct(this,ot).indexOf(o);return n===-1?this:this.insert(n,r,a)}after(o){let r=ct(this,ot).indexOf(o);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(o,r,a){let n=ct(this,ot).indexOf(o);return n===-1?this:this.insert(n+1,r,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return cu(this,ot,[]),super.clear()}delete(o){let r=super.delete(o);return r&&ct(this,ot).splice(ct(this,ot).indexOf(o),1),r}deleteAt(o){let r=this.keyAt(o);return r!==void 0?this.delete(r):!1}at(o){let r=wf(ct(this,ot),o);if(r!==void 0)return this.get(r)}entryAt(o){let r=wf(ct(this,ot),o);if(r!==void 0)return[r,this.get(r)]}indexOf(o){return ct(this,ot).indexOf(o)}keyAt(o){return wf(ct(this,ot),o)}from(o,r){let a=this.indexOf(o);if(a===-1)return;let n=a+r;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(o,r){let a=this.indexOf(o);if(a===-1)return;let n=a+r;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(o,r){let a=0;for(let n of this){if(Reflect.apply(o,r,[n,a,this]))return n;a++}}findIndex(o,r){let a=0;for(let n of this){if(Reflect.apply(o,r,[n,a,this]))return a;a++}return-1}filter(o,r){let a=[],n=0;for(let s of this)Reflect.apply(o,r,[s,n,this])&&a.push(s),n++;return new no(a)}map(o,r){let a=[],n=0;for(let s of this)a.push([s[0],Reflect.apply(o,r,[s,n,this])]),n++;return new no(a)}reduce(...o){let[r,a]=o,n=0,s=a??this.at(0);for(let i of this)n===0&&o.length===1?s=i:s=Reflect.apply(r,this,[s,i,n,this]),n++;return s}reduceRight(...o){let[r,a]=o,n=a??this.at(-1);for(let s=this.size-1;s>=0;s--){let i=this.at(s);s===this.size-1&&o.length===1?n=i:n=Reflect.apply(r,this,[n,i,s,this])}return n}toSorted(o){let r=[...this.entries()].sort(o);return new no(r)}toReversed(){let o=new no;for(let r=this.size-1;r>=0;r--){let a=this.keyAt(r),n=this.get(a);o.set(a,n)}return o}toSpliced(...o){let r=[...this.entries()];return r.splice(...o),new no(r)}slice(o,r){let a=new no,n=this.size-1;if(o===void 0)return a;o<0&&(o=o+this.size),r!==void 0&&r>0&&(n=r-1);for(let s=o;s<=n;s++){let i=this.keyAt(s),l=this.get(i);a.set(i,l)}return a}every(o,r){let a=0;for(let n of this){if(!Reflect.apply(o,r,[n,a,this]))return!1;a++}return!0}some(o,r){let a=0;for(let n of this){if(Reflect.apply(o,r,[n,a,this]))return!0;a++}return!1}},ot=new WeakMap,ut(no,"OrderedDict"),no);function wf(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=iE(e,t);return o===-1?void 0:e[o]}ut(wf,"at");function iE(e,t){let o=e.length,r=ey(t),a=r>=0?r:o+r;return a<0||a>=o?-1:a}ut(iE,"toSafeIndex");function ey(e){return e!==e||e===0?0:Math.trunc(e)}ut(ey,"toSafeInteger");function w3(e){let t=e+"CollectionProvider",[o,r]=vr(t),[a,n]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Zx,setItemMap:ut(()=>{},"setItemMap")}),s=ut(({state:b,...R})=>b?d(l,{...R,state:b}):d(i,{...R}),"CollectionProvider");s.displayName=t;let i=ut(b=>{let R=v();return d(l,{...b,state:R})},"CollectionInit");i.displayName=t+"Init";let l=ut(b=>{let{scope:R,children:w,state:I}=b,S=E(null),[T,M]=k(null),A=ro(S,M),[O,V]=I;return D(()=>{if(!T)return;let q=cE(()=>{});return q.observe(T,{childList:!0,subtree:!0}),()=>{q.disconnect()}},[T]),d(a,{scope:R,itemMap:O,setItemMap:V,collectionRef:A,collectionRefObject:S,collectionElement:T,children:w})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=xr(u),f=C((b,R)=>{let{scope:w,children:I}=b,S=n(u,w),T=ro(R,S.collectionRef);return d(c,{ref:T,children:I})});f.displayName=u;let p=e+"CollectionItemSlot",m="data-radix-collection-item",h=xr(p),g=C((b,R)=>{let{scope:w,children:I,...S}=b,T=E(null),[M,A]=k(null),O=ro(R,T,A),V=n(p,w),{setItemMap:q}=V,F=E(S);lE(F.current,S)||(F.current=S);let $=F.current;return D(()=>{let U=$;return q(G=>M?G.has(M)?G.set(M,{...U,element:M}).toSorted(Qx):(G.set(M,{...U,element:M}),G.toSorted(Qx)):G),()=>{q(G=>!M||!G.has(M)?G:(G.delete(M),new Zx(G)))}},[M,$,q]),d(h,{[m]:"",ref:O,children:I})});g.displayName=p;function v(){return k(new Zx)}ut(v,"useInitCollection");function x(b){let{itemMap:R}=n(e+"CollectionConsumer",b);return R}return ut(x,"useCollection"),[{Provider:s,Slot:f,ItemSlot:g},{createCollectionScope:r,useCollection:x,useInitCollection:v}]}ut(w3,"createCollection");function lE(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let a of o)if(!Object.prototype.hasOwnProperty.call(t,a)||e[a]!==t[a])return!1;return!0}ut(lE,"shallowEqual");function uE(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ut(uE,"isElementPreceding");function Qx(e,t){return!e[1].element||!t[1].element?0:uE(e[1].element,t[1].element)?-1:1}ut(Qx,"sortByDocumentPosition");function cE(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}ut(cE,"getChildListObserver");N();N();var ta=globalThis?.document?dt:()=>{};var S3=Object.defineProperty,R3=(e,t)=>S3(e,"name",{value:t,configurable:!0}),I3=B[" useId ".trim().toString()]||(()=>{}),P3=0;function ty(e){let[t,o]=k(I3());return ta(()=>{e||o(r=>r??String(P3++))},[e]),e||(t?`radix-${t}`:"")}R3(ty,"useId");N();var L3=Object.defineProperty,T3=(e,t)=>L3(e,"name",{value:t,configurable:!0});function oy(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}T3(oy,"useCallbackRef");N();N();N();var M3=Object.defineProperty,k3=(e,t)=>M3(e,"name",{value:t,configurable:!0}),dE=B[" useEffectEvent ".trim().toString()],fE=B[" useInsertionEffect ".trim().toString()];function ry(e){if(typeof dE=="function")return dE(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof fE=="function"?fE(()=>{t.current=e}):ta(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}k3(ry,"useEffectEvent");var E3=Object.defineProperty,su=(e,t)=>E3(e,"name",{value:t,configurable:!0}),A3=B[" useInsertionEffect ".trim().toString()]||ta;function Ps({prop:e,defaultProp:t,onChange:o=su(()=>{},"onChange"),caller:r}){let[a,n,s]=mE({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(Ss){let c=E(e!==void 0);D(()=>{let f=c.current;f!==i&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${i?"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.`),c.current=i},[i,r])}let u=H(c=>{if(i){let f=gE(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}su(Ps,"useControllableState");function mE({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return A3(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}su(mE,"useUncontrolledState");function gE(e){return typeof e=="function"}su(gE,"isFunction");var pE=Symbol("RADIX:SYNC_STATE");function D3(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=ry(s);if(Ss){let v=E(a!==void 0);D(()=>{let x=v.current;x!==l&&console.warn(`${i} is changing from ${x?"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.`),v.current=l},[l,i])}let c=[{...o,state:n}];r&&c.push(r);let[f,p]=qt((v,x)=>{if(x.type===pE)return{...v,state:x.state};let y=e(v,x);return l&&!Object.is(y.state,v.state)&&u(y.state),y},...c),m=f.state,h=E(m);D(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=Z(()=>a!==void 0?{...f,state:a}:f,[f,a]);return D(()=>{l&&!Object.is(a,f.state)&&p({type:pE,state:a})},[a,f.state,l]),[g,p]}su(D3,"useControllableStateReducer");N();var N3=Object.defineProperty,O3=(e,t)=>N3(e,"name",{value:t,configurable:!0}),F3=ue(void 0);function iu(e){let t=re(F3);return e||t||"ltr"}O3(iu,"useDirection");N();N();var _3=Object.defineProperty,ny=(e,t)=>_3(e,"name",{value:t,configurable:!0}),ay=!1;function hE(){let[e,t]=k(ay);return D(()=>{ay||(ay=!0,t(!0))},[]),e}ny(hE,"useIsHydrated");var vE=B[" useSyncExternalStore ".trim().toString()];function xE(){return()=>{}}ny(xE,"subscribe");function yE(){return vE(xE,()=>!0,()=>!1)}ny(yE,"useIsHydratedModern");var bE=typeof vE=="function"?yE:hE;var V3=Object.defineProperty,on=(e,t)=>V3(e,"name",{value:t,configurable:!0}),sy="rovingFocusGroup.onEntryFocus",B3={bubbles:!1,cancelable:!0},Sf="RovingFocusGroup",[iy,CE,H3]=Jx(Sf),[U3,ly]=vr(Sf,[H3]),[G3,z3]=U3(Sf),wE=C(on(function(t,o){return d(iy.Provider,{scope:t.__scopeRovingFocusGroup,children:d(iy.Slot,{scope:t.__scopeRovingFocusGroup,children:d(W3,{...t,ref:o})})})},"RovingFocusGroup")),W3=C(on(function(t,o){let{__scopeRovingFocusGroup:r,orientation:a,loop:n=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...p}=t,m=E(null),h=ro(o,m),g=iu(s),[v,x]=Ps({prop:i,defaultProp:l??null,onChange:u,caller:Sf}),[y,b]=k(!1),R=oy(c),w=CE(r),I=E(!1),[S,T]=k(0);return D(()=>{let M=m.current;if(M)return M.addEventListener(sy,R),()=>M.removeEventListener(sy,R)},[R]),d(G3,{scope:r,orientation:a,dir:g,loop:n,currentTabStopId:v,onItemFocus:H(M=>x(M),[x]),onItemShiftTab:H(()=>b(!0),[]),onFocusableItemAdd:H(()=>T(M=>M+1),[]),onFocusableItemRemove:H(()=>T(M=>M-1),[]),children:d(Rs.div,{tabIndex:y||S===0?-1:0,"data-orientation":a,...p,ref:h,style:{outline:"none",...t.style},onMouseDown:ea(t.onMouseDown,()=>{I.current=!0}),onFocus:ea(t.onFocus,M=>{let A=!I.current;if(M.target===M.currentTarget&&A&&!y){let O=new CustomEvent(sy,B3);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){let V=w().filter(G=>G.focusable),q=V.find(G=>G.active),F=V.find(G=>G.id===v),U=[q,F,...V].filter(Boolean).map(G=>G.ref.current);uy(U,f)}}I.current=!1}),onBlur:ea(t.onBlur,()=>b(!1))})})},"RovingFocusGroupImpl")),q3="RovingFocusGroupItem",SE=C(on(function(t,o){let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...l}=t,u=ty(),c=s||u,f=z3(q3,r),p=f.currentTabStopId===c,m=CE(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f,x=bE();return ta(()=>{if(!(!x||!a))return h(),()=>g()},[x,a,h,g]),D(()=>{if(!(x||!a))return h(),()=>g()},[x,a,h,g]),d(iy.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:d(Rs.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:o,onMouseDown:ea(t.onMouseDown,y=>{a?f.onItemFocus(c):y.preventDefault()}),onFocus:ea(t.onFocus,()=>f.onItemFocus(c)),onKeyDown:ea(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;let b=IE(y,f.orientation,f.dir);if(b!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=m().filter(I=>I.focusable).map(I=>I.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();let I=w.indexOf(y.currentTarget);w=f.loop?PE(w,I+1):w.slice(I+1)}setTimeout(()=>uy(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})},"RovingFocusGroupItem")),$3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function RE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}on(RE,"getDirectionAwareKey");function IE(e,t,o){let r=RE(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $3[r]}on(IE,"getFocusIntent");function uy(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}on(uy,"focusFirst");function PE(e,t){return e.map((o,r)=>e[(t+r)%e.length])}on(PE,"wrapArray");var K3=Object.defineProperty,oa=(e,t)=>K3(e,"name",{value:t,configurable:!0}),Ls="ToggleGroup",[TE,TCe]=vr(Ls,[ly]),ME=ly(),kE=C(oa(function(t,o){let{type:r,...a}=t;if(r==="single")return d(X3,{role:"radiogroup",...a,ref:o});if(r==="multiple")return d(Y3,{role:"toolbar",...a,ref:o});throw new Error(`Missing prop \`type\` expected on \`${Ls}\``)},"ToggleGroup")),[EE,AE]=TE(Ls),X3=C(oa(function(t,o){let{value:r,defaultValue:a,onValueChange:n=oa(()=>{},"onValueChange"),...s}=t,[i,l]=Ps({prop:r,defaultProp:a??"",onChange:n,caller:Ls});return d(EE,{scope:t.__scopeToggleGroup,type:"single",value:Z(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:H(()=>l(""),[l]),children:d(DE,{...s,ref:o})})},"ToggleGroupImplSingle")),Y3=C(oa(function(t,o){let{value:r,defaultValue:a,onValueChange:n=oa(()=>{},"onValueChange"),...s}=t,[i,l]=Ps({prop:r,defaultProp:a??[],onChange:n,caller:Ls}),u=H(f=>l((p=[])=>[...p,f]),[l]),c=H(f=>l((p=[])=>p.filter(m=>m!==f)),[l]);return d(EE,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:c,children:d(DE,{...s,ref:o})})},"ToggleGroupImplMultiple")),[Z3,Q3]=TE(Ls),DE=C(oa(function(t,o){let{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:n=!0,orientation:s,dir:i,loop:l=!0,...u}=t,c=ME(r),f=iu(i),p={dir:f,...u};return d(Z3,{scope:r,rovingFocus:n,disabled:a,children:n?d(wE,{asChild:!0,...c,orientation:s,dir:f,loop:l,children:d(Rs.div,{...p,ref:o})}):d(Rs.div,{...p,ref:o})})},"ToggleGroupImpl")),cy="ToggleGroupItem",NE=C(oa(function(t,o){let r=AE(cy,t.__scopeToggleGroup),a=Q3(cy,t.__scopeToggleGroup),n=ME(t.__scopeToggleGroup),s=r.value.includes(t.value),i=a.disabled||t.disabled,l={...t,pressed:s,disabled:i},u=E(null);return a.rovingFocus?d(SE,{asChild:!0,...n,focusable:!i,active:s,ref:u,children:d(LE,{...l,ref:o})}):d(LE,{...l,ref:o})},"ToggleGroupItem")),LE=C(oa(function(t,o){let{__scopeToggleGroup:r,value:a,...n}=t,s=AE(cy,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return d(Zl,{...l,...n,ref:o,onPressedChange:u=>{u?s.onItemActivate(a):s.onItemDeactivate(a)}})},"ToggleGroupItemImpl"));var OE=ue({size:"md",variant:"default"}),dy=C(({className:e,variant:t,size:o,children:r,...a},n)=>d(kE,{ref:n,className:L("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...a,children:d(OE.Provider,{value:{variant:t,size:o},children:r})}));dy.displayName="ToggleGroup";var fy=C(({className:e,children:t,variant:o,size:r,...a},n)=>{let s=re(OE);return d(NE,{ref:n,className:L(Ql({variant:s.variant??o,size:s.size??r}),e),...a,children:t})});fy.displayName="ToggleGroupItem";return wy(e5);})();
80
+ /*! Bundled license information:
81
+
82
+ use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
83
+ (**
84
+ * @license React
85
+ * use-sync-external-store-shim.production.js
86
+ *
87
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
88
+ *
89
+ * This source code is licensed under the MIT license found in the
90
+ * LICENSE file in the root directory of this source tree.
91
+ *)
92
+
93
+ lucide-react/dist/esm/shared/src/utils.js:
94
+ (**
95
+ * @license lucide-react v0.525.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ *)
100
+
101
+ lucide-react/dist/esm/defaultAttributes.js:
102
+ (**
103
+ * @license lucide-react v0.525.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ *)
108
+
109
+ lucide-react/dist/esm/Icon.js:
110
+ (**
111
+ * @license lucide-react v0.525.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ *)
116
+
117
+ lucide-react/dist/esm/createLucideIcon.js:
118
+ (**
119
+ * @license lucide-react v0.525.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ *)
124
+
125
+ lucide-react/dist/esm/icons/align-center.js:
126
+ (**
127
+ * @license lucide-react v0.525.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ *)
132
+
133
+ lucide-react/dist/esm/icons/align-justify.js:
134
+ (**
135
+ * @license lucide-react v0.525.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ *)
140
+
141
+ lucide-react/dist/esm/icons/align-left.js:
142
+ (**
143
+ * @license lucide-react v0.525.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ *)
148
+
149
+ lucide-react/dist/esm/icons/align-right.js:
150
+ (**
151
+ * @license lucide-react v0.525.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ *)
156
+
157
+ lucide-react/dist/esm/icons/arrow-down.js:
158
+ (**
159
+ * @license lucide-react v0.525.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ *)
164
+
165
+ lucide-react/dist/esm/icons/arrow-left.js:
166
+ (**
167
+ * @license lucide-react v0.525.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ *)
172
+
173
+ lucide-react/dist/esm/icons/arrow-right.js:
174
+ (**
175
+ * @license lucide-react v0.525.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ *)
180
+
181
+ lucide-react/dist/esm/icons/arrow-up-down.js:
182
+ (**
183
+ * @license lucide-react v0.525.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ *)
188
+
189
+ lucide-react/dist/esm/icons/arrow-up.js:
190
+ (**
191
+ * @license lucide-react v0.525.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ *)
196
+
197
+ lucide-react/dist/esm/icons/bold.js:
198
+ (**
199
+ * @license lucide-react v0.525.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ *)
204
+
205
+ lucide-react/dist/esm/icons/calendar.js:
206
+ (**
207
+ * @license lucide-react v0.525.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ *)
212
+
213
+ lucide-react/dist/esm/icons/check.js:
214
+ (**
215
+ * @license lucide-react v0.525.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ *)
220
+
221
+ lucide-react/dist/esm/icons/chevron-down.js:
222
+ (**
223
+ * @license lucide-react v0.525.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ *)
228
+
229
+ lucide-react/dist/esm/icons/chevron-left.js:
230
+ (**
231
+ * @license lucide-react v0.525.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ *)
236
+
237
+ lucide-react/dist/esm/icons/chevron-right.js:
238
+ (**
239
+ * @license lucide-react v0.525.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ *)
244
+
245
+ lucide-react/dist/esm/icons/chevron-up.js:
246
+ (**
247
+ * @license lucide-react v0.525.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ *)
252
+
253
+ lucide-react/dist/esm/icons/circle-alert.js:
254
+ (**
255
+ * @license lucide-react v0.525.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ *)
260
+
261
+ lucide-react/dist/esm/icons/circle-check-big.js:
262
+ (**
263
+ * @license lucide-react v0.525.0 - ISC
264
+ *
265
+ * This source code is licensed under the ISC license.
266
+ * See the LICENSE file in the root directory of this source tree.
267
+ *)
268
+
269
+ lucide-react/dist/esm/icons/circle.js:
270
+ (**
271
+ * @license lucide-react v0.525.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ *)
276
+
277
+ lucide-react/dist/esm/icons/clock.js:
278
+ (**
279
+ * @license lucide-react v0.525.0 - ISC
280
+ *
281
+ * This source code is licensed under the ISC license.
282
+ * See the LICENSE file in the root directory of this source tree.
283
+ *)
284
+
285
+ lucide-react/dist/esm/icons/code.js:
286
+ (**
287
+ * @license lucide-react v0.525.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ *)
292
+
293
+ lucide-react/dist/esm/icons/copy.js:
294
+ (**
295
+ * @license lucide-react v0.525.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ *)
300
+
301
+ lucide-react/dist/esm/icons/credit-card.js:
302
+ (**
303
+ * @license lucide-react v0.525.0 - ISC
304
+ *
305
+ * This source code is licensed under the ISC license.
306
+ * See the LICENSE file in the root directory of this source tree.
307
+ *)
308
+
309
+ lucide-react/dist/esm/icons/crown.js:
310
+ (**
311
+ * @license lucide-react v0.525.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ *)
316
+
317
+ lucide-react/dist/esm/icons/dot.js:
318
+ (**
319
+ * @license lucide-react v0.525.0 - ISC
320
+ *
321
+ * This source code is licensed under the ISC license.
322
+ * See the LICENSE file in the root directory of this source tree.
323
+ *)
324
+
325
+ lucide-react/dist/esm/icons/ellipsis.js:
326
+ (**
327
+ * @license lucide-react v0.525.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ *)
332
+
333
+ lucide-react/dist/esm/icons/external-link.js:
334
+ (**
335
+ * @license lucide-react v0.525.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ *)
340
+
341
+ lucide-react/dist/esm/icons/eye.js:
342
+ (**
343
+ * @license lucide-react v0.525.0 - ISC
344
+ *
345
+ * This source code is licensed under the ISC license.
346
+ * See the LICENSE file in the root directory of this source tree.
347
+ *)
348
+
349
+ lucide-react/dist/esm/icons/file-text.js:
350
+ (**
351
+ * @license lucide-react v0.525.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ *)
356
+
357
+ lucide-react/dist/esm/icons/file.js:
358
+ (**
359
+ * @license lucide-react v0.525.0 - ISC
360
+ *
361
+ * This source code is licensed under the ISC license.
362
+ * See the LICENSE file in the root directory of this source tree.
363
+ *)
364
+
365
+ lucide-react/dist/esm/icons/git-fork.js:
366
+ (**
367
+ * @license lucide-react v0.525.0 - ISC
368
+ *
369
+ * This source code is licensed under the ISC license.
370
+ * See the LICENSE file in the root directory of this source tree.
371
+ *)
372
+
373
+ lucide-react/dist/esm/icons/image.js:
374
+ (**
375
+ * @license lucide-react v0.525.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ *)
380
+
381
+ lucide-react/dist/esm/icons/info.js:
382
+ (**
383
+ * @license lucide-react v0.525.0 - ISC
384
+ *
385
+ * This source code is licensed under the ISC license.
386
+ * See the LICENSE file in the root directory of this source tree.
387
+ *)
388
+
389
+ lucide-react/dist/esm/icons/italic.js:
390
+ (**
391
+ * @license lucide-react v0.525.0 - ISC
392
+ *
393
+ * This source code is licensed under the ISC license.
394
+ * See the LICENSE file in the root directory of this source tree.
395
+ *)
396
+
397
+ lucide-react/dist/esm/icons/link.js:
398
+ (**
399
+ * @license lucide-react v0.525.0 - ISC
400
+ *
401
+ * This source code is licensed under the ISC license.
402
+ * See the LICENSE file in the root directory of this source tree.
403
+ *)
404
+
405
+ lucide-react/dist/esm/icons/list-ordered.js:
406
+ (**
407
+ * @license lucide-react v0.525.0 - ISC
408
+ *
409
+ * This source code is licensed under the ISC license.
410
+ * See the LICENSE file in the root directory of this source tree.
411
+ *)
412
+
413
+ lucide-react/dist/esm/icons/list.js:
414
+ (**
415
+ * @license lucide-react v0.525.0 - ISC
416
+ *
417
+ * This source code is licensed under the ISC license.
418
+ * See the LICENSE file in the root directory of this source tree.
419
+ *)
420
+
421
+ lucide-react/dist/esm/icons/loader-circle.js:
422
+ (**
423
+ * @license lucide-react v0.525.0 - ISC
424
+ *
425
+ * This source code is licensed under the ISC license.
426
+ * See the LICENSE file in the root directory of this source tree.
427
+ *)
428
+
429
+ lucide-react/dist/esm/icons/lock.js:
430
+ (**
431
+ * @license lucide-react v0.525.0 - ISC
432
+ *
433
+ * This source code is licensed under the ISC license.
434
+ * See the LICENSE file in the root directory of this source tree.
435
+ *)
436
+
437
+ lucide-react/dist/esm/icons/minus.js:
438
+ (**
439
+ * @license lucide-react v0.525.0 - ISC
440
+ *
441
+ * This source code is licensed under the ISC license.
442
+ * See the LICENSE file in the root directory of this source tree.
443
+ *)
444
+
445
+ lucide-react/dist/esm/icons/music.js:
446
+ (**
447
+ * @license lucide-react v0.525.0 - ISC
448
+ *
449
+ * This source code is licensed under the ISC license.
450
+ * See the LICENSE file in the root directory of this source tree.
451
+ *)
452
+
453
+ lucide-react/dist/esm/icons/palette.js:
454
+ (**
455
+ * @license lucide-react v0.525.0 - ISC
456
+ *
457
+ * This source code is licensed under the ISC license.
458
+ * See the LICENSE file in the root directory of this source tree.
459
+ *)
460
+
461
+ lucide-react/dist/esm/icons/phone.js:
462
+ (**
463
+ * @license lucide-react v0.525.0 - ISC
464
+ *
465
+ * This source code is licensed under the ISC license.
466
+ * See the LICENSE file in the root directory of this source tree.
467
+ *)
468
+
469
+ lucide-react/dist/esm/icons/pipette.js:
470
+ (**
471
+ * @license lucide-react v0.525.0 - ISC
472
+ *
473
+ * This source code is licensed under the ISC license.
474
+ * See the LICENSE file in the root directory of this source tree.
475
+ *)
476
+
477
+ lucide-react/dist/esm/icons/quote.js:
478
+ (**
479
+ * @license lucide-react v0.525.0 - ISC
480
+ *
481
+ * This source code is licensed under the ISC license.
482
+ * See the LICENSE file in the root directory of this source tree.
483
+ *)
484
+
485
+ lucide-react/dist/esm/icons/redo.js:
486
+ (**
487
+ * @license lucide-react v0.525.0 - ISC
488
+ *
489
+ * This source code is licensed under the ISC license.
490
+ * See the LICENSE file in the root directory of this source tree.
491
+ *)
492
+
493
+ lucide-react/dist/esm/icons/search.js:
494
+ (**
495
+ * @license lucide-react v0.525.0 - ISC
496
+ *
497
+ * This source code is licensed under the ISC license.
498
+ * See the LICENSE file in the root directory of this source tree.
499
+ *)
500
+
501
+ lucide-react/dist/esm/icons/square-pen.js:
502
+ (**
503
+ * @license lucide-react v0.525.0 - ISC
504
+ *
505
+ * This source code is licensed under the ISC license.
506
+ * See the LICENSE file in the root directory of this source tree.
507
+ *)
508
+
509
+ lucide-react/dist/esm/icons/star.js:
510
+ (**
511
+ * @license lucide-react v0.525.0 - ISC
512
+ *
513
+ * This source code is licensed under the ISC license.
514
+ * See the LICENSE file in the root directory of this source tree.
515
+ *)
516
+
517
+ lucide-react/dist/esm/icons/strikethrough.js:
518
+ (**
519
+ * @license lucide-react v0.525.0 - ISC
520
+ *
521
+ * This source code is licensed under the ISC license.
522
+ * See the LICENSE file in the root directory of this source tree.
523
+ *)
524
+
525
+ lucide-react/dist/esm/icons/triangle-alert.js:
526
+ (**
527
+ * @license lucide-react v0.525.0 - ISC
528
+ *
529
+ * This source code is licensed under the ISC license.
530
+ * See the LICENSE file in the root directory of this source tree.
531
+ *)
532
+
533
+ lucide-react/dist/esm/icons/underline.js:
534
+ (**
535
+ * @license lucide-react v0.525.0 - ISC
536
+ *
537
+ * This source code is licensed under the ISC license.
538
+ * See the LICENSE file in the root directory of this source tree.
539
+ *)
540
+
541
+ lucide-react/dist/esm/icons/undo.js:
542
+ (**
543
+ * @license lucide-react v0.525.0 - ISC
544
+ *
545
+ * This source code is licensed under the ISC license.
546
+ * See the LICENSE file in the root directory of this source tree.
547
+ *)
548
+
549
+ lucide-react/dist/esm/icons/upload.js:
550
+ (**
551
+ * @license lucide-react v0.525.0 - ISC
552
+ *
553
+ * This source code is licensed under the ISC license.
554
+ * See the LICENSE file in the root directory of this source tree.
555
+ *)
556
+
557
+ lucide-react/dist/esm/icons/video.js:
558
+ (**
559
+ * @license lucide-react v0.525.0 - ISC
560
+ *
561
+ * This source code is licensed under the ISC license.
562
+ * See the LICENSE file in the root directory of this source tree.
563
+ *)
564
+
565
+ lucide-react/dist/esm/icons/x.js:
566
+ (**
567
+ * @license lucide-react v0.525.0 - ISC
568
+ *
569
+ * This source code is licensed under the ISC license.
570
+ * See the LICENSE file in the root directory of this source tree.
571
+ *)
572
+
573
+ lucide-react/dist/esm/icons/zap.js:
574
+ (**
575
+ * @license lucide-react v0.525.0 - ISC
576
+ *
577
+ * This source code is licensed under the ISC license.
578
+ * See the LICENSE file in the root directory of this source tree.
579
+ *)
580
+
581
+ lucide-react/dist/esm/lucide-react.js:
582
+ (**
583
+ * @license lucide-react v0.525.0 - ISC
584
+ *
585
+ * This source code is licensed under the ISC license.
586
+ * See the LICENSE file in the root directory of this source tree.
587
+ *)
588
+
589
+ @tanstack/table-core/build/lib/index.mjs:
590
+ (**
591
+ * table-core
592
+ *
593
+ * Copyright (c) TanStack
594
+ *
595
+ * This source code is licensed under the MIT license found in the
596
+ * LICENSE.md file in the root directory of this source tree.
597
+ *
598
+ * @license MIT
599
+ *)
600
+
601
+ @tanstack/react-table/build/lib/index.mjs:
602
+ (**
603
+ * react-table
604
+ *
605
+ * Copyright (c) TanStack
606
+ *
607
+ * This source code is licensed under the MIT license found in the
608
+ * LICENSE.md file in the root directory of this source tree.
609
+ *
610
+ * @license MIT
611
+ *)
612
+ */