@moontra/moonui 6.26.0 → 6.28.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.
@@ -1,8 +1,8 @@
1
- /** @license MoonUI v6.26.0 — MIT — https://moonui.dev
1
+ /** @license MoonUI v6.28.0 — MIT — https://moonui.dev
2
2
  * CDN build (ESM — sayfada importmap gerektirir). React bundle'a DAHIL DEGILDIR — sayfadan gelir.
3
3
  * Stil icin moonui.css de yuklenmelidir.
4
4
  */
5
- var iE=Object.create;var Xl=Object.defineProperty;var lE=Object.getOwnPropertyDescriptor;var uE=Object.getOwnPropertyNames;var cE=Object.getPrototypeOf,dE=Object.prototype.hasOwnProperty;var fE=(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 pE=(e,t)=>()=>(e&&(t=e(e=0)),t);var mv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mE=(e,t)=>{for(var o in t)Xl(e,o,{get:t[o],enumerable:!0})},gv=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of uE(t))!dE.call(e,a)&&a!==o&&Xl(e,a,{get:()=>t[a],enumerable:!(r=lE(t,a))||r.enumerable});return e};var gE=(e,t,o)=>(o=e!=null?iE(cE(e)):{},gv(t||!e||!e.__esModule?Xl(o,"default",{value:e,enumerable:!0}):o,e)),hE=e=>gv(Xl({},"__esModule",{value:!0}),e);var H={};mE(H,{Children:()=>Ie,Component:()=>Is,Fragment:()=>Je,Profiler:()=>vE,PureComponent:()=>xE,StrictMode:()=>yE,Suspense:()=>bE,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>CE,act:()=>wE,cloneElement:()=>Fe,createContext:()=>le,createElement:()=>me,createFactory:()=>SE,createRef:()=>RE,default:()=>Pe,forwardRef:()=>C,isValidElement:()=>Le,lazy:()=>IE,memo:()=>Zd,startTransition:()=>PE,unstable_act:()=>LE,useCallback:()=>B,useContext:()=>te,useDebugValue:()=>TE,useDeferredValue:()=>ME,useEffect:()=>D,useId:()=>Ge,useImperativeHandle:()=>ta,useInsertionEffect:()=>Ps,useLayoutEffect:()=>ct,useMemo:()=>Z,useReducer:()=>Gt,useRef:()=>E,useState:()=>k,useSyncExternalStore:()=>Qd,useTransition:()=>kE,version:()=>EE});import*as oe from"react";var Ie,Is,Je,vE,xE,yE,bE,CE,wE,Fe,le,me,SE,RE,C,Le,IE,Zd,PE,LE,B,te,TE,ME,D,Ge,ta,Ps,ct,Z,Gt,E,k,Qd,kE,EE,Pe,O=pE(()=>{Ie=oe.Children,Is=oe.Component,Je=oe.Fragment,vE=oe.Profiler,xE=oe.PureComponent,yE=oe.StrictMode,bE=oe.Suspense,CE=oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wE=oe.act,Fe=oe.cloneElement,le=oe.createContext,me=oe.createElement,SE=oe.createFactory,RE=oe.createRef,C=oe.forwardRef,Le=oe.isValidElement,IE=oe.lazy,Zd=oe.memo,PE=oe.startTransition,LE=oe.unstable_act,B=oe.useCallback,te=oe.useContext,TE=oe.useDebugValue,ME=oe.useDeferredValue,D=oe.useEffect,Ge=oe.useId,ta=oe.useImperativeHandle,Ps=oe.useInsertionEffect,ct=oe.useLayoutEffect,Z=oe.useMemo,Gt=oe.useReducer,E=oe.useRef,k=oe.useState,Qd=oe.useSyncExternalStore,kE=oe.useTransition,EE=oe.version,Pe=oe.default!==void 0?oe.default:oe});var ux=mv(lx=>{"use strict";var cn=(O(),hE(H));function WD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qD=typeof Object.is=="function"?Object.is:WD,$D=cn.useState,jD=cn.useEffect,KD=cn.useLayoutEffect,XD=cn.useDebugValue;function YD(e,t){var o=t(),r=$D({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return KD(function(){a.value=o,a.getSnapshot=t,gf(a)&&n({inst:a})},[e,o,t]),jD(function(){return gf(a)&&n({inst:a}),e(function(){gf(a)&&n({inst:a})})},[e]),XD(o),o}function gf(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!qD(e,o)}catch{return!0}}function ZD(e,t){return t()}var QD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZD:YD;lx.useSyncExternalStore=cn.useSyncExternalStore!==void 0?cn.useSyncExternalStore:QD});var dx=mv((q$,cx)=>{"use strict";cx.exports=ux()});O();O();O();import*as oa from"react/jsx-runtime";var Ve=oa.Fragment,d=oa.jsx,P=oa.jsxs;function hv(e,t){let o=le(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=te(o);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[r,a]}function Ee(e,t=[]){let o=[];function r(n,s){let i=le(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=te(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=>le(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,AE(a,...t)]}function AE(...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}O();O();function vv(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=vv(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():vv(e[a],null)}}}}function pe(...e){return B(Nt(...e),e)}O();function It(e){let t=DE(e),o=C((r,a)=>{let{children:n,...s}=r,i=Ie.toArray(n),l=i.find(NE);if(l){let u=l.props.children,c=i.map(f=>f===l?Ie.count(u)>1?Ie.only(null):Le(u)?u.props.children:null:f);return d(t,{...s,ref:a,children:Le(u)?Fe(u,void 0,c):null})}return d(t,{...s,ref:a,children:n})});return o.displayName=`${e}.Slot`,o}var Ya=It("Slot");function DE(e){let t=C((o,r)=>{let{children:a,...n}=o;if(Le(a)){let s=FE(a),i=OE(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 xv=Symbol("radix.slottable");function Jd(e){let t=({children:o})=>d(Ve,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=xv,t}var yv=Jd("Slottable");function NE(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xv}function OE(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 FE(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)}O();function Lo(e){let t=e+"CollectionProvider",[o,r]=Ee(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 b5=!!(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)}}O();O();var Ae=globalThis?.document?ct:()=>{};O();var _E=H[" useInsertionEffect ".trim().toString()]||Ae;function Be({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=VE({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=B(c=>{if(i){let f=BE(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}function VE({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return _E(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function BE(e){return typeof e=="function"}var R5=Symbol("RADIX:SYNC_STATE");O();import*as st from"react-dom";var Ls=st.createPortal;var Go=st.flushSync;var bv=st.default!==void 0?st.default:st;var HE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=HE.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 Za(e,t){e&&Go(()=>e.dispatchEvent(t))}O();O();O();function UE(e,t){return Gt((o,r)=>t[o][r]??o,e)}var $e=e=>{let{present:t,children:o}=e,r=GE(t),a=typeof o=="function"?o({present:r.isPresent}):Ie.only(o),n=pe(r.ref,zE(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};$e.displayName="Presence";function GE(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=e?"mounted":"unmounted",[i,l]=UE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{let u=Yl(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=Yl(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=Yl(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=Yl(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:B(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Yl(e){return e?.animationName||"none"}function zE(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)}O();var WE=H[" useId ".trim().toString()]||(()=>{}),qE=0;function Te(e){let[t,o]=k(WE());return Ae(()=>{e||o(r=>r??String(qE++))},[e]),e||(t?`radix-${t}`:"")}var Zl="Collapsible",[$E,ef]=Ee(Zl),[jE,tf]=$E(Zl),Cv=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:Zl});return d(jE,{scope:o,disabled:n,contentId:Te(),open:l,onOpenToggle:B(()=>u(c=>!c),[u]),children:d(Y.div,{"data-state":rf(l),"data-disabled":n?"":void 0,...i,ref:t})})});Cv.displayName=Zl;var wv="CollapsibleTrigger",Sv=C((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=tf(wv,o);return d(Y.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":rf(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:X(e.onClick,a.onOpenToggle)})});Sv.displayName=wv;var of="CollapsibleContent",Rv=C((e,t)=>{let{forceMount:o,...r}=e,a=tf(of,e.__scopeCollapsible);return d($e,{present:o||a.open,children:({present:n})=>d(KE,{...r,ref:t,present:n})})});Rv.displayName=of;var KE=C((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=tf(of,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":rf(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 rf(e){return e?"open":"closed"}var Ql=Cv,Qa=Sv,Ts=Rv;O();var XE=le(void 0);function To(e){let t=te(XE);return e||t||"ltr"}var ao="Accordion",YE=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[nf,ZE,QE]=Lo(ao),[eu,oW]=Ee(ao,[QE,ef]),sf=ef(),Pv=Pe.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return d(nf.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?d(oA,{...n,ref:t}):d(tA,{...a,ref:t})})});Pv.displayName=ao;var[Lv,JE]=eu(ao),[Tv,eA]=eu(ao,{collapsible:!1}),tA=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(Lv,{scope:e.__scopeAccordion,value:Pe.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:Pe.useCallback(()=>n&&l(""),[n,l]),children:d(Tv,{scope:e.__scopeAccordion,collapsible:n,children:d(Mv,{...s,ref:t})})})}),oA=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(Lv,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:d(Tv,{scope:e.__scopeAccordion,collapsible:!0,children:d(Mv,{...n,ref:t})})})}),[rA,tu]=eu(ao),Mv=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=ZE(o),f=To(a)==="ltr",p=X(e.onKeyDown,m=>{if(!YE.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(rA,{scope:o,disabled:r,direction:a,orientation:n,children:d(nf.Slot,{scope:o,children:d(Y.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:p})})})}),Jl="AccordionItem",[aA,lf]=eu(Jl),kv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=tu(Jl,o),s=JE(Jl,o),i=sf(o),l=Te(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return d(aA,{scope:o,open:u,disabled:c,triggerId:l,children:d(Ql,{"data-orientation":n.orientation,"data-state":Fv(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:f=>{f?s.onItemOpen(r):s.onItemClose(r)}})})});kv.displayName=Jl;var Ev="AccordionHeader",Av=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=tu(ao,o),n=lf(Ev,o);return d(Y.h3,{"data-orientation":a.orientation,"data-state":Fv(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Av.displayName=Ev;var af="AccordionTrigger",Dv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=tu(ao,o),n=lf(af,o),s=eA(af,o),i=sf(o);return d(nf.ItemSlot,{scope:o,children:d(Qa,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});Dv.displayName=af;var Nv="AccordionContent",Ov=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=tu(ao,o),n=lf(Nv,o),s=sf(o);return d(Ts,{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}})});Ov.displayName=Nv;function Fv(e){return e?"open":"closed"}var _v=Pv,Vv=kv,Bv=Av,uf=Dv,cf=Ov;O();var Hv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),df=e=>{let t=sA(e);return t.charAt(0).toUpperCase()+t.slice(1)},ou=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),Uv=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};O();var Gv={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 zv=C(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>me("svg",{ref:l,...Gv,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:ou("lucide",a),...!n&&!Uv(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(zv,{ref:n,iconNode:t,className:ou(`lucide-${Hv(df(e))}`,`lucide-${e}`,r),...a}));return o.displayName=df(e),o};var iA=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Ms=j("align-center",iA);var lA=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],ks=j("align-justify",lA);var uA=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Es=j("align-left",uA);var cA=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],As=j("align-right",cA);var dA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ja=j("arrow-down",dA);var fA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ds=j("arrow-left",fA);var pA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ns=j("arrow-right",pA);var mA=[["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"}]],en=j("arrow-up-down",mA);var gA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],tn=j("arrow-up",gA);var hA=[["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"}]],Os=j("bold",hA);var vA=[["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",vA);var xA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pt=j("check",xA);var yA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mo=j("chevron-down",yA);var bA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],no=j("chevron-left",bA);var CA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wt=j("chevron-right",CA);var wA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Fs=j("chevron-up",wA);var SA=[["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",SA);var RA=[["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",RA);var IA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],na=j("circle",IA);var PA=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_s=j("clock",PA);var LA=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Vs=j("code",LA);var TA=[["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"}]],Bs=j("copy",TA);var MA=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Hs=j("credit-card",MA);var kA=[["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"}]],on=j("crown",kA);var EA=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Us=j("dot",EA);var AA=[["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",AA);var DA=[["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"}]],Gs=j("external-link",DA);var NA=[["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",NA);var OA=[["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"}]],zs=j("file-text",OA);var FA=[["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"}]],Ws=j("file",FA);var _A=[["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"}]],qs=j("git-fork",_A);var VA=[["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",VA);var BA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rn=j("info",BA);var HA=[["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"}]],$s=j("italic",HA);var UA=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],js=j("link",UA);var GA=[["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"}]],Ks=j("list-ordered",GA);var zA=[["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"}]],Xs=j("list",zA);var WA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ot=j("loader-circle",WA);var qA=[["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"}]],an=j("lock",qA);var $A=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ys=j("minus",$A);var jA=[["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"}]],Zs=j("music",jA);var KA=[["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"}]],nn=j("palette",KA);var XA=[["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"}]],Qs=j("phone",XA);var YA=[["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"}]],ru=j("pipette",YA);var ZA=[["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"}]],Js=j("quote",ZA);var QA=[["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"}]],ei=j("redo",QA);var JA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],la=j("search",JA);var eD=[["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",eD);var tD=[["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",tD);var oD=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],ti=j("strikethrough",oD);var rD=[["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",rD);var aD=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],oi=j("underline",aD);var nD=[["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"}]],ri=j("undo",nD);var sD=[["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"}]],ai=j("upload",sD);var iD=[["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"}]],ni=j("video",iD);var lD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ot=j("x",lD);var uD=[["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"}]],sn=j("zap",uD);O();function Wv(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=Wv(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function au(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Wv(e))&&(r&&(r+=" "),r+=t);return r}var mf="-",cD=e=>{let t=fD(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split(mf);return i[0]===""&&i.length!==1&&i.shift(),jv(i,t)||dD(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},jv=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?jv(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(mf);return t.validators.find(({validator:s})=>s(n))?.classGroupId},qv=/^\[(.+)\]$/,dD=e=>{if(qv.test(e)){let t=qv.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},fD=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return mD(Object.entries(e.classGroups),o).forEach(([n,s])=>{pf(s,r,n,t)}),r},pf=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:$v(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(pD(a)){pf(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{pf(s,$v(t,n),o,r)})})},$v=(e,t)=>{let o=e;return t.split(mf).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},pD=e=>e.isThemeGetter,mD=(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,gD=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)}}},Kv="!",hD=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(Kv),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},vD=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},xD=e=>({cache:gD(e.cacheSize),parseClassName:hD(e),...cD(e)}),yD=/\s+/,bD=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],s=e.trim().split(yD),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=vD(c).join(":"),x=f?v+Kv: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 CD(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Xv(t))&&(r&&(r+=" "),r+=o);return r}var Xv=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Xv(e[r]))&&(o&&(o+=" "),o+=t);return o};function wD(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,f)=>f(c),e());return o=xD(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=bD(l,o);return a(l,c),c}return function(){return n(CD.apply(null,arguments))}}var ze=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Yv=/^\[(?:([a-z-]+):)?(.+)\]$/i,SD=/^\d+\/\d+$/,RD=new Set(["px","full","screen"]),ID=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PD=/\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$/,LD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,TD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zo=e=>ln(e)||RD.has(e)||SD.test(e),yr=e=>un(e,"length",_D),ln=e=>!!e&&!Number.isNaN(Number(e)),ff=e=>un(e,"number",ln),si=e=>!!e&&Number.isInteger(Number(e)),kD=e=>e.endsWith("%")&&ln(e.slice(0,-1)),Ce=e=>Yv.test(e),br=e=>ID.test(e),ED=new Set(["length","size","percentage"]),AD=e=>un(e,ED,Zv),DD=e=>un(e,"position",Zv),ND=new Set(["image","url"]),OD=e=>un(e,ND,BD),FD=e=>un(e,"",VD),ii=()=>!0,un=(e,t,o)=>{let r=Yv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},_D=e=>PD.test(e)&&!LD.test(e),Zv=()=>!1,VD=e=>TD.test(e),BD=e=>MD.test(e);var HD=()=>{let e=ze("colors"),t=ze("spacing"),o=ze("blur"),r=ze("brightness"),a=ze("borderColor"),n=ze("borderRadius"),s=ze("borderSpacing"),i=ze("borderWidth"),l=ze("contrast"),u=ze("grayscale"),c=ze("hueRotate"),f=ze("invert"),p=ze("gap"),m=ze("gradientColorStops"),h=ze("gradientColorStopPositions"),g=ze("inset"),v=ze("margin"),x=ze("opacity"),y=ze("padding"),b=ze("saturate"),R=ze("scale"),w=ze("sepia"),I=ze("skew"),S=ze("space"),T=ze("translate"),M=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Ce,t],V=()=>[Ce,t],U=()=>["",zo,yr],N=()=>["auto",ln,Ce],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Ce],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[ln,Ce];return{cacheSize:500,separator:":",theme:{colors:[ii],spacing:[zo,yr],blur:["none","",br,Ce],brightness:se(),borderColor:[e],borderRadius:["none","","full",br,Ce],borderSpacing:V(),borderWidth:U(),contrast:se(),grayscale:q(),hueRotate:se(),invert:q(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[kD,yr],inset:_(),margin:_(),opacity:se(),padding:V(),saturate:se(),scale:se(),sepia:q(),skew:se(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[br]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"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",si,Ce]}],basis:[{basis:_()}],"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:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",si,Ce]}],"grid-cols":[{"grid-cols":[ii]}],"col-start-end":[{col:["auto",{span:["full",si,Ce]},Ce]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ii]}],"row-start-end":[{row:["auto",{span:[si,Ce]},Ce]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"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",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"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",ff]}],"font-family":[{font:[ii]}],"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",ln,ff]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zo,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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zo,yr]}],"underline-offset":[{"underline-offset":["auto",zo,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:[...$(),DD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",AD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},OD]}],"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:[...G(),"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:G()}],"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:["",...G()]}],"outline-offset":[{"outline-offset":[zo,Ce]}],"outline-w":[{outline:[zo,yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[zo,yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",br,FD]}],"shadow-color":[{shadow:[ii]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],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:se()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:se()}],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:[si,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:[zo,yr,ff]}],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 Qv=wD(HD);function L(...e){return Qv(au(e))}function li(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(li).filter(Boolean).join(" ").trim();if(Le(e)){let t=e.props;return li(t.children)}return""}var UD=_v,Jv=C(({className:e,...t},o)=>d(Vv,{ref:o,className:L("moonui-theme","border-b border-border",e),...t}));Jv.displayName="AccordionItem";var ex=C(({className:e,children:t,...o},r)=>d(Bv,{className:"flex",children:P(uf,{ref:r,className:L("flex flex-1 items-center justify-between py-4 font-medium transition-all","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"})]})}));ex.displayName=uf.displayName;var tx=C(({className:e,children:t,...o},r)=>d(cf,{ref:r,className:L("overflow-hidden text-sm text-foreground/80 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})}));tx.displayName=cf.displayName;O();var ox=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rx=au,Q=(e,t)=>o=>{var r;if(t?.variants==null)return rx(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=ox(c)||ox(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 rx(e,s,l,o?.class,o?.className)};var GD=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-subtle-foreground 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}}),ax=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 rn;default:return rn}},[t]);return P("div",{ref:u,role:"alert",className:L("moonui-theme",GD({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"})})]})});ax.displayName="Alert";var nx=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}));nx.displayName="AlertTitle";var sx=C(({className:e,...t},o)=>d("div",{ref:o,className:L("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));sx.displayName="AlertDescription";O();var zD=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"}}),ix=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",zD({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:d("div",{className:"absolute inset-0",children:n})}));ix.displayName="AspectRatio";O();O();O();function We(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}var fx=gE(dx(),1);function px(){return(0,fx.useSyncExternalStore)(JD,()=>!0,()=>!1)}function JD(){return()=>{}}var hf="Avatar",[e1,J$]=Ee(hf),[t1,gx]=e1(hf),hx=C((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=k("idle");return d(t1,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:d(Y.span,{...r,ref:t})})});hx.displayName=hf;var vx="AvatarImage",xx=C((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=gx(vx,o),i=o1(r,n),l=We(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});xx.displayName=vx;var yx="AvatarFallback",bx=C((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=gx(yx,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});bx.displayName=yx;function mx(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function o1(e,{referrerPolicy:t,crossOrigin:o}){let r=px(),a=E(null),n=(()=>r?(a.current||(a.current=new window.Image),a.current):null)(),[s,i]=k(()=>mx(n,e));return Ae(()=>{i(mx(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 vf=hx,xf=xx,yf=bx;var a1=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"}}),bf=C(({className:e,size:t,radius:o,variant:r,...a},n)=>d(vf,{ref:n,className:L("moonui-theme",a1({size:t,radius:o,variant:r}),e),...a}));bf.displayName=vf.displayName;var Cx=C(({className:e,alt:t="",...o},r)=>d(xf,{ref:r,alt:t,className:L("moonui-theme","aspect-square h-full w-full",e),...o}));Cx.displayName=xf.displayName;var Cf=C(({className:e,...t},o)=>d(yf,{ref:o,className:L("flex h-full w-full items-center justify-center bg-muted",e),...t}));Cf.displayName=yf.displayName;var wx=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(bf,{variant:"border",children:P(Cf,{children:["+",l]})})})]})})});wx.displayName="AvatarGroup";O();var Sx=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: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-600 text-white","hover:bg-error-700 dark:hover:bg-error-700","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","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",Sx({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||(li(v)?`Remove ${li(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";O();var n1=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"}}),Rx=le(void 0),Ix=C(({className:e,variant:t,size:o,separator:r,showHomeIcon:a,...n},s)=>d(Rx.Provider,{value:r,children:d("nav",{ref:s,className:L("moonui-theme",n1({variant:t,size:o}),e),"aria-label":"breadcrumb",...n})}));Ix.displayName="Breadcrumb";var Px=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(wf,{}),l]})}return d("ol",{ref:a,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Px.displayName="BreadcrumbList";var Lx=C(({className:e,isCurrent:t,href:o,asChild:r=!1,children:a,...n},s)=>{let i=r?Ya: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})})});Lx.displayName="BreadcrumbItem";var Tx=({children:e,className:t,icon:o,...r})=>{let a=te(Rx);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"})})};Tx.displayName="BreadcrumbSeparator";var wf=({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"})]});wf.displayName="BreadcrumbEllipsis";var Mx=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}));Mx.displayName="BreadcrumbLink";var kx=C(({className:e,...t},o)=>d("span",{ref:o,className:L("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));kx.displayName="BreadcrumbPage";O();var nu=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-error-600 dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-error-700","active:bg-destructive/80 dark:active:bg-error-800","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-700 dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success-800","active:bg-success/80 dark:active:bg-success-900","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-600 text-white","shadow-[0_0_30px_rgba(var(--glow-blue-rgb),0.5)]","hover:shadow-[0_0_40px_rgba(var(--glow-blue-rgb),0.7)]","active:shadow-[0_0_20px_rgba(var(--glow-blue-rgb),0.4)]","hover:bg-blue-700","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-subtle dark:text-primary-subtle-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(var(--glow-green-rgb),0.6)]","active:shadow-[0_0_15px_rgba(var(--glow-green-rgb),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}}),Me=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,onClick:f,...p},m)=>{let h=n&&Le(u),g=h?Ya:"button",v=c||s,x=h?{"aria-disabled":v||void 0,"data-disabled":v?"":void 0}:{disabled:v},y=h&&v?b=>{b.preventDefault(),b.stopPropagation()}:f;return P(g,{className:L("moonui-theme",nu({variant:t,size:o,rounded:r,fullWidth:a,className:e}),h&&v&&"opacity-50 cursor-not-allowed pointer-events-none"),ref:m,...x,"aria-busy":s||void 0,"data-loading":s?"":void 0,...p,onClick:y,children:[s&&d(ot,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,h?d(yv,{children:u}):u,!s&&l]})});Me.displayName="Button";O();O();O();var dn=le({});O();function Eo(e){let t=E(null);return t.current===null&&(t.current=e()),t.current}O();var fn=typeof window<"u";var pn=fn?ct:D;O();O();O();var Cr=le(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 Wo=()=>{},dt=()=>{};var mt={};var ui=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ci(e){return typeof e=="object"&&e!==null}var di=e=>/^0[^.\s]+$/u.test(e);function ca(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ke=e=>e;var s1=(e,t)=>o=>t(e(o)),lo=(...e)=>e.reduce(s1);var zt=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var qo=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 fi(e,t){return t?e*(1e3/t):0}var Ex=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var Ax=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,i1=1e-7,l1=12;function u1(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=Ax(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>i1&&++i<l1);return s}function wr(e,t,o,r){if(e===t&&o===r)return Ke;let a=n=>u1(n,0,1,e,o);return n=>n===0||n===1?n:Ax(a(n),t,r)}var su=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var iu=e=>t=>1-e(1-t);var lu=wr(.33,1.53,.69,.99),mn=iu(lu),pi=su(mn);var mi=e=>(e*=2)<1?.5*mn(e):.5*(2-Math.pow(2,-10*(e-1)));var gi=e=>1-Math.sin(Math.acos(e)),hi=iu(gi),vi=su(gi);var Sf=wr(.42,0,1,1),Rf=wr(0,0,.58,1),xi=wr(.42,0,.58,1);var yi=e=>Array.isArray(e)&&typeof e[0]!="number";function bi(e,t){return yi(e)?e[Ex(0,e.length,t)]:e}var Ci=e=>Array.isArray(e)&&typeof e[0]=="number";var Dx={linear:Ke,easeIn:Sf,easeInOut:xi,easeOut:Rf,circIn:gi,circInOut:vi,circOut:hi,backIn:mn,backInOut:pi,backOut:lu,anticipate:mi},c1=e=>typeof e=="string",uu=e=>{if(Ci(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(c1(e))return dt(Dx[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Dx[e];return e};var wi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Tt={value:null,addProjectionMetrics:null};function Nx(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 d1=40;function cu(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=wi.reduce((b,R)=>(b[R]=Nx(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,d1),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:wi.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<wi.length;R++)s[wi[R]].cancel(b)},state:a,steps:s}}var{schedule:we,cancel:gt,state:Ye,steps:Si}=cu(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ke,!0);var du;function f1(){du=void 0}var Ze={now:()=>(du===void 0&&Ze.set(Ye.isProcessing||mt.useManualTiming?Ye.timestamp:performance.now()),du),set:e=>{du=e,queueMicrotask(f1)}};var uo={layout:0,mainThread:0,waapi:0};var Ox=e=>t=>typeof t=="string"&&t.startsWith(e),da=Ox("--"),p1=Ox("var(--"),fa=e=>p1(e)?m1.test(e.split("/*")[0].trim()):!1,m1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$o={...Ao,transform:e=>it(0,1,e)},Ri={...Ao,default:1};var Sr=e=>Math.round(e*1e5)/1e5;var gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fx(e){return e==null}var _x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var hn=(e,t)=>o=>!!(typeof o=="string"&&_x.test(o)&&o.startsWith(e)||t&&!Fx(o)&&Object.prototype.hasOwnProperty.call(o,t)),fu=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(gn);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var g1=e=>it(0,255,e),If={...Ao,transform:e=>Math.round(g1(e))},Do={test:hn("rgb","red"),parse:fu("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+If.transform(e)+", "+If.transform(t)+", "+If.transform(o)+", "+Sr($o.transform(r))+")"};function h1(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 Ii={test:hn("#"),parse:h1,transform:Do.transform};var Pi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),co=Pi("deg"),ht=Pi("%"),de=Pi("px"),Pf=Pi("vh"),Lf=Pi("vw"),pu=(()=>({...ht,parse:e=>ht.parse(e)/100,transform:e=>ht.transform(e*100)}))();var Rr={test:hn("hsl","hue"),parse:fu("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($o.transform(r))+")"};var je={test:e=>Do.test(e)||Ii.test(e)||Rr.test(e),parse:e=>Do.test(e)?Do.parse(e):Rr.test(e)?Rr.parse(e):Ii.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 Vx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function v1(e){return isNaN(e)&&typeof e=="string"&&(e.match(gn)?.length||0)+(e.match(Vx)?.length||0)>0}var Hx="number",Ux="color",x1="var",y1="var(",Bx="${}",b1=/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(b1,l=>(je.test(l)?(r.color.push(n),a.push(Ux),o.push(je.parse(l))):l.startsWith(y1)?(r.var.push(n),a.push(x1),o.push(l)):(r.number.push(n),a.push(Hx),o.push(parseFloat(l))),++n,Bx)).split(Bx);return{values:o,split:i,indexes:r,types:a}}function Gx(e){return Ir(e).values}function zx(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===Hx?n+=Sr(a[s]):i===Ux?n+=je.transform(a[s]):n+=a[s]}return n}}var C1=e=>typeof e=="number"?0:je.test(e)?je.getAnimatableNone(e):e;function w1(e){let t=Gx(e);return zx(e)(t.map(C1))}var vt={test:v1,parse:Gx,createTransformer:zx,getAnimatableNone:w1};function Tf(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 Wx({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=Tf(l,i,e+1/3),n=Tf(l,i,e),s=Tf(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function vn(e,t){return o=>o>0?t:e}var Re=(e,t,o)=>e+(t-e)*o;var Mf=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},S1=[Ii,Do,Rr],R1=e=>S1.find(t=>t.test(e));function qx(e){let t=R1(e);if(Wo(!!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=Wx(o)),o}var kf=(e,t)=>{let o=qx(e),r=qx(t);if(!o||!r)return vn(e,t);let a={...o};return n=>(a.red=Mf(o.red,r.red,n),a.green=Mf(o.green,r.green,n),a.blue=Mf(o.blue,r.blue,n),a.alpha=Re(o.alpha,r.alpha,n),Do.transform(a))};var mu=new Set(["none","hidden"]);function $x(e,t){return mu.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function I1(e,t){return o=>Re(e,t,o)}function gu(e){return typeof e=="number"?I1:typeof e=="string"?fa(e)?vn:je.test(e)?kf:T1:Array.isArray(e)?jx:typeof e=="object"?je.test(e)?kf:P1:vn}function jx(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>gu(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function P1(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=gu(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function L1(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 T1=(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?mu.has(e)&&!a.values.length||mu.has(t)&&!r.values.length?$x(e,t):lo(jx(L1(r,a),a.values),o):(Wo(!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"),vn(e,t))};function hu(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Re(e,t,o):gu(e)(e,t)}var Kx=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 vu=(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 xn(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 Li(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(xn(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:rt(a)}}var M1=5;function xu(e,t,o){let r=Math.max(t-M1,0);return fi(o-e(r),t-r)}var qe={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 Af=.001;function Xx({duration:e=qe.duration,bounce:t=qe.bounce,velocity:o=qe.velocity,mass:r=qe.mass}){let a,n;Wo(e<=et(qe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=it(qe.minDamping,qe.maxDamping,s),e=it(qe.minDuration,qe.maxDuration,rt(e)),s<1?(a=u=>{let c=u*s,f=c*e,p=c-o,m=yu(u,s),h=Math.exp(-f);return Af-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=yu(Math.pow(u,2),s);return(-a(u)+Af>0?-1:1)*((p-m)*h)/g}):(a=u=>{let c=Math.exp(-u*e),f=(u-o)*e+1;return-Af+c*f},n=u=>{let c=Math.exp(-u*e),f=(o-u)*(e*e);return c*f});let i=5/e,l=E1(a,n,i);if(e=et(e),isNaN(l))return{stiffness:qe.stiffness,damping:qe.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}var k1=12;function E1(e,t,o){let r=o;for(let a=1;a<k1;a++)r=r-e(r)/t(r);return r}function yu(e,t){return e*Math.sqrt(1-t*t)}var A1=["duration","bounce"],D1=["stiffness","damping","mass"];function Yx(e,t){return t.some(o=>e[o]!==void 0)}function N1(e){let t={velocity:qe.velocity,stiffness:qe.stiffness,damping:qe.damping,mass:qe.mass,isResolvedFromDuration:!1,...e};if(!Yx(e,D1)&&Yx(e,A1))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:qe.mass,stiffness:a,damping:n}}else{let o=Xx(e);t={...t,...o,mass:qe.mass},t.isResolvedFromDuration=!0}return t}function jo(e=qe.visualDuration,t=qe.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}=N1({...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?qe.restSpeed.granular:qe.restSpeed.default),a||(a=y?qe.restDelta.granular:qe.restDelta.default);let b;if(g<1){let w=yu(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):xu(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(xn(R),2e4),I=vu(S=>R.next(w*S).value,w,30);return w+"ms "+I},toTransition:()=>{}};return R}jo.applyToOptions=e=>{let t=Li(e,100,jo);return e.ease=t.ease,e.duration=et(t.duration),e.type="keyframes",e};function Ti({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=jo({keyframes:[p.value,h(p.value)],velocity:xu(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 O1(e,t,o){let r=[],a=o||mt.mix||hu,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 bu(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=O1(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 Mi(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 ki(e){let t=[0];return Mi(t,e.length-1),t}function Zx(e,t){return e.map(o=>o*t)}function F1(e,t){return e.map(()=>t||xi).splice(0,e.length-1)}function pa({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=yi(r)?r.map(uu):uu(r),n={done:!1,value:t[0]},s=Zx(o&&o.length===t.length?o:ki(t),e),i=bu(s,t,{ease:Array.isArray(a)?a:F1(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var _1=e=>e!==null;function yn(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(_1),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var V1={decay:Ti,inertia:Ti,tween:pa,keyframes:pa,spring:jo};function Cu(e){typeof e.type=="string"&&(e.type=V1[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 B1=e=>e/100,Ko=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;Cu(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(B1,hu(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=xn(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!==Ti&&(w.value=yn(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=Kx,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 Qx(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ma=e=>e*180/Math.PI,Df=e=>{let t=ma(Math.atan2(e[1],e[0]));return Nf(t)},H1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Df,rotateZ:Df,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},Nf=e=>(e=e%360,e<0&&(e+=360),e),Jx=Df,ey=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ty=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ey,scaleY:ty,scale:e=>(ey(e)+ty(e))/2,rotateX:e=>Nf(ma(Math.atan2(e[6],e[5]))),rotateY:e=>Nf(ma(Math.atan2(-e[2],e[0]))),rotateZ:Jx,rotate:Jx,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 Ei(e){return e.includes("scale")?1:0}function Ai(e,t){if(!e||e==="none")return Ei(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=U1,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=H1,a=i}if(!a)return Ei(t);let n=r[t],s=a[1].split(",").map(G1);return typeof n=="function"?n(s):s[n]}var Of=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return Ai(o,t)};function G1(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 Ff=e=>e===Ao||e===de,z1=new Set(["x","y","z"]),W1=fo.filter(e=>!z1.has(e));function oy(e){let t=[];return W1.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})=>Ai(t,"x"),y:(e,{transform:t})=>Ai(t,"y")};Lr.translateX=Lr.x;Lr.translateY=Lr.y;var ga=new Set,_f=!1,Vf=!1,Bf=!1;function ry(){if(Vf){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=oy(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)})}Vf=!1,_f=!1,ga.forEach(e=>e.complete(Bf)),ga.clear()}function ay(){ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vf=!0)})}function Hf(){Bf=!0,ay(),ry(),Bf=!1}var Xo=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),_f||(_f=!0,we.read(ay),we.resolveKeyframes(ry))):(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])}Qx(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 ny=e=>e.startsWith("--");function sy(e,t,o){ny(t)?e.style.setProperty(t,o):e.style[t]=o}var iy=ca(()=>window.ScrollTimeline!==void 0);var ly={};function uy(e,t){let o=ca(e);return()=>ly[t]??o()}var wu=uy(()=>{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 Uf={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 Gf(e,t){if(e)return typeof e=="function"?wu()?vu(e,t):"ease-out":Ci(e)?ha(e):Array.isArray(e)?e.map(o=>Gf(o,t)||Uf.easeOut):Uf[e]}function cy(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=Gf(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 dy({type:e,...t}){return va(e)&&wu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Su=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=dy(t);this.animation=cy(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=yn(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):sy(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&&iy()?(this.animation.timeline=t,Ke):o(this)}};var fy={anticipate:mi,backInOut:pi,circInOut:vi};function q1(e){return e in fy}function py(e){typeof e.ease=="string"&&q1(e.ease)&&(e.ease=fy[e.ease])}var my=10,Ru=class extends Su{constructor(t){py(t),Cu(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 Ko({...s,autoplay:!1}),l=et(this.finishedTime??this.time);o.setWithVelocity(i.sample(l-my).value,i.sample(l).value,my),i.stop()}};var zf=(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 gy(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=zf(a,t),i=zf(n,t);return Wo(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 bn(e){e.duration=0,e.type="keyframes"}var j1=new Set(["opacity","clipPath","filter","transform"]),K1=ca(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hy(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 K1()&&o&&j1.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var X1=40,Di=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||Xo;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(),gy(t,n,s,i)||((mt.instantAnimations||!l)&&c?.(yn(t,r,o)),t[0]=t[t.length-1],bn(r),r.repeat=0);let p={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>X1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},m=!u&&hy(p)?new Ru({...p,element:p.motionValue.owner.current}):new Ko(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(),Hf()),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 Iu=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 vy(this.animations,"duration")}get iterationDuration(){return vy(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 vy(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 Ni=class extends Iu{then(t,o){return this.finished.finally(t).then(()=>{})}};var Y1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Z1(e){let t=Y1.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var Q1=4;function Wf(e,t,o=1){dt(o<=Q1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=Z1(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return ui(s)?parseFloat(s):s}return fa(a)?Wf(a,t,o+1):a}function xa(e,t){return e?.[t]??e?.default??e}var Oi=new Set(["width","height","top","left","right","bottom",...fo]);var xy={test:e=>e==="auto",parse:e=>e};var Pu=e=>t=>t.test(e);var qf=[Ao,de,ht,co,Lf,Pf,xy],$f=e=>qf.find(Pu(e));function yy(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||di(e):!0}var J1=new Set(["brightness","contrast","saturate","opacity"]);function eN(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(gn)||[];if(!r)return e;let a=o.replace(r,""),n=J1.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var tN=/\b([a-z-]*)\(.*?\)/gu,Fi={...vt,getAnimatableNone:e=>{let t=e.match(tN);return t?t.map(eN).join(" "):e}};var jf={...Ao,transform:Math.round};var by={rotate:co,rotateX:co,rotateY:co,rotateZ:co,scale:Ri,scaleX:Ri,scaleY:Ri,scaleZ:Ri,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:$o,originX:pu,originY:pu,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,...by,zIndex:jf,fillOpacity:$o,strokeOpacity:$o,numOctaves:jf};var Cy={...ya,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:Fi,WebkitFilter:Fi},_i=e=>Cy[e];function Vi(e,t){let o=_i(e);return o!==Fi&&(o=vt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var oN=new Set(["auto","none","0"]);function wy(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!oN.has(n)&&Ir(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=Vi(o,a)}var Bi=class extends Xo{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=Wf(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Oi.has(r)||t.length!==2)return;let[a,n]=t,s=$f(a),i=$f(n);if(s!==i)if(Ff(s)&&Ff(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||yy(t[a]))&&r.push(a);r.length&&wy(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 Hi(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 Ui=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gi(e){return ci(e)&&"offsetHeight"in e}var Sy=30,rN=e=>!isNaN(parseFloat(e)),ba={current:void 0},Lu=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=rN(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 qo);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>Sy)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Sy);return fi(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 Lu(e,t)}var{schedule:Ca,cancel:aN}=cu(queueMicrotask,!1);var Wt={x:!1,y:!1};function Tu(){return Wt.x||Wt.y}function Kf(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 Mu(e,t){let o=Hi(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function Ry(e){return!(e.pointerType==="touch"||Tu())}function Xf(e,t,o={}){let[r,a,n]=Mu(e,o),s=i=>{if(!Ry(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=f=>{Ry(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var Yf=(e,t)=>t?e===t?!0:Yf(e,t.parentElement):!1;var wa=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var nN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Iy(e){return nN.has(e.tagName)||e.tabIndex!==-1}var Cn=new WeakSet;function Py(e){return t=>{t.key==="Enter"&&e(t)}}function Zf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Ly=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=Py(()=>{if(Cn.has(o))return;Zf(o,"down");let a=Py(()=>{Zf(o,"up")}),n=()=>Zf(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 Ty(e){return wa(e)&&!Tu()}function Qf(e,t,o={}){let[r,a,n]=Mu(e,o),s=i=>{let l=i.currentTarget;if(!Ty(i))return;Cn.add(l);let u=t(l,i),c=(m,h)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),Cn.has(l)&&Cn.delete(l),Ty(m)&&typeof u=="function"&&u(m,{success:h})},f=m=>{c(m,l===window||l===document||o.useGlobalTarget||Yf(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),Gi(i)&&(i.addEventListener("focus",u=>Ly(u,a)),!Iy(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Sa(e){return ci(e)&&"ownerSVGElement"in e}function zi(e){return Sa(e)&&e.tagName==="svg"}function Jf(...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=bu(a,n,s);return t?i(r):i}var De=e=>!!(e&&e.getVelocity);var sN=[...qf,je,vt],ep=e=>sN.find(Pu(e));O();O();O();var Tr=le({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});O();function My(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iN(...e){return t=>{let o=!1,r=e.map(a=>{let n=My(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():My(e[a],null)}}}}function ky(...e){return B(iN(...e),e)}var tp=class extends Is{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=Gi(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 Ey({children:e,isPresent:t,anchorX:o,root:r}){let a=Ge(),n=E(null),s=E({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=te(Tr),l=ky(n,e?.ref);return Ps(()=>{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(`
5
+ var iE=Object.create;var Xl=Object.defineProperty;var lE=Object.getOwnPropertyDescriptor;var uE=Object.getOwnPropertyNames;var cE=Object.getPrototypeOf,dE=Object.prototype.hasOwnProperty;var fE=(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 pE=(e,t)=>()=>(e&&(t=e(e=0)),t);var mv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mE=(e,t)=>{for(var o in t)Xl(e,o,{get:t[o],enumerable:!0})},gv=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of uE(t))!dE.call(e,a)&&a!==o&&Xl(e,a,{get:()=>t[a],enumerable:!(r=lE(t,a))||r.enumerable});return e};var gE=(e,t,o)=>(o=e!=null?iE(cE(e)):{},gv(t||!e||!e.__esModule?Xl(o,"default",{value:e,enumerable:!0}):o,e)),hE=e=>gv(Xl({},"__esModule",{value:!0}),e);var H={};mE(H,{Children:()=>Ie,Component:()=>Is,Fragment:()=>Je,Profiler:()=>vE,PureComponent:()=>xE,StrictMode:()=>yE,Suspense:()=>bE,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>CE,act:()=>wE,cloneElement:()=>Fe,createContext:()=>le,createElement:()=>me,createFactory:()=>SE,createRef:()=>RE,default:()=>Pe,forwardRef:()=>C,isValidElement:()=>Le,lazy:()=>IE,memo:()=>Zd,startTransition:()=>PE,unstable_act:()=>LE,useCallback:()=>B,useContext:()=>te,useDebugValue:()=>TE,useDeferredValue:()=>ME,useEffect:()=>D,useId:()=>Ge,useImperativeHandle:()=>ta,useInsertionEffect:()=>Ps,useLayoutEffect:()=>ct,useMemo:()=>Z,useReducer:()=>Gt,useRef:()=>E,useState:()=>k,useSyncExternalStore:()=>Qd,useTransition:()=>kE,version:()=>EE});import*as oe from"react";var Ie,Is,Je,vE,xE,yE,bE,CE,wE,Fe,le,me,SE,RE,C,Le,IE,Zd,PE,LE,B,te,TE,ME,D,Ge,ta,Ps,ct,Z,Gt,E,k,Qd,kE,EE,Pe,O=pE(()=>{Ie=oe.Children,Is=oe.Component,Je=oe.Fragment,vE=oe.Profiler,xE=oe.PureComponent,yE=oe.StrictMode,bE=oe.Suspense,CE=oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wE=oe.act,Fe=oe.cloneElement,le=oe.createContext,me=oe.createElement,SE=oe.createFactory,RE=oe.createRef,C=oe.forwardRef,Le=oe.isValidElement,IE=oe.lazy,Zd=oe.memo,PE=oe.startTransition,LE=oe.unstable_act,B=oe.useCallback,te=oe.useContext,TE=oe.useDebugValue,ME=oe.useDeferredValue,D=oe.useEffect,Ge=oe.useId,ta=oe.useImperativeHandle,Ps=oe.useInsertionEffect,ct=oe.useLayoutEffect,Z=oe.useMemo,Gt=oe.useReducer,E=oe.useRef,k=oe.useState,Qd=oe.useSyncExternalStore,kE=oe.useTransition,EE=oe.version,Pe=oe.default!==void 0?oe.default:oe});var ux=mv(lx=>{"use strict";var cn=(O(),hE(H));function WD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qD=typeof Object.is=="function"?Object.is:WD,$D=cn.useState,jD=cn.useEffect,KD=cn.useLayoutEffect,XD=cn.useDebugValue;function YD(e,t){var o=t(),r=$D({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return KD(function(){a.value=o,a.getSnapshot=t,gf(a)&&n({inst:a})},[e,o,t]),jD(function(){return gf(a)&&n({inst:a}),e(function(){gf(a)&&n({inst:a})})},[e]),XD(o),o}function gf(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!qD(e,o)}catch{return!0}}function ZD(e,t){return t()}var QD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZD:YD;lx.useSyncExternalStore=cn.useSyncExternalStore!==void 0?cn.useSyncExternalStore:QD});var dx=mv((q$,cx)=>{"use strict";cx.exports=ux()});O();O();O();import*as oa from"react/jsx-runtime";var Ve=oa.Fragment,d=oa.jsx,P=oa.jsxs;function hv(e,t){let o=le(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=te(o);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[r,a]}function Ee(e,t=[]){let o=[];function r(n,s){let i=le(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=te(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=>le(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,AE(a,...t)]}function AE(...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}O();O();function vv(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=vv(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():vv(e[a],null)}}}}function pe(...e){return B(Nt(...e),e)}O();function It(e){let t=DE(e),o=C((r,a)=>{let{children:n,...s}=r,i=Ie.toArray(n),l=i.find(NE);if(l){let u=l.props.children,c=i.map(f=>f===l?Ie.count(u)>1?Ie.only(null):Le(u)?u.props.children:null:f);return d(t,{...s,ref:a,children:Le(u)?Fe(u,void 0,c):null})}return d(t,{...s,ref:a,children:n})});return o.displayName=`${e}.Slot`,o}var Ya=It("Slot");function DE(e){let t=C((o,r)=>{let{children:a,...n}=o;if(Le(a)){let s=FE(a),i=OE(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 xv=Symbol("radix.slottable");function Jd(e){let t=({children:o})=>d(Ve,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=xv,t}var yv=Jd("Slottable");function NE(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xv}function OE(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 FE(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)}O();function Lo(e){let t=e+"CollectionProvider",[o,r]=Ee(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 b5=!!(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)}}O();O();var Ae=globalThis?.document?ct:()=>{};O();var _E=H[" useInsertionEffect ".trim().toString()]||Ae;function Be({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=VE({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=B(c=>{if(i){let f=BE(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}function VE({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return _E(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function BE(e){return typeof e=="function"}var R5=Symbol("RADIX:SYNC_STATE");O();import*as st from"react-dom";var Ls=st.createPortal;var Go=st.flushSync;var bv=st.default!==void 0?st.default:st;var HE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=HE.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 Za(e,t){e&&Go(()=>e.dispatchEvent(t))}O();O();O();function UE(e,t){return Gt((o,r)=>t[o][r]??o,e)}var $e=e=>{let{present:t,children:o}=e,r=GE(t),a=typeof o=="function"?o({present:r.isPresent}):Ie.only(o),n=pe(r.ref,zE(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};$e.displayName="Presence";function GE(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=e?"mounted":"unmounted",[i,l]=UE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{let u=Yl(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=Yl(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=Yl(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=Yl(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:B(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Yl(e){return e?.animationName||"none"}function zE(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)}O();var WE=H[" useId ".trim().toString()]||(()=>{}),qE=0;function Te(e){let[t,o]=k(WE());return Ae(()=>{e||o(r=>r??String(qE++))},[e]),e||(t?`radix-${t}`:"")}var Zl="Collapsible",[$E,ef]=Ee(Zl),[jE,tf]=$E(Zl),Cv=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:Zl});return d(jE,{scope:o,disabled:n,contentId:Te(),open:l,onOpenToggle:B(()=>u(c=>!c),[u]),children:d(Y.div,{"data-state":rf(l),"data-disabled":n?"":void 0,...i,ref:t})})});Cv.displayName=Zl;var wv="CollapsibleTrigger",Sv=C((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=tf(wv,o);return d(Y.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":rf(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:X(e.onClick,a.onOpenToggle)})});Sv.displayName=wv;var of="CollapsibleContent",Rv=C((e,t)=>{let{forceMount:o,...r}=e,a=tf(of,e.__scopeCollapsible);return d($e,{present:o||a.open,children:({present:n})=>d(KE,{...r,ref:t,present:n})})});Rv.displayName=of;var KE=C((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=tf(of,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":rf(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 rf(e){return e?"open":"closed"}var Ql=Cv,Qa=Sv,Ts=Rv;O();var XE=le(void 0);function To(e){let t=te(XE);return e||t||"ltr"}var ao="Accordion",YE=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[nf,ZE,QE]=Lo(ao),[eu,oW]=Ee(ao,[QE,ef]),sf=ef(),Pv=Pe.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return d(nf.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?d(oA,{...n,ref:t}):d(tA,{...a,ref:t})})});Pv.displayName=ao;var[Lv,JE]=eu(ao),[Tv,eA]=eu(ao,{collapsible:!1}),tA=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(Lv,{scope:e.__scopeAccordion,value:Pe.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:Pe.useCallback(()=>n&&l(""),[n,l]),children:d(Tv,{scope:e.__scopeAccordion,collapsible:n,children:d(Mv,{...s,ref:t})})})}),oA=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(Lv,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:d(Tv,{scope:e.__scopeAccordion,collapsible:!0,children:d(Mv,{...n,ref:t})})})}),[rA,tu]=eu(ao),Mv=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=ZE(o),f=To(a)==="ltr",p=X(e.onKeyDown,m=>{if(!YE.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(rA,{scope:o,disabled:r,direction:a,orientation:n,children:d(nf.Slot,{scope:o,children:d(Y.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:p})})})}),Jl="AccordionItem",[aA,lf]=eu(Jl),kv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=tu(Jl,o),s=JE(Jl,o),i=sf(o),l=Te(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return d(aA,{scope:o,open:u,disabled:c,triggerId:l,children:d(Ql,{"data-orientation":n.orientation,"data-state":Fv(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:f=>{f?s.onItemOpen(r):s.onItemClose(r)}})})});kv.displayName=Jl;var Ev="AccordionHeader",Av=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=tu(ao,o),n=lf(Ev,o);return d(Y.h3,{"data-orientation":a.orientation,"data-state":Fv(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Av.displayName=Ev;var af="AccordionTrigger",Dv=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=tu(ao,o),n=lf(af,o),s=eA(af,o),i=sf(o);return d(nf.ItemSlot,{scope:o,children:d(Qa,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});Dv.displayName=af;var Nv="AccordionContent",Ov=Pe.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=tu(ao,o),n=lf(Nv,o),s=sf(o);return d(Ts,{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}})});Ov.displayName=Nv;function Fv(e){return e?"open":"closed"}var _v=Pv,Vv=kv,Bv=Av,uf=Dv,cf=Ov;O();var Hv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),df=e=>{let t=sA(e);return t.charAt(0).toUpperCase()+t.slice(1)},ou=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),Uv=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};O();var Gv={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 zv=C(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>me("svg",{ref:l,...Gv,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:ou("lucide",a),...!n&&!Uv(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(zv,{ref:n,iconNode:t,className:ou(`lucide-${Hv(df(e))}`,`lucide-${e}`,r),...a}));return o.displayName=df(e),o};var iA=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Ms=j("align-center",iA);var lA=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],ks=j("align-justify",lA);var uA=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Es=j("align-left",uA);var cA=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],As=j("align-right",cA);var dA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ja=j("arrow-down",dA);var fA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ds=j("arrow-left",fA);var pA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ns=j("arrow-right",pA);var mA=[["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"}]],en=j("arrow-up-down",mA);var gA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],tn=j("arrow-up",gA);var hA=[["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"}]],Os=j("bold",hA);var vA=[["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",vA);var xA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pt=j("check",xA);var yA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mo=j("chevron-down",yA);var bA=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],no=j("chevron-left",bA);var CA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wt=j("chevron-right",CA);var wA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Fs=j("chevron-up",wA);var SA=[["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",SA);var RA=[["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",RA);var IA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],na=j("circle",IA);var PA=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_s=j("clock",PA);var LA=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Vs=j("code",LA);var TA=[["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"}]],Bs=j("copy",TA);var MA=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Hs=j("credit-card",MA);var kA=[["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"}]],on=j("crown",kA);var EA=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Us=j("dot",EA);var AA=[["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",AA);var DA=[["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"}]],Gs=j("external-link",DA);var NA=[["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",NA);var OA=[["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"}]],zs=j("file-text",OA);var FA=[["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"}]],Ws=j("file",FA);var _A=[["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"}]],qs=j("git-fork",_A);var VA=[["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",VA);var BA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rn=j("info",BA);var HA=[["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"}]],$s=j("italic",HA);var UA=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],js=j("link",UA);var GA=[["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"}]],Ks=j("list-ordered",GA);var zA=[["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"}]],Xs=j("list",zA);var WA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ot=j("loader-circle",WA);var qA=[["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"}]],an=j("lock",qA);var $A=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ys=j("minus",$A);var jA=[["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"}]],Zs=j("music",jA);var KA=[["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"}]],nn=j("palette",KA);var XA=[["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"}]],Qs=j("phone",XA);var YA=[["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"}]],ru=j("pipette",YA);var ZA=[["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"}]],Js=j("quote",ZA);var QA=[["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"}]],ei=j("redo",QA);var JA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],la=j("search",JA);var eD=[["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",eD);var tD=[["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",tD);var oD=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],ti=j("strikethrough",oD);var rD=[["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",rD);var aD=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],oi=j("underline",aD);var nD=[["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"}]],ri=j("undo",nD);var sD=[["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"}]],ai=j("upload",sD);var iD=[["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"}]],ni=j("video",iD);var lD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ot=j("x",lD);var uD=[["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"}]],sn=j("zap",uD);O();function Wv(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=Wv(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function au(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Wv(e))&&(r&&(r+=" "),r+=t);return r}var mf="-",cD=e=>{let t=fD(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split(mf);return i[0]===""&&i.length!==1&&i.shift(),jv(i,t)||dD(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},jv=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?jv(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(mf);return t.validators.find(({validator:s})=>s(n))?.classGroupId},qv=/^\[(.+)\]$/,dD=e=>{if(qv.test(e)){let t=qv.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},fD=e=>{let{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return mD(Object.entries(e.classGroups),o).forEach(([n,s])=>{pf(s,r,n,t)}),r},pf=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:$v(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(pD(a)){pf(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{pf(s,$v(t,n),o,r)})})},$v=(e,t)=>{let o=e;return t.split(mf).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},pD=e=>e.isThemeGetter,mD=(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,gD=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)}}},Kv="!",hD=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(Kv),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},vD=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},xD=e=>({cache:gD(e.cacheSize),parseClassName:hD(e),...cD(e)}),yD=/\s+/,bD=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a}=t,n=[],s=e.trim().split(yD),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=vD(c).join(":"),x=f?v+Kv: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 CD(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Xv(t))&&(r&&(r+=" "),r+=o);return r}var Xv=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Xv(e[r]))&&(o&&(o+=" "),o+=t);return o};function wD(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,f)=>f(c),e());return o=xD(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=bD(l,o);return a(l,c),c}return function(){return n(CD.apply(null,arguments))}}var ze=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Yv=/^\[(?:([a-z-]+):)?(.+)\]$/i,SD=/^\d+\/\d+$/,RD=new Set(["px","full","screen"]),ID=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PD=/\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$/,LD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zo=e=>ln(e)||RD.has(e)||SD.test(e),yr=e=>un(e,"length",_D),ln=e=>!!e&&!Number.isNaN(Number(e)),ff=e=>un(e,"number",ln),si=e=>!!e&&Number.isInteger(Number(e)),kD=e=>e.endsWith("%")&&ln(e.slice(0,-1)),Ce=e=>Yv.test(e),br=e=>ID.test(e),ED=new Set(["length","size","percentage"]),AD=e=>un(e,ED,Zv),DD=e=>un(e,"position",Zv),ND=new Set(["image","url"]),OD=e=>un(e,ND,BD),FD=e=>un(e,"",VD),ii=()=>!0,un=(e,t,o)=>{let r=Yv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},_D=e=>PD.test(e)&&!LD.test(e),Zv=()=>!1,VD=e=>TD.test(e),BD=e=>MD.test(e);var HD=()=>{let e=ze("colors"),t=ze("spacing"),o=ze("blur"),r=ze("brightness"),a=ze("borderColor"),n=ze("borderRadius"),s=ze("borderSpacing"),i=ze("borderWidth"),l=ze("contrast"),u=ze("grayscale"),c=ze("hueRotate"),f=ze("invert"),p=ze("gap"),m=ze("gradientColorStops"),h=ze("gradientColorStopPositions"),g=ze("inset"),v=ze("margin"),x=ze("opacity"),y=ze("padding"),b=ze("saturate"),R=ze("scale"),w=ze("sepia"),I=ze("skew"),S=ze("space"),T=ze("translate"),M=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Ce,t],V=()=>[Ce,t],U=()=>["",zo,yr],N=()=>["auto",ln,Ce],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Ce],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[ln,Ce];return{cacheSize:500,separator:":",theme:{colors:[ii],spacing:[zo,yr],blur:["none","",br,Ce],brightness:se(),borderColor:[e],borderRadius:["none","","full",br,Ce],borderSpacing:V(),borderWidth:U(),contrast:se(),grayscale:q(),hueRotate:se(),invert:q(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[kD,yr],inset:_(),margin:_(),opacity:se(),padding:V(),saturate:se(),scale:se(),sepia:q(),skew:se(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[br]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"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",si,Ce]}],basis:[{basis:_()}],"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:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",si,Ce]}],"grid-cols":[{"grid-cols":[ii]}],"col-start-end":[{col:["auto",{span:["full",si,Ce]},Ce]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ii]}],"row-start-end":[{row:["auto",{span:[si,Ce]},Ce]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"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",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"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",ff]}],"font-family":[{font:[ii]}],"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",ln,ff]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zo,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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zo,yr]}],"underline-offset":[{"underline-offset":["auto",zo,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:[...$(),DD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",AD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},OD]}],"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:[...G(),"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:G()}],"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:["",...G()]}],"outline-offset":[{"outline-offset":[zo,Ce]}],"outline-w":[{outline:[zo,yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[zo,yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",br,FD]}],"shadow-color":[{shadow:[ii]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],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:se()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:se()}],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:[si,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:[zo,yr,ff]}],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 Qv=wD(HD);function L(...e){return Qv(au(e))}function li(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(li).filter(Boolean).join(" ").trim();if(Le(e)){let t=e.props;return li(t.children)}return""}var UD=_v,Jv=C(({className:e,...t},o)=>d(Vv,{ref:o,className:L("moonui-theme","border-b border-border",e),...t}));Jv.displayName="AccordionItem";var ex=C(({className:e,children:t,...o},r)=>d(Bv,{className:"flex",children:P(uf,{ref:r,className:L("flex flex-1 items-center justify-between py-4 font-medium transition-all","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"})]})}));ex.displayName=uf.displayName;var tx=C(({className:e,children:t,...o},r)=>d(cf,{ref:r,className:L("overflow-hidden text-sm text-foreground/80 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})}));tx.displayName=cf.displayName;O();var ox=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rx=au,Q=(e,t)=>o=>{var r;if(t?.variants==null)return rx(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=ox(c)||ox(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 rx(e,s,l,o?.class,o?.className)};var GD=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-subtle text-primary-subtle-foreground border-primary/30",success:"bg-success-subtle text-success-subtle-foreground border-success/30",warning:"bg-warning-subtle text-warning-subtle-foreground border-warning/30",error:"bg-destructive-subtle text-destructive-subtle-foreground border-destructive/30",info:"bg-info-subtle text-info-subtle-foreground 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}}),ax=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 rn;default:return rn}},[t]);return P("div",{ref:u,role:"alert",className:L("moonui-theme",GD({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"})})]})});ax.displayName="Alert";var nx=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}));nx.displayName="AlertTitle";var sx=C(({className:e,...t},o)=>d("div",{ref:o,className:L("moonui-theme","text-sm leading-5 text-current opacity-90",e),...t}));sx.displayName="AlertDescription";O();var zD=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"}}),ix=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",zD({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:d("div",{className:"absolute inset-0",children:n})}));ix.displayName="AspectRatio";O();O();O();function We(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}var fx=gE(dx(),1);function px(){return(0,fx.useSyncExternalStore)(JD,()=>!0,()=>!1)}function JD(){return()=>{}}var hf="Avatar",[e1,J$]=Ee(hf),[t1,gx]=e1(hf),hx=C((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=k("idle");return d(t1,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:d(Y.span,{...r,ref:t})})});hx.displayName=hf;var vx="AvatarImage",xx=C((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=gx(vx,o),i=o1(r,n),l=We(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});xx.displayName=vx;var yx="AvatarFallback",bx=C((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=gx(yx,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});bx.displayName=yx;function mx(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function o1(e,{referrerPolicy:t,crossOrigin:o}){let r=px(),a=E(null),n=(()=>r?(a.current||(a.current=new window.Image),a.current):null)(),[s,i]=k(()=>mx(n,e));return Ae(()=>{i(mx(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 vf=hx,xf=xx,yf=bx;var a1=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"}}),bf=C(({className:e,size:t,radius:o,variant:r,...a},n)=>d(vf,{ref:n,className:L("moonui-theme",a1({size:t,radius:o,variant:r}),e),...a}));bf.displayName=vf.displayName;var Cx=C(({className:e,alt:t="",...o},r)=>d(xf,{ref:r,alt:t,className:L("moonui-theme","aspect-square h-full w-full",e),...o}));Cx.displayName=xf.displayName;var Cf=C(({className:e,...t},o)=>d(yf,{ref:o,className:L("flex h-full w-full items-center justify-center bg-muted",e),...t}));Cf.displayName=yf.displayName;var wx=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(bf,{variant:"border",children:P(Cf,{children:["+",l]})})})]})})});wx.displayName="AvatarGroup";O();var Sx=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: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-600 text-white","hover:bg-error-700 dark:hover:bg-error-700","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","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",Sx({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||(li(v)?`Remove ${li(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";O();var n1=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"}}),Rx=le(void 0),Ix=C(({className:e,variant:t,size:o,separator:r,showHomeIcon:a,...n},s)=>d(Rx.Provider,{value:r,children:d("nav",{ref:s,className:L("moonui-theme",n1({variant:t,size:o}),e),"aria-label":"breadcrumb",...n})}));Ix.displayName="Breadcrumb";var Px=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(wf,{}),l]})}return d("ol",{ref:a,className:L("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Px.displayName="BreadcrumbList";var Lx=C(({className:e,isCurrent:t,href:o,asChild:r=!1,children:a,...n},s)=>{let i=r?Ya: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})})});Lx.displayName="BreadcrumbItem";var Tx=({children:e,className:t,icon:o,...r})=>{let a=te(Rx);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"})})};Tx.displayName="BreadcrumbSeparator";var wf=({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"})]});wf.displayName="BreadcrumbEllipsis";var Mx=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}));Mx.displayName="BreadcrumbLink";var kx=C(({className:e,...t},o)=>d("span",{ref:o,className:L("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));kx.displayName="BreadcrumbPage";O();var nu=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-error-600 dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-error-700","active:bg-destructive/80 dark:active:bg-error-800","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-700 dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success-800","active:bg-success/80 dark:active:bg-success-900","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-600 text-white","shadow-[0_0_30px_rgba(var(--glow-blue-rgb),0.5)]","hover:shadow-[0_0_40px_rgba(var(--glow-blue-rgb),0.7)]","active:shadow-[0_0_20px_rgba(var(--glow-blue-rgb),0.4)]","hover:bg-blue-700","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary-subtle text-primary-subtle-foreground","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary-subtle dark:text-primary-subtle-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-700 dark:text-green-400","border-2 border-green-700 dark:border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(var(--glow-green-rgb),0.6)]","active:shadow-[0_0_15px_rgba(var(--glow-green-rgb),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}}),Me=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,onClick:f,...p},m)=>{let h=n&&Le(u),g=h?Ya:"button",v=c||s,x=h?{"aria-disabled":v||void 0,"data-disabled":v?"":void 0}:{disabled:v},y=h&&v?b=>{b.preventDefault(),b.stopPropagation()}:f;return P(g,{className:L("moonui-theme",nu({variant:t,size:o,rounded:r,fullWidth:a,className:e}),h&&v&&"opacity-50 cursor-not-allowed pointer-events-none"),ref:m,...x,"aria-busy":s||void 0,"data-loading":s?"":void 0,...p,onClick:y,children:[s&&d(ot,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,h?d(yv,{children:u}):u,!s&&l]})});Me.displayName="Button";O();O();O();var dn=le({});O();function Eo(e){let t=E(null);return t.current===null&&(t.current=e()),t.current}O();var fn=typeof window<"u";var pn=fn?ct:D;O();O();O();var Cr=le(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 Wo=()=>{},dt=()=>{};var mt={};var ui=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ci(e){return typeof e=="object"&&e!==null}var di=e=>/^0[^.\s]+$/u.test(e);function ca(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ke=e=>e;var s1=(e,t)=>o=>t(e(o)),lo=(...e)=>e.reduce(s1);var zt=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var qo=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 fi(e,t){return t?e*(1e3/t):0}var Ex=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var Ax=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,i1=1e-7,l1=12;function u1(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=Ax(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>i1&&++i<l1);return s}function wr(e,t,o,r){if(e===t&&o===r)return Ke;let a=n=>u1(n,0,1,e,o);return n=>n===0||n===1?n:Ax(a(n),t,r)}var su=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var iu=e=>t=>1-e(1-t);var lu=wr(.33,1.53,.69,.99),mn=iu(lu),pi=su(mn);var mi=e=>(e*=2)<1?.5*mn(e):.5*(2-Math.pow(2,-10*(e-1)));var gi=e=>1-Math.sin(Math.acos(e)),hi=iu(gi),vi=su(gi);var Sf=wr(.42,0,1,1),Rf=wr(0,0,.58,1),xi=wr(.42,0,.58,1);var yi=e=>Array.isArray(e)&&typeof e[0]!="number";function bi(e,t){return yi(e)?e[Ex(0,e.length,t)]:e}var Ci=e=>Array.isArray(e)&&typeof e[0]=="number";var Dx={linear:Ke,easeIn:Sf,easeInOut:xi,easeOut:Rf,circIn:gi,circInOut:vi,circOut:hi,backIn:mn,backInOut:pi,backOut:lu,anticipate:mi},c1=e=>typeof e=="string",uu=e=>{if(Ci(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(c1(e))return dt(Dx[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Dx[e];return e};var wi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Tt={value:null,addProjectionMetrics:null};function Nx(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 d1=40;function cu(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=wi.reduce((b,R)=>(b[R]=Nx(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,d1),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:wi.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<wi.length;R++)s[wi[R]].cancel(b)},state:a,steps:s}}var{schedule:we,cancel:gt,state:Ye,steps:Si}=cu(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ke,!0);var du;function f1(){du=void 0}var Ze={now:()=>(du===void 0&&Ze.set(Ye.isProcessing||mt.useManualTiming?Ye.timestamp:performance.now()),du),set:e=>{du=e,queueMicrotask(f1)}};var uo={layout:0,mainThread:0,waapi:0};var Ox=e=>t=>typeof t=="string"&&t.startsWith(e),da=Ox("--"),p1=Ox("var(--"),fa=e=>p1(e)?m1.test(e.split("/*")[0].trim()):!1,m1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$o={...Ao,transform:e=>it(0,1,e)},Ri={...Ao,default:1};var Sr=e=>Math.round(e*1e5)/1e5;var gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fx(e){return e==null}var _x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var hn=(e,t)=>o=>!!(typeof o=="string"&&_x.test(o)&&o.startsWith(e)||t&&!Fx(o)&&Object.prototype.hasOwnProperty.call(o,t)),fu=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(gn);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var g1=e=>it(0,255,e),If={...Ao,transform:e=>Math.round(g1(e))},Do={test:hn("rgb","red"),parse:fu("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+If.transform(e)+", "+If.transform(t)+", "+If.transform(o)+", "+Sr($o.transform(r))+")"};function h1(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 Ii={test:hn("#"),parse:h1,transform:Do.transform};var Pi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),co=Pi("deg"),ht=Pi("%"),de=Pi("px"),Pf=Pi("vh"),Lf=Pi("vw"),pu=(()=>({...ht,parse:e=>ht.parse(e)/100,transform:e=>ht.transform(e*100)}))();var Rr={test:hn("hsl","hue"),parse:fu("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($o.transform(r))+")"};var je={test:e=>Do.test(e)||Ii.test(e)||Rr.test(e),parse:e=>Do.test(e)?Do.parse(e):Rr.test(e)?Rr.parse(e):Ii.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 Vx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function v1(e){return isNaN(e)&&typeof e=="string"&&(e.match(gn)?.length||0)+(e.match(Vx)?.length||0)>0}var Hx="number",Ux="color",x1="var",y1="var(",Bx="${}",b1=/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(b1,l=>(je.test(l)?(r.color.push(n),a.push(Ux),o.push(je.parse(l))):l.startsWith(y1)?(r.var.push(n),a.push(x1),o.push(l)):(r.number.push(n),a.push(Hx),o.push(parseFloat(l))),++n,Bx)).split(Bx);return{values:o,split:i,indexes:r,types:a}}function Gx(e){return Ir(e).values}function zx(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===Hx?n+=Sr(a[s]):i===Ux?n+=je.transform(a[s]):n+=a[s]}return n}}var C1=e=>typeof e=="number"?0:je.test(e)?je.getAnimatableNone(e):e;function w1(e){let t=Gx(e);return zx(e)(t.map(C1))}var vt={test:v1,parse:Gx,createTransformer:zx,getAnimatableNone:w1};function Tf(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 Wx({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=Tf(l,i,e+1/3),n=Tf(l,i,e),s=Tf(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function vn(e,t){return o=>o>0?t:e}var Re=(e,t,o)=>e+(t-e)*o;var Mf=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},S1=[Ii,Do,Rr],R1=e=>S1.find(t=>t.test(e));function qx(e){let t=R1(e);if(Wo(!!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=Wx(o)),o}var kf=(e,t)=>{let o=qx(e),r=qx(t);if(!o||!r)return vn(e,t);let a={...o};return n=>(a.red=Mf(o.red,r.red,n),a.green=Mf(o.green,r.green,n),a.blue=Mf(o.blue,r.blue,n),a.alpha=Re(o.alpha,r.alpha,n),Do.transform(a))};var mu=new Set(["none","hidden"]);function $x(e,t){return mu.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function I1(e,t){return o=>Re(e,t,o)}function gu(e){return typeof e=="number"?I1:typeof e=="string"?fa(e)?vn:je.test(e)?kf:T1:Array.isArray(e)?jx:typeof e=="object"?je.test(e)?kf:P1:vn}function jx(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>gu(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function P1(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=gu(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function L1(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 T1=(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?mu.has(e)&&!a.values.length||mu.has(t)&&!r.values.length?$x(e,t):lo(jx(L1(r,a),a.values),o):(Wo(!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"),vn(e,t))};function hu(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Re(e,t,o):gu(e)(e,t)}var Kx=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 vu=(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 xn(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 Li(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(xn(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:rt(a)}}var M1=5;function xu(e,t,o){let r=Math.max(t-M1,0);return fi(o-e(r),t-r)}var qe={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 Af=.001;function Xx({duration:e=qe.duration,bounce:t=qe.bounce,velocity:o=qe.velocity,mass:r=qe.mass}){let a,n;Wo(e<=et(qe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=it(qe.minDamping,qe.maxDamping,s),e=it(qe.minDuration,qe.maxDuration,rt(e)),s<1?(a=u=>{let c=u*s,f=c*e,p=c-o,m=yu(u,s),h=Math.exp(-f);return Af-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=yu(Math.pow(u,2),s);return(-a(u)+Af>0?-1:1)*((p-m)*h)/g}):(a=u=>{let c=Math.exp(-u*e),f=(u-o)*e+1;return-Af+c*f},n=u=>{let c=Math.exp(-u*e),f=(o-u)*(e*e);return c*f});let i=5/e,l=E1(a,n,i);if(e=et(e),isNaN(l))return{stiffness:qe.stiffness,damping:qe.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}var k1=12;function E1(e,t,o){let r=o;for(let a=1;a<k1;a++)r=r-e(r)/t(r);return r}function yu(e,t){return e*Math.sqrt(1-t*t)}var A1=["duration","bounce"],D1=["stiffness","damping","mass"];function Yx(e,t){return t.some(o=>e[o]!==void 0)}function N1(e){let t={velocity:qe.velocity,stiffness:qe.stiffness,damping:qe.damping,mass:qe.mass,isResolvedFromDuration:!1,...e};if(!Yx(e,D1)&&Yx(e,A1))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:qe.mass,stiffness:a,damping:n}}else{let o=Xx(e);t={...t,...o,mass:qe.mass},t.isResolvedFromDuration=!0}return t}function jo(e=qe.visualDuration,t=qe.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}=N1({...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?qe.restSpeed.granular:qe.restSpeed.default),a||(a=y?qe.restDelta.granular:qe.restDelta.default);let b;if(g<1){let w=yu(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):xu(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(xn(R),2e4),I=vu(S=>R.next(w*S).value,w,30);return w+"ms "+I},toTransition:()=>{}};return R}jo.applyToOptions=e=>{let t=Li(e,100,jo);return e.ease=t.ease,e.duration=et(t.duration),e.type="keyframes",e};function Ti({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=jo({keyframes:[p.value,h(p.value)],velocity:xu(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 O1(e,t,o){let r=[],a=o||mt.mix||hu,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 bu(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=O1(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 Mi(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 ki(e){let t=[0];return Mi(t,e.length-1),t}function Zx(e,t){return e.map(o=>o*t)}function F1(e,t){return e.map(()=>t||xi).splice(0,e.length-1)}function pa({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=yi(r)?r.map(uu):uu(r),n={done:!1,value:t[0]},s=Zx(o&&o.length===t.length?o:ki(t),e),i=bu(s,t,{ease:Array.isArray(a)?a:F1(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var _1=e=>e!==null;function yn(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(_1),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var V1={decay:Ti,inertia:Ti,tween:pa,keyframes:pa,spring:jo};function Cu(e){typeof e.type=="string"&&(e.type=V1[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 B1=e=>e/100,Ko=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;Cu(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(B1,hu(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=xn(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!==Ti&&(w.value=yn(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=Kx,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 Qx(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ma=e=>e*180/Math.PI,Df=e=>{let t=ma(Math.atan2(e[1],e[0]));return Nf(t)},H1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Df,rotateZ:Df,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},Nf=e=>(e=e%360,e<0&&(e+=360),e),Jx=Df,ey=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ty=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ey,scaleY:ty,scale:e=>(ey(e)+ty(e))/2,rotateX:e=>Nf(ma(Math.atan2(e[6],e[5]))),rotateY:e=>Nf(ma(Math.atan2(-e[2],e[0]))),rotateZ:Jx,rotate:Jx,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 Ei(e){return e.includes("scale")?1:0}function Ai(e,t){if(!e||e==="none")return Ei(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=U1,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=H1,a=i}if(!a)return Ei(t);let n=r[t],s=a[1].split(",").map(G1);return typeof n=="function"?n(s):s[n]}var Of=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return Ai(o,t)};function G1(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 Ff=e=>e===Ao||e===de,z1=new Set(["x","y","z"]),W1=fo.filter(e=>!z1.has(e));function oy(e){let t=[];return W1.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})=>Ai(t,"x"),y:(e,{transform:t})=>Ai(t,"y")};Lr.translateX=Lr.x;Lr.translateY=Lr.y;var ga=new Set,_f=!1,Vf=!1,Bf=!1;function ry(){if(Vf){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=oy(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)})}Vf=!1,_f=!1,ga.forEach(e=>e.complete(Bf)),ga.clear()}function ay(){ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vf=!0)})}function Hf(){Bf=!0,ay(),ry(),Bf=!1}var Xo=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),_f||(_f=!0,we.read(ay),we.resolveKeyframes(ry))):(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])}Qx(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 ny=e=>e.startsWith("--");function sy(e,t,o){ny(t)?e.style.setProperty(t,o):e.style[t]=o}var iy=ca(()=>window.ScrollTimeline!==void 0);var ly={};function uy(e,t){let o=ca(e);return()=>ly[t]??o()}var wu=uy(()=>{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 Uf={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 Gf(e,t){if(e)return typeof e=="function"?wu()?vu(e,t):"ease-out":Ci(e)?ha(e):Array.isArray(e)?e.map(o=>Gf(o,t)||Uf.easeOut):Uf[e]}function cy(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=Gf(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 dy({type:e,...t}){return va(e)&&wu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Su=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=dy(t);this.animation=cy(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=yn(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):sy(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&&iy()?(this.animation.timeline=t,Ke):o(this)}};var fy={anticipate:mi,backInOut:pi,circInOut:vi};function q1(e){return e in fy}function py(e){typeof e.ease=="string"&&q1(e.ease)&&(e.ease=fy[e.ease])}var my=10,Ru=class extends Su{constructor(t){py(t),Cu(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 Ko({...s,autoplay:!1}),l=et(this.finishedTime??this.time);o.setWithVelocity(i.sample(l-my).value,i.sample(l).value,my),i.stop()}};var zf=(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 gy(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=zf(a,t),i=zf(n,t);return Wo(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 bn(e){e.duration=0,e.type="keyframes"}var j1=new Set(["opacity","clipPath","filter","transform"]),K1=ca(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hy(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 K1()&&o&&j1.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var X1=40,Di=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||Xo;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(),gy(t,n,s,i)||((mt.instantAnimations||!l)&&c?.(yn(t,r,o)),t[0]=t[t.length-1],bn(r),r.repeat=0);let p={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>X1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},m=!u&&hy(p)?new Ru({...p,element:p.motionValue.owner.current}):new Ko(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(),Hf()),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 Iu=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 vy(this.animations,"duration")}get iterationDuration(){return vy(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 vy(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 Ni=class extends Iu{then(t,o){return this.finished.finally(t).then(()=>{})}};var Y1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Z1(e){let t=Y1.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var Q1=4;function Wf(e,t,o=1){dt(o<=Q1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=Z1(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return ui(s)?parseFloat(s):s}return fa(a)?Wf(a,t,o+1):a}function xa(e,t){return e?.[t]??e?.default??e}var Oi=new Set(["width","height","top","left","right","bottom",...fo]);var xy={test:e=>e==="auto",parse:e=>e};var Pu=e=>t=>t.test(e);var qf=[Ao,de,ht,co,Lf,Pf,xy],$f=e=>qf.find(Pu(e));function yy(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||di(e):!0}var J1=new Set(["brightness","contrast","saturate","opacity"]);function eN(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(gn)||[];if(!r)return e;let a=o.replace(r,""),n=J1.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var tN=/\b([a-z-]*)\(.*?\)/gu,Fi={...vt,getAnimatableNone:e=>{let t=e.match(tN);return t?t.map(eN).join(" "):e}};var jf={...Ao,transform:Math.round};var by={rotate:co,rotateX:co,rotateY:co,rotateZ:co,scale:Ri,scaleX:Ri,scaleY:Ri,scaleZ:Ri,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:$o,originX:pu,originY:pu,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,...by,zIndex:jf,fillOpacity:$o,strokeOpacity:$o,numOctaves:jf};var Cy={...ya,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:Fi,WebkitFilter:Fi},_i=e=>Cy[e];function Vi(e,t){let o=_i(e);return o!==Fi&&(o=vt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var oN=new Set(["auto","none","0"]);function wy(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!oN.has(n)&&Ir(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=Vi(o,a)}var Bi=class extends Xo{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=Wf(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Oi.has(r)||t.length!==2)return;let[a,n]=t,s=$f(a),i=$f(n);if(s!==i)if(Ff(s)&&Ff(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||yy(t[a]))&&r.push(a);r.length&&wy(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 Hi(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 Ui=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gi(e){return ci(e)&&"offsetHeight"in e}var Sy=30,rN=e=>!isNaN(parseFloat(e)),ba={current:void 0},Lu=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=rN(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 qo);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>Sy)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Sy);return fi(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 Lu(e,t)}var{schedule:Ca,cancel:aN}=cu(queueMicrotask,!1);var Wt={x:!1,y:!1};function Tu(){return Wt.x||Wt.y}function Kf(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 Mu(e,t){let o=Hi(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function Ry(e){return!(e.pointerType==="touch"||Tu())}function Xf(e,t,o={}){let[r,a,n]=Mu(e,o),s=i=>{if(!Ry(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=f=>{Ry(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var Yf=(e,t)=>t?e===t?!0:Yf(e,t.parentElement):!1;var wa=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var nN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Iy(e){return nN.has(e.tagName)||e.tabIndex!==-1}var Cn=new WeakSet;function Py(e){return t=>{t.key==="Enter"&&e(t)}}function Zf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Ly=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=Py(()=>{if(Cn.has(o))return;Zf(o,"down");let a=Py(()=>{Zf(o,"up")}),n=()=>Zf(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 Ty(e){return wa(e)&&!Tu()}function Qf(e,t,o={}){let[r,a,n]=Mu(e,o),s=i=>{let l=i.currentTarget;if(!Ty(i))return;Cn.add(l);let u=t(l,i),c=(m,h)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),Cn.has(l)&&Cn.delete(l),Ty(m)&&typeof u=="function"&&u(m,{success:h})},f=m=>{c(m,l===window||l===document||o.useGlobalTarget||Yf(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),Gi(i)&&(i.addEventListener("focus",u=>Ly(u,a)),!Iy(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Sa(e){return ci(e)&&"ownerSVGElement"in e}function zi(e){return Sa(e)&&e.tagName==="svg"}function Jf(...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=bu(a,n,s);return t?i(r):i}var De=e=>!!(e&&e.getVelocity);var sN=[...qf,je,vt],ep=e=>sN.find(Pu(e));O();O();O();var Tr=le({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});O();function My(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iN(...e){return t=>{let o=!1,r=e.map(a=>{let n=My(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():My(e[a],null)}}}}function ky(...e){return B(iN(...e),e)}var tp=class extends Is{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=Gi(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 Ey({children:e,isPresent:t,anchorX:o,root:r}){let a=Ge(),n=E(null),s=E({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=te(Tr),l=ky(n,e?.ref);return Ps(()=>{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
6
  [data-motion-pop-id="${a}"] {
7
7
  position: absolute !important;
8
8
  width: ${u}px !important;
@@ -76,7 +76,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
76
76
  --nojs-bg: black !important;
77
77
  --nojs-fg: white !important;
78
78
  }
79
- }`,IU="^\\d+$",PU="^[a-zA-Z]+$",LU="^[a-zA-Z0-9]+$";var hL=C(({className:e,containerClassName:t,...o},r)=>d(kg,{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}));hL.displayName="InputOTP";var vL=C(({className:e,...t},o)=>d("div",{ref:o,className:L("flex items-center",e),...t}));vL.displayName="InputOTPGroup";var xL=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}}),yL=C(({index:e,className:t,...o},r)=>{let n=te(Mg)?.slots?.[e],s=n?.char,i=n?.hasFakeCaret,l=n?.isActive;return P("div",{ref:r,"data-active":l?"":void 0,className:L(xL({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"})})]})});yL.displayName="InputOTPSlot";var bL=C(({className:e,...t},o)=>d("div",{ref:o,role:"separator",className:L("text-muted-foreground",e),...t,children:d(Us,{"aria-hidden":"true"})}));bL.displayName="InputOTPSeparator";O();function CL({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(on,{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(an,{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(Me,{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(sn,{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 TU({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(an,{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(sn,{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(Me,{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(CL,{componentName:o||t,className:r,children:a||e})}return d("div",{className:r,children:e})}function MU({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(on,{className:"w-3 h-3 mr-1"}),"PRO"]})}function kU({className:e}){return d(Lt,{variant:"outline",className:L("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}O();function Eg({className:e,variant:t="default",showText:o=!0,...r}){let a=Ge(),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 hhe({className:e,variant:t="default",...o}){return d(Eg,{showText:!1,className:e,variant:t,...o})}function vhe({className:e,variant:t="default",showText:o=!0,...r}){return d(Eg,{className:L("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}O();var wL=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}));wL.displayName="Pagination";var SL=C(({className:e,...t},o)=>d("ul",{ref:o,className:L("moonui-theme","flex flex-row items-center gap-1",e),...t}));SL.displayName="PaginationContent";var RL=C(({className:e,...t},o)=>d("li",{ref:o,className:L("moonui-theme","",e),...t}));RL.displayName="PaginationItem";var Id=C(({className:e,isActive:t,size:o="icon",...r},a)=>d("a",{ref:a,"aria-current":t?"page":void 0,className:L(nu({variant:t?"outline":"ghost",size:o}),e),...r}));Id.displayName="PaginationLink";var IL="hidden sm:inline",PL=C(({className:e,...t},o)=>P(Id,{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:IL,children:"Previous"})]}));PL.displayName="PaginationPrevious";var LL=C(({className:e,...t},o)=>P(Id,{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:IL,children:"Next"}),d(wt,{className:"h-4 w-4"})]}));LL.displayName="PaginationNext";var TL=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"})]}));TL.displayName="PaginationEllipsis";O();O();O();function Ag(e,[t,o]){return Math.min(o,Math.max(t,e))}O();var Dg=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"}),EU="VisuallyHidden",Al=C((e,t)=>d(Y.span,{...e,ref:t,style:{...Dg,...e.style}}));Al.displayName=EU;var ML=Al;var DU=[" ","Enter","ArrowUp","ArrowDown"],NU=[" ","Enter"],$a="Select",[Ld,Td,OU]=Lo($a),[is,Zhe]=Ee($a,[OU,Kt]),Md=Kt(),[FU,$r]=is($a),[_U,VU]=is($a),kL=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=Md(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}),_=E(null),V=v?h||!!v.closest("form"):!0,[U,N]=k(new Set),$=Array.from(U).map(G=>G.props.value).join(";");return d(sr,{...g,children:P(FU,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:R,onValueNodeHasChildrenChange:w,contentId:Te(),value:M,onValueChange:A,open:S,onOpenChange:T,dir:I,triggerPointerDownPosRef:_,disabled:p,children:[d(Ld.Provider,{scope:t,children:d(_U,{scope:e.__scopeSelect,onNativeOptionAdd:B(G=>{N(z=>new Set(z).add(G))},[]),onNativeOptionRemove:B(G=>{N(z=>{let F=new Set(z);return F.delete(G),F})},[]),children:o})}),V?P(tT,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:f,value:M,onChange:G=>A(G.target.value),disabled:p,form:h,children:[M===void 0?d("option",{value:""}):null,Array.from(U)]},$):null]})})};kL.displayName=$a;var EL="SelectTrigger",AL=C((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Md(o),s=$r(EL,o),i=s.disabled||r,l=pe(t,s.onTriggerChange),u=Td(o),c=E("touch"),[f,p,m]=rT(g=>{let v=u().filter(b=>!b.disabled),x=v.find(b=>b.value===s.value),y=aT(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(ir,{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":oT(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===" ")&&DU.includes(g.key)&&(h(),g.preventDefault())})})})});AL.displayName=EL;var DL="SelectValue",NL=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=$r(DL,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:oT(l.value)?d(Ve,{children:s}):n})});NL.displayName=DL;var BU="SelectIcon",OL=C((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return d(Y.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});OL.displayName=BU;var HU="SelectPortal",FL=e=>d(Vt,{asChild:!0,...e});FL.displayName=HU;var ja="SelectContent",_L=C((e,t)=>{let o=$r(ja,e.__scopeSelect),[r,a]=k();if(Ae(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?Ls(d(VL,{scope:e.__scopeSelect,children:d(Ld.Slot,{scope:e.__scopeSelect,children:d("div",{children:e.children})})}),n):null}return d(BL,{...e,ref:t})});_L.displayName=ja;var So=10,[VL,jr]=is(ja),UU="SelectContentImpl",GU=It("SelectContent.RemoveScroll"),BL=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,_]=k(null),V=Td(o),[U,N]=k(!1),$=E(!1);D(()=>{if(b)return Br(b)},[b]),Or();let G=B(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]),z=B(()=>G([T,b]),[G,T,b]);D(()=>{U&&z()},[U,z]);let{onOpenChange:F,triggerPointerDownPosRef:q}=y;D(()=>{if(b){let K={x:0,y:0},ie=ye=>{K={x:Math.abs(Math.round(ye.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(q.current?.y??0))}},xe=ye=>{K.x<=10&&K.y<=10?ye.preventDefault():b.contains(ye.target)||F(!1),document.removeEventListener("pointermove",ie),q.current=null};return q.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,F,q]),D(()=>{let K=()=>F(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[F]);let[ce,se]=rT(K=>{let ie=V().filter(ge=>!ge.disabled),xe=ie.find(ge=>ge.ref.current===document.activeElement),ye=aT(ie,K,xe);ye&&setTimeout(()=>ye.ref.current.focus())}),W=B((K,ie,xe)=>{let ye=!$.current&&!xe;(y.value!==void 0&&y.value===ie||ye)&&(M(K),ye&&($.current=!0))},[y.value]),re=B(()=>b?.focus(),[b]),ne=B((K,ie,xe)=>{let ye=!$.current&&!xe;(y.value!==void 0&&y.value===ie||ye)&&_(K)},[y.value]),ee=r==="popper"?Ng:HL,fe=ee===Ng?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:v}:{};return d(VL,{scope:o,content:b,viewport:w,onViewportChange:I,itemRefCallback:W,selectedItem:T,onItemLeave:re,itemTextRefCallback:ne,focusSelectedItem:z,selectedItemText:A,position:r,isPositioned:U,searchRef:ce,children:d(lr,{as:GU,allowPinchZoom:!0,children:d(ar,{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:()=>N(!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&&se(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(()=>G(ye)),K.preventDefault()}})})})})})})});BL.displayName=UU;var zU="SelectItemAlignedPosition",HL=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=Td(o),m=E(!1),h=E(!0),{viewport:g,selectedItem:v,selectedItemText:x,focusSelectedItem:y}=s,b=B(()=>{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,ae=S.width+be,ue=Math.max(ae,T.width),Oe=window.innerWidth-So,Ue=Ag(J,[So,Math.max(So,Oe-ue)]);i.style.minWidth=ae+"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,ae=S.width+be,ue=Math.max(ae,T.width),Oe=window.innerWidth-So,Ue=Ag(J,[So,Math.max(So,Oe-ue)]);i.style.minWidth=ae+"px",i.style.right=Ue+"px"}let _=p(),V=window.innerHeight-So*2,U=g.scrollHeight,N=window.getComputedStyle(u),$=parseInt(N.borderTopWidth,10),G=parseInt(N.paddingTop,10),z=parseInt(N.borderBottomWidth,10),F=parseInt(N.paddingBottom,10),q=$+G+U+F+z,ce=Math.min(v.offsetHeight*5,q),se=window.getComputedStyle(g),W=parseInt(se.paddingTop,10),re=parseInt(se.paddingBottom,10),ne=S.top+S.height/2-So,ee=V-ne,fe=v.offsetHeight/2,K=v.offsetTop+fe,ie=$+G+K,xe=q-ie;if(ie<=ne){let ge=_.length>0&&v===_[_.length-1].ref.current;i.style.bottom="0px";let J=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(ee,fe+(ge?re:0)+J+z),ae=ie+be;i.style.height=ae+"px"}else{let ge=_.length>0&&v===_[0].ref.current;i.style.top="0px";let be=Math.max(ne,$+g.offsetTop+(ge?W:0)+fe)+xe;i.style.height=be+"px",g.scrollTop=ie-ne+g.offsetTop}i.style.margin=`${So}px 0`,i.style.minHeight=ce+"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=B(S=>{S&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return d(qU,{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}})})})});HL.displayName=zU;var WU="SelectPopperPosition",Ng=C((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=So,...n}=e,s=Md(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)"}})});Ng.displayName=WU;var[qU,Bg]=is(ja,{}),Og="SelectViewport",UL=C((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=jr(Og,o),s=Bg(Og,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(Ld.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})})})]})});UL.displayName=Og;var GL="SelectGroup",[$U,jU]=is(GL),zL=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Te();return d($U,{scope:o,id:a,children:d(Y.div,{role:"group","aria-labelledby":a,...r,ref:t})})});zL.displayName=GL;var WL="SelectLabel",qL=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=jU(WL,o);return d(Y.div,{id:a.id,...r,ref:t})});qL.displayName=WL;var Pd="SelectItem",[KU,$L]=is(Pd),jL=C((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=$r(Pd,o),l=jr(Pd,o),u=i.value===r,[c,f]=k(n??""),[p,m]=k(!1),h=pe(t,y=>l.itemRefCallback?.(y,r,a)),g=Te(),v=E("touch"),x=()=>{a||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d(KU,{scope:o,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:B(y=>{f(b=>b||(y?.textContent??"").trim())},[]),children:d(Ld.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===" "||(NU.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});jL.displayName=Pd;var Dl="SelectItemText",KL=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=$r(Dl,o),i=jr(Dl,o),l=$L(Dl,o),u=VU(Dl,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?Ls(n.children,s.valueNode):null]})});KL.displayName=Dl;var XL="SelectItemIndicator",YL=C((e,t)=>{let{__scopeSelect:o,...r}=e;return $L(XL,o).isSelected?d(Y.span,{"aria-hidden":!0,...r,ref:t}):null});YL.displayName=XL;var Fg="SelectScrollUpButton",ZL=C((e,t)=>{let o=jr(Fg,e.__scopeSelect),r=Bg(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.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(JL,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});ZL.displayName=Fg;var _g="SelectScrollDownButton",QL=C((e,t)=>{let o=jr(_g,e.__scopeSelect),r=Bg(_g,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(JL,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});QL.displayName=_g;var JL=C((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=jr("SelectScrollButton",o),s=E(null),i=Td(o),l=B(()=>{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()})})}),XU="SelectSeparator",eT=C((e,t)=>{let{__scopeSelect:o,...r}=e;return d(Y.div,{"aria-hidden":!0,...r,ref:t})});eT.displayName=XU;var Vg="SelectArrow",YU=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Md(o),n=$r(Vg,o),s=jr(Vg,o);return n.open&&s.position==="popper"?d(Vr,{...a,...r,ref:t}):null});YU.displayName=Vg;var ZU="SelectBubbleInput",tT=C(({__scopeSelect:e,value:t,...o},r)=>{let a=E(null),n=pe(r,a),s=$n(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:{...Dg,...o.style},ref:n,defaultValue:t})});tT.displayName=ZU;function oT(e){return e===""||e===void 0}function rT(e){let t=We(e),o=E(""),r=E(0),a=B(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=B(()=>{o.current="",window.clearTimeout(r.current)},[]);return D(()=>()=>window.clearTimeout(r.current),[]),[o,a,n]}function aT(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=QU(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 QU(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var nT=kL,Hg=AL,sT=NL,iT=OL,lT=FL,Ug=_L,uT=UL,cT=zL,Gg=qL,zg=jL,dT=KL,fT=YL,Wg=ZL,qg=QL,$g=eT;var ls=nT;ls.displayName="Select";var eG=cT,Nl=sT,tG=Q(["flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),us=C(({className:e,children:t,variant:o,size:r,error:a,success:n,loading:s,leftIcon:i,rightIcon:l,...u},c)=>{let f=Ge(),p=u["aria-label"]!=null||u["aria-labelledby"]!=null;return P(Hg,{ref:c,className:L(tG({variant:o,size:r,state:a?"error":n?"success":"none"}),e),...u,disabled:u.disabled||s,"aria-invalid":a?!0:void 0,"data-error":a?!0:void 0,"data-success":n?!0:void 0,"data-loading":s?!0:void 0,"aria-labelledby":p?u["aria-labelledby"]:f,children:[P("div",{id:f,className:"flex items-center flex-1 gap-2",children:[i&&d("span",{className:"flex items-center justify-center text-muted-foreground",children:i}),s?P("div",{className:"flex items-center gap-2",children:[d(ot,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),d("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!s&&d(iT,{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"})})]})});us.displayName=Hg.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(Fs,{className:"h-4 w-4"})}));jg.displayName=Wg.displayName;var Kg=C(({className:e,...t},o)=>d(qg,{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"})}));Kg.displayName=qg.displayName;var cs=C(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>d(lT,{children:P(Ug,{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(jg,{}),d(uT,{className:L("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d(Kg,{})]})}));cs.displayName=Ug.displayName;var pT=C(({className:e,...t},o)=>d(Gg,{ref:o,className:L("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));pT.displayName=Gg.displayName;var Rt=C(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>P(zg,{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 focus:bg-success/10 focus:text-success",o==="warning"&&"text-warning-700 dark:text-warning-500 focus:bg-warning/10 focus:text-warning-700 dark:focus:text-warning-500",e),...s,children:[d("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d(fT,{children:n||d(pt,{className:"h-4 w-4"})})}),d(dT,{children:t}),a&&d("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));Rt.displayName=zg.displayName;var mT=C(({className:e,...t},o)=>d($g,{ref:o,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));mT.displayName=$g.displayName;var oG=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],gT=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let a=0;a<o.length;a++)a>0&&a%3===0&&(r+=" "),r+=o[a];return r}},rG=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},hT=C(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=oG,size:i,...l},u)=>{let[c,f]=k(r),[p,m]=k(t),h=s.find(y=>y.code===c)||s[0],g=y=>{let b=y.target.value.replace(/\D/g,""),R=rG(c),w=b.slice(0,R),I=gT(w,c);m(w),o?.(w,c),y.target.value=I},v=y=>{f(y),o?.(p,y)},x=gT(p,c);return P("div",{className:L("relative flex gap-2",e),children:[n&&P(ls,{value:c,onValueChange:v,children:[d(us,{className:"w-[120px]",children:d(Nl,{children:P("div",{className:"flex items-center gap-2",children:[d("span",{children:h.flag}),d("span",{children:h.code})]})})}),d(cs,{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(Qs,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});hT.displayName="PhoneInput";O();var aG=Q("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6",default:"h-4 w-4"}},defaultVariants:{variant:"default",size:"md"}}),vT=le({}),xT=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=B(m=>{c||u(m),r?.(m)},[c,r]);return d(vT.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})})});xT.displayName="RadioGroup";var Xg=C(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=te(vT),c=Ge(),f=a||c,p=u.value===n,m=h=>{u.onValueChange&&u.onValueChange(h.target.value),i.onChange&&i.onChange(h)};return P("div",{className:"relative flex items-center",children:[d("input",{type:"radio",id:f,ref:l,value:n,checked:p,disabled:s||u.disabled,name:u.name,onChange:m,className:"peer sr-only",...i}),d("label",{htmlFor:f,className:L(aG({variant:t,size:o}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",s&&"cursor-not-allowed opacity-50",e),children:d("span",{className:L("absolute inset-0 pointer-events-none",p&&"flex items-center justify-center"),children:p&&(r||d(na,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Xg.displayName="RadioGroupItem";var Yg=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}));Yg.displayName="RadioLabel";var yT=C(({id:e,label:t,labelClassName:o,...r},a)=>{let n=Ge(),s=e||n;return P("div",{className:"flex items-center",children:[d(Xg,{ref:a,id:s,...r}),d(Yg,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});yT.displayName="RadioItemWithLabel";function nG({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")})]})}O();O();O();O();O();function bT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sG(...e){return t=>{let o=!1,r=e.map(a=>{let n=bT(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():bT(e[a],null)}}}}function fr(...e){return B(sG(...e),e)}function wT(e){let t=C((o,r)=>{let{children:a,...n}=o,s=null,i=!1,l=[];CT(a)&&typeof kd=="function"&&(a=kd(a._payload)),Ie.forEach(a,p=>{if(dG(p)){i=!0;let m=p,h="child"in m.props?m.props.child:m.props.children;CT(h)&&typeof kd=="function"&&(h=kd(h._payload)),s=lG(m,h),l.push(s?.props?.children)}else l.push(p)}),s?s=Fe(s,void 0,l):!i&&Ie.count(a)===1&&Le(a)&&(s=a);let u=s?cG(s):void 0,c=fr(r,u);if(!s){if(a||a===0)throw new Error(i?gG(e):mG(e));return a}let f=uG(n,s.props??{});return s.type!==Je&&(f.ref=r?c:u),Fe(s,f)});return t.displayName=`${e}.Slot`,t}var iG=Symbol.for("radix.slottable");var lG=(e,t)=>{if("child"in e.props){let o=e.props.child;return Le(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Le(t)?t:null};function uG(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 cG(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 dG(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iG}var fG=Symbol.for("react.lazy");function CT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fG&&"_payload"in e&&pG(e._payload)}function pG(e){return typeof e=="object"&&e!==null&&"then"in e}var mG=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,gG=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kd=H[" use ".trim().toString()];var hG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ds=hG.reduce((e,t)=>{let o=wT(`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}},{});O();O();var Ol=globalThis?.document?ct:()=>{};O();function vG(e,t){return Gt((o,r)=>t[o][r]??o,e)}var fs=e=>{let{present:t,children:o}=e,r=xG(t),a=typeof o=="function"?o({present:r.isPresent}):Ie.only(o),n=yG(r.ref,bG(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};fs.displayName="Presence";function xG(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=E(void 0),i=e?"mounted":"unmounted",[l,u]=vG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{l==="mounted"?(n.current=s.current??Fl(r.current),s.current=void 0):n.current="none"},[l]),Ol(()=>{let c=r.current,f=a.current;if(f!==e){let m=n.current,h=Fl(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]),Ol(()=>{if(t){let c,f=t.ownerDocument.defaultView??window,p=h=>{let v=Fl(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=Fl(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:B(c=>{if(c){let f=getComputedStyle(c);r.current=f,s.current=Fl(f)}else r.current=null;o(c)},[])}}function ST(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yG(...e){let t=E(e);return t.current=e,B(o=>{let r=t.current,a=!1,n=r.map(s=>{let i=ST(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():ST(r[s],null)}}},[])}function Fl(e){return e?.animationName||"none"}function bG(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)}O();function RT(e,t=[]){let o=[];function r(n,s){let i=le(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=te(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=>le(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,CG(a,...t)]}function CG(...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}O();function Kr(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}O();var wG=le(void 0);function IT(e){let t=te(wG);return e||t||"ltr"}function PT(e,[t,o]){return Math.min(o,Math.max(t,e))}var Ave=!!(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)}}O();function SG(e,t){return Gt((o,r)=>t[o][r]??o,e)}var Zg="ScrollArea",[TT,Wve]=RT(Zg),[RG,Yt]=TT(Zg),MT=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=IT(a);return d(RG,{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(ds.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}})})});MT.displayName=Zg;var kT="ScrollAreaViewport",ET=C((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=Yt(kT,o),i=E(null),l=fr(t,i,s.onViewportChange);return P(Ve,{children:[d(IG,{nonce:a}),d(ds.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})})]})});ET.displayName=kT;var IG=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),Uo="ScrollAreaScrollbar",Dd=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Uo,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(PG,{...r,ref:t,forceMount:o}):a.type==="scroll"?d(LG,{...r,ref:t,forceMount:o}):a.type==="auto"?d(AT,{...r,ref:t,forceMount:o}):a.type==="always"?d(Qg,{...r,ref:t,"data-state":"visible"}):null});Dd.displayName=Uo;var PG=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Uo,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(fs,{present:o||n,children:d(AT,{"data-state":n?"visible":"hidden",...r,ref:t})})}),LG=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Uo,e.__scopeScrollArea),n=e.orientation==="horizontal",s=Od(()=>l("SCROLL_END"),100),[i,l]=SG("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(fs,{present:o||i!=="hidden",children:d(Qg,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Xr(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Xr(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),AT=C((e,t)=>{let o=Yt(Uo,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=k(!1),i=e.orientation==="horizontal",l=Od(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return ps(o.viewport,l),ps(o.content,l),d(fs,{present:r||n,children:d(Qg,{"data-state":n?"visible":"hidden",...a,ref:t})})}),Qg=C((e,t)=>{let{orientation:o="vertical",...r}=e,a=Yt(Uo,e.__scopeScrollArea),n=E(null),s=E(0),[i,l]=k({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=FT(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 DG(p,s.current,i,m)}return o==="horizontal"?d(TG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollLeft,m=LT(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(MG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollTop,m=LT(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}),TG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Yt(Uo,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=fr(t,l,n.onScrollbarXChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(NT,{"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":Nd(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),VT(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:Ad(s.paddingLeft),paddingEnd:Ad(s.paddingRight)}})}})}),MG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Yt(Uo,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=fr(t,l,n.onScrollbarYChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(NT,{"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":Nd(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),VT(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:Ad(s.paddingTop),paddingEnd:Ad(s.paddingBottom)}})}})}),[kG,DT]=TT(Uo),NT=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(Uo,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=Od(f,10);function T(M){if(x.current){let A=M.clientX-x.current.left,_=M.clientY-x.current.top;u({x:A,y:_})}}return D(()=>{let M=A=>{let _=A.target;h?.contains(_)&&w(A,R)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[b,h,R,w]),D(I,[r,I]),ps(h,S),ps(m.content,S),d(kG,{scope:o,scrollbar:h,hasThumb:a,onThumbChange:Kr(n),onThumbPointerUp:Kr(s),onThumbPositionChange:I,onThumbPointerDown:Kr(i),children:d(ds.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})})})}),Ed="ScrollAreaThumb",Jg=C((e,t)=>{let{forceMount:o,...r}=e,a=DT(Ed,e.__scopeScrollArea);return d(fs,{present:o||a.hasThumb,children:d(EG,{ref:t,...r})})}),EG=C((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=Yt(Ed,o),s=DT(Ed,o),{onThumbPositionChange:i}=s,l=fr(t,s.onThumbChange),u=E(void 0),c=Od(()=>{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=NG(f,i);u.current=m,i()}};return i(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[n.viewport,c,i]),d(ds.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)})});Jg.displayName=Ed;var eh="ScrollAreaCorner",OT=C((e,t)=>{let o=Yt(eh,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d(AG,{...e,ref:t}):null});OT.displayName=eh;var AG=C((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=Yt(eh,o),[n,s]=k(0),[i,l]=k(0),u=!!(n&&i),{onCornerWidthChange:c,onCornerHeightChange:f}=a;return ps(a.scrollbarX,()=>{let p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),l(p)}),ps(a.scrollbarY,()=>{let p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),s(p)}),D(()=>()=>{c(0),f(0)},[c,f]),u?d(ds.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 Ad(e){return e?parseInt(e,10):0}function FT(e,t){let o=e/t;return isNaN(o)?0:o}function Nd(e){let t=FT(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function DG(e,t,o,r="ltr"){let a=Nd(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 _T([l,u],f)(e)}function LT(e,t,o="ltr"){let r=Nd(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=PT(e,l);return _T([0,s],[0,i])(u)}function _T(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 VT(e,t){return e>0&&e<t}var NG=(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 Od(e,t){let o=Kr(e),r=E(0);return D(()=>()=>window.clearTimeout(r.current),[]),B(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function ps(e,t){let o=Kr(t);Ol(()=>{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 th=MT,BT=ET;var HT=OT;var UT=C(({className:e,children:t,focusable:o=!0,...r},a)=>P(th,{ref:a,className:L("relative overflow-hidden",e),...r,children:[d(BT,{tabIndex:o?0:void 0,className:"h-full w-full rounded-[inherit]",children:t}),d(oh,{}),d(HT,{})]}));UT.displayName=th.displayName;var oh=C(({className:e,orientation:t="vertical",...o},r)=>d(Dd,{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(Jg,{className:"relative flex-1 rounded-full bg-border"})}));oh.displayName=Dd.displayName;O();var GT=(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},zT={duration:.5,ease:[.25,.46,.45,.94]},WT=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||GT(t,a),[t,a,c]),y=Z(()=>({...zT,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})});WT.displayName="ScrollReveal";var qT=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})});qT.displayName="ScrollRevealContainer";var $T=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||GT(t,r),[t,r,n]),c=Z(()=>({...zT,duration:o}),[o]);return d(_e.div,{ref:l,variants:u,transition:c,className:L(a),style:s,id:i,children:e})});$T.displayName="ScrollRevealItem";O();O();var FG="Separator",jT="horizontal",_G=["horizontal","vertical"],KT=C((e,t)=>{let{decorative:o,orientation:r=jT,...a}=e,n=VG(r)?r:jT,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return d(Y.div,{"data-orientation":n,...i,...a,ref:t})});KT.displayName=FG;function VG(e){return _G.includes(e)}var rh=KT;var XT=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(rh,{ref:s,decorative:a,orientation:t||void 0,className:L(XT({orientation:t,variant:o,size:r}),e),...n}));Zt.displayName=rh.displayName;O();O();O();var HG=Object.defineProperty,ms=(e,t)=>HG(e,"name",{value:t,configurable:!0}),YT=!!(typeof window<"u"&&window.document&&window.document.createElement);function nh(e,t,{checkForDefaultPrevented:o=!0}={}){return ms(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ms(nh,"composeEventHandlers");function UG(e){if(!YT)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ms(UG,"getOwnerWindow");function ah(e){if(!YT)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ms(ah,"getOwnerDocument");function ZT(e,t=!1){let{activeElement:o}=ah(e);if(!o?.nodeName)return null;if(QT(o)&&o.contentDocument)return ZT(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=ah(o).getElementById(r);if(a)return a}}return o}ms(ZT,"getActiveElement");function QT(e){return e.tagName==="IFRAME"}ms(QT,"isFrame");O();var gs=!1;O();var Fd=globalThis?.document?ct:()=>{};O();O();var GG=Object.defineProperty,zG=(e,t)=>GG(e,"name",{value:t,configurable:!0}),JT=H[" useEffectEvent ".trim().toString()],eM=H[" useInsertionEffect ".trim().toString()];function sh(e){if(typeof JT=="function")return JT(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof eM=="function"?eM(()=>{t.current=e}):Fd(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}zG(sh,"useEffectEvent");var WG=Object.defineProperty,_l=(e,t)=>WG(e,"name",{value:t,configurable:!0}),qG=H[" useInsertionEffect ".trim().toString()]||Fd;function ih({prop:e,defaultProp:t,onChange:o=_l(()=>{},"onChange"),caller:r}){let[a,n,s]=oM({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(gs){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=B(c=>{if(i){let f=rM(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}_l(ih,"useControllableState");function oM({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return qG(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}_l(oM,"useUncontrolledState");function rM(e){return typeof e=="function"}_l(rM,"isFunction");var tM=Symbol("RADIX:SYNC_STATE");function $G(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=sh(s);if(gs){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===tM)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:tM,state:a})},[a,f.state,l]),[g,p]}_l($G,"useControllableStateReducer");O();O();O();var jG=Object.defineProperty,uh=(e,t)=>jG(e,"name",{value:t,configurable:!0});function lh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}uh(lh,"setRef");function aM(...e){return t=>{let o=!1,r=e.map(a=>{let n=lh(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():lh(e[a],null)}}}}uh(aM,"composeRefs");function ch(...e){return B(aM(...e),e)}uh(ch,"useComposedRefs");var KG=Object.defineProperty,Qt=(e,t)=>KG(e,"name",{value:t,configurable:!0}),XG=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";gs&&(!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]=nM(n,a))}return{...e,...o}},"mergeProps");function nM(...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(nM,"concatAriaDescribedby");var sM=le(XG);sM.displayName="SlotContext";function fh(e){let t=C((o,r)=>{let a=te(sM),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];dh(n)&&typeof _d=="function"&&(n=_d(n._payload)),Ie.forEach(n,h=>{if(uM(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;dh(v)&&typeof _d=="function"&&(v=_d(v._payload)),l=ZG(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Ie.count(n)===1&&Le(n)&&(l=n);let f=l?lM(l):void 0,p=ch(r,f);if(!l){if(n||n===0)throw new Error(u?ez(e):JG(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(fh,"createSlot");var iM=Symbol.for("radix.slottable");function YG(e){let t=Qt(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=iM,t}Qt(YG,"createSlottable");var ZG=Qt((e,t)=>{if("child"in e.props){let o=e.props.child;return Le(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Le(t)?t:null},"getSlottableElementFromSlottable");function lM(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(lM,"getElementRef");function uM(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iM}Qt(uM,"isSlottable");var QG=Symbol.for("react.lazy");function dh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QG&&"_payload"in e&&cM(e._payload)}Qt(dh,"isLazyComponent");function cM(e){return typeof e=="object"&&e!==null&&"then"in e}Qt(cM,"isPromiseLike");var JG=Qt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ez=Qt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),_d=H[" use ".trim().toString()];var tz=Object.defineProperty,oz=(e,t)=>tz(e,"name",{value:t,configurable:!0}),rz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dM=rz.reduce((e,t)=>{let o=fh(`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 az(e,t){e&&Go(()=>e.dispatchEvent(t))}oz(az,"dispatchDiscreteCustomEvent");var nz=Object.defineProperty,sz=(e,t)=>nz(e,"name",{value:t,configurable:!0}),iz="Toggle",Vl=C(sz(function(t,o){let{pressed:r,defaultPressed:a,onPressedChange:n,...s}=t,[i,l]=ih({prop:r,onChange:n,defaultProp:a??!1,caller:iz});return d(dM.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:o,onClick:nh(t.onClick,()=>{t.disabled||l(!i)})})},"Toggle"));var Vd=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"}}),Bd=C(({className:e,variant:t,size:o,...r},a)=>d(Vl,{ref:a,className:L("moonui-theme",Vd({variant:t,size:o,className:e})),...r}));Bd.displayName=Vl.displayName;O();O();var[Hd,qxe]=Ee("Tooltip",[Kt]),Ud=Kt(),fM="TooltipProvider",uz=700,ph="tooltip.open",[cz,gh]=Hd(fM),pM=e=>{let{__scopeTooltip:t,delayDuration:o=uz,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(cz,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:B(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:B(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:B(u=>{i.current=u},[]),disableHoverableContent:a,children:n})};pM.displayName=fM;var Bl="Tooltip",[dz,Hl]=Hd(Bl),mM=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=gh(Bl,e.__scopeTooltip),u=Ud(t),[c,f]=k(null),p=Te(),m=E(0),h=s??l.disableHoverableContent,g=i??l.delayDuration,v=E(!1),[x,y]=Be({prop:r,defaultProp:a??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(ph))):l.onClose(),n?.(S)},caller:Bl}),b=Z(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),R=B(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,y(!0)},[y]),w=B(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),I=B(()=>{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(sr,{...u,children:d(dz,{scope:t,contentId:p,open:x,stateAttribute:b,trigger:c,onTriggerChange:f,onTriggerEnter:B(()=>{l.isOpenDelayedRef.current?I():R()},[l.isOpenDelayedRef,I,R]),onTriggerLeave:B(()=>{h?w():(window.clearTimeout(m.current),m.current=0)},[w,h]),onOpen:R,onClose:w,disableHoverableContent:h,children:o})})};mM.displayName=Bl;var mh="TooltipTrigger",gM=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Hl(mh,o),n=gh(mh,o),s=Ud(o),i=E(null),l=pe(t,i,a.onTriggerChange),u=E(!1),c=E(!1),f=B(()=>u.current=!1,[]);return D(()=>()=>document.removeEventListener("pointerup",f),[f]),d(ir,{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)})})});gM.displayName=mh;var hh="TooltipPortal",[fz,pz]=Hd(hh,{forceMount:void 0}),mz=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=Hl(hh,t);return d(fz,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Vt,{asChild:!0,container:a,children:r})})})};mz.displayName=hh;var hs="TooltipContent",hM=C((e,t)=>{let o=pz(hs,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=Hl(hs,e.__scopeTooltip);return d($e,{present:r||s.open,children:s.disableHoverableContent?d(vM,{side:a,...n,ref:t}):d(gz,{side:a,...n,ref:t})})}),gz=C((e,t)=>{let o=Hl(hs,e.__scopeTooltip),r=gh(hs,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=B(()=>{i(null),f(!1)},[f]),m=B((h,g)=>{let v=h.currentTarget,x={x:h.clientX,y:h.clientY},y=yz(x,v.getBoundingClientRect()),b=bz(x,y),R=Cz(g.getBoundingClientRect()),w=Sz([...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=!wz(x,s);y?p():b&&(p(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,c,s,u,p]),d(vM,{...e,ref:n})}),[hz,vz]=Hd(Bl,{isInside:!1}),xz=Jd("TooltipContent"),vM=C((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Hl(hs,o),u=Ud(o),{onClose:c}=l;return D(()=>(document.addEventListener(ph,c),()=>document.removeEventListener(ph,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(xz,{children:r}),d(hz,{scope:o,isInside:!0,children:d(ML,{id:l.contentId,role:"tooltip",children:a||r})})]})})});hM.displayName=hs;var xM="TooltipArrow",yM=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Ud(o);return vz(xM,o).isInside?null:d(Vr,{...a,...r,ref:t})});yM.displayName=xM;function yz(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 bz(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 wz(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 Sz(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),Rz(t)}function Rz(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 bM=pM,CM=mM,vh=gM;var xh=hM,yh=yM;var bh=bM,wM=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"}}),SM=le(null);function Pz(e){if(!e)return!1;try{return e.matches(":focus-visible")}catch{return!0}}var Ul=({open:e,defaultOpen:t,onOpenChange:o,children:r,...a})=>{let n=e!==void 0,[s,i]=k(t??!1),l=n?e:s,u=E(!1),c=B(()=>{u.current=!0},[]),f=B(()=>{u.current=!1},[]),p=B(g=>{n||i(g),o?.(g)},[n,o]),m=B(g=>{!g&&u.current||p(g)},[p]);D(()=>{if(!l)return;let g=v=>{v.key==="Escape"&&(u.current=!1,p(!1))};return document.addEventListener("keydown",g,!0),()=>document.removeEventListener("keydown",g,!0)},[l,p]);let h=Z(()=>({hold:c,release:f}),[c,f]);return d(SM.Provider,{value:h,children:d(CM,{...a,open:l,onOpenChange:m,children:r})})};Ul.displayName="Tooltip";var Gl=C(({onFocus:e,onBlur:t,onPointerDown:o,...r},a)=>{let n=te(SM);return d(vh,{ref:a,...r,onFocus:s=>{Pz(s.currentTarget)&&n?.hold(),e?.(s)},onBlur:s=>{n?.release(),t?.(s)},onPointerDown:s=>{n?.release(),o?.(s)}})});Gl.displayName=vh.displayName;var Ch=C(({className:e,...t},o)=>d(yh,{ref:o,className:L("moonui-theme","fill-current",e),...t}));Ch.displayName=yh.displayName;var zl=C(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>P(xh,{ref:s,sideOffset:a,className:L("moonui-theme",wM({variant:t,size:o}),e),...n,children:[n.children,r&&d(Ch,{})]}));zl.displayName=xh.displayName;var RM=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(Ul,{open:c,defaultOpen:f,onOpenChange:p,delayDuration:s,children:[d(Gl,{asChild:!0,children:e}),d(zl,{ref:h,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...m,children:t})]}));RM.displayName="SimpleTooltip";var nt=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>P(Ul,{children:[d(Gl,{asChild:!0,children:d(Bd,{pressed:o,onPressedChange:()=>r(),disabled:a,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),d(zl,{children:d("p",{children:t})})]}),Lz=({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))}),IM=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=B(F=>{p(F),t?.(F)},[t]),T=B(()=>{let F=window.getSelection();return F&&F.rangeCount>0?F.getRangeAt(0):null},[]),M=B(F=>{if(!F)return;let q=window.getSelection();q&&(q.removeAllRanges(),q.addRange(F))},[]),A=B((F,q)=>{if(r)return;b.current&&b.current.focus();let ce=T();if(document.execCommand(F,!1,q)||console.warn(`Command '${F}' failed to execute`),b.current){let W=b.current.innerHTML;S(W)}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]),_=B(F=>{let q=F.currentTarget.innerHTML;S(q)},[S]),V=B(F=>{if(F.ctrlKey||F.metaKey)switch(F.key){case"b":F.preventDefault(),A("bold");break;case"i":F.preventDefault(),A("italic");break;case"u":F.preventDefault(),A("underline");break;case"z":F.preventDefault(),F.shiftKey?A("redo"):A("undo");break}F.key==="Tab"&&(F.preventDefault(),A("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[A]),U=B(()=>{let F=prompt("Enter URL:");F&&A("createLink",F)},[A]),N=B(()=>{let F=prompt("Enter image URL:");F&&A("insertImage",F)},[A]),$=B(F=>{A("formatBlock",`<h${F}>`)},[A]),G=B(F=>{let q=window.getSelection();if(q&&q.rangeCount>0){let ce=q.getRangeAt(0),se=document.createElement("span");se.style.color=F;try{ce.surroundContents(se)}catch{A("foreColor",F)}if(b.current){let W=b.current.innerHTML;S(W)}}},[A,S]);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(bh,{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(Os,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:w.bold,onClick:()=>A("bold"),disabled:r}),d(nt,{icon:d($s,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:w.italic,onClick:()=>A("italic"),disabled:r}),d(nt,{icon:d(oi,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:w.underline,onClick:()=>A("underline"),disabled:r}),d(nt,{icon:d(ti,{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(ls,{onValueChange:F=>{F.startsWith("h")?$(F.substring(1)):F==="normal"?A("formatBlock","p"):A("fontSize",F)},disabled:r,children:[d(us,{className:"w-24 h-8",children:d(Nl,{placeholder:"Size"})}),P(cs,{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(Es,{className:"h-3 w-3"}),tooltip:"Align Left",active:w.alignLeft,onClick:()=>A("justifyLeft"),disabled:r}),d(nt,{icon:d(Ms,{className:"h-3 w-3"}),tooltip:"Align Center",active:w.alignCenter,onClick:()=>A("justifyCenter"),disabled:r}),d(nt,{icon:d(As,{className:"h-3 w-3"}),tooltip:"Align Right",active:w.alignRight,onClick:()=>A("justifyRight"),disabled:r}),d(nt,{icon:d(ks,{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(Xs,{className:"h-3 w-3"}),tooltip:"Bullet List",active:w.unorderedList,onClick:()=>A("insertUnorderedList"),disabled:r}),d(nt,{icon:d(Ks,{className:"h-3 w-3"}),tooltip:"Numbered List",active:w.orderedList,onClick:()=>A("insertOrderedList"),disabled:r}),d(nt,{icon:d(Js,{className:"h-3 w-3"}),tooltip:"Quote",active:w.quote,onClick:()=>A("formatBlock","blockquote"),disabled:r}),d(nt,{icon:d(Vs,{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(js,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:U,disabled:r}),d(nt,{icon:d(ia,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P(Bo,{children:[d(ur,{asChild:!0,children:d(Me,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:d(nn,{className:"h-3 w-3"})})}),d(Ho,{className:"w-auto p-0",children:d(Lz,{onColorSelect:G})})]}),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(ri,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>A("undo"),disabled:r}),d(nt,{icon:d(ei,{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:F=>v(F.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:_,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(Tz,{content:f})})]})});IM.displayName="SimpleEditor";var Tz=({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"]})};O();var PM=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",PM({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...f},...c?qC:{},...R})});Yr.displayName="Skeleton";var wh=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)})}));wh.displayName="SkeletonText";var Sh=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}));Sh.displayName="SkeletonAvatar";var LM=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(Sh,{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(wh,{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"})]})]}));LM.displayName="SkeletonCard";O();var TM=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})});TM.displayName="SwipeableCard";O();O();var Gd="Switch",[Mz,Pye]=Ee(Gd),[kz,Ez]=Mz(Gd),MM=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(kz,{scope:o,checked:x,disabled:i,children:[d(Y.button,{type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":DM(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(AM,{control:p,bubbles:!g.current,name:r,value:l,checked:x,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});MM.displayName=Gd;var kM="SwitchThumb",EM=C((e,t)=>{let{__scopeSwitch:o,...r}=e,a=Ez(kM,o);return d(Y.span,{"data-state":DM(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});EM.displayName=kM;var Az="SwitchBubbleInput",AM=C(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=E(null),i=pe(s,n),l=$n(o),u=jn(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}})});AM.displayName=Az;function DM(e){return e?"checked":"unchecked"}var Rh=MM,NM=EM;var Nz=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"}}),Oz=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"}}),OM=C(({className:e,size:t,variant:o,loading:r,leftIcon:a,rightIcon:n,description:s,"aria-describedby":i,...l},u)=>{let c=Ge(),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(Rh,{className:L(Nz({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(NM,{className:L(Oz({size:t}))})]}),n&&d("span",{className:"text-muted-foreground",children:n}),s&&d("span",{id:f,className:"text-sm text-muted-foreground",children:s})]})});OM.displayName=Rh.displayName;O();var FM=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=Ge(),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})]})});FM.displayName="TagsInput";O();var Fz=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}}),_M=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=Ge(),b=v.id||y,R=E(null),[w,I]=k(m||h||"");ta(x,()=>R.current);let S=B(()=>{let N=R.current;if(!N||!l)return;N.style.height="auto";let $=N.scrollHeight;u&&$>u?(N.style.height=`${u}px`,N.style.overflowY="auto"):(N.style.height=`${$}px`,N.style.overflowY="hidden")},[l,u]);D(()=>{S()},[w,S]),D(()=>{m!==void 0&&I(m)},[m]);let T=N=>{I(N.target.value),g?.(N)},M=String(w).length,A=c&&(p!==void 0||M>0),_=typeof n=="string"?n:void 0,V=typeof s=="string"?s:void 0,U=_||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(Fz({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":_?`${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:[U&&d("p",{className:L("text-xs transition-all",_&&"text-error",V&&"text-success",o),id:_?`${b}-error`:V?`${b}-success`:void 0,children:_||V}),A&&P("p",{className:"text-xs text-muted-foreground ml-auto",children:[M,p!==void 0&&` / ${p}`]})]})]})});_M.displayName="Textarea";O();O();var Mh="ToastProvider",[kh,_z,Vz]=Lo("Toast"),[BM,Jye]=Ee("Toast",[Vz]),[Bz,Wd]=BM(Mh),HM=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 \`${Mh}\`. Expected non-empty \`string\`.`),d(kh.Provider,{scope:t,children:d(Bz,{scope:t,label:o,duration:r,swipeDirection:a,swipeThreshold:n,toastCount:u,viewport:i,onViewportChange:l,onToastAdd:B(()=>c(m=>m+1),[]),onToastRemove:B(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:s})})};HM.displayName=Mh;var UM="ToastViewport",Hz=["F8"],Ph="toast.viewportPause",Lh="toast.viewportResume",GM=C((e,t)=>{let{__scopeToast:o,hotkey:r=Hz,label:a="Notifications ({hotkey})",...n}=e,s=Wd(UM,o),i=_z(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(Ph);x.dispatchEvent(I),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){let I=new CustomEvent(Lh);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=B(({tabbingDirection:v})=>{let y=i().map(b=>{let R=b.ref.current,w=[R,...Jz(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(_=>_===w);Ih(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(hS,{ref:l,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&d(Th,{ref:u,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"forwards"});Ih(v)}}),d(kh.Slot,{scope:o,children:d(Y.ol,{tabIndex:-1,...n,ref:p})}),h&&d(Th,{ref:c,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"backwards"});Ih(v)}})]})});GM.displayName=UM;var zM="ToastFocusProxy",Th=C((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=Wd(zM,o);return d(Al,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});Th.displayName=zM;var Wl="Toast",Uz="toast.swipeStart",Gz="toast.swipeMove",zz="toast.swipeCancel",Wz="toast.swipeEnd",WM=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:Wl});return d($e,{present:o||i,children:d(jz,{open:i,...s,ref:t,onClose:()=>l(!1),onPause:We(e.onPause),onResume:We(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)})})})});WM.displayName=Wl;var[qz,$z]=BM(Wl,{onClose(){}}),jz=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(Wl,o),[v,x]=k(null),y=pe(t,N=>x(N)),b=E(null),R=E(null),w=a||g.duration,I=E(0),S=E(w),T=E(0),{onToastAdd:M,onToastRemove:A}=g,_=We(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),V=B(N=>{!N||N===1/0||(window.clearTimeout(T.current),I.current=new Date().getTime(),T.current=window.setTimeout(_,N))},[_]);D(()=>{let N=g.viewport;if(N){let $=()=>{V(S.current),u?.()},G=()=>{let z=new Date().getTime()-I.current;S.current=S.current-z,window.clearTimeout(T.current),l?.()};return N.addEventListener(Ph,G),N.addEventListener(Lh,$),()=>{N.removeEventListener(Ph,G),N.removeEventListener(Lh,$)}}},[g.viewport,w,l,u,V]),D(()=>{n&&!g.isClosePausedRef.current&&V(w)},[n,w,g.isClosePausedRef,V]),D(()=>(M(),()=>A()),[M,A]);let U=Z(()=>v?ZM(v):null,[v]);return g.viewport?P(Ve,{children:[U&&d(Kz,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:U}),d(qz,{scope:o,onClose:_,children:Ls(d(kh.ItemSlot,{scope:o,children:d(gS,{asChild:!0,onEscapeKeyDown:X(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||_(),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,N=>{N.key==="Escape"&&(i?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:X(e.onPointerDown,N=>{N.button===0&&(b.current={x:N.clientX,y:N.clientY})}),onPointerMove:X(e.onPointerMove,N=>{if(!b.current)return;let $=N.clientX-b.current.x,G=N.clientY-b.current.y,z=!!R.current,F=["left","right"].includes(g.swipeDirection),q=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,ce=F?q(0,$):0,se=F?0:q(0,G),W=N.pointerType==="touch"?10:2,re={x:ce,y:se},ne={originalEvent:N,delta:re};z?(R.current=re,zd(Gz,f,ne,{discrete:!1})):VM(re,g.swipeDirection,W)?(R.current=re,zd(Uz,c,ne,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs($)>W||Math.abs(G)>W)&&(b.current=null)}),onPointerUp:X(e.onPointerUp,N=>{let $=R.current,G=N.target;if(G.hasPointerCapture(N.pointerId)&&G.releasePointerCapture(N.pointerId),R.current=null,b.current=null,$){let z=N.currentTarget,F={originalEvent:N,delta:$};VM($,g.swipeDirection,g.swipeThreshold)?zd(Wz,m,F,{discrete:!0}):zd(zz,p,F,{discrete:!0}),z.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Kz=e=>{let{__scopeToast:t,children:o,...r}=e,a=Wd(Wl,t),[n,s]=k(!1),[i,l]=k(!1);return Zz(()=>s(!0)),D(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:d(Vt,{asChild:!0,children:d(Al,{...r,children:n&&P(Ve,{children:[a.label," ",o]})})})},Xz="ToastTitle",qM=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});qM.displayName=Xz;var Yz="ToastDescription",$M=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});$M.displayName=Yz;var jM="ToastAction",KM=C((e,t)=>{let{altText:o,...r}=e;return o.trim()?d(YM,{altText:o,asChild:!0,children:d(Eh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jM}\`. Expected non-empty \`string\`.`),null)});KM.displayName=jM;var XM="ToastClose",Eh=C((e,t)=>{let{__scopeToast:o,...r}=e,a=$z(XM,o);return d(YM,{asChild:!0,children:d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,a.onClose)})})});Eh.displayName=XM;var YM=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 ZM(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Qz(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(...ZM(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?Za(a,n):a.dispatchEvent(n)}var VM=(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 Zz(e=()=>{}){let t=We(e);Ae(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function Qz(e){return e.nodeType===e.ELEMENT_NODE}function Jz(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 Ih(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var QM=HM,Ah=GM,Dh=WM,Nh=qM,Oh=$M,Fh=KM,_h=Eh;var ek=QM,Bh=C(({className:e,...t},o)=>d(Ah,{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}));Bh.displayName=Ah.displayName;var t3=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"}}),Hh=C(({className:e,variant:t,...o},r)=>d(Dh,{ref:r,className:L("moonui-theme",t3({variant:t}),e),...o}));Hh.displayName=Dh.displayName;var tk=C(({className:e,...t},o)=>d(Fh,{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}));tk.displayName=Fh.displayName;var Uh=C(({className:e,...t},o)=>P(_h,{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"})]}));Uh.displayName=_h.displayName;var Gh=C(({className:e,...t},o)=>d(Nh,{ref:o,className:L("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Gh.displayName=Nh.displayName;var zh=C(({className:e,...t},o)=>d(Oh,{ref:o,className:L("moonui-theme","text-sm opacity-90",e),...t}));zh.displayName=Oh.displayName;var o3=5,r3=1e6,Vh=new Map,JM=e=>{if(Vh.has(e))return;let t=setTimeout(()=>{Vh.delete(e),ql({type:"REMOVE_TOAST",toastId:e})},r3);Vh.set(e,t)},a3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,o3)};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?JM(o):e.toasts.forEach(r=>{JM(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:[]},n3=0;function ql(e){$d=a3($d,e),qd.forEach(t=>{t($d)})}function ok({...e}){let t=`toast-${Date.now()}-${++n3}`,o=a=>ql({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>ql({type:"DISMISS_TOAST",toastId:t});return ql({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function rk(){let[e,t]=k($d);return D(()=>(qd.push(t),()=>{let o=qd.indexOf(t);o>-1&&qd.splice(o,1)}),[e]),{...e,toast:ok,dismiss:o=>ql({type:"DISMISS_TOAST",toastId:o})}}function s3(){let{toasts:e}=rk();return P(ek,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return P(Hh,{variant:n,open:s,onOpenChange:i,...l,children:[P("div",{className:"grid gap-1",children:[o&&d(Gh,{children:o}),r&&d(zh,{children:r})]}),a,d(Uh,{})]},t)}),d(Bh,{})]})}O();var ak=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"}}),nk=C(({className:e,size:t,children:o,...r},a)=>d("kbd",{ref:a,className:L("moonui-theme",ak({size:t}),e),...r,children:o}));nk.displayName="Kbd";O();var sk=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"}}),i3={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},ik=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=i3[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=B(U=>{n||(g||x(U),r?.(U))},[n,g,r]),S=B(U=>{if(n)return;let N=null;switch(U.key){case"ArrowRight":case"ArrowUp":N=Math.min(a,y+h);break;case"ArrowLeft":case"ArrowDown":N=Math.max(h,y-h);break;case"Home":N=h;break;case"End":N=a;break;default:return}U.preventDefault(),I(N)},[n,a,y,h,I]),T=Ge(),M=B(U=>`${T}-option-${String(U).replace(".","-")}`,[T]),A=y>=h&&y<=a?y:h,_=U=>{if(Le(i)){let N=i;return Fe(N,{className:L(m,"shrink-0",U&&"fill-current",N.props?.className)})}return d(vr,{className:L(m,"shrink-0",U&&"fill-current"),"aria-hidden":"true"})},V=Array.from({length:a},(U,N)=>N+1);return d("div",{ref:f,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":n||void 0,"aria-activedescendant":n?void 0:M(A),tabIndex:n?void 0:0,onKeyDown:S,onMouseLeave:()=>R(null),className:L(sk({size:l}),e),...c,children:V.map(U=>{let N=Math.max(0,Math.min(1,w-(U-1))),$=U-.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:_(!1)}),d("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-[rgb(var(--rating-star-rgb))]",style:{width:`${N*100}%`},children:_(!0)}),!n&&s==="half"&&P(Ve,{children:[d("button",{type:"button",role:"radio",id:M($),"aria-checked":y===$,"aria-label":`${$} stars`,tabIndex:-1,onClick:()=>I($),onMouseEnter:()=>R($),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),d("button",{type:"button",role:"radio",id:M(U),"aria-checked":y===U,"aria-label":`${U} stars`,tabIndex:-1,onClick:()=>I(U),onMouseEnter:()=>R(U),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",id:M(U),"aria-checked":y===U,"aria-label":`${U} ${U===1?"star":"stars"}`,tabIndex:-1,onClick:()=>I(U),onMouseEnter:()=>R(U),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},U)})})});ik.displayName="Rating";O();var lk=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"}}),l3={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},uk=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",l3[t??"md"]),style:{animationDelay:`${s*.15}s`}},s))}):d("span",{className:L(lk({size:t})),"aria-hidden":"true"}),d("span",{className:"sr-only",children:r})]}));uk.displayName="Spinner";O();var ck=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}}),dk=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(!Le(c)||c.type!==Me)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(ck({orientation:t,attached:o}),e),...s,children:u})});dk.displayName="ButtonGroup";O();O();O();var u3=Object.defineProperty,Jt=(e,t)=>u3(e,"name",{value:t,configurable:!0});function c3(e,t){let o=le(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=te(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(c3,"createContext");function pr(e,t=[]){let o=[];function r(n,s){let i=le(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=te(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=>le(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,fk(a,...t)]}Jt(pr,"createContextScope");function fk(...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(fk,"composeContextScopes");O();O();O();var d3=Object.defineProperty,qh=(e,t)=>d3(e,"name",{value:t,configurable:!0});function Wh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}qh(Wh,"setRef");function pk(...e){return t=>{let o=!1,r=e.map(a=>{let n=Wh(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():Wh(e[a],null)}}}}qh(pk,"composeRefs");function eo(...e){return B(pk(...e),e)}qh(eo,"useComposedRefs");var vs=!1;var f3=Object.defineProperty,to=(e,t)=>f3(e,"name",{value:t,configurable:!0}),p3=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";vs&&(!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]=mk(n,a))}return{...e,...o}},"mergeProps");function mk(...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(mk,"concatAriaDescribedby");var gk=le(p3);gk.displayName="SlotContext";function mr(e){let t=C((o,r)=>{let a=te(gk),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];$h(n)&&typeof jd=="function"&&(n=jd(n._payload)),Ie.forEach(n,h=>{if(xk(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;$h(v)&&typeof jd=="function"&&(v=jd(v._payload)),l=g3(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Ie.count(n)===1&&Le(n)&&(l=n);let f=l?vk(l):void 0,p=eo(r,f);if(!l){if(n||n===0)throw new Error(u?x3(e):v3(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 hk=Symbol.for("radix.slottable");function m3(e){let t=to(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=hk,t}to(m3,"createSlottable");var g3=to((e,t)=>{if("child"in e.props){let o=e.props.child;return Le(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Le(t)?t:null},"getSlottableElementFromSlottable");function vk(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(vk,"getElementRef");function xk(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hk}to(xk,"isSlottable");var h3=Symbol.for("react.lazy");function $h(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===h3&&"_payload"in e&&yk(e._payload)}to($h,"isLazyComponent");function yk(e){return typeof e=="object"&&e!==null&&"then"in e}to(yk,"isPromiseLike");var v3=to(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),x3=to(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),jd=H[" use ".trim().toString()];var y3=Object.defineProperty,b3=(e,t)=>y3(e,"name",{value:t,configurable:!0}),C3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xs=C3.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 w3(e,t){e&&Go(()=>e.dispatchEvent(t))}b3(w3,"dispatchDiscreteCustomEvent");O();var S3=Object.defineProperty,ys=(e,t)=>S3(e,"name",{value:t,configurable:!0}),bk=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zr(e,t,{checkForDefaultPrevented:o=!0}={}){return ys(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ys(Zr,"composeEventHandlers");function R3(e){if(!bk)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ys(R3,"getOwnerWindow");function jh(e){if(!bk)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ys(jh,"getOwnerDocument");function Ck(e,t=!1){let{activeElement:o}=jh(e);if(!o?.nodeName)return null;if(wk(o)&&o.contentDocument)return Ck(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=jh(o).getElementById(r);if(a)return a}}return o}ys(Ck,"getActiveElement");function wk(e){return e.tagName==="IFRAME"}ys(wk,"isFrame");O();O();var I3=Object.defineProperty,ut=(e,t)=>I3(e,"name",{value:t,configurable:!0});function Yh(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 B(()=>{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(Yh,"createCollection");var Sk=new WeakMap,Kh=class Qr extends Map{static{ut(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],Sk.set(this,!0)}set(t,o){return Sk.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=Zh(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=Rk(e,t);return o===-1?void 0:e[o]}ut(Kd,"at");function Rk(e,t){let o=e.length,r=Zh(t),a=r>=0?r:o+r;return a<0||a>=o?-1:a}ut(Rk,"toSafeIndex");function Zh(e){return e!==e||e===0?0:Math.trunc(e)}ut(Zh,"toSafeInteger");function P3(e){let t=e+"CollectionProvider",[o,r]=pr(t),[a,n]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Kh,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),[_,V]=I;return D(()=>{if(!T)return;let U=Lk(()=>{});return U.observe(T,{childList:!0,subtree:!0}),()=>{U.disconnect()}},[T]),d(a,{scope:R,itemMap:_,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),_=eo(R,T,A),V=n(p,w),{setItemMap:U}=V,N=E(S);Ik(N.current,S)||(N.current=S);let $=N.current;return D(()=>{let G=$;return U(z=>M?z.has(M)?z.set(M,{...G,element:M}).toSorted(Xh):(z.set(M,{...G,element:M}),z.toSorted(Xh)):z),()=>{U(z=>!M||!z.has(M)?z:(z.delete(M),new Kh(z)))}},[M,$,U]),d(h,{[m]:"",ref:_,children:I})});g.displayName=p;function v(){return k(new Kh)}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(P3,"createCollection");function Ik(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(Ik,"shallowEqual");function Pk(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ut(Pk,"isElementPreceding");function Xh(e,t){return!e[1].element||!t[1].element?0:Pk(e[1].element,t[1].element)?-1:1}ut(Xh,"sortByDocumentPosition");function Lk(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}ut(Lk,"getChildListObserver");O();O();var Jr=globalThis?.document?ct:()=>{};var L3=Object.defineProperty,T3=(e,t)=>L3(e,"name",{value:t,configurable:!0}),M3=H[" useId ".trim().toString()]||(()=>{}),k3=0;function Qh(e){let[t,o]=k(M3());return Jr(()=>{e||o(r=>r??String(k3++))},[e]),e||(t?`radix-${t}`:"")}T3(Qh,"useId");O();var E3=Object.defineProperty,A3=(e,t)=>E3(e,"name",{value:t,configurable:!0});function Jh(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}A3(Jh,"useCallbackRef");O();O();O();var D3=Object.defineProperty,N3=(e,t)=>D3(e,"name",{value:t,configurable:!0}),Tk=H[" useEffectEvent ".trim().toString()],Mk=H[" useInsertionEffect ".trim().toString()];function ev(e){if(typeof Tk=="function")return Tk(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Mk=="function"?Mk(()=>{t.current=e}):Jr(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}N3(ev,"useEffectEvent");var O3=Object.defineProperty,$l=(e,t)=>O3(e,"name",{value:t,configurable:!0}),F3=H[" useInsertionEffect ".trim().toString()]||Jr;function bs({prop:e,defaultProp:t,onChange:o=$l(()=>{},"onChange"),caller:r}){let[a,n,s]=Ek({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(vs){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=B(c=>{if(i){let f=Ak(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}$l(bs,"useControllableState");function Ek({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return F3(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}$l(Ek,"useUncontrolledState");function Ak(e){return typeof e=="function"}$l(Ak,"isFunction");var kk=Symbol("RADIX:SYNC_STATE");function _3(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=ev(s);if(vs){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===kk)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:kk,state:a})},[a,f.state,l]),[g,p]}$l(_3,"useControllableStateReducer");O();var V3=Object.defineProperty,B3=(e,t)=>V3(e,"name",{value:t,configurable:!0}),H3=le(void 0);function jl(e){let t=te(H3);return e||t||"ltr"}B3(jl,"useDirection");O();O();var U3=Object.defineProperty,ov=(e,t)=>U3(e,"name",{value:t,configurable:!0}),tv=!1;function Dk(){let[e,t]=k(tv);return D(()=>{tv||(tv=!0,t(!0))},[]),e}ov(Dk,"useIsHydrated");var Nk=H[" useSyncExternalStore ".trim().toString()];function Ok(){return()=>{}}ov(Ok,"subscribe");function Fk(){return Nk(Ok,()=>!0,()=>!1)}ov(Fk,"useIsHydratedModern");var _k=typeof Nk=="function"?Fk:Dk;var G3=Object.defineProperty,Ka=(e,t)=>G3(e,"name",{value:t,configurable:!0}),rv="rovingFocusGroup.onEntryFocus",z3={bubbles:!1,cancelable:!0},Xd="RovingFocusGroup",[av,Vk,W3]=Yh(Xd),[q3,nv]=pr(Xd,[W3]),[$3,j3]=q3(Xd),Bk=C(Ka(function(t,o){return d(av.Provider,{scope:t.__scopeRovingFocusGroup,children:d(av.Slot,{scope:t.__scopeRovingFocusGroup,children:d(K3,{...t,ref:o})})})},"RovingFocusGroup")),K3=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=jl(s),[v,x]=bs({prop:i,defaultProp:l??null,onChange:u,caller:Xd}),[y,b]=k(!1),R=Jh(c),w=Vk(r),I=E(!1),[S,T]=k(0);return D(()=>{let M=m.current;if(M)return M.addEventListener(rv,R),()=>M.removeEventListener(rv,R)},[R]),d($3,{scope:r,orientation:a,dir:g,loop:n,currentTabStopId:v,onItemFocus:B(M=>x(M),[x]),onItemShiftTab:B(()=>b(!0),[]),onFocusableItemAdd:B(()=>T(M=>M+1),[]),onFocusableItemRemove:B(()=>T(M=>M-1),[]),children:d(xs.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 _=new CustomEvent(rv,z3);if(M.currentTarget.dispatchEvent(_),!_.defaultPrevented){let V=w().filter(z=>z.focusable),U=V.find(z=>z.active),N=V.find(z=>z.id===v),G=[U,N,...V].filter(Boolean).map(z=>z.ref.current);sv(G,f)}}I.current=!1}),onBlur:Zr(t.onBlur,()=>b(!1))})})},"RovingFocusGroupImpl")),X3="RovingFocusGroupItem",Hk=C(Ka(function(t,o){let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...l}=t,u=Qh(),c=s||u,f=j3(X3,r),p=f.currentTabStopId===c,m=Vk(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f,x=_k();return Jr(()=>{if(!(!x||!a))return h(),()=>g()},[x,a,h,g]),D(()=>{if(!(x||!a))return h(),()=>g()},[x,a,h,g]),d(av.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:d(xs.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=Gk(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?zk(w,I+1):w.slice(I+1)}setTimeout(()=>sv(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})},"RovingFocusGroupItem")),Y3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ka(Uk,"getDirectionAwareKey");function Gk(e,t,o){let r=Uk(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Y3[r]}Ka(Gk,"getFocusIntent");function sv(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}Ka(sv,"focusFirst");function zk(e,t){return e.map((o,r)=>e[(t+r)%e.length])}Ka(zk,"wrapArray");var Q3=Object.defineProperty,ea=(e,t)=>Q3(e,"name",{value:t,configurable:!0}),Cs="ToggleGroup",[qk,SCe]=pr(Cs,[nv]),$k=nv(),jk=C(ea(function(t,o){let{type:r,...a}=t;if(r==="single")return d(J3,{role:"radiogroup",...a,ref:o});if(r==="multiple")return d(e5,{role:"toolbar",...a,ref:o});throw new Error(`Missing prop \`type\` expected on \`${Cs}\``)},"ToggleGroup")),[Kk,Xk]=qk(Cs),J3=C(ea(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ea(()=>{},"onValueChange"),...s}=t,[i,l]=bs({prop:r,defaultProp:a??"",onChange:n,caller:Cs});return d(Kk,{scope:t.__scopeToggleGroup,type:"single",value:Z(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:B(()=>l(""),[l]),children:d(Yk,{...s,ref:o})})},"ToggleGroupImplSingle")),e5=C(ea(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ea(()=>{},"onValueChange"),...s}=t,[i,l]=bs({prop:r,defaultProp:a??[],onChange:n,caller:Cs}),u=B(f=>l((p=[])=>[...p,f]),[l]),c=B(f=>l((p=[])=>p.filter(m=>m!==f)),[l]);return d(Kk,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:c,children:d(Yk,{...s,ref:o})})},"ToggleGroupImplMultiple")),[t5,o5]=qk(Cs),Yk=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=jl(i),p={dir:f,...u};return d(t5,{scope:r,rovingFocus:n,disabled:a,children:n?d(Bk,{asChild:!0,...c,orientation:s,dir:f,loop:l,children:d(xs.div,{...p,ref:o})}):d(xs.div,{...p,ref:o})})},"ToggleGroupImpl")),iv="ToggleGroupItem",Zk=C(ea(function(t,o){let r=Xk(iv,t.__scopeToggleGroup),a=o5(iv,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(Hk,{asChild:!0,...n,focusable:!i,active:s,ref:u,children:d(Wk,{...l,ref:o})}):d(Wk,{...l,ref:o})},"ToggleGroupItem")),Wk=C(ea(function(t,o){let{__scopeToggleGroup:r,value:a,...n}=t,s=Xk(iv,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return d(Vl,{...l,...n,ref:o,onPressedChange:u=>{u?s.onItemActivate(a):s.onItemDeactivate(a)}})},"ToggleGroupItemImpl"));var Qk=le({size:"md",variant:"default"}),Jk=C(({className:e,variant:t,size:o,children:r,...a},n)=>d(jk,{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(Qk.Provider,{value:{variant:t,size:o},children:r})}));Jk.displayName="ToggleGroup";var eE=C(({className:e,children:t,variant:o,size:r,...a},n)=>{let s=te(Qk);return d(Zk,{ref:n,className:L(Vd({variant:s.variant??o,size:s.size??r}),e),...a,children:t})});eE.displayName="ToggleGroupItem";export{UD as Accordion,tx as AccordionContent,Jv as AccordionItem,ex as AccordionTrigger,ax as Alert,sx as AlertDescription,nx as AlertTitle,ix as AspectRatio,bf as Avatar,Cf as AvatarFallback,wx as AvatarGroup,Cx as AvatarImage,Lt as Badge,Ix as Breadcrumb,wf as BreadcrumbEllipsis,Lx as BreadcrumbItem,Mx as BreadcrumbLink,Px as BreadcrumbList,kx as BreadcrumbPage,Tx as BreadcrumbSeparator,Me as Button,dk as ButtonGroup,$C as Card,Aw as CardCVCInput,YC as CardContent,XC as CardDescription,Ew as CardExpiryInput,ZC as CardFooter,jC as CardHeader,kw as CardNumberInput,KC as CardTitle,Dw as CardZipInput,Ww as Carousel,$w as CarouselContent,Kw as CarouselItem,Yw as CarouselNext,Xw as CarouselPrevious,Up as Checkbox,rS as CheckboxGroup,Ac as CheckboxLabel,aS as CheckboxWithLabel,lF as Collapsible,iS as CollapsibleContent,sS as CollapsibleTrigger,Pm as ColorPicker,Gm as Command,cB as CommandDialog,gI as CommandEmpty,hI as CommandGroup,pI as CommandInput,xI as CommandItem,mI as CommandList,vI as CommandSeparator,yI as CommandShortcut,ig as DatePicker,HI as DateRangePicker,UI as DateTimePicker,Bm as Dialog,sB as DialogClose,ud as DialogContent,Um as DialogDescription,dI as DialogFooter,fI as DialogForm,Hm as DialogHeader,Cl as DialogTitle,aB as DialogTrigger,lH as DraggableList,JP as DropdownMenu,nL as DropdownMenuCheckboxItem,rL as DropdownMenuContent,tU as DropdownMenuGroup,aL as DropdownMenuItem,iL as DropdownMenuLabel,oU as DropdownMenuPortal,aU as DropdownMenuRadioGroup,sL as DropdownMenuRadioItem,lL as DropdownMenuSeparator,uL as DropdownMenuShortcut,rU as DropdownMenuSub,oL as DropdownMenuSubContent,tL as DropdownMenuSubTrigger,eU as DropdownMenuTrigger,cL as FileUpload,kU as FreeBadge,dL as GestureDrawer,Xge as GitHubStarButton,dU as GitHubStars,IV as GradientPicker,xt as Input,hL as InputOTP,vL as InputOTPGroup,bL as InputOTPSeparator,yL as InputOTPSlot,nk as Kbd,Et as Label,CL as LockedComponent,GI as MonthPicker,Eg as MoonLogo,vhe as MoonLogoAnimated,hhe as MoonLogoIcon,UD as MoonUIAccordion,tx as MoonUIAccordionContent,Jv as MoonUIAccordionItem,ex as MoonUIAccordionTrigger,ax as MoonUIAlert,sx as MoonUIAlertDescription,nx as MoonUIAlertTitle,ix as MoonUIAspectRatio,bf as MoonUIAvatar,Cf as MoonUIAvatarFallback,wx as MoonUIAvatarGroup,Cx as MoonUIAvatarImage,Lt as MoonUIBadge,Ix as MoonUIBreadcrumb,wf as MoonUIBreadcrumbEllipsis,Lx as MoonUIBreadcrumbItem,Mx as MoonUIBreadcrumbLink,Px as MoonUIBreadcrumbList,kx as MoonUIBreadcrumbPage,Tx as MoonUIBreadcrumbSeparator,Me as MoonUIButton,dk as MoonUIButtonGroup,Qi as MoonUICalendar,$C as MoonUICard,Aw as MoonUICardCVCInput,YC as MoonUICardContent,XC as MoonUICardDescription,Ew as MoonUICardExpiryInput,ZC as MoonUICardFooter,jC as MoonUICardHeader,kw as MoonUICardNumberInput,KC as MoonUICardTitle,Dw as MoonUICardZipInput,Ww as MoonUICarousel,$w as MoonUICarouselContent,Kw as MoonUICarouselItem,Yw as MoonUICarouselNext,Xw as MoonUICarouselPrevious,Up as MoonUICheckbox,rS as MoonUICheckboxGroup,Ac as MoonUICheckboxLabel,aS as MoonUICheckboxWithLabel,lF as MoonUICollapsible,iS as MoonUICollapsibleContent,sS as MoonUICollapsibleTrigger,Pm as MoonUIColorPicker,Gm as MoonUICommand,cB as MoonUICommandDialog,gI as MoonUICommandEmpty,hI as MoonUICommandGroup,pI as MoonUICommandInput,xI as MoonUICommandItem,mI as MoonUICommandList,vI as MoonUICommandSeparator,yI as MoonUICommandShortcut,nH as MoonUIDataTableBasic,ig as MoonUIDatePicker,HI as MoonUIDateRangePicker,UI as MoonUIDateTimePicker,Bm as MoonUIDialog,sB as MoonUIDialogClose,ud as MoonUIDialogContent,Um as MoonUIDialogDescription,dI as MoonUIDialogFooter,fI as MoonUIDialogForm,Hm as MoonUIDialogHeader,Cl as MoonUIDialogTitle,aB as MoonUIDialogTrigger,lH as MoonUIDraggableList,JP as MoonUIDropdownMenu,nL as MoonUIDropdownMenuCheckboxItem,rL as MoonUIDropdownMenuContent,tU as MoonUIDropdownMenuGroup,aL as MoonUIDropdownMenuItem,iL as MoonUIDropdownMenuLabel,oU as MoonUIDropdownMenuPortal,aU as MoonUIDropdownMenuRadioGroup,sL as MoonUIDropdownMenuRadioItem,lL as MoonUIDropdownMenuSeparator,uL as MoonUIDropdownMenuShortcut,rU as MoonUIDropdownMenuSub,oL as MoonUIDropdownMenuSubContent,tL as MoonUIDropdownMenuSubTrigger,eU as MoonUIDropdownMenuTrigger,cL as MoonUIFileUpload,kU as MoonUIFreeBadge,dL as MoonUIGestureDrawer,dU as MoonUIGitHubStars,IV as MoonUIGradientPicker,xt as MoonUIInput,hL as MoonUIInputOTP,vL as MoonUIInputOTPGroup,bL as MoonUIInputOTPSeparator,yL as MoonUIInputOTPSlot,nk as MoonUIKbd,Et as MoonUILabel,CL as MoonUILockedComponent,GI as MoonUIMonthPicker,Eg as MoonUIMoonLogo,wL as MoonUIPagination,SL as MoonUIPaginationContent,TL as MoonUIPaginationEllipsis,RL as MoonUIPaginationItem,Id as MoonUIPaginationLink,LL as MoonUIPaginationNext,PL as MoonUIPaginationPrevious,hT as MoonUIPhoneInput,Bo as MoonUIPopover,tV as MoonUIPopoverAnchor,oV as MoonUIPopoverClose,Ho as MoonUIPopoverContent,p0 as MoonUIPopoverFooter,f0 as MoonUIPopoverHeader,d0 as MoonUIPopoverSeparator,ur as MoonUIPopoverTrigger,MU as MoonUIProBadge,TU as MoonUIProComponentWrapper,Sd as MoonUIProgress,xT as MoonUIRadioGroup,Xg as MoonUIRadioGroupItem,yT as MoonUIRadioItemWithLabel,Yg as MoonUIRadioLabel,ik as MoonUIRating,nG as MoonUIRichTextEditor,UT as MoonUIScrollArea,oh as MoonUIScrollBar,WT as MoonUIScrollReveal,qT as MoonUIScrollRevealContainer,$T as MoonUIScrollRevealItem,ls as MoonUISelect,cs as MoonUISelectContent,eG as MoonUISelectGroup,Rt as MoonUISelectItem,pT as MoonUISelectLabel,Kg as MoonUISelectScrollDownButton,jg as MoonUISelectScrollUpButton,mT as MoonUISelectSeparator,us as MoonUISelectTrigger,Nl as MoonUISelectValue,Zt as MoonUISeparator,RV as MoonUISimpleColorPicker,IM as MoonUISimpleEditor,RM as MoonUISimpleTooltip,Yr as MoonUISkeleton,Sh as MoonUISkeletonAvatar,LM as MoonUISkeletonCard,wh as MoonUISkeletonText,cr as MoonUISlider,uk as MoonUISpinner,TM as MoonUISwipeableCard,OM as MoonUISwitch,gd as MoonUITable,vd as MoonUITableBody,BI as MoonUITableCaption,Rl as MoonUITableCell,VI as MoonUITableFooter,xd as MoonUITableHead,hd as MoonUITableHeader,ss as MoonUITableRow,od as MoonUITabs,rs as MoonUITabsContent,rd as MoonUITabsList,os as MoonUITabsTrigger,FM as MoonUITagsInput,_M as MoonUITextarea,Hh as MoonUIToast,tk as MoonUIToastAction,Uh as MoonUIToastClose,zh as MoonUIToastDescription,ek as MoonUIToastProvider,Gh as MoonUIToastTitle,Bh as MoonUIToastViewport,s3 as MoonUIToaster,Bd as MoonUIToggle,Jk as MoonUIToggleGroup,eE as MoonUIToggleGroupItem,Ul as MoonUITooltip,Ch as MoonUITooltipArrow,zl as MoonUITooltipContent,bh as MoonUITooltipProvider,Gl as MoonUITooltipTrigger,wL as Pagination,SL as PaginationContent,TL as PaginationEllipsis,RL as PaginationItem,Id as PaginationLink,LL as PaginationNext,PL as PaginationPrevious,nn as Palette,hT as PhoneInput,ru as Pipette,Bo as Popover,tV as PopoverAnchor,oV as PopoverClose,Ho as PopoverContent,p0 as PopoverFooter,f0 as PopoverHeader,d0 as PopoverSeparator,ur as PopoverTrigger,MU as ProBadge,TU as ProComponentWrapper,Sd as Progress,PU as REGEXP_ONLY_CHARS,IU as REGEXP_ONLY_DIGITS,LU as REGEXP_ONLY_DIGITS_AND_CHARS,xT as RadioGroup,Xg as RadioGroupItem,yT as RadioItemWithLabel,Yg as RadioLabel,ik as Rating,nG as RichTextEditor,UT as ScrollArea,oh as ScrollBar,WT as ScrollReveal,qT as ScrollRevealContainer,$T as ScrollRevealItem,ls as Select,cs as SelectContent,eG as SelectGroup,Rt as SelectItem,pT as SelectLabel,Kg as SelectScrollDownButton,jg as SelectScrollUpButton,mT as SelectSeparator,us as SelectTrigger,Nl as SelectValue,Zt as Separator,RV as SimpleColorPicker,IM as SimpleEditor,RM as SimpleTooltip,Yr as Skeleton,Sh as SkeletonAvatar,LM as SkeletonCard,wh as SkeletonText,cr as Slider,uk as Spinner,TM as SwipeableCard,OM as Switch,gd as Table,vd as TableBody,BI as TableCaption,Rl as TableCell,VI as TableFooter,xd as TableHead,hd as TableHeader,ss as TableRow,od as Tabs,rs as TabsContent,rd as TabsList,os as TabsTrigger,FM as TagsInput,_M as Textarea,Hh as Toast,tk as ToastAction,Uh as ToastClose,zh as ToastDescription,ek as ToastProvider,Gh as ToastTitle,Bh as ToastViewport,s3 as Toaster,Bd as Toggle,Jk as ToggleGroup,eE as ToggleGroupItem,Ul as Tooltip,Ch as TooltipArrow,zl as TooltipContent,bh as TooltipProvider,Gl as TooltipTrigger,zD as aspectRatioVariants,Sx as badgeVariants,n1 as breadcrumbVariants,ck as buttonGroupVariants,nu as buttonVariants,DO as cardVariants,qw as carouselContentVariants,jw as carouselItemVariants,L as cn,uF as collapsibleContentVariants,nS as collapsibleTriggerVariants,go as format,xL as inputOTPSlotVariants,ak as kbdVariants,Sx as moonUIBadgeVariants,ck as moonUIButtonGroupVariants,nu as moonUIButtonVariants,qw as moonUICarouselContentVariants,jw as moonUICarouselItemVariants,sH as moonUICreateSortableHeader,xL as moonUIInputOTPSlotVariants,ak as moonUIKbdVariants,i0 as moonUIPopoverContentVariants,sk as moonUIRatingVariants,XT as moonUISeparatorVariants,PM as moonUISkeletonVariants,lk as moonUISpinnerVariants,Vd as moonUIToggleVariants,wM as moonUITooltipVariants,i0 as popoverContentVariants,nU as progressVariants,sk as ratingVariants,XT as separatorVariants,PM as skeletonVariants,lk as spinnerVariants,Nz as switchVariants,hV as tabsListVariants,vV as tabsTriggerVariants,ok as toast,Vd as toggleVariants,wM as tooltipVariants,sl as useCarousel,rk as useToast};
79
+ }`,IU="^\\d+$",PU="^[a-zA-Z]+$",LU="^[a-zA-Z0-9]+$";var hL=C(({className:e,containerClassName:t,...o},r)=>d(kg,{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}));hL.displayName="InputOTP";var vL=C(({className:e,...t},o)=>d("div",{ref:o,className:L("flex items-center",e),...t}));vL.displayName="InputOTPGroup";var xL=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}}),yL=C(({index:e,className:t,...o},r)=>{let n=te(Mg)?.slots?.[e],s=n?.char,i=n?.hasFakeCaret,l=n?.isActive;return P("div",{ref:r,"data-active":l?"":void 0,className:L(xL({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"})})]})});yL.displayName="InputOTPSlot";var bL=C(({className:e,...t},o)=>d("div",{ref:o,role:"separator",className:L("text-muted-foreground",e),...t,children:d(Us,{"aria-hidden":"true"})}));bL.displayName="InputOTPSeparator";O();function CL({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(on,{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(an,{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(Me,{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(sn,{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 TU({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(an,{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(sn,{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(Me,{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(CL,{componentName:o||t,className:r,children:a||e})}return d("div",{className:r,children:e})}function MU({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(on,{className:"w-3 h-3 mr-1"}),"PRO"]})}function kU({className:e}){return d(Lt,{variant:"outline",className:L("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}O();function Eg({className:e,variant:t="default",showText:o=!0,...r}){let a=Ge(),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 hhe({className:e,variant:t="default",...o}){return d(Eg,{showText:!1,className:e,variant:t,...o})}function vhe({className:e,variant:t="default",showText:o=!0,...r}){return d(Eg,{className:L("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}O();var wL=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}));wL.displayName="Pagination";var SL=C(({className:e,...t},o)=>d("ul",{ref:o,className:L("moonui-theme","flex flex-row items-center gap-1",e),...t}));SL.displayName="PaginationContent";var RL=C(({className:e,...t},o)=>d("li",{ref:o,className:L("moonui-theme","",e),...t}));RL.displayName="PaginationItem";var Id=C(({className:e,isActive:t,size:o="icon",...r},a)=>d("a",{ref:a,"aria-current":t?"page":void 0,className:L(nu({variant:t?"outline":"ghost",size:o}),e),...r}));Id.displayName="PaginationLink";var IL="hidden sm:inline",PL=C(({className:e,...t},o)=>P(Id,{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:IL,children:"Previous"})]}));PL.displayName="PaginationPrevious";var LL=C(({className:e,...t},o)=>P(Id,{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:IL,children:"Next"}),d(wt,{className:"h-4 w-4"})]}));LL.displayName="PaginationNext";var TL=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"})]}));TL.displayName="PaginationEllipsis";O();O();O();function Ag(e,[t,o]){return Math.min(o,Math.max(t,e))}O();var Dg=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"}),EU="VisuallyHidden",Al=C((e,t)=>d(Y.span,{...e,ref:t,style:{...Dg,...e.style}}));Al.displayName=EU;var ML=Al;var DU=[" ","Enter","ArrowUp","ArrowDown"],NU=[" ","Enter"],$a="Select",[Ld,Td,OU]=Lo($a),[is,Zhe]=Ee($a,[OU,Kt]),Md=Kt(),[FU,$r]=is($a),[_U,VU]=is($a),kL=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=Md(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}),_=E(null),V=v?h||!!v.closest("form"):!0,[U,N]=k(new Set),$=Array.from(U).map(G=>G.props.value).join(";");return d(sr,{...g,children:P(FU,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:R,onValueNodeHasChildrenChange:w,contentId:Te(),value:M,onValueChange:A,open:S,onOpenChange:T,dir:I,triggerPointerDownPosRef:_,disabled:p,children:[d(Ld.Provider,{scope:t,children:d(_U,{scope:e.__scopeSelect,onNativeOptionAdd:B(G=>{N(z=>new Set(z).add(G))},[]),onNativeOptionRemove:B(G=>{N(z=>{let F=new Set(z);return F.delete(G),F})},[]),children:o})}),V?P(tT,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:f,value:M,onChange:G=>A(G.target.value),disabled:p,form:h,children:[M===void 0?d("option",{value:""}):null,Array.from(U)]},$):null]})})};kL.displayName=$a;var EL="SelectTrigger",AL=C((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Md(o),s=$r(EL,o),i=s.disabled||r,l=pe(t,s.onTriggerChange),u=Td(o),c=E("touch"),[f,p,m]=rT(g=>{let v=u().filter(b=>!b.disabled),x=v.find(b=>b.value===s.value),y=aT(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(ir,{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":oT(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===" ")&&DU.includes(g.key)&&(h(),g.preventDefault())})})})});AL.displayName=EL;var DL="SelectValue",NL=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=$r(DL,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:oT(l.value)?d(Ve,{children:s}):n})});NL.displayName=DL;var BU="SelectIcon",OL=C((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return d(Y.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});OL.displayName=BU;var HU="SelectPortal",FL=e=>d(Vt,{asChild:!0,...e});FL.displayName=HU;var ja="SelectContent",_L=C((e,t)=>{let o=$r(ja,e.__scopeSelect),[r,a]=k();if(Ae(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?Ls(d(VL,{scope:e.__scopeSelect,children:d(Ld.Slot,{scope:e.__scopeSelect,children:d("div",{children:e.children})})}),n):null}return d(BL,{...e,ref:t})});_L.displayName=ja;var So=10,[VL,jr]=is(ja),UU="SelectContentImpl",GU=It("SelectContent.RemoveScroll"),BL=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,_]=k(null),V=Td(o),[U,N]=k(!1),$=E(!1);D(()=>{if(b)return Br(b)},[b]),Or();let G=B(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]),z=B(()=>G([T,b]),[G,T,b]);D(()=>{U&&z()},[U,z]);let{onOpenChange:F,triggerPointerDownPosRef:q}=y;D(()=>{if(b){let K={x:0,y:0},ie=ye=>{K={x:Math.abs(Math.round(ye.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(q.current?.y??0))}},xe=ye=>{K.x<=10&&K.y<=10?ye.preventDefault():b.contains(ye.target)||F(!1),document.removeEventListener("pointermove",ie),q.current=null};return q.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,F,q]),D(()=>{let K=()=>F(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[F]);let[ce,se]=rT(K=>{let ie=V().filter(ge=>!ge.disabled),xe=ie.find(ge=>ge.ref.current===document.activeElement),ye=aT(ie,K,xe);ye&&setTimeout(()=>ye.ref.current.focus())}),W=B((K,ie,xe)=>{let ye=!$.current&&!xe;(y.value!==void 0&&y.value===ie||ye)&&(M(K),ye&&($.current=!0))},[y.value]),re=B(()=>b?.focus(),[b]),ne=B((K,ie,xe)=>{let ye=!$.current&&!xe;(y.value!==void 0&&y.value===ie||ye)&&_(K)},[y.value]),ee=r==="popper"?Ng:HL,fe=ee===Ng?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:v}:{};return d(VL,{scope:o,content:b,viewport:w,onViewportChange:I,itemRefCallback:W,selectedItem:T,onItemLeave:re,itemTextRefCallback:ne,focusSelectedItem:z,selectedItemText:A,position:r,isPositioned:U,searchRef:ce,children:d(lr,{as:GU,allowPinchZoom:!0,children:d(ar,{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:()=>N(!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&&se(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(()=>G(ye)),K.preventDefault()}})})})})})})});BL.displayName=UU;var zU="SelectItemAlignedPosition",HL=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=Td(o),m=E(!1),h=E(!0),{viewport:g,selectedItem:v,selectedItemText:x,focusSelectedItem:y}=s,b=B(()=>{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,ae=S.width+be,ue=Math.max(ae,T.width),Oe=window.innerWidth-So,Ue=Ag(J,[So,Math.max(So,Oe-ue)]);i.style.minWidth=ae+"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,ae=S.width+be,ue=Math.max(ae,T.width),Oe=window.innerWidth-So,Ue=Ag(J,[So,Math.max(So,Oe-ue)]);i.style.minWidth=ae+"px",i.style.right=Ue+"px"}let _=p(),V=window.innerHeight-So*2,U=g.scrollHeight,N=window.getComputedStyle(u),$=parseInt(N.borderTopWidth,10),G=parseInt(N.paddingTop,10),z=parseInt(N.borderBottomWidth,10),F=parseInt(N.paddingBottom,10),q=$+G+U+F+z,ce=Math.min(v.offsetHeight*5,q),se=window.getComputedStyle(g),W=parseInt(se.paddingTop,10),re=parseInt(se.paddingBottom,10),ne=S.top+S.height/2-So,ee=V-ne,fe=v.offsetHeight/2,K=v.offsetTop+fe,ie=$+G+K,xe=q-ie;if(ie<=ne){let ge=_.length>0&&v===_[_.length-1].ref.current;i.style.bottom="0px";let J=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(ee,fe+(ge?re:0)+J+z),ae=ie+be;i.style.height=ae+"px"}else{let ge=_.length>0&&v===_[0].ref.current;i.style.top="0px";let be=Math.max(ne,$+g.offsetTop+(ge?W:0)+fe)+xe;i.style.height=be+"px",g.scrollTop=ie-ne+g.offsetTop}i.style.margin=`${So}px 0`,i.style.minHeight=ce+"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=B(S=>{S&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return d(qU,{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}})})})});HL.displayName=zU;var WU="SelectPopperPosition",Ng=C((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=So,...n}=e,s=Md(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)"}})});Ng.displayName=WU;var[qU,Bg]=is(ja,{}),Og="SelectViewport",UL=C((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=jr(Og,o),s=Bg(Og,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(Ld.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})})})]})});UL.displayName=Og;var GL="SelectGroup",[$U,jU]=is(GL),zL=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Te();return d($U,{scope:o,id:a,children:d(Y.div,{role:"group","aria-labelledby":a,...r,ref:t})})});zL.displayName=GL;var WL="SelectLabel",qL=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=jU(WL,o);return d(Y.div,{id:a.id,...r,ref:t})});qL.displayName=WL;var Pd="SelectItem",[KU,$L]=is(Pd),jL=C((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=$r(Pd,o),l=jr(Pd,o),u=i.value===r,[c,f]=k(n??""),[p,m]=k(!1),h=pe(t,y=>l.itemRefCallback?.(y,r,a)),g=Te(),v=E("touch"),x=()=>{a||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d(KU,{scope:o,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:B(y=>{f(b=>b||(y?.textContent??"").trim())},[]),children:d(Ld.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===" "||(NU.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});jL.displayName=Pd;var Dl="SelectItemText",KL=C((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=$r(Dl,o),i=jr(Dl,o),l=$L(Dl,o),u=VU(Dl,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?Ls(n.children,s.valueNode):null]})});KL.displayName=Dl;var XL="SelectItemIndicator",YL=C((e,t)=>{let{__scopeSelect:o,...r}=e;return $L(XL,o).isSelected?d(Y.span,{"aria-hidden":!0,...r,ref:t}):null});YL.displayName=XL;var Fg="SelectScrollUpButton",ZL=C((e,t)=>{let o=jr(Fg,e.__scopeSelect),r=Bg(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.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(JL,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});ZL.displayName=Fg;var _g="SelectScrollDownButton",QL=C((e,t)=>{let o=jr(_g,e.__scopeSelect),r=Bg(_g,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(JL,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});QL.displayName=_g;var JL=C((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=jr("SelectScrollButton",o),s=E(null),i=Td(o),l=B(()=>{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()})})}),XU="SelectSeparator",eT=C((e,t)=>{let{__scopeSelect:o,...r}=e;return d(Y.div,{"aria-hidden":!0,...r,ref:t})});eT.displayName=XU;var Vg="SelectArrow",YU=C((e,t)=>{let{__scopeSelect:o,...r}=e,a=Md(o),n=$r(Vg,o),s=jr(Vg,o);return n.open&&s.position==="popper"?d(Vr,{...a,...r,ref:t}):null});YU.displayName=Vg;var ZU="SelectBubbleInput",tT=C(({__scopeSelect:e,value:t,...o},r)=>{let a=E(null),n=pe(r,a),s=$n(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:{...Dg,...o.style},ref:n,defaultValue:t})});tT.displayName=ZU;function oT(e){return e===""||e===void 0}function rT(e){let t=We(e),o=E(""),r=E(0),a=B(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=B(()=>{o.current="",window.clearTimeout(r.current)},[]);return D(()=>()=>window.clearTimeout(r.current),[]),[o,a,n]}function aT(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=QU(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 QU(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var nT=kL,Hg=AL,sT=NL,iT=OL,lT=FL,Ug=_L,uT=UL,cT=zL,Gg=qL,zg=jL,dT=KL,fT=YL,Wg=ZL,qg=QL,$g=eT;var ls=nT;ls.displayName="Select";var eG=cT,Nl=sT,tG=Q(["flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),us=C(({className:e,children:t,variant:o,size:r,error:a,success:n,loading:s,leftIcon:i,rightIcon:l,...u},c)=>{let f=Ge(),p=u["aria-label"]!=null||u["aria-labelledby"]!=null;return P(Hg,{ref:c,className:L(tG({variant:o,size:r,state:a?"error":n?"success":"none"}),e),...u,disabled:u.disabled||s,"aria-invalid":a?!0:void 0,"data-error":a?!0:void 0,"data-success":n?!0:void 0,"data-loading":s?!0:void 0,"aria-labelledby":p?u["aria-labelledby"]:f,children:[P("div",{id:f,className:"flex items-center flex-1 gap-2",children:[i&&d("span",{className:"flex items-center justify-center text-muted-foreground",children:i}),s?P("div",{className:"flex items-center gap-2",children:[d(ot,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),d("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!s&&d(iT,{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"})})]})});us.displayName=Hg.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(Fs,{className:"h-4 w-4"})}));jg.displayName=Wg.displayName;var Kg=C(({className:e,...t},o)=>d(qg,{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"})}));Kg.displayName=qg.displayName;var cs=C(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>d(lT,{children:P(Ug,{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(jg,{}),d(uT,{className:L("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d(Kg,{})]})}));cs.displayName=Ug.displayName;var pT=C(({className:e,...t},o)=>d(Gg,{ref:o,className:L("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));pT.displayName=Gg.displayName;var Rt=C(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>P(zg,{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-destructive-subtle-foreground focus:bg-destructive-subtle focus:text-destructive-subtle-foreground",o==="success"&&"text-success-subtle-foreground focus:bg-success-subtle focus:text-success-subtle-foreground",o==="warning"&&"text-warning-700 dark:text-warning-500 focus:bg-warning/10 focus:text-warning-700 dark:focus:text-warning-500",e),...s,children:[d("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d(fT,{children:n||d(pt,{className:"h-4 w-4"})})}),d(dT,{children:t}),a&&d("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));Rt.displayName=zg.displayName;var mT=C(({className:e,...t},o)=>d($g,{ref:o,className:L("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));mT.displayName=$g.displayName;var oG=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],gT=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let a=0;a<o.length;a++)a>0&&a%3===0&&(r+=" "),r+=o[a];return r}},rG=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},hT=C(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=oG,size:i,...l},u)=>{let[c,f]=k(r),[p,m]=k(t),h=s.find(y=>y.code===c)||s[0],g=y=>{let b=y.target.value.replace(/\D/g,""),R=rG(c),w=b.slice(0,R),I=gT(w,c);m(w),o?.(w,c),y.target.value=I},v=y=>{f(y),o?.(p,y)},x=gT(p,c);return P("div",{className:L("relative flex gap-2",e),children:[n&&P(ls,{value:c,onValueChange:v,children:[d(us,{className:"w-[120px]",children:d(Nl,{children:P("div",{className:"flex items-center gap-2",children:[d("span",{children:h.flag}),d("span",{children:h.code})]})})}),d(cs,{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(Qs,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});hT.displayName="PhoneInput";O();var aG=Q("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6",default:"h-4 w-4"}},defaultVariants:{variant:"default",size:"md"}}),vT=le({}),xT=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=B(m=>{c||u(m),r?.(m)},[c,r]);return d(vT.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})})});xT.displayName="RadioGroup";var Xg=C(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=te(vT),c=Ge(),f=a||c,p=u.value===n,m=h=>{u.onValueChange&&u.onValueChange(h.target.value),i.onChange&&i.onChange(h)};return P("div",{className:"relative flex items-center",children:[d("input",{type:"radio",id:f,ref:l,value:n,checked:p,disabled:s||u.disabled,name:u.name,onChange:m,className:"peer sr-only",...i}),d("label",{htmlFor:f,className:L(aG({variant:t,size:o}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",s&&"cursor-not-allowed opacity-50",e),children:d("span",{className:L("absolute inset-0 pointer-events-none",p&&"flex items-center justify-center"),children:p&&(r||d(na,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Xg.displayName="RadioGroupItem";var Yg=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}));Yg.displayName="RadioLabel";var yT=C(({id:e,label:t,labelClassName:o,...r},a)=>{let n=Ge(),s=e||n;return P("div",{className:"flex items-center",children:[d(Xg,{ref:a,id:s,...r}),d(Yg,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});yT.displayName="RadioItemWithLabel";function nG({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")})]})}O();O();O();O();O();function bT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sG(...e){return t=>{let o=!1,r=e.map(a=>{let n=bT(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():bT(e[a],null)}}}}function fr(...e){return B(sG(...e),e)}function wT(e){let t=C((o,r)=>{let{children:a,...n}=o,s=null,i=!1,l=[];CT(a)&&typeof kd=="function"&&(a=kd(a._payload)),Ie.forEach(a,p=>{if(dG(p)){i=!0;let m=p,h="child"in m.props?m.props.child:m.props.children;CT(h)&&typeof kd=="function"&&(h=kd(h._payload)),s=lG(m,h),l.push(s?.props?.children)}else l.push(p)}),s?s=Fe(s,void 0,l):!i&&Ie.count(a)===1&&Le(a)&&(s=a);let u=s?cG(s):void 0,c=fr(r,u);if(!s){if(a||a===0)throw new Error(i?gG(e):mG(e));return a}let f=uG(n,s.props??{});return s.type!==Je&&(f.ref=r?c:u),Fe(s,f)});return t.displayName=`${e}.Slot`,t}var iG=Symbol.for("radix.slottable");var lG=(e,t)=>{if("child"in e.props){let o=e.props.child;return Le(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Le(t)?t:null};function uG(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 cG(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 dG(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iG}var fG=Symbol.for("react.lazy");function CT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fG&&"_payload"in e&&pG(e._payload)}function pG(e){return typeof e=="object"&&e!==null&&"then"in e}var mG=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,gG=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kd=H[" use ".trim().toString()];var hG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ds=hG.reduce((e,t)=>{let o=wT(`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}},{});O();O();var Ol=globalThis?.document?ct:()=>{};O();function vG(e,t){return Gt((o,r)=>t[o][r]??o,e)}var fs=e=>{let{present:t,children:o}=e,r=xG(t),a=typeof o=="function"?o({present:r.isPresent}):Ie.only(o),n=yG(r.ref,bG(a));return typeof o=="function"||r.isPresent?Fe(a,{ref:n}):null};fs.displayName="Presence";function xG(e){let[t,o]=k(),r=E(null),a=E(e),n=E("none"),s=E(void 0),i=e?"mounted":"unmounted",[l,u]=vG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D(()=>{l==="mounted"?(n.current=s.current??Fl(r.current),s.current=void 0):n.current="none"},[l]),Ol(()=>{let c=r.current,f=a.current;if(f!==e){let m=n.current,h=Fl(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]),Ol(()=>{if(t){let c,f=t.ownerDocument.defaultView??window,p=h=>{let v=Fl(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=Fl(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:B(c=>{if(c){let f=getComputedStyle(c);r.current=f,s.current=Fl(f)}else r.current=null;o(c)},[])}}function ST(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yG(...e){let t=E(e);return t.current=e,B(o=>{let r=t.current,a=!1,n=r.map(s=>{let i=ST(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():ST(r[s],null)}}},[])}function Fl(e){return e?.animationName||"none"}function bG(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)}O();function RT(e,t=[]){let o=[];function r(n,s){let i=le(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=te(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=>le(s));return function(i){let l=i?.[e]||n;return Z(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,CG(a,...t)]}function CG(...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}O();function Kr(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}O();var wG=le(void 0);function IT(e){let t=te(wG);return e||t||"ltr"}function PT(e,[t,o]){return Math.min(o,Math.max(t,e))}var Ave=!!(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)}}O();function SG(e,t){return Gt((o,r)=>t[o][r]??o,e)}var Zg="ScrollArea",[TT,Wve]=RT(Zg),[RG,Yt]=TT(Zg),MT=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=IT(a);return d(RG,{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(ds.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}})})});MT.displayName=Zg;var kT="ScrollAreaViewport",ET=C((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=Yt(kT,o),i=E(null),l=fr(t,i,s.onViewportChange);return P(Ve,{children:[d(IG,{nonce:a}),d(ds.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})})]})});ET.displayName=kT;var IG=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),Uo="ScrollAreaScrollbar",Dd=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Uo,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(PG,{...r,ref:t,forceMount:o}):a.type==="scroll"?d(LG,{...r,ref:t,forceMount:o}):a.type==="auto"?d(AT,{...r,ref:t,forceMount:o}):a.type==="always"?d(Qg,{...r,ref:t,"data-state":"visible"}):null});Dd.displayName=Uo;var PG=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Uo,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(fs,{present:o||n,children:d(AT,{"data-state":n?"visible":"hidden",...r,ref:t})})}),LG=C((e,t)=>{let{forceMount:o,...r}=e,a=Yt(Uo,e.__scopeScrollArea),n=e.orientation==="horizontal",s=Od(()=>l("SCROLL_END"),100),[i,l]=SG("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(fs,{present:o||i!=="hidden",children:d(Qg,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Xr(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Xr(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),AT=C((e,t)=>{let o=Yt(Uo,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=k(!1),i=e.orientation==="horizontal",l=Od(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return ps(o.viewport,l),ps(o.content,l),d(fs,{present:r||n,children:d(Qg,{"data-state":n?"visible":"hidden",...a,ref:t})})}),Qg=C((e,t)=>{let{orientation:o="vertical",...r}=e,a=Yt(Uo,e.__scopeScrollArea),n=E(null),s=E(0),[i,l]=k({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=FT(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 DG(p,s.current,i,m)}return o==="horizontal"?d(TG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollLeft,m=LT(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(MG,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let p=a.viewport.scrollTop,m=LT(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}),TG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Yt(Uo,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=fr(t,l,n.onScrollbarXChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(NT,{"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":Nd(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),VT(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:Ad(s.paddingLeft),paddingEnd:Ad(s.paddingRight)}})}})}),MG=C((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Yt(Uo,e.__scopeScrollArea),[s,i]=k(),l=E(null),u=fr(t,l,n.onScrollbarYChange);return D(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d(NT,{"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":Nd(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),VT(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:Ad(s.paddingTop),paddingEnd:Ad(s.paddingBottom)}})}})}),[kG,DT]=TT(Uo),NT=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(Uo,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=Od(f,10);function T(M){if(x.current){let A=M.clientX-x.current.left,_=M.clientY-x.current.top;u({x:A,y:_})}}return D(()=>{let M=A=>{let _=A.target;h?.contains(_)&&w(A,R)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[b,h,R,w]),D(I,[r,I]),ps(h,S),ps(m.content,S),d(kG,{scope:o,scrollbar:h,hasThumb:a,onThumbChange:Kr(n),onThumbPointerUp:Kr(s),onThumbPositionChange:I,onThumbPointerDown:Kr(i),children:d(ds.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})})})}),Ed="ScrollAreaThumb",Jg=C((e,t)=>{let{forceMount:o,...r}=e,a=DT(Ed,e.__scopeScrollArea);return d(fs,{present:o||a.hasThumb,children:d(EG,{ref:t,...r})})}),EG=C((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=Yt(Ed,o),s=DT(Ed,o),{onThumbPositionChange:i}=s,l=fr(t,s.onThumbChange),u=E(void 0),c=Od(()=>{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=NG(f,i);u.current=m,i()}};return i(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[n.viewport,c,i]),d(ds.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)})});Jg.displayName=Ed;var eh="ScrollAreaCorner",OT=C((e,t)=>{let o=Yt(eh,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d(AG,{...e,ref:t}):null});OT.displayName=eh;var AG=C((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=Yt(eh,o),[n,s]=k(0),[i,l]=k(0),u=!!(n&&i),{onCornerWidthChange:c,onCornerHeightChange:f}=a;return ps(a.scrollbarX,()=>{let p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),l(p)}),ps(a.scrollbarY,()=>{let p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),s(p)}),D(()=>()=>{c(0),f(0)},[c,f]),u?d(ds.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 Ad(e){return e?parseInt(e,10):0}function FT(e,t){let o=e/t;return isNaN(o)?0:o}function Nd(e){let t=FT(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function DG(e,t,o,r="ltr"){let a=Nd(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 _T([l,u],f)(e)}function LT(e,t,o="ltr"){let r=Nd(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=PT(e,l);return _T([0,s],[0,i])(u)}function _T(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 VT(e,t){return e>0&&e<t}var NG=(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 Od(e,t){let o=Kr(e),r=E(0);return D(()=>()=>window.clearTimeout(r.current),[]),B(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function ps(e,t){let o=Kr(t);Ol(()=>{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 th=MT,BT=ET;var HT=OT;var UT=C(({className:e,children:t,focusable:o=!0,...r},a)=>P(th,{ref:a,className:L("relative overflow-hidden",e),...r,children:[d(BT,{tabIndex:o?0:void 0,className:"h-full w-full rounded-[inherit]",children:t}),d(oh,{}),d(HT,{})]}));UT.displayName=th.displayName;var oh=C(({className:e,orientation:t="vertical",...o},r)=>d(Dd,{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(Jg,{className:"relative flex-1 rounded-full bg-border"})}));oh.displayName=Dd.displayName;O();var GT=(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},zT={duration:.5,ease:[.25,.46,.45,.94]},WT=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||GT(t,a),[t,a,c]),y=Z(()=>({...zT,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})});WT.displayName="ScrollReveal";var qT=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})});qT.displayName="ScrollRevealContainer";var $T=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||GT(t,r),[t,r,n]),c=Z(()=>({...zT,duration:o}),[o]);return d(_e.div,{ref:l,variants:u,transition:c,className:L(a),style:s,id:i,children:e})});$T.displayName="ScrollRevealItem";O();O();var FG="Separator",jT="horizontal",_G=["horizontal","vertical"],KT=C((e,t)=>{let{decorative:o,orientation:r=jT,...a}=e,n=VG(r)?r:jT,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return d(Y.div,{"data-orientation":n,...i,...a,ref:t})});KT.displayName=FG;function VG(e){return _G.includes(e)}var rh=KT;var XT=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(rh,{ref:s,decorative:a,orientation:t||void 0,className:L(XT({orientation:t,variant:o,size:r}),e),...n}));Zt.displayName=rh.displayName;O();O();O();var HG=Object.defineProperty,ms=(e,t)=>HG(e,"name",{value:t,configurable:!0}),YT=!!(typeof window<"u"&&window.document&&window.document.createElement);function nh(e,t,{checkForDefaultPrevented:o=!0}={}){return ms(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ms(nh,"composeEventHandlers");function UG(e){if(!YT)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ms(UG,"getOwnerWindow");function ah(e){if(!YT)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ms(ah,"getOwnerDocument");function ZT(e,t=!1){let{activeElement:o}=ah(e);if(!o?.nodeName)return null;if(QT(o)&&o.contentDocument)return ZT(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=ah(o).getElementById(r);if(a)return a}}return o}ms(ZT,"getActiveElement");function QT(e){return e.tagName==="IFRAME"}ms(QT,"isFrame");O();var gs=!1;O();var Fd=globalThis?.document?ct:()=>{};O();O();var GG=Object.defineProperty,zG=(e,t)=>GG(e,"name",{value:t,configurable:!0}),JT=H[" useEffectEvent ".trim().toString()],eM=H[" useInsertionEffect ".trim().toString()];function sh(e){if(typeof JT=="function")return JT(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof eM=="function"?eM(()=>{t.current=e}):Fd(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}zG(sh,"useEffectEvent");var WG=Object.defineProperty,_l=(e,t)=>WG(e,"name",{value:t,configurable:!0}),qG=H[" useInsertionEffect ".trim().toString()]||Fd;function ih({prop:e,defaultProp:t,onChange:o=_l(()=>{},"onChange"),caller:r}){let[a,n,s]=oM({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(gs){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=B(c=>{if(i){let f=rM(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}_l(ih,"useControllableState");function oM({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return qG(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}_l(oM,"useUncontrolledState");function rM(e){return typeof e=="function"}_l(rM,"isFunction");var tM=Symbol("RADIX:SYNC_STATE");function $G(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=sh(s);if(gs){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===tM)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:tM,state:a})},[a,f.state,l]),[g,p]}_l($G,"useControllableStateReducer");O();O();O();var jG=Object.defineProperty,uh=(e,t)=>jG(e,"name",{value:t,configurable:!0});function lh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}uh(lh,"setRef");function aM(...e){return t=>{let o=!1,r=e.map(a=>{let n=lh(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():lh(e[a],null)}}}}uh(aM,"composeRefs");function ch(...e){return B(aM(...e),e)}uh(ch,"useComposedRefs");var KG=Object.defineProperty,Qt=(e,t)=>KG(e,"name",{value:t,configurable:!0}),XG=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";gs&&(!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]=nM(n,a))}return{...e,...o}},"mergeProps");function nM(...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(nM,"concatAriaDescribedby");var sM=le(XG);sM.displayName="SlotContext";function fh(e){let t=C((o,r)=>{let a=te(sM),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];dh(n)&&typeof _d=="function"&&(n=_d(n._payload)),Ie.forEach(n,h=>{if(uM(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;dh(v)&&typeof _d=="function"&&(v=_d(v._payload)),l=ZG(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Ie.count(n)===1&&Le(n)&&(l=n);let f=l?lM(l):void 0,p=ch(r,f);if(!l){if(n||n===0)throw new Error(u?ez(e):JG(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(fh,"createSlot");var iM=Symbol.for("radix.slottable");function YG(e){let t=Qt(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=iM,t}Qt(YG,"createSlottable");var ZG=Qt((e,t)=>{if("child"in e.props){let o=e.props.child;return Le(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Le(t)?t:null},"getSlottableElementFromSlottable");function lM(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(lM,"getElementRef");function uM(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iM}Qt(uM,"isSlottable");var QG=Symbol.for("react.lazy");function dh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QG&&"_payload"in e&&cM(e._payload)}Qt(dh,"isLazyComponent");function cM(e){return typeof e=="object"&&e!==null&&"then"in e}Qt(cM,"isPromiseLike");var JG=Qt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ez=Qt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),_d=H[" use ".trim().toString()];var tz=Object.defineProperty,oz=(e,t)=>tz(e,"name",{value:t,configurable:!0}),rz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dM=rz.reduce((e,t)=>{let o=fh(`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 az(e,t){e&&Go(()=>e.dispatchEvent(t))}oz(az,"dispatchDiscreteCustomEvent");var nz=Object.defineProperty,sz=(e,t)=>nz(e,"name",{value:t,configurable:!0}),iz="Toggle",Vl=C(sz(function(t,o){let{pressed:r,defaultPressed:a,onPressedChange:n,...s}=t,[i,l]=ih({prop:r,onChange:n,defaultProp:a??!1,caller:iz});return d(dM.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:o,onClick:nh(t.onClick,()=>{t.disabled||l(!i)})})},"Toggle"));var Vd=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"}}),Bd=C(({className:e,variant:t,size:o,...r},a)=>d(Vl,{ref:a,className:L("moonui-theme",Vd({variant:t,size:o,className:e})),...r}));Bd.displayName=Vl.displayName;O();O();var[Hd,qxe]=Ee("Tooltip",[Kt]),Ud=Kt(),fM="TooltipProvider",uz=700,ph="tooltip.open",[cz,gh]=Hd(fM),pM=e=>{let{__scopeTooltip:t,delayDuration:o=uz,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(cz,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:B(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:B(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:B(u=>{i.current=u},[]),disableHoverableContent:a,children:n})};pM.displayName=fM;var Bl="Tooltip",[dz,Hl]=Hd(Bl),mM=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=gh(Bl,e.__scopeTooltip),u=Ud(t),[c,f]=k(null),p=Te(),m=E(0),h=s??l.disableHoverableContent,g=i??l.delayDuration,v=E(!1),[x,y]=Be({prop:r,defaultProp:a??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(ph))):l.onClose(),n?.(S)},caller:Bl}),b=Z(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),R=B(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,y(!0)},[y]),w=B(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),I=B(()=>{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(sr,{...u,children:d(dz,{scope:t,contentId:p,open:x,stateAttribute:b,trigger:c,onTriggerChange:f,onTriggerEnter:B(()=>{l.isOpenDelayedRef.current?I():R()},[l.isOpenDelayedRef,I,R]),onTriggerLeave:B(()=>{h?w():(window.clearTimeout(m.current),m.current=0)},[w,h]),onOpen:R,onClose:w,disableHoverableContent:h,children:o})})};mM.displayName=Bl;var mh="TooltipTrigger",gM=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Hl(mh,o),n=gh(mh,o),s=Ud(o),i=E(null),l=pe(t,i,a.onTriggerChange),u=E(!1),c=E(!1),f=B(()=>u.current=!1,[]);return D(()=>()=>document.removeEventListener("pointerup",f),[f]),d(ir,{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)})})});gM.displayName=mh;var hh="TooltipPortal",[fz,pz]=Hd(hh,{forceMount:void 0}),mz=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=Hl(hh,t);return d(fz,{scope:t,forceMount:o,children:d($e,{present:o||n.open,children:d(Vt,{asChild:!0,container:a,children:r})})})};mz.displayName=hh;var hs="TooltipContent",hM=C((e,t)=>{let o=pz(hs,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=Hl(hs,e.__scopeTooltip);return d($e,{present:r||s.open,children:s.disableHoverableContent?d(vM,{side:a,...n,ref:t}):d(gz,{side:a,...n,ref:t})})}),gz=C((e,t)=>{let o=Hl(hs,e.__scopeTooltip),r=gh(hs,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=B(()=>{i(null),f(!1)},[f]),m=B((h,g)=>{let v=h.currentTarget,x={x:h.clientX,y:h.clientY},y=yz(x,v.getBoundingClientRect()),b=bz(x,y),R=Cz(g.getBoundingClientRect()),w=Sz([...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=!wz(x,s);y?p():b&&(p(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,c,s,u,p]),d(vM,{...e,ref:n})}),[hz,vz]=Hd(Bl,{isInside:!1}),xz=Jd("TooltipContent"),vM=C((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Hl(hs,o),u=Ud(o),{onClose:c}=l;return D(()=>(document.addEventListener(ph,c),()=>document.removeEventListener(ph,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(xz,{children:r}),d(hz,{scope:o,isInside:!0,children:d(ML,{id:l.contentId,role:"tooltip",children:a||r})})]})})});hM.displayName=hs;var xM="TooltipArrow",yM=C((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Ud(o);return vz(xM,o).isInside?null:d(Vr,{...a,...r,ref:t})});yM.displayName=xM;function yz(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 bz(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 wz(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 Sz(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),Rz(t)}function Rz(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 bM=pM,CM=mM,vh=gM;var xh=hM,yh=yM;var bh=bM,wM=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"}}),SM=le(null);function Pz(e){if(!e)return!1;try{return e.matches(":focus-visible")}catch{return!0}}var Ul=({open:e,defaultOpen:t,onOpenChange:o,children:r,...a})=>{let n=e!==void 0,[s,i]=k(t??!1),l=n?e:s,u=E(!1),c=B(()=>{u.current=!0},[]),f=B(()=>{u.current=!1},[]),p=B(g=>{n||i(g),o?.(g)},[n,o]),m=B(g=>{!g&&u.current||p(g)},[p]);D(()=>{if(!l)return;let g=v=>{v.key==="Escape"&&(u.current=!1,p(!1))};return document.addEventListener("keydown",g,!0),()=>document.removeEventListener("keydown",g,!0)},[l,p]);let h=Z(()=>({hold:c,release:f}),[c,f]);return d(SM.Provider,{value:h,children:d(CM,{...a,open:l,onOpenChange:m,children:r})})};Ul.displayName="Tooltip";var Gl=C(({onFocus:e,onBlur:t,onPointerDown:o,...r},a)=>{let n=te(SM);return d(vh,{ref:a,...r,onFocus:s=>{Pz(s.currentTarget)&&n?.hold(),e?.(s)},onBlur:s=>{n?.release(),t?.(s)},onPointerDown:s=>{n?.release(),o?.(s)}})});Gl.displayName=vh.displayName;var Ch=C(({className:e,...t},o)=>d(yh,{ref:o,className:L("moonui-theme","fill-current",e),...t}));Ch.displayName=yh.displayName;var zl=C(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>P(xh,{ref:s,sideOffset:a,className:L("moonui-theme",wM({variant:t,size:o}),e),...n,children:[n.children,r&&d(Ch,{})]}));zl.displayName=xh.displayName;var RM=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(Ul,{open:c,defaultOpen:f,onOpenChange:p,delayDuration:s,children:[d(Gl,{asChild:!0,children:e}),d(zl,{ref:h,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...m,children:t})]}));RM.displayName="SimpleTooltip";var nt=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>P(Ul,{children:[d(Gl,{asChild:!0,children:d(Bd,{pressed:o,onPressedChange:()=>r(),disabled:a,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),d(zl,{children:d("p",{children:t})})]}),Lz=({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))}),IM=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=B(F=>{p(F),t?.(F)},[t]),T=B(()=>{let F=window.getSelection();return F&&F.rangeCount>0?F.getRangeAt(0):null},[]),M=B(F=>{if(!F)return;let q=window.getSelection();q&&(q.removeAllRanges(),q.addRange(F))},[]),A=B((F,q)=>{if(r)return;b.current&&b.current.focus();let ce=T();if(document.execCommand(F,!1,q)||console.warn(`Command '${F}' failed to execute`),b.current){let W=b.current.innerHTML;S(W)}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]),_=B(F=>{let q=F.currentTarget.innerHTML;S(q)},[S]),V=B(F=>{if(F.ctrlKey||F.metaKey)switch(F.key){case"b":F.preventDefault(),A("bold");break;case"i":F.preventDefault(),A("italic");break;case"u":F.preventDefault(),A("underline");break;case"z":F.preventDefault(),F.shiftKey?A("redo"):A("undo");break}F.key==="Tab"&&(F.preventDefault(),A("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[A]),U=B(()=>{let F=prompt("Enter URL:");F&&A("createLink",F)},[A]),N=B(()=>{let F=prompt("Enter image URL:");F&&A("insertImage",F)},[A]),$=B(F=>{A("formatBlock",`<h${F}>`)},[A]),G=B(F=>{let q=window.getSelection();if(q&&q.rangeCount>0){let ce=q.getRangeAt(0),se=document.createElement("span");se.style.color=F;try{ce.surroundContents(se)}catch{A("foreColor",F)}if(b.current){let W=b.current.innerHTML;S(W)}}},[A,S]);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(bh,{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(Os,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:w.bold,onClick:()=>A("bold"),disabled:r}),d(nt,{icon:d($s,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:w.italic,onClick:()=>A("italic"),disabled:r}),d(nt,{icon:d(oi,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:w.underline,onClick:()=>A("underline"),disabled:r}),d(nt,{icon:d(ti,{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(ls,{onValueChange:F=>{F.startsWith("h")?$(F.substring(1)):F==="normal"?A("formatBlock","p"):A("fontSize",F)},disabled:r,children:[d(us,{className:"w-24 h-8",children:d(Nl,{placeholder:"Size"})}),P(cs,{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(Es,{className:"h-3 w-3"}),tooltip:"Align Left",active:w.alignLeft,onClick:()=>A("justifyLeft"),disabled:r}),d(nt,{icon:d(Ms,{className:"h-3 w-3"}),tooltip:"Align Center",active:w.alignCenter,onClick:()=>A("justifyCenter"),disabled:r}),d(nt,{icon:d(As,{className:"h-3 w-3"}),tooltip:"Align Right",active:w.alignRight,onClick:()=>A("justifyRight"),disabled:r}),d(nt,{icon:d(ks,{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(Xs,{className:"h-3 w-3"}),tooltip:"Bullet List",active:w.unorderedList,onClick:()=>A("insertUnorderedList"),disabled:r}),d(nt,{icon:d(Ks,{className:"h-3 w-3"}),tooltip:"Numbered List",active:w.orderedList,onClick:()=>A("insertOrderedList"),disabled:r}),d(nt,{icon:d(Js,{className:"h-3 w-3"}),tooltip:"Quote",active:w.quote,onClick:()=>A("formatBlock","blockquote"),disabled:r}),d(nt,{icon:d(Vs,{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(js,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:U,disabled:r}),d(nt,{icon:d(ia,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:r})]}),d(Zt,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),P(Bo,{children:[d(ur,{asChild:!0,children:d(Me,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:d(nn,{className:"h-3 w-3"})})}),d(Ho,{className:"w-auto p-0",children:d(Lz,{onColorSelect:G})})]}),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(ri,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>A("undo"),disabled:r}),d(nt,{icon:d(ei,{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:F=>v(F.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:_,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(Tz,{content:f})})]})});IM.displayName="SimpleEditor";var Tz=({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"]})};O();var PM=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",PM({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...f},...c?qC:{},...R})});Yr.displayName="Skeleton";var wh=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)})}));wh.displayName="SkeletonText";var Sh=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}));Sh.displayName="SkeletonAvatar";var LM=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(Sh,{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(wh,{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"})]})]}));LM.displayName="SkeletonCard";O();var TM=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})});TM.displayName="SwipeableCard";O();O();var Gd="Switch",[Mz,Pye]=Ee(Gd),[kz,Ez]=Mz(Gd),MM=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(kz,{scope:o,checked:x,disabled:i,children:[d(Y.button,{type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":DM(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(AM,{control:p,bubbles:!g.current,name:r,value:l,checked:x,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});MM.displayName=Gd;var kM="SwitchThumb",EM=C((e,t)=>{let{__scopeSwitch:o,...r}=e,a=Ez(kM,o);return d(Y.span,{"data-state":DM(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});EM.displayName=kM;var Az="SwitchBubbleInput",AM=C(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=E(null),i=pe(s,n),l=$n(o),u=jn(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}})});AM.displayName=Az;function DM(e){return e?"checked":"unchecked"}var Rh=MM,NM=EM;var Nz=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"}}),Oz=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"}}),OM=C(({className:e,size:t,variant:o,loading:r,leftIcon:a,rightIcon:n,description:s,"aria-describedby":i,...l},u)=>{let c=Ge(),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(Rh,{className:L(Nz({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(NM,{className:L(Oz({size:t}))})]}),n&&d("span",{className:"text-muted-foreground",children:n}),s&&d("span",{id:f,className:"text-sm text-muted-foreground",children:s})]})});OM.displayName=Rh.displayName;O();var FM=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=Ge(),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})]})});FM.displayName="TagsInput";O();var Fz=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}}),_M=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=Ge(),b=v.id||y,R=E(null),[w,I]=k(m||h||"");ta(x,()=>R.current);let S=B(()=>{let N=R.current;if(!N||!l)return;N.style.height="auto";let $=N.scrollHeight;u&&$>u?(N.style.height=`${u}px`,N.style.overflowY="auto"):(N.style.height=`${$}px`,N.style.overflowY="hidden")},[l,u]);D(()=>{S()},[w,S]),D(()=>{m!==void 0&&I(m)},[m]);let T=N=>{I(N.target.value),g?.(N)},M=String(w).length,A=c&&(p!==void 0||M>0),_=typeof n=="string"?n:void 0,V=typeof s=="string"?s:void 0,U=_||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(Fz({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":_?`${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:[U&&d("p",{className:L("text-xs transition-all",_&&"text-error",V&&"text-success",o),id:_?`${b}-error`:V?`${b}-success`:void 0,children:_||V}),A&&P("p",{className:"text-xs text-muted-foreground ml-auto",children:[M,p!==void 0&&` / ${p}`]})]})]})});_M.displayName="Textarea";O();O();var Mh="ToastProvider",[kh,_z,Vz]=Lo("Toast"),[BM,Jye]=Ee("Toast",[Vz]),[Bz,Wd]=BM(Mh),HM=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 \`${Mh}\`. Expected non-empty \`string\`.`),d(kh.Provider,{scope:t,children:d(Bz,{scope:t,label:o,duration:r,swipeDirection:a,swipeThreshold:n,toastCount:u,viewport:i,onViewportChange:l,onToastAdd:B(()=>c(m=>m+1),[]),onToastRemove:B(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:s})})};HM.displayName=Mh;var UM="ToastViewport",Hz=["F8"],Ph="toast.viewportPause",Lh="toast.viewportResume",GM=C((e,t)=>{let{__scopeToast:o,hotkey:r=Hz,label:a="Notifications ({hotkey})",...n}=e,s=Wd(UM,o),i=_z(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(Ph);x.dispatchEvent(I),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){let I=new CustomEvent(Lh);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=B(({tabbingDirection:v})=>{let y=i().map(b=>{let R=b.ref.current,w=[R,...Jz(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(_=>_===w);Ih(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(hS,{ref:l,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&d(Th,{ref:u,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"forwards"});Ih(v)}}),d(kh.Slot,{scope:o,children:d(Y.ol,{tabIndex:-1,...n,ref:p})}),h&&d(Th,{ref:c,onFocusFromOutsideViewport:()=>{let v=g({tabbingDirection:"backwards"});Ih(v)}})]})});GM.displayName=UM;var zM="ToastFocusProxy",Th=C((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=Wd(zM,o);return d(Al,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});Th.displayName=zM;var Wl="Toast",Uz="toast.swipeStart",Gz="toast.swipeMove",zz="toast.swipeCancel",Wz="toast.swipeEnd",WM=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:Wl});return d($e,{present:o||i,children:d(jz,{open:i,...s,ref:t,onClose:()=>l(!1),onPause:We(e.onPause),onResume:We(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)})})})});WM.displayName=Wl;var[qz,$z]=BM(Wl,{onClose(){}}),jz=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(Wl,o),[v,x]=k(null),y=pe(t,N=>x(N)),b=E(null),R=E(null),w=a||g.duration,I=E(0),S=E(w),T=E(0),{onToastAdd:M,onToastRemove:A}=g,_=We(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),V=B(N=>{!N||N===1/0||(window.clearTimeout(T.current),I.current=new Date().getTime(),T.current=window.setTimeout(_,N))},[_]);D(()=>{let N=g.viewport;if(N){let $=()=>{V(S.current),u?.()},G=()=>{let z=new Date().getTime()-I.current;S.current=S.current-z,window.clearTimeout(T.current),l?.()};return N.addEventListener(Ph,G),N.addEventListener(Lh,$),()=>{N.removeEventListener(Ph,G),N.removeEventListener(Lh,$)}}},[g.viewport,w,l,u,V]),D(()=>{n&&!g.isClosePausedRef.current&&V(w)},[n,w,g.isClosePausedRef,V]),D(()=>(M(),()=>A()),[M,A]);let U=Z(()=>v?ZM(v):null,[v]);return g.viewport?P(Ve,{children:[U&&d(Kz,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:U}),d(qz,{scope:o,onClose:_,children:Ls(d(kh.ItemSlot,{scope:o,children:d(gS,{asChild:!0,onEscapeKeyDown:X(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||_(),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,N=>{N.key==="Escape"&&(i?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:X(e.onPointerDown,N=>{N.button===0&&(b.current={x:N.clientX,y:N.clientY})}),onPointerMove:X(e.onPointerMove,N=>{if(!b.current)return;let $=N.clientX-b.current.x,G=N.clientY-b.current.y,z=!!R.current,F=["left","right"].includes(g.swipeDirection),q=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,ce=F?q(0,$):0,se=F?0:q(0,G),W=N.pointerType==="touch"?10:2,re={x:ce,y:se},ne={originalEvent:N,delta:re};z?(R.current=re,zd(Gz,f,ne,{discrete:!1})):VM(re,g.swipeDirection,W)?(R.current=re,zd(Uz,c,ne,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs($)>W||Math.abs(G)>W)&&(b.current=null)}),onPointerUp:X(e.onPointerUp,N=>{let $=R.current,G=N.target;if(G.hasPointerCapture(N.pointerId)&&G.releasePointerCapture(N.pointerId),R.current=null,b.current=null,$){let z=N.currentTarget,F={originalEvent:N,delta:$};VM($,g.swipeDirection,g.swipeThreshold)?zd(Wz,m,F,{discrete:!0}):zd(zz,p,F,{discrete:!0}),z.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Kz=e=>{let{__scopeToast:t,children:o,...r}=e,a=Wd(Wl,t),[n,s]=k(!1),[i,l]=k(!1);return Zz(()=>s(!0)),D(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:d(Vt,{asChild:!0,children:d(Al,{...r,children:n&&P(Ve,{children:[a.label," ",o]})})})},Xz="ToastTitle",qM=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});qM.displayName=Xz;var Yz="ToastDescription",$M=C((e,t)=>{let{__scopeToast:o,...r}=e;return d(Y.div,{...r,ref:t})});$M.displayName=Yz;var jM="ToastAction",KM=C((e,t)=>{let{altText:o,...r}=e;return o.trim()?d(YM,{altText:o,asChild:!0,children:d(Eh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jM}\`. Expected non-empty \`string\`.`),null)});KM.displayName=jM;var XM="ToastClose",Eh=C((e,t)=>{let{__scopeToast:o,...r}=e,a=$z(XM,o);return d(YM,{asChild:!0,children:d(Y.button,{type:"button",...r,ref:t,onClick:X(e.onClick,a.onClose)})})});Eh.displayName=XM;var YM=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 ZM(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Qz(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(...ZM(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?Za(a,n):a.dispatchEvent(n)}var VM=(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 Zz(e=()=>{}){let t=We(e);Ae(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function Qz(e){return e.nodeType===e.ELEMENT_NODE}function Jz(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 Ih(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var QM=HM,Ah=GM,Dh=WM,Nh=qM,Oh=$M,Fh=KM,_h=Eh;var ek=QM,Bh=C(({className:e,...t},o)=>d(Ah,{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}));Bh.displayName=Ah.displayName;var t3=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"}}),Hh=C(({className:e,variant:t,...o},r)=>d(Dh,{ref:r,className:L("moonui-theme",t3({variant:t}),e),...o}));Hh.displayName=Dh.displayName;var tk=C(({className:e,...t},o)=>d(Fh,{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}));tk.displayName=Fh.displayName;var Uh=C(({className:e,...t},o)=>P(_h,{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"})]}));Uh.displayName=_h.displayName;var Gh=C(({className:e,...t},o)=>d(Nh,{ref:o,className:L("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Gh.displayName=Nh.displayName;var zh=C(({className:e,...t},o)=>d(Oh,{ref:o,className:L("moonui-theme","text-sm opacity-90",e),...t}));zh.displayName=Oh.displayName;var o3=5,r3=1e6,Vh=new Map,JM=e=>{if(Vh.has(e))return;let t=setTimeout(()=>{Vh.delete(e),ql({type:"REMOVE_TOAST",toastId:e})},r3);Vh.set(e,t)},a3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,o3)};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?JM(o):e.toasts.forEach(r=>{JM(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:[]},n3=0;function ql(e){$d=a3($d,e),qd.forEach(t=>{t($d)})}function ok({...e}){let t=`toast-${Date.now()}-${++n3}`,o=a=>ql({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>ql({type:"DISMISS_TOAST",toastId:t});return ql({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function rk(){let[e,t]=k($d);return D(()=>(qd.push(t),()=>{let o=qd.indexOf(t);o>-1&&qd.splice(o,1)}),[e]),{...e,toast:ok,dismiss:o=>ql({type:"DISMISS_TOAST",toastId:o})}}function s3(){let{toasts:e}=rk();return P(ek,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return P(Hh,{variant:n,open:s,onOpenChange:i,...l,children:[P("div",{className:"grid gap-1",children:[o&&d(Gh,{children:o}),r&&d(zh,{children:r})]}),a,d(Uh,{})]},t)}),d(Bh,{})]})}O();var ak=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"}}),nk=C(({className:e,size:t,children:o,...r},a)=>d("kbd",{ref:a,className:L("moonui-theme",ak({size:t}),e),...r,children:o}));nk.displayName="Kbd";O();var sk=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"}}),i3={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},ik=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=i3[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=B(U=>{n||(g||x(U),r?.(U))},[n,g,r]),S=B(U=>{if(n)return;let N=null;switch(U.key){case"ArrowRight":case"ArrowUp":N=Math.min(a,y+h);break;case"ArrowLeft":case"ArrowDown":N=Math.max(h,y-h);break;case"Home":N=h;break;case"End":N=a;break;default:return}U.preventDefault(),I(N)},[n,a,y,h,I]),T=Ge(),M=B(U=>`${T}-option-${String(U).replace(".","-")}`,[T]),A=y>=h&&y<=a?y:h,_=U=>{if(Le(i)){let N=i;return Fe(N,{className:L(m,"shrink-0",U&&"fill-current",N.props?.className)})}return d(vr,{className:L(m,"shrink-0",U&&"fill-current"),"aria-hidden":"true"})},V=Array.from({length:a},(U,N)=>N+1);return d("div",{ref:f,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":n||void 0,"aria-activedescendant":n?void 0:M(A),tabIndex:n?void 0:0,onKeyDown:S,onMouseLeave:()=>R(null),className:L(sk({size:l}),e),...c,children:V.map(U=>{let N=Math.max(0,Math.min(1,w-(U-1))),$=U-.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:_(!1)}),d("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-[rgb(var(--rating-star-rgb))]",style:{width:`${N*100}%`},children:_(!0)}),!n&&s==="half"&&P(Ve,{children:[d("button",{type:"button",role:"radio",id:M($),"aria-checked":y===$,"aria-label":`${$} stars`,tabIndex:-1,onClick:()=>I($),onMouseEnter:()=>R($),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),d("button",{type:"button",role:"radio",id:M(U),"aria-checked":y===U,"aria-label":`${U} stars`,tabIndex:-1,onClick:()=>I(U),onMouseEnter:()=>R(U),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",id:M(U),"aria-checked":y===U,"aria-label":`${U} ${U===1?"star":"stars"}`,tabIndex:-1,onClick:()=>I(U),onMouseEnter:()=>R(U),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},U)})})});ik.displayName="Rating";O();var lk=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"}}),l3={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},uk=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",l3[t??"md"]),style:{animationDelay:`${s*.15}s`}},s))}):d("span",{className:L(lk({size:t})),"aria-hidden":"true"}),d("span",{className:"sr-only",children:r})]}));uk.displayName="Spinner";O();var ck=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}}),dk=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(!Le(c)||c.type!==Me)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(ck({orientation:t,attached:o}),e),...s,children:u})});dk.displayName="ButtonGroup";O();O();O();var u3=Object.defineProperty,Jt=(e,t)=>u3(e,"name",{value:t,configurable:!0});function c3(e,t){let o=le(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=te(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(c3,"createContext");function pr(e,t=[]){let o=[];function r(n,s){let i=le(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=te(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=>le(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,fk(a,...t)]}Jt(pr,"createContextScope");function fk(...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(fk,"composeContextScopes");O();O();O();var d3=Object.defineProperty,qh=(e,t)=>d3(e,"name",{value:t,configurable:!0});function Wh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}qh(Wh,"setRef");function pk(...e){return t=>{let o=!1,r=e.map(a=>{let n=Wh(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():Wh(e[a],null)}}}}qh(pk,"composeRefs");function eo(...e){return B(pk(...e),e)}qh(eo,"useComposedRefs");var vs=!1;var f3=Object.defineProperty,to=(e,t)=>f3(e,"name",{value:t,configurable:!0}),p3=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";vs&&(!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]=mk(n,a))}return{...e,...o}},"mergeProps");function mk(...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(mk,"concatAriaDescribedby");var gk=le(p3);gk.displayName="SlotContext";function mr(e){let t=C((o,r)=>{let a=te(gk),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];$h(n)&&typeof jd=="function"&&(n=jd(n._payload)),Ie.forEach(n,h=>{if(xk(h)){u=!0;let g=h,v="child"in g.props?g.props.child:g.props.children;$h(v)&&typeof jd=="function"&&(v=jd(v._payload)),l=g3(g,v),c.push(l?.props?.children)}else c.push(h)}),l?l=Fe(l,void 0,c):!u&&Ie.count(n)===1&&Le(n)&&(l=n);let f=l?vk(l):void 0,p=eo(r,f);if(!l){if(n||n===0)throw new Error(u?x3(e):v3(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 hk=Symbol.for("radix.slottable");function m3(e){let t=to(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=hk,t}to(m3,"createSlottable");var g3=to((e,t)=>{if("child"in e.props){let o=e.props.child;return Le(o)?Fe(o,void 0,e.props.children(o.props.children)):null}return Le(t)?t:null},"getSlottableElementFromSlottable");function vk(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(vk,"getElementRef");function xk(e){return Le(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hk}to(xk,"isSlottable");var h3=Symbol.for("react.lazy");function $h(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===h3&&"_payload"in e&&yk(e._payload)}to($h,"isLazyComponent");function yk(e){return typeof e=="object"&&e!==null&&"then"in e}to(yk,"isPromiseLike");var v3=to(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),x3=to(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),jd=H[" use ".trim().toString()];var y3=Object.defineProperty,b3=(e,t)=>y3(e,"name",{value:t,configurable:!0}),C3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xs=C3.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 w3(e,t){e&&Go(()=>e.dispatchEvent(t))}b3(w3,"dispatchDiscreteCustomEvent");O();var S3=Object.defineProperty,ys=(e,t)=>S3(e,"name",{value:t,configurable:!0}),bk=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zr(e,t,{checkForDefaultPrevented:o=!0}={}){return ys(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}ys(Zr,"composeEventHandlers");function R3(e){if(!bk)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ys(R3,"getOwnerWindow");function jh(e){if(!bk)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ys(jh,"getOwnerDocument");function Ck(e,t=!1){let{activeElement:o}=jh(e);if(!o?.nodeName)return null;if(wk(o)&&o.contentDocument)return Ck(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=jh(o).getElementById(r);if(a)return a}}return o}ys(Ck,"getActiveElement");function wk(e){return e.tagName==="IFRAME"}ys(wk,"isFrame");O();O();var I3=Object.defineProperty,ut=(e,t)=>I3(e,"name",{value:t,configurable:!0});function Yh(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 B(()=>{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(Yh,"createCollection");var Sk=new WeakMap,Kh=class Qr extends Map{static{ut(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],Sk.set(this,!0)}set(t,o){return Sk.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=Zh(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=Rk(e,t);return o===-1?void 0:e[o]}ut(Kd,"at");function Rk(e,t){let o=e.length,r=Zh(t),a=r>=0?r:o+r;return a<0||a>=o?-1:a}ut(Rk,"toSafeIndex");function Zh(e){return e!==e||e===0?0:Math.trunc(e)}ut(Zh,"toSafeInteger");function P3(e){let t=e+"CollectionProvider",[o,r]=pr(t),[a,n]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Kh,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),[_,V]=I;return D(()=>{if(!T)return;let U=Lk(()=>{});return U.observe(T,{childList:!0,subtree:!0}),()=>{U.disconnect()}},[T]),d(a,{scope:R,itemMap:_,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),_=eo(R,T,A),V=n(p,w),{setItemMap:U}=V,N=E(S);Ik(N.current,S)||(N.current=S);let $=N.current;return D(()=>{let G=$;return U(z=>M?z.has(M)?z.set(M,{...G,element:M}).toSorted(Xh):(z.set(M,{...G,element:M}),z.toSorted(Xh)):z),()=>{U(z=>!M||!z.has(M)?z:(z.delete(M),new Kh(z)))}},[M,$,U]),d(h,{[m]:"",ref:_,children:I})});g.displayName=p;function v(){return k(new Kh)}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(P3,"createCollection");function Ik(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(Ik,"shallowEqual");function Pk(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ut(Pk,"isElementPreceding");function Xh(e,t){return!e[1].element||!t[1].element?0:Pk(e[1].element,t[1].element)?-1:1}ut(Xh,"sortByDocumentPosition");function Lk(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}ut(Lk,"getChildListObserver");O();O();var Jr=globalThis?.document?ct:()=>{};var L3=Object.defineProperty,T3=(e,t)=>L3(e,"name",{value:t,configurable:!0}),M3=H[" useId ".trim().toString()]||(()=>{}),k3=0;function Qh(e){let[t,o]=k(M3());return Jr(()=>{e||o(r=>r??String(k3++))},[e]),e||(t?`radix-${t}`:"")}T3(Qh,"useId");O();var E3=Object.defineProperty,A3=(e,t)=>E3(e,"name",{value:t,configurable:!0});function Jh(e){let t=E(e);return D(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}A3(Jh,"useCallbackRef");O();O();O();var D3=Object.defineProperty,N3=(e,t)=>D3(e,"name",{value:t,configurable:!0}),Tk=H[" useEffectEvent ".trim().toString()],Mk=H[" useInsertionEffect ".trim().toString()];function ev(e){if(typeof Tk=="function")return Tk(e);let t=E(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Mk=="function"?Mk(()=>{t.current=e}):Jr(()=>{t.current=e}),Z(()=>(...o)=>t.current?.(...o),[])}N3(ev,"useEffectEvent");var O3=Object.defineProperty,$l=(e,t)=>O3(e,"name",{value:t,configurable:!0}),F3=H[" useInsertionEffect ".trim().toString()]||Jr;function bs({prop:e,defaultProp:t,onChange:o=$l(()=>{},"onChange"),caller:r}){let[a,n,s]=Ek({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(vs){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=B(c=>{if(i){let f=Ak(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[l,u]}$l(bs,"useControllableState");function Ek({defaultProp:e,onChange:t}){let[o,r]=k(e),a=E(o),n=E(t);return F3(()=>{n.current=t},[t]),D(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}$l(Ek,"useUncontrolledState");function Ak(e){return typeof e=="function"}$l(Ak,"isFunction");var kk=Symbol("RADIX:SYNC_STATE");function _3(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=ev(s);if(vs){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===kk)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:kk,state:a})},[a,f.state,l]),[g,p]}$l(_3,"useControllableStateReducer");O();var V3=Object.defineProperty,B3=(e,t)=>V3(e,"name",{value:t,configurable:!0}),H3=le(void 0);function jl(e){let t=te(H3);return e||t||"ltr"}B3(jl,"useDirection");O();O();var U3=Object.defineProperty,ov=(e,t)=>U3(e,"name",{value:t,configurable:!0}),tv=!1;function Dk(){let[e,t]=k(tv);return D(()=>{tv||(tv=!0,t(!0))},[]),e}ov(Dk,"useIsHydrated");var Nk=H[" useSyncExternalStore ".trim().toString()];function Ok(){return()=>{}}ov(Ok,"subscribe");function Fk(){return Nk(Ok,()=>!0,()=>!1)}ov(Fk,"useIsHydratedModern");var _k=typeof Nk=="function"?Fk:Dk;var G3=Object.defineProperty,Ka=(e,t)=>G3(e,"name",{value:t,configurable:!0}),rv="rovingFocusGroup.onEntryFocus",z3={bubbles:!1,cancelable:!0},Xd="RovingFocusGroup",[av,Vk,W3]=Yh(Xd),[q3,nv]=pr(Xd,[W3]),[$3,j3]=q3(Xd),Bk=C(Ka(function(t,o){return d(av.Provider,{scope:t.__scopeRovingFocusGroup,children:d(av.Slot,{scope:t.__scopeRovingFocusGroup,children:d(K3,{...t,ref:o})})})},"RovingFocusGroup")),K3=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=jl(s),[v,x]=bs({prop:i,defaultProp:l??null,onChange:u,caller:Xd}),[y,b]=k(!1),R=Jh(c),w=Vk(r),I=E(!1),[S,T]=k(0);return D(()=>{let M=m.current;if(M)return M.addEventListener(rv,R),()=>M.removeEventListener(rv,R)},[R]),d($3,{scope:r,orientation:a,dir:g,loop:n,currentTabStopId:v,onItemFocus:B(M=>x(M),[x]),onItemShiftTab:B(()=>b(!0),[]),onFocusableItemAdd:B(()=>T(M=>M+1),[]),onFocusableItemRemove:B(()=>T(M=>M-1),[]),children:d(xs.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 _=new CustomEvent(rv,z3);if(M.currentTarget.dispatchEvent(_),!_.defaultPrevented){let V=w().filter(z=>z.focusable),U=V.find(z=>z.active),N=V.find(z=>z.id===v),G=[U,N,...V].filter(Boolean).map(z=>z.ref.current);sv(G,f)}}I.current=!1}),onBlur:Zr(t.onBlur,()=>b(!1))})})},"RovingFocusGroupImpl")),X3="RovingFocusGroupItem",Hk=C(Ka(function(t,o){let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...l}=t,u=Qh(),c=s||u,f=j3(X3,r),p=f.currentTabStopId===c,m=Vk(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f,x=_k();return Jr(()=>{if(!(!x||!a))return h(),()=>g()},[x,a,h,g]),D(()=>{if(!(x||!a))return h(),()=>g()},[x,a,h,g]),d(av.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:d(xs.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=Gk(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?zk(w,I+1):w.slice(I+1)}setTimeout(()=>sv(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})},"RovingFocusGroupItem")),Y3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ka(Uk,"getDirectionAwareKey");function Gk(e,t,o){let r=Uk(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Y3[r]}Ka(Gk,"getFocusIntent");function sv(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}Ka(sv,"focusFirst");function zk(e,t){return e.map((o,r)=>e[(t+r)%e.length])}Ka(zk,"wrapArray");var Q3=Object.defineProperty,ea=(e,t)=>Q3(e,"name",{value:t,configurable:!0}),Cs="ToggleGroup",[qk,SCe]=pr(Cs,[nv]),$k=nv(),jk=C(ea(function(t,o){let{type:r,...a}=t;if(r==="single")return d(J3,{role:"radiogroup",...a,ref:o});if(r==="multiple")return d(e5,{role:"toolbar",...a,ref:o});throw new Error(`Missing prop \`type\` expected on \`${Cs}\``)},"ToggleGroup")),[Kk,Xk]=qk(Cs),J3=C(ea(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ea(()=>{},"onValueChange"),...s}=t,[i,l]=bs({prop:r,defaultProp:a??"",onChange:n,caller:Cs});return d(Kk,{scope:t.__scopeToggleGroup,type:"single",value:Z(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:B(()=>l(""),[l]),children:d(Yk,{...s,ref:o})})},"ToggleGroupImplSingle")),e5=C(ea(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ea(()=>{},"onValueChange"),...s}=t,[i,l]=bs({prop:r,defaultProp:a??[],onChange:n,caller:Cs}),u=B(f=>l((p=[])=>[...p,f]),[l]),c=B(f=>l((p=[])=>p.filter(m=>m!==f)),[l]);return d(Kk,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:c,children:d(Yk,{...s,ref:o})})},"ToggleGroupImplMultiple")),[t5,o5]=qk(Cs),Yk=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=jl(i),p={dir:f,...u};return d(t5,{scope:r,rovingFocus:n,disabled:a,children:n?d(Bk,{asChild:!0,...c,orientation:s,dir:f,loop:l,children:d(xs.div,{...p,ref:o})}):d(xs.div,{...p,ref:o})})},"ToggleGroupImpl")),iv="ToggleGroupItem",Zk=C(ea(function(t,o){let r=Xk(iv,t.__scopeToggleGroup),a=o5(iv,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(Hk,{asChild:!0,...n,focusable:!i,active:s,ref:u,children:d(Wk,{...l,ref:o})}):d(Wk,{...l,ref:o})},"ToggleGroupItem")),Wk=C(ea(function(t,o){let{__scopeToggleGroup:r,value:a,...n}=t,s=Xk(iv,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return d(Vl,{...l,...n,ref:o,onPressedChange:u=>{u?s.onItemActivate(a):s.onItemDeactivate(a)}})},"ToggleGroupItemImpl"));var Qk=le({size:"md",variant:"default"}),Jk=C(({className:e,variant:t,size:o,children:r,...a},n)=>d(jk,{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(Qk.Provider,{value:{variant:t,size:o},children:r})}));Jk.displayName="ToggleGroup";var eE=C(({className:e,children:t,variant:o,size:r,...a},n)=>{let s=te(Qk);return d(Zk,{ref:n,className:L(Vd({variant:s.variant??o,size:s.size??r}),e),...a,children:t})});eE.displayName="ToggleGroupItem";export{UD as Accordion,tx as AccordionContent,Jv as AccordionItem,ex as AccordionTrigger,ax as Alert,sx as AlertDescription,nx as AlertTitle,ix as AspectRatio,bf as Avatar,Cf as AvatarFallback,wx as AvatarGroup,Cx as AvatarImage,Lt as Badge,Ix as Breadcrumb,wf as BreadcrumbEllipsis,Lx as BreadcrumbItem,Mx as BreadcrumbLink,Px as BreadcrumbList,kx as BreadcrumbPage,Tx as BreadcrumbSeparator,Me as Button,dk as ButtonGroup,$C as Card,Aw as CardCVCInput,YC as CardContent,XC as CardDescription,Ew as CardExpiryInput,ZC as CardFooter,jC as CardHeader,kw as CardNumberInput,KC as CardTitle,Dw as CardZipInput,Ww as Carousel,$w as CarouselContent,Kw as CarouselItem,Yw as CarouselNext,Xw as CarouselPrevious,Up as Checkbox,rS as CheckboxGroup,Ac as CheckboxLabel,aS as CheckboxWithLabel,lF as Collapsible,iS as CollapsibleContent,sS as CollapsibleTrigger,Pm as ColorPicker,Gm as Command,cB as CommandDialog,gI as CommandEmpty,hI as CommandGroup,pI as CommandInput,xI as CommandItem,mI as CommandList,vI as CommandSeparator,yI as CommandShortcut,ig as DatePicker,HI as DateRangePicker,UI as DateTimePicker,Bm as Dialog,sB as DialogClose,ud as DialogContent,Um as DialogDescription,dI as DialogFooter,fI as DialogForm,Hm as DialogHeader,Cl as DialogTitle,aB as DialogTrigger,lH as DraggableList,JP as DropdownMenu,nL as DropdownMenuCheckboxItem,rL as DropdownMenuContent,tU as DropdownMenuGroup,aL as DropdownMenuItem,iL as DropdownMenuLabel,oU as DropdownMenuPortal,aU as DropdownMenuRadioGroup,sL as DropdownMenuRadioItem,lL as DropdownMenuSeparator,uL as DropdownMenuShortcut,rU as DropdownMenuSub,oL as DropdownMenuSubContent,tL as DropdownMenuSubTrigger,eU as DropdownMenuTrigger,cL as FileUpload,kU as FreeBadge,dL as GestureDrawer,Xge as GitHubStarButton,dU as GitHubStars,IV as GradientPicker,xt as Input,hL as InputOTP,vL as InputOTPGroup,bL as InputOTPSeparator,yL as InputOTPSlot,nk as Kbd,Et as Label,CL as LockedComponent,GI as MonthPicker,Eg as MoonLogo,vhe as MoonLogoAnimated,hhe as MoonLogoIcon,UD as MoonUIAccordion,tx as MoonUIAccordionContent,Jv as MoonUIAccordionItem,ex as MoonUIAccordionTrigger,ax as MoonUIAlert,sx as MoonUIAlertDescription,nx as MoonUIAlertTitle,ix as MoonUIAspectRatio,bf as MoonUIAvatar,Cf as MoonUIAvatarFallback,wx as MoonUIAvatarGroup,Cx as MoonUIAvatarImage,Lt as MoonUIBadge,Ix as MoonUIBreadcrumb,wf as MoonUIBreadcrumbEllipsis,Lx as MoonUIBreadcrumbItem,Mx as MoonUIBreadcrumbLink,Px as MoonUIBreadcrumbList,kx as MoonUIBreadcrumbPage,Tx as MoonUIBreadcrumbSeparator,Me as MoonUIButton,dk as MoonUIButtonGroup,Qi as MoonUICalendar,$C as MoonUICard,Aw as MoonUICardCVCInput,YC as MoonUICardContent,XC as MoonUICardDescription,Ew as MoonUICardExpiryInput,ZC as MoonUICardFooter,jC as MoonUICardHeader,kw as MoonUICardNumberInput,KC as MoonUICardTitle,Dw as MoonUICardZipInput,Ww as MoonUICarousel,$w as MoonUICarouselContent,Kw as MoonUICarouselItem,Yw as MoonUICarouselNext,Xw as MoonUICarouselPrevious,Up as MoonUICheckbox,rS as MoonUICheckboxGroup,Ac as MoonUICheckboxLabel,aS as MoonUICheckboxWithLabel,lF as MoonUICollapsible,iS as MoonUICollapsibleContent,sS as MoonUICollapsibleTrigger,Pm as MoonUIColorPicker,Gm as MoonUICommand,cB as MoonUICommandDialog,gI as MoonUICommandEmpty,hI as MoonUICommandGroup,pI as MoonUICommandInput,xI as MoonUICommandItem,mI as MoonUICommandList,vI as MoonUICommandSeparator,yI as MoonUICommandShortcut,nH as MoonUIDataTableBasic,ig as MoonUIDatePicker,HI as MoonUIDateRangePicker,UI as MoonUIDateTimePicker,Bm as MoonUIDialog,sB as MoonUIDialogClose,ud as MoonUIDialogContent,Um as MoonUIDialogDescription,dI as MoonUIDialogFooter,fI as MoonUIDialogForm,Hm as MoonUIDialogHeader,Cl as MoonUIDialogTitle,aB as MoonUIDialogTrigger,lH as MoonUIDraggableList,JP as MoonUIDropdownMenu,nL as MoonUIDropdownMenuCheckboxItem,rL as MoonUIDropdownMenuContent,tU as MoonUIDropdownMenuGroup,aL as MoonUIDropdownMenuItem,iL as MoonUIDropdownMenuLabel,oU as MoonUIDropdownMenuPortal,aU as MoonUIDropdownMenuRadioGroup,sL as MoonUIDropdownMenuRadioItem,lL as MoonUIDropdownMenuSeparator,uL as MoonUIDropdownMenuShortcut,rU as MoonUIDropdownMenuSub,oL as MoonUIDropdownMenuSubContent,tL as MoonUIDropdownMenuSubTrigger,eU as MoonUIDropdownMenuTrigger,cL as MoonUIFileUpload,kU as MoonUIFreeBadge,dL as MoonUIGestureDrawer,dU as MoonUIGitHubStars,IV as MoonUIGradientPicker,xt as MoonUIInput,hL as MoonUIInputOTP,vL as MoonUIInputOTPGroup,bL as MoonUIInputOTPSeparator,yL as MoonUIInputOTPSlot,nk as MoonUIKbd,Et as MoonUILabel,CL as MoonUILockedComponent,GI as MoonUIMonthPicker,Eg as MoonUIMoonLogo,wL as MoonUIPagination,SL as MoonUIPaginationContent,TL as MoonUIPaginationEllipsis,RL as MoonUIPaginationItem,Id as MoonUIPaginationLink,LL as MoonUIPaginationNext,PL as MoonUIPaginationPrevious,hT as MoonUIPhoneInput,Bo as MoonUIPopover,tV as MoonUIPopoverAnchor,oV as MoonUIPopoverClose,Ho as MoonUIPopoverContent,p0 as MoonUIPopoverFooter,f0 as MoonUIPopoverHeader,d0 as MoonUIPopoverSeparator,ur as MoonUIPopoverTrigger,MU as MoonUIProBadge,TU as MoonUIProComponentWrapper,Sd as MoonUIProgress,xT as MoonUIRadioGroup,Xg as MoonUIRadioGroupItem,yT as MoonUIRadioItemWithLabel,Yg as MoonUIRadioLabel,ik as MoonUIRating,nG as MoonUIRichTextEditor,UT as MoonUIScrollArea,oh as MoonUIScrollBar,WT as MoonUIScrollReveal,qT as MoonUIScrollRevealContainer,$T as MoonUIScrollRevealItem,ls as MoonUISelect,cs as MoonUISelectContent,eG as MoonUISelectGroup,Rt as MoonUISelectItem,pT as MoonUISelectLabel,Kg as MoonUISelectScrollDownButton,jg as MoonUISelectScrollUpButton,mT as MoonUISelectSeparator,us as MoonUISelectTrigger,Nl as MoonUISelectValue,Zt as MoonUISeparator,RV as MoonUISimpleColorPicker,IM as MoonUISimpleEditor,RM as MoonUISimpleTooltip,Yr as MoonUISkeleton,Sh as MoonUISkeletonAvatar,LM as MoonUISkeletonCard,wh as MoonUISkeletonText,cr as MoonUISlider,uk as MoonUISpinner,TM as MoonUISwipeableCard,OM as MoonUISwitch,gd as MoonUITable,vd as MoonUITableBody,BI as MoonUITableCaption,Rl as MoonUITableCell,VI as MoonUITableFooter,xd as MoonUITableHead,hd as MoonUITableHeader,ss as MoonUITableRow,od as MoonUITabs,rs as MoonUITabsContent,rd as MoonUITabsList,os as MoonUITabsTrigger,FM as MoonUITagsInput,_M as MoonUITextarea,Hh as MoonUIToast,tk as MoonUIToastAction,Uh as MoonUIToastClose,zh as MoonUIToastDescription,ek as MoonUIToastProvider,Gh as MoonUIToastTitle,Bh as MoonUIToastViewport,s3 as MoonUIToaster,Bd as MoonUIToggle,Jk as MoonUIToggleGroup,eE as MoonUIToggleGroupItem,Ul as MoonUITooltip,Ch as MoonUITooltipArrow,zl as MoonUITooltipContent,bh as MoonUITooltipProvider,Gl as MoonUITooltipTrigger,wL as Pagination,SL as PaginationContent,TL as PaginationEllipsis,RL as PaginationItem,Id as PaginationLink,LL as PaginationNext,PL as PaginationPrevious,nn as Palette,hT as PhoneInput,ru as Pipette,Bo as Popover,tV as PopoverAnchor,oV as PopoverClose,Ho as PopoverContent,p0 as PopoverFooter,f0 as PopoverHeader,d0 as PopoverSeparator,ur as PopoverTrigger,MU as ProBadge,TU as ProComponentWrapper,Sd as Progress,PU as REGEXP_ONLY_CHARS,IU as REGEXP_ONLY_DIGITS,LU as REGEXP_ONLY_DIGITS_AND_CHARS,xT as RadioGroup,Xg as RadioGroupItem,yT as RadioItemWithLabel,Yg as RadioLabel,ik as Rating,nG as RichTextEditor,UT as ScrollArea,oh as ScrollBar,WT as ScrollReveal,qT as ScrollRevealContainer,$T as ScrollRevealItem,ls as Select,cs as SelectContent,eG as SelectGroup,Rt as SelectItem,pT as SelectLabel,Kg as SelectScrollDownButton,jg as SelectScrollUpButton,mT as SelectSeparator,us as SelectTrigger,Nl as SelectValue,Zt as Separator,RV as SimpleColorPicker,IM as SimpleEditor,RM as SimpleTooltip,Yr as Skeleton,Sh as SkeletonAvatar,LM as SkeletonCard,wh as SkeletonText,cr as Slider,uk as Spinner,TM as SwipeableCard,OM as Switch,gd as Table,vd as TableBody,BI as TableCaption,Rl as TableCell,VI as TableFooter,xd as TableHead,hd as TableHeader,ss as TableRow,od as Tabs,rs as TabsContent,rd as TabsList,os as TabsTrigger,FM as TagsInput,_M as Textarea,Hh as Toast,tk as ToastAction,Uh as ToastClose,zh as ToastDescription,ek as ToastProvider,Gh as ToastTitle,Bh as ToastViewport,s3 as Toaster,Bd as Toggle,Jk as ToggleGroup,eE as ToggleGroupItem,Ul as Tooltip,Ch as TooltipArrow,zl as TooltipContent,bh as TooltipProvider,Gl as TooltipTrigger,zD as aspectRatioVariants,Sx as badgeVariants,n1 as breadcrumbVariants,ck as buttonGroupVariants,nu as buttonVariants,DO as cardVariants,qw as carouselContentVariants,jw as carouselItemVariants,L as cn,uF as collapsibleContentVariants,nS as collapsibleTriggerVariants,go as format,xL as inputOTPSlotVariants,ak as kbdVariants,Sx as moonUIBadgeVariants,ck as moonUIButtonGroupVariants,nu as moonUIButtonVariants,qw as moonUICarouselContentVariants,jw as moonUICarouselItemVariants,sH as moonUICreateSortableHeader,xL as moonUIInputOTPSlotVariants,ak as moonUIKbdVariants,i0 as moonUIPopoverContentVariants,sk as moonUIRatingVariants,XT as moonUISeparatorVariants,PM as moonUISkeletonVariants,lk as moonUISpinnerVariants,Vd as moonUIToggleVariants,wM as moonUITooltipVariants,i0 as popoverContentVariants,nU as progressVariants,sk as ratingVariants,XT as separatorVariants,PM as skeletonVariants,lk as spinnerVariants,Nz as switchVariants,hV as tabsListVariants,vV as tabsTriggerVariants,ok as toast,Vd as toggleVariants,wM as tooltipVariants,sl as useCarousel,rk as useToast};
80
80
  /*! Bundled license information:
81
81
 
82
82
  use-sync-external-store/cjs/use-sync-external-store-shim.production.js: