@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 (ESM — sayfada importmap gerektirir). React bundle'a DAHIL DEGILDIR — sayfadan gelir.
3
+ * Stil icin moonui.css de yuklenmelidir.
4
+ */
5
+ var Qk=Object.create;var $l=Object.defineProperty;var Jk=Object.getOwnPropertyDescriptor;var eE=Object.getOwnPropertyNames;var tE=Object.getPrototypeOf,oE=Object.prototype.hasOwnProperty;var rE=(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 aE=(e,t)=>()=>(e&&(t=e(e=0)),t);var fv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nE=(e,t)=>{for(var o in t)$l(e,o,{get:t[o],enumerable:!0})},pv=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of eE(t))!oE.call(e,a)&&a!==o&&$l(e,a,{get:()=>t[a],enumerable:!(r=Jk(t,a))||r.enumerable});return e};var sE=(e,t,o)=>(o=e!=null?Qk(tE(e)):{},pv(t||!e||!e.__esModule?$l(o,"default",{value:e,enumerable:!0}):o,e)),iE=e=>pv($l({},"__esModule",{value:!0}),e);var B={};nE(B,{Children:()=>Ie,Component:()=>Rs,Fragment:()=>Je,Profiler:()=>lE,PureComponent:()=>uE,StrictMode:()=>cE,Suspense:()=>dE,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>fE,act:()=>pE,cloneElement:()=>Fe,createContext:()=>ce,createElement:()=>me,createFactory:()=>mE,createRef:()=>gE,default:()=>Pe,forwardRef:()=>C,isValidElement:()=>Ee,lazy:()=>hE,memo:()=>Zd,startTransition:()=>vE,unstable_act:()=>xE,useCallback:()=>H,useContext:()=>ae,useDebugValue:()=>yE,useDeferredValue:()=>bE,useEffect:()=>D,useId:()=>qe,useImperativeHandle:()=>ta,useInsertionEffect:()=>Is,useLayoutEffect:()=>ct,useMemo:()=>Z,useReducer:()=>Gt,useRef:()=>E,useState:()=>k,useSyncExternalStore:()=>Qd,useTransition:()=>CE,version:()=>wE});import*as oe from"react";var Ie,Rs,Je,lE,uE,cE,dE,fE,pE,Fe,ce,me,mE,gE,C,Ee,hE,Zd,vE,xE,H,ae,yE,bE,D,qe,ta,Is,ct,Z,Gt,E,k,Qd,CE,wE,Pe,N=aE(()=>{Ie=oe.Children,Rs=oe.Component,Je=oe.Fragment,lE=oe.Profiler,uE=oe.PureComponent,cE=oe.StrictMode,dE=oe.Suspense,fE=oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pE=oe.act,Fe=oe.cloneElement,ce=oe.createContext,me=oe.createElement,mE=oe.createFactory,gE=oe.createRef,C=oe.forwardRef,Ee=oe.isValidElement,hE=oe.lazy,Zd=oe.memo,vE=oe.startTransition,xE=oe.unstable_act,H=oe.useCallback,ae=oe.useContext,yE=oe.useDebugValue,bE=oe.useDeferredValue,D=oe.useEffect,qe=oe.useId,ta=oe.useImperativeHandle,Is=oe.useInsertionEffect,ct=oe.useLayoutEffect,Z=oe.useMemo,Gt=oe.useReducer,E=oe.useRef,k=oe.useState,Qd=oe.useSyncExternalStore,CE=oe.useTransition,wE=oe.version,Pe=oe.default!==void 0?oe.default:oe});var ix=fv(sx=>{"use strict";var un=(N(),iE(B));function OD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FD=typeof Object.is=="function"?Object.is:OD,_D=un.useState,VD=un.useEffect,BD=un.useLayoutEffect,HD=un.useDebugValue;function UD(e,t){var o=t(),r=_D({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return BD(function(){a.value=o,a.getSnapshot=t,mf(a)&&n({inst:a})},[e,o,t]),VD(function(){return mf(a)&&n({inst:a}),e(function(){mf(a)&&n({inst:a})})},[e]),HD(o),o}function mf(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!FD(e,o)}catch{return!0}}function GD(e,t){return t()}var zD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?GD:UD;sx.useSyncExternalStore=un.useSyncExternalStore!==void 0?un.useSyncExternalStore:zD});var ux=fv((D$,lx)=>{"use strict";lx.exports=ix()});N();N();N();import*as oa from"react/jsx-runtime";var Ve=oa.Fragment,d=oa.jsx,P=oa.jsxs;function mv(e,t){let o=ce(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=ae(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=ce(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=ae(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=>ce(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,SE(a,...t)]}function SE(...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 gv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nt(...e){return t=>{let o=!1,r=e.map(a=>{let n=gv(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():gv(e[a],null)}}}}function pe(...e){return H(Nt(...e),e)}N();function It(e){let t=RE(e),o=C((r,a)=>{let{children:n,...s}=r,i=Ie.toArray(n),l=i.find(IE);if(l){let u=l.props.children,c=i.map(f=>f===l?Ie.count(u)>1?Ie.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 jl=It("Slot");function RE(e){let t=C((o,r)=>{let{children:a,...n}=o;if(Ee(a)){let s=LE(a),i=PE(n,a.props);return a.type!==Je&&(i.ref=r?Nt(r,s):s),Fe(a,i)}return Ie.count(a)>1?Ie.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hv=Symbol("radix.slottable");function vv(e){let t=({children:o})=>d(Ve,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=hv,t}function IE(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hv}function PE(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 LE(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 Lo(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=Pe.useRef(null),b=Pe.useRef(new Map).current;return d(a,{scope:v,itemMap:b,collectionRef:y,children:x})};s.displayName=t;let i=e+"CollectionSlot",l=It(i),u=Pe.forwardRef((g,v)=>{let{scope:x,children:y}=g,b=n(i,x),R=pe(v,b.collectionRef);return d(l,{ref:R,children:y})});u.displayName=i;let c=e+"CollectionItemSlot",f="data-radix-collection-item",p=It(c),m=Pe.forwardRef((g,v)=>{let{scope:x,children:y,...b}=g,R=Pe.useRef(null),w=pe(v,R),I=n(c,x);return Pe.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 Pe.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 l5=!!(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?ct:()=>{};N();var TE=B[" useInsertionEffect ".trim().toString()]||Ae;function Be({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=ME({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=kE(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}function ME({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return TE(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function kE(e){return typeof e=="function"}var f5=Symbol("RADIX:SYNC_STATE");N();import*as st from"react-dom";var Ps=st.createPortal;var Uo=st.flushSync;var xv=st.default!==void 0?st.default:st;var EE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=EE.reduce((e,t)=>{let o=It(`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 Ya(e,t){e&&Uo(()=>e.dispatchEvent(t))}N();N();N();function AE(e,t){return Gt((o,r)=>t[o][r]??o,e)}var $e=e=>{let{present:t,children:o}=e,r=DE(t),a=typeof o=="function"?o({present:r.isPresent}):Ie.only(o),n=pe(r.ref,NE(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};$e.displayName="Presence";function DE(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=e?"mounted":"unmounted",[i,l]=AE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{let u=Kl(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=Kl(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=Kl(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=Kl(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 Kl(e){return e?.animationName||"none"}function NE(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 OE=B[" useId ".trim().toString()]||(()=>{}),FE=0;function Le(e){let[t,o]=k(OE());return Ae(()=>{e||o(r=>r??String(FE++))},[e]),e||(t?`radix-${t}`:"")}var Xl="Collapsible",[_E,Jd]=ke(Xl),[VE,ef]=_E(Xl),yv=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:Xl});return d(VE,{scope:o,disabled:n,contentId:Le(),open:l,onOpenToggle:H(()=>u(c=>!c),[u]),children:d(Y.div,{"data-state":of(l),"data-disabled":n?"":void 0,...i,ref:t})})});yv.displayName=Xl;var bv="CollapsibleTrigger",Cv=C((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=ef(bv,o);return d(Y.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":of(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:X(e.onClick,a.onOpenToggle)})});Cv.displayName=bv;var tf="CollapsibleContent",wv=C((e,t)=>{let{forceMount:o,...r}=e,a=ef(tf,e.__scopeCollapsible);return d($e,{present:o||a.open,children:({present:n})=>d(BE,{...r,ref:t,present:n})})});wv.displayName=tf;var BE=C((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=ef(tf,o),[i,l]=k(r),u=E(null),c=pe(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":of(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 of(e){return e?"open":"closed"}var Yl=yv,Za=Cv,Ls=wv;N();var HE=ce(void 0);function To(e){let t=ae(HE);return e||t||"ltr"}var ao="Accordion",UE=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[af,GE,zE]=Lo(ao),[Ql,W5]=ke(ao,[zE,Jd]),nf=Jd(),Rv=Pe.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return d(af.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?d(jE,{...n,ref:t}):d($E,{...a,ref:t})})});Rv.displayName=ao;var[Iv,WE]=Ql(ao),[Pv,qE]=Ql(ao,{collapsible:!1}),$E=Pe.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:ao});return d(Iv,{scope:e.__scopeAccordion,value:Pe.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:Pe.useCallback(()=>n&&l(""),[n,l]),children:d(Pv,{scope:e.__scopeAccordion,collapsible:n,children:d(Lv,{...s,ref:t})})})}),jE=Pe.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},...n}=e,[s,i]=Be({prop:o,defaultProp:r??[],onChange:a,caller:ao}),l=Pe.useCallback(c=>i((f=[])=>[...f,c]),[i]),u=Pe.useCallback(c=>i((f=[])=>f.filter(p=>p!==c)),[i]);return d(Iv,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:d(Pv,{scope:e.__scopeAccordion,collapsible:!0,children:d(Lv,{...n,ref:t})})})}),[KE,Jl]=Ql(ao),Lv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:a,orientation:n="vertical",...s}=e,i=Pe.useRef(null),l=pe(i,t),u=GE(o),f=To(a)==="ltr",p=X(e.onKeyDown,m=>{if(!UE.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(KE,{scope:o,disabled:r,direction:a,orientation:n,children:d(af.Slot,{scope:o,children:d(Y.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:p})})})}),Zl="AccordionItem",[XE,sf]=Ql(Zl),Tv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=Jl(Zl,o),s=WE(Zl,o),i=nf(o),l=Le(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return d(XE,{scope:o,open:u,disabled:c,triggerId:l,children:d(Yl,{"data-orientation":n.orientation,"data-state":Nv(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:f=>{f?s.onItemOpen(r):s.onItemClose(r)}})})});Tv.displayName=Zl;var Mv="AccordionHeader",kv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=Jl(ao,o),n=sf(Mv,o);return d(Y.h3,{"data-orientation":a.orientation,"data-state":Nv(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});kv.displayName=Mv;var rf="AccordionTrigger",Ev=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=Jl(ao,o),n=sf(rf,o),s=qE(rf,o),i=nf(o);return d(af.ItemSlot,{scope:o,children:d(Za,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});Ev.displayName=rf;var Av="AccordionContent",Dv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=Jl(ao,o),n=sf(Av,o),s=nf(o);return d(Ls,{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}})});Dv.displayName=Av;function Nv(e){return e?"open":"closed"}var Ov=Rv,Fv=Tv,_v=kv,lf=Ev,uf=Dv;N();var Vv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ZE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),cf=e=>{let t=ZE(e);return t.charAt(0).toUpperCase()+t.slice(1)},eu=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),Bv=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};N();var Hv={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 Uv=C(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>me("svg",{ref:l,...Hv,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:eu("lucide",a),...!n&&!Bv(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,c])=>me(u,c)),...Array.isArray(n)?n:[n]]));var j=(e,t)=>{let o=C(({className:r,...a},n)=>me(Uv,{ref:n,iconNode:t,className:eu(`lucide-${Vv(cf(e))}`,`lucide-${e}`,r),...a}));return o.displayName=cf(e),o};var QE=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Ts=j("align-center",QE);var JE=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Ms=j("align-justify",JE);var eA=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],ks=j("align-left",eA);var tA=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Es=j("align-right",tA);var oA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Qa=j("arrow-down",oA);var rA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],As=j("arrow-left",rA);var aA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ds=j("arrow-right",aA);var nA=[["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"}]],Ja=j("arrow-up-down",nA);var sA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],en=j("arrow-up",sA);var iA=[["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"}]],Ns=j("bold",iA);var lA=[["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"}]],aa=j("calendar",lA);var uA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pt=j("check",uA);var cA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mo=j("chevron-down",cA);var dA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],no=j("chevron-left",dA);var fA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wt=j("chevron-right",fA);var pA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Os=j("chevron-up",pA);var mA=[["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"}]],so=j("circle-alert",mA);var gA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],hr=j("circle-check-big",gA);var hA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],na=j("circle",hA);var vA=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fs=j("clock",vA);var xA=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],_s=j("code",xA);var yA=[["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"}]],Vs=j("copy",yA);var bA=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Bs=j("credit-card",bA);var CA=[["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"}]],tn=j("crown",CA);var wA=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Hs=j("dot",wA);var SA=[["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"}]],ko=j("ellipsis",SA);var RA=[["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"}]],Us=j("external-link",RA);var IA=[["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"}]],sa=j("eye",IA);var PA=[["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"}]],Gs=j("file-text",PA);var LA=[["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"}]],zs=j("file",LA);var TA=[["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"}]],Ws=j("git-fork",TA);var MA=[["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"}]],ia=j("image",MA);var kA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],on=j("info",kA);var EA=[["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",EA);var AA=[["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"}]],$s=j("link",AA);var DA=[["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"}]],js=j("list-ordered",DA);var NA=[["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"}]],Ks=j("list",NA);var OA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ot=j("loader-circle",OA);var FA=[["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"}]],rn=j("lock",FA);var _A=[["path",{d:"M5 12h14",key:"1ays0h"}]],Xs=j("minus",_A);var VA=[["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"}]],Ys=j("music",VA);var BA=[["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"}]],an=j("palette",BA);var HA=[["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"}]],Zs=j("phone",HA);var UA=[["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"}]],tu=j("pipette",UA);var GA=[["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"}]],Qs=j("quote",GA);var zA=[["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"}]],Js=j("redo",zA);var WA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],la=j("search",WA);var qA=[["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"}]],Pt=j("square-pen",qA);var $A=[["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"}]],vr=j("star",$A);var jA=[["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"}]],ei=j("strikethrough",jA);var KA=[["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"}]],xr=j("triangle-alert",KA);var XA=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],ti=j("underline",XA);var YA=[["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"}]],oi=j("undo",YA);var ZA=[["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"}]],ri=j("upload",ZA);var QA=[["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"}]],ai=j("video",QA);var JA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ot=j("x",JA);var eD=[["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"}]],nn=j("zap",eD);N();function Gv(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=Gv(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ou(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Gv(e))&&(r&&(r+=" "),r+=t);return r}var pf="-",tD=e=>{let t=rD(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split(pf);return i[0]===""&&i.length!==1&&i.shift(),qv(i,t)||oD(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},qv=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?qv(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(pf);return t.validators.find(({validator:s})=>s(n))?.classGroupId},zv=/^\[(.+)\]$/,oD=e=>{if(zv.test(e)){let t=zv.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},rD=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return nD(Object.entries(e.classGroups),o).forEach(([n,s])=>{ff(s,r,n,t)}),r},ff=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:Wv(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(aD(a)){ff(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{ff(s,Wv(t,n),o,r)})})},Wv=(e,t)=>{let o=e;return t.split(pf).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},aD=e=>e.isThemeGetter,nD=(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,sD=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)}}},$v="!",iD=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($v),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},lD=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},uD=e=>({cache:sD(e.cacheSize),parseClassName:iD(e),...tD(e)}),cD=/\s+/,dD=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],s=e.trim().split(cD),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=lD(c).join(":"),x=f?v+$v: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 fD(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=jv(t))&&(r&&(r+=" "),r+=o);return r}var jv=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=jv(e[r]))&&(o&&(o+=" "),o+=t);return o};function pD(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,f)=>f(c),e());return o=uD(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=dD(l,o);return a(l,c),c}return function(){return n(fD.apply(null,arguments))}}var Ge=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Kv=/^\[(?:([a-z-]+):)?(.+)\]$/i,mD=/^\d+\/\d+$/,gD=new Set(["px","full","screen"]),hD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vD=/\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$/,xD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Go=e=>sn(e)||gD.has(e)||mD.test(e),yr=e=>ln(e,"length",TD),sn=e=>!!e&&!Number.isNaN(Number(e)),df=e=>ln(e,"number",sn),ni=e=>!!e&&Number.isInteger(Number(e)),CD=e=>e.endsWith("%")&&sn(e.slice(0,-1)),Ce=e=>Kv.test(e),br=e=>hD.test(e),wD=new Set(["length","size","percentage"]),SD=e=>ln(e,wD,Xv),RD=e=>ln(e,"position",Xv),ID=new Set(["image","url"]),PD=e=>ln(e,ID,kD),LD=e=>ln(e,"",MD),si=()=>!0,ln=(e,t,o)=>{let r=Kv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},TD=e=>vD.test(e)&&!xD.test(e),Xv=()=>!1,MD=e=>yD.test(e),kD=e=>bD.test(e);var ED=()=>{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",Ce,t],V=()=>[Ce,t],q=()=>["",Go,yr],F=()=>["auto",sn,Ce],$=()=>["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",Ce],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[sn,Ce];return{cacheSize:500,separator:":",theme:{colors:[si],spacing:[Go,yr],blur:["none","",br,Ce],brightness:le(),borderColor:[e],borderRadius:["none","","full",br,Ce],borderSpacing:V(),borderWidth:q(),contrast:le(),grayscale:_(),hueRotate:le(),invert:_(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[CD,yr],inset:O(),margin:O(),opacity:le(),padding:V(),saturate:le(),scale:le(),sepia:_(),skew:le(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[br]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...$(),Ce]}],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",ni,Ce]}],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",Ce]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",ni,Ce]}],"grid-cols":[{"grid-cols":[si]}],"col-start-end":[{col:["auto",{span:["full",ni,Ce]},Ce]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[si]}],"row-start-end":[{row:["auto",{span:[ni,Ce]},Ce]}],"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",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],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",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[br]},br]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",br,yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",df]}],"font-family":[{font:[si]}],"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",Ce]}],"line-clamp":[{"line-clamp":["none",sn,df]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Go,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"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",Go,yr]}],"underline-offset":[{"underline-offset":["auto",Go,Ce]}],"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",Ce]}],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",Ce]}],"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:[...$(),RD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PD]}],"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":[Go,Ce]}],"outline-w":[{outline:[Go,yr]}],"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":[Go,yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",br,LD]}],"shadow-color":[{shadow:[si]}],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",br,Ce]}],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",Ce]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[ni,Ce]}],"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",Ce]}],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",Ce]}],"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",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Go,yr,df]}],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 Yv=pD(ED);function L(...e){return Yv(ou(e))}function ii(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(ii).filter(Boolean).join(" ").trim();if(Ee(e)){let t=e.props;return ii(t.children)}return""}var AD=Ov,Zv=C(({className:e,...t},o)=>d(Fv,{ref:o,className:L("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));Zv.displayName="AccordionItem";var Qv=C(({className:e,children:t,...o},r)=>d(_v,{className:"flex",children:P(lf,{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(Mo,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));Qv.displayName=lf.displayName;var Jv=C(({className:e,children:t,...o},r)=>d(uf,{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})}));Jv.displayName=uf.displayName;N();var ex=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tx=ou,Q=(e,t)=>o=>{var r;if(t?.variants==null)return tx(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=ex(c)||ex(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 tx(e,s,l,o?.class,o?.className)};var DD=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}}),ox=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 pt;case"warning":return xr;case"error":return so;case"info":return on;default:return on}},[t]);return P("div",{ref:u,role:"alert",className:L("moonui-theme",DD({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(Ot,{className:"h-4 w-4"})})]})});ox.displayName="Alert";var rx=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}));rx.displayName="AlertTitle";var ax=C(({className:e,...t},o)=>d("div",{ref:o,className:L("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));ax.displayName="AlertDescription";N();var ND=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"}}),nx=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",ND({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:d("div",{className:"absolute inset-0",children:n})}));nx.displayName="AspectRatio";N();N();N();function ze(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}var cx=sE(ux(),1);function dx(){return(0,cx.useSyncExternalStore)(WD,()=>!0,()=>!1)}function WD(){return()=>{}}var gf="Avatar",[qD,U$]=ke(gf),[$D,px]=qD(gf),mx=C((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=k("idle");return d($D,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:d(Y.span,{...r,ref:t})})});mx.displayName=gf;var gx="AvatarImage",hx=C((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=px(gx,o),i=jD(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});hx.displayName=gx;var vx="AvatarFallback",xx=C((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=px(vx,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});xx.displayName=vx;function fx(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function jD(e,{referrerPolicy:t,crossOrigin:o}){let r=dx(),a=E(null),n=(()=>r?(a.current||(a.current=new window.Image),a.current):null)(),[s,i]=k(()=>fx(n,e));return Ae(()=>{i(fx(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 hf=mx,vf=hx,xf=xx;var XD=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"}}),yf=C(({className:e,size:t,radius:o,variant:r,...a},n)=>d(hf,{ref:n,className:L("moonui-theme",XD({size:t,radius:o,variant:r}),e),...a}));yf.displayName=hf.displayName;var yx=C(({className:e,alt:t="",...o},r)=>d(vf,{ref:r,alt:t,className:L("moonui-theme","aspect-square h-full w-full",e),...o}));yx.displayName=vf.displayName;var bf=C(({className:e,...t},o)=>d(xf,{ref:o,className:L("flex h-full w-full items-center justify-center bg-muted",e),...t}));bf.displayName=xf.displayName;var bx=C(({className:e,max:t,children:o,overlapOffset:r=-8,...a},n)=>{let s=Ie.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(yf,{variant:"border",children:P(bf,{children:["+",l]})})})]})})});bx.displayName="AvatarGroup";N();var Cx=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"}}),Lt=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",Cx({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||(ii(v)?`Remove ${ii(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"})})})]})});Lt.displayName="Badge";N();var YD=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"}}),wx=ce(void 0),Sx=C(({className:e,variant:t,size:o,separator:r,showHomeIcon:a,...n},s)=>d(wx.Provider,{value:r,children:d("nav",{ref:s,className:L("moonui-theme",YD({variant:t,size:o}),e),"aria-label":"breadcrumb",...n})}));Sx.displayName="Breadcrumb";var Rx=C(({className:e,collapsed:t,collapsedWidth:o=3,...r},a)=>{let n=Ie.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(Cf,{}),l]})}return d("ol",{ref:a,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Rx.displayName="BreadcrumbList";var Ix=C(({className:e,isCurrent:t,href:o,asChild:r=!1,children:a,...n},s)=>{let i=r?jl: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})})});Ix.displayName="BreadcrumbItem";var Px=({children:e,className:t,icon:o,...r})=>{let a=ae(wx);return d("span",{role:"presentation","aria-hidden":"true",className:L("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||o||a||d(wt,{className:"h-3.5 w-3.5"})})};Px.displayName="BreadcrumbSeparator";var Cf=({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(ko,{className:"h-4 w-4"})}),d("span",{className:"sr-only",children:"More pages"})]});Cf.displayName="BreadcrumbEllipsis";var Lx=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}));Lx.displayName="BreadcrumbLink";var Tx=C(({className:e,...t},o)=>d("span",{ref:o,className:L("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Tx.displayName="BreadcrumbPage";N();var ru=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}}),Te=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",ru({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(ot,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,u,!s&&l]}));Te.displayName="Button";N();N();N();var cn=ce({});N();function Eo(e){let t=E(null);return t.current===null&&(t.current=e()),t.current}N();var dn=typeof window<"u";var fn=dn?ct:D;N();N();N();var Cr=ce(null);function ua(e,t){e.indexOf(t)===-1&&e.push(t)}function io(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 zo=()=>{},dt=()=>{};var mt={};var li=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ui(e){return typeof e=="object"&&e!==null}var ci=e=>/^0[^.\s]+$/u.test(e);function ca(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ke=e=>e;var ZD=(e,t)=>o=>t(e(o)),lo=(...e)=>e.reduce(ZD);var zt=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var Wo=class{constructor(){this.subscriptions=[]}add(t){return ua(this.subscriptions,t),()=>io(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,rt=e=>e/1e3;function di(e,t){return t?e*(1e3/t):0}var Mx=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var kx=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,QD=1e-7,JD=12;function e1(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=kx(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>QD&&++i<JD);return s}function wr(e,t,o,r){if(e===t&&o===r)return Ke;let a=n=>e1(n,0,1,e,o);return n=>n===0||n===1?n:kx(a(n),t,r)}var au=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var nu=e=>t=>1-e(1-t);var su=wr(.33,1.53,.69,.99),pn=nu(su),fi=au(pn);var pi=e=>(e*=2)<1?.5*pn(e):.5*(2-Math.pow(2,-10*(e-1)));var mi=e=>1-Math.sin(Math.acos(e)),gi=nu(mi),hi=au(mi);var wf=wr(.42,0,1,1),Sf=wr(0,0,.58,1),vi=wr(.42,0,.58,1);var xi=e=>Array.isArray(e)&&typeof e[0]!="number";function yi(e,t){return xi(e)?e[Mx(0,e.length,t)]:e}var bi=e=>Array.isArray(e)&&typeof e[0]=="number";var Ex={linear:Ke,easeIn:wf,easeInOut:vi,easeOut:Sf,circIn:mi,circInOut:hi,circOut:gi,backIn:pn,backInOut:fi,backOut:su,anticipate:pi},t1=e=>typeof e=="string",iu=e=>{if(bi(e)){dt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,a]=e;return wr(t,o,r,a)}else if(t1(e))return dt(Ex[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ex[e];return e};var Ci=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Tt={value:null,addProjectionMetrics:null};function Ax(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&&Tt.value&&Tt.value.frameloop[t].push(l),l=0,o.clear(),a=!1,n&&(n=!1,c.process(f))}};return c}var o1=40;function lu(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=Ci.reduce((b,R)=>(b[R]=Ax(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=mt.useManualTiming?a.timestamp:performance.now();o=!1,mt.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(b-a.timestamp,o1),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:Ci.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<Ci.length;R++)s[Ci[R]].cancel(b)},state:a,steps:s}}var{schedule:we,cancel:gt,state:Ye,steps:wi}=lu(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ke,!0);var uu;function r1(){uu=void 0}var Ze={now:()=>(uu===void 0&&Ze.set(Ye.isProcessing||mt.useManualTiming?Ye.timestamp:performance.now()),uu),set:e=>{uu=e,queueMicrotask(r1)}};var uo={layout:0,mainThread:0,waapi:0};var Dx=e=>t=>typeof t=="string"&&t.startsWith(e),da=Dx("--"),a1=Dx("var(--"),fa=e=>a1(e)?n1.test(e.split("/*")[0].trim()):!1,n1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qo={...Ao,transform:e=>it(0,1,e)},Si={...Ao,default:1};var Sr=e=>Math.round(e*1e5)/1e5;var mn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Nx(e){return e==null}var Ox=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var gn=(e,t)=>o=>!!(typeof o=="string"&&Ox.test(o)&&o.startsWith(e)||t&&!Nx(o)&&Object.prototype.hasOwnProperty.call(o,t)),cu=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(mn);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var s1=e=>it(0,255,e),Rf={...Ao,transform:e=>Math.round(s1(e))},Do={test:gn("rgb","red"),parse:cu("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+Rf.transform(e)+", "+Rf.transform(t)+", "+Rf.transform(o)+", "+Sr(qo.transform(r))+")"};function i1(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 Ri={test:gn("#"),parse:i1,transform:Do.transform};var Ii=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),co=Ii("deg"),ht=Ii("%"),de=Ii("px"),If=Ii("vh"),Pf=Ii("vw"),du=(()=>({...ht,parse:e=>ht.parse(e)/100,transform:e=>ht.transform(e*100)}))();var Rr={test:gn("hsl","hue"),parse:cu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+ht.transform(Sr(t))+", "+ht.transform(Sr(o))+", "+Sr(qo.transform(r))+")"};var je={test:e=>Do.test(e)||Ri.test(e)||Rr.test(e),parse:e=>Do.test(e)?Do.parse(e):Rr.test(e)?Rr.parse(e):Ri.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Do.transform(e):Rr.transform(e),getAnimatableNone:e=>{let t=je.parse(e);return t.alpha=0,je.transform(t)}};var Fx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function l1(e){return isNaN(e)&&typeof e=="string"&&(e.match(mn)?.length||0)+(e.match(Fx)?.length||0)>0}var Vx="number",Bx="color",u1="var",c1="var(",_x="${}",d1=/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 Ir(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},a=[],n=0,i=t.replace(d1,l=>(je.test(l)?(r.color.push(n),a.push(Bx),o.push(je.parse(l))):l.startsWith(c1)?(r.var.push(n),a.push(u1),o.push(l)):(r.number.push(n),a.push(Vx),o.push(parseFloat(l))),++n,_x)).split(_x);return{values:o,split:i,indexes:r,types:a}}function Hx(e){return Ir(e).values}function Ux(e){let{split:t,types:o}=Ir(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===Vx?n+=Sr(a[s]):i===Bx?n+=je.transform(a[s]):n+=a[s]}return n}}var f1=e=>typeof e=="number"?0:je.test(e)?je.getAnimatableNone(e):e;function p1(e){let t=Hx(e);return Ux(e)(t.map(f1))}var vt={test:l1,parse:Hx,createTransformer:Ux,getAnimatableNone:p1};function Lf(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 Gx({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=Lf(l,i,e+1/3),n=Lf(l,i,e),s=Lf(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function hn(e,t){return o=>o>0?t:e}var Re=(e,t,o)=>e+(t-e)*o;var Tf=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},m1=[Ri,Do,Rr],g1=e=>m1.find(t=>t.test(e));function zx(e){let t=g1(e);if(zo(!!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===Rr&&(o=Gx(o)),o}var Mf=(e,t)=>{let o=zx(e),r=zx(t);if(!o||!r)return hn(e,t);let a={...o};return n=>(a.red=Tf(o.red,r.red,n),a.green=Tf(o.green,r.green,n),a.blue=Tf(o.blue,r.blue,n),a.alpha=Re(o.alpha,r.alpha,n),Do.transform(a))};var fu=new Set(["none","hidden"]);function Wx(e,t){return fu.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function h1(e,t){return o=>Re(e,t,o)}function pu(e){return typeof e=="number"?h1:typeof e=="string"?fa(e)?hn:je.test(e)?Mf:y1:Array.isArray(e)?qx:typeof e=="object"?je.test(e)?Mf:v1:hn}function qx(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>pu(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function v1(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=pu(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function x1(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 y1=(e,t)=>{let o=vt.createTransformer(t),r=Ir(e),a=Ir(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?fu.has(e)&&!a.values.length||fu.has(t)&&!r.values.length?Wx(e,t):lo(qx(x1(r,a),a.values),o):(zo(!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"),hn(e,t))};function mu(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Re(e,t,o):pu(e)(e,t)}var $x=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>we.update(t,o),stop:()=>gt(t),now:()=>Ye.isProcessing?Ye.timestamp:Ze.now()}};var gu=(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 vn(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 Pi(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(vn(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:rt(a)}}var b1=5;function hu(e,t,o){let r=Math.max(t-b1,0);return di(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 Ef=.001;function jx({duration:e=We.duration,bounce:t=We.bounce,velocity:o=We.velocity,mass:r=We.mass}){let a,n;zo(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,rt(e)),s<1?(a=u=>{let c=u*s,f=c*e,p=c-o,m=vu(u,s),h=Math.exp(-f);return Ef-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=vu(Math.pow(u,2),s);return(-a(u)+Ef>0?-1:1)*((p-m)*h)/g}):(a=u=>{let c=Math.exp(-u*e),f=(u-o)*e+1;return-Ef+c*f},n=u=>{let c=Math.exp(-u*e),f=(o-u)*(e*e);return c*f});let i=5/e,l=w1(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 C1=12;function w1(e,t,o){let r=o;for(let a=1;a<C1;a++)r=r-e(r)/t(r);return r}function vu(e,t){return e*Math.sqrt(1-t*t)}var S1=["duration","bounce"],R1=["stiffness","damping","mass"];function Kx(e,t){return t.some(o=>e[o]!==void 0)}function I1(e){let t={velocity:We.velocity,stiffness:We.stiffness,damping:We.damping,mass:We.mass,isResolvedFromDuration:!1,...e};if(!Kx(e,R1)&&Kx(e,S1))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=jx(e);t={...t,...o,mass:We.mass},t.isResolvedFromDuration=!0}return t}function $o(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}=I1({...o,velocity:-rt(o.velocity||0)}),h=p||0,g=u/(2*Math.sqrt(l*c)),v=s-n,x=rt(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=vu(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):hu(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(vn(R),2e4),I=gu(S=>R.next(w*S).value,w,30);return w+"ms "+I},toTransition:()=>{}};return R}$o.applyToOptions=e=>{let t=Pi(e,100,$o);return e.ease=t.ease,e.duration=et(t.duration),e.type="keyframes",e};function Li({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=$o({keyframes:[p.value,h(p.value)],velocity:hu(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 P1(e,t,o){let r=[],a=o||mt.mix||mu,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=lo(l,i)}r.push(i)}return r}function xu(e,t,{clamp:o=!0,ease:r,mixer:a}={}){let n=e.length;if(dt(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=P1(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=zt(e[f],e[f+1],c);return i[f](p)};return o?c=>u(it(e[0],e[n-1],c)):u}function Ti(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let a=zt(0,t,r);e.push(Re(o,1,a))}}function Mi(e){let t=[0];return Ti(t,e.length-1),t}function Xx(e,t){return e.map(o=>o*t)}function L1(e,t){return e.map(()=>t||vi).splice(0,e.length-1)}function pa({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=xi(r)?r.map(iu):iu(r),n={done:!1,value:t[0]},s=Xx(o&&o.length===t.length?o:Mi(t),e),i=xu(s,t,{ease:Array.isArray(a)?a:L1(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var T1=e=>e!==null;function xn(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(T1),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var M1={decay:Li,inertia:Li,tween:pa,keyframes:pa,spring:$o};function yu(e){typeof e.type=="string"&&(e.type=M1[e.type])}var Pr=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 k1=e=>e/100,jo=class extends Pr{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?.())},uo.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;yu(t);let{type:o=pa,repeat:r=0,repeatDelay:a=0,repeatType:n,velocity:s=0}=t,{keyframes:i}=t,l=o||pa;l!==pa&&typeof i[0]!="number"&&(this.mixKeyframes=lo(k1,mu(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=vn(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!==Li&&(w.value=xn(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 rt(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+rt(t)}get time(){return rt(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=rt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=$x,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,uo.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 Yx(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ma=e=>e*180/Math.PI,Af=e=>{let t=ma(Math.atan2(e[1],e[0]));return Df(t)},E1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Af,rotateZ:Af,skewX:e=>ma(Math.atan(e[1])),skewY:e=>ma(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Df=e=>(e=e%360,e<0&&(e+=360),e),Zx=Af,Qx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Jx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),A1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qx,scaleY:Jx,scale:e=>(Qx(e)+Jx(e))/2,rotateX:e=>Df(ma(Math.atan2(e[6],e[5]))),rotateY:e=>Df(ma(Math.atan2(-e[2],e[0]))),rotateZ:Zx,rotate:Zx,skewX:e=>ma(Math.atan(e[4])),skewY:e=>ma(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ki(e){return e.includes("scale")?1:0}function Ei(e,t){if(!e||e==="none")return ki(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=A1,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=E1,a=i}if(!a)return ki(t);let n=r[t],s=a[1].split(",").map(D1);return typeof n=="function"?n(s):s[n]}var Nf=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return Ei(o,t)};function D1(e){return parseFloat(e.trim())}var fo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ft=(()=>new Set(fo))();var Of=e=>e===Ao||e===de,N1=new Set(["x","y","z"]),O1=fo.filter(e=>!N1.has(e));function ey(e){let t=[];return O1.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var Lr={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})=>Ei(t,"x"),y:(e,{transform:t})=>Ei(t,"y")};Lr.translateX=Lr.x;Lr.translateY=Lr.y;var ga=new Set,Ff=!1,_f=!1,Vf=!1;function ty(){if(_f){let e=Array.from(ga).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let a=ey(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)})}_f=!1,Ff=!1,ga.forEach(e=>e.complete(Vf)),ga.clear()}function oy(){ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_f=!0)})}function Bf(){Vf=!0,oy(),ty(),Vf=!1}var Ko=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?(ga.add(this),Ff||(Ff=!0,we.read(oy),we.resolveKeyframes(ty))):(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])}Yx(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ga.delete(this)}cancel(){this.state==="scheduled"&&(ga.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var ry=e=>e.startsWith("--");function ay(e,t,o){ry(t)?e.style.setProperty(t,o):e.style[t]=o}var ny=ca(()=>window.ScrollTimeline!==void 0);var sy={};function iy(e,t){let o=ca(e);return()=>sy[t]??o()}var bu=iy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var ha=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var Hf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ha([0,.65,.55,1]),circOut:ha([.55,0,1,.45]),backIn:ha([.31,.01,.66,-.59]),backOut:ha([.33,1.53,.69,.99])};function Uf(e,t){if(e)return typeof e=="function"?bu()?gu(e,t):"ease-out":bi(e)?ha(e):Array.isArray(e)?e.map(o=>Uf(o,t)||Hf.easeOut):Hf[e]}function ly(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=Uf(i,a);Array.isArray(f)&&(c.easing=f),Tt.value&&uo.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 Tt.value&&m.finished.finally(()=>{uo.waapi--}),m}function va(e){return typeof e=="function"&&"applyToOptions"in e}function uy({type:e,...t}){return va(e)&&bu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Cu=class extends Pr{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,dt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=uy(t);this.animation=ly(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=xn(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):ay(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 rt(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+rt(t)}get time(){return rt(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&&ny()?(this.animation.timeline=t,Ke):o(this)}};var cy={anticipate:pi,backInOut:fi,circInOut:hi};function F1(e){return e in cy}function dy(e){typeof e.ease=="string"&&F1(e.ease)&&(e.ease=cy[e.ease])}var fy=10,wu=class extends Cu{constructor(t){dy(t),yu(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-fy).value,i.sample(l).value,fy),i.stop()}};var Gf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(vt.test(e)||e==="0")&&!e.startsWith("url("));function _1(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 py(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=Gf(a,t),i=Gf(n,t);return zo(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:_1(e)||(o==="spring"||va(o))&&r}function yn(e){e.duration=0,e.type="keyframes"}var V1=new Set(["opacity","clipPath","filter","transform"]),B1=ca(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function my(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 B1()&&o&&V1.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var H1=40,Ai=class extends Pr{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||Ko;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(),py(t,n,s,i)||((mt.instantAnimations||!l)&&c?.(xn(t,r,o)),t[0]=t[t.length-1],yn(r),r.repeat=0);let p={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>H1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},m=!u&&my(p)?new wu({...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(),Bf()),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 Su=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 gy(this.animations,"duration")}get iterationDuration(){return gy(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 gy(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 Di=class extends Su{then(t,o){return this.finished.finally(t).then(()=>{})}};var U1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function G1(e){let t=U1.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var z1=4;function zf(e,t,o=1){dt(o<=z1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=G1(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return li(s)?parseFloat(s):s}return fa(a)?zf(a,t,o+1):a}function xa(e,t){return e?.[t]??e?.default??e}var Ni=new Set(["width","height","top","left","right","bottom",...fo]);var hy={test:e=>e==="auto",parse:e=>e};var Ru=e=>t=>t.test(e);var Wf=[Ao,de,ht,co,Pf,If,hy],qf=e=>Wf.find(Ru(e));function vy(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ci(e):!0}var W1=new Set(["brightness","contrast","saturate","opacity"]);function q1(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(mn)||[];if(!r)return e;let a=o.replace(r,""),n=W1.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var $1=/\b([a-z-]*)\(.*?\)/gu,Oi={...vt,getAnimatableNone:e=>{let t=e.match($1);return t?t.map(q1).join(" "):e}};var $f={...Ao,transform:Math.round};var xy={rotate:co,rotateX:co,rotateY:co,rotateZ:co,scale:Si,scaleX:Si,scaleY:Si,scaleZ:Si,skew:co,skewX:co,skewY:co,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:qo,originX:du,originY:du,originZ:de};var ya={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,backgroundPositionX:de,backgroundPositionY:de,...xy,zIndex:$f,fillOpacity:qo,strokeOpacity:qo,numOctaves:$f};var yy={...ya,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:Oi,WebkitFilter:Oi},Fi=e=>yy[e];function _i(e,t){let o=Fi(e);return o!==Oi&&(o=vt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var j1=new Set(["auto","none","0"]);function by(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!j1.has(n)&&Ir(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=_i(o,a)}var Vi=class extends Ko{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(),fa(u))){let c=zf(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ni.has(r)||t.length!==2)return;let[a,n]=t,s=qf(a),i=qf(n);if(s!==i)if(Of(s)&&Of(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Lr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||vy(t[a]))&&r.push(a);r.length&&by(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=Lr[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]=Lr[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 Bi(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 Hi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ui(e){return ui(e)&&"offsetHeight"in e}var Cy=30,K1=e=>!isNaN(parseFloat(e)),ba={current:void 0},Iu=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=K1(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 Wo);let r=this.events[t].add(o);return t==="change"?()=>{r(),we.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 ba.current&&ba.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ze.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Cy)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Cy);return di(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 Mt(e,t){return new Iu(e,t)}var{schedule:Ca,cancel:X1}=lu(queueMicrotask,!1);var Wt={x:!1,y:!1};function Pu(){return Wt.x||Wt.y}function jf(e){return e==="x"||e==="y"?Wt[e]?null:(Wt[e]=!0,()=>{Wt[e]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function Lu(e,t){let o=Bi(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function wy(e){return!(e.pointerType==="touch"||Pu())}function Kf(e,t,o={}){let[r,a,n]=Lu(e,o),s=i=>{if(!wy(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=f=>{wy(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var Xf=(e,t)=>t?e===t?!0:Xf(e,t.parentElement):!1;var wa=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Y1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sy(e){return Y1.has(e.tagName)||e.tabIndex!==-1}var bn=new WeakSet;function Ry(e){return t=>{t.key==="Enter"&&e(t)}}function Yf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Iy=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=Ry(()=>{if(bn.has(o))return;Yf(o,"down");let a=Ry(()=>{Yf(o,"up")}),n=()=>Yf(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 Py(e){return wa(e)&&!Pu()}function Zf(e,t,o={}){let[r,a,n]=Lu(e,o),s=i=>{let l=i.currentTarget;if(!Py(i))return;bn.add(l);let u=t(l,i),c=(m,h)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),bn.has(l)&&bn.delete(l),Py(m)&&typeof u=="function"&&u(m,{success:h})},f=m=>{c(m,l===window||l===document||o.useGlobalTarget||Xf(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),Ui(i)&&(i.addEventListener("focus",u=>Iy(u,a)),!Sy(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Sa(e){return ui(e)&&"ownerSVGElement"in e}function Gi(e){return Sa(e)&&e.tagName==="svg"}function Qf(...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=xu(a,n,s);return t?i(r):i}var De=e=>!!(e&&e.getVelocity);var Z1=[...Wf,je,vt],Jf=e=>Z1.find(Ru(e));N();N();N();var Tr=ce({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});N();function Ly(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Q1(...e){return t=>{let o=!1,r=e.map(a=>{let n=Ly(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():Ly(e[a],null)}}}}function Ty(...e){return H(Q1(...e),e)}var ep=class extends Rs{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=Ui(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 My({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}=ae(Tr),l=Ty(n,e?.ref);return Is(()=>{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(ep,{isPresent:t,childRef:n,sizeRef:s,children:Fe(e,{ref:l})})}var ky=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:a,presenceAffectsLayout:n,mode:s,anchorX:i,root:l})=>{let u=Eo(J1),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(My,{isPresent:o,anchorX:i,root:l,children:e})),d(Cr.Provider,{value:p,children:e})};function J1(){return new Map}N();function Tu(e=!0){let t=ae(Cr);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 zi=e=>e.key||"";function tp(e){let t=[];return Ie.forEach(e,o=>{Ee(o)&&t.push(o)}),t}var Xo=({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]=Tu(s),f=Z(()=>tp(e),[e]),p=s&&!u?[]:f.map(zi),m=E(!0),h=E(f),g=Eo(()=>new Map),[v,x]=k(f),[y,b]=k(f);fn(()=>{m.current=!1,h.current=f;for(let I=0;I<y.length;I++){let S=zi(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=zi(T);p.includes(M)||(I.splice(S,0,T),R.push(T))}return n==="wait"&&R.length&&(I=R),b(tp(I)),x(f),null}let{forceRender:w}=ae(cn);return d(Ve,{children:y.map(I=>{let S=zi(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(ky,{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 Mu=ce({strict:!1});var Ey={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"]},Yo={};for(let e in Ey)Yo[e]={isEnabled:t=>Ey[e].some(o=>!!t[o])};function Ay(e){for(let t in e)Yo[t]={...Yo[t],...e[t]}}var eN=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 Wi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eN.has(e)}var Dy=e=>!Wi(e);function tN(e){typeof e=="function"&&(Dy=t=>t.startsWith("on")?!Wi(t):e(t))}try{tN(rE("@emotion/is-prop-valid").default)}catch{}function Ny(e,t,o){let r={};for(let a in e)a==="values"&&typeof e.values=="object"||(Dy(a)||o===!0&&Wi(a)||!t&&!Wi(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}N();N();var Mr=ce({});N();function kr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Zo(e){return typeof e=="string"||Array.isArray(e)}var ku=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qi=["initial",...ku];function Ra(e){return kr(e.animate)||qi.some(t=>Zo(e[t]))}function Eu(e){return!!(Ra(e)||e.variants)}function Oy(e,t){if(Ra(e)){let{initial:o,animate:r}=e;return{initial:o===!1||Zo(o)?o:void 0,animate:Zo(r)?r:void 0}}return e.inherit!==!1?t:{}}function _y(e){let{initial:t,animate:o}=Oy(e,ae(Mr));return Z(()=>({initial:t,animate:o}),[Fy(t),Fy(o)])}function Fy(e){return Array.isArray(e)?e.join(" "):e}N();N();var Ia={};function Vy(e){for(let t in e)Ia[t]=e[t],da(t)&&(Ia[t].isCSSVariable=!0)}function Au(e,{layout:t,layoutId:o}){return Ft.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Ia[e]||e==="opacity")}var oN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rN=fo.length;function By(e,t,o){let r="",a=!0;for(let n=0;n<rN;n++){let s=fo[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=Hi(i,ya[s]);if(!l){a=!1;let c=oN[s]||s;r+=`${c}(${u}) `}o&&(t[s]=u)}}return r=r.trim(),o?r=o(t,a?"":r):a&&(r="none"),r}function Cn(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(Ft.has(l)){s=!0;continue}else if(da(l)){a[l]=u;continue}else{let c=Hi(u,ya[l]);l.startsWith("origin")?(i=!0,n[l]=c):r[l]=c}}if(t.transform||(s||o?r.transform=By(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 wn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function op(e,t,o){for(let r in t)!De(t[r])&&!Au(r,o)&&(e[r]=t[r])}function aN({transformTemplate:e},t){return Z(()=>{let o=wn();return Cn(o,t,e),Object.assign({},o.vars,o.style)},[t])}function nN(e,t){let o=e.style||{},r={};return op(r,o,e),Object.assign(r,aN(e,t)),r}function Hy(e,t){let o={},r=nN(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 sN={offset:"stroke-dashoffset",array:"stroke-dasharray"},iN={offset:"strokeDashoffset",array:"strokeDasharray"};function Uy(e,t,o=1,r=0,a=!0){e.pathLength=1;let n=a?sN:iN;e[n.offset]=de.transform(-r);let s=de.transform(t),i=de.transform(o);e[n.array]=`${s} ${i}`}function Du(e,{attrX:t,attrY:o,attrScale:r,pathLength:a,pathSpacing:n=1,pathOffset:s=0,...i},l,u,c){if(Cn(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&&Uy(f,a,n,s,!1)}var Nu=()=>({...wn(),attrs:{}});var Ou=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gy(e,t,o,r){let a=Z(()=>{let n=Nu();return Du(n,t,Ou(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};op(n,e.style,e),a.style={...n,...a.style}}return a}var zy=["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 Sn(e){return typeof e!="string"||e.includes("-")?!1:!!(zy.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wy(e,t,o,{latestValues:r},a,n=!1){let i=(Sn(e)?Gy:Hy)(t,r,a,e),l=Ny(t,typeof e=="string",n),u=e!==Je?{...l,...i,ref:o}:{},{children:c}=t,f=Z(()=>De(c)?c.get():c,[c]);return me(e,{...u,children:f})}N();function qy(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function Rn(e,t,o,r){if(typeof t=="function"){let[a,n]=qy(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]=qy(r);t=t(o!==void 0?o:e.custom,a,n)}return t}function In(e){return De(e)?e.get():e}function lN({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,a){return{latestValues:uN(o,r,a,e),renderState:t()}}function uN(e,t,o,r){let a={},n=r(e,{});for(let p in n)a[p]=In(n[p]);let{initial:s,animate:i}=e,l=Ra(e),u=Eu(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"&&!kr(f)){let p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){let h=Rn(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 Fu=e=>(t,o)=>{let r=ae(Mr),a=ae(Cr),n=()=>lN(e,t,r,a);return o?n():Eo(n)};function Pn(e,t,o){let{style:r}=e,a={};for(let n in r)(De(r[n])||t.style&&De(t.style[n])||Au(n,e)||o?.getValue(n)?.liveStyle!==void 0)&&(a[n]=r[n]);return a}var $y=Fu({scrapeMotionValuesFromProps:Pn,createRenderState:wn});function _u(e,t,o){let r=Pn(e,t,o);for(let a in e)if(De(e[a])||De(t[a])){let n=fo.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[n]=e[a]}return r}var jy=Fu({scrapeMotionValuesFromProps:_u,createRenderState:Nu});var Ky=Symbol.for("motionComponentSymbol");N();function Qo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Xy(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):Qo(o)&&(o.current=r))},[t])}N();var Ln=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var cN="framerAppearId",Vu="data-"+Ln(cN);N();var Bu=ce({});function Yy(e,t,o,r,a){let{visualElement:n}=ae(Mr),s=ae(Mu),i=ae(Cr),l=ae(Tr).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=ae(Bu);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&dN(u.current,o,a,f);let p=E(!1);Is(()=>{c&&p.current&&c.update(o,i)});let m=o[Vu],h=E(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return fn(()=>{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 dN(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:Zy(e.parent)),e.projection.setOptions({layoutId:a,layout:n,alwaysMeasureLayout:!!s||i&&Qo(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function Zy(e){if(e)return e.options.allowProjection!==!1?e.projection:Zy(e.parent)}function Hu(e,{forwardMotionProps:t=!1}={},o,r){o&&Ay(o);let a=Sn(e)?jy:$y;function n(i,l){let u,c={...ae(Tr),...i,layoutId:fN(i)},{isStatic:f}=c,p=_y(i),m=a(i,f);if(!f&&dn){pN(c,o);let h=mN(c);u=h.MeasureLayout,p.visualElement=Yy(e,m,c,r,h.ProjectionNode)}return P(Mr.Provider,{value:p,children:[u&&p.visualElement?d(u,{visualElement:p.visualElement,...c}):null,Wy(e,i,Xy(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[Ky]=e,s}function fN({layoutId:e}){let t=ae(cn).id;return t&&e!==void 0?t+"-"+e:e}function pN(e,t){let o=ae(Mu).strict}function mN(e){let{drag:t,layout:o}=Yo;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Qy(e,t){if(typeof Proxy>"u")return Hu;let o=new Map,r=(n,s)=>Hu(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,Hu(s,void 0,e,t)),o.get(s))})}N();function Uu({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function Jy({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eb(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 rp(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:o}){return!rp(e)||!rp(t)||!rp(o)}function Jo(e){return Gu(e)||ap(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ap(e){return tb(e.x)||tb(e.y)}function tb(e){return e&&e!=="0%"}function $i(e,t,o){let r=e-o,a=t*r;return o+a}function ob(e,t,o,r,a){return a!==void 0&&(e=$i(e,a,r)),$i(e,o,r)+t}function np(e,t=0,o=1,r,a){e.min=ob(e.min,t,o,r,a),e.max=ob(e.max,t,o,r,a)}function sp(e,{x:t,y:o}){np(e.x,t.translate,t.scale,t.originPoint),np(e.y,o.translate,o.scale,o.originPoint)}var rb=.999999999999,ab=1.0000000000001;function sb(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&&Pa(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,sp(e,s)),r&&Jo(n.latestValues)&&Pa(e,n.latestValues))}t.x<ab&&t.x>rb&&(t.x=1),t.y<ab&&t.y>rb&&(t.y=1)}function Er(e,t){e.min=e.min+t,e.max=e.max+t}function nb(e,t,o,r,a=.5){let n=Re(e.min,e.max,a);np(e,t,o,n,r)}function Pa(e,t){nb(e.x,t.x,t.scaleX,t.scale,t.originX),nb(e.y,t.y,t.scaleY,t.scale,t.originY)}function ip(e,t){return Uu(eb(e.getBoundingClientRect(),t))}function ib(e,t,o){let r=ip(e,o),{scroll:a}=t;return a&&(Er(r.x,a.offset.x),Er(r.y,a.offset.y)),r}var lb=()=>({translate:0,scale:1,origin:0,originPoint:0}),La=()=>({x:lb(),y:lb()}),ub=()=>({min:0,max:0}),He=()=>({x:ub(),y:ub()});var ji={current:null},zu={current:!1};function cb(){if(zu.current=!0,!!dn)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ji.current=e.matches;e.addEventListener("change",t),t()}else ji.current=!1}var Ar=new WeakMap;function db(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,Mt(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,Mt(s!==void 0?s:a,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var fb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Tn=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=Ko,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,we.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=Ra(o),this.isVariantNode=Eu(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,Ar.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)),zu.current||cb(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ji.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),gt(this.notifyUpdate),gt(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=Ft.has(t);r&&this.onBindTransform&&this.onBindTransform();let a=o.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&we.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 Yo){let o=Yo[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<fb.length;r++){let a=fb[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=db(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=Mt(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"&&(li(r)||ci(r))?r=parseFloat(r):!Jf(r)&&vt.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=Rn(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 Wo),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){Ca.render(this.render)}};var Mn=class extends Tn{constructor(){super(...arguments),this.KeyframeResolver=Vi}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 Wu(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 gN(e){return window.getComputedStyle(e)}var kn=class extends Mn{constructor(){super(...arguments),this.type="html",this.renderInstance=Wu}readValueFromInstance(t,o){if(Ft.has(o))return this.projection?.isProjecting?ki(o):Nf(t,o);{let r=gN(t),a=(da(o)?r.getPropertyValue(o):r[o])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:o}){return ip(t,o)}build(t,o,r){Cn(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return Pn(t,o,r)}};var qu=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 pb(e,t,o,r){Wu(e,t,void 0,r);for(let a in t.attrs)e.setAttribute(qu.has(a)?a:Ln(a),t.attrs[a])}var En=class extends Mn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=He}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(Ft.has(o)){let r=Fi(o);return r&&r.default||0}return o=qu.has(o)?o:Ln(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return _u(t,o,r)}build(t,o,r){Du(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,a){pb(t,o,r,a)}mount(t){this.isSVGTag=Ou(t.tagName),super.mount(t)}};var mb=(e,t)=>Sn(e)?new En(t):new kn(t,{allowProjection:e!==Je});function No(e,t,o){let r=e.getProps();return Rn(r,t,o!==void 0?o:r.custom,e)}var Ki=e=>Array.isArray(e);function hN(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,Mt(o))}function vN(e){return Ki(e)?e[e.length-1]||0:e}function gb(e,t){let o=No(e,t),{transitionEnd:r={},transition:a={},...n}=o||{};n={...n,...r};for(let s in n){let i=vN(n[s]);hN(e,s,i)}}function hb(e){return!!(De(e)&&e.add)}function Xi(e,t){let o=e.getValue("willChange");if(hb(o))return o.add(t);if(!o&&mt.WillChange){let r=new mt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function $u(e){return e.props[Vu]}var xN=e=>e!==null;function vb(e,{repeat:t,repeatType:o="loop"},r){let a=e.filter(xN),n=t&&o!=="loop"&&t%2===1?0:a.length-1;return!n||r===void 0?a[n]:r}var yN={type:"spring",stiffness:500,damping:25,restSpeed:10},bN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),CN={type:"keyframes",duration:.8},wN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xb=(e,{keyframes:t})=>t.length>2?CN:Ft.has(e)?e.startsWith("scale")?bN(t[1]):yN:wN;function yb({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 An=(e,t,o,r={},a,n)=>s=>{let i=xa(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};yb(i)||Object.assign(c,xb(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)&&(yn(c),c.delay===0&&(f=!0)),(mt.instantAnimations||mt.skipAnimations)&&(f=!0,yn(c),c.delay=0),c.allowFlatten=!i.type&&!i.ease,f&&!n&&t.get()!==void 0){let p=vb(c.keyframes,i);if(p!==void 0){we.update(()=>{c.onUpdate(p),c.onComplete()});return}}return i.isSync?new jo(c):new Ai(c)};function SN({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function Dn(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&&SN(u,c))continue;let m={delay:o,...xa(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=$u(e);if(x){let y=window.MotionHandoffAnimation(x,c,we);y!==null&&(m.startTime=y,g=!0)}}Xi(e,c),f.start(An(c,f,p,e.shouldReduceMotion&&Ni.has(c)?{type:!1}:m,e,g));let v=f.animation;v&&l.push(v)}return s&&Promise.all(l).then(()=>{we.update(()=>{s&&gb(e,s)})}),l}function ju(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 Ku(e,t,o={}){let r=No(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(Dn(e,r,o)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=a;return RN(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 RN(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(Ku(l,t,{...s,delay:o+(typeof r=="function"?0:r)+ju(e.variantChildren,l,r,a,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function bb(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let a=t.map(n=>Ku(e,n,o));r=Promise.all(a)}else if(typeof t=="string")r=Ku(e,t,o);else{let a=typeof t=="function"?No(e,t,o.custom):t;r=Promise.all(Dn(e,a,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function lp(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 IN=qi.length;function up(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?up(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<IN;o++){let r=qi[o],a=e.props[r];(Zo(a)||a===!1)&&(t[r]=a)}return t}var PN=[...ku].reverse(),LN=ku.length;function TN(e){return t=>Promise.all(t.map(({animation:o,options:r})=>bb(e,o,r)))}function wb(e){let t=TN(e),o=Cb(),r=!0,a=l=>(u,c)=>{let f=No(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=up(e.parent)||{},f=[],p=new Set,m={},h=1/0;for(let v=0;v<LN;v++){let x=PN[v],y=o[x],b=u[x]!==void 0?u[x]:c[x],R=Zo(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||kr(b)||typeof b=="boolean")continue;let S=MN(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 ne=!1;Ki(z)&&Ki(_)?ne=!lp(z,_):ne=z!==_,ne?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,ne=No(_,G);if(_.enteringChildren&&ne){let{delayChildren:le}=ne.transition||{};z.delay=ju(_.enteringChildren,e,le)}}return{animation:G,options:z}}))}if(p.size){let v={};if(typeof u.initial!="boolean"){let x=No(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=Cb()}}}function MN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lp(t,e):!1}function Ta(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cb(){return{animate:Ta(!0),whileInView:Ta(),whileHover:Ta(),whileTap:Ta(),whileDrag:Ta(),whileFocus:Ta(),exit:Ta()}}var lt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Xu=class extends lt{constructor(t){super(t),t.animationState||(t.animationState=wb(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();kr(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 kN=0,Yu=class extends lt{constructor(){super(...arguments),this.id=kN++}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 Sb={animation:{Feature:Xu},exit:{Feature:Yu}};function er(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function tr(e){return{point:{x:e.pageX,y:e.pageY}}}var Rb=e=>t=>wa(t)&&e(t,tr(t));function Dr(e,t,o,r){return er(e,t,Rb(o),r)}var Tb=1e-4,EN=1-Tb,AN=1+Tb,Mb=.01,DN=0-Mb,NN=0+Mb;function at(e){return e.max-e.min}function kb(e,t,o){return Math.abs(e-t)<=o}function Ib(e,t,o,r=.5){e.origin=r,e.originPoint=Re(t.min,t.max,e.origin),e.scale=at(o)/at(t),e.translate=Re(o.min,o.max,e.origin)-e.originPoint,(e.scale>=EN&&e.scale<=AN||isNaN(e.scale))&&(e.scale=1),(e.translate>=DN&&e.translate<=NN||isNaN(e.translate))&&(e.translate=0)}function Nn(e,t,o,r){Ib(e.x,t.x,o.x,r?r.originX:void 0),Ib(e.y,t.y,o.y,r?r.originY:void 0)}function Pb(e,t,o){e.min=o.min+t.min,e.max=e.min+at(t)}function Eb(e,t,o){Pb(e.x,t.x,o.x),Pb(e.y,t.y,o.y)}function Lb(e,t,o){e.min=t.min-o.min,e.max=e.min+at(t)}function On(e,t,o){Lb(e.x,t.x,o.x),Lb(e.y,t.y,o.y)}function kt(e){return[e("x"),e("y")]}var Zu=({current:e})=>e?e.ownerDocument.defaultView:null;var Ab=(e,t)=>Math.abs(e-t);function Db(e,t){let o=Ab(e.x,t.x),r=Ab(e.y,t.y);return Math.sqrt(o**2+r**2)}var Fn=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=dp(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,h=Db(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=cp(m,this.transformPagePoint),we.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=dp(p.type==="pointercancel"?this.lastMoveEventInfo:cp(m,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,x),g&&g(p,x)},!wa(t))return;this.dragSnapToOrigin=n,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=a||window;let i=tr(t),l=cp(i,this.transformPagePoint),{point:u}=l,{timestamp:c}=Ye;this.history=[{...u,timestamp:c}];let{onSessionStart:f}=o;f&&f(t,dp(l,this.history)),this.removeListeners=lo(Dr(this.contextWindow,"pointermove",this.handlePointerMove),Dr(this.contextWindow,"pointerup",this.handlePointerUp),Dr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),gt(this.updatePoint)}};function cp(e,t){return t?{point:t(e.point)}:e}function Nb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dp({point:e},t){return{point:e,delta:Nb(e,Ob(t)),offset:Nb(e,ON(t)),velocity:FN(t,.1)}}function ON(e){return e[0]}function Ob(e){return e[e.length-1]}function FN(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,a=Ob(e);for(;o>=0&&(r=e[o],!(a.timestamp-r.timestamp>et(t)));)o--;if(!r)return{x:0,y:0};let n=rt(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 Hb(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 Fb(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 Ub(e,{top:t,left:o,bottom:r,right:a}){return{x:Fb(e.x,o,a),y:Fb(e.y,t,r)}}function _b(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 Gb(e,t){return{x:_b(e.x,t.x),y:_b(e.y,t.y)}}function zb(e,t){let o=.5,r=at(e),a=at(t);return a>r?o=zt(t.min,t.max-r,e.min):r>a&&(o=zt(e.min,e.max-a,t.min)),it(0,1,o)}function Wb(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 Qu=.35;function qb(e=Qu){return e===!1?e=0:e===!0&&(e=Qu),{x:Vb(e,"left","right"),y:Vb(e,"top","bottom")}}function Vb(e,t,o){return{min:Bb(e,t),max:Bb(e,o)}}function Bb(e,t){return typeof e=="number"?e:e[t]||0}var _N=new WeakMap,ec=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(tr(f).point)},s=(f,p)=>{let{drag:m,dragPropagation:h,onDragStart:g}=this.getProps();if(m&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jf(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),kt(x=>{let y=this.getAxisMotionValue(x).get()||0;if(ht.test(y)){let{projection:b}=this.visualElement;if(b&&b.layout){let R=b.layout.layoutBox[x];R&&(y=at(R)*(parseFloat(y)/100))}}this.originPoint[x]=y}),g&&we.postRender(()=>g(f,p)),Xi(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=VN(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=()=>kt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Fn(t,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Zu(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&&we.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||!Ju(t,a,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Hb(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&&Qo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Ub(r.layoutBox,t):this.constraints=!1,this.elastic=qb(o),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&kt(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=Wb(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!Qo(t))return!1;let r=t.current;dt(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=ib(r,a.root,this.visualElement.getTransformPagePoint()),s=Gb(a.layout.layoutBox,n);if(o){let i=o(Jy(s));this.hasMutatedConstraints=!!i,i&&(s=Uu(i))}return s}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:a,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=kt(c=>{if(!Ju(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 Xi(this.visualElement,t),r.start(An(t,r,0,o,this.visualElement,!1))}stopAnimation(){kt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){kt(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){kt(o=>{let{drag:r}=this.getProps();if(!Ju(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(!Qo(o)||!r||!this.constraints)return;this.stopAnimation();let a={x:0,y:0};kt(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();a[s]=zb({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(),kt(s=>{if(!Ju(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;_N.set(this.visualElement,this);let t=this.visualElement.current,o=Dr(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();Qo(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()),we.read(r);let s=er(window,"resize",()=>this.scalePositionWithinConstraints()),i=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(kt(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=Qu,dragMomentum:i=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:a,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function Ju(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function VN(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var tc=class extends lt{constructor(t){super(t),this.removeGroupControls=Ke,this.removeListeners=Ke,this.controls=new ec(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 $b=e=>(t,o)=>{e&&we.postRender(()=>e(t,o))},oc=class extends lt{constructor(){super(...arguments),this.removePointerDownListener=Ke}onPointerDown(t){this.session=new Fn(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zu(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:$b(t),onStart:$b(o),onMove:r,onEnd:(n,s)=>{delete this.session,a&&we.postRender(()=>a(n,s))}}}mount(){this.removePointerDownListener=Dr(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 _n={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Vn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;let o=jb(e,t.target.x),r=jb(e,t.target.y);return`${o}% ${r}%`}};var Kb={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,a=vt.parse(e);if(a.length>5)return r;let n=vt.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 fp=!1,pp=class extends Rs{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:a}=this.props,{projection:n}=t;Vy(BN),n&&(o.group&&o.group.add(n),r&&r.register&&a&&r.register(n),fp&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),_n.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:a,isPresent:n}=this.props,{projection:s}=r;return s&&(s.isPresent=n,fp=!0,a||t.layoutDependency!==o||o===void 0||t.isPresent!==n?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||we.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ca.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:a}=t;fp=!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 rc(e){let[t,o]=Tu(),r=ae(cn);return d(pp,{...e,layoutGroup:r,switchLayoutGroup:ae(Bu),isPresent:t,safeToRemove:o})}var BN={borderRadius:{...Vn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vn,borderTopRightRadius:Vn,borderBottomLeftRadius:Vn,borderBottomRightRadius:Vn,boxShadow:Kb};function ac(e,t,o){let r=De(e)?e:Mt(e);return r.start(An("",r,t,o)),r.animation}var Xb=(e,t)=>e.depth-t.depth;var nc=class{constructor(){this.children=[],this.isDirty=!1}add(t){ua(this.children,t),this.isDirty=!0}remove(t){io(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Xb),this.isDirty=!1,this.children.forEach(t)}};function Yb(e,t){let o=Ze.now(),r=({timestamp:a})=>{let n=a-o;n>=t&&(gt(r),e(n-t))};return we.setup(r,!0),()=>gt(r)}var eC=["TopLeft","TopRight","BottomLeft","BottomRight"],HN=eC.length,Zb=e=>typeof e=="string"?parseFloat(e):e,Qb=e=>typeof e=="number"||de.test(e);function tC(e,t,o,r,a,n){a?(e.opacity=Re(0,o.opacity??1,UN(r)),e.opacityExit=Re(t.opacity??1,0,GN(r))):n&&(e.opacity=Re(t.opacity??1,o.opacity??1,r));for(let s=0;s<HN;s++){let i=`border${eC[s]}Radius`,l=Jb(t,i),u=Jb(o,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Qb(l)===Qb(u)?(e[i]=Math.max(Re(Zb(l),Zb(u),r),0),(ht.test(u)||ht.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||o.rotate)&&(e.rotate=Re(t.rotate||0,o.rotate||0,r))}function Jb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var UN=oC(0,.5,gi),GN=oC(.5,.95,Ke);function oC(e,t,o){return r=>r<e?0:r>t?1:o(zt(e,t,r))}function rC(e,t){e.min=t.min,e.max=t.max}function _t(e,t){rC(e.x,t.x),rC(e.y,t.y)}function mp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function aC(e,t,o,r,a){return e-=t,e=$i(e,1/o,r),a!==void 0&&(e=$i(e,1/a,r)),e}function zN(e,t=0,o=1,r=.5,a,n=e,s=e){if(ht.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=aC(e.min,t,o,i,a),e.max=aC(e.max,t,o,i,a)}function nC(e,t,[o,r,a],n,s){zN(e,t[o],t[r],t[a],t.scale,n,s)}var WN=["x","scaleX","originX"],qN=["y","scaleY","originY"];function gp(e,t,o,r){nC(e.x,t,WN,o?o.x:void 0,r?r.x:void 0),nC(e.y,t,qN,o?o.y:void 0,r?r.y:void 0)}function sC(e){return e.translate===0&&e.scale===1}function hp(e){return sC(e.x)&&sC(e.y)}function iC(e,t){return e.min===t.min&&e.max===t.max}function uC(e,t){return iC(e.x,t.x)&&iC(e.y,t.y)}function lC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function vp(e,t){return lC(e.x,t.x)&&lC(e.y,t.y)}function xp(e){return at(e.x)/at(e.y)}function yp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var sc=class{constructor(){this.members=[]}add(t){ua(this.members,t),t.scheduleRender()}remove(t){if(io(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 cC(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 Ma={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},bp=["","X","Y","Z"],$N=1e3,jN=0;function Cp(e,t,o,r){let{latestValues:a}=t;a[e]&&(o[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yC(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=$u(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:a,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",we,!(a||n))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&yC(r)}function ic({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},i=t?.()){this.id=jN++,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,Tt.value&&(Ma.nodes=Ma.calculatedTargetDeltas=Ma.calculatedProjections=0),this.nodes.forEach(YN),this.nodes.forEach(eO),this.nodes.forEach(tO),this.nodes.forEach(ZN),Tt.addProjectionMetrics&&Tt.addProjectionMetrics(Ma)},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 nc)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Wo),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=Sa(s)&&!Gi(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;we.read(()=>{f=window.innerWidth}),e(s,()=>{let m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,c&&c(),c=Yb(p,250),_n.hasAnimatedSinceResize&&(_n.hasAnimatedSinceResize=!1,this.nodes.forEach(pC)))})}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()||sO,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!vp(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={...xa(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||pC(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(),gt(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(oO),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&&yC(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(dC);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fC);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(JN),this.nodes.forEach(KN),this.nodes.forEach(XN)):this.nodes.forEach(fC),this.clearAllSnapshots();let i=Ze.now();Ye.delta=it(0,1e3/60,i-Ye.timestamp),Ye.timestamp=i,Ye.isProcessing=!0,wi.update.process(Ye),wi.preRender.process(Ye),wi.render.process(Ye),Ye.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ca.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(QN),this.sharedNodes.forEach(rO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!at(this.snapshot.measuredBox.x)&&!at(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&&!hp(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||Jo(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)),iO(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(lO))){let{scroll:u}=this.root;u&&(Er(i.x,u.offset.x),Er(i.y,u.offset.y))}return i}removeElementScroll(s){let i=He();if(_t(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&&_t(i,s),Er(i.x,c.offset.x),Er(i.y,c.offset.y))}return i}applyTransform(s,i=!1){let l=He();_t(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&&Pa(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Jo(c.latestValues)&&Pa(l,c.latestValues)}return Jo(this.latestValues)&&Pa(l,this.latestValues),l}removeTransform(s){let i=He();_t(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Jo(u.latestValues))continue;Gu(u.latestValues)&&u.updateSnapshot();let c=He(),f=u.measurePageBox();_t(c,f),gp(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Jo(this.latestValues)&&gp(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(),On(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),_t(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(),Eb(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_t(this.target,this.layout.layoutBox),sp(this.target,this.targetDelta)):_t(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(),On(this.relativeTargetOrigin,this.target,p.target),_t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Tt.value&&Ma.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||ap(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;_t(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;sb(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():(mp(this.prevProjectionDelta.x,this.projectionDelta.x),mp(this.prevProjectionDelta.y,this.projectionDelta.y)),Nn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!yp(this.projectionDelta.x,this.prevProjectionDelta.x)||!yp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Tt.value&&Ma.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=La(),this.projectionDelta=La(),this.projectionDeltaWithTransform=La()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=La();(!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(nO));this.animationProgress=0;let b;this.mixTargetDelta=R=>{let w=R/1e3;mC(f.x,s.x,w),mC(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(On(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aO(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&uC(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=He()),_t(b,this.relativeTarget)),g&&(this.animationValues=c,tC(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&&(gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{_n.hasAnimatedSinceResize=!0,uo.layout++,this.motionValue||(this.motionValue=Mt(0)),this.currentAnimation=ac(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onStop:()=>{uo.layout--},onComplete:()=>{uo.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($N),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&&bC(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||He();let f=at(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;let p=at(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+p}_t(i,l),Pa(i,c),Nn(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new sc),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&&Cp("z",s,u,this.animationValues);for(let c=0;c<bp.length;c++)Cp(`rotate${bp[c]}`,s,u,this.animationValues),Cp(`skew${bp[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=In(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=In(i?.pointerEvents)||""),this.hasProjected&&!Jo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=cC(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 Ia){if(c[h]===void 0)continue;let{correct:g,applyTo:v,isCSSVariable:x}=Ia[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?In(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(dC),this.root.sharedNodes.clear()}}}function KN(e){e.updateLayout()}function XN(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"?kt(c=>{let f=n?t.measuredBox[c]:t.layoutBox[c],p=at(f);f.min=o[c].min,f.max=f.min+p}):bC(a,t.layoutBox,o)&&kt(c=>{let f=n?t.measuredBox[c]:t.layoutBox[c],p=at(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=La();Nn(s,o,t.layoutBox);let i=La();n?Nn(i,e.applyTransform(r,!0),t.measuredBox):Nn(i,o,t.layoutBox);let l=!hp(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();On(m,t.layoutBox,f.layoutBox);let h=He();On(h,o,p.layoutBox),vp(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 YN(e){Tt.value&&Ma.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 ZN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function QN(e){e.clearSnapshot()}function dC(e){e.clearMeasurements()}function fC(e){e.isLayoutDirty=!1}function JN(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function eO(e){e.resolveTargetDelta()}function tO(e){e.calcProjection()}function oO(e){e.resetSkewAndRotation()}function rO(e){e.removeLeadSnapshot()}function mC(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 gC(e,t,o,r){e.min=Re(t.min,o.min,r),e.max=Re(t.max,o.max,r)}function aO(e,t,o,r){gC(e.x,t.x,o.x,r),gC(e.y,t.y,o.y,r)}function nO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var sO={duration:.45,ease:[.4,0,.1,1]},hC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vC=hC("applewebkit/")&&!hC("chrome/")?Math.round:Ke;function xC(e){e.min=vC(e.min),e.max=vC(e.max)}function iO(e){xC(e.x),xC(e.y)}function bC(e,t,o){return e==="position"||e==="preserve-aspect"&&!kb(xp(t),xp(o),.2)}function lO(e){return e!==e.root&&e.scroll?.wasRoot}var CC=ic({attachResizeListener:(e,t)=>er(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var wp={current:void 0},lc=ic({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wp.current){let e=new CC({});e.mount(window),e.setOptions({layoutScroll:!0}),wp.current=e}return wp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var wC={pan:{Feature:oc},drag:{Feature:tc,ProjectionNode:lc,MeasureLayout:rc}};function SC(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&&we.postRender(()=>n(t,tr(t)))}var uc=class extends lt{mount(){let{current:t}=this.node;t&&(this.unmount=Kf(t,(o,r)=>(SC(this.node,r,"Start"),a=>SC(this.node,a,"End"))))}unmount(){}};var cc=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=lo(er(this.node.current,"focus",()=>this.onFocus()),er(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function RC(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&&we.postRender(()=>n(t,tr(t)))}var dc=class extends lt{mount(){let{current:t}=this.node;t&&(this.unmount=Zf(t,(o,r)=>(RC(this.node,r,"Start"),(a,{success:n})=>RC(this.node,a,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var Rp=new WeakMap,Sp=new WeakMap,uO=e=>{let t=Rp.get(e.target);t&&t(e)},cO=e=>{e.forEach(uO)};function dO({root:e,...t}){let o=e||document;Sp.has(o)||Sp.set(o,{});let r=Sp.get(o),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(cO,{root:e,...t})),r[a]}function IC(e,t,o){let r=dO(t);return Rp.set(e,o),r.observe(e),()=>{Rp.delete(e),r.unobserve(e)}}var fO={some:0,all:1},fc=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:fO[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 IC(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(pO(t,o))&&this.startObserver()}unmount(){}};function pO({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var PC={inView:{Feature:fc},tap:{Feature:dc},focus:{Feature:cc},hover:{Feature:uc}};var LC={layout:{ProjectionNode:lc,MeasureLayout:rc}};var TC={...Sb,...PC,...wC,...LC};var _e=Qy(TC,mb);N();function Bn(e){let t=Eo(()=>Mt(e)),{isStatic:o}=ae(Tr);if(o){let[,r]=k(e);D(()=>t.on("change",r),[])}return t}function pc(e,t){let o=Bn(t()),r=()=>o.set(t());return r(),fn(()=>{let a=()=>we.preRender(r,!1,!0),n=e.map(s=>s.on("change",a));return()=>{n.forEach(s=>s()),gt(r)}}),o}function MC(e){ba.current=[],e();let t=pc(ba.current,e);return ba.current=void 0,t}function Ip(e,t,o,r){if(typeof e=="function")return MC(e);let a=typeof t=="function"?t:Qf(t,o,r);return Array.isArray(e)?kC(e,a):kC([e],([n])=>a(n))}function kC(e,t){let o=Eo(()=>[]);return pc(e,()=>{o.length=0;let r=e.length;for(let a=0;a<r;a++)o[a]=e[a].get();return t(o)})}function Yi(e){return typeof e=="object"&&!Array.isArray(e)}function mc(e,t,o,r){return typeof e=="string"&&Yi(t)?Bi(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function EC(e,t,o){return e*(t+1)}function Pp(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 mO(e,t,o){for(let r=0;r<e.length;r++){let a=e[r];a.at>t&&a.at<o&&(io(e,a),r--)}}function AC(e,t,o,r,a,n){mO(e,a,n);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Re(a,n,r[s]),easing:yi(o,s)})}function DC(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function NC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var gO="easeInOut",hO=20;function _C(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,Pp(f,h.at,c,u));continue}let[g,v,x={}]=h;x.at!==void 0&&(f=Pp(f,x.at,c,u));let y=0,b=(R,w,I,S=0,T=0)=>{let M=vO(R),{delay:A=0,times:O=Mi(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,ne=M.length,le=va(V)?V:a?.[V||"keyframes"];if(ne<=2&&le){let ee=100;if(ne===2&&bO(M)){let ie=M[1]-M[0];ee=Math.abs(ie)}let fe={...U};z!==void 0&&(fe.duration=et(z));let K=Pi(fe,ee,le);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&&Ti(O,te),M.length===1&&M.unshift(null),q){dt(q<hO,"Repeat count too high, must be less than 20","repeat-count-high"),z=EC(z,q);let ee=[...M],fe=[...O];G=Array.isArray(G)?[...G]:[G];let K=[...G];for(let ie=0;ie<q;ie++){M.push(...ee);for(let xe=0;xe<ee.length;xe++)O.push(fe[xe]+(ie+1)),G.push(xe===0?"linear":yi(K,xe-1))}DC(O,q)}let se=W+z;AC(I,M,G,O,W,se),y=Math.max(_+z,y),p=Math.max(se,p)};if(De(g)){let R=OC(g,i);b(v,x,FC("default",R))}else{let R=mc(g,v,r,l),w=R.length;for(let I=0;I<w;I++){v=v,x=x;let S=R[I],T=OC(S,i);for(let M in v)b(v[M],xO(x,M),FC(M,T),I,w)}}c=f,f+=y}return i.forEach((m,h)=>{for(let g in m){let v=m[g];v.sort(NC);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(zt(0,p,I)),b.push(T||"easeOut")}y[0]!==0&&(y.unshift(0),x.unshift(x[0]),b.unshift(gO)),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 OC(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function FC(e,t){return t[e]||(t[e]=[]),t[e]}function vO(e){return Array.isArray(e)?e:[e]}function xO(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var yO=e=>typeof e=="number",bO=e=>e.every(yO);function CO(e,t){return e in t}var gc=class extends Tn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(CO(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 VC(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=Sa(e)&&!Gi(e)?new En(t):new kn(t);o.mount(e),Ar.set(e,o)}function BC(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new gc(t);o.mount(e),Ar.set(e,o)}function wO(e,t){return De(e)||typeof e=="number"||typeof e=="string"&&!Yi(t)}function hc(e,t,o,r){let a=[];if(wO(e,t))a.push(ac(e,Yi(t)&&t.default||t,o&&(o.default||o)));else{let n=mc(e,t,r),s=n.length;dt(!!s,"No valid elements provided.","no-valid-elements");for(let i=0;i<s;i++){let l=n[i];dt(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?VC:BC;Ar.has(l)||u(l);let c=Ar.get(l),f={...o};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(i,s)),a.push(...Dn(c,{...t,transition:f},{}))}}return a}function HC(e,t,o){let r=[];return _C(e,t,o,{spring:$o}).forEach(({keyframes:n,transition:s},i)=>{r.push(...hc(i,n,s))}),r}function SO(e){return Array.isArray(e)&&e.some(Array.isArray)}function UC(e){function t(o,r,a){let n=[],s;if(SO(o))n=HC(o,r,e);else{let{onComplete:l,...u}=a||{};typeof l=="function"&&(s=l),n=hc(o,r,u,e)}let i=new Di(n);return s&&i.finished.then(s),e&&(e.animations.push(i),i.finished.then(()=>{io(e.animations,i)})),i}return t}var Lp=UC();var wse=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"}}),po={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}},vc={lift:{y:-2,transition:po.smooth},scale:{scale:1.05,transition:po.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:po.smooth},rotate:{rotate:2,transition:po.bouncy}},GC={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},Sse={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:po.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:po.smooth}},Rse={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:po.smooth}}},Ise={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:po.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:po.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:po.smooth}},zC={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var Pse={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:po.bouncy};var RO=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"}}),Tp={sm:"p-4",md:"p-6",lg:"p-8",xl:"p-10"},Hn=ce("md"),IO=e=>e&&e!=="default"?e:"md",WC=C(({className:e,variant:t,size:o,radius:r,interactive:a,asChild:n=!1,microInteraction:s="lift",...i},l)=>{let u=IO(o),c=L("moonui-theme",RO({variant:t,size:o,radius:r,interactive:a,className:e}));if(n)return d(Hn.Provider,{value:u,children:d(jl,{ref:l,className:c,...i})});if(a&&s!=="none"){let f={whileHover:s==="scale"?vc.scale:s==="glow"?vc.glow:vc.lift,whileTap:GC.scale};return d(Hn.Provider,{value:u,children:d(_e.div,{ref:l,className:c,...f,...i})})}return d(Hn.Provider,{value:u,children:d("div",{ref:l,className:c,...i})})});WC.displayName="Card";var qC=C(({className:e,...t},o)=>{let r=Tp[ae(Hn)];return d("div",{ref:o,className:L("moonui-theme","flex flex-col space-y-1.5",r,e),...t})});qC.displayName="CardHeader";var $C=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}));$C.displayName="CardTitle";var jC=C(({className:e,...t},o)=>d("p",{ref:o,className:L("moonui-theme","text-sm text-muted-foreground",e),...t}));jC.displayName="CardDescription";var KC=C(({className:e,...t},o)=>{let r=Tp[ae(Hn)];return d("div",{ref:o,className:L("moonui-theme",r,"pt-0",e),...t})});KC.displayName="CardContent";var XC=C(({className:e,...t},o)=>{let r=Tp[ae(Hn)];return d("div",{ref:o,className:L("moonui-theme","flex items-center",r,"pt-0",e),...t})});XC.displayName="CardFooter";N();function Se(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 ft(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function xc(e,t){let o=Se(e);if(isNaN(t))return ft(e,NaN);if(!t)return o;let r=o.getDate(),a=ft(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 PO=Math.pow(10,8)*24*60*60*1e3,Use=-PO,yc=6048e5,YC=864e5;var LO=3600;var ZC=LO*24,Gse=ZC*7,TO=ZC*365.2425,MO=TO/12,zse=MO*3;var kO={};function Oo(){return kO}function mo(e,t){let o=Oo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Se(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 ka(e){return mo(e,{weekStartsOn:1})}function bc(e){let t=Se(e),o=t.getFullYear(),r=ft(e,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);let a=ka(r),n=ft(e,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);let s=ka(n);return t.getTime()>=a.getTime()?o+1:t.getTime()>=s.getTime()?o:o-1}function Un(e){let t=Se(e);return t.setHours(0,0,0,0),t}function Mp(e){let t=Se(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 QC(e,t){let o=Un(e),r=Un(t),a=+o-Mp(o),n=+r-Mp(r);return Math.round((a-n)/YC)}function JC(e){let t=bc(e),o=ft(e,0);return o.setFullYear(t,0,4),o.setHours(0,0,0,0),ka(o)}function ew(e){return ft(e,Date.now())}function Ea(e,t){let o=Un(e),r=Un(t);return+o==+r}function tw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Cc(e){if(!tw(e)&&typeof e!="number")return!1;let t=Se(e);return!isNaN(Number(t))}function ow(e){let t=Se(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function wc(e,t){let o=Se(e.start),r=Se(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(Se(s)),s.setDate(s.getDate()+i),s.setHours(0,0,0,0);return a?l.reverse():l}function rw(e){let t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function aw(e){let t=Se(e),o=ft(e,0);return o.setFullYear(t.getFullYear(),0,1),o.setHours(0,0,0,0),o}function nw(e,t){let o=Oo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Se(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 EO={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"}},sw=(e,t,o)=>{let r,a=EO[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 Sc(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var AO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},DO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},NO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iw={date:Sc({formats:AO,defaultWidth:"full"}),time:Sc({formats:DO,defaultWidth:"full"}),dateTime:Sc({formats:NO,defaultWidth:"full"})};var OO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lw=(e,t,o,r)=>OO[e];function Gn(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 FO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_O={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VO={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"]},BO={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"]},HO={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"}},UO={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"}},GO=(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"},uw={ordinalNumber:GO,era:Gn({values:FO,defaultWidth:"wide"}),quarter:Gn({values:_O,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gn({values:VO,defaultWidth:"wide"}),day:Gn({values:BO,defaultWidth:"wide"}),dayPeriod:Gn({values:HO,defaultWidth:"wide",formattingValues:UO,defaultFormattingWidth:"wide"})};function zn(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)?WO(i,f=>f.test(s)):zO(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 zO(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function WO(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function cw(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 qO=/^(\d+)(th|st|nd|rd)?/i,$O=/\d+/i,jO={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},KO={any:[/^b/i,/^(a|c)/i]},XO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YO={any:[/1/i,/2/i,/3/i,/4/i]},ZO={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},QO={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]},JO={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},e2={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]},t2={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},o2={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}},dw={ordinalNumber:cw({matchPattern:qO,parsePattern:$O,valueCallback:e=>parseInt(e,10)}),era:zn({matchPatterns:jO,defaultMatchWidth:"wide",parsePatterns:KO,defaultParseWidth:"any"}),quarter:zn({matchPatterns:XO,defaultMatchWidth:"wide",parsePatterns:YO,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zn({matchPatterns:ZO,defaultMatchWidth:"wide",parsePatterns:QO,defaultParseWidth:"any"}),day:zn({matchPatterns:JO,defaultMatchWidth:"wide",parsePatterns:e2,defaultParseWidth:"any"}),dayPeriod:zn({matchPatterns:t2,defaultMatchWidth:"any",parsePatterns:o2,defaultParseWidth:"any"})};var kp={code:"en-US",formatDistance:sw,formatLong:iw,formatRelative:lw,localize:uw,match:dw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function fw(e){let t=Se(e);return QC(t,aw(t))+1}function pw(e){let t=Se(e),o=+ka(t)-+JC(t);return Math.round(o/yc)+1}function Rc(e,t){let o=Se(e),r=o.getFullYear(),a=Oo(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=ft(e,0);s.setFullYear(r+1,0,n),s.setHours(0,0,0,0);let i=mo(s,t),l=ft(e,0);l.setFullYear(r,0,n),l.setHours(0,0,0,0);let u=mo(l,t);return o.getTime()>=i.getTime()?r+1:o.getTime()>=u.getTime()?r:r-1}function mw(e,t){let o=Oo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Rc(e,t),n=ft(e,0);return n.setFullYear(a,0,r),n.setHours(0,0,0,0),mo(n,t)}function gw(e,t){let o=Se(e),r=+mo(o,t)-+mw(o,t);return Math.round(r/yc)+1}function Ne(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var or={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 Wn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ep={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 or.y(e,t)},Y:function(e,t,o,r){let a=Rc(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 or.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=gw(e,r);return t==="wo"?o.ordinalNumber(a,{unit:"week"}):Ne(a,t.length)},I:function(e,t,o){let r=pw(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"}):or.d(e,t)},D:function(e,t,o){let r=fw(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=Wn.noon:r===0?a=Wn.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=Wn.evening:r>=12?a=Wn.afternoon:r>=4?a=Wn.morning:a=Wn.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 or.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):or.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"}):or.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):or.s(e,t)},S:function(e,t){return or.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vw(r);case"XXXX":case"XX":return Aa(r);case"XXXXX":case"XXX":default:return Aa(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return vw(r);case"xxxx":case"xx":return Aa(r);case"xxxxx":case"xxx":default:return Aa(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hw(r,":");case"OOOO":default:return"GMT"+Aa(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hw(r,":");case"zzzz":default:return"GMT"+Aa(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 hw(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 vw(e,t){return e%60===0?(e>0?"-":"+")+Ne(Math.abs(e)/60,2):Aa(e,t)}function Aa(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 xw=(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"})}},yw=(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"})}},r2=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],a=o[2];if(!a)return xw(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}}",xw(r,t)).replace("{{time}}",yw(a,t))},bw={p:yw,P:r2};var a2=/^D+$/,n2=/^Y+$/,s2=["D","DD","YY","YYYY"];function Cw(e){return a2.test(e)}function ww(e){return n2.test(e)}function Sw(e,t,o){let r=i2(e,t,o);if(console.warn(r),s2.includes(e))throw new RangeError(r)}function i2(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 l2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,c2=/^'([^]*?)'?$/,d2=/''/g,f2=/[a-zA-Z]/;function go(e,t,o){let r=Oo(),a=o?.locale??r.locale??kp,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=Se(e);if(!Cc(i))throw new RangeError("Invalid time value");let l=t.match(u2).map(c=>{let f=c[0];if(f==="p"||f==="P"){let p=bw[f];return p(c,a.formatLong)}return c}).join("").match(l2).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let f=c[0];if(f==="'")return{isToken:!1,value:p2(c)};if(Ep[f])return{isToken:!0,value:c};if(f.match(f2))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&&ww(f)||!o?.useAdditionalDayOfYearTokens&&Cw(f))&&Sw(f,t,String(e));let p=Ep[f[0]];return p(i,f,a.localize,u)}).join("")}function p2(e){let t=e.match(c2);return t?t[1].replace(d2,"'"):e}function Ap(e){return Se(e).getDay()}function Rw(e,t){let o=Se(e),r=Se(t);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function Iw(e){return Ea(e,ew(e))}function Pw(e,t){return xc(e,-t)}function Zi({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(Pw(c,1))},h=()=>{f(xc(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 Ea(I,t);if(e==="range"){let S=t;return S.from&&S.to?I>=S.from&&I<=S.to:S.from?Ea(I,S.from):!1}return!1},x=I=>{if(e!=="range"||!t)return!1;let S=t;return S.from?Ea(I,S.from):!1},y=I=>{if(e!=="range"||!t)return!1;let S=t;return S.to?Ea(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=rw(c),S=ow(c),T=wc({start:I,end:S}),M=Ap(I),A=[];if(M>0&&a){let F=mo(I),$=new Date(I);$.setDate($.getDate()-1),A.push(...wc({start:F,end:$}))}let O=Ap(S),V=[];if(O<6&&a){let F=new Date(S);F.setDate(F.getDate()+1);let $=nw(S);V.push(...wc({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(no,{className:"h-5 w-5"})}),d("h2",{className:"text-base font-medium",children:go(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(wt,{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=!Rw(I,c),M=r?.(I)||!1,A=v(I),O=Iw(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:go(I,"d")},I.toISOString())})})]})]})}Zi.displayName="Calendar";N();var m2=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"},Lw=(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},Tw=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=m2(f);l(p);let m=p==="amex"?15:16,h=f.slice(0,m),g=Lw(h,p);o?.(h,p),c.target.value=g};return P("div",{className:"relative",children:[d(xt,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:Lw(t,i),onChange:u,className:L(r&&"pl-10",e),...n}),r&&d(Bs,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});Tw.displayName="CardNumberInput";var Mw=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(xt,{ref:n,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:i,onChange:s,className:e,...a})});Mw.displayName="CardExpiryInput";var kw=C(({className:e,value:t="",onChange:o,cardType:r="unknown",size:a,...n},s)=>{let i=r==="amex"?4:3;return d(xt,{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})});kw.displayName="CardCVCInput";var Ew=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(xt,{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})});Ew.displayName="CardZipInput";N();N();function g2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Aw(e){return g2(e)||Array.isArray(e)}function Nw(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ic(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}`:!Aw(i)||!Aw(l)?i===l:Ic(i,l)})}function Dw(e){return e.concat().sort((t,o)=>t.name>o.name?1:-1).map(t=>t.options)}function Ow(e,t){if(e.length!==t.length)return!1;let o=Dw(e),r=Dw(t);return o.every((a,n)=>{let s=r[n];return Ic(a,s)})}function Op(e){return typeof e=="number"}function Dp(e){return typeof e=="string"}function Pc(e){return typeof e=="boolean"}function Fw(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xe(e){return Math.abs(e)}function Fp(e){return Math.sign(e)}function Ji(e,t){return Xe(e-t)}function h2(e,t){if(e===0||t===0||Xe(e)<=Xe(t))return 0;let o=Ji(Xe(e),Xe(t));return Xe(o/e)}function v2(e){return Math.round(e*100)/100}function el(e){return tl(e).map(Number)}function ho(e){return e[rl(e)]}function rl(e){return Math.max(0,e.length-1)}function _p(e,t){return t===rl(e)}function _w(e,t=0){return Array.from(Array(e),(o,r)=>t+r)}function tl(e){return Object.keys(e)}function Vw(e,t){return[e,t].reduce((o,r)=>(tl(r).forEach(a=>{let n=o[a],s=r[a],i=Fw(n)&&Fw(s);o[a]=i?Vw(n,s):s}),o),{})}function Np(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function x2(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 Dp(e)?o[e](l):e(t,l,u)}return{measure:s}}function ol(){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 y2(e,t,o,r){let a=ol(),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 b2(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 Da(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 Bw(e,t,o){let{constrain:r}=Da(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 Bw(e,i(),o)}let f={get:i,set:l,add:u,clone:c};return f}function C2(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=ol(),T=ol(),M=Da(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 ne(J){if(!y)return;function be(ue){(Pc(y)||y(J,ue))&&fe(ue)}let re=t;S.add(re,"dragstart",ue=>ue.preventDefault(),I).add(re,"touchmove",()=>{},I).add(re,"touchend",()=>{}).add(re,"touchstart",be).add(re,"mousedown",be).add(re,"touchcancel",ie).add(re,"contextmenu",ie).add(re,"click",xe,!0)}function le(){S.clear(),T.clear()}function W(){let J=_?o:t;T.add(J,"touchmove",K,I).add(J,"touchend",ie).add(J,"mousemove",K,I).add(J,"mouseup",ie)}function te(J){let be=J.nodeName||"";return w.includes(be)}function se(){return(h?O:A)[_?"mouse":"touch"]}function ee(J,be){let re=f.add(Fp(J)*-1),ue=c.byDistance(J,!h).distance;return h||Xe(J)<M?ue:v&&be?ue*.5:c.byIndex(re.get(),0).distance}function fe(J){let be=Np(J,r);_=be,z=h&&be&&!J.buttons&&q,q=Ji(a.get(),s.get())>=2,!(be&&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(!Np(J,r)&&J.touches.length>=2)return ie(J);let re=n.readPoint(J),ue=n.readPoint(J,b),Oe=Ji(re,F),Ue=Ji(ue,$);if(!G&&!_&&(!J.cancelable||(G=Oe>Ue,!G)))return ie(J);let tt=n.pointerMove(J);Oe>g&&(z=!0),u.useFriction(.3).useDuration(.75),i.start(),a.add(R(tt)),J.preventDefault()}function ie(J){let re=c.byDistance(0,!1).index!==f.get(),ue=n.pointerUp(J)*se(),Oe=ee(R(ue),re),Ue=h2(ue,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 xe(J){z&&(J.stopPropagation(),J.preventDefault(),z=!1)}function ye(){return U}return{init:ne,destroy:le,pointerDown:ye}}function w2(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(Np(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 S2(){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 R2(e){function t(r){return e*(r/100)}return{measure:t}}function I2(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=>{(Pc(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 P2(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=Fp(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 L2(e,t,o,r,a){let n=a.measure(10),s=a.measure(50),i=Da(.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 T2(e,t,o,r,a){let n=Da(-t+e,0),s=f(),i=c(),l=p();function u(h,g){return Ji(h,g)<=1}function c(){let h=s[0],g=ho(s),v=s.lastIndexOf(h),x=s.indexOf(g)+1;return Da(v,x)}function f(){return o.map((h,g)=>{let{min:v,max:x}=n,y=n.constrain(h),b=!g,R=_p(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 M2(e,t,o){let r=t[0],a=o?r-e:ho(t);return{limit:Da(a,r)}}function k2(e,t,o,r){let n=t.min+.1,s=t.max+.1,{reachedMin:i,reachedMax:l}=Da(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 E2(e){let{max:t,length:o}=e;function r(n){let s=n-t;return o?s/-o:0}return{get:r}}function A2(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=>ho(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 D2(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=_p(v,g);if(x){let b=ho(v[0])+1;return _w(b)}if(y){let b=rl(n)-ho(v)[0]+1;return _w(b,ho(v)[0])}return h})}return{slideRegistry:u}}function N2(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=>Fp(y)===g);return x.length?l(x):ho(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 O2(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 F2(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));Op(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=>{(Pc(i)||i(m,x))&&h(v)},l)})}function f(m){m.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Qi(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 Op(l)?l:l.get()}return{get:o,set:r,add:a,subtract:n}}function Hw(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=v2(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 _2(e,t,o,r,a,n,s,i,l){let c=el(a),f=el(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:Qi(-1),translate:Hw(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 V2(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||(Pc(o)||o(l,c))&&u(c)}),r.observe(e,{childList:!0})}function s(){r&&r.disconnect(),a=!0}return{init:n,destroy:s}}function B2(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 tl(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 H2(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(ho(r));return parseFloat(y.getPropertyValue(`margin-${l}`))}function v(){return o.map((y,b,R)=>{let w=!b,I=_p(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 U2(e,t,o,r,a,n,s,i,l){let{startEdge:u,endEdge:c,direction:f}=e,p=Op(o);function m(x,y){return el(x).filter(b=>b%y===0).map(b=>x.slice(b,b+y))}function h(x){return x.length?el(x).reduce((y,b,R)=>{let w=ho(y)||0,I=w===0,S=b===rl(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 G2(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=S2(),M=T.measure(t),A=o.map(T.measure),O=b2(l,u),V=O.measureSize(M),q=R2(V),F=x2(i,V),$=!f&&!!y,U=f||!!y,{slideSizes:G,slideSizesWithGaps:z,startGap:_,endGap:ne}=H2(O,M,A,o,U,a),le=U2(O,V,v,f,M,A,_,ne,S),{snaps:W,snapsAligned:te}=A2(O,F,M,A,le),se=-ho(W)+ho(z),{snapsContained:ee,scrollContainLimit:fe}=T2(V,se,te,y,S),K=$?ee:te,{limit:ie}=M2(se,K,f),xe=Bw(rl(K),c,f),ye=xe.clone(),ge=el(o),J=({dragHandler:gr,scrollBody:Cs,scrollBounds:ws,options:{loop:Ut}})=>{Ut||ws.constrain(gr.pointerDown()),Cs.seek()},be=({scrollBody:gr,translate:Cs,location:ws,offsetLocation:Ut,previousLocation:Ss,scrollLooper:Yd,slideLooper:$k,dragHandler:jk,animation:Kk,eventHandler:sv,scrollBounds:Xk,options:{loop:iv}},lv)=>{let uv=gr.settled(),Yk=!Xk.shouldConstrain(),cv=iv?uv:uv&&Yk,dv=cv&&!jk.pointerDown();dv&&Kk.stop();let Zk=ws.get()*lv+Ss.get()*(1-lv);Ut.set(Zk),iv&&(Yd.loop(gr.direction()),$k.loop()),Cs.to(Ut.get()),dv&&sv.emit("settle"),cv||sv.emit("scroll")},re=y2(r,a,()=>J(Xa),gr=>be(Xa,gr)),ue=.68,Oe=K[xe.get()],Ue=Qi(Oe),tt=Qi(Oe),Me=Qi(Oe),Qe=Qi(Oe),Ro=P2(Ue,Me,tt,Qe,p,ue),Ct=N2(f,K,se,ie,Qe),oo=O2(re,xe,ye,Ro,Ct,Qe,s),Ht=E2(ie),ro=ol(),Io=B2(t,o,s,g),{slideRegistry:Po}=D2($,y,K,fe,le,ge),ql=F2(e,o,Po,oo,Ro,ro,s,I),Xa={ownerDocument:r,ownerWindow:a,eventHandler:s,containerRect:M,slideRects:A,animation:re,axis:O,dragHandler:C2(O,e,r,a,Qe,w2(O,a),Ue,re,oo,Ro,Ct,xe,s,q,m,h,x,ue,w),eventStore:ro,percentOfView:q,index:xe,indexPrevious:ye,limit:ie,location:Ue,offsetLocation:Me,previousLocation:tt,options:n,resizeHandler:I2(t,s,a,o,O,b,T),scrollBody:Ro,scrollBounds:L2(ie,Me,Qe,Ro,q),scrollLooper:k2(se,ie,Me,[Ue,Me,tt,Qe]),scrollProgress:Ht,scrollSnapList:K.map(Ht.get),scrollSnaps:K,scrollTarget:Ct,scrollTo:oo,slideLooper:_2(O,V,se,G,z,W,K,Me,o),slideFocus:ql,slidesHandler:V2(t,s,R),slidesInView:Io,slideIndexes:ge,slideRegistry:Po,slidesToScroll:le,target:Qe,translate:Hw(O,t)};return Xa}function z2(){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 W2={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 q2(e){function t(n,s){return Vw(n,s||{})}function o(n){let s=n.breakpoints||{},i=tl(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=>tl(s.breakpoints||{})).reduce((s,i)=>s.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:o,optionsMediaQueries:r}}function $2(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 al(e,t,o){let r=e.ownerDocument,a=r.defaultView,n=q2(a),s=$2(n),i=ol(),l=z2(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:f}=n,{on:p,off:m,emit:h}=l,g=O,v=!1,x,y=u(W2,al.globalOptions),b=u(y),R=[],w,I,S;function T(){let{container:ge,slides:J}=b;I=(Dp(ge)?e.querySelector(ge):ge)||e.children[0];let re=Dp(J)?I.querySelectorAll(J):J;S=[].slice.call(re||I.children)}function M(ge){let J=G2(e,I,S,r,a,ge,l);if(ge.loop&&!J.slideLooper.canLoop()){let be=Object.assign({},ge,{loop:!1});return M(be)}return J}function A(ge,J){v||(y=u(y,ge),b=c(y),R=J||R,T(),x=M(b),f([y,...R.map(({options:be})=>be)]).forEach(be=>i.add(be,"change",O)),b.active&&(x.translate.to(x.location.get()),x.animation.init(),x.slidesInView.init(),x.slideFocus.init(ye),x.eventHandler.init(ye),x.resizeHandler.init(ye),x.slidesHandler.init(ye),x.options.loop&&x.slideLooper.loop(),I.offsetParent&&S.length&&x.dragHandler.init(ye),w=s.init(ye,R)))}function O(ge,J){let be=le();V(),A(u({startIndex:be},ge),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(ge,J,be){!b.active||v||(x.scrollBody.useBaseFriction().useDuration(J===!0?0:b.duration),x.scrollTo.index(ge,be||0))}function $(ge){let J=x.index.add(1).get();F(J,ge,-1)}function U(ge){let J=x.index.add(-1).get();F(J,ge,1)}function G(){return x.index.add(1).get()!==le()}function z(){return x.index.add(-1).get()!==le()}function _(){return x.scrollSnapList}function ne(){return x.scrollProgress.get(x.offsetLocation.get())}function le(){return x.index.get()}function W(){return x.indexPrevious.get()}function te(){return x.slidesInView.get()}function se(){return x.slidesInView.get(!1)}function ee(){return w}function fe(){return x}function K(){return e}function ie(){return I}function xe(){return S}let ye={canScrollNext:G,canScrollPrev:z,containerNode:ie,internalEngine:fe,destroy:q,off:m,on:p,emit:h,plugins:ee,previousScrollSnap:W,reInit:g,rootNode:K,scrollNext:$,scrollPrev:U,scrollProgress:ne,scrollSnapList:_,scrollTo:F,selectedScrollSnap:le,slideNodes:xe,slidesInView:te,slidesNotInView:se};return A(t,o),setTimeout(()=>l.emit("init"),0),ye}al.globalOptions=void 0;function Lc(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(()=>{Ic(o.current,e)||(o.current=e,l())},[e,l]),D(()=>{Ow(r.current,t)||(r.current=t,l())},[t,l]),D(()=>{if(Nw()&&s){al.globalOptions=Lc.globalOptions;let u=al(s,o.current,r.current);return n(u),()=>u.destroy()}else n(void 0)},[s,n]),[i,a]}Lc.globalOptions=void 0;var Uw=ce(null);function nl(){let e=ae(Uw);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Gw=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]=Lc({...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(Uw.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}`:""})]})})});Gw.displayName="Carousel";var zw=Q("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),Ww=C(({className:e,...t},o)=>{let{carouselRef:r,orientation:a}=nl();return d("div",{ref:r,className:"overflow-hidden",children:d("div",{ref:o,className:L(zw({orientation:a}),e),...t})})});Ww.displayName="CarouselContent";var qw=Q("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),$w=C(({className:e,...t},o)=>{let{orientation:r}=nl();return d("div",{ref:o,role:"group","aria-roledescription":"slide",className:L(qw({orientation:r}),e),...t})});$w.displayName="CarouselItem";var jw=C(({className:e,variant:t="outline",size:o="icon-sm",...r},a)=>{let{orientation:n,scrollPrev:s,canScrollPrev:i}=nl();return P(Te,{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(As,{className:"h-4 w-4","aria-hidden":"true"}),d("span",{className:"sr-only",children:"Previous slide"})]})});jw.displayName="CarouselPrevious";var Kw=C(({className:e,variant:t="outline",size:o="icon-sm",...r},a)=>{let{orientation:n,scrollNext:s,canScrollNext:i}=nl();return P(Te,{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(Ds,{className:"h-4 w-4","aria-hidden":"true"}),d("span",{className:"sr-only",children:"Next slide"})]})});Kw.displayName="CarouselNext";N();N();N();function qn(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 $n(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 Tc="Checkbox",[j2,Oue]=ke(Tc),[K2,Vp]=j2(Tc);function X2(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:Tc}),[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:Nr(a)?!1:a,isFormControl:b,bubbleInput:v,setBubbleInput:x};return d(K2,{scope:t,...R,children:Y2(f)?f(R):r})}var Xw="CheckboxTrigger",Yw=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}=Vp(Xw,e),g=pe(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":Nr(l)?"mixed":l,"aria-required":u,"data-state":eS(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=>Nr(y)?!0:!y),h&&m&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})})});Yw.displayName=Xw;var Mc=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(X2,{__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(Yw,{...f,ref:t,__scopeCheckbox:o}),p&&d(Jw,{__scopeCheckbox:o})]})})});Mc.displayName=Tc;var Zw="CheckboxIndicator",Bp=C((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...a}=e,n=Vp(Zw,o);return d($e,{present:r||Nr(n.checked)||n.checked===!0,children:d(Y.span,{"data-state":eS(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Bp.displayName=Zw;var Qw="CheckboxBubbleInput",Jw=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}=Vp(Qw,e),h=pe(o,m),g=qn(n),v=$n(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=Nr(n),w.call(y,Nr(n)?!1:n),y.dispatchEvent(S)}},[p,g,n,a]);let x=E(Nr(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%)"}})});Jw.displayName=Qw;function Y2(e){return typeof e=="function"}function Nr(e){return e==="indeterminate"}function eS(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}var Q2=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"}}),Hp=C(({className:e,variant:t,size:o,radius:r,animation:a,indeterminate:n=!1,icon:s,checked:i,...l},u)=>d(Mc,{ref:u,checked:n?"indeterminate":i,className:L("moonui-theme",Q2({variant:t,size:o,radius:r,animation:a}),e),...l,children:d(Bp,{className:L("flex items-center justify-center text-current",a==="bounce"&&"data-[state=checked]:animate-bounce"),children:n?d(Xs,{className:"h-[65%] w-[65%]"}):s||d(pt,{className:"h-[65%] w-[65%]"})})}));Hp.displayName=Mc.displayName;var tS=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}));tS.displayName="CheckboxGroup";var kc=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}));kc.displayName="CheckboxLabel";var oS=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(kc,{htmlFor:i,position:"start",disabled:a.disabled,className:r,children:t}),d(Hp,{ref:n,id:i,...a}),o==="end"&&d(kc,{htmlFor:i,position:"end",disabled:a.disabled,className:r,children:t})]})});oS.displayName="CheckboxWithLabel";N();var J2=Yl,rS=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"}}),aS=C(({className:e,children:t,variant:o,size:r,asChild:a,...n},s)=>a?d(Za,{ref:s,className:L("moonui-theme",rS({variant:o,size:r}),e),asChild:a,...n,children:t}):P(Za,{ref:s,className:L("moonui-theme",rS({variant:o,size:r}),e),...n,children:[t,d(Mo,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));aS.displayName=Za.displayName;var eF=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"}}),nS=C(({className:e,children:t,variant:o,size:r,...a},n)=>d(Ls,{ref:n,className:L("moonui-theme",eF({variant:o,size:r}),e),...a,children:d("div",{className:"p-4",children:t})}));nS.displayName=Ls.displayName;N();N();var tF=Q("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),oF=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}}),xt=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 ne=m||i||l,le=i?"error":l?"success":"normal";return P("div",{className:"space-y-1.5 w-full",children:[P("div",{className:L("moonui-theme",tF({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(ot,{className:"h-4 w-4 animate-spin"}):c}),d("input",{className:L(oF({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(ot,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),ne&&d("p",{className:L("text-xs transition-all",le==="error"&&"text-error",le==="success"&&"text-success",le==="normal"&&"text-muted-foreground",o),id:i?`${A}-error`:l?`${A}-success`:void 0,children:i||l||""})]})});xt.displayName="Input";N();N();var rF="Label",sS=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())}}));sS.displayName=rF;var Up=sS;var nF=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"),Et=C(({className:e,...t},o)=>d(Up,{ref:o,className:L(nF(),e),...t}));Et.displayName=Up.displayName;N();N();N();N();function iS(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 sF="DismissableLayer",Gp="dismissableLayer.update",iF="dismissableLayer.pointerDownOutside",lF="dismissableLayer.focusOutside",lS,cS=ce({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qt=C((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:s,onDismiss:i,...l}=e,u=ae(cS),[c,f]=k(null),p=c?.ownerDocument??globalThis?.document,[,m]=k({}),h=pe(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=cF(S=>{let T=S.target,M=[...u.branches].some(A=>A.contains(T));!R||M||(a?.(S),s?.(S),S.defaultPrevented||i?.())},p),I=dF(S=>{let T=S.target;[...u.branches].some(A=>A.contains(T))||(n?.(S),s?.(S),S.defaultPrevented||i?.())},p);return iS(S=>{y===u.layers.size-1&&(r?.(S),!S.defaultPrevented&&i&&(S.preventDefault(),i()))},p),D(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lS=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),uS(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=lS)}},[c,p,o,u]),D(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),uS())},[c,u]),D(()=>{let S=()=>m({});return document.addEventListener(Gp,S),()=>document.removeEventListener(Gp,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)})});qt.displayName=sF;var uF="DismissableLayerBranch",dS=C((e,t)=>{let o=ae(cS),r=E(null),a=pe(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})});dS.displayName=uF;function cF(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(){fS(iF,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 dF(e,t=globalThis?.document){let o=ze(e),r=E(!1);return D(()=>{let a=n=>{n.target&&!r.current&&fS(lF,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 uS(){let e=new CustomEvent(Gp);document.dispatchEvent(e)}function fS(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?Ya(a,n):a.dispatchEvent(n)}var pS=qt,mS=dS;N();var zp=0;function Or(){D(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gS()),document.body.insertAdjacentElement("beforeend",e[1]??gS()),zp++,()=>{zp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zp--}},[])}function gS(){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 Wp="focusScope.autoFocusOnMount",qp="focusScope.autoFocusOnUnmount",hS={bubbles:!1,cancelable:!0},pF="FocusScope",rr=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=pe(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:Fr(f.current,{select:!0})},b=function(I){if(m.paused||!i)return;let S=I.relatedTarget;S!==null&&(i.contains(S)||Fr(f.current,{select:!0}))},R=function(I){if(document.activeElement===document.body)for(let T of I)T.removedNodes.length>0&&Fr(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){xS.add(m);let g=document.activeElement;if(!i.contains(g)){let x=new CustomEvent(Wp,hS);i.addEventListener(Wp,u),i.dispatchEvent(x),x.defaultPrevented||(mF(yF(bS(i)),{select:!0}),document.activeElement===g&&Fr(i))}return()=>{i.removeEventListener(Wp,u),setTimeout(()=>{let x=new CustomEvent(qp,hS);i.addEventListener(qp,c),i.dispatchEvent(x),x.defaultPrevented||Fr(g??document.body,{select:!0}),i.removeEventListener(qp,c),xS.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]=gF(y);b&&R?!g.shiftKey&&x===R?(g.preventDefault(),o&&Fr(b,{select:!0})):g.shiftKey&&x===b&&(g.preventDefault(),o&&Fr(R,{select:!0})):x===y&&g.preventDefault()}},[o,r,m.paused]);return d(Y.div,{tabIndex:-1,...s,ref:p,onKeyDown:h})});rr.displayName=pF;function mF(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(Fr(r,{select:t}),document.activeElement!==o)return}function gF(e){let t=bS(e),o=vS(t,e),r=vS(t.reverse(),e);return[o,r]}function bS(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 vS(e,t){for(let o of e)if(!hF(o,{upTo:t}))return o}function hF(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 vF(e){return e instanceof HTMLInputElement&&"select"in e}function Fr(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&vF(e)&&t&&e.select()}}var xS=xF();function xF(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=yS(e,t),e.unshift(t)},remove(t){e=yS(e,t),e[0]?.resume()}}}function yS(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function yF(e){return e.filter(t=>t.tagName!=="A")}N();var SS=["top","right","bottom","left"];var Fo=Math.min,St=Math.max,il=Math.round,ll=Math.floor,vo=e=>({x:e,y:e}),bF={left:"right",right:"left",bottom:"top",top:"bottom"},CF={start:"end",end:"start"};function Ac(e,t,o){return St(e,Fo(t,o))}function _o(e,t){return typeof e=="function"?e(t):e}function Vo(e){return e.split("-")[0]}function Na(e){return e.split("-")[1]}function Dc(e){return e==="x"?"y":"x"}function Nc(e){return e==="y"?"height":"width"}var wF=new Set(["top","bottom"]);function xo(e){return wF.has(Vo(e))?"y":"x"}function Oc(e){return Dc(xo(e))}function RS(e,t,o){o===void 0&&(o=!1);let r=Na(e),a=Oc(e),n=Nc(a),s=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=sl(s)),[s,sl(s)]}function IS(e){let t=sl(e);return[Ec(e),t,Ec(t)]}function Ec(e){return e.replace(/start|end/g,t=>CF[t])}var CS=["left","right"],wS=["right","left"],SF=["top","bottom"],RF=["bottom","top"];function IF(e,t,o){switch(e){case"top":case"bottom":return o?t?wS:CS:t?CS:wS;case"left":case"right":return t?SF:RF;default:return[]}}function PS(e,t,o,r){let a=Na(e),n=IF(Vo(e),o==="start",r);return a&&(n=n.map(s=>s+"-"+a),t&&(n=n.concat(n.map(Ec)))),n}function sl(e){return e.replace(/left|right|bottom|top/g,t=>bF[t])}function PF(e){return{top:0,right:0,bottom:0,left:0,...e}}function $p(e){return typeof e!="number"?PF(e):{top:e,right:e,bottom:e,left:e}}function Oa(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 LS(e,t,o){let{reference:r,floating:a}=e,n=xo(t),s=Oc(t),i=Nc(s),l=Vo(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(Na(t)){case"start":m[s]-=p*(o&&u?-1:1);break;case"end":m[s]+=p*(o&&u?-1:1);break}return m}var kS=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}=LS(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}=LS(u,p,l)),g=-1)}return{x:c,y:f,placement:p,strategy:a,middlewareData:m}};async function jn(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}=_o(t,e),h=$p(m),v=i[p?f==="floating"?"reference":"floating":f],x=Oa(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=Oa(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 ES=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}=_o(e,t)||{};if(u==null)return{};let f=$p(c),p={x:o,y:r},m=Oc(a),h=Nc(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=Fo(f[x],M),O=Fo(f[y],M),V=A,q=S-g[h]-O,F=S/2-g[h]/2+T,$=Ac(V,F,q),U=!l.arrow&&Na(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 AS=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}=_o(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};let x=Vo(a),y=xo(i),b=Vo(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=p||(b||!g?[sl(i)]:IS(i)),I=h!=="none";!p&&I&&w.push(...PS(i,g,h,R));let S=[i,...w],T=await jn(t,v),M=[],A=((r=n.flip)==null?void 0:r.overflows)||[];if(c&&M.push(T[x]),f){let F=RS(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!==xo($):!1)||A.every(z=>xo(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 _=xo(z.placement);return _===y||_==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(_=>_>0).reduce((_,ne)=>_+ne,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 TS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MS(e){return SS.some(t=>e[t]>=0)}var DS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...a}=_o(e,t);switch(r){case"referenceHidden":{let n=await jn(t,{...a,elementContext:"reference"}),s=TS(n,o.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:MS(s)}}}case"escaped":{let n=await jn(t,{...a,altBoundary:!0}),s=TS(n,o.floating);return{data:{escapedOffsets:s,escaped:MS(s)}}}default:return{}}}}};var NS=new Set(["left","top"]);async function LF(e,t){let{placement:o,platform:r,elements:a}=e,n=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=Vo(o),i=Na(o),l=xo(o)==="y",u=NS.has(s)?-1:1,c=n&&l?-1:1,f=_o(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 OS=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 LF(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}}}}},FS=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}=_o(e,t),u={x:o,y:r},c=await jn(t,l),f=xo(Vo(a)),p=Dc(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=Ac(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=Ac(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}}}}}},_S=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}=_o(e,t),c={x:o,y:r},f=xo(a),p=Dc(f),m=c[p],h=c[f],g=_o(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=NS.has(Vo(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}}}},VS=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}=_o(e,t),c=await jn(t,u),f=Vo(a),p=Na(a),m=xo(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=Fo(g-c[v],y),w=Fo(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=St(c.left,0),O=St(c.right,0),V=St(c.top,0),q=St(c.bottom,0);m?T=h-2*(A!==0||O!==0?A+O:St(c.left,c.right)):S=g-2*(V!==0||q!==0?V+q:St(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 Fc(){return typeof window<"u"}function _a(e){return HS(e)?(e.nodeName||"").toLowerCase():"#document"}function At(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yo(e){var t;return(t=(HS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function HS(e){return Fc()?e instanceof Node||e instanceof At(e).Node:!1}function $t(e){return Fc()?e instanceof Element||e instanceof At(e).Element:!1}function bo(e){return Fc()?e instanceof HTMLElement||e instanceof At(e).HTMLElement:!1}function BS(e){return!Fc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof At(e).ShadowRoot}var TF=new Set(["inline","contents"]);function Kn(e){let{overflow:t,overflowX:o,overflowY:r,display:a}=jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!TF.has(a)}var MF=new Set(["table","td","th"]);function US(e){return MF.has(_a(e))}var kF=[":popover-open",":modal"];function ul(e){return kF.some(t=>{try{return e.matches(t)}catch{return!1}})}var EF=["transform","translate","scale","rotate","perspective"],AF=["transform","translate","scale","rotate","perspective","filter"],DF=["paint","layout","strict","content"];function _c(e){let t=Vc(),o=$t(e)?jt(e):e;return EF.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)||AF.some(r=>(o.willChange||"").includes(r))||DF.some(r=>(o.contain||"").includes(r))}function GS(e){let t=ar(e);for(;bo(t)&&!Va(t);){if(_c(t))return t;if(ul(t))return null;t=ar(t)}return null}function Vc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var NF=new Set(["html","body","#document"]);function Va(e){return NF.has(_a(e))}function jt(e){return At(e).getComputedStyle(e)}function cl(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ar(e){if(_a(e)==="html")return e;let t=e.assignedSlot||e.parentNode||BS(e)&&e.host||yo(e);return BS(t)?t.host:t}function zS(e){let t=ar(e);return Va(t)?e.ownerDocument?e.ownerDocument.body:e.body:bo(t)&&Kn(t)?t:zS(t)}function Fa(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=zS(e),n=a===((r=e.ownerDocument)==null?void 0:r.body),s=At(a);if(n){let i=Bc(s);return t.concat(s,s.visualViewport||[],Kn(a)?a:[],i&&o?Fa(i):[])}return t.concat(a,Fa(a,[],o))}function Bc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jS(e){let t=jt(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=bo(e),n=a?e.offsetWidth:o,s=a?e.offsetHeight:r,i=il(o)!==n||il(r)!==s;return i&&(o=n,r=s),{width:o,height:r,$:i}}function Kp(e){return $t(e)?e:e.contextElement}function Xn(e){let t=Kp(e);if(!bo(t))return vo(1);let o=t.getBoundingClientRect(),{width:r,height:a,$:n}=jS(t),s=(n?il(o.width):o.width)/r,i=(n?il(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}var OF=vo(0);function KS(e){let t=At(e);return!Vc()||!t.visualViewport?OF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FF(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==At(e)?!1:t}function Ba(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),n=Kp(e),s=vo(1);t&&(r?$t(r)&&(s=Xn(r)):s=Xn(e));let i=FF(n,o,r)?KS(n):vo(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=At(n),m=r&&$t(r)?At(r):r,h=p,g=Bc(h);for(;g&&r&&m!==h;){let v=Xn(g),x=g.getBoundingClientRect(),y=jt(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=At(g),g=Bc(h)}}return Oa({width:c,height:f,x:l,y:u})}function Hc(e,t){let o=cl(e).scrollLeft;return t?t.left+o:Ba(yo(e)).left+o}function XS(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-Hc(e,o),a=o.top+t.scrollTop;return{x:r,y:a}}function _F(e){let{elements:t,rect:o,offsetParent:r,strategy:a}=e,n=a==="fixed",s=yo(r),i=t?ul(t.floating):!1;if(r===s||i&&n)return o;let l={scrollLeft:0,scrollTop:0},u=vo(1),c=vo(0),f=bo(r);if((f||!f&&!n)&&((_a(r)!=="body"||Kn(s))&&(l=cl(r)),bo(r))){let m=Ba(r);u=Xn(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}let p=s&&!f&&!n?XS(s,l):vo(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 VF(e){return Array.from(e.getClientRects())}function BF(e){let t=yo(e),o=cl(e),r=e.ownerDocument.body,a=St(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=St(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+Hc(e),i=-o.scrollTop;return jt(r).direction==="rtl"&&(s+=St(t.clientWidth,r.clientWidth)-a),{width:a,height:n,x:s,y:i}}var WS=25;function HF(e,t){let o=At(e),r=yo(e),a=o.visualViewport,n=r.clientWidth,s=r.clientHeight,i=0,l=0;if(a){n=a.width,s=a.height;let c=Vc();(!c||c&&t==="fixed")&&(i=a.offsetLeft,l=a.offsetTop)}let u=Hc(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<=WS&&(n-=h)}else u<=WS&&(n+=u);return{width:n,height:s,x:i,y:l}}var UF=new Set(["absolute","fixed"]);function GF(e,t){let o=Ba(e,!0,t==="fixed"),r=o.top+e.clientTop,a=o.left+e.clientLeft,n=bo(e)?Xn(e):vo(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 qS(e,t,o){let r;if(t==="viewport")r=HF(e,o);else if(t==="document")r=BF(yo(e));else if($t(t))r=GF(t,o);else{let a=KS(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Oa(r)}function YS(e,t){let o=ar(e);return o===t||!$t(o)||Va(o)?!1:jt(o).position==="fixed"||YS(o,t)}function zF(e,t){let o=t.get(e);if(o)return o;let r=Fa(e,[],!1).filter(i=>$t(i)&&_a(i)!=="body"),a=null,n=jt(e).position==="fixed",s=n?ar(e):e;for(;$t(s)&&!Va(s);){let i=jt(s),l=_c(s);!l&&i.position==="fixed"&&(a=null),(n?!l&&!a:!l&&i.position==="static"&&!!a&&UF.has(a.position)||Kn(s)&&!l&&YS(e,s))?r=r.filter(c=>c!==s):a=i,s=ar(s)}return t.set(e,r),r}function WF(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,s=[...o==="clippingAncestors"?ul(t)?[]:zF(t,this._c):[].concat(o),r],i=s[0],l=s.reduce((u,c)=>{let f=qS(t,c,a);return u.top=St(f.top,u.top),u.right=Fo(f.right,u.right),u.bottom=Fo(f.bottom,u.bottom),u.left=St(f.left,u.left),u},qS(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qF(e){let{width:t,height:o}=jS(e);return{width:t,height:o}}function $F(e,t,o){let r=bo(t),a=yo(t),n=o==="fixed",s=Ba(e,!0,n,t),i={scrollLeft:0,scrollTop:0},l=vo(0);function u(){l.x=Hc(a)}if(r||!r&&!n)if((_a(t)!=="body"||Kn(a))&&(i=cl(t)),r){let m=Ba(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?XS(a,i):vo(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 jp(e){return jt(e).position==="static"}function $S(e,t){if(!bo(e)||jt(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return yo(e)===o&&(o=o.ownerDocument.body),o}function ZS(e,t){let o=At(e);if(ul(e))return o;if(!bo(e)){let a=ar(e);for(;a&&!Va(a);){if($t(a)&&!jp(a))return a;a=ar(a)}return o}let r=$S(e,t);for(;r&&US(r)&&jp(r);)r=$S(r,t);return r&&Va(r)&&jp(r)&&!_c(r)?o:r||GS(e)||o}var jF=async function(e){let t=this.getOffsetParent||ZS,o=this.getDimensions,r=await o(e.floating);return{reference:$F(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function KF(e){return jt(e).direction==="rtl"}var QS={convertOffsetParentRelativeRectToViewportRelativeRect:_F,getDocumentElement:yo,getClippingRect:WF,getOffsetParent:ZS,getElementRects:jF,getClientRects:VF,getDimensions:qF,getScale:Xn,isElement:$t,isRTL:KF};function JS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function XF(e,t){let o=null,r,a=yo(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=ll(f),g=ll(a.clientWidth-(c+p)),v=ll(a.clientHeight-(f+m)),x=ll(c),b={rootMargin:-h+"px "+-g+"px "+-v+"px "+-x+"px",threshold:St(0,Fo(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&&!JS(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 Xp(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=Kp(e),c=a||n?[...u?Fa(u):[],...Fa(t)]:[];c.forEach(x=>{a&&x.addEventListener("scroll",o,{passive:!0}),n&&x.addEventListener("resize",o)});let f=u&&i?XF(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?Ba(e):null;l&&v();function v(){let x=Ba(e);g&&!JS(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 eR=OS;var tR=FS,oR=AS,rR=VS,aR=DS,Yp=ES;var nR=_S,Zp=(e,t,o)=>{let r=new Map,a={platform:QS,...o},n={...a.platform,_c:r};return kS(e,t,{...a,platform:n})};N();N();var YF=typeof document<"u",ZF=function(){},Uc=YF?ct:ZF;function Gc(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(!Gc(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)&&!Gc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function iR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sR(e,t){let o=iR(e);return Math.round(t*o)/o}function Qp(e){let t=E(e);return Uc(()=>{t.current=e}),t}function lR(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);Gc(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=Qp(l),O=Qp(a),V=Qp(u),q=H(()=>{if(!I.current||!S.current)return;let z={placement:t,strategy:o,middleware:p};O.current&&(z.platform=O.current),Zp(I.current,S.current,z).then(_=>{let ne={..._,isPositioned:V.current!==!1};F.current&&!Gc(T.current,ne)&&(T.current=ne,Uo(()=>{f(ne)}))})},[p,t,o,O,V]);Uc(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);let F=E(!1);Uc(()=>(F.current=!0,()=>{F.current=!1}),[]),Uc(()=>{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 _=sR(U.floating,c.x),ne=sR(U.floating,c.y);return i?{...z,transform:"translate("+_+"px, "+ne+"px)",...iR(U.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:_,top:ne}},[o,i,U.floating,c.x,c.y]);return Z(()=>({...c,update:q,refs:$,elements:U,floatingStyles:G}),[c,q,$,U,G])}var QF=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?Yp({element:r.current,padding:a}).fn(o):{}:r?Yp({element:r,padding:a}).fn(o):{}}}},uR=(e,t)=>({...eR(e),options:[e,t]}),cR=(e,t)=>({...tR(e),options:[e,t]}),dR=(e,t)=>({...nR(e),options:[e,t]}),fR=(e,t)=>({...oR(e),options:[e,t]}),pR=(e,t)=>({...rR(e),options:[e,t]});var mR=(e,t)=>({...aR(e),options:[e,t]});var gR=(e,t)=>({...QF(e),options:[e,t]});N();var JF="Arrow",hR=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"})})});hR.displayName=JF;var vR=hR;var Jp="Popper",[xR,Kt]=ke(Jp),[t_,yR]=xR(Jp),bR=e=>{let{__scopePopper:t,children:o}=e,[r,a]=k(null);return d(t_,{scope:t,anchor:r,onAnchorChange:a,children:o})};bR.displayName=Jp;var CR="PopperAnchor",wR=C((e,t)=>{let{__scopePopper:o,virtualRef:r,...a}=e,n=yR(CR,o),s=E(null),i=pe(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})});wR.displayName=CR;var em="PopperContent",[o_,r_]=xR(em),SR=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=yR(em,o),[x,y]=k(null),b=pe(t,K=>y(K)),[R,w]=k(null),I=$n(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(n_),altBoundary:V},{refs:F,floatingStyles:$,placement:U,isPositioned:G,middlewareData:z}=lR({strategy:"fixed",placement:M,whileElementsMounted:(...K)=>Xp(...K,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[uR({mainAxis:a+T,alignmentAxis:s}),l&&cR({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?dR():void 0,...q}),l&&fR({...q}),pR({...q,apply:({elements:K,rects:ie,availableWidth:xe,availableHeight:ye})=>{let{width:ge,height:J}=ie.reference,be=K.floating.style;be.setProperty("--radix-popper-available-width",`${xe}px`),be.setProperty("--radix-popper-available-height",`${ye}px`),be.setProperty("--radix-popper-anchor-width",`${ge}px`),be.setProperty("--radix-popper-anchor-height",`${J}px`)}}),R&&gR({element:R,padding:i}),s_({arrowWidth:S,arrowHeight:T}),p&&mR({strategy:"referenceHidden",...q})]}),[_,ne]=PR(U),le=ze(h);Ae(()=>{G&&le?.()},[G,le]);let W=z.arrow?.x,te=z.arrow?.y,se=z.arrow?.centerOffset!==0,[ee,fe]=k();return Ae(()=>{x&&fe(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(o_,{scope:o,placedSide:_,onArrowChange:w,arrowX:W,arrowY:te,shouldHideArrow:se,children:d(Y.div,{"data-side":_,"data-align":ne,...g,ref:b,style:{...g.style,animation:G?void 0:"none"}})})})});SR.displayName=em;var RR="PopperArrow",a_={top:"bottom",right:"left",bottom:"top",left:"right"},IR=C(function(t,o){let{__scopePopper:r,...a}=t,n=r_(RR,r),s=a_[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(vR,{...a,ref:o,style:{...a.style,display:"block"}})})});IR.displayName=RR;function n_(e){return e!==null}var s_=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]=PR(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 PR(e){let[t,o="center"]=e.split("-");return[t,o]}var nr=bR,sr=wR,_r=SR,Vr=IR;N();var i_="Portal",Vt=C((e,t)=>{let{container:o,...r}=e,[a,n]=k(!1);Ae(()=>n(!0),[]);let s=o||a&&globalThis?.document?.body;return s?xv.createPortal(d(Y.div,{...r,ref:t}),s):null});Vt.displayName=i_;var l_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yn=new WeakMap,Wc=new WeakMap,qc={},tm=0,LR=function(e){return e&&(e.host||LR(e.parentNode))},u_=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=LR(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})},c_=function(e,t,o,r){var a=u_(t,Array.isArray(e)?e:[e]);qc[o]||(qc[o]=new WeakMap);var n=qc[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=(Yn.get(p)||0)+1,v=(n.get(p)||0)+1;Yn.set(p,g),n.set(p,v),s.push(p),g===1&&h&&Wc.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(),tm++,function(){s.forEach(function(f){var p=Yn.get(f)-1,m=n.get(f)-1;Yn.set(f,p),n.set(f,m),p||(Wc.has(f)||f.removeAttribute(r),Wc.delete(f)),m||f.removeAttribute(o)}),tm--,tm||(Yn=new WeakMap,Yn=new WeakMap,Wc=new WeakMap,qc={})}},Br=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||l_(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),c_(r,a,o,"aria-hidden")):function(){return null}};var Dt=function(){return Dt=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},Dt.apply(this,arguments)};function $c(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 TR(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 Ha="right-scroll-bar-position",Ua="width-before-scroll-bar",om="with-scroll-bars-hidden",rm="--removed-body-scroll-bar-size";function jc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}N();function MR(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 d_=typeof window<"u"?ct:D,kR=new WeakMap;function am(e,t){var o=MR(t||null,function(r){return e.forEach(function(a){return jc(a,r)})});return d_(function(){var r=kR.get(o);if(r){var a=new Set(r),n=new Set(e),s=o.current;a.forEach(function(i){n.has(i)||jc(i,null)}),n.forEach(function(i){a.has(i)||jc(i,s)})}kR.set(o,e)},[e]),o}function f_(e){return e}function p_(e,t){t===void 0&&(t=f_);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 nm(e){e===void 0&&(e={});var t=p_(null);return t.options=Dt({async:!0,ssr:!1},e),t}N();var ER=function(e){var t=e.sideCar,o=$c(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 me(r,Dt({},o))};ER.isSideCarExport=!0;function sm(e,t){return e.useMedium(t),ER}var Kc=nm();var im=function(){},dl=C(function(e,t){var o=E(null),r=k({onScrollCapture:im,onWheelCapture:im,onTouchMoveCapture:im}),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=$c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,I=am([o,t]),S=Dt(Dt({},R),a);return me(Je,null,c&&me(w,{sideCar:Kc,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:n,allowPinchZoom:!!v,lockRef:o,gapMode:b}),s?Fe(Ie.only(i),Dt(Dt({},S),{ref:I})):me(y,Dt({},S,{className:l,ref:I}),i))});dl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dl.classNames={fullWidth:Ua,zeroRight:Ha};N();N();N();var AR;var DR=function(){if(AR)return AR;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function m_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=DR();return t&&e.setAttribute("nonce",t),e}function g_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lm=function(){var e=0,t=null;return{add:function(o){e==0&&(t=m_())&&(g_(t,o),h_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var um=function(){var e=lm();return function(t,o){D(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var fl=function(){var e=um(),t=function(o){var r=o.styles,a=o.dynamic;return e(r,a),null};return t};var v_={left:0,top:0,right:0,gap:0},cm=function(e){return parseInt(e||"",10)||0},x_=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[cm(o),cm(r),cm(a)]},dm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return v_;var t=x_(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 y_=fl(),Zn="data-scroll-locked",b_=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(om,` {
15
+ overflow: hidden `).concat(r,`;
16
+ padding-right: `).concat(i,"px ").concat(r,`;
17
+ }
18
+ body[`).concat(Zn,`] {
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(Ha,` {
32
+ right: `).concat(i,"px ").concat(r,`;
33
+ }
34
+
35
+ .`).concat(Ua,` {
36
+ margin-right: `).concat(i,"px ").concat(r,`;
37
+ }
38
+
39
+ .`).concat(Ha," .").concat(Ha,` {
40
+ right: 0 `).concat(r,`;
41
+ }
42
+
43
+ .`).concat(Ua," .").concat(Ua,` {
44
+ margin-right: 0 `).concat(r,`;
45
+ }
46
+
47
+ body[`).concat(Zn,`] {
48
+ `).concat(rm,": ").concat(i,`px;
49
+ }
50
+ `)},NR=function(){var e=parseInt(document.body.getAttribute(Zn)||"0",10);return isFinite(e)?e:0},C_=function(){D(function(){return document.body.setAttribute(Zn,(NR()+1).toString()),function(){var e=NR()-1;e<=0?document.body.removeAttribute(Zn):document.body.setAttribute(Zn,e.toString())}},[])},fm=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;C_();var n=Z(function(){return dm(a)},[a]);return me(y_,{styles:b_(n,!t,a,o?"":"!important")})};var pm=!1;if(typeof window<"u")try{pl=Object.defineProperty({},"passive",{get:function(){return pm=!0,!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{pm=!1}var pl,Ga=pm?{passive:!1}:!1;var w_=function(e){return e.tagName==="TEXTAREA"},OR=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!w_(e)&&o[t]==="visible")},S_=function(e){return OR(e,"overflowY")},R_=function(e){return OR(e,"overflowX")},mm=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=FR(e,r);if(a){var n=_R(e,r),s=n[1],i=n[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},I_=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},P_=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},FR=function(e,t){return e==="v"?S_(t):R_(t)},_R=function(e,t){return e==="v"?I_(t):P_(t)},L_=function(e,t){return e==="h"&&t==="rtl"?-1:1},VR=function(e,t,o,r,a){var n=L_(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=_R(e,i),h=m[0],g=m[1],v=m[2],x=g-v-n*h;(h||x)&&FR(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 Xc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},BR=function(e){return[e.deltaX,e.deltaY]},HR=function(e){return e&&"current"in e?e.current:e},T_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},M_=function(e){return`
51
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
52
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
53
+ `)},k_=0,Qn=[];function UR(e){var t=E([]),o=E([0,0]),r=E(),a=k(k_++)[0],n=k(fl)[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=TR([e.lockRef.current],(e.shards||[]).map(HR),!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=Xc(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=mm(S,I);if(!T)return!0;if(T?w=S:(w=S==="v"?"h":"v",T=mm(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 VR(M,v,g,M==="h"?b:R,!0)},[]),l=H(function(g){var v=g;if(!(!Qn.length||Qn[Qn.length-1]!==n)){var x="deltaY"in v?BR(v):Xc(v),y=t.current.filter(function(w){return w.name===v.type&&(w.target===v.target||v.target===w.shadowParent)&&T_(w.delta,x)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var b=(s.current.shards||[]).map(HR).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:E_(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(R){return R!==b})},1)},[]),c=H(function(g){o.current=Xc(g),r.current=void 0},[]),f=H(function(g){u(g.type,BR(g),g.target,i(g,e.lockRef.current))},[]),p=H(function(g){u(g.type,Xc(g),g.target,i(g,e.lockRef.current))},[]);D(function(){return Qn.push(n),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ga),document.addEventListener("touchmove",l,Ga),document.addEventListener("touchstart",c,Ga),function(){Qn=Qn.filter(function(g){return g!==n}),document.removeEventListener("wheel",l,Ga),document.removeEventListener("touchmove",l,Ga),document.removeEventListener("touchstart",c,Ga)}},[]);var m=e.removeScrollBar,h=e.inert;return me(Je,null,h?me(n,{styles:M_(a)}):null,m?me(fm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function E_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var GR=sm(Kc,UR);var zR=C(function(e,t){return me(dl,Dt({},e,{ref:t,sideCar:GR}))});zR.classNames=dl.classNames;var ir=zR;var Yc="Popover",[WR,Sfe]=ke(Yc,[Kt]),ml=Kt(),[A_,Hr]=WR(Yc),qR=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!1}=e,i=ml(t),l=E(null),[u,c]=k(!1),[f,p]=Be({prop:r,defaultProp:a??!1,onChange:n,caller:Yc});return d(nr,{...i,children:d(A_,{scope:t,contentId:Le(),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})})};qR.displayName=Yc;var $R="PopoverAnchor",jR=C((e,t)=>{let{__scopePopover:o,...r}=e,a=Hr($R,o),n=ml(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=a;return D(()=>(s(),()=>i()),[s,i]),d(sr,{...n,...r,ref:t})});jR.displayName=$R;var KR="PopoverTrigger",XR=C((e,t)=>{let{__scopePopover:o,...r}=e,a=Hr(KR,o),n=ml(o),s=pe(t,a.triggerRef),i=d(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":e0(a.open),...r,ref:s,onClick:X(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:d(sr,{asChild:!0,...n,children:i})});XR.displayName=KR;var gm="PopoverPortal",[D_,N_]=WR(gm,{forceMount:void 0}),O_=e=>{let{__scopePopover:t,forceMount:o,children:r,container:a}=e,n=Hr(gm,t);return d(D_,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Vt,{asChild:!0,container:a,children:r})})})};O_.displayName=gm;var Jn="PopoverContent",YR=C((e,t)=>{let o=N_(Jn,e.__scopePopover),{forceMount:r=o.forceMount,...a}=e,n=Hr(Jn,e.__scopePopover);return d($e,{present:r||n.open,children:n.modal?d(__,{...a,ref:t}):d(V_,{...a,ref:t})})});YR.displayName=Jn;var F_=It("PopoverContent.RemoveScroll"),__=C((e,t)=>{let o=Hr(Jn,e.__scopePopover),r=E(null),a=pe(t,r),n=E(!1);return D(()=>{let s=r.current;if(s)return Br(s)},[]),d(ir,{as:F_,allowPinchZoom:!0,children:d(ZR,{...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})})})}),V_=C((e,t)=>{let o=Hr(Jn,e.__scopePopover),r=E(!1),a=E(!1);return d(ZR,{...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()}})}),ZR=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=Hr(Jn,o),m=ml(o);return Or(),d(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d(qt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d(_r,{"data-state":e0(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)"}})})})}),QR="PopoverClose",JR=C((e,t)=>{let{__scopePopover:o,...r}=e,a=Hr(QR,o);return d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>a.onOpenChange(!1))})});JR.displayName=QR;var B_="PopoverArrow",H_=C((e,t)=>{let{__scopePopover:o,...r}=e,a=ml(o);return d(Vr,{...a,...r,ref:t})});H_.displayName=B_;function e0(e){return e?"open":"closed"}var t0=qR,o0=jR,r0=XR;var hm=YR,a0=JR;var n0=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"}}),lr=t0,ur=r0,G_=o0,Bo=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(hm,{ref:p,side:r,sideOffset:c,collisionPadding:8,onInteractOutside:m=>{l||m.preventDefault()},className:L(n0({variant:t,size:o,side:r,position:a,radius:n,shadow:s}),i&&"backdrop-blur-md bg-opacity-80",e),...f})]}));Bo.displayName=hm.displayName;var z_=a0,s0=({className:e,...t})=>d("div",{className:L("moonui-theme","my-2 h-px bg-border",e),...t});s0.displayName="PopoverSeparator";var i0=({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});i0.displayName="PopoverHeader";var l0=({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});l0.displayName="PopoverFooter";N();N();N();var vm="rovingFocusGroup.onEntryFocus",W_={bubbles:!1,cancelable:!0},gl="RovingFocusGroup",[xm,u0,q_]=Lo(gl),[$_,es]=ke(gl,[q_]),[j_,K_]=$_(gl),c0=C((e,t)=>d(xm.Provider,{scope:e.__scopeRovingFocusGroup,children:d(xm.Slot,{scope:e.__scopeRovingFocusGroup,children:d(X_,{...e,ref:t})})}));c0.displayName=gl;var X_=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=pe(t,p),h=To(n),[g,v]=Be({prop:s,defaultProp:i??null,onChange:l,caller:gl}),[x,y]=k(!1),b=ze(u),R=u0(o),w=E(!1),[I,S]=k(0);return D(()=>{let T=p.current;if(T)return T.addEventListener(vm,b),()=>T.removeEventListener(vm,b)},[b]),d(j_,{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(vm,W_);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);p0($,c)}}w.current=!1}),onBlur:X(e.onBlur,()=>y(!1))})})}),d0="RovingFocusGroupItem",f0=C((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:n,children:s,...i}=e,l=Le(),u=n||l,c=K_(d0,o),f=c.currentTabStopId===u,p=u0(o),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=c;return D(()=>{if(r)return m(),()=>h()},[r,m,h]),d(xm.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=Q_(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?J_(b,R+1):b.slice(R+1)}setTimeout(()=>p0(b))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});f0.displayName=d0;var Y_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Z_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Q_(e,t,o){let r=Z_(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Y_[r]}function p0(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function J_(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var Zc=c0,Qc=f0;var Jc="Tabs",[eV,jfe]=ke(Jc,[es]),g0=es(),[tV,ym]=eV(Jc),h0=C((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:a,defaultValue:n,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,c=To(i),[f,p]=Be({prop:r,onChange:a,defaultProp:n??"",caller:Jc});return d(tV,{scope:o,baseId:Le(),value:f,onValueChange:p,orientation:s,dir:c,activationMode:l,children:d(Y.div,{dir:c,"data-orientation":s,...u,ref:t})})});h0.displayName=Jc;var v0="TabsList",x0=C((e,t)=>{let{__scopeTabs:o,loop:r=!0,...a}=e,n=ym(v0,o),s=g0(o);return d(Zc,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:r,children:d(Y.div,{role:"tablist","aria-orientation":n.orientation,...a,ref:t})})});x0.displayName=v0;var y0="TabsTrigger",b0=C((e,t)=>{let{__scopeTabs:o,value:r,disabled:a=!1,...n}=e,s=ym(y0,o),i=g0(o),l=S0(s.baseId,r),u=R0(s.baseId,r),c=r===s.value;return d(Qc,{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)})})})});b0.displayName=y0;var C0="TabsContent",w0=C((e,t)=>{let{__scopeTabs:o,value:r,forceMount:a,children:n,...s}=e,i=ym(C0,o),l=S0(i.baseId,r),u=R0(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})})});w0.displayName=C0;function S0(e,t){return`${e}-trigger-${t}`}function R0(e,t){return`${e}-content-${t}`}var bm=h0,Cm=x0,wm=b0,Sm=w0;var Rm=ce("horizontal"),ed=C(({vertical:e=!1,orientation:t,className:o,...r},a)=>{let n=t??(e?"vertical":"horizontal");return d(Rm.Provider,{value:n,children:d(bm,{ref:a,className:L("moonui-theme",o),orientation:n,...r})})});ed.displayName=bm.displayName;var rV=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}}),td=C(({className:e,variant:t,orientation:o,fullWidth:r,scrollable:a,...n},s)=>{let i=ae(Rm);return d(Cm,{ref:s,className:L("moonui-theme",rV({variant:t,orientation:o??i,fullWidth:r,scrollable:a,className:e})),...n})});td.displayName=Cm.displayName;var aV=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}}),ts=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=ae(Rm);return P(wm,{ref:f,className:L("moonui-theme",aV({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})]})});ts.displayName=wm.displayName;var os=C(({className:e,animated:t=!1,...o},r)=>d(Sm,{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}));os.displayName=Sm.displayName;N();var nV=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"}}),sV=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"}}),iV=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"}}),lV=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"}}),cr=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),ne=Math.round(_/I)*I,le=Math.max(R,Math.min(w,ne)),W=[...g];W[O]=le,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",nV({size:t}),e),"data-disabled":p?!0:void 0,children:[d("div",{ref:b,className:L(sV({variant:o||a||"default"})),onClick:T,children:d("div",{className:L(iV({variant:r||a||"primary"})),style:{left:"0%",width:`${y(g[0],R,w)}%`}})}),g.map((O,V)=>d("div",{className:L(lV({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))]})]})});cr.displayName="Slider";var I0=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 P0(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 L0(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function uV(e){let t=P0(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 cV(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 L0(Math.round(r*255),Math.round(a*255),Math.round(n*255))}var T0=["#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 Im({className:e,size:t,shape:o,value:r="#000000",onChange:a,showInput:n=!0,showPresets:s=!0,presets:i=T0,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(()=>P0(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},_=cV(z.h,z.s,z.l);A(_)},V=(U,G)=>{let z={...M,[U]:G},_=L0(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(lr,{open:h,onOpenChange:g,children:[d(ur,{asChild:!0,children:d(Te,{variant:"outline",className:L(I0({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(Bo,{className:"w-80",align:"start",sideOffset:8,children:[P(ed,{defaultValue:"picker",className:"w-full",children:[P(td,{className:"grid w-full grid-cols-3",children:[d(ts,{value:"picker",children:"Picker"}),d(ts,{value:"sliders",children:"Sliders"}),d(ts,{value:"input",children:"Input"})]}),P(os,{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(Et,{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(cr,{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(Et,{children:"Opacity"}),P("div",{className:"flex items-center gap-3",children:[d(cr,{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(os,{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(Et,{children:"Red"}),d("span",{className:"text-sm text-muted-foreground",children:M.r})]}),d(cr,{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(Et,{children:"Green"}),d("span",{className:"text-sm text-muted-foreground",children:M.g})]}),d(cr,{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(Et,{children:"Blue"}),d("span",{className:"text-sm text-muted-foreground",children:M.b})]}),d(cr,{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(os,{value:"input",className:"space-y-4",children:[P("div",{className:"space-y-2",children:[d(Et,{children:"Hex Color"}),P("div",{className:"flex gap-2",children:[d(xt,{value:I,onChange:q,placeholder:"#000000",className:"font-mono"}),d(Te,{size:"icon",variant:"outline",onClick:()=>A(I),children:d(pt,{className:"h-4 w-4"})})]})]}),P("div",{className:"space-y-2",children:[d(Et,{children:"RGB Values"}),P("div",{className:"grid grid-cols-3 gap-2",children:[d(xt,{type:"number",value:M.r,onChange:U=>V("r",parseInt(U.target.value)||0),min:0,max:255,className:"text-center"}),d(xt,{type:"number",value:M.g,onChange:U=>V("g",parseInt(U.target.value)||0),min:0,max:255,className:"text-center"}),d(xt,{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",I0({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(Te,{size:"icon",variant:"ghost",onClick:F,className:"h-8 w-8",children:d(Xo,{mode:"wait",children:R?d(_e.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:d(pt,{className:"h-4 w-4 text-green-600"})},"check"):d(_e.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:d(Vs,{className:"h-4 w-4"})},"copy")})})]}),s&&i.length>0&&P("div",{className:"mt-4 space-y-2",children:[d(Et,{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 dV({value:e="#000000",onChange:t,colors:o=T0.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 fV({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(Et,{children:"Start Color"}),d(Im,{value:r.start,onChange:s=>n("start",s),size:"sm"})]}),P("div",{className:"space-y-2",children:[d(Et,{children:"End Color"}),d(Im,{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(Et,{children:"Angle"}),P("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),d(cr,{value:[r.angle||90],onValueChange:([s])=>n("angle",s),max:360,step:1})]})]})}N();var M0=1,pV=.9,mV=.8,gV=.17,Pm=.1,Lm=.999,hV=.9999,vV=.99,xV=/[\\\/_+.#"@\[\(\{&]/,yV=/[\\\/_+.#"@\[\(\{&]/g,bV=/[\s-]/,E0=/[\s-]/g;function Tm(e,t,o,r,a,n,s){if(n===t.length)return a===e.length?M0:vV;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=Tm(e,t,o,r,u+1,n+1,s),f>c&&(u===a?f*=M0:xV.test(e.charAt(u-1))?(f*=mV,m=e.slice(a,u-1).match(yV),m&&a>0&&(f*=Math.pow(Lm,m.length))):bV.test(e.charAt(u-1))?(f*=pV,h=e.slice(a,u-1).match(E0),h&&a>0&&(f*=Math.pow(Lm,h.length))):(f*=gV,a>0&&(f*=Math.pow(Lm,u-a))),e.charAt(u)!==t.charAt(n)&&(f*=hV)),(f<Pm&&o.charAt(u-1)===r.charAt(n+1)||r.charAt(n+1)===r.charAt(n)&&o.charAt(u-1)!==r.charAt(n))&&(p=Tm(e,t,o,r,u+1,n+2,s),p*Pm>f&&(f=p*Pm)),f>c&&(c=f),u=o.indexOf(l,u+1);return s[i]=c,c}function k0(e){return e.toLowerCase().replace(E0," ")}function A0(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Tm(e,t,k0(e),k0(t),0,0,{})}N();var rd="Dialog",[D0,Dpe]=ke(rd),[CV,Co]=D0(rd),N0=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:rd});return d(CV,{scope:t,triggerRef:i,contentRef:l,contentId:Le(),titleId:Le(),descriptionId:Le(),open:u,onOpenChange:c,onOpenToggle:H(()=>c(f=>!f),[c]),modal:s,children:o})};N0.displayName=rd;var O0="DialogTrigger",F0=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Co(O0,o),n=pe(t,a.triggerRef);return d(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Em(a.open),...r,ref:n,onClick:X(e.onClick,a.onOpenToggle)})});F0.displayName=O0;var Mm="DialogPortal",[wV,_0]=D0(Mm,{forceMount:void 0}),V0=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:a}=e,n=Co(Mm,t);return d(wV,{scope:t,forceMount:o,children:Ie.map(r,s=>d($e,{present:o||n.open,children:d(Vt,{asChild:!0,container:a,children:s})}))})};V0.displayName=Mm;var od="DialogOverlay",B0=C((e,t)=>{let o=_0(od,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=Co(od,e.__scopeDialog);return n.modal?d($e,{present:r||n.open,children:d(RV,{...a,ref:t})}):null});B0.displayName=od;var SV=It("DialogOverlay.RemoveScroll"),RV=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Co(od,o);return d(ir,{as:SV,allowPinchZoom:!0,shards:[a.contentRef],children:d(Y.div,{"data-state":Em(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),za="DialogContent",H0=C((e,t)=>{let o=_0(za,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=Co(za,e.__scopeDialog);return d($e,{present:r||n.open,children:n.modal?d(IV,{...a,ref:t}):d(PV,{...a,ref:t})})});H0.displayName=za;var IV=C((e,t)=>{let o=Co(za,e.__scopeDialog),r=E(null),a=pe(t,o.contentRef,r);return D(()=>{let n=r.current;if(n)return Br(n)},[]),d(U0,{...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())})}),PV=C((e,t)=>{let o=Co(za,e.__scopeDialog),r=E(!1),a=E(!1);return d(U0,{...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()}})}),U0=C((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,...s}=e,i=Co(za,o),l=E(null),u=pe(t,l);return Or(),P(Ve,{children:[d(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d(qt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Em(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),P(Ve,{children:[d(LV,{titleId:i.titleId}),d(MV,{contentRef:l,descriptionId:i.descriptionId})]})]})}),km="DialogTitle",G0=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Co(km,o);return d(Y.h2,{id:a.titleId,...r,ref:t})});G0.displayName=km;var z0="DialogDescription",W0=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Co(z0,o);return d(Y.p,{id:a.descriptionId,...r,ref:t})});W0.displayName=z0;var q0="DialogClose",$0=C((e,t)=>{let{__scopeDialog:o,...r}=e,a=Co(q0,o);return d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>a.onOpenChange(!1))})});$0.displayName=q0;function Em(e){return e?"open":"closed"}var j0="DialogTitleWarning",[Npe,K0]=mv(j0,{contentName:za,titleName:km,docsSlug:"dialog"}),LV=({titleId:e})=>{let t=K0(j0),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},TV="DialogDescriptionWarning",MV=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${K0(TV).contentName}}.`;return D(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ad=N0,X0=F0,nd=V0,hl=B0,vl=H0,Am=G0,Dm=W0,Nm=$0;N();var xl='[cmdk-group=""]',Om='[cmdk-group-items=""]',kV='[cmdk-group-heading=""]',Q0='[cmdk-item=""]',Z0=`${Q0}:not([aria-disabled="true"])`,Fm="cmdk-item-select",rs="data-value",EV=(e,t,o)=>A0(e,t,o),J0=ce(void 0),yl=()=>ae(J0),eI=ce(void 0),_m=()=>ae(eI),tI=ce(void 0),oI=C((e,t)=>{let o=as(()=>{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=as(()=>new Set),a=as(()=>new Map),n=as(()=>new Map),s=as(()=>new Set),i=rI(e),{label:l,children:u,value:c,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:v=!0,...x}=e,y=Le(),b=Le(),R=Le(),w=E(null),I=GV();Wa(()=>{if(c!==void 0){let W=c.trim();o.current.value=W,S.emit()}},[c]),Wa(()=>{I(6,q)},[]);let S=Z(()=>({subscribe:W=>(s.current.add(W),()=>s.current.delete(W)),snapshot:()=>o.current,setState:(W,te,se)=>{var ee,fe,K,ie;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 xe=document.getElementById(R);xe?xe.focus():(ee=document.getElementById(y))==null||ee.focus()}if(I(7,()=>{var xe;o.current.selectedItemId=(xe=F())==null?void 0:xe.id,S.emit()}),se||I(5,q),((fe=i.current)==null?void 0:fe.value)!==void 0){let xe=te??"";(ie=(K=i.current).onValueChange)==null||ie.call(K,xe);return}}S.emit()}},emit:()=>{s.current.forEach(W=>W())}}),[]),T=Z(()=>({value:(W,te,se)=>{var ee;te!==((ee=n.current.get(W))==null?void 0:ee.value)&&(n.current.set(W,{value:te,keywords:se}),o.current.filtered.items.set(W,M(te,se)),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 se=F();I(4,()=>{V(),se?.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 se,ee;let fe=(ee=(se=i.current)==null?void 0:se.filter)!=null?ee:EV;return W?fe(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 fe=a.current.get(ee),K=0;fe.forEach(ie=>{let xe=W.get(ie);K=Math.max(xe,K)}),te.push([ee,K])});let se=w.current;$().sort((ee,fe)=>{var K,ie;let xe=ee.getAttribute("id"),ye=fe.getAttribute("id");return((K=W.get(ye))!=null?K:0)-((ie=W.get(xe))!=null?ie:0)}).forEach(ee=>{let fe=ee.closest(Om);fe?fe.appendChild(ee.parentElement===fe?ee:ee.closest(`${Om} > *`)):se.appendChild(ee.parentElement===se?ee:ee.closest(`${Om} > *`))}),te.sort((ee,fe)=>fe[1]-ee[1]).forEach(ee=>{var fe;let K=(fe=w.current)==null?void 0:fe.querySelector(`${xl}[${rs}="${encodeURIComponent(ee[0])}"]`);K?.parentElement.appendChild(K)})}function O(){let W=$().find(se=>se.getAttribute("aria-disabled")!=="true"),te=W?.getAttribute(rs);S.setState("value",te||void 0)}function V(){var W,te,se,ee;if(!o.current.search||i.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let fe=0;for(let K of r.current){let ie=(te=(W=n.current.get(K))==null?void 0:W.value)!=null?te:"",xe=(ee=(se=n.current.get(K))==null?void 0:se.keywords)!=null?ee:[],ye=M(ie,xe);o.current.filtered.items.set(K,ye),ye>0&&fe++}for(let[K,ie]of a.current)for(let xe of ie)if(o.current.filtered.items.get(xe)>0){o.current.filtered.groups.add(K);break}o.current.filtered.count=fe}function q(){var W,te,se;let ee=F();ee&&(((W=ee.parentElement)==null?void 0:W.firstChild)===ee&&((se=(te=ee.closest(xl))==null?void 0:te.querySelector(kV))==null||se.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function F(){var W;return(W=w.current)==null?void 0:W.querySelector(`${Q0}[aria-selected="true"]`)}function $(){var W;return Array.from(((W=w.current)==null?void 0:W.querySelectorAll(Z0))||[])}function U(W){let te=$()[W];te&&S.setState("value",te.getAttribute(rs))}function G(W){var te;let se=F(),ee=$(),fe=ee.findIndex(ie=>ie===se),K=ee[fe+W];(te=i.current)!=null&&te.loop&&(K=fe+W<0?ee[ee.length-1]:fe+W===ee.length?ee[0]:ee[fe+W]),K&&S.setState("value",K.getAttribute(rs))}function z(W){let te=F(),se=te?.closest(xl),ee;for(;se&&!ee;)se=W>0?HV(se,xl):UV(se,xl),ee=se?.querySelector(Z0);ee?S.setState("value",ee.getAttribute(rs)):G(W)}let _=()=>U($().length-1),ne=W=>{W.preventDefault(),W.metaKey?_():W.altKey?z(1):G(1)},le=W=>{W.preventDefault(),W.metaKey?U(0):W.altKey?z(-1):G(-1)};return me(Y.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:W=>{var te;(te=x.onKeyDown)==null||te.call(x,W);let se=W.nativeEvent.isComposing||W.keyCode===229;if(!(W.defaultPrevented||se))switch(W.key){case"n":case"j":{v&&W.ctrlKey&&ne(W);break}case"ArrowDown":{ne(W);break}case"p":case"k":{v&&W.ctrlKey&&le(W);break}case"ArrowUp":{le(W);break}case"Home":{W.preventDefault(),U(0);break}case"End":{W.preventDefault(),_();break}case"Enter":{W.preventDefault();let ee=F();if(ee){let fe=new Event(Fm);ee.dispatchEvent(fe)}}}}},me("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:WV},l),sd(e,W=>me(eI.Provider,{value:S},me(J0.Provider,{value:T},W))))}),AV=C((e,t)=>{var o,r;let a=Le(),n=E(null),s=ae(tI),i=yl(),l=rI(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:s?.forceMount;Wa(()=>{if(!u)return i.item(a,s?.id)},[u]);let c=aI(a,n,[e.value,e.children,n],e.keywords),f=_m(),p=Ur(I=>I.value&&I.value===c.current),m=Ur(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(Fm,h),()=>I.removeEventListener(Fm,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 me(Y.div,{ref:Nt(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)}),DV=C((e,t)=>{let{heading:o,children:r,forceMount:a,...n}=e,s=Le(),i=E(null),l=E(null),u=Le(),c=yl(),f=Ur(m=>a||c.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);Wa(()=>c.group(s),[]),aI(s,i,[e.value,e.heading,l]);let p=Z(()=>({id:s,forceMount:a}),[a]);return me(Y.div,{ref:Nt(i,t),...n,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},o&&me("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),sd(e,m=>me("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},me(tI.Provider,{value:p},m))))}),NV=C((e,t)=>{let{alwaysRender:o,...r}=e,a=E(null),n=Ur(s=>!s.search);return!o&&!n?null:me(Y.div,{ref:Nt(a,t),...r,"cmdk-separator":"",role:"separator"})}),OV=C((e,t)=>{let{onValueChange:o,...r}=e,a=e.value!=null,n=_m(),s=Ur(u=>u.search),i=Ur(u=>u.selectedItemId),l=yl();return D(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),me(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)}})}),FV=C((e,t)=>{let{children:o,label:r="Suggestions",...a}=e,n=E(null),s=E(null),i=Ur(u=>u.selectedItemId),l=yl();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)}}},[]),me(Y.div,{ref:Nt(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},sd(e,u=>me("div",{ref:Nt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),_V=C((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:a,contentClassName:n,container:s,...i}=e;return me(ad,{open:o,onOpenChange:r},me(nd,{container:s},me(hl,{"cmdk-overlay":"",className:a}),me(vl,{"aria-label":e.label,"cmdk-dialog":"",className:n},me(oI,{ref:t,...i}))))}),VV=C((e,t)=>Ur(o=>o.filtered.count===0)?me(Y.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),BV=C((e,t)=>{let{progress:o,children:r,label:a="Loading...",...n}=e;return me(Y.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},sd(e,s=>me("div",{"aria-hidden":!0},s)))}),Gr=Object.assign(oI,{List:FV,Item:AV,Input:OV,Group:DV,Separator:NV,Dialog:_V,Empty:VV,Loading:BV});function HV(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function UV(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function rI(e){let t=E(e);return Wa(()=>{t.current=e}),t}var Wa=typeof window>"u"?D:ct;function as(e){let t=E();return t.current===void 0&&(t.current=e()),t}function Ur(e){let t=_m(),o=()=>e(t.snapshot());return Qd(t.subscribe,o,o)}function aI(e,t,o,r=[]){let a=E(),n=yl();return Wa(()=>{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(rs,i),a.current=i}),a}var GV=()=>{let[e,t]=k(),o=as(()=>new Map);return Wa(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,a)=>{o.current.set(r,a),t({})}};function zV(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function sd({asChild:e,children:t},o){return e&&Ee(t)?Fe(zV(t),{ref:t.ref},o(t.props.children)):o(t)}var WV={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};N();var Vm=ad,qV=X0,$V=nd,jV=Nm,KV=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"}}),nI=C(({className:e,variant:t,animation:o,...r},a)=>d(hl,{ref:a,className:L("moonui-theme",KV({variant:t,animation:o}),e),...r}));nI.displayName=hl.displayName;var XV=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"}}),id=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($V,{children:[d(nI,{variant:i,animation:l,onClick:u?void 0:y}),P(vl,{ref:x,onEscapeKeyDown:u?void 0:y,onInteractOutside:u?void 0:y,className:L(XV({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(Bm,{className:"flex gap-4",children:[(p||m||h)&&P("div",{className:"flex shrink-0 items-center justify-center",children:[m&&d(ot,{className:"h-5 w-5 animate-spin text-primary"}),h&&d(pt,{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(bl,{children:c}),f&&d(Hm,{children:f})]})]}),t,!u&&P(Nm,{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(Ot,{className:"h-4 w-4"}),d("span",{className:"sr-only",children:"Close"})]})]})]})});id.displayName=vl.displayName;var Bm=({className:e,...t})=>d("div",{className:L("flex flex-col space-y-2 text-center sm:text-left",e),...t});Bm.displayName="DialogHeader";var sI=({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});sI.displayName="DialogFooter";var bl=C(({className:e,...t},o)=>d(Am,{ref:o,className:L("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));bl.displayName=Am.displayName;var Hm=C(({className:e,...t},o)=>d(Dm,{ref:o,className:L("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));Hm.displayName=Dm.displayName;var iI=C(({className:e,...t},o)=>d("form",{ref:o,className:L("moonui-theme","flex flex-col gap-4",e),...t}));iI.displayName="DialogForm";var YV=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"}}),Um=C(({className:e,variant:t,size:o,...r},a)=>d(Gr,{ref:a,className:L("moonui-theme",YV({variant:t,size:o}),e),...r}));Um.displayName="Command";var ZV=({children:e,commandClassName:t,...o})=>d(Vm,{...o,children:P(id,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[d(bl,{className:"sr-only",children:"Command Menu"}),d(Um,{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})]})}),lI=C(({className:e,...t},o)=>P("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d(la,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),d(Gr.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})]}));lI.displayName="CommandInput";var uI=C(({className:e,...t},o)=>d(Gr.List,{ref:o,className:L("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));uI.displayName="CommandList";var cI=C(({className:e,...t},o)=>d(Gr.Empty,{ref:o,className:L("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));cI.displayName="CommandEmpty";var dI=C(({className:e,...t},o)=>d(Gr.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}));dI.displayName="CommandGroup";var fI=C(({className:e,...t},o)=>d(Gr.Separator,{ref:o,"aria-hidden":"true",className:L("moonui-theme","-mx-1 h-px bg-border",e),...t}));fI.displayName="CommandSeparator";var pI=C(({className:e,...t},o)=>d(Gr.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}));pI.displayName="CommandItem";var mI=({className:e,...t})=>d("span",{className:L("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});mI.displayName="CommandShortcut";N();N();function zr(e,t){return typeof e=="function"?e(t):e}function Bt(e,t){return o=>{t.setState(r=>({...r,[e]:zr(o,r[e])}))}}function dd(e){return e instanceof Function}function QV(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function JV(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 he(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 ve(e,t,o,r){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function eB(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:he(()=>[e,o,t,n],(s,i,l,u)=>({table:s,column:i,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ve(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:he(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},ve(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:he(()=>[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]},ve(e.options,"debugColumns","column.getLeafColumns"))};for(let p of e._features)p.createColumn==null||p.createColumn(f,e);return f}var yt="debugHeaders";function gI(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 oB={createTable:e=>{e.getHeaderGroups=he(()=>[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 ld(t,[...i,...u,...l],e)},ve(e.options,yt,"getHeaderGroups")),e.getCenterHeaderGroups=he(()=>[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))),ld(t,o,e,"center")),ve(e.options,yt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=he(()=>[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 ld(t,n,e,"left")},ve(e.options,yt,"getLeftHeaderGroups")),e.getRightHeaderGroups=he(()=>[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 ld(t,n,e,"right")},ve(e.options,yt,"getRightHeaderGroups")),e.getFooterGroups=he(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ve(e.options,yt,"getFooterGroups")),e.getLeftFooterGroups=he(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ve(e.options,yt,"getLeftFooterGroups")),e.getCenterFooterGroups=he(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ve(e.options,yt,"getCenterFooterGroups")),e.getRightFooterGroups=he(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ve(e.options,yt,"getRightFooterGroups")),e.getFlatHeaders=he(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,yt,"getFlatHeaders")),e.getLeftFlatHeaders=he(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,yt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=he(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,yt,"getCenterFlatHeaders")),e.getRightFlatHeaders=he(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,yt,"getRightFlatHeaders")),e.getCenterLeafHeaders=he(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ve(e.options,yt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=he(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ve(e.options,yt,"getLeftLeafHeaders")),e.getRightLeafHeaders=he(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ve(e.options,yt,"getRightLeafHeaders")),e.getLeafHeaders=he(()=>[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()},ve(e.options,yt,"getLeafHeaders"))}};function ld(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=gI(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)=>gI(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 eg=(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:()=>JV(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:he(()=>[e.getAllLeafColumns()],l=>l.map(u=>eB(e,i,u,u.id)),ve(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:he(()=>[i.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ve(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},rB={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()}}},vI=(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))};vI.autoRemove=e=>wo(e);var xI=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};xI.autoRemove=e=>wo(e);var yI=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};yI.autoRemove=e=>wo(e);var bI=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};bI.autoRemove=e=>wo(e);var CI=(e,t,o)=>!o.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});CI.autoRemove=e=>wo(e)||!(e!=null&&e.length);var wI=(e,t,o)=>o.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});wI.autoRemove=e=>wo(e)||!(e!=null&&e.length);var SI=(e,t,o)=>e.getValue(t)===o;SI.autoRemove=e=>wo(e);var RI=(e,t,o)=>e.getValue(t)==o;RI.autoRemove=e=>wo(e);var tg=(e,t,o)=>{let[r,a]=o,n=e.getValue(t);return n>=r&&n<=a};tg.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]};tg.autoRemove=e=>wo(e)||wo(e[0])&&wo(e[1]);var dr={includesString:vI,includesStringSensitive:xI,equalsString:yI,arrIncludes:bI,arrIncludesAll:CI,arrIncludesSome:wI,equals:SI,weakEquals:RI,inNumberRange:tg};function wo(e){return e==null||e===""}var aB={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Bt("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"?dr.includesString:typeof r=="number"?dr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?dr.equals:Array.isArray(r)?dr.arrIncludes:dr.weakEquals},e.getFilterFn=()=>{var o,r;return dd(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:dr[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=zr(o,n?n.value:void 0);if(hI(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=zr(t,a))==null?void 0:n.filter(s=>{let i=o.find(l=>l.id===s.id);if(i){let l=i.getFilterFn();if(hI(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 hI(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var nB=(e,t,o)=>o.reduce((r,a)=>{let n=a.getValue(e);return r+(typeof n=="number"?n:0)},0),sB=(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},iB=(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},lB=(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]},uB=(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},cB=(e,t)=>{if(!t.length)return;let o=t.map(n=>n.getValue(e));if(!QV(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},dB=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),fB=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,pB=(e,t)=>t.length,Gm={sum:nB,min:sB,max:iB,extent:lB,mean:uB,median:cB,unique:dB,uniqueCount:fB,count:pB},mB={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:Bt("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 Gm.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Gm.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return dd(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:Gm[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 hB={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Bt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=he(o=>[wl(t,o)],o=>o.findIndex(r=>r.id===e.id),ve(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=wl(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let a=wl(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=he(()=>[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)},ve(e.options,"debugTable","_getOrderColumnsFn"))}},zm=()=>({left:[],right:[]}),vB={getInitialState:e=>({columnPinning:zm(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Bt("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=he(()=>[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))},ve(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=he(()=>[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"})),ve(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=he(()=>[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"})),ve(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?zm():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:zm())},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=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),ve(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),ve(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=he(()=>[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))},ve(e.options,"debugColumns","getCenterLeafColumns"))}};function xB(e){return e||(typeof document<"u"?document:null)}var ud={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Wm=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),yB={getDefaultColumnDef:()=>ud,getInitialState:e=>({columnSizing:{},columnSizingInfo:Wm(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Bt("columnSizing",e),onColumnSizingInfoChange:Bt("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:ud.minSize,(r=n??e.columnDef.size)!=null?r:ud.size),(a=e.columnDef.maxSize)!=null?a:ud.maxSize)},e.getStart=he(o=>[o,wl(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((a,n)=>a+n.getSize(),0),ve(t.options,"debugColumns","getStart")),e.getAfter=he(o=>[o,wl(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((a,n)=>a+n.getSize(),0),ve(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(),qm(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=qm(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=xB(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=bB()?{passive:!1}:!1;qm(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?Wm():(o=e.initialState.columnSizingInfo)!=null?o:Wm())},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}}},cd=null;function bB(){if(typeof cd=="boolean")return cd;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 cd=e,cd}function qm(e){return e.type==="touchstart"}var CB={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Bt("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=he(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),ve(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=he(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,a)=>[...o,...r,...a],ve(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>he(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(n=>n.getIsVisible==null?void 0:n.getIsVisible()),ve(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 wl(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var wB={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()}}},SB={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Bt("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=()=>dr.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return dd(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:dr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},RB={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Bt("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()}}}},Xm=0,Ym=10,$m=()=>({pageIndex:Xm,pageSize:Ym}),IB={getInitialState:e=>({...e,pagination:{...$m(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Bt("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=>zr(r,n);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?$m():(a=e.initialState.pagination)!=null?a:$m())},e.setPageIndex=r=>{e.setPagination(a=>{let n=zr(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?Xm:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)!=null?a:Xm)},e.resetPageSize=r=>{var a,n;e.setPageSize(r?Ym:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)!=null?a:Ym)},e.setPageSize=r=>{e.setPagination(a=>{let n=Math.max(1,zr(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=zr(r,(n=e.options.pageCount)!=null?n:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=he(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((n,s)=>s)),a},ve(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}}},jm=()=>({top:[],bottom:[]}),PB={getInitialState:e=>({rowPinning:jm(),...e}),getDefaultOptions:e=>({onRowPinningChange:Bt("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?jm():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:jm())},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=he(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),ve(e.options,"debugRows","getTopRows")),e.getBottomRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),ve(e.options,"debugRows","getBottomRows")),e.getCenterRows=he(()=>[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))},ve(e.options,"debugRows","getCenterRows"))}},LB={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Bt("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=>{Zm(a,n.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=he(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?Km(e,o):{rows:[],flatRows:[],rowsById:{}},ve(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=he(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?Km(e,o):{rows:[],flatRows:[],rowsById:{}},ve(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=he(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?Km(e,o):{rows:[],flatRows:[],rowsById:{}},ve(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 Zm(i,e.id,o,(s=r?.selectChildren)!=null?s:!0,t),i})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return og(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return Qm(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return Qm(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)}}}},Zm=(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=>Zm(e,i.id,o,r,a))};function Km(e,t){let o=e.getState().rowSelection,r=[],a={},n=function(s,i){return s.map(l=>{var u;let c=og(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 og(e,t){var o;return(o=t[e.id])!=null?o:!1}function Qm(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()&&(og(s,t)?n=!0:a=!1),s.subRows&&s.subRows.length)){let i=Qm(s,t);i==="all"?n=!0:(i==="some"&&(n=!0),a=!1)}}),a?"all":n?"some":!1}var Jm=/([0-9]+)/gm,TB=(e,t,o)=>II(Wr(e.getValue(o)).toLowerCase(),Wr(t.getValue(o)).toLowerCase()),MB=(e,t,o)=>II(Wr(e.getValue(o)),Wr(t.getValue(o))),kB=(e,t,o)=>rg(Wr(e.getValue(o)).toLowerCase(),Wr(t.getValue(o)).toLowerCase()),EB=(e,t,o)=>rg(Wr(e.getValue(o)),Wr(t.getValue(o))),AB=(e,t,o)=>{let r=e.getValue(o),a=t.getValue(o);return r>a?1:r<a?-1:0},DB=(e,t,o)=>rg(e.getValue(o),t.getValue(o));function rg(e,t){return e===t?0:e>t?1:-1}function Wr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function II(e,t){let o=e.split(Jm).filter(Boolean),r=t.split(Jm).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 Cl={alphanumeric:TB,alphanumericCaseSensitive:MB,text:kB,textCaseSensitive:EB,datetime:AB,basic:DB},NB={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Bt("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 Cl.datetime;if(typeof n=="string"&&(r=!0,n.split(Jm).length>1))return Cl.alphanumeric}return r?Cl.text:Cl.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 dd(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:Cl[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())}},OB=[oB,CB,hB,vB,rB,aB,wB,SB,NB,mB,RB,IB,PB,LB,yB];function PI(e){var t,o;let r=[...OB,...(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=zr(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:he(()=>[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}},ve(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>a.options.columns,getAllColumns:he(()=>[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)},ve(e,"debugColumns","getAllColumns")),getAllFlatColumns:he(()=>[a.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),ve(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:he(()=>[a.getAllFlatColumns()],p=>p.reduce((m,h)=>(m[h.id]=h,m),{}),ve(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:he(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(p,m)=>{let h=p.flatMap(g=>g.getLeafColumns());return m(h)},ve(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 LI(){return e=>he(()=>[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=eg(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},ve(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function FB(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 _B(e,t,o){return o.options.filterFromLeafRows?VB(e,t,o):BB(e,t,o)}function VB(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=eg(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 BB(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=eg(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 TI(){return e=>he(()=>[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 _B(t.rows,f,e)},ve(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function MI(e){return t=>he(()=>[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=FB({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},ve(t.options,"debugTable","getPaginationRowModel"))}function kI(){return e=>he(()=>[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}},ve(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function ag(e,t){return e?HB(e)?me(e,t):e:null}function HB(e){return UB(e)||typeof e=="function"||GB(e)}function UB(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function GB(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function EI(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=k(()=>({current:PI(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 AI=ce(null),fd=ce(!1),zB="odd:bg-muted/50 hover:bg-accent";function WB(e){return e==="asc"?"desc":e==="desc"?null:"asc"}var qB=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"}}),pd=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(AI.Provider,{value:v,children:d(fd.Provider,{value:g,children:d("table",{ref:h,className:L(qB({variant:t,size:o}),r&&"opacity-70",e),...m,children:p})})})]})});pd.displayName="Table";var md=C(({className:e,children:t,...o},r)=>d("thead",{ref:r,className:L("moonui-theme","[&_tr]:border-b",e),...o,children:d(fd.Provider,{value:!1,children:t})}));md.displayName="TableHeader";var gd=C(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...a},n)=>{let s=Ie.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})})})})})});gd.displayName="TableBody";var DI=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(fd.Provider,{value:!1,children:t})}));DI.displayName="TableFooter";var ns=C(({className:e,...t},o)=>{let r=ae(fd);return d("tr",{ref:o,className:L("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r&&zB,e),...t})});ns.displayName="TableRow";var hd=C(({className:e,sortable:t,sorted:o,onSort:r,columnId:a,align:n="left",children:s,...i},l)=>{let u=ae(AI),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,WB(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})});hd.displayName="TableHead";var Sl=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})});Sl.displayName="TableCell";var NI=C(({className:e,...t},o)=>d("caption",{ref:o,className:L("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));NI.displayName="TableCaption";function $B({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=EI({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:a?p:void 0,getCoreRowModel:LI(),getPaginationRowModel:r?MI():void 0,getSortedRowModel:o?kI():void 0,getFilteredRowModel:a?TI():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(la,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),d(xt,{placeholder:s,value:f,onChange:h=>p(h.target.value),className:"pl-8"})]})}),d("div",{className:"rounded-md border",children:P(pd,{children:[d(md,{children:m.getHeaderGroups().map(h=>d(ns,{children:h.headers.map(g=>{let v=o&&g.column.getCanSort(),x=g.column.getIsSorted(),y=g.column.columnDef.header;return d(hd,{"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:[ag(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(Qa,{className:"h-4 w-4"}):x==="asc"?d(en,{className:"h-4 w-4"}):d(Ja,{className:"h-4 w-4 opacity-50"})})]})},g.id)})},h.id))}),d(gd,{children:m.getRowModel().rows?.length?m.getRowModel().rows.map(h=>d(ns,{"data-state":h.getIsSelected()&&"selected",children:h.getVisibleCells().map(g=>d(Sl,{children:ag(g.column.columnDef.cell,g.getContext())},g.id))},h.id)):d(ns,{children:d(Sl,{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(Te,{variant:"outline",size:"sm",onClick:()=>m.previousPage(),disabled:!m.getCanPreviousPage(),children:[d(no,{className:"h-4 w-4"}),"Previous"]}),P("span",{className:"text-sm",children:["Page ",m.getState().pagination.pageIndex+1," of"," ",m.getPageCount()]}),P(Te,{variant:"outline",size:"sm",onClick:()=>m.nextPage(),disabled:!m.getCanNextPage(),children:["Next",d(wt,{className:"h-4 w-4"})]})]})]})]})}function jB(e){return({column:t})=>P(Te,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?d(Qa,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?d(en,{className:"ml-2 h-4 w-4"}):d(Ja,{className:"ml-2 h-4 w-4"})]})}N();var KB={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},ng=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"}}),sg=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&&Cc(M)?go(M,l):null,U=g||d(aa,{className:"h-4 w-4"});return d("div",{ref:I,className:"moonui-theme",children:P("div",{className:"relative",children:[P(lr,{open:S,onOpenChange:T,children:[d(ur,{asChild:!0,children:d(Te,{variant:o==="ghost"?"ghost":"outline",className:L(ng({variant:o,size:r,state:a}),!$&&"text-muted-foreground",v&&$&&!x&&!R&&"pr-9",t),disabled:R||x,...w,children:d(Xo,{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(Bo,{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,{...KB,className:"rounded-2xl bg-background overflow-hidden",children:[d(Zi,{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(Te,{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"})})})]})})});sg.displayName="DatePicker";var OI=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?`${go(f.from,n)}${s}${go(f.to,n)}`:go(f.from,n):null,[f,n,s]);return P(lr,{open:u,onOpenChange:c,children:[d(ur,{asChild:!0,children:P(Te,{ref:l,variant:i.variant==="ghost"?"ghost":"outline",className:L(ng({variant:i.variant,size:i.size,state:i.state}),!h&&"text-muted-foreground",t),disabled:i.disabled||i.readOnly,children:[d(aa,{className:"mr-2 h-4 w-4"}),d("span",{className:"flex-1 truncate text-left",children:h||a})]})}),d(Bo,{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(Zi,{mode:"range",defaultMonth:f?.from,selected:f,onSelect:m,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})});OI.displayName="DateRangePicker";var FI=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?go(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(sg,{...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(Fs,{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))})]})]})});FI.displayName="DateTimePicker";var _I=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?go(t,a):null;return P(lr,{open:i,onOpenChange:l,children:[d(ur,{asChild:!0,children:P(Te,{ref:s,variant:n.variant==="default"?"outline":n.variant||"outline",className:L(ng({variant:n.variant,size:n.size,state:n.state}),!h&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[d(aa,{className:"mr-2 h-4 w-4"}),h||r]})}),d(Bo,{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(Te,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>m(-1),children:d(no,{className:"h-4 w-4"})}),d("span",{className:"font-semibold",children:u.getFullYear()}),d(Te,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>m(1),children:d(wt,{className:"h-4 w-4"})})]}),d("div",{className:"grid grid-cols-3 gap-2",children:f.map((g,v)=>d(Te,{variant:t&&t.getMonth()===v?"primary":"outline",size:"sm",onClick:()=>p(v),className:"h-8 text-xs",children:g.slice(0,3)},g))})]})})]})});_I.displayName="MonthPicker";N();function XB({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 ig=["Enter"," "],YB=["ArrowDown","PageUp","Home"],BI=["ArrowUp","PageDown","End"],ZB=[...YB,...BI],QB={ltr:[...ig,"ArrowRight"],rtl:[...ig,"ArrowLeft"]},JB={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ll="Menu",[Il,eH,tH]=Lo(Ll),[qa,lg]=ke(Ll,[tH,Kt,es]),Tl=Kt(),HI=es(),[UI,qr]=qa(Ll),[oH,Ml]=qa(Ll),GI=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:a,onOpenChange:n,modal:s=!0}=e,i=Tl(t),[l,u]=k(null),c=E(!1),f=ze(n),p=To(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(nr,{...i,children:d(UI,{scope:t,open:o,onOpenChange:f,content:l,onContentChange:u,children:d(oH,{scope:t,onClose:H(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:p,modal:s,children:r})})})};GI.displayName=Ll;var rH="MenuAnchor",ug=C((e,t)=>{let{__scopeMenu:o,...r}=e,a=Tl(o);return d(sr,{...a,...r,ref:t})});ug.displayName=rH;var cg="MenuPortal",[aH,zI]=qa(cg,{forceMount:void 0}),WI=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:a}=e,n=qr(cg,t);return d(aH,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Vt,{asChild:!0,container:a,children:r})})})};WI.displayName=cg;var Xt="MenuContent",[nH,dg]=qa(Xt),qI=C((e,t)=>{let o=zI(Xt,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=qr(Xt,e.__scopeMenu),s=Ml(Xt,e.__scopeMenu);return d(Il.Provider,{scope:e.__scopeMenu,children:d($e,{present:r||n.open,children:d(Il.Slot,{scope:e.__scopeMenu,children:s.modal?d(sH,{...a,ref:t}):d(iH,{...a,ref:t})})})})}),sH=C((e,t)=>{let o=qr(Xt,e.__scopeMenu),r=E(null),a=pe(t,r);return D(()=>{let n=r.current;if(n)return Br(n)},[]),d(fg,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),iH=C((e,t)=>{let o=qr(Xt,e.__scopeMenu);return d(fg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),lH=It("MenuContent.ScrollLock"),fg=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=qr(Xt,o),x=Ml(Xt,o),y=Tl(o),b=HI(o),R=eH(o),[w,I]=k(null),S=E(null),T=pe(t,S,v.onContentChange),M=E(0),A=E(""),O=E(0),V=E(null),q=E("right"),F=E(0),$=h?ir:Je,U=h?{as:lH,allowPinchZoom:!0}:void 0,G=_=>{let ne=A.current+_,le=R().filter(K=>!K.disabled),W=document.activeElement,te=le.find(K=>K.ref.current===W)?.textValue,se=le.map(K=>K.textValue),ee=bH(se,ne,te),fe=le.find(K=>K.textValue===ee)?.ref.current;(function K(ie){A.current=ie,window.clearTimeout(M.current),ie!==""&&(M.current=window.setTimeout(()=>K(""),1e3))})(ne),fe&&setTimeout(()=>fe.focus())};D(()=>()=>window.clearTimeout(M.current),[]),Or();let z=H(_=>q.current===V.current?.side&&wH(_,V.current?.area),[]);return d(nH,{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(rr,{asChild:!0,trapped:a,onMountAutoFocus:X(n,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d(qt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:d(Zc,{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(_r,{role:"menu","aria-orientation":"vertical","data-state":lP(v.open),"data-radix-menu-content":"",dir:x.dir,...y,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:X(g.onKeyDown,_=>{let le=_.target.closest("[data-radix-menu-content]")===_.currentTarget,W=_.ctrlKey||_.altKey||_.metaKey,te=_.key.length===1;le&&(_.key==="Tab"&&_.preventDefault(),!W&&te&&G(_.key));let se=S.current;if(_.target!==se||!ZB.includes(_.key))return;_.preventDefault();let fe=R().filter(K=>!K.disabled).map(K=>K.ref.current);BI.includes(_.key)&&fe.reverse(),xH(fe)}),onBlur:X(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(M.current),A.current="")}),onPointerMove:X(e.onPointerMove,Pl(_=>{let ne=_.target,le=F.current!==_.clientX;if(_.currentTarget.contains(ne)&&le){let W=_.clientX>F.current?"right":"left";q.current=W,F.current=_.clientX}}))})})})})})})});qI.displayName=Xt;var uH="MenuGroup",pg=C((e,t)=>{let{__scopeMenu:o,...r}=e;return d(Y.div,{role:"group",...r,ref:t})});pg.displayName=uH;var cH="MenuLabel",$I=C((e,t)=>{let{__scopeMenu:o,...r}=e;return d(Y.div,{...r,ref:t})});$I.displayName=cH;var vd="MenuItem",VI="menu.itemSelect",yd=C((e,t)=>{let{disabled:o=!1,onSelect:r,...a}=e,n=E(null),s=Ml(vd,e.__scopeMenu),i=dg(vd,e.__scopeMenu),l=pe(t,n),u=E(!1),c=()=>{let f=n.current;if(!o&&f){let p=new CustomEvent(VI,{bubbles:!0,cancelable:!0});f.addEventListener(VI,m=>r?.(m),{once:!0}),Ya(f,p),p.defaultPrevented?u.current=!1:s.onClose()}};return d(jI,{...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===" "||ig.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});yd.displayName=vd;var jI=C((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:a,...n}=e,s=dg(vd,o),i=HI(o),l=E(null),u=pe(t,l),[c,f]=k(!1),[p,m]=k("");return D(()=>{let h=l.current;h&&m((h.textContent??"").trim())},[n.children]),d(Il.ItemSlot,{scope:o,disabled:r,textValue:a??p,children:d(Qc,{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,Pl(h=>{r?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,Pl(h=>s.onItemLeave(h))),onFocus:X(e.onFocus,()=>f(!0)),onBlur:X(e.onBlur,()=>f(!1))})})})}),dH="MenuCheckboxItem",KI=C((e,t)=>{let{checked:o=!1,onCheckedChange:r,...a}=e;return d(JI,{scope:e.__scopeMenu,checked:o,children:d(yd,{role:"menuitemcheckbox","aria-checked":xd(o)?"mixed":o,...a,ref:t,"data-state":hg(o),onSelect:X(a.onSelect,()=>r?.(xd(o)?!0:!o),{checkForDefaultPrevented:!1})})})});KI.displayName=dH;var XI="MenuRadioGroup",[fH,pH]=qa(XI,{value:void 0,onValueChange:()=>{}}),YI=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(pg,{...a,ref:t})})});YI.displayName=XI;var ZI="MenuRadioItem",QI=C((e,t)=>{let{value:o,...r}=e,a=pH(ZI,e.__scopeMenu),n=o===a.value;return d(JI,{scope:e.__scopeMenu,checked:n,children:d(yd,{role:"menuitemradio","aria-checked":n,...r,ref:t,"data-state":hg(n),onSelect:X(r.onSelect,()=>a.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});QI.displayName=ZI;var mg="MenuItemIndicator",[JI,mH]=qa(mg,{checked:!1}),eP=C((e,t)=>{let{__scopeMenu:o,forceMount:r,...a}=e,n=mH(mg,o);return d($e,{present:r||xd(n.checked)||n.checked===!0,children:d(Y.span,{...a,ref:t,"data-state":hg(n.checked)})})});eP.displayName=mg;var gH="MenuSeparator",tP=C((e,t)=>{let{__scopeMenu:o,...r}=e;return d(Y.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tP.displayName=gH;var hH="MenuArrow",oP=C((e,t)=>{let{__scopeMenu:o,...r}=e,a=Tl(o);return d(Vr,{...a,...r,ref:t})});oP.displayName=hH;var gg="MenuSub",[vH,rP]=qa(gg),aP=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:a}=e,n=qr(gg,t),s=Tl(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(nr,{...s,children:d(UI,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:c,children:d(vH,{scope:t,contentId:Le(),triggerId:Le(),trigger:i,onTriggerChange:l,children:o})})})};aP.displayName=gg;var Rl="MenuSubTrigger",nP=C((e,t)=>{let o=qr(Rl,e.__scopeMenu),r=Ml(Rl,e.__scopeMenu),a=rP(Rl,e.__scopeMenu),n=dg(Rl,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(ug,{asChild:!0,...u,children:d(jI,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":lP(o.open),...e,ref:Nt(t,a.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,Pl(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,Pl(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===" "||QB[r.dir].includes(f.key)&&(o.onOpenChange(!0),o.content?.focus(),f.preventDefault())})})})});nP.displayName=Rl;var sP="MenuSubContent",iP=C((e,t)=>{let o=zI(Xt,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=qr(Xt,e.__scopeMenu),s=Ml(Xt,e.__scopeMenu),i=rP(sP,e.__scopeMenu),l=E(null),u=pe(t,l);return d(Il.Provider,{scope:e.__scopeMenu,children:d($e,{present:r||n.open,children:d(Il.Slot,{scope:e.__scopeMenu,children:d(fg,{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=JB[s.dir].includes(c.key);f&&p&&(n.onOpenChange(!1),i.trigger?.focus(),c.preventDefault())})})})})})});iP.displayName=sP;function lP(e){return e?"open":"closed"}function xd(e){return e==="indeterminate"}function hg(e){return xd(e)?"indeterminate":e?"checked":"unchecked"}function xH(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function yH(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function bH(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=yH(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 CH(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 wH(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return CH(o,t)}function Pl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var uP=GI,cP=ug,dP=WI,fP=qI,pP=pg,mP=$I,gP=yd,hP=KI,vP=YI,xP=QI,yP=eP,bP=tP,CP=oP,wP=aP,SP=nP,RP=iP;var bd="DropdownMenu",[RH,age]=ke(bd,[lg]),bt=lg(),[IH,IP]=RH(bd),PP=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:a,defaultOpen:n,onOpenChange:s,modal:i=!0}=e,l=bt(t),u=E(null),[c,f]=Be({prop:a,defaultProp:n??!1,onChange:s,caller:bd});return d(IH,{scope:t,triggerId:Le(),triggerRef:u,contentId:Le(),open:c,onOpenChange:f,onOpenToggle:H(()=>f(p=>!p),[f]),modal:i,children:d(uP,{...l,open:c,onOpenChange:f,dir:r,modal:i,children:o})})};PP.displayName=bd;var LP="DropdownMenuTrigger",TP=C((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...a}=e,n=IP(LP,o),s=bt(o);return d(cP,{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:Nt(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())})})})});TP.displayName=LP;var PH="DropdownMenuPortal",MP=e=>{let{__scopeDropdownMenu:t,...o}=e,r=bt(t);return d(dP,{...r,...o})};MP.displayName=PH;var kP="DropdownMenuContent",EP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=IP(kP,o),n=bt(o),s=E(!1);return d(fP,{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)"}})});EP.displayName=kP;var LH="DropdownMenuGroup",AP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(pP,{...a,...r,ref:t})});AP.displayName=LH;var TH="DropdownMenuLabel",DP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(mP,{...a,...r,ref:t})});DP.displayName=TH;var MH="DropdownMenuItem",NP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(gP,{...a,...r,ref:t})});NP.displayName=MH;var kH="DropdownMenuCheckboxItem",OP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(hP,{...a,...r,ref:t})});OP.displayName=kH;var EH="DropdownMenuRadioGroup",FP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(vP,{...a,...r,ref:t})});FP.displayName=EH;var AH="DropdownMenuRadioItem",_P=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(xP,{...a,...r,ref:t})});_P.displayName=AH;var DH="DropdownMenuItemIndicator",VP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(yP,{...a,...r,ref:t})});VP.displayName=DH;var NH="DropdownMenuSeparator",BP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(bP,{...a,...r,ref:t})});BP.displayName=NH;var OH="DropdownMenuArrow",FH=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(CP,{...a,...r,ref:t})});FH.displayName=OH;var _H=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:a,defaultOpen:n}=e,s=bt(t),[i,l]=Be({prop:r,defaultProp:n??!1,onChange:a,caller:"DropdownMenuSub"});return d(wP,{...s,open:i,onOpenChange:l,children:o})},VH="DropdownMenuSubTrigger",HP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(SP,{...a,...r,ref:t})});HP.displayName=VH;var BH="DropdownMenuSubContent",UP=C((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=bt(o);return d(RP,{...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)"}})});UP.displayName=BH;var GP=PP,zP=TP,vg=MP,xg=EP,WP=AP,yg=DP,bg=NP,Cg=OP,qP=FP,wg=_P,Sg=VP,Rg=BP;var $P=_H,Ig=HP,Pg=UP;var UH=GP,GH=zP,zH=WP,WH=vg,qH=$P,$H=qP,jP=C(({className:e,inset:t,children:o,...r},a)=>P(Ig,{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(wt,{className:"ml-auto h-4 w-4"})]}));jP.displayName=Ig.displayName;var KP=C(({className:e,...t},o)=>d(Pg,{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}));KP.displayName=Pg.displayName;var XP=C(({className:e,sideOffset:t=4,...o},r)=>d(vg,{children:d(xg,{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})}));XP.displayName=xg.displayName;var YP=C(({className:e,inset:t,...o},r)=>d(bg,{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}));YP.displayName=bg.displayName;var ZP=C(({className:e,children:t,checked:o,...r},a)=>P(Cg,{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(Sg,{children:d(pt,{className:"h-4 w-4"})})}),t]}));ZP.displayName=Cg.displayName;var QP=C(({className:e,children:t,...o},r)=>P(wg,{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(Sg,{children:d(na,{className:"h-2 w-2 fill-current"})})}),t]}));QP.displayName=wg.displayName;var JP=C(({className:e,inset:t,...o},r)=>d(yg,{ref:r,className:L("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));JP.displayName=yg.displayName;var eL=C(({className:e,...t},o)=>d(Rg,{ref:o,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));eL.displayName=Rg.displayName;var tL=({className:e,...t})=>d("span",{className:L("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});tL.displayName="DropdownMenuShortcut";N();N();var jH=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"}}),KH=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"}}),Cd=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",jH({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(KH({variant:s??o??"primary",animation:n}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});Cd.displayName="Progress";var XH=e=>e.startsWith("image/")?d(ia,{className:"h-4 w-4"}):e.startsWith("video/")?d(ai,{className:"h-4 w-4"}):e.startsWith("audio/")?d(Ys,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?d(Gs,{className:"h-4 w-4"}):d(zs,{className:"h-4 w-4"}),Lg=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]},YH=(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},ZH=(e,t)=>{let o=t.trim();return o===""||o==="*"?!0:o.split(",").some(r=>YH(e,r))},QH=({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:XH(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(Te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),"aria-label":`Remove ${r.name}`,children:d(Ot,{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:Lg(r.size)}),n==="uploading"&&P(Lt,{variant:"secondary",className:"h-5",children:[d(ot,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),n==="success"&&P(Lt,{variant:"success",className:"h-5",children:[d(hr,{className:"h-3 w-3 mr-1"}),"Done"]}),n==="error"&&P(Lt,{variant:"destructive",className:"h-5",children:[d(so,{className:"h-3 w-3 mr-1"}),"Error"]})]}),n==="uploading"&&d("div",{className:"mt-2",children:d(Cd,{value:a,className:"h-1"})})]})]})},oL=Pe.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 ${Lg(o)}`:ZH(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(ri,{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, ",Lg(o)," each"]})]}),d(Te,{variant:"outline",disabled:a,children:"Select Files"})]})]}),d(Xo,{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(so,{className:"h-4 w-4"}),d("span",{children:g})]})}),d(Xo,{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(Xo,{children:f.map(T=>d(QH,{uploadedFile:T,onRemove:S},T.id))})})]})})]})});oL.displayName="FileUpload";N();var rL=Pe.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:a=50,className:n,overlayClassName:s,enableSwipeToClose:i=!0,...l},u)=>{let c=Bn(0),f=Bn(0),p=r==="up"||r==="down",m=p?c:f,h=Ip(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):Lp(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});rL.displayName="GestureDrawer";N();function JH({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(vr,{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(Ws,{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(sa,{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 Fge({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(Te,{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(vr,{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(Us,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}N();N();N();N();var eU=Object.defineProperty,tU=Object.defineProperties,oU=Object.getOwnPropertyDescriptors,wd=Object.getOwnPropertySymbols,nL=Object.prototype.hasOwnProperty,sL=Object.prototype.propertyIsEnumerable,aL=(e,t,o)=>t in e?eU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,rU=(e,t)=>{for(var o in t||(t={}))nL.call(t,o)&&aL(e,o,t[o]);if(wd)for(var o of wd(t))sL.call(t,o)&&aL(e,o,t[o]);return e},aU=(e,t)=>tU(e,oU(t)),nU=(e,t)=>{var o={};for(var r in e)nL.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&wd)for(var r of wd(e))t.indexOf(r)<0&&sL.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 iU(e){let t=E();return D(()=>{t.current=e}),t.current}var lU=18,iL=40,uU=`${iL}px`,cU=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function dU({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-lU,y=v;document.querySelectorAll(cU).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>=iL)}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:uU}}var Tg=ce({}),Mg=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=fU,render:g,children:v}=o,x=nU(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=iU(M),O=H(re=>{a?.(re),T(re)},[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]});ta(t,()=>q.current,[]),D(()=>{let re=q.current,ue=F.current;if(!re||!ue)return;$.current.value!==re.value&&$.current.onChange(re.value),U.current.prev=[re.selectionStart,re.selectionEnd,re.selectionDirection];function Oe(){if(document.activeElement!==re){W(null),se(null);return}let Me=re.selectionStart,Qe=re.selectionEnd,Ro=re.selectionDirection,Ct=re.maxLength,oo=re.value,Ht=U.current.prev,ro=-1,Io=-1,Po;if(oo.length!==0&&Me!==null&&Qe!==null){let Cs=Me===Qe,ws=Me===oo.length&&oo.length<Ct;if(Cs&&!ws){let Ut=Me;if(Ut===0)ro=0,Io=1,Po="forward";else if(Ut===Ct)ro=Ut-1,Io=Ut,Po="backward";else if(Ct>1&&oo.length>1){let Ss=0;if(Ht[0]!==null&&Ht[1]!==null){Po=Ut<Ht[1]?"backward":"forward";let Yd=Ht[0]===Ht[1]&&Ht[0]<Ct;Po==="backward"&&!Yd&&(Ss=-1)}ro=Ss+Ut,Io=Ss+Ut+1}}ro!==-1&&Io!==-1&&ro!==Io&&q.current.setSelectionRange(ro,Io,Po)}let ql=ro!==-1?ro:Me,Xa=Io!==-1?Io:Qe,gr=Po??Ro;W(ql),se(Xa),U.current.prev=[ql,Xa,gr]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===re&&ne(!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;";kl(Me.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),kl(Me.sheet,`[data-input-otp]:autofill { ${Qe} }`),kl(Me.sheet,`[data-input-otp]:-webkit-autofill { ${Qe} }`),kl(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; } }"),kl(Me.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ue=()=>{ue&&ue.style.setProperty("--root-height",`${re.clientHeight}px`)};Ue();let tt=new ResizeObserver(Ue);return tt.observe(re),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),tt.disconnect()}},[]);let[G,z]=k(!1),[_,ne]=k(!1),[le,W]=k(null),[te,se]=k(null);D(()=>{sU(()=>{var re,ue,Oe,Ue;(re=q.current)==null||re.dispatchEvent(new Event("input"));let tt=(ue=q.current)==null?void 0:ue.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),se(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=dU({containerRef:F,inputRef:q,pushPasswordManagerStrategy:f,isFocused:_}),fe=H(re=>{let ue=re.currentTarget.value.slice(0,n);if(ue.length>0&&V&&!V.test(ue)){re.preventDefault();return}typeof A=="string"&&ue.length<A.length&&document.dispatchEvent(new Event("selectionchange")),O(ue)},[n,O,A,V]),K=H(()=>{var re;if(q.current){let ue=Math.min(q.current.value.length,n-1),Oe=q.current.value.length;(re=q.current)==null||re.setSelectionRange(ue,Oe),W(ue),se(Oe)}ne(!0)},[n]),ie=H(re=>{var ue,Oe;let Ue=q.current;if(!p&&(!$.current.isIOS||!re.clipboardData||!Ue))return;let tt=re.clipboardData.getData("text/plain"),Me=p?p(tt):tt;re.preventDefault();let Qe=(ue=q.current)==null?void 0:ue.selectionStart,Ro=(Oe=q.current)==null?void 0:Oe.selectionEnd,Ct=(Qe!==Ro?M.slice(0,Qe)+Me+M.slice(Ro):M.slice(0,Qe)+Me+M.slice(Qe)).slice(0,n);if(Ct.length>0&&V&&!V.test(Ct))return;Ue.value=Ct,O(Ct);let oo=Math.min(Ct.length,n-1),Ht=Ct.length;Ue.setSelectionRange(oo,Ht),W(oo),se(Ht)},[n,O,V,M]),xe=Z(()=>({position:"relative",cursor:x.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[x.disabled]),ye=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]),ge=Z(()=>me("input",aU(rU({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":le,"data-input-otp-mse":te,inputMode:u,pattern:V?.source,"aria-placeholder":l,style:ye,maxLength:n,value:M,ref:q,onPaste:re=>{var ue;ie(re),(ue=x.onPaste)==null||ue.call(x,re)},onChange:fe,onMouseOver:re=>{var ue;z(!0),(ue=x.onMouseOver)==null||ue.call(x,re)},onMouseLeave:re=>{var ue;z(!1),(ue=x.onMouseLeave)==null||ue.call(x,re)},onFocus:re=>{var ue;K(),(ue=x.onFocus)==null||ue.call(x,re)},onBlur:re=>{var ue;ne(!1),(ue=x.onBlur)==null||ue.call(x,re)}})),[fe,K,ie,u,ye,n,te,le,x,V?.source,M]),J=Z(()=>({slots:Array.from({length:n}).map((re,ue)=>{var Oe;let Ue=_&&le!==null&&te!==null&&(le===te&&ue===le||ue>=le&&ue<te),tt=M[ue]!==void 0?M[ue]:null,Me=M[0]!==void 0?null:(Oe=l?.[ue])!=null?Oe:null;return{char:tt,placeholderChar:Me,isActive:Ue,hasFakeCaret:Ue&&tt===null}}),isFocused:_,isHovering:!x.disabled&&G}),[_,G,n,te,le,x.disabled,M]),be=Z(()=>g?g(J):me(Tg.Provider,{value:J},v),[v,J,g]);return me(Je,null,h!==null&&me("noscript",null,me("style",null,h)),me("div",{ref:F,"data-input-otp-container":!0,style:xe,className:m},be,me("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ge)))});Mg.displayName="Input";function kl(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var fU=`
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
+ }`,pU="^\\d+$",mU="^[a-zA-Z]+$",gU="^[a-zA-Z0-9]+$";var lL=C(({className:e,containerClassName:t,...o},r)=>d(Mg,{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}));lL.displayName="InputOTP";var uL=C(({className:e,...t},o)=>d("div",{ref:o,className:L("flex items-center",e),...t}));uL.displayName="InputOTPGroup";var cL=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}}),dL=C(({index:e,className:t,...o},r)=>{let n=ae(Tg)?.slots?.[e],s=n?.char,i=n?.hasFakeCaret,l=n?.isActive;return P("div",{ref:r,"data-active":l?"":void 0,className:L(cL({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"})})]})});dL.displayName="InputOTPSlot";var fL=C(({className:e,...t},o)=>d("div",{ref:o,role:"separator",className:L("text-muted-foreground",e),...t,children:d(Hs,{"aria-hidden":"true"})}));fL.displayName="InputOTPSeparator";N();function pL({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(Lt,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[d(tn,{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(rn,{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(Te,{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(nn,{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 hU({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(Lt,{variant:"destructive",className:"mb-2",children:[d(rn,{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(Lt,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[d(nn,{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(Te,{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(pL,{componentName:o||t,className:r,children:a||e})}return d("div",{className:r,children:e})}function vU({className:e}){return P(Lt,{variant:"secondary",className:L("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[d(tn,{className:"w-3 h-3 mr-1"}),"PRO"]})}function xU({className:e}){return d(Lt,{variant:"outline",className:L("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}N();function kg({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 rhe({className:e,variant:t="default",...o}){return d(kg,{showText:!1,className:e,variant:t,...o})}function ahe({className:e,variant:t="default",showText:o=!0,...r}){return d(kg,{className:L("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}N();var mL=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}));mL.displayName="Pagination";var gL=C(({className:e,...t},o)=>d("ul",{ref:o,className:L("moonui-theme","flex flex-row items-center gap-1",e),...t}));gL.displayName="PaginationContent";var hL=C(({className:e,...t},o)=>d("li",{ref:o,className:L("moonui-theme","",e),...t}));hL.displayName="PaginationItem";var Sd=C(({className:e,isActive:t,size:o="icon",...r},a)=>d("a",{ref:a,"aria-current":t?"page":void 0,className:L(ru({variant:t?"outline":"ghost",size:o}),e),...r}));Sd.displayName="PaginationLink";var vL="hidden sm:inline",xL=C(({className:e,...t},o)=>P(Sd,{ref:o,"aria-label":"Go to previous page",size:"md",className:L("moonui-theme","gap-1 pl-2.5",e),...t,children:[d(no,{className:"h-4 w-4"}),d("span",{className:vL,children:"Previous"})]}));xL.displayName="PaginationPrevious";var yL=C(({className:e,...t},o)=>P(Sd,{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:vL,children:"Next"}),d(wt,{className:"h-4 w-4"})]}));yL.displayName="PaginationNext";var bL=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(ko,{className:"h-4 w-4"})}),d("span",{className:"sr-only",children:"More pages"})]}));bL.displayName="PaginationEllipsis";N();N();N();function Eg(e,[t,o]){return Math.min(o,Math.max(t,e))}N();var Ag=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"}),yU="VisuallyHidden",El=C((e,t)=>d(Y.span,{...e,ref:t,style:{...Ag,...e.style}}));El.displayName=yU;var CL=El;var CU=[" ","Enter","ArrowUp","ArrowDown"],wU=[" ","Enter"],$a="Select",[Id,Pd,SU]=Lo($a),[ss,Vhe]=ke($a,[SU,Kt]),Ld=Kt(),[RU,$r]=ss($a),[IU,PU]=ss($a),wL=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=Ld(t),[v,x]=k(null),[y,b]=k(null),[R,w]=k(!1),I=To(u),[S,T]=Be({prop:r,defaultProp:a??!1,onChange:n,caller:$a}),[M,A]=Be({prop:s,defaultProp:i,onChange:l,caller:$a}),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(nr,{...g,children:P(RU,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:R,onValueNodeHasChildrenChange:w,contentId:Le(),value:M,onValueChange:A,open:S,onOpenChange:T,dir:I,triggerPointerDownPosRef:O,disabled:p,children:[d(Id.Provider,{scope:t,children:d(IU,{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(jL,{"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]})})};wL.displayName=$a;var SL="SelectTrigger",RL=C((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Ld(o),s=$r(SL,o),i=s.disabled||r,l=pe(t,s.onTriggerChange),u=Pd(o),c=E("touch"),[f,p,m]=XL(g=>{let v=u().filter(b=>!b.disabled),x=v.find(b=>b.value===s.value),y=YL(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(sr,{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":KL(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===" ")&&CU.includes(g.key)&&(h(),g.preventDefault())})})})});RL.displayName=SL;var IL="SelectValue",PL=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=$r(IL,o),{onValueNodeHasChildrenChange:u}=l,c=n!==void 0,f=pe(t,l.onValueNodeChange);return Ae(()=>{u(c)},[u,c]),d(Y.span,{...i,ref:f,style:{pointerEvents:"none"},children:KL(l.value)?d(Ve,{children:s}):n})});PL.displayName=IL;var LU="SelectIcon",LL=C((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return d(Y.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});LL.displayName=LU;var TU="SelectPortal",TL=e=>d(Vt,{asChild:!0,...e});TL.displayName=TU;var ja="SelectContent",ML=C((e,t)=>{let o=$r(ja,e.__scopeSelect),[r,a]=k();if(Ae(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?Ps(d(kL,{scope:e.__scopeSelect,children:d(Id.Slot,{scope:e.__scopeSelect,children:d("div",{children:e.children})})}),n):null}return d(EL,{...e,ref:t})});ML.displayName=ja;var So=10,[kL,jr]=ss(ja),MU="SelectContentImpl",kU=It("SelectContent.RemoveScroll"),EL=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=$r(ja,o),[b,R]=k(null),[w,I]=k(null),S=pe(t,K=>R(K)),[T,M]=k(null),[A,O]=k(null),V=Pd(o),[q,F]=k(!1),$=E(!1);D(()=>{if(b)return Br(b)},[b]),Or();let U=H(K=>{let[ie,...xe]=V().map(J=>J.ref.current),[ye]=xe.slice(-1),ge=document.activeElement;for(let J of K)if(J===ge||(J?.scrollIntoView({block:"nearest"}),J===ie&&w&&(w.scrollTop=0),J===ye&&w&&(w.scrollTop=w.scrollHeight),J?.focus(),document.activeElement!==ge))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},ie=ye=>{K={x:Math.abs(Math.round(ye.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(_.current?.y??0))}},xe=ye=>{K.x<=10&&K.y<=10?ye.preventDefault():b.contains(ye.target)||z(!1),document.removeEventListener("pointermove",ie),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",xe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",xe,{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[ne,le]=XL(K=>{let ie=V().filter(ge=>!ge.disabled),xe=ie.find(ge=>ge.ref.current===document.activeElement),ye=YL(ie,K,xe);ye&&setTimeout(()=>ye.ref.current.focus())}),W=H((K,ie,xe)=>{let ye=!$.current&&!xe;(y.value!==void 0&&y.value===ie||ye)&&(M(K),ye&&($.current=!0))},[y.value]),te=H(()=>b?.focus(),[b]),se=H((K,ie,xe)=>{let ye=!$.current&&!xe;(y.value!==void 0&&y.value===ie||ye)&&O(K)},[y.value]),ee=r==="popper"?Dg:AL,fe=ee===Dg?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:v}:{};return d(kL,{scope:o,content:b,viewport:w,onViewportChange:I,itemRefCallback:W,selectedItem:T,onItemLeave:te,itemTextRefCallback:se,focusSelectedItem:G,selectedItemText:A,position:r,isPositioned:q,searchRef:ne,children:d(ir,{as:kU,allowPinchZoom:!0,children:d(rr,{asChild:!0,trapped:y.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:X(a,K=>{y.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:d(qt,{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,...fe,onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:X(x.onKeyDown,K=>{let ie=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!ie&&K.key.length===1&&le(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let ye=V().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(K.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){let ge=K.target,J=ye.indexOf(ge);ye=ye.slice(J+1)}setTimeout(()=>U(ye)),K.preventDefault()}})})})})})})});EL.displayName=MU;var EU="SelectItemAlignedPosition",AL=C((e,t)=>{let{__scopeSelect:o,onPlaced:r,...a}=e,n=$r(ja,o),s=jr(ja,o),[i,l]=k(null),[u,c]=k(null),f=pe(t,S=>c(S)),p=Pd(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 ge=A.left-T.left,J=M.left-ge,be=S.left-J,re=S.width+be,ue=Math.max(re,T.width),Oe=window.innerWidth-So,Ue=Eg(J,[So,Math.max(So,Oe-ue)]);i.style.minWidth=re+"px",i.style.left=Ue+"px"}else{let ge=T.right-A.right,J=window.innerWidth-M.right-ge,be=window.innerWidth-S.right-J,re=S.width+be,ue=Math.max(re,T.width),Oe=window.innerWidth-So,Ue=Eg(J,[So,Math.max(So,Oe-ue)]);i.style.minWidth=re+"px",i.style.right=Ue+"px"}let O=p(),V=window.innerHeight-So*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,ne=Math.min(v.offsetHeight*5,_),le=window.getComputedStyle(g),W=parseInt(le.paddingTop,10),te=parseInt(le.paddingBottom,10),se=S.top+S.height/2-So,ee=V-se,fe=v.offsetHeight/2,K=v.offsetTop+fe,ie=$+U+K,xe=_-ie;if(ie<=se){let ge=O.length>0&&v===O[O.length-1].ref.current;i.style.bottom="0px";let J=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(ee,fe+(ge?te:0)+J+G),re=ie+be;i.style.height=re+"px"}else{let ge=O.length>0&&v===O[0].ref.current;i.style.top="0px";let be=Math.max(se,$+g.offsetTop+(ge?W:0)+fe)+xe;i.style.height=be+"px",g.scrollTop=ie-se+g.offsetTop}i.style.margin=`${So}px 0`,i.style.minHeight=ne+"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(DU,{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}})})})});AL.displayName=EU;var AU="SelectPopperPosition",Dg=C((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=So,...n}=e,s=Ld(o);return d(_r,{...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)"}})});Dg.displayName=AU;var[DU,Vg]=ss(ja,{}),Ng="SelectViewport",DL=C((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=jr(Ng,o),s=Vg(Ng,o),i=pe(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(Id.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-So*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})})})]})});DL.displayName=Ng;var NL="SelectGroup",[NU,OU]=ss(NL),OL=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Le();return d(NU,{scope:o,id:a,children:d(Y.div,{role:"group","aria-labelledby":a,...r,ref:t})})});OL.displayName=NL;var FL="SelectLabel",_L=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=OU(FL,o);return d(Y.div,{id:a.id,...r,ref:t})});_L.displayName=FL;var Rd="SelectItem",[FU,VL]=ss(Rd),BL=C((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=$r(Rd,o),l=jr(Rd,o),u=i.value===r,[c,f]=k(n??""),[p,m]=k(!1),h=pe(t,y=>l.itemRefCallback?.(y,r,a)),g=Le(),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(FU,{scope:o,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:H(y=>{f(b=>b||(y?.textContent??"").trim())},[]),children:d(Id.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===" "||(wU.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});BL.displayName=Rd;var Al="SelectItemText",HL=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=$r(Al,o),i=jr(Al,o),l=VL(Al,o),u=PU(Al,o),[c,f]=k(null),p=pe(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?Ps(n.children,s.valueNode):null]})});HL.displayName=Al;var UL="SelectItemIndicator",GL=C((e,t)=>{let{__scopeSelect:o,...r}=e;return VL(UL,o).isSelected?d(Y.span,{"aria-hidden":!0,...r,ref:t}):null});GL.displayName=UL;var Og="SelectScrollUpButton",zL=C((e,t)=>{let o=jr(Og,e.__scopeSelect),r=Vg(Og,e.__scopeSelect),[a,n]=k(!1),s=pe(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(qL,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});zL.displayName=Og;var Fg="SelectScrollDownButton",WL=C((e,t)=>{let o=jr(Fg,e.__scopeSelect),r=Vg(Fg,e.__scopeSelect),[a,n]=k(!1),s=pe(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(qL,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});WL.displayName=Fg;var qL=C((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=jr("SelectScrollButton",o),s=E(null),i=Pd(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()})})}),_U="SelectSeparator",$L=C((e,t)=>{let{__scopeSelect:o,...r}=e;return d(Y.div,{"aria-hidden":!0,...r,ref:t})});$L.displayName=_U;var _g="SelectArrow",VU=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Ld(o),n=$r(_g,o),s=jr(_g,o);return n.open&&s.position==="popper"?d(Vr,{...a,...r,ref:t}):null});VU.displayName=_g;var BU="SelectBubbleInput",jL=C(({__scopeSelect:e,value:t,...o},r)=>{let a=E(null),n=pe(r,a),s=qn(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:{...Ag,...o.style},ref:n,defaultValue:t})});jL.displayName=BU;function KL(e){return e===""||e===void 0}function XL(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 YL(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=HU(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 HU(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var ZL=wL,Bg=RL,QL=PL,JL=LL,eT=TL,Hg=ML,tT=DL,oT=OL,Ug=_L,Gg=BL,rT=HL,aT=GL,zg=zL,Wg=WL,qg=$L;var is=ZL;is.displayName="Select";var GU=oT,Dl=QL,zU=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"}}),ls=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(Bg,{ref:c,className:L(zU({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(ot,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),d("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!s&&d(JL,{asChild:!0,children:l?d("span",{className:"opacity-60",children:l}):d(Mo,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]})});ls.displayName=Bg.displayName;var $g=C(({className:e,...t},o)=>d(zg,{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(Os,{className:"h-4 w-4"})}));$g.displayName=zg.displayName;var jg=C(({className:e,...t},o)=>d(Wg,{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(Mo,{className:"h-4 w-4"})}));jg.displayName=Wg.displayName;var us=C(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>d(eT,{children:P(Hg,{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($g,{}),d(tT,{className:L("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d(jg,{})]})}));us.displayName=Hg.displayName;var nT=C(({className:e,...t},o)=>d(Ug,{ref:o,className:L("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));nT.displayName=Ug.displayName;var Rt=C(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>P(Gg,{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(aT,{children:n||d(pt,{className:"h-4 w-4"})})}),d(rT,{children:t}),a&&d("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));Rt.displayName=Gg.displayName;var sT=C(({className:e,...t},o)=>d(qg,{ref:o,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));sT.displayName=qg.displayName;var WU=[{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"}],iT=(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}},qU=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},lT=C(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=WU,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=qU(c),w=b.slice(0,R),I=iT(w,c);m(w),o?.(w,c),y.target.value=I},v=y=>{f(y),o?.(p,y)},x=iT(p,c);return P("div",{className:L("relative flex gap-2",e),children:[n&&P(is,{value:c,onValueChange:v,children:[d(ls,{className:"w-[120px]",children:d(Dl,{children:P("div",{className:"flex items-center gap-2",children:[d("span",{children:h.flag}),d("span",{children:h.code})]})})}),d(us,{children:s.map(y=>d(Rt,{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(xt,{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(Zs,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});lT.displayName="PhoneInput";N();var $U=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"}}),uT=ce({}),cT=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(uT.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})})});cT.displayName="RadioGroup";var Kg=C(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=ae(uT),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($U({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(na,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Kg.displayName="RadioGroupItem";var Xg=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}));Xg.displayName="RadioLabel";var dT=C(({id:e,label:t,labelClassName:o,...r},a)=>{let n=qe(),s=e||n;return P("div",{className:"flex items-center",children:[d(Kg,{ref:a,id:s,...r}),d(Xg,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});dT.displayName="RadioItemWithLabel";function jU({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 fT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function KU(...e){return t=>{let o=!1,r=e.map(a=>{let n=fT(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():fT(e[a],null)}}}}function fr(...e){return H(KU(...e),e)}function mT(e){let t=C((o,r)=>{let{children:a,...n}=o,s=null,i=!1,l=[];pT(a)&&typeof Td=="function"&&(a=Td(a._payload)),Ie.forEach(a,p=>{if(JU(p)){i=!0;let m=p,h="child"in m.props?m.props.child:m.props.children;pT(h)&&typeof Td=="function"&&(h=Td(h._payload)),s=YU(m,h),l.push(s?.props?.children)}else l.push(p)}),s?s=Fe(s,void 0,l):!i&&Ie.count(a)===1&&Ee(a)&&(s=a);let u=s?QU(s):void 0,c=fr(r,u);if(!s){if(a||a===0)throw new Error(i?rG(e):oG(e));return a}let f=ZU(n,s.props??{});return s.type!==Je&&(f.ref=r?c:u),Fe(s,f)});return t.displayName=`${e}.Slot`,t}var XU=Symbol.for("radix.slottable");var YU=(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 ZU(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 QU(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 JU(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XU}var eG=Symbol.for("react.lazy");function pT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===eG&&"_payload"in e&&tG(e._payload)}function tG(e){return typeof e=="object"&&e!==null&&"then"in e}var oG=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,rG=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Td=B[" use ".trim().toString()];var aG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cs=aG.reduce((e,t)=>{let o=mT(`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 Nl=globalThis?.document?ct:()=>{};N();function nG(e,t){return Gt((o,r)=>t[o][r]??o,e)}var ds=e=>{let{present:t,children:o}=e,r=sG(t),a=typeof o=="function"?o({present:r.isPresent}):Ie.only(o),n=iG(r.ref,lG(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};ds.displayName="Presence";function sG(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=E(void 0),i=e?"mounted":"unmounted",[l,u]=nG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{l==="mounted"?(n.current=s.current??Ol(r.current),s.current=void 0):n.current="none"},[l]),Nl(()=>{let c=r.current,f=a.current;if(f!==e){let m=n.current,h=Ol(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]),Nl(()=>{if(t){let c,f=t.ownerDocument.defaultView??window,p=h=>{let v=Ol(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=Ol(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=Ol(f)}else r.current=null;o(c)},[])}}function gT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iG(...e){let t=E(e);return t.current=e,H(o=>{let r=t.current,a=!1,n=r.map(s=>{let i=gT(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():gT(r[s],null)}}},[])}function Ol(e){return e?.animationName||"none"}function lG(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 hT(e,t=[]){let o=[];function r(n,s){let i=ce(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=ae(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=>ce(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,uG(a,...t)]}function uG(...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 Kr(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}N();var cG=ce(void 0);function vT(e){let t=ae(cG);return e||t||"ltr"}function xT(e,[t,o]){return Math.min(o,Math.max(t,e))}var yve=!!(typeof window<"u"&&window.document&&window.document.createElement);function Xr(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)}}N();function dG(e,t){return Gt((o,r)=>t[o][r]??o,e)}var Yg="ScrollArea",[bT,Eve]=hT(Yg),[fG,Yt]=bT(Yg),CT=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=fr(t,l),A=vT(a);return d(fG,{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(cs.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}})})});CT.displayName=Yg;var wT="ScrollAreaViewport",ST=C((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=Yt(wT,o),i=E(null),l=fr(t,i,s.onViewportChange);return P(Ve,{children:[d(pG,{nonce:a}),d(cs.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})})]})});ST.displayName=wT;var pG=Zd(({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),Ho="ScrollAreaScrollbar",Ed=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Ho,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(mG,{...r,ref:t,forceMount:o}):a.type==="scroll"?d(gG,{...r,ref:t,forceMount:o}):a.type==="auto"?d(RT,{...r,ref:t,forceMount:o}):a.type==="always"?d(Zg,{...r,ref:t,"data-state":"visible"}):null});Ed.displayName=Ho;var mG=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Ho,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(ds,{present:o||n,children:d(RT,{"data-state":n?"visible":"hidden",...r,ref:t})})}),gG=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Ho,e.__scopeScrollArea),n=e.orientation==="horizontal",s=Dd(()=>l("SCROLL_END"),100),[i,l]=dG("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(ds,{present:o||i!=="hidden",children:d(Zg,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Xr(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Xr(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),RT=C((e,t)=>{let o=Yt(Ho,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=k(!1),i=e.orientation==="horizontal",l=Dd(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return fs(o.viewport,l),fs(o.content,l),d(ds,{present:r||n,children:d(Zg,{"data-state":n?"visible":"hidden",...a,ref:t})})}),Zg=C((e,t)=>{let{orientation:o="vertical",...r}=e,a=Yt(Ho,e.__scopeScrollArea),n=E(null),s=E(0),[i,l]=k({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=TT(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 CG(p,s.current,i,m)}return o==="horizontal"?d(hG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollLeft,m=yT(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(vG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollTop,m=yT(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}),hG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Yt(Ho,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=fr(t,l,n.onScrollbarXChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(PT,{"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":Ad(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),kT(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:kd(s.paddingLeft),paddingEnd:kd(s.paddingRight)}})}})}),vG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Yt(Ho,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=fr(t,l,n.onScrollbarYChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(PT,{"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":Ad(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),kT(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:kd(s.paddingTop),paddingEnd:kd(s.paddingBottom)}})}})}),[xG,IT]=bT(Ho),PT=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=Yt(Ho,o),[h,g]=k(null),v=fr(t,g),x=E(null),y=E(""),b=m.viewport,R=r.content-r.viewport,w=Kr(c),I=Kr(l),S=Dd(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]),fs(h,S),fs(m.content,S),d(xG,{scope:o,scrollbar:h,hasThumb:a,onThumbChange:Kr(n),onThumbPointerUp:Kr(s),onThumbPositionChange:I,onThumbPointerDown:Kr(i),children:d(cs.div,{...p,ref:v,style:{position:"absolute",...p.style},onPointerDown:Xr(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:Xr(e.onPointerMove,T),onPointerUp:Xr(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})})})}),Md="ScrollAreaThumb",Qg=C((e,t)=>{let{forceMount:o,...r}=e,a=IT(Md,e.__scopeScrollArea);return d(ds,{present:o||a.hasThumb,children:d(yG,{ref:t,...r})})}),yG=C((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=Yt(Md,o),s=IT(Md,o),{onThumbPositionChange:i}=s,l=fr(t,s.onThumbChange),u=E(void 0),c=Dd(()=>{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=wG(f,i);u.current=m,i()}};return i(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[n.viewport,c,i]),d(cs.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:Xr(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:Xr(e.onPointerUp,s.onThumbPointerUp)})});Qg.displayName=Md;var Jg="ScrollAreaCorner",LT=C((e,t)=>{let o=Yt(Jg,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d(bG,{...e,ref:t}):null});LT.displayName=Jg;var bG=C((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=Yt(Jg,o),[n,s]=k(0),[i,l]=k(0),u=!!(n&&i),{onCornerWidthChange:c,onCornerHeightChange:f}=a;return fs(a.scrollbarX,()=>{let p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),l(p)}),fs(a.scrollbarY,()=>{let p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),s(p)}),D(()=>()=>{c(0),f(0)},[c,f]),u?d(cs.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 kd(e){return e?parseInt(e,10):0}function TT(e,t){let o=e/t;return isNaN(o)?0:o}function Ad(e){let t=TT(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function CG(e,t,o,r="ltr"){let a=Ad(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 MT([l,u],f)(e)}function yT(e,t,o="ltr"){let r=Ad(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=xT(e,l);return MT([0,s],[0,i])(u)}function MT(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 kT(e,t){return e>0&&e<t}var wG=(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 Dd(e,t){let o=Kr(e),r=E(0);return D(()=>()=>window.clearTimeout(r.current),[]),H(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function fs(e,t){let o=Kr(t);Nl(()=>{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 eh=CT,ET=ST;var AT=LT;var DT=C(({className:e,children:t,focusable:o=!0,...r},a)=>P(eh,{ref:a,className:L("relative overflow-hidden",e),...r,children:[d(ET,{tabIndex:o?0:void 0,className:"h-full w-full rounded-[inherit]",children:t}),d(th,{}),d(AT,{})]}));DT.displayName=eh.displayName;var th=C(({className:e,orientation:t="vertical",...o},r)=>d(Ed,{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(Qg,{className:"relative flex-1 rounded-full bg-border"})}));th.displayName=Ed.displayName;N();var NT=(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},OT={duration:.5,ease:[.25,.46,.45,.94]},FT=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||NT(t,a),[t,a,c]),y=Z(()=>({...OT,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})});FT.displayName="ScrollReveal";var _T=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})});_T.displayName="ScrollRevealContainer";var VT=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||NT(t,r),[t,r,n]),c=Z(()=>({...OT,duration:o}),[o]);return d(_e.div,{ref:l,variants:u,transition:c,className:L(a),style:s,id:i,children:e})});VT.displayName="ScrollRevealItem";N();N();var RG="Separator",BT="horizontal",IG=["horizontal","vertical"],HT=C((e,t)=>{let{decorative:o,orientation:r=BT,...a}=e,n=PG(r)?r:BT,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return d(Y.div,{"data-orientation":n,...i,...a,ref:t})});HT.displayName=RG;function PG(e){return IG.includes(e)}var oh=HT;var TG=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"}}),Zt=C(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:a=!0,...n},s)=>d(oh,{ref:s,decorative:a,orientation:t||void 0,className:L(TG({orientation:t,variant:o,size:r}),e),...n}));Zt.displayName=oh.displayName;N();N();N();var MG=Object.defineProperty,ps=(e,t)=>MG(e,"name",{value:t,configurable:!0}),UT=!!(typeof window<"u"&&window.document&&window.document.createElement);function ah(e,t,{checkForDefaultPrevented:o=!0}={}){return ps(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ps(ah,"composeEventHandlers");function kG(e){if(!UT)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ps(kG,"getOwnerWindow");function rh(e){if(!UT)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ps(rh,"getOwnerDocument");function GT(e,t=!1){let{activeElement:o}=rh(e);if(!o?.nodeName)return null;if(zT(o)&&o.contentDocument)return GT(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=rh(o).getElementById(r);if(a)return a}}return o}ps(GT,"getActiveElement");function zT(e){return e.tagName==="IFRAME"}ps(zT,"isFrame");N();var ms=!1;N();var Nd=globalThis?.document?ct:()=>{};N();N();var EG=Object.defineProperty,AG=(e,t)=>EG(e,"name",{value:t,configurable:!0}),WT=B[" useEffectEvent ".trim().toString()],qT=B[" useInsertionEffect ".trim().toString()];function nh(e){if(typeof WT=="function")return WT(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof qT=="function"?qT(()=>{t.current=e}):Nd(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}AG(nh,"useEffectEvent");var DG=Object.defineProperty,Fl=(e,t)=>DG(e,"name",{value:t,configurable:!0}),NG=B[" useInsertionEffect ".trim().toString()]||Nd;function sh({prop:e,defaultProp:t,onChange:o=Fl(()=>{},"onChange"),caller:r}){let[a,n,s]=jT({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(ms){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=KT(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}Fl(sh,"useControllableState");function jT({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return NG(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}Fl(jT,"useUncontrolledState");function KT(e){return typeof e=="function"}Fl(KT,"isFunction");var $T=Symbol("RADIX:SYNC_STATE");function OG(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=nh(s);if(ms){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]=Gt((v,x)=>{if(x.type===$T)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:$T,state:a})},[a,f.state,l]),[g,p]}Fl(OG,"useControllableStateReducer");N();N();N();var FG=Object.defineProperty,lh=(e,t)=>FG(e,"name",{value:t,configurable:!0});function ih(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}lh(ih,"setRef");function XT(...e){return t=>{let o=!1,r=e.map(a=>{let n=ih(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():ih(e[a],null)}}}}lh(XT,"composeRefs");function uh(...e){return H(XT(...e),e)}lh(uh,"useComposedRefs");var _G=Object.defineProperty,Qt=(e,t)=>_G(e,"name",{value:t,configurable:!0}),VG=Qt((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";ms&&(!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]=YT(n,a))}return{...e,...o}},"mergeProps");function YT(...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}Qt(YT,"concatAriaDescribedby");var ZT=ce(VG);ZT.displayName="SlotContext";function dh(e){let t=C((o,r)=>{let a=ae(ZT),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];ch(n)&&typeof Od=="function"&&(n=Od(n._payload)),Ie.forEach(n,h=>{if(eM(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;ch(v)&&typeof Od=="function"&&(v=Od(v._payload)),l=HG(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Ie.count(n)===1&&Ee(n)&&(l=n);let f=l?JT(l):void 0,p=uh(r,f);if(!l){if(n||n===0)throw new Error(u?zG(e):GG(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}Qt(dh,"createSlot");var QT=Symbol.for("radix.slottable");function BG(e){let t=Qt(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=QT,t}Qt(BG,"createSlottable");var HG=Qt((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 JT(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)}Qt(JT,"getElementRef");function eM(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QT}Qt(eM,"isSlottable");var UG=Symbol.for("react.lazy");function ch(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===UG&&"_payload"in e&&tM(e._payload)}Qt(ch,"isLazyComponent");function tM(e){return typeof e=="object"&&e!==null&&"then"in e}Qt(tM,"isPromiseLike");var GG=Qt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),zG=Qt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Od=B[" use ".trim().toString()];var WG=Object.defineProperty,qG=(e,t)=>WG(e,"name",{value:t,configurable:!0}),$G=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oM=$G.reduce((e,t)=>{let o=dh(`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 jG(e,t){e&&Uo(()=>e.dispatchEvent(t))}qG(jG,"dispatchDiscreteCustomEvent");var KG=Object.defineProperty,XG=(e,t)=>KG(e,"name",{value:t,configurable:!0}),YG="Toggle",_l=C(XG(function(t,o){let{pressed:r,defaultPressed:a,onPressedChange:n,...s}=t,[i,l]=sh({prop:r,onChange:n,defaultProp:a??!1,caller:YG});return d(oM.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:o,onClick:ah(t.onClick,()=>{t.disabled||l(!i)})})},"Toggle"));var Fd=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"}}),_d=C(({className:e,variant:t,size:o,...r},a)=>d(_l,{ref:a,className:L("moonui-theme",Fd({variant:t,size:o,className:e})),...r}));_d.displayName=_l.displayName;N();N();var[Vd,Axe]=ke("Tooltip",[Kt]),Bd=Kt(),rM="TooltipProvider",QG=700,fh="tooltip.open",[JG,mh]=Vd(rM),aM=e=>{let{__scopeTooltip:t,delayDuration:o=QG,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(JG,{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})};aM.displayName=rM;var Vl="Tooltip",[ez,Bl]=Vd(Vl),nM=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=mh(Vl,e.__scopeTooltip),u=Bd(t),[c,f]=k(null),p=Le(),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(fh))):l.onClose(),n?.(S)},caller:Vl}),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(nr,{...u,children:d(ez,{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})})};nM.displayName=Vl;var ph="TooltipTrigger",sM=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Bl(ph,o),n=mh(ph,o),s=Bd(o),i=E(null),l=pe(t,i,a.onTriggerChange),u=E(!1),c=E(!1),f=H(()=>u.current=!1,[]);return D(()=>()=>document.removeEventListener("pointerup",f),[f]),d(sr,{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)})})});sM.displayName=ph;var gh="TooltipPortal",[tz,oz]=Vd(gh,{forceMount:void 0}),rz=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=Bl(gh,t);return d(tz,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Vt,{asChild:!0,container:a,children:r})})})};rz.displayName=gh;var gs="TooltipContent",iM=C((e,t)=>{let o=oz(gs,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=Bl(gs,e.__scopeTooltip);return d($e,{present:r||s.open,children:s.disableHoverableContent?d(lM,{side:a,...n,ref:t}):d(az,{side:a,...n,ref:t})})}),az=C((e,t)=>{let o=Bl(gs,e.__scopeTooltip),r=mh(gs,e.__scopeTooltip),a=E(null),n=pe(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=lz(x,v.getBoundingClientRect()),b=uz(x,y),R=cz(g.getBoundingClientRect()),w=fz([...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=!dz(x,s);y?p():b&&(p(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,c,s,u,p]),d(lM,{...e,ref:n})}),[nz,sz]=Vd(Vl,{isInside:!1}),iz=vv("TooltipContent"),lM=C((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Bl(gs,o),u=Bd(o),{onClose:c}=l;return D(()=>(document.addEventListener(fh,c),()=>document.removeEventListener(fh,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(qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:P(_r,{"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(iz,{children:r}),d(nz,{scope:o,isInside:!0,children:d(CL,{id:l.contentId,role:"tooltip",children:a||r})})]})})});iM.displayName=gs;var uM="TooltipArrow",cM=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Bd(o);return sz(uM,o).isInside?null:d(Vr,{...a,...r,ref:t})});cM.displayName=uM;function lz(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 uz(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 cz(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 dz(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 fz(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),pz(t)}function pz(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 dM=aM,fM=nM,pM=sM;var hh=iM,vh=cM;var xh=dM,mM=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"}}),Hd=fM,Ud=pM,yh=C(({className:e,...t},o)=>d(vh,{ref:o,className:L("moonui-theme","fill-current",e),...t}));yh.displayName=vh.displayName;var Hl=C(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>P(hh,{ref:s,sideOffset:a,className:L("moonui-theme",mM({variant:t,size:o}),e),...n,children:[n.children,r&&d(yh,{})]}));Hl.displayName=hh.displayName;var gM=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(Hd,{open:c,defaultOpen:f,onOpenChange:p,delayDuration:s,children:[d(Ud,{asChild:!0,children:e}),d(Hl,{ref:h,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...m,children:t})]}));gM.displayName="SimpleTooltip";var nt=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>P(Hd,{children:[d(Ud,{asChild:!0,children:d(_d,{pressed:o,onPressedChange:()=>r(),disabled:a,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),d(Hl,{children:d("p",{children:t})})]}),gz=({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))}),hM=Pe.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=Pe.useRef(null),R=Pe.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 ne=window.getSelection();ne&&(ne.removeAllRanges(),ne.addRange(_))},[]),A=H((_,ne)=>{if(r)return;b.current&&b.current.focus();let le=T();if(document.execCommand(_,!1,ne)||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 ne=_.currentTarget.innerHTML;S(ne)},[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 ne=window.getSelection();if(ne&&ne.rangeCount>0){let le=ne.getRangeAt(0),W=document.createElement("span");W.style.color=_;try{le.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 ne=document.createElement("div");return ne.innerHTML=_,ne.textContent||ne.innerText||""};Pe.useEffect(()=>{b.current&&f&&f!==b.current.innerHTML&&(b.current.innerHTML=f)},[f]),Pe.useEffect(()=>{e!==void 0&&e!==f&&(p(e),v(e))},[e,f]);let z=i&&d(xh,{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(nt,{icon:d(Ns,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:w.bold,onClick:()=>A("bold"),disabled:r}),d(nt,{icon:d(qs,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:w.italic,onClick:()=>A("italic"),disabled:r}),d(nt,{icon:d(ti,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:w.underline,onClick:()=>A("underline"),disabled:r}),d(nt,{icon:d(ei,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:w.strikethrough,onClick:()=>A("strikeThrough"),disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P(is,{onValueChange:_=>{_.startsWith("h")?$(_.substring(1)):_==="normal"?A("formatBlock","p"):A("fontSize",_)},disabled:r,children:[d(ls,{className:"w-24 h-8",children:d(Dl,{placeholder:"Size"})}),P(us,{children:[d(Rt,{value:"1",children:"Small"}),d(Rt,{value:"3",children:"Normal"}),d(Rt,{value:"5",children:"Large"}),d(Rt,{value:"7",children:"X-Large"}),d(Zt,{className:"my-1"}),d(Rt,{value:"h1",children:"Heading 1"}),d(Rt,{value:"h2",children:"Heading 2"}),d(Rt,{value:"h3",children:"Heading 3"}),d(Rt,{value:"h4",children:"Heading 4"}),d(Rt,{value:"h5",children:"Heading 5"}),d(Rt,{value:"h6",children:"Heading 6"})]})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(nt,{icon:d(ks,{className:"h-3 w-3"}),tooltip:"Align Left",active:w.alignLeft,onClick:()=>A("justifyLeft"),disabled:r}),d(nt,{icon:d(Ts,{className:"h-3 w-3"}),tooltip:"Align Center",active:w.alignCenter,onClick:()=>A("justifyCenter"),disabled:r}),d(nt,{icon:d(Es,{className:"h-3 w-3"}),tooltip:"Align Right",active:w.alignRight,onClick:()=>A("justifyRight"),disabled:r}),d(nt,{icon:d(Ms,{className:"h-3 w-3"}),tooltip:"Justify",active:w.alignJustify,onClick:()=>A("justifyFull"),disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(nt,{icon:d(Ks,{className:"h-3 w-3"}),tooltip:"Bullet List",active:w.unorderedList,onClick:()=>A("insertUnorderedList"),disabled:r}),d(nt,{icon:d(js,{className:"h-3 w-3"}),tooltip:"Numbered List",active:w.orderedList,onClick:()=>A("insertOrderedList"),disabled:r}),d(nt,{icon:d(Qs,{className:"h-3 w-3"}),tooltip:"Quote",active:w.quote,onClick:()=>A("formatBlock","blockquote"),disabled:r}),d(nt,{icon:d(_s,{className:"h-3 w-3"}),tooltip:"Code Block",active:w.code,onClick:()=>A("formatBlock","pre"),disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(nt,{icon:d("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>A("outdent"),disabled:r}),d(nt,{icon:d("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>A("indent"),disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(nt,{icon:d($s,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:q,disabled:r}),d(nt,{icon:d(ia,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:F,disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P(lr,{children:[d(ur,{asChild:!0,children:d(Te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:d(an,{className:"h-3 w-3"})})}),d(Bo,{className:"w-auto p-0",children:d(gz,{onColorSelect:U})})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P("div",{className:"flex items-center gap-1",children:[d(nt,{icon:d(oi,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>A("undo"),disabled:r}),d(nt,{icon:d(Js,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>A("redo"),disabled:r})]})]}),l&&P(Ve,{children:[!m&&d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),d(nt,{icon:m?d(Pt,{className:"h-3 w-3"}):d(sa,{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(hz,{content:f})})]})});hM.displayName="SimpleEditor";var hz=({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 vM=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"}}),Yr=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",vM({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...f},...c?zC:{},...R})});Yr.displayName="Skeleton";var bh=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(Yr,{variant:s,animation:i,className:"w-full",style:{height:o,width:`${m}%`}},f)})}));bh.displayName="SkeletonText";var Ch=C(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...a},n)=>d(Yr,{ref:n,variant:o,animation:r,shape:"circle",className:L("moonui-theme","shrink-0",e),style:{height:t,width:t},...a}));Ch.displayName="SkeletonAvatar";var xM=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(Ch,{size:"2.5rem",variant:a,animation:n}),P("div",{className:"flex-1",children:[d(Yr,{variant:a,animation:n,className:"mb-2 h-4 w-1/3"}),d(Yr,{variant:a,animation:n,className:"h-3 w-1/4"})]})]}),d(bh,{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(Yr,{variant:a,animation:n,className:"h-4 w-1/4"}),d(Yr,{variant:a,animation:n,className:"h-4 w-1/5"})]})]}));xM.displayName="SkeletonCard";N();var yM=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})});yM.displayName="SwipeableCard";N();N();var Gd="Switch",[vz,pye]=ke(Gd),[xz,yz]=vz(Gd),bM=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=pe(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:Gd});return P(xz,{scope:o,checked:x,disabled:i,children:[d(Y.button,{type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":RM(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(SM,{control:p,bubbles:!g.current,name:r,value:l,checked:x,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});bM.displayName=Gd;var CM="SwitchThumb",wM=C((e,t)=>{let{__scopeSwitch:o,...r}=e,a=yz(CM,o);return d(Y.span,{"data-state":RM(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});wM.displayName=CM;var bz="SwitchBubbleInput",SM=C(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=E(null),i=pe(s,n),l=qn(o),u=$n(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}})});SM.displayName=bz;function RM(e){return e?"checked":"unchecked"}var wh=bM,IM=wM;var wz=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"}}),Sz=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"}}),PM=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(wh,{className:L(wz({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(IM,{className:L(Sz({size:t}))})]}),n&&d("span",{className:"text-muted-foreground",children:n}),s&&d("span",{id:f,className:"text-sm text-muted-foreground",children:s})]})});PM.displayName=wh.displayName;N();var LM=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);ta(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(Lt,{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(Ot,{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})]})});LM.displayName="TagsInput";N();var Rz=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}}),TM=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||"");ta(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(Rz({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(ot,{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}`]})]})]})});TM.displayName="Textarea";N();N();var Lh="ToastProvider",[Th,Iz,Pz]=Lo("Toast"),[kM,Hye]=ke("Toast",[Pz]),[Lz,Wd]=kM(Lh),EM=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 \`${Lh}\`. Expected non-empty \`string\`.`),d(Th.Provider,{scope:t,children:d(Lz,{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})})};EM.displayName=Lh;var AM="ToastViewport",Tz=["F8"],Rh="toast.viewportPause",Ih="toast.viewportResume",DM=C((e,t)=>{let{__scopeToast:o,hotkey:r=Tz,label:a="Notifications ({hotkey})",...n}=e,s=Wd(AM,o),i=Iz(o),l=E(null),u=E(null),c=E(null),f=E(null),p=pe(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(Rh);x.dispatchEvent(I),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){let I=new CustomEvent(Ih);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,...Uz(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);Sh(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(mS,{ref:l,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&d(Ph,{ref:u,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"forwards"});Sh(v)}}),d(Th.Slot,{scope:o,children:d(Y.ol,{tabIndex:-1,...n,ref:p})}),h&&d(Ph,{ref:c,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"backwards"});Sh(v)}})]})});DM.displayName=AM;var NM="ToastFocusProxy",Ph=C((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=Wd(NM,o);return d(El,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});Ph.displayName=NM;var Ul="Toast",Mz="toast.swipeStart",kz="toast.swipeMove",Ez="toast.swipeCancel",Az="toast.swipeEnd",OM=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:Ul});return d($e,{present:o||i,children:d(Oz,{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)})})})});OM.displayName=Ul;var[Dz,Nz]=kM(Ul,{onClose(){}}),Oz=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=Wd(Ul,o),[v,x]=k(null),y=pe(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(Rh,U),F.addEventListener(Ih,$),()=>{F.removeEventListener(Rh,U),F.removeEventListener(Ih,$)}}},[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?GM(v):null,[v]);return g.viewport?P(Ve,{children:[q&&d(Fz,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:q}),d(Dz,{scope:o,onClose:O,children:Ps(d(Th.ItemSlot,{scope:o,children:d(pS,{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,ne=z?_(0,$):0,le=z?0:_(0,U),W=F.pointerType==="touch"?10:2,te={x:ne,y:le},se={originalEvent:F,delta:te};G?(R.current=te,zd(kz,f,se,{discrete:!1})):MM(te,g.swipeDirection,W)?(R.current=te,zd(Mz,c,se,{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:$};MM($,g.swipeDirection,g.swipeThreshold)?zd(Az,m,z,{discrete:!0}):zd(Ez,p,z,{discrete:!0}),G.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Fz=e=>{let{__scopeToast:t,children:o,...r}=e,a=Wd(Ul,t),[n,s]=k(!1),[i,l]=k(!1);return Bz(()=>s(!0)),D(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:d(Vt,{asChild:!0,children:d(El,{...r,children:n&&P(Ve,{children:[a.label," ",o]})})})},_z="ToastTitle",FM=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});FM.displayName=_z;var Vz="ToastDescription",_M=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});_M.displayName=Vz;var VM="ToastAction",BM=C((e,t)=>{let{altText:o,...r}=e;return o.trim()?d(UM,{altText:o,asChild:!0,children:d(Mh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${VM}\`. Expected non-empty \`string\`.`),null)});BM.displayName=VM;var HM="ToastClose",Mh=C((e,t)=>{let{__scopeToast:o,...r}=e,a=Nz(HM,o);return d(UM,{asChild:!0,children:d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,a.onClose)})})});Mh.displayName=HM;var UM=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 GM(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Hz(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(...GM(r))}}),t}function zd(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?Ya(a,n):a.dispatchEvent(n)}var MM=(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 Bz(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 Hz(e){return e.nodeType===e.ELEMENT_NODE}function Uz(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 Sh(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var zM=EM,kh=DM,Eh=OM,Ah=FM,Dh=_M,Nh=BM,Oh=Mh;var qM=zM,_h=C(({className:e,...t},o)=>d(kh,{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}));_h.displayName=kh.displayName;var zz=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"}}),Vh=C(({className:e,variant:t,...o},r)=>d(Eh,{ref:r,className:L("moonui-theme",zz({variant:t}),e),...o}));Vh.displayName=Eh.displayName;var $M=C(({className:e,...t},o)=>d(Nh,{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}));$M.displayName=Nh.displayName;var Bh=C(({className:e,...t},o)=>P(Oh,{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(Ot,{className:"h-4 w-4"}),d("span",{className:"sr-only",children:"Close"})]}));Bh.displayName=Oh.displayName;var Hh=C(({className:e,...t},o)=>d(Ah,{ref:o,className:L("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Hh.displayName=Ah.displayName;var Uh=C(({className:e,...t},o)=>d(Dh,{ref:o,className:L("moonui-theme","text-sm opacity-90",e),...t}));Uh.displayName=Dh.displayName;var Wz=5,qz=1e6,Fh=new Map,WM=e=>{if(Fh.has(e))return;let t=setTimeout(()=>{Fh.delete(e),Gl({type:"REMOVE_TOAST",toastId:e})},qz);Fh.set(e,t)},$z=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Wz)};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?WM(o):e.toasts.forEach(r=>{WM(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}},qd=[],$d={toasts:[]},jz=0;function Gl(e){$d=$z($d,e),qd.forEach(t=>{t($d)})}function jM({...e}){let t=`toast-${Date.now()}-${++jz}`,o=a=>Gl({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Gl({type:"DISMISS_TOAST",toastId:t});return Gl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function KM(){let[e,t]=k($d);return D(()=>(qd.push(t),()=>{let o=qd.indexOf(t);o>-1&&qd.splice(o,1)}),[e]),{...e,toast:jM,dismiss:o=>Gl({type:"DISMISS_TOAST",toastId:o})}}function Kz(){let{toasts:e}=KM();return P(qM,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return P(Vh,{variant:n,open:s,onOpenChange:i,...l,children:[P("div",{className:"grid gap-1",children:[o&&d(Hh,{children:o}),r&&d(Uh,{children:r})]}),a,d(Bh,{})]},t)}),d(_h,{})]})}N();var XM=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"}}),YM=C(({className:e,size:t,children:o,...r},a)=>d("kbd",{ref:a,className:L("moonui-theme",XM({size:t}),e),...r,children:o}));YM.displayName="Kbd";N();var ZM=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"}}),Xz={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},QM=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=Xz[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(vr,{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(ZM({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)})})});QM.displayName="Rating";N();var JM=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"}}),Yz={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},ek=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",Yz[t??"md"]),style:{animationDelay:`${s*.15}s`}},s))}):d("span",{className:L(JM({size:t})),"aria-hidden":"true"}),d("span",{className:"sr-only",children:r})]}));ek.displayName="Spinner";N();var tk=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}}),ok=C(({className:e,orientation:t,attached:o,size:r,variant:a,children:n,...s},i)=>{let u=r!==void 0||a!==void 0?Ie.map(n,c=>{if(!Ee(c)||c.type!==Te)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(tk({orientation:t,attached:o}),e),...s,children:u})});ok.displayName="ButtonGroup";N();N();N();var Zz=Object.defineProperty,Jt=(e,t)=>Zz(e,"name",{value:t,configurable:!0});function Qz(e,t){let o=ce(t);o.displayName=e+"Context";let r=Jt(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=ae(o);if(l)return l;if(t!==void 0)return t;if(!i)throw new Error(`\`${n}\` must be used within \`${e}\``)}return Jt(a,"useContext"),[r,a]}Jt(Qz,"createContext");function pr(e,t=[]){let o=[];function r(n,s){let i=ce(s);i.displayName=n+"Context";let l=o.length;o=[...o,s];let u=Jt(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=ae(g);if(v)return v;if(s!==void 0)return s;if(!h)throw new Error(`\`${f}\` must be used within \`${n}\``)}return Jt(c,"useContext"),[u,c]}Jt(r,"createContext");let a=Jt(()=>{let n=o.map(s=>ce(s));return Jt(function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])},"useScope")},"createScope");return a.scopeName=e,[r,rk(a,...t)]}Jt(pr,"createContextScope");function rk(...e){let t=e[0];if(e.length===1)return t;let o=Jt(()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return Jt(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}Jt(rk,"composeContextScopes");N();N();N();var Jz=Object.defineProperty,zh=(e,t)=>Jz(e,"name",{value:t,configurable:!0});function Gh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}zh(Gh,"setRef");function ak(...e){return t=>{let o=!1,r=e.map(a=>{let n=Gh(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():Gh(e[a],null)}}}}zh(ak,"composeRefs");function eo(...e){return H(ak(...e),e)}zh(eo,"useComposedRefs");var hs=!1;var e3=Object.defineProperty,to=(e,t)=>e3(e,"name",{value:t,configurable:!0}),t3=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";hs&&(!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]=nk(n,a))}return{...e,...o}},"mergeProps");function nk(...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(nk,"concatAriaDescribedby");var sk=ce(t3);sk.displayName="SlotContext";function mr(e){let t=C((o,r)=>{let a=ae(sk),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];Wh(n)&&typeof jd=="function"&&(n=jd(n._payload)),Ie.forEach(n,h=>{if(uk(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;Wh(v)&&typeof jd=="function"&&(v=jd(v._payload)),l=r3(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Ie.count(n)===1&&Ee(n)&&(l=n);let f=l?lk(l):void 0,p=eo(r,f);if(!l){if(n||n===0)throw new Error(u?s3(e):n3(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(mr,"createSlot");var ik=Symbol.for("radix.slottable");function o3(e){let t=to(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ik,t}to(o3,"createSlottable");var r3=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 lk(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(lk,"getElementRef");function uk(e){return Ee(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ik}to(uk,"isSlottable");var a3=Symbol.for("react.lazy");function Wh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===a3&&"_payload"in e&&ck(e._payload)}to(Wh,"isLazyComponent");function ck(e){return typeof e=="object"&&e!==null&&"then"in e}to(ck,"isPromiseLike");var n3=to(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),s3=to(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),jd=B[" use ".trim().toString()];var i3=Object.defineProperty,l3=(e,t)=>i3(e,"name",{value:t,configurable:!0}),u3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vs=u3.reduce((e,t)=>{let o=mr(`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 c3(e,t){e&&Uo(()=>e.dispatchEvent(t))}l3(c3,"dispatchDiscreteCustomEvent");N();var d3=Object.defineProperty,xs=(e,t)=>d3(e,"name",{value:t,configurable:!0}),dk=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zr(e,t,{checkForDefaultPrevented:o=!0}={}){return xs(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}xs(Zr,"composeEventHandlers");function f3(e){if(!dk)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}xs(f3,"getOwnerWindow");function qh(e){if(!dk)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}xs(qh,"getOwnerDocument");function fk(e,t=!1){let{activeElement:o}=qh(e);if(!o?.nodeName)return null;if(pk(o)&&o.contentDocument)return fk(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=qh(o).getElementById(r);if(a)return a}}return o}xs(fk,"getActiveElement");function pk(e){return e.tagName==="IFRAME"}xs(pk,"isFrame");N();N();var p3=Object.defineProperty,ut=(e,t)=>p3(e,"name",{value:t,configurable:!0});function Kh(e){let t=e+"CollectionProvider",[o,r]=pr(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=mr(i),u=C((g,v)=>{let{scope:x,children:y}=g,b=n(i,x),R=eo(v,b.collectionRef);return d(l,{ref:R,children:y})});u.displayName=i;let c=e+"CollectionItemSlot",f="data-radix-collection-item",p=mr(c),m=C((g,v)=>{let{scope:x,children:y,...b}=g,R=E(null),w=eo(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(Kh,"createCollection");var mk=new WeakMap,$h=class Qr extends Map{static{ut(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],mk.set(this,!0)}set(t,o){return mk.get(this)&&(this.has(t)?this.#e[this.#e.indexOf(t)]=t:this.#e.push(t)),super.set(t,o),this}insert(t,o,r){let a=this.has(o),n=this.#e.length,s=Xh(t),i=s>=0?s:n+s,l=i<0||i>=n?-1:i;if(l===this.size||a&&l===this.size-1||l===-1)return this.set(o,r),this;let u=this.size+(a?0:1);s<0&&i++;let c=[...this.#e],f,p=!1;for(let m=i;m<u;m++)if(i===m){let h=c[m];c[m]===o&&(h=c[m+1]),a&&this.delete(o),f=this.get(h),this.set(o,r)}else{!p&&c[m-1]===o&&(p=!0);let h=c[p?m:m-1],g=f;f=this.get(h),this.delete(h),this.set(h,g)}return this}with(t,o,r){let a=new Qr(this);return a.insert(t,o,r),a}before(t){let o=this.#e.indexOf(t)-1;if(!(o<0))return this.entryAt(o)}setBefore(t,o,r){let a=this.#e.indexOf(t);return a===-1?this:this.insert(a,o,r)}after(t){let o=this.#e.indexOf(t);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(t,o,r){let a=this.#e.indexOf(t);return a===-1?this:this.insert(a+1,o,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(t){let o=super.delete(t);return o&&this.#e.splice(this.#e.indexOf(t),1),o}deleteAt(t){let o=this.keyAt(t);return o!==void 0?this.delete(o):!1}at(t){let o=Kd(this.#e,t);if(o!==void 0)return this.get(o)}entryAt(t){let o=Kd(this.#e,t);if(o!==void 0)return[o,this.get(o)]}indexOf(t){return this.#e.indexOf(t)}keyAt(t){return Kd(this.#e,t)}from(t,o){let r=this.indexOf(t);if(r===-1)return;let a=r+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(t,o){let r=this.indexOf(t);if(r===-1)return;let a=r+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(t,o){let r=0;for(let a of this){if(Reflect.apply(t,o,[a,r,this]))return a;r++}}findIndex(t,o){let r=0;for(let a of this){if(Reflect.apply(t,o,[a,r,this]))return r;r++}return-1}filter(t,o){let r=[],a=0;for(let n of this)Reflect.apply(t,o,[n,a,this])&&r.push(n),a++;return new Qr(r)}map(t,o){let r=[],a=0;for(let n of this)r.push([n[0],Reflect.apply(t,o,[n,a,this])]),a++;return new Qr(r)}reduce(...t){let[o,r]=t,a=0,n=r??this.at(0);for(let s of this)a===0&&t.length===1?n=s:n=Reflect.apply(o,this,[n,s,a,this]),a++;return n}reduceRight(...t){let[o,r]=t,a=r??this.at(-1);for(let n=this.size-1;n>=0;n--){let s=this.at(n);n===this.size-1&&t.length===1?a=s:a=Reflect.apply(o,this,[a,s,n,this])}return a}toSorted(t){let o=[...this.entries()].sort(t);return new Qr(o)}toReversed(){let t=new Qr;for(let o=this.size-1;o>=0;o--){let r=this.keyAt(o),a=this.get(r);t.set(r,a)}return t}toSpliced(...t){let o=[...this.entries()];return o.splice(...t),new Qr(o)}slice(t,o){let r=new Qr,a=this.size-1;if(t===void 0)return r;t<0&&(t=t+this.size),o!==void 0&&o>0&&(a=o-1);for(let n=t;n<=a;n++){let s=this.keyAt(n),i=this.get(s);r.set(s,i)}return r}every(t,o){let r=0;for(let a of this){if(!Reflect.apply(t,o,[a,r,this]))return!1;r++}return!0}some(t,o){let r=0;for(let a of this){if(Reflect.apply(t,o,[a,r,this]))return!0;r++}return!1}};function Kd(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=gk(e,t);return o===-1?void 0:e[o]}ut(Kd,"at");function gk(e,t){let o=e.length,r=Xh(t),a=r>=0?r:o+r;return a<0||a>=o?-1:a}ut(gk,"toSafeIndex");function Xh(e){return e!==e||e===0?0:Math.trunc(e)}ut(Xh,"toSafeInteger");function m3(e){let t=e+"CollectionProvider",[o,r]=pr(t),[a,n]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new $h,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=eo(S,M),[O,V]=I;return D(()=>{if(!T)return;let q=xk(()=>{});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=mr(u),f=C((b,R)=>{let{scope:w,children:I}=b,S=n(u,w),T=eo(R,S.collectionRef);return d(c,{ref:T,children:I})});f.displayName=u;let p=e+"CollectionItemSlot",m="data-radix-collection-item",h=mr(p),g=C((b,R)=>{let{scope:w,children:I,...S}=b,T=E(null),[M,A]=k(null),O=eo(R,T,A),V=n(p,w),{setItemMap:q}=V,F=E(S);hk(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(jh):(G.set(M,{...U,element:M}),G.toSorted(jh)):G),()=>{q(G=>!M||!G.has(M)?G:(G.delete(M),new $h(G)))}},[M,$,q]),d(h,{[m]:"",ref:O,children:I})});g.displayName=p;function v(){return k(new $h)}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(m3,"createCollection");function hk(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(hk,"shallowEqual");function vk(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ut(vk,"isElementPreceding");function jh(e,t){return!e[1].element||!t[1].element?0:vk(e[1].element,t[1].element)?-1:1}ut(jh,"sortByDocumentPosition");function xk(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}ut(xk,"getChildListObserver");N();N();var Jr=globalThis?.document?ct:()=>{};var g3=Object.defineProperty,h3=(e,t)=>g3(e,"name",{value:t,configurable:!0}),v3=B[" useId ".trim().toString()]||(()=>{}),x3=0;function Yh(e){let[t,o]=k(v3());return Jr(()=>{e||o(r=>r??String(x3++))},[e]),e||(t?`radix-${t}`:"")}h3(Yh,"useId");N();var y3=Object.defineProperty,b3=(e,t)=>y3(e,"name",{value:t,configurable:!0});function Zh(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}b3(Zh,"useCallbackRef");N();N();N();var C3=Object.defineProperty,w3=(e,t)=>C3(e,"name",{value:t,configurable:!0}),yk=B[" useEffectEvent ".trim().toString()],bk=B[" useInsertionEffect ".trim().toString()];function Qh(e){if(typeof yk=="function")return yk(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof bk=="function"?bk(()=>{t.current=e}):Jr(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}w3(Qh,"useEffectEvent");var S3=Object.defineProperty,zl=(e,t)=>S3(e,"name",{value:t,configurable:!0}),R3=B[" useInsertionEffect ".trim().toString()]||Jr;function ys({prop:e,defaultProp:t,onChange:o=zl(()=>{},"onChange"),caller:r}){let[a,n,s]=wk({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(hs){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=Sk(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}zl(ys,"useControllableState");function wk({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return R3(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}zl(wk,"useUncontrolledState");function Sk(e){return typeof e=="function"}zl(Sk,"isFunction");var Ck=Symbol("RADIX:SYNC_STATE");function I3(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=Qh(s);if(hs){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]=Gt((v,x)=>{if(x.type===Ck)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:Ck,state:a})},[a,f.state,l]),[g,p]}zl(I3,"useControllableStateReducer");N();var P3=Object.defineProperty,L3=(e,t)=>P3(e,"name",{value:t,configurable:!0}),T3=ce(void 0);function Wl(e){let t=ae(T3);return e||t||"ltr"}L3(Wl,"useDirection");N();N();var M3=Object.defineProperty,ev=(e,t)=>M3(e,"name",{value:t,configurable:!0}),Jh=!1;function Rk(){let[e,t]=k(Jh);return D(()=>{Jh||(Jh=!0,t(!0))},[]),e}ev(Rk,"useIsHydrated");var Ik=B[" useSyncExternalStore ".trim().toString()];function Pk(){return()=>{}}ev(Pk,"subscribe");function Lk(){return Ik(Pk,()=>!0,()=>!1)}ev(Lk,"useIsHydratedModern");var Tk=typeof Ik=="function"?Lk:Rk;var k3=Object.defineProperty,Ka=(e,t)=>k3(e,"name",{value:t,configurable:!0}),tv="rovingFocusGroup.onEntryFocus",E3={bubbles:!1,cancelable:!0},Xd="RovingFocusGroup",[ov,Mk,A3]=Kh(Xd),[D3,rv]=pr(Xd,[A3]),[N3,O3]=D3(Xd),kk=C(Ka(function(t,o){return d(ov.Provider,{scope:t.__scopeRovingFocusGroup,children:d(ov.Slot,{scope:t.__scopeRovingFocusGroup,children:d(F3,{...t,ref:o})})})},"RovingFocusGroup")),F3=C(Ka(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=eo(o,m),g=Wl(s),[v,x]=ys({prop:i,defaultProp:l??null,onChange:u,caller:Xd}),[y,b]=k(!1),R=Zh(c),w=Mk(r),I=E(!1),[S,T]=k(0);return D(()=>{let M=m.current;if(M)return M.addEventListener(tv,R),()=>M.removeEventListener(tv,R)},[R]),d(N3,{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(vs.div,{tabIndex:y||S===0?-1:0,"data-orientation":a,...p,ref:h,style:{outline:"none",...t.style},onMouseDown:Zr(t.onMouseDown,()=>{I.current=!0}),onFocus:Zr(t.onFocus,M=>{let A=!I.current;if(M.target===M.currentTarget&&A&&!y){let O=new CustomEvent(tv,E3);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);av(U,f)}}I.current=!1}),onBlur:Zr(t.onBlur,()=>b(!1))})})},"RovingFocusGroupImpl")),_3="RovingFocusGroupItem",Ek=C(Ka(function(t,o){let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...l}=t,u=Yh(),c=s||u,f=O3(_3,r),p=f.currentTabStopId===c,m=Mk(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f,x=Tk();return Jr(()=>{if(!(!x||!a))return h(),()=>g()},[x,a,h,g]),D(()=>{if(!(x||!a))return h(),()=>g()},[x,a,h,g]),d(ov.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:d(vs.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:o,onMouseDown:Zr(t.onMouseDown,y=>{a?f.onItemFocus(c):y.preventDefault()}),onFocus:Zr(t.onFocus,()=>f.onItemFocus(c)),onKeyDown:Zr(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;let b=Dk(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?Nk(w,I+1):w.slice(I+1)}setTimeout(()=>av(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})},"RovingFocusGroupItem")),V3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ak(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ka(Ak,"getDirectionAwareKey");function Dk(e,t,o){let r=Ak(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return V3[r]}Ka(Dk,"getFocusIntent");function av(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}Ka(av,"focusFirst");function Nk(e,t){return e.map((o,r)=>e[(t+r)%e.length])}Ka(Nk,"wrapArray");var H3=Object.defineProperty,ea=(e,t)=>H3(e,"name",{value:t,configurable:!0}),bs="ToggleGroup",[Fk,cCe]=pr(bs,[rv]),_k=rv(),Vk=C(ea(function(t,o){let{type:r,...a}=t;if(r==="single")return d(U3,{role:"radiogroup",...a,ref:o});if(r==="multiple")return d(G3,{role:"toolbar",...a,ref:o});throw new Error(`Missing prop \`type\` expected on \`${bs}\``)},"ToggleGroup")),[Bk,Hk]=Fk(bs),U3=C(ea(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ea(()=>{},"onValueChange"),...s}=t,[i,l]=ys({prop:r,defaultProp:a??"",onChange:n,caller:bs});return d(Bk,{scope:t.__scopeToggleGroup,type:"single",value:Z(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:H(()=>l(""),[l]),children:d(Uk,{...s,ref:o})})},"ToggleGroupImplSingle")),G3=C(ea(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ea(()=>{},"onValueChange"),...s}=t,[i,l]=ys({prop:r,defaultProp:a??[],onChange:n,caller:bs}),u=H(f=>l((p=[])=>[...p,f]),[l]),c=H(f=>l((p=[])=>p.filter(m=>m!==f)),[l]);return d(Bk,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:c,children:d(Uk,{...s,ref:o})})},"ToggleGroupImplMultiple")),[z3,W3]=Fk(bs),Uk=C(ea(function(t,o){let{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:n=!0,orientation:s,dir:i,loop:l=!0,...u}=t,c=_k(r),f=Wl(i),p={dir:f,...u};return d(z3,{scope:r,rovingFocus:n,disabled:a,children:n?d(kk,{asChild:!0,...c,orientation:s,dir:f,loop:l,children:d(vs.div,{...p,ref:o})}):d(vs.div,{...p,ref:o})})},"ToggleGroupImpl")),nv="ToggleGroupItem",Gk=C(ea(function(t,o){let r=Hk(nv,t.__scopeToggleGroup),a=W3(nv,t.__scopeToggleGroup),n=_k(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(Ek,{asChild:!0,...n,focusable:!i,active:s,ref:u,children:d(Ok,{...l,ref:o})}):d(Ok,{...l,ref:o})},"ToggleGroupItem")),Ok=C(ea(function(t,o){let{__scopeToggleGroup:r,value:a,...n}=t,s=Hk(nv,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return d(_l,{...l,...n,ref:o,onPressedChange:u=>{u?s.onItemActivate(a):s.onItemDeactivate(a)}})},"ToggleGroupItemImpl"));var zk=ce({size:"md",variant:"default"}),Wk=C(({className:e,variant:t,size:o,children:r,...a},n)=>d(Vk,{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(zk.Provider,{value:{variant:t,size:o},children:r})}));Wk.displayName="ToggleGroup";var qk=C(({className:e,children:t,variant:o,size:r,...a},n)=>{let s=ae(zk);return d(Gk,{ref:n,className:L(Fd({variant:s.variant??o,size:s.size??r}),e),...a,children:t})});qk.displayName="ToggleGroupItem";export{AD as Accordion,Jv as AccordionContent,Zv as AccordionItem,Qv as AccordionTrigger,ox as Alert,ax as AlertDescription,rx as AlertTitle,nx as AspectRatio,yf as Avatar,bf as AvatarFallback,bx as AvatarGroup,yx as AvatarImage,Lt as Badge,Sx as Breadcrumb,Cf as BreadcrumbEllipsis,Ix as BreadcrumbItem,Lx as BreadcrumbLink,Rx as BreadcrumbList,Tx as BreadcrumbPage,Px as BreadcrumbSeparator,Te as Button,ok as ButtonGroup,WC as Card,kw as CardCVCInput,KC as CardContent,jC as CardDescription,Mw as CardExpiryInput,XC as CardFooter,qC as CardHeader,Tw as CardNumberInput,$C as CardTitle,Ew as CardZipInput,Gw as Carousel,Ww as CarouselContent,$w as CarouselItem,Kw as CarouselNext,jw as CarouselPrevious,Hp as Checkbox,tS as CheckboxGroup,kc as CheckboxLabel,oS as CheckboxWithLabel,J2 as Collapsible,nS as CollapsibleContent,aS as CollapsibleTrigger,Im as ColorPicker,Um as Command,ZV as CommandDialog,cI as CommandEmpty,dI as CommandGroup,lI as CommandInput,pI as CommandItem,uI as CommandList,fI as CommandSeparator,mI as CommandShortcut,sg as DatePicker,OI as DateRangePicker,FI as DateTimePicker,Vm as Dialog,jV as DialogClose,id as DialogContent,Hm as DialogDescription,sI as DialogFooter,iI as DialogForm,Bm as DialogHeader,bl as DialogTitle,qV as DialogTrigger,XB as DraggableList,UH as DropdownMenu,ZP as DropdownMenuCheckboxItem,XP as DropdownMenuContent,zH as DropdownMenuGroup,YP as DropdownMenuItem,JP as DropdownMenuLabel,WH as DropdownMenuPortal,$H as DropdownMenuRadioGroup,QP as DropdownMenuRadioItem,eL as DropdownMenuSeparator,tL as DropdownMenuShortcut,qH as DropdownMenuSub,KP as DropdownMenuSubContent,jP as DropdownMenuSubTrigger,GH as DropdownMenuTrigger,oL as FileUpload,xU as FreeBadge,rL as GestureDrawer,Fge as GitHubStarButton,JH as GitHubStars,fV as GradientPicker,xt as Input,lL as InputOTP,uL as InputOTPGroup,fL as InputOTPSeparator,dL as InputOTPSlot,YM as Kbd,Et as Label,pL as LockedComponent,_I as MonthPicker,kg as MoonLogo,ahe as MoonLogoAnimated,rhe as MoonLogoIcon,AD as MoonUIAccordion,Jv as MoonUIAccordionContent,Zv as MoonUIAccordionItem,Qv as MoonUIAccordionTrigger,ox as MoonUIAlert,ax as MoonUIAlertDescription,rx as MoonUIAlertTitle,nx as MoonUIAspectRatio,yf as MoonUIAvatar,bf as MoonUIAvatarFallback,bx as MoonUIAvatarGroup,yx as MoonUIAvatarImage,Lt as MoonUIBadge,Sx as MoonUIBreadcrumb,Cf as MoonUIBreadcrumbEllipsis,Ix as MoonUIBreadcrumbItem,Lx as MoonUIBreadcrumbLink,Rx as MoonUIBreadcrumbList,Tx as MoonUIBreadcrumbPage,Px as MoonUIBreadcrumbSeparator,Te as MoonUIButton,ok as MoonUIButtonGroup,Zi as MoonUICalendar,WC as MoonUICard,kw as MoonUICardCVCInput,KC as MoonUICardContent,jC as MoonUICardDescription,Mw as MoonUICardExpiryInput,XC as MoonUICardFooter,qC as MoonUICardHeader,Tw as MoonUICardNumberInput,$C as MoonUICardTitle,Ew as MoonUICardZipInput,Gw as MoonUICarousel,Ww as MoonUICarouselContent,$w as MoonUICarouselItem,Kw as MoonUICarouselNext,jw as MoonUICarouselPrevious,Hp as MoonUICheckbox,tS as MoonUICheckboxGroup,kc as MoonUICheckboxLabel,oS as MoonUICheckboxWithLabel,J2 as MoonUICollapsible,nS as MoonUICollapsibleContent,aS as MoonUICollapsibleTrigger,Im as MoonUIColorPicker,Um as MoonUICommand,ZV as MoonUICommandDialog,cI as MoonUICommandEmpty,dI as MoonUICommandGroup,lI as MoonUICommandInput,pI as MoonUICommandItem,uI as MoonUICommandList,fI as MoonUICommandSeparator,mI as MoonUICommandShortcut,$B as MoonUIDataTableBasic,sg as MoonUIDatePicker,OI as MoonUIDateRangePicker,FI as MoonUIDateTimePicker,Vm as MoonUIDialog,jV as MoonUIDialogClose,id as MoonUIDialogContent,Hm as MoonUIDialogDescription,sI as MoonUIDialogFooter,iI as MoonUIDialogForm,Bm as MoonUIDialogHeader,bl as MoonUIDialogTitle,qV as MoonUIDialogTrigger,XB as MoonUIDraggableList,UH as MoonUIDropdownMenu,ZP as MoonUIDropdownMenuCheckboxItem,XP as MoonUIDropdownMenuContent,zH as MoonUIDropdownMenuGroup,YP as MoonUIDropdownMenuItem,JP as MoonUIDropdownMenuLabel,WH as MoonUIDropdownMenuPortal,$H as MoonUIDropdownMenuRadioGroup,QP as MoonUIDropdownMenuRadioItem,eL as MoonUIDropdownMenuSeparator,tL as MoonUIDropdownMenuShortcut,qH as MoonUIDropdownMenuSub,KP as MoonUIDropdownMenuSubContent,jP as MoonUIDropdownMenuSubTrigger,GH as MoonUIDropdownMenuTrigger,oL as MoonUIFileUpload,xU as MoonUIFreeBadge,rL as MoonUIGestureDrawer,JH as MoonUIGitHubStars,fV as MoonUIGradientPicker,xt as MoonUIInput,lL as MoonUIInputOTP,uL as MoonUIInputOTPGroup,fL as MoonUIInputOTPSeparator,dL as MoonUIInputOTPSlot,YM as MoonUIKbd,Et as MoonUILabel,pL as MoonUILockedComponent,_I as MoonUIMonthPicker,kg as MoonUIMoonLogo,mL as MoonUIPagination,gL as MoonUIPaginationContent,bL as MoonUIPaginationEllipsis,hL as MoonUIPaginationItem,Sd as MoonUIPaginationLink,yL as MoonUIPaginationNext,xL as MoonUIPaginationPrevious,lT as MoonUIPhoneInput,lr as MoonUIPopover,G_ as MoonUIPopoverAnchor,z_ as MoonUIPopoverClose,Bo as MoonUIPopoverContent,l0 as MoonUIPopoverFooter,i0 as MoonUIPopoverHeader,s0 as MoonUIPopoverSeparator,ur as MoonUIPopoverTrigger,vU as MoonUIProBadge,hU as MoonUIProComponentWrapper,Cd as MoonUIProgress,cT as MoonUIRadioGroup,Kg as MoonUIRadioGroupItem,dT as MoonUIRadioItemWithLabel,Xg as MoonUIRadioLabel,QM as MoonUIRating,jU as MoonUIRichTextEditor,DT as MoonUIScrollArea,th as MoonUIScrollBar,FT as MoonUIScrollReveal,_T as MoonUIScrollRevealContainer,VT as MoonUIScrollRevealItem,is as MoonUISelect,us as MoonUISelectContent,GU as MoonUISelectGroup,Rt as MoonUISelectItem,nT as MoonUISelectLabel,jg as MoonUISelectScrollDownButton,$g as MoonUISelectScrollUpButton,sT as MoonUISelectSeparator,ls as MoonUISelectTrigger,Dl as MoonUISelectValue,Zt as MoonUISeparator,dV as MoonUISimpleColorPicker,hM as MoonUISimpleEditor,gM as MoonUISimpleTooltip,Yr as MoonUISkeleton,Ch as MoonUISkeletonAvatar,xM as MoonUISkeletonCard,bh as MoonUISkeletonText,cr as MoonUISlider,ek as MoonUISpinner,yM as MoonUISwipeableCard,PM as MoonUISwitch,pd as MoonUITable,gd as MoonUITableBody,NI as MoonUITableCaption,Sl as MoonUITableCell,DI as MoonUITableFooter,hd as MoonUITableHead,md as MoonUITableHeader,ns as MoonUITableRow,ed as MoonUITabs,os as MoonUITabsContent,td as MoonUITabsList,ts as MoonUITabsTrigger,LM as MoonUITagsInput,TM as MoonUITextarea,Vh as MoonUIToast,$M as MoonUIToastAction,Bh as MoonUIToastClose,Uh as MoonUIToastDescription,qM as MoonUIToastProvider,Hh as MoonUIToastTitle,_h as MoonUIToastViewport,Kz as MoonUIToaster,_d as MoonUIToggle,Wk as MoonUIToggleGroup,qk as MoonUIToggleGroupItem,Hd as MoonUITooltip,yh as MoonUITooltipArrow,Hl as MoonUITooltipContent,xh as MoonUITooltipProvider,Ud as MoonUITooltipTrigger,mL as Pagination,gL as PaginationContent,bL as PaginationEllipsis,hL as PaginationItem,Sd as PaginationLink,yL as PaginationNext,xL as PaginationPrevious,an as Palette,lT as PhoneInput,tu as Pipette,lr as Popover,G_ as PopoverAnchor,z_ as PopoverClose,Bo as PopoverContent,l0 as PopoverFooter,i0 as PopoverHeader,s0 as PopoverSeparator,ur as PopoverTrigger,vU as ProBadge,hU as ProComponentWrapper,Cd as Progress,mU as REGEXP_ONLY_CHARS,pU as REGEXP_ONLY_DIGITS,gU as REGEXP_ONLY_DIGITS_AND_CHARS,cT as RadioGroup,Kg as RadioGroupItem,dT as RadioItemWithLabel,Xg as RadioLabel,QM as Rating,jU as RichTextEditor,DT as ScrollArea,th as ScrollBar,FT as ScrollReveal,_T as ScrollRevealContainer,VT as ScrollRevealItem,is as Select,us as SelectContent,GU as SelectGroup,Rt as SelectItem,nT as SelectLabel,jg as SelectScrollDownButton,$g as SelectScrollUpButton,sT as SelectSeparator,ls as SelectTrigger,Dl as SelectValue,Zt as Separator,dV as SimpleColorPicker,hM as SimpleEditor,gM as SimpleTooltip,Yr as Skeleton,Ch as SkeletonAvatar,xM as SkeletonCard,bh as SkeletonText,cr as Slider,ek as Spinner,yM as SwipeableCard,PM as Switch,pd as Table,gd as TableBody,NI as TableCaption,Sl as TableCell,DI as TableFooter,hd as TableHead,md as TableHeader,ns as TableRow,ed as Tabs,os as TabsContent,td as TabsList,ts as TabsTrigger,LM as TagsInput,TM as Textarea,Vh as Toast,$M as ToastAction,Bh as ToastClose,Uh as ToastDescription,qM as ToastProvider,Hh as ToastTitle,_h as ToastViewport,Kz as Toaster,_d as Toggle,Wk as ToggleGroup,qk as ToggleGroupItem,Hd as Tooltip,yh as TooltipArrow,Hl as TooltipContent,xh as TooltipProvider,Ud as TooltipTrigger,ND as aspectRatioVariants,Cx as badgeVariants,YD as breadcrumbVariants,tk as buttonGroupVariants,ru as buttonVariants,RO as cardVariants,zw as carouselContentVariants,qw as carouselItemVariants,L as cn,eF as collapsibleContentVariants,rS as collapsibleTriggerVariants,go as format,cL as inputOTPSlotVariants,XM as kbdVariants,Cx as moonUIBadgeVariants,tk as moonUIButtonGroupVariants,ru as moonUIButtonVariants,zw as moonUICarouselContentVariants,qw as moonUICarouselItemVariants,jB as moonUICreateSortableHeader,cL as moonUIInputOTPSlotVariants,XM as moonUIKbdVariants,n0 as moonUIPopoverContentVariants,ZM as moonUIRatingVariants,vM as moonUISkeletonVariants,JM as moonUISpinnerVariants,Fd as moonUIToggleVariants,mM as moonUITooltipVariants,n0 as popoverContentVariants,jH as progressVariants,ZM as ratingVariants,TG as separatorVariants,vM as skeletonVariants,JM as spinnerVariants,wz as switchVariants,rV as tabsListVariants,aV as tabsTriggerVariants,jM as toast,Fd as toggleVariants,mM as tooltipVariants,nl as useCarousel,KM as useToast};
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
+ */