@qodo/design-system 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -206,7 +206,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
206
206
  - less than the value passed to \`max\` (or ${ka} if no \`max\` prop is set)
207
207
  - \`null\` or \`undefined\` if the progress is indeterminate.
208
208
 
209
- Defaulting to \`null\`.`}var zy=Pd,qy=Td;function Uy({className:e,value:t,...r}){return s.jsx(zy,{"data-slot":"progress",className:j("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(qy,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Ad({className:e,...t}){return s.jsx("div",{className:j("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Wn="Switch",[Hy,Tk]=ye(Wn),[Ky,Yy]=Hy(Wn),Id=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,m]=d.useState(null),b=ae(t,C=>m(C)),v=d.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,h]=be({prop:o,defaultProp:a??!1,onChange:u,caller:Wn});return s.jsxs(Ky,{scope:r,checked:y,disabled:l,children:[s.jsx(q.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":$d(y),"data-disabled":l?"":void 0,disabled:l,value:c,...p,ref:b,onClick:F(e.onClick,C=>{h(E=>!E),x&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),x&&s.jsx(Dd,{control:g,bubbles:!v.current,name:n,value:c,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Id.displayName=Wn;var Md="SwitchThumb",Od=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Yy(Md,r);return s.jsx(q.span,{"data-state":$d(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Od.displayName=Md;var Xy="SwitchBubbleInput",Dd=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=Mn(r),u=_n(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Dd.displayName=Xy;function $d(e){return e?"checked":"unchecked"}var Zy=Id,Jy=Od;function Qy({className:e,...t}){return s.jsx(Zy,{"data-slot":"switch",className:j("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Jy,{"data-slot":"switch-thumb",className:j("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Ld="Toggle",ja=d.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Ld});return s.jsx(q.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});ja.displayName=Ld;var ew=ja;const Fd=Cn("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function tw({className:e,variant:t,size:r,...n}){return s.jsx(ew,{"data-slot":"toggle",className:j(Fd({variant:t,size:r,className:e})),...n})}var Eo="rovingFocusGroup.onEntryFocus",rw={bubbles:!1,cancelable:!0},Or="RovingFocusGroup",[Uo,Vd,nw]=Rn(Or),[ow,vt]=ye(Or,[nw]),[aw,sw]=ow(Or),Bd=d.forwardRef((e,t)=>s.jsx(Uo.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Uo.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(iw,{...e,ref:t})})}));Bd.displayName=Or;var iw=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=d.useRef(null),m=ae(t,g),b=_t(a),[v,x]=be({prop:i,defaultProp:l??null,onChange:c,caller:Or}),[y,h]=d.useState(!1),C=De(u),E=Vd(r),k=d.useRef(!1),[N,T]=d.useState(0);return d.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(Eo,C),()=>P.removeEventListener(Eo,C)},[C]),s.jsx(aw,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(P=>x(P),[x]),onItemShiftTab:d.useCallback(()=>h(!0),[]),onFocusableItemAdd:d.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:d.useCallback(()=>T(P=>P-1),[]),children:s.jsx(q.div,{tabIndex:y||N===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{k.current=!0}),onFocus:F(e.onFocus,P=>{const V=!k.current;if(P.target===P.currentTarget&&V&&!y){const H=new CustomEvent(Eo,rw);if(P.currentTarget.dispatchEvent(H),!H.defaultPrevented){const re=E().filter(I=>I.focusable),te=re.find(I=>I.active),Q=re.find(I=>I.id===v),D=[te,Q,...re].filter(Boolean).map(I=>I.ref.current);zd(D,f)}}k.current=!1}),onBlur:F(e.onBlur,()=>h(!1))})})}),Gd="RovingFocusGroupItem",Wd=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,c=me(),u=a||c,f=sw(Gd,r),p=f.currentTabStopId===u,g=Vd(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return d.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Uo.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(q.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=dw(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(x.currentTarget);C=f.loop?uw(C,E+1):C.slice(E+1)}setTimeout(()=>zd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});Wd.displayName=Gd;var lw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dw(e,t,r){const n=cw(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return lw[n]}function zd(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function uw(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var zn=Bd,qn=Wd,ht="ToggleGroup",[qd,_k]=ye(ht,[vt]),Ud=vt(),Pa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(fw,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(pw,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ht}\``)});Pa.displayName=ht;var[Hd,Kd]=qd(ht),fw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:ht});return s.jsx(Hd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Yd,{...a,ref:t})})}),pw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:ht}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Hd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u,children:s.jsx(Yd,{...a,ref:t})})});Pa.displayName=ht;var[mw,gw]=qd(ht),Yd=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...c}=e,u=Ud(r),f=_t(i),p={role:"group",dir:f,...c};return s.jsx(mw,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(zn,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(q.div,{...p,ref:t})}):s.jsx(q.div,{...p,ref:t})})}),pn="ToggleGroupItem",Xd=S.forwardRef((e,t)=>{const r=Kd(pn,e.__scopeToggleGroup),n=gw(pn,e.__scopeToggleGroup),o=Ud(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},c=S.useRef(null);return n.rovingFocus?s.jsx(qn,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:s.jsx(di,{...l,ref:t})}):s.jsx(di,{...l,ref:t})});Xd.displayName=pn;var di=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=Kd(pn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(ja,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(n):a.onItemDeactivate(n)}})}),vw=Pa,hw=Xd;const Zd=d.createContext({size:"default",variant:"default"});function xw({className:e,variant:t,size:r,children:n,...o}){return s.jsx(vw,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:j("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:s.jsx(Zd.Provider,{value:{variant:t,size:r},children:n})})}function bw({className:e,children:t,variant:r,size:n,...o}){const a=d.useContext(Zd);return s.jsx(hw,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:j(Fd({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var Un="Collapsible",[yw,Jd]=ye(Un),[ww,Na]=yw(Un),Qd=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[c,u]=be({prop:n,defaultProp:o??!1,onChange:i,caller:Un});return s.jsx(ww,{scope:r,disabled:a,contentId:me(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:s.jsx(q.div,{"data-state":_a(c),"data-disabled":a?"":void 0,...l,ref:t})})});Qd.displayName=Un;var eu="CollapsibleTrigger",tu=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Na(eu,r);return s.jsx(q.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":_a(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});tu.displayName=eu;var Ta="CollapsibleContent",ru=d.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Na(Ta,e.__scopeCollapsible);return s.jsx(Ce,{present:r||o.open,children:({present:a})=>s.jsx(Cw,{...n,ref:t,present:a})})});ru.displayName=Ta;var Cw=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=Na(Ta,r),[l,c]=d.useState(n),u=d.useRef(null),f=ae(t,u),p=d.useRef(0),g=p.current,m=d.useRef(0),b=m.current,v=i.open||l,x=d.useRef(v),y=d.useRef(void 0);return d.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),we(()=>{const h=u.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const C=h.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),c(n)}},[i.open,n]),s.jsx(q.div,{"data-state":_a(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function _a(e){return e?"open":"closed"}var Sw=Qd,Ew=tu,Rw=ru,Ve="Accordion",kw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Aa,jw,Pw]=Rn(Ve),[Hn,Ak]=ye(Ve,[Pw,Jd]),Ia=Jd(),nu=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Aa.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(Aw,{...a,ref:t}):s.jsx(_w,{...o,ref:t})})});nu.displayName=Ve;var[ou,Nw]=Hn(Ve),[au,Tw]=Hn(Ve,{collapsible:!1}),_w=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,c]=be({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(ou,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:S.useCallback(()=>a&&c(""),[a,c]),children:s.jsx(au,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(su,{...i,ref:t})})})}),Aw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(ou,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:s.jsx(au,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(su,{...a,ref:t})})})}),[Iw,Kn]=Hn(Ve),su=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),c=ae(l,t),u=jw(r),p=_t(o)==="ltr",g=F(e.onKeyDown,m=>{var P;if(!kw.includes(m.key))return;const b=m.target,v=u().filter(V=>{var H;return!((H=V.ref.current)!=null&&H.disabled)}),x=v.findIndex(V=>V.ref.current===b),y=v.length;if(x===-1)return;m.preventDefault();let h=x;const C=0,E=y-1,k=()=>{h=x+1,h>E&&(h=C)},N=()=>{h=x-1,h<C&&(h=E)};switch(m.key){case"Home":h=C;break;case"End":h=E;break;case"ArrowRight":a==="horizontal"&&(p?k():N());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(p?N():k());break;case"ArrowUp":a==="vertical"&&N();break}const T=h%y;(P=v[T].ref.current)==null||P.focus()});return s.jsx(Iw,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Aa.Slot,{scope:r,children:s.jsx(q.div,{...i,"data-orientation":a,ref:c,onKeyDown:n?void 0:g})})})}),mn="AccordionItem",[Mw,Ma]=Hn(mn),iu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Kn(mn,r),i=Nw(mn,r),l=Ia(r),c=me(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(Mw,{scope:r,open:u,disabled:f,triggerId:c,children:s.jsx(Sw,{"data-orientation":a.orientation,"data-state":pu(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});iu.displayName=mn;var lu="AccordionHeader",cu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Kn(Ve,r),a=Ma(lu,r);return s.jsx(q.h3,{"data-orientation":o.orientation,"data-state":pu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});cu.displayName=lu;var Ho="AccordionTrigger",du=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Kn(Ve,r),a=Ma(Ho,r),i=Tw(Ho,r),l=Ia(r);return s.jsx(Aa.ItemSlot,{scope:r,children:s.jsx(Ew,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});du.displayName=Ho;var uu="AccordionContent",fu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Kn(Ve,r),a=Ma(uu,r),i=Ia(r);return s.jsx(Rw,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});fu.displayName=uu;function pu(e){return e?"open":"closed"}var Ow=nu,Dw=iu,$w=cu,Lw=du,Fw=fu;function Vw({...e}){return s.jsx(Ow,{"data-slot":"accordion",...e})}function Bw({className:e,...t}){return s.jsx(Dw,{"data-slot":"accordion-item",className:j("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function Gw({className:e,children:t,...r}){return s.jsx($w,{className:"flex",children:s.jsxs(Lw,{"data-slot":"accordion-trigger",className:j("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Sn,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Ww({className:e,children:t,...r}){return s.jsx(Fw,{"data-slot":"accordion-content",className:j("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:j("pt-0 pb-4",e),children:t})})}var Yn="Tabs",[zw,Ik]=ye(Yn,[vt]),mu=vt(),[qw,Oa]=zw(Yn),gu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=_t(l),[p,g]=be({prop:n,onChange:o,defaultProp:a??"",caller:Yn});return s.jsx(qw,{scope:r,baseId:me(),value:p,onValueChange:g,orientation:i,dir:f,activationMode:c,children:s.jsx(q.div,{dir:f,"data-orientation":i,...u,ref:t})})});gu.displayName=Yn;var vu="TabsList",hu=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=Oa(vu,r),i=mu(r);return s.jsx(zn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:s.jsx(q.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});hu.displayName=vu;var xu="TabsTrigger",bu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Oa(xu,r),l=mu(r),c=Cu(i.baseId,n),u=Su(i.baseId,n),f=n===i.value;return s.jsx(qn,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(q.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(n):p.preventDefault()}),onKeyDown:F(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(n)}),onFocus:F(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!o&&p&&i.onValueChange(n)})})})});bu.displayName=xu;var yu="TabsContent",wu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,l=Oa(yu,r),c=Cu(l.baseId,n),u=Su(l.baseId,n),f=n===l.value,p=d.useRef(f);return d.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),s.jsx(Ce,{present:o||f,children:({present:g})=>s.jsx(q.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});wu.displayName=yu;function Cu(e,t){return`${e}-trigger-${t}`}function Su(e,t){return`${e}-content-${t}`}var Uw=gu,Hw=hu,Kw=bu,Yw=wu;function Xw({className:e,...t}){return s.jsx(Uw,{"data-slot":"tabs",className:j("qodo qodo-tabs flex flex-col gap-2",e),...t})}function Zw({className:e,...t}){return s.jsx(Hw,{"data-slot":"tabs-list",className:j("inline-flex w-full items-end justify-start gap-4",e),...t})}function Jw({className:e,...t}){return s.jsx(Kw,{"data-slot":"tabs-trigger",className:j("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)] data-[state=active]:text-[var(--text-interactive-emphasis-active)] focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 border-b border-transparent py-4 text-xs font-normal whitespace-nowrap transition-[color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:border-[var(--color-purple-400)] relative -mb-px tracking-[0.01em] leading-[150%] cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Qw({className:e,...t}){return s.jsx(Yw,{"data-slot":"tabs-content",className:j("flex-1 outline-none",e),...t})}var e0=e=>e.type==="checkbox",gr=e=>e instanceof Date,Da=e=>e==null;const Eu=e=>typeof e=="object";var Tt=e=>!Da(e)&&!Array.isArray(e)&&Eu(e)&&!gr(e),t0=e=>Tt(e)&&e.target?e0(e.target)?e.target.checked:e.target.value:e,r0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,n0=(e,t)=>e.has(r0(t)),o0=e=>{const t=e.constructor&&e.constructor.prototype;return Tt(t)&&t.hasOwnProperty("isPrototypeOf")},a0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ru(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(a0&&(e instanceof Blob||n))&&(r||Tt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!o0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ru(e[o]));else return e;return t}var ku=e=>/^\w*$/.test(e),Ko=e=>e===void 0,s0=e=>Array.isArray(e)?e.filter(Boolean):[],ju=e=>s0(e.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(e,t,r)=>{if(!t||!Tt(e))return r;const n=(ku(t)?[t]:ju(t)).reduce((o,a)=>Da(o)?o:o[a],e);return Ko(n)||n===e?Ko(e[t])?r:e[t]:n},Ro=e=>typeof e=="boolean",ui=(e,t,r)=>{let n=-1;const o=ku(t)?[t]:ju(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let c=r;if(n!==i){const u=e[l];c=Tt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const fi={BLUR:"blur",CHANGE:"change"},pi={all:"all"},$a=S.createContext(null);$a.displayName="HookFormContext";const ir=()=>S.useContext($a),i0=e=>{const{children:t,...r}=e;return S.createElement($a.Provider,{value:r},t)};var l0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==pi.all&&(t._proxyFormState[i]=!n||pi.all),r&&(r[i]=!0),e[i]}});return o};const Pu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Nu(e){const t=ir(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),c=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pu(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>l0(i,r,c.current,!1),[i,r])}var c0=e=>typeof e=="string",d0=(e,t,r,n,o)=>c0(e)?je(r,e,o):Array.isArray(e)?e.map(a=>je(r,a)):r,mi=e=>Da(e)||!Eu(e);function Tu(e,t,r=new WeakSet){if(mi(e)||mi(t))return e===t;if(gr(e)&&gr(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(gr(i)&&gr(l)||Tt(i)&&Tt(l)||Array.isArray(i)&&Array.isArray(l)?!Tu(i,l,r):i!==l)return!1}}return!0}function u0(e){const t=ir(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},c=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,c.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return Pu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=d0(n,r._names,b.values||r._formValues,!1,c.current);if(u.current){const x=u.current(v);Tu(x,f.current)||(m(x),f.current=x)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function f0(e){const t=ir(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=n0(o._names.array,r),c=S.useMemo(()=>je(o._formValues,r,je(o._defaultValues,r,i)),[o,r,i]),u=u0({control:o,name:r,defaultValue:c,exact:!0}),f=Nu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...Ro(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!je(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!je(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!je(f.validatingFields,r)},error:{enumerable:!0,get:()=>je(f.errors,r)}}),[f,r]),b=S.useCallback(h=>g.current.onChange({target:{value:t0(h),name:r},type:fi.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:je(o._formValues,r),name:r},type:fi.BLUR}),[r,o._formValues]),x=S.useCallback(h=>{const C=je(o._fields,r);C&&h&&(C._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:E=>h.setCustomValidity(E),reportValidity:()=>h.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...Ro(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:x}),[r,n,f.disabled,b,v,x,u]);return S.useEffect(()=>{const h=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...Ro(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,k)=>{const N=je(o._fields,E);N&&N._f&&(N._f.mount=k)};if(C(r,!0),h){const E=Ru(je(o._options.defaultValues,r));ui(o._defaultValues,r,E),Ko(je(o._formValues,r))&&ui(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?h&&!o._state.action:h)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const _u=e=>e.render(f0(e)),Au=S.createContext(void 0),Iu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(Au.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(i0,{...t,children:o})})},Mu=()=>{const e=S.useContext(Au),t=ir();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},p0=({type:e="button",variant:t="outline",...r})=>{const n=()=>e==="submit"||e==="reset"?"default":t;return s.jsx(Qe,{type:e,variant:n(),...r})};var Ou={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gi=S.createContext&&S.createContext(Ou),m0=["attr","size","title"];function g0(e,t){if(e==null)return{};var r=v0(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function v0(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function gn(){return gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gn.apply(this,arguments)}function vi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vi(Object(r),!0).forEach(function(n){h0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h0(e,t,r){return t=x0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x0(e){var t=b0(e,"string");return typeof t=="symbol"?t:t+""}function b0(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Du(e){return e&&e.map((t,r)=>S.createElement(t.tag,vn({key:r},t.attr),Du(t.child)))}function $u(e){return t=>S.createElement(y0,gn({attr:vn({},e.attr)},t),Du(e.child))}function y0(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=g0(e,m0),l=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),S.createElement("svg",gn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:c,style:vn(vn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return gi!==void 0?S.createElement(gi.Consumer,null,r=>t(r)):t(Ou)}function w0(e){return $u({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var C0="Label",Lu=d.forwardRef((e,t)=>s.jsx(q.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Lu.displayName=C0;var S0=Lu;function La({className:e,...t}){return s.jsx(S0,{"data-slot":"label",className:j("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Fu=d.createContext({}),E0=({...e})=>s.jsx(Fu.Provider,{value:{name:e.name},children:s.jsx(_u,{...e})}),Xn=()=>{const e=d.useContext(Fu),t=d.useContext(Vu),{getFieldState:r}=ir(),n=Nu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},Vu=d.createContext({});function R0({className:e,...t}){const r=d.useId();return s.jsx(Vu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:j("qodo qodo-form-item grid gap-2",e),...t})})}function k0({className:e,...t}){const{formItemId:r}=Xn();return s.jsx(La,{"data-slot":"form-label",className:j("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function j0({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Xn();return s.jsx(vv,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function P0({className:e,...t}){const{formDescriptionId:r}=Xn();return s.jsx("p",{"data-slot":"form-description",id:r,className:j("text-purple-muted-300 text-sm",e),...t})}function N0({className:e,...t}){const{error:r,formMessageId:n}=Xn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:j("text-destructive text-sm",e),...t,children:o}):null}var[Zn,Mk]=ye("Tooltip",[ft]),Jn=ft(),Bu="TooltipProvider",T0=700,Yo="tooltip.open",[_0,Fa]=Zn(Bu),Gu=e=>{const{__scopeTooltip:t,delayDuration:r=T0,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(_0,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Gu.displayName=Bu;var Sr="Tooltip",[A0,Dr]=Zn(Sr),Wu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,c=Fa(Sr,e.__scopeTooltip),u=Jn(t),[f,p]=d.useState(null),g=me(),m=d.useRef(0),b=i??c.disableHoverableContent,v=l??c.delayDuration,x=d.useRef(!1),[y,h]=be({prop:n,defaultProp:o??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Yo))):c.onClose(),a==null||a(T)},caller:Sr}),C=d.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),E=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,h(!0)},[h]),k=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h(!1)},[h]),N=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,h(!0),m.current=0},v)},[v,h]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(Tr,{...u,children:s.jsx(A0,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?N():E()},[c.isOpenDelayedRef,N,E]),onTriggerLeave:d.useCallback(()=>{b?k():(window.clearTimeout(m.current),m.current=0)},[k,b]),onOpen:E,onClose:k,disableHoverableContent:b,children:r})})};Wu.displayName=Sr;var Xo="TooltipTrigger",zu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Dr(Xo,r),a=Fa(Xo,r),i=Jn(r),l=d.useRef(null),c=ae(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(_r,{asChild:!0,...i,children:s.jsx(q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});zu.displayName=Xo;var Va="TooltipPortal",[I0,M0]=Zn(Va,{forceMount:void 0}),qu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Dr(Va,t);return s.jsx(I0,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(ar,{asChild:!0,container:o,children:n})})})};qu.displayName=Va;var Jt="TooltipContent",Uu=d.forwardRef((e,t)=>{const r=M0(Jt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Dr(Jt,e.__scopeTooltip);return s.jsx(Ce,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Hu,{side:o,...a,ref:t}):s.jsx(O0,{side:o,...a,ref:t})})}),O0=d.forwardRef((e,t)=>{const r=Dr(Jt,e.__scopeTooltip),n=Fa(Jt,e.__scopeTooltip),o=d.useRef(null),a=ae(t,o),[i,l]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=d.useCallback(()=>{l(null),p(!1)},[p]),m=d.useCallback((b,v)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},h=F0(y,x.getBoundingClientRect()),C=V0(y,h),E=B0(v.getBoundingClientRect()),k=W0([...C,...E]);l(k),p(!0)},[p]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(c&&f){const b=x=>m(x,f),v=x=>m(x,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[c,f,m,g]),d.useEffect(()=>{if(i){const b=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},h=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!G0(y,i);h?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,g]),s.jsx(Hu,{...e,ref:a})}),[D0,$0]=Zn(Sr,{isInside:!1}),L0=xv("TooltipContent"),Hu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,c=Dr(Jt,r),u=Jn(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Yo,f),()=>document.removeEventListener(Yo,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),s.jsx(rr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(An,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[s.jsx(L0,{children:n}),s.jsx(D0,{scope:r,isInside:!0,children:s.jsx(dx,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Uu.displayName=Jt;var Ku="TooltipArrow",Yu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Jn(r);return $0(Ku,r).isInside?null:s.jsx(In,{...o,...n,ref:t})});Yu.displayName=Ku;function F0(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function V0(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function B0(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function G0(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function W0(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),z0(t)}function z0(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var q0=Gu,U0=Wu,H0=zu,K0=qu,Y0=Uu,X0=Yu;function Xu({delayDuration:e=0,...t}){return s.jsx(q0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Zu({...e}){return s.jsx(Xu,{children:s.jsx(U0,{"data-slot":"tooltip",...e})})}function Ju({...e}){return s.jsx(H0,{"data-slot":"tooltip-trigger",...e})}function Qu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(K0,{children:s.jsxs(Y0,{"data-slot":"tooltip-content",sideOffset:t,className:j("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&s.jsx(X0,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const It=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:c,disabled:u,readOnly:f}=Mu(),p=()=>a?s.jsxs(Zu,{children:[s.jsx(Ju,{asChild:!0,children:s.jsx("span",{children:s.jsx(w0,{size:16})})}),s.jsx(Qu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(P0,{children:o}):s.jsx(s.Fragment,{});return s.jsx(E0,{control:c,name:r,render:({field:m,fieldState:b})=>s.jsxs(R0,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(k0,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(j0,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(N0,{})]})})},Z0=S.forwardRef((e,t)=>s.jsx(jr,{...e,ref:t})),J0=S.forwardRef((e,t)=>It(Z0)({...e,ref:t})),Q0=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=c=>{n({target:{value:c}})};return s.jsx(Ea,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),eC=It(Q0);var Ba="Radio",[tC,ef]=ye(Ba),[rC,nC]=tC(Ba),tf=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:c,form:u,...f}=e,[p,g]=d.useState(null),m=ae(t,x=>g(x)),b=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(rC,{scope:r,checked:o,disabled:i,children:[s.jsx(q.button,{type:"button",role:"radio","aria-checked":o,"data-state":af(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||c==null||c(),v&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})}),v&&s.jsx(of,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});tf.displayName=Ba;var rf="RadioIndicator",nf=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=nC(rf,r);return s.jsx(Ce,{present:n||a.checked,children:s.jsx(q.span,{"data-state":af(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});nf.displayName=rf;var oC="RadioBubbleInput",of=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=Mn(r),u=_n(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx(q.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});of.displayName=oC;function af(e){return e?"checked":"unchecked"}var aC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qn="RadioGroup",[sC,Ok]=ye(Qn,[vt,ef]),sf=vt(),lf=ef(),[iC,lC]=sC(Qn),cf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=sf(r),b=_t(u),[v,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:Qn});return s.jsx(iC,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:x,children:s.jsx(zn,{asChild:!0,...m,orientation:c,dir:b,loop:f,children:s.jsx(q.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});cf.displayName=Qn;var df="RadioGroupItem",uf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=lC(df,r),i=a.disabled||n,l=sf(r),c=lf(r),u=d.useRef(null),f=ae(t,u),p=a.value===o.value,g=d.useRef(!1);return d.useEffect(()=>{const m=v=>{aC.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(qn,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(tf,{disabled:i,required:a.required,checked:p,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});uf.displayName=df;var cC="RadioGroupIndicator",ff=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=lf(r);return s.jsx(nf,{...o,...n,ref:t})});ff.displayName=cC;var dC=cf,uC=uf,fC=ff;function pC({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(dC,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:j("qodo qodo-radio-group grid gap-3 group",e),...n})}function mC({className:e,...t}){return s.jsx(uC,{"data-slot":"radio-group-item",className:j("qodo qodo-radio-group-item cursor-pointer border-[var(--border-input-neutral-idle)] bg-[var(--fill-input-neutral-idle)] focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","aria-checked:border-[var(--border-input-emphasis-active)] hover:aria-checked:border-[var(--border-input-emphasis-active)]","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","data-disabled:cursor-not-allowed data-disabled:opacity-50","aria-disabled:cursor-not-allowed aria-disabled:opacity-50","mt-[2px] mr-0",e),...t,children:s.jsx(fC,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(Gg,{className:"stroke-transparent fill-[var(--icon-input-emphasis-active)] absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Ga=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=j("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":c==="horizontal","flex-col gap-3":c==="vertical"},l);return s.jsx(pC,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});Ga.displayName="BaseRadioGroupComponent";const Wa=({label:e,description:t,disabled:r=!1,labelClassName:n,descriptionClassName:o,labelWrapperClassName:a})=>s.jsxs("div",{className:j("flex flex-col gap-2",a),children:[e&&s.jsx("div",{className:j("text-[var(--text-bg-neutral-mid)] font-normal text-sm","group-has-[button:disabled]/radio-item:opacity-70","group-has-[button:disabled]/checkbox-item:opacity-70",{"opacity-70":r},n),children:e}),t&&s.jsx("div",{className:j("text-sm text-[var(--text-bg-neutral-mild)] font-normal",o),children:t})]});Wa.displayName="LabelWithDescription";const za=({value:e="",disabled:t,error:r,name:n="radio",label:o,description:a,wrapperClassName:i,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})=>{const f=`${n}-${e}`;return s.jsxs(La,{htmlFor:f,className:j("group/radio-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal leading-5 cursor-pointer","has-[button:disabled]:cursor-not-allowed has-[button:disabled]:hover:bg-transparent",{"cursor-pointer hover:bg-muted/50":!t,"!cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},i),children:[s.jsx(mC,{value:e,id:f,disabled:t||r}),s.jsx(Wa,{label:o,description:a,disabled:t,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})]},e)};za.displayName="RadioGroupItemComponent";const gC=It(Ga),vC=e=>s.jsx("hr",{className:"w-full h-px border-[var(--base-sidebar-border)]",...e}),hC=({children:e,description:t,className:r})=>s.jsxs("div",{className:j("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),pf=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=j("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});pf.displayName="FormGroup";function xC({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:j("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const bC=S.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=It(xC);return s.jsx(o,{...r,ref:n,className:j({"font-plex-mono text-sm leading-relaxed rounded dark:bg-fill-input-neutral-idle px-3 py-2 border-0":e==="code"},t)})}),mf=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Zt,{variant:a,disabled:n,size:"sm",className:j("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(En,{className:"w-[10px] h-[10px]"})})]}),yC=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:j("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(mf,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Qe,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(iv,{className:"h-4 w-4"})})]})}),ko={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},wC=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},gf=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:c,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=wC,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:h=()=>{},onResetTags:C=()=>{}})=>{const[E,k]=S.useState(""),[N,T]=S.useState(!1),P=S.useRef(null),V=S.useRef(null),H=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const Q=e.length>=i,W=L=>{if(Q||e.some(K=>K.id===L.id))return;const A=[...e,L];x(A),y(L)},D=L=>{const A=e.filter(K=>K.id!==L);x(A),h(L)},I=()=>{x==null||x([]),C()},O=L=>{const A=L.target.value;k(A),T(!0)},R=()=>{const L=E.trim().toLowerCase();if(!L)return[];const A=new Set(e.map(K=>K.id));return o.filter(K=>K.label.toLowerCase().includes(L)&&!A.has(K.id))},M=L=>v?v(L):L,B=()=>{const L=E.trim();if(!L)return;const A=M(L);if(!A)return;if(e.some(ee=>ee.id===A)){k(""),T(!1);return}const K=o.find(ee=>ee.id===A||M(ee.label)===A);K?W(K):a&&W({id:A,label:A}),k(""),T(!1)},J=L=>{const A=L.key===ko.BACKSPACE&&!E&&e.length>0,K=L.key===ko.ENTER&&E,ee=L.key===ko.ESCAPE;K?(L.preventDefault(),B(),H.current&&(H.current.scrollLeft=H.current.scrollWidth)):A?D(e[e.length-1].id):ee&&T(!1)},_=()=>{if(E&&R().length>0)return s.jsx(Sa,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:L=>L.preventDefault(),onCloseAutoFocus:L=>L.preventDefault(),onMouseDown:L=>L.preventDefault(),children:s.jsx("div",{className:j("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:R().map(L=>s.jsx(yC,{label:L.label,id:L.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var A;W(L),k(""),T(!1),(A=P.current)==null||A.focus()}},L.id))})})},G=()=>g||s.jsx(av,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Z=()=>e.map(L=>s.jsx(mf,{label:L.label,id:L.id,onRemoveTag:D,disabled:l,className:p,variant:t},L.id)),z=()=>e.length===0?s.jsx(s.Fragment,{}):s.jsx(En,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:I});return s.jsx("div",{className:j("w-full",c),children:s.jsxs(wa,{open:N&&!l,onOpenChange:T,modal:!1,children:[s.jsx(Ca,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:j("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:L=>{var A;L.stopPropagation(),T(!0),(A=P.current)==null||A.focus()},children:[G(),s.jsxs("div",{ref:H,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Z(),s.jsx(jr,{ref:P,value:E,onChange:O,onClick:L=>L.stopPropagation(),onFocus:()=>T(!0),onBlur:b,onKeyDown:J,placeholder:r,disabled:l||Q,className:j("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),z()]})}),_()]})})};function CC(e){const{control:t}=ir();return s.jsx(_u,{name:e.name,control:t,render:({field:r})=>s.jsx(gf,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const SC=It(CC),EC=12,hi={SINGLE:"single",MULTIPLE:"multiple"},xi={LTR:"ltr"};var vf=typeof global=="object"&&global&&global.Object===Object&&global,RC=typeof self=="object"&&self&&self.Object===Object&&self,xt=vf||RC||Function("return this")(),hn=xt.Symbol,hf=Object.prototype,kC=hf.hasOwnProperty,jC=hf.toString,pr=hn?hn.toStringTag:void 0;function PC(e){var t=kC.call(e,pr),r=e[pr];try{e[pr]=void 0;var n=!0}catch{}var o=jC.call(e);return n&&(t?e[pr]=r:delete e[pr]),o}var NC=Object.prototype,TC=NC.toString;function _C(e){return TC.call(e)}var AC="[object Null]",IC="[object Undefined]",bi=hn?hn.toStringTag:void 0;function $r(e){return e==null?e===void 0?IC:AC:bi&&bi in Object(e)?PC(e):_C(e)}function qa(e){return e!=null&&typeof e=="object"}var MC=Array.isArray;function xf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var OC="[object AsyncFunction]",DC="[object Function]",$C="[object GeneratorFunction]",LC="[object Proxy]";function bf(e){if(!xf(e))return!1;var t=$r(e);return t==DC||t==$C||t==OC||t==LC}var jo=xt["__core-js_shared__"],yi=(function(){var e=/[^.]+$/.exec(jo&&jo.keys&&jo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function FC(e){return!!yi&&yi in e}var VC=Function.prototype,BC=VC.toString;function Mt(e){if(e!=null){try{return BC.call(e)}catch{}try{return e+""}catch{}}return""}var GC=/[\\^$.*+?()[\]{}|]/g,WC=/^\[object .+?Constructor\]$/,zC=Function.prototype,qC=Object.prototype,UC=zC.toString,HC=qC.hasOwnProperty,KC=RegExp("^"+UC.call(HC).replace(GC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function YC(e){if(!xf(e)||FC(e))return!1;var t=bf(e)?KC:WC;return t.test(Mt(e))}function XC(e,t){return e==null?void 0:e[t]}function Lr(e,t){var r=XC(e,t);return YC(r)?r:void 0}var Zo=Lr(xt,"WeakMap"),ZC=9007199254740991;function yf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ZC}function JC(e){return e!=null&&yf(e.length)&&!bf(e)}var QC=Object.prototype;function wf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||QC;return e===r}var e1="[object Arguments]";function wi(e){return qa(e)&&$r(e)==e1}var Cf=Object.prototype,t1=Cf.hasOwnProperty,r1=Cf.propertyIsEnumerable,n1=wi((function(){return arguments})())?wi:function(e){return qa(e)&&t1.call(e,"callee")&&!r1.call(e,"callee")};function o1(){return!1}var Sf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ci=Sf&&typeof module=="object"&&module&&!module.nodeType&&module,a1=Ci&&Ci.exports===Sf,Si=a1?xt.Buffer:void 0,s1=Si?Si.isBuffer:void 0,i1=s1||o1,l1="[object Arguments]",c1="[object Array]",d1="[object Boolean]",u1="[object Date]",f1="[object Error]",p1="[object Function]",m1="[object Map]",g1="[object Number]",v1="[object Object]",h1="[object RegExp]",x1="[object Set]",b1="[object String]",y1="[object WeakMap]",w1="[object ArrayBuffer]",C1="[object DataView]",S1="[object Float32Array]",E1="[object Float64Array]",R1="[object Int8Array]",k1="[object Int16Array]",j1="[object Int32Array]",P1="[object Uint8Array]",N1="[object Uint8ClampedArray]",T1="[object Uint16Array]",_1="[object Uint32Array]",pe={};pe[S1]=pe[E1]=pe[R1]=pe[k1]=pe[j1]=pe[P1]=pe[N1]=pe[T1]=pe[_1]=!0;pe[l1]=pe[c1]=pe[w1]=pe[d1]=pe[C1]=pe[u1]=pe[f1]=pe[p1]=pe[m1]=pe[g1]=pe[v1]=pe[h1]=pe[x1]=pe[b1]=pe[y1]=!1;function A1(e){return qa(e)&&yf(e.length)&&!!pe[$r(e)]}function I1(e){return function(t){return e(t)}}var Ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yr=Ef&&typeof module=="object"&&module&&!module.nodeType&&module,M1=yr&&yr.exports===Ef,Po=M1&&vf.process,Ei=(function(){try{var e=yr&&yr.require&&yr.require("util").types;return e||Po&&Po.binding&&Po.binding("util")}catch{}})(),Ri=Ei&&Ei.isTypedArray,O1=Ri?I1(Ri):A1;function D1(e,t){return function(r){return e(t(r))}}var $1=D1(Object.keys,Object),L1=Object.prototype,F1=L1.hasOwnProperty;function V1(e){if(!wf(e))return $1(e);var t=[];for(var r in Object(e))F1.call(e,r)&&r!="constructor"&&t.push(r);return t}var Jo=Lr(xt,"Map"),Qo=Lr(xt,"DataView"),ea=Lr(xt,"Promise"),ta=Lr(xt,"Set"),ki="[object Map]",B1="[object Object]",ji="[object Promise]",Pi="[object Set]",Ni="[object WeakMap]",Ti="[object DataView]",G1=Mt(Qo),W1=Mt(Jo),z1=Mt(ea),q1=Mt(ta),U1=Mt(Zo),St=$r;(Qo&&St(new Qo(new ArrayBuffer(1)))!=Ti||Jo&&St(new Jo)!=ki||ea&&St(ea.resolve())!=ji||ta&&St(new ta)!=Pi||Zo&&St(new Zo)!=Ni)&&(St=function(e){var t=$r(e),r=t==B1?e.constructor:void 0,n=r?Mt(r):"";if(n)switch(n){case G1:return Ti;case W1:return ki;case z1:return ji;case q1:return Pi;case U1:return Ni}return t});var H1="[object Map]",K1="[object Set]",Y1=Object.prototype,X1=Y1.hasOwnProperty;function lr(e){if(e==null)return!0;if(JC(e)&&(MC(e)||typeof e=="string"||typeof e.splice=="function"||i1(e)||O1(e)||n1(e)))return!e.length;var t=St(e);if(t==H1||t==K1)return!e.size;if(wf(e))return!V1(e).length;for(var r in e)if(X1.call(e,r))return!1;return!0}function eo(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>eo(t))}function Ua(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Ua(r))}),t}function Ha(e,t){return lr(e.children)?!1:eo(e).every(n=>t.has(n))}function Z1(e,t){return lr(e.children)?!1:eo(e).some(n=>t.has(n))}function Rf(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=Rf(r.children,t);if(n)return n}}return null}function Ka(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Ka(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function kf(e,t){e.forEach(r=>{lr(r.children)||(Ha(r,t)?t.add(r.value):t.delete(r.value),r.children&&kf(r.children,t))})}const J1=e=>e?Array.isArray(e)?e:[e]:[],Q1=e=>Ka(e,t=>[t.value,t.label]),eS=e=>Ka(e,t=>t.icon?[t.value,t.icon]:null);function tS(e,t){Ua(e).forEach(n=>t.delete(n))}function rS(e,t){Ua(e).forEach(n=>t.add(n))}function jf(e,t){const r=new Set(t);return e.flatMap(n=>!lr(n.children)&&n.children?Ha(n,r)?[n.value]:jf(n.children,t):r.has(n.value)?[n.value]:[])}function nS(e){return e&&e>1?e*EC:0}function Pf({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=xi.LTR}){const i=!lr(e.children),l=t.has(e.value),c=`${nS(n)}px`,u=Ha(e,t),p=Z1(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(zg,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(Ug,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(tr,{className:j("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),x=()=>{if(i)return e.children.map(h=>s.jsx(Pf,{option:h,selected:t,onSelect:r,nestLevel:n+1,dir:a},h.value))},y=()=>s.jsxs("div",{className:j("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===xi.LTR}),style:{paddingLeft:c},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(fd,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:j("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),x()]})}function oS({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=hi.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:c,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(Sn,{}),dir:b="ltr",...v}){const[x,y]=S.useState(0),[h,C]=S.useState(!1),E=S.useRef(null),k=o===hi.MULTIPLE,[N,T]=S.useState(e!==void 0?e:k?[]:""),P=J1(N),V=new Set(P);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[N]);const H=Q1(t),re=eS(t);S.useEffect(()=>{e!==void 0&&T(k?e||[]:e||"")},[e,k]);function te(O,R){if(!k){T(O),r==null||r(O),C(!1);return}T(M=>{const B=Array.isArray(M)?M:[],J=new Set(B),_=Rf(t,O);if(!_)return B;R?Q(_,J):W(O,J);const G=Array.from(J);return r==null||r(G),G})}function Q(O,R){eo(O).every(J=>R.has(J))?tS(O,R):rS(O,R)}function W(O,R){R.has(O)?R.delete(O):R.add(O),kf(t,R)}const D=()=>{const O=jf(t,P);return O.length===0?s.jsx(Zt,{variant:p,size:"md",className:j("text-purple-muted-300",f),children:a}):O.map(M=>{const B=re.get(M),J=H.get(M)||M;return s.jsx(Zt,{variant:p,size:"md",className:j("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[B&&s.jsx("div",{className:"flex-shrink-0",children:B}),s.jsx("span",{children:J})]})},M)})},I=()=>{if(g)return s.jsx(ld,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(wa,{open:h,onOpenChange:n?void 0:C,children:[s.jsx(Ca,{asChild:!0,disabled:n,children:s.jsxs("div",{className:j("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:j("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",c),children:D()}),s.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:m})]})}),s.jsx(Sa,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:x??"auto"},children:s.jsxs(id,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[I(),s.jsxs(cd,{children:[s.jsx(dd,{children:l}),s.jsx(ud,{children:t.map(O=>s.jsx(Pf,{disabled:n,option:O,selected:V,onSelect:te,dir:b},O.value))})]})]})})]})}const Nf=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,c=u=>{n||r&&r({target:{value:u}})};return s.jsx(oS,{options:t,value:o,disabled:a,...l,onSelect:c,mode:i})});Nf.displayName="BaseSelectComponent";const aS=It(Nf),Ya=S.forwardRef((e,t)=>{const{value:r=[],defaultValue:n=[],onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="vertical",onChange:u,children:f,...p}=e,[g,m]=S.useState(lr(r)?n:r),b=c==="horizontal",v=r!==void 0?r:g,x=(C,E)=>{if(i)return;const k=E?[...v,C]:v.filter(N=>N!==C);r===void 0&&m(k),u==null||u({target:{value:k}}),o==null||o(k)},y=j("qodo qodo-custom-checkbox-group","flex",{"flex-row gap-6":b,"flex-col gap-3":!b},l),h=()=>S.Children.map(f,C=>{if(!S.isValidElement(C))return C;const E=C.props.name;if(!E)return C;const k=C.props.disabled,N=i||a||k;return S.cloneElement(C,{checked:v.includes(E),onCheckedChange:T=>x(E,T),disabled:N,name:E})});return s.jsx("div",{ref:t,className:y,...p,children:h()})});Ya.displayName="CheckboxGroupComponent";var to="Checkbox",[sS,Dk]=ye(to),[iS,Xa]=sS(to);function lS(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,m]=be({prop:r,defaultProp:o??!1,onChange:c,caller:to}),[b,v]=d.useState(null),[x,y]=d.useState(null),h=d.useRef(!1),C=b?!!i||!!b.closest("form"):!0,E={checked:g,disabled:a,setChecked:m,control:b,setControl:v,name:l,form:i,value:f,hasConsumerStoppedPropagationRef:h,required:u,defaultChecked:it(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:y};return s.jsx(iS,{scope:t,...E,children:cS(p)?p(E):n})}var Tf="CheckboxTrigger",_f=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:i,disabled:l,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=Xa(Tf,e),v=ae(o,f),x=d.useRef(c);return d.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const h=()=>p(x.current);return y.addEventListener("reset",h),()=>y.removeEventListener("reset",h)}},[a,p]),s.jsx(q.button,{type:"button",role:"checkbox","aria-checked":it(c)?"mixed":c,"aria-required":u,"data-state":Df(c),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:v,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(r,y=>{p(h=>it(h)?!0:!h),b&&m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});_f.displayName=Tf;var Za=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c,onCheckedChange:u,form:f,...p}=e;return s.jsx(lS,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:l,required:i,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>s.jsxs(s.Fragment,{children:[s.jsx(_f,{...p,ref:t,__scopeCheckbox:r}),g&&s.jsx(Of,{__scopeCheckbox:r})]})})});Za.displayName=to;var Af="CheckboxIndicator",If=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=Xa(Af,r);return s.jsx(Ce,{present:n||it(a.checked)||a.checked===!0,children:s.jsx(q.span,{"data-state":Df(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});If.displayName=Af;var Mf="CheckboxBubbleInput",Of=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:l,disabled:c,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:m}=Xa(Mf,e),b=ae(r,m),v=Mn(a),x=_n(n);d.useEffect(()=>{const h=g;if(!h)return;const C=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(C,"checked").set,N=!o.current;if(v!==a&&k){const T=new Event("click",{bubbles:N});h.indeterminate=it(a),k.call(h,it(a)?!1:a),h.dispatchEvent(T)}},[g,v,a,o]);const y=d.useRef(it(a)?!1:a);return s.jsx(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Of.displayName=Mf;function cS(e){return typeof e=="function"}function it(e){return e==="indeterminate"}function Df(e){return it(e)?"indeterminate":e?"checked":"unchecked"}const $f=d.forwardRef(({className:e,...t},r)=>s.jsx(Za,{ref:r,className:j("h-4 w-4 shrink-0 rounded-xs shadow disabled:cursor-not-allowed bg-[var(--fill-input-neutral-idle)] border border-[var(--border-input-neutral-idle)] hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)] ","active:border-[var(--border-input-neutral-active)] active:bg-[var(--fill-input-neutral-active)] disabled:border-[var(--border-input-neutral-disabled)] disabled:bg-[var(--fill-input-neutral-disabled)] ","hover:disabled:border-[var(--border-input-neutral-disabled)] hover:disabled:bg-[var(--fill-input-neutral-disabled)] ","data-[state=checked]:border-[var(--border-input-emphasis-idle)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)] hover:data-[state=checked]:border-[var(--border-input-emphasis-hover)] hover:data-[state=checked]:bg-[var(--fill-input-emphasis-hover)] active:data-[state=checked]:border-[var(--border-input-emphasis-active)] active:data-[state=checked]:bg-[var(--fill-input-emphasis-active)] disabled:data-[state=checked]:border-[var(--border-input-emphasis-disabled)] disabled:data-[state=checked]:bg-[var(--fill-input-emphasis-disabled)] ",e),...t,children:s.jsx(If,{className:j("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?s.jsx(rv,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"}):s.jsx(tr,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"})})}));$f.displayName=Za.displayName;const Ja=({disabled:e,error:t,name:r="checkbox",checked:n,onCheckedChange:o,label:a,description:i,labelWrapperClassName:l,labelClassName:c,descriptionClassName:u,checkboxClassName:f,wrapperClassName:p})=>s.jsxs(La,{htmlFor:r,className:j("group/checkbox-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer hover:bg-muted/50":!e,"cursor-not-allowed hover:bg-transparent":e,"border border-destructive":t},p),children:[s.jsx($f,{id:r,disabled:e||t,checked:n,onCheckedChange:o,className:j("mt-0.5",f)}),s.jsx(Wa,{label:a,description:i,disabled:e,labelClassName:c,descriptionClassName:u,labelWrapperClassName:l})]});Ja.displayName="CheckboxGroupItemComponent";const dS=It(Ya),Pe=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,c=j("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(Iu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:c,onSubmit:l(a),...i})})};Pe.Button=p0;Pe.Input=J0;Pe.Select=aS;Pe.Combobox=eC;Pe.RadioGroup=gC;Pe.RadioGroupItem=za;Pe.Group=pf;Pe.Textarea=bC;Pe.Divider=vC;Pe.Title=hC;Pe.TagsInput=SC;Pe.CheckboxGroup=dS;Pe.Checkbox=Ja;function uS(e){return e==null?[]:Array.isArray(e)?e:[e]}var fS=e=>Array.from(Array(e).keys()),_i=e=>(e==null?void 0:e.constructor.name)==="Array",pS=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Qa(e[r],t[r]))return!1;return!0},Qa=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(_i(e)&&_i(t))return pS(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!Qa(e[a],t[a]))return!1}return!0},mS=e=>e!=null&&typeof e=="object",on=e=>typeof e=="string",vr=e=>typeof e=="function",gS=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),vS=e=>Object.prototype.toString.call(e),Lf=Function.prototype.toString,hS=Lf.call(Object),xS=e=>{if(!mS(e)||vS(e)!="[object Object]"||wS(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=gS(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Lf.call(r)==hS},bS=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,yS=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,wS=e=>bS(e)||yS(e),CS=e=>e(),SS=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},ES=e=>Number.isNaN(e),RS=e=>ES(e)?0:e,kS=(e,t,r)=>{const n=RS(e),o=n>=t,a=r==null||n<=r;return o&&a};function Ff(e){if(!xS(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=Ff(o))}return r}function Ai(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function jS(e,t){if(e==null)throw new Error(t())}var Vf=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,PS=9,NS=e=>Vf(e)&&e.nodeType===PS,TS=e=>Vf(e)&&e===e.window;function _S(e){if(!e)return!1;const t=e.getRootNode();return Bf(t)===e}function AS(e){return NS(e)?e:TS(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Bf(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var IS=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),MS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ii=e=>{const t={};let r;for(;r=MS.exec(e);)t[r[1]]=r[2];return t},OS=(e,t)=>{if(on(e)){if(on(t))return`${e};${t}`;e=Ii(e)}else on(t)&&(t=Ii(t));return Object.assign({},e??{},t??{})};function Be(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=SS(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=IS(t[o],r[o]);continue}if(o==="style"){t[o]=OS(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function DS(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((c,u)=>!Qa(n[u],c)))&&(n=i,o=t(i,a)),o}}var qt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(qt||{}),No="__init__";function $S(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>AS(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Bf(t()),isActiveElement:_S,getById:i=>t().getElementById(i)}}function LS(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var FS=()=>e=>Array.from(new Set(e)),Gf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function xn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const c=S.useRef(l.current);Gf(()=>{c.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=c.current,m=vr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?kr.flushSync:CS)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}xn.cleanup=e=>{S.useEffect(()=>e,[])};xn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function VS(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var BS=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function GS(e,t={}){var re,te,Q,W;const r=S.useMemo(()=>{const{id:D,ids:I,getRootNode:O}=t;return $S({id:D,ids:I,getRootNode:O})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:Ff(t),scope:r}))??t,a=WS(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:xn,scope:r,flush:Mi,getContext(){return c},getComputed(){return k},getRefs(){return v},getEvent(){return m()}}),l=Wf(i),c={get(D){var I;return(I=l.current)==null?void 0:I[D].ref.current},set(D,I){var O;(O=l.current)==null||O[D].set(I)},initial(D){var I;return(I=l.current)==null?void 0:I[D].initial},hash(D){var O,R;const I=(O=l.current)==null?void 0:O[D].get();return(R=l.current)==null?void 0:R[D].hash(I)}},u=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),b=()=>({...N,matches(...D){return D.includes(N.ref.current)},hasTag(D){var I,O;return!!((O=(I=e.states[N.ref.current])==null?void 0:I.tags)!=null&&O.includes(D))}}),v=VS(((Q=e.refs)==null?void 0:Q.call(e,{prop:a,context:c}))??{}),x=()=>({state:b(),context:c,event:m(),prop:a,send:H,action:y,guard:h,track:BS,refs:v,computed:k,flush:Mi,scope:r,choose:E}),y=D=>{const I=vr(D)?D(x()):D;if(!I)return;const O=I.map(R=>{var B,J;const M=(J=(B=e.implementations)==null?void 0:B.actions)==null?void 0:J[R];return M||Ai(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of O)R==null||R(x())},h=D=>{var I,O;return vr(D)?D(x()):(O=(I=e.implementations)==null?void 0:I.guards)==null?void 0:O[D](x())},C=D=>{const I=vr(D)?D(x()):D;if(!I)return;const O=I.map(M=>{var J,_;const B=(_=(J=e.implementations)==null?void 0:J.effects)==null?void 0:_[M];return B||Ai(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of O){const B=M==null?void 0:M(x());B&&R.push(B)}return()=>R.forEach(M=>M==null?void 0:M())},E=D=>uS(D).find(I=>{let O=!I.guard;return on(I.guard)?O=!!h(I.guard):vr(I.guard)&&(O=I.guard(x())),O}),k=D=>{jS(e.computed,()=>"[zag-js] No computed object found on machine");const I=e.computed[D];return I({context:c,event:m(),prop:a,refs:v,scope:r,computed:k})},N=xn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,I){var R,M,B,J;if(I){const _=u.current.get(I);_==null||_(),u.current.delete(I)}I&&y((R=e.states[I])==null?void 0:R.exit),y((M=f.current)==null?void 0:M.actions);const O=C((B=e.states[D])==null?void 0:B.effects);if(O&&u.current.set(D,O),I===No){y(e.entry);const _=C(e.effects);_&&u.current.set(No,_)}y((J=e.states[D])==null?void 0:J.entry)}})),T=S.useRef(void 0),P=S.useRef(qt.NotStarted);Gf(()=>{queueMicrotask(()=>{const O=P.current===qt.Started;P.current=qt.Started,n(O?"rehydrating...":"initializing...");const R=T.current??N.initial;N.invoke(R,O?N.get():No)});const D=u.current,I=N.ref.current;return()=>{n("unmounting..."),T.current=I,P.current=qt.Stopped,D.forEach(O=>O==null?void 0:O()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in N?N.ref.current:N.get(),H=D=>{queueMicrotask(()=>{var J,_;if(P.current!==qt.Started)return;p.current=g.current,g.current=D;let I=V();const O=((J=e.states[I].on)==null?void 0:J[D.type])??((_=e.on)==null?void 0:_[D.type]),R=E(O);if(!R)return;f.current=R;const M=R.target??I;n("transition",D.type,R.target||I,`(${R.actions})`);const B=M!==I;B?kr.flushSync(()=>N.set(M)):R.reenter&&!B?N.invoke(I,I):y(R.actions??[])})};return(W=e.watch)==null||W.call(e,x()),{state:b(),send:H,context:c,prop:a,scope:r,refs:v,computed:k,event:m(),getStatus:()=>P.current}}function Wf(e){const t=S.useRef(e);return t.current=e,t}function WS(e){const t=Wf(e);return function(n){return t.current[n]}}function Mi(e){queueMicrotask(()=>{kr.flushSync(()=>e())})}var zS=LS(e=>e);function qS(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function US(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const To=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),c=US(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?qS(n,c):c})}));return t.displayName=e.displayName||e.name,t},HS=()=>{const e=new Map;return new Proxy(To,{apply(t,r,n){return To(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,To(n)),e.get(n)}})},Xe=HS();function KS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Fr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function c(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??KS(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,c),p}return u}return[l.Provider,c,l]}const[YS,nt]=Fr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),zf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});zf.displayName="StepsCompletedContent";const es=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),qf=S.forwardRef((e,t)=>{const[r,n]=es()(e,["index"]),o=nt(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});qf.displayName="StepsContent";const[XS,ts]=Fr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Uf=S.forwardRef((e,t)=>{const r=nt(),n=ts(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Uf.displayName="StepsIndicator";const[ZS,$k]=Fr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),Hf=S.forwardRef((e,t)=>{const[r,n]=es()(e,["index"]),o=nt(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(XS,{value:r,children:s.jsx(ZS,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});Hf.displayName="StepsItem";const Kf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});Kf.displayName="StepsList";const Yf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Yf.displayName="StepsNextTrigger";const Xf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Xf.displayName="StepsPrevTrigger";var hr=(e,t=[])=>({parts:(...r)=>{if(JS(t))return hr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>hr(e,[...t,...r]),omit:(...r)=>hr(e,t.filter(n=>!r.includes(n))),rename:r=>hr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Gt(e)}"][data-part="${Gt(n)}"]`,`& [data-scope="${Gt(e)}"][data-part="${Gt(n)}"]`].join(", "),attrs:{"data-scope":Gt(e),"data-part":Gt(n)}}}),{})}),Gt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),JS=e=>e.length===0,QS=hr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=QS.build(),eE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},tE=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Oi=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},rE=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function nE(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),c=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Oi(i,y.index),contentId:rE(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===c-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:x,getRootProps(){return t.element({...ze.root.attrs,id:eE(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const h=fS(c).map((C,E)=>Oi(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:tE(i),role:"tablist","aria-owns":h.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const h=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":h.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const h=g(y);return t.button({...ze.trigger.attrs,id:h.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||h.current?0:-1,"aria-selected":h.current,"aria-controls":h.contentId,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const h=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:h.contentId,role:"tabpanel",tabIndex:0,hidden:!h.current,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":h.triggerId})},getIndicatorProps(y){const h=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getSeparatorProps(y){const h=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},getProgressProps(){return t.element({dir:a("dir"),...ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":We(u===100)})}}}var oE={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:DS(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){aE(t("count"),e.get("step"))}}}},aE=(e,t)=>{if(!kS(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};FS()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[Lk,sE]=Fr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[Fk,iE]=Fr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function lE(e){const t=S.useId(),{getRootNode:r}=sE(),{dir:n}=iE(),o={id:t,dir:n,getRootNode:r,...e},a=GS(oE,o);return nE(a,zS)}const Zf=S.forwardRef((e,t)=>{const[r,n]=es()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=lE(r),a=Be(o.getRootProps(),n);return s.jsx(YS,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});Zf.displayName="StepsRoot";const Jf=S.forwardRef((e,t)=>{const r=nt(),n=ts(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Jf.displayName="StepsSeparator";const Qf=S.forwardRef((e,t)=>{const r=nt(),n=ts(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});Qf.displayName="StepsTrigger";function cE(e){return $u({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const ep=S.createContext(void 0),dE=({children:e,step:t})=>s.jsx(ep.Provider,{value:{step:t},children:e}),tp=()=>{const e=S.useContext(ep);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},uE=({className:e,step:t,...r})=>{const n=j("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(dE,{step:t??0,children:s.jsx(Zf,{className:n,step:t,...r})})},fE=({className:e,...t})=>{const r=j("flex flex-row gap-4",e);return s.jsx(Kf,{className:r,...t})},pE=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4",e);return s.jsx(Hf,{className:r,...t})},mE=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(Qf,{className:r,...t})},gE=({index:e,className:t,...r})=>{const{step:n}=tp(),o=e===n,a=e<n,i=j("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),l=j({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(Uf,{className:i,...r,children:a?s.jsx(cE,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},vE=({index:e,className:t,...r})=>{const{step:n}=tp(),o=e<n,a=j("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(Jf,{className:a,...r})},hE=({className:e,...t})=>{const r=j(e);return s.jsx(qf,{className:r,...t})},xE=({className:e,...t})=>{const r=j(e);return s.jsx(zf,{className:r,...t})},bE=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Xf,{className:r,...t})},yE=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Yf,{className:r,...t})},wE={Root:uE,List:fE,Item:pE,Trigger:mE,Indicator:gE,Separator:vE,Content:hE,CompletedContent:xE,PrevTrigger:bE,NextTrigger:yE},Vr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Xu,{...r,children:s.jsxs(Zu,{children:[s.jsx(Ju,{...n,children:e}),t&&s.jsx(Qu,{...o,children:t})]})});/**
209
+ Defaulting to \`null\`.`}var zy=Pd,qy=Td;function Uy({className:e,value:t,...r}){return s.jsx(zy,{"data-slot":"progress",className:j("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(qy,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Ad({className:e,...t}){return s.jsx("div",{className:j("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Wn="Switch",[Hy,Tk]=ye(Wn),[Ky,Yy]=Hy(Wn),Id=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,m]=d.useState(null),b=ae(t,C=>m(C)),v=d.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,h]=be({prop:o,defaultProp:a??!1,onChange:u,caller:Wn});return s.jsxs(Ky,{scope:r,checked:y,disabled:l,children:[s.jsx(q.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":$d(y),"data-disabled":l?"":void 0,disabled:l,value:c,...p,ref:b,onClick:F(e.onClick,C=>{h(E=>!E),x&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),x&&s.jsx(Dd,{control:g,bubbles:!v.current,name:n,value:c,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Id.displayName=Wn;var Md="SwitchThumb",Od=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Yy(Md,r);return s.jsx(q.span,{"data-state":$d(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Od.displayName=Md;var Xy="SwitchBubbleInput",Dd=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=Mn(r),u=_n(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Dd.displayName=Xy;function $d(e){return e?"checked":"unchecked"}var Zy=Id,Jy=Od;function Qy({className:e,...t}){return s.jsx(Zy,{"data-slot":"switch",className:j("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Jy,{"data-slot":"switch-thumb",className:j("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Ld="Toggle",ja=d.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Ld});return s.jsx(q.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});ja.displayName=Ld;var ew=ja;const Fd=Cn("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function tw({className:e,variant:t,size:r,...n}){return s.jsx(ew,{"data-slot":"toggle",className:j(Fd({variant:t,size:r,className:e})),...n})}var Eo="rovingFocusGroup.onEntryFocus",rw={bubbles:!1,cancelable:!0},Or="RovingFocusGroup",[Uo,Vd,nw]=Rn(Or),[ow,vt]=ye(Or,[nw]),[aw,sw]=ow(Or),Bd=d.forwardRef((e,t)=>s.jsx(Uo.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Uo.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(iw,{...e,ref:t})})}));Bd.displayName=Or;var iw=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=d.useRef(null),m=ae(t,g),b=_t(a),[v,x]=be({prop:i,defaultProp:l??null,onChange:c,caller:Or}),[y,h]=d.useState(!1),C=De(u),E=Vd(r),k=d.useRef(!1),[N,T]=d.useState(0);return d.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(Eo,C),()=>P.removeEventListener(Eo,C)},[C]),s.jsx(aw,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(P=>x(P),[x]),onItemShiftTab:d.useCallback(()=>h(!0),[]),onFocusableItemAdd:d.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:d.useCallback(()=>T(P=>P-1),[]),children:s.jsx(q.div,{tabIndex:y||N===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{k.current=!0}),onFocus:F(e.onFocus,P=>{const V=!k.current;if(P.target===P.currentTarget&&V&&!y){const H=new CustomEvent(Eo,rw);if(P.currentTarget.dispatchEvent(H),!H.defaultPrevented){const re=E().filter(I=>I.focusable),te=re.find(I=>I.active),Q=re.find(I=>I.id===v),D=[te,Q,...re].filter(Boolean).map(I=>I.ref.current);zd(D,f)}}k.current=!1}),onBlur:F(e.onBlur,()=>h(!1))})})}),Gd="RovingFocusGroupItem",Wd=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,c=me(),u=a||c,f=sw(Gd,r),p=f.currentTabStopId===u,g=Vd(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return d.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Uo.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(q.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=dw(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(x.currentTarget);C=f.loop?uw(C,E+1):C.slice(E+1)}setTimeout(()=>zd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});Wd.displayName=Gd;var lw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dw(e,t,r){const n=cw(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return lw[n]}function zd(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function uw(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var zn=Bd,qn=Wd,ht="ToggleGroup",[qd,_k]=ye(ht,[vt]),Ud=vt(),Pa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(fw,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(pw,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ht}\``)});Pa.displayName=ht;var[Hd,Kd]=qd(ht),fw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:ht});return s.jsx(Hd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Yd,{...a,ref:t})})}),pw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:ht}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Hd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u,children:s.jsx(Yd,{...a,ref:t})})});Pa.displayName=ht;var[mw,gw]=qd(ht),Yd=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...c}=e,u=Ud(r),f=_t(i),p={role:"group",dir:f,...c};return s.jsx(mw,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(zn,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(q.div,{...p,ref:t})}):s.jsx(q.div,{...p,ref:t})})}),pn="ToggleGroupItem",Xd=S.forwardRef((e,t)=>{const r=Kd(pn,e.__scopeToggleGroup),n=gw(pn,e.__scopeToggleGroup),o=Ud(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},c=S.useRef(null);return n.rovingFocus?s.jsx(qn,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:s.jsx(di,{...l,ref:t})}):s.jsx(di,{...l,ref:t})});Xd.displayName=pn;var di=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=Kd(pn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(ja,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(n):a.onItemDeactivate(n)}})}),vw=Pa,hw=Xd;const Zd=d.createContext({size:"default",variant:"default"});function xw({className:e,variant:t,size:r,children:n,...o}){return s.jsx(vw,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:j("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:s.jsx(Zd.Provider,{value:{variant:t,size:r},children:n})})}function bw({className:e,children:t,variant:r,size:n,...o}){const a=d.useContext(Zd);return s.jsx(hw,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:j(Fd({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var Un="Collapsible",[yw,Jd]=ye(Un),[ww,Na]=yw(Un),Qd=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[c,u]=be({prop:n,defaultProp:o??!1,onChange:i,caller:Un});return s.jsx(ww,{scope:r,disabled:a,contentId:me(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:s.jsx(q.div,{"data-state":_a(c),"data-disabled":a?"":void 0,...l,ref:t})})});Qd.displayName=Un;var eu="CollapsibleTrigger",tu=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Na(eu,r);return s.jsx(q.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":_a(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});tu.displayName=eu;var Ta="CollapsibleContent",ru=d.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Na(Ta,e.__scopeCollapsible);return s.jsx(Ce,{present:r||o.open,children:({present:a})=>s.jsx(Cw,{...n,ref:t,present:a})})});ru.displayName=Ta;var Cw=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=Na(Ta,r),[l,c]=d.useState(n),u=d.useRef(null),f=ae(t,u),p=d.useRef(0),g=p.current,m=d.useRef(0),b=m.current,v=i.open||l,x=d.useRef(v),y=d.useRef(void 0);return d.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),we(()=>{const h=u.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const C=h.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),c(n)}},[i.open,n]),s.jsx(q.div,{"data-state":_a(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function _a(e){return e?"open":"closed"}var Sw=Qd,Ew=tu,Rw=ru,Ve="Accordion",kw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Aa,jw,Pw]=Rn(Ve),[Hn,Ak]=ye(Ve,[Pw,Jd]),Ia=Jd(),nu=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Aa.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(Aw,{...a,ref:t}):s.jsx(_w,{...o,ref:t})})});nu.displayName=Ve;var[ou,Nw]=Hn(Ve),[au,Tw]=Hn(Ve,{collapsible:!1}),_w=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,c]=be({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(ou,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:S.useCallback(()=>a&&c(""),[a,c]),children:s.jsx(au,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(su,{...i,ref:t})})})}),Aw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),c=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(ou,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:s.jsx(au,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(su,{...a,ref:t})})})}),[Iw,Kn]=Hn(Ve),su=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),c=ae(l,t),u=jw(r),p=_t(o)==="ltr",g=F(e.onKeyDown,m=>{var P;if(!kw.includes(m.key))return;const b=m.target,v=u().filter(V=>{var H;return!((H=V.ref.current)!=null&&H.disabled)}),x=v.findIndex(V=>V.ref.current===b),y=v.length;if(x===-1)return;m.preventDefault();let h=x;const C=0,E=y-1,k=()=>{h=x+1,h>E&&(h=C)},N=()=>{h=x-1,h<C&&(h=E)};switch(m.key){case"Home":h=C;break;case"End":h=E;break;case"ArrowRight":a==="horizontal"&&(p?k():N());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(p?N():k());break;case"ArrowUp":a==="vertical"&&N();break}const T=h%y;(P=v[T].ref.current)==null||P.focus()});return s.jsx(Iw,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Aa.Slot,{scope:r,children:s.jsx(q.div,{...i,"data-orientation":a,ref:c,onKeyDown:n?void 0:g})})})}),mn="AccordionItem",[Mw,Ma]=Hn(mn),iu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Kn(mn,r),i=Nw(mn,r),l=Ia(r),c=me(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(Mw,{scope:r,open:u,disabled:f,triggerId:c,children:s.jsx(Sw,{"data-orientation":a.orientation,"data-state":pu(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});iu.displayName=mn;var lu="AccordionHeader",cu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Kn(Ve,r),a=Ma(lu,r);return s.jsx(q.h3,{"data-orientation":o.orientation,"data-state":pu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});cu.displayName=lu;var Ho="AccordionTrigger",du=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Kn(Ve,r),a=Ma(Ho,r),i=Tw(Ho,r),l=Ia(r);return s.jsx(Aa.ItemSlot,{scope:r,children:s.jsx(Ew,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});du.displayName=Ho;var uu="AccordionContent",fu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Kn(Ve,r),a=Ma(uu,r),i=Ia(r);return s.jsx(Rw,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});fu.displayName=uu;function pu(e){return e?"open":"closed"}var Ow=nu,Dw=iu,$w=cu,Lw=du,Fw=fu;function Vw({...e}){return s.jsx(Ow,{"data-slot":"accordion",...e})}function Bw({className:e,...t}){return s.jsx(Dw,{"data-slot":"accordion-item",className:j("qodo qodo-accordion-item border-b border-[var(--border-interactive-neutral-idle)] text-[var(--text-interactive-neutral-idle)] text-base font-medium leading-6 hover:text-[var(--text-interactive-neutral-hover)]",e),...t})}function Gw({className:e,children:t,...r}){return s.jsx($w,{className:"flex",children:s.jsxs(Lw,{"data-slot":"accordion-trigger",className:j("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none text-text-interactive-neutral-idle focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:focus-visible:border-ring dark:focus-visible:ring-ring/50 cursor-pointer hover:text-[var(--text-interactive-neutral-hover)]",e),...r,children:[t,s.jsx(Sn,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Ww({className:e,children:t,...r}){return s.jsx(Fw,{"data-slot":"accordion-content",className:j("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:j("pt-0 pb-4 text-text-interactive-neutral-idle font-normal text-sm",e),children:t})})}var Yn="Tabs",[zw,Ik]=ye(Yn,[vt]),mu=vt(),[qw,Oa]=zw(Yn),gu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=_t(l),[p,g]=be({prop:n,onChange:o,defaultProp:a??"",caller:Yn});return s.jsx(qw,{scope:r,baseId:me(),value:p,onValueChange:g,orientation:i,dir:f,activationMode:c,children:s.jsx(q.div,{dir:f,"data-orientation":i,...u,ref:t})})});gu.displayName=Yn;var vu="TabsList",hu=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=Oa(vu,r),i=mu(r);return s.jsx(zn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:s.jsx(q.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});hu.displayName=vu;var xu="TabsTrigger",bu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Oa(xu,r),l=mu(r),c=Cu(i.baseId,n),u=Su(i.baseId,n),f=n===i.value;return s.jsx(qn,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(q.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(n):p.preventDefault()}),onKeyDown:F(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(n)}),onFocus:F(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!o&&p&&i.onValueChange(n)})})})});bu.displayName=xu;var yu="TabsContent",wu=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,l=Oa(yu,r),c=Cu(l.baseId,n),u=Su(l.baseId,n),f=n===l.value,p=d.useRef(f);return d.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),s.jsx(Ce,{present:o||f,children:({present:g})=>s.jsx(q.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});wu.displayName=yu;function Cu(e,t){return`${e}-trigger-${t}`}function Su(e,t){return`${e}-content-${t}`}var Uw=gu,Hw=hu,Kw=bu,Yw=wu;function Xw({className:e,...t}){return s.jsx(Uw,{"data-slot":"tabs",className:j("qodo qodo-tabs flex flex-col gap-2",e),...t})}function Zw({className:e,...t}){return s.jsx(Hw,{"data-slot":"tabs-list",className:j("inline-flex w-full items-end justify-start gap-4",e),...t})}function Jw({className:e,...t}){return s.jsx(Kw,{"data-slot":"tabs-trigger",className:j("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)] data-[state=active]:text-[var(--text-interactive-emphasis-active)] focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 border-b border-transparent py-4 text-xs font-normal whitespace-nowrap transition-[color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:border-[var(--color-purple-400)] relative -mb-px tracking-[0.01em] leading-[150%] cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Qw({className:e,...t}){return s.jsx(Yw,{"data-slot":"tabs-content",className:j("flex-1 outline-none",e),...t})}var e0=e=>e.type==="checkbox",gr=e=>e instanceof Date,Da=e=>e==null;const Eu=e=>typeof e=="object";var Tt=e=>!Da(e)&&!Array.isArray(e)&&Eu(e)&&!gr(e),t0=e=>Tt(e)&&e.target?e0(e.target)?e.target.checked:e.target.value:e,r0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,n0=(e,t)=>e.has(r0(t)),o0=e=>{const t=e.constructor&&e.constructor.prototype;return Tt(t)&&t.hasOwnProperty("isPrototypeOf")},a0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ru(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(a0&&(e instanceof Blob||n))&&(r||Tt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!o0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ru(e[o]));else return e;return t}var ku=e=>/^\w*$/.test(e),Ko=e=>e===void 0,s0=e=>Array.isArray(e)?e.filter(Boolean):[],ju=e=>s0(e.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(e,t,r)=>{if(!t||!Tt(e))return r;const n=(ku(t)?[t]:ju(t)).reduce((o,a)=>Da(o)?o:o[a],e);return Ko(n)||n===e?Ko(e[t])?r:e[t]:n},Ro=e=>typeof e=="boolean",ui=(e,t,r)=>{let n=-1;const o=ku(t)?[t]:ju(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let c=r;if(n!==i){const u=e[l];c=Tt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const fi={BLUR:"blur",CHANGE:"change"},pi={all:"all"},$a=S.createContext(null);$a.displayName="HookFormContext";const ir=()=>S.useContext($a),i0=e=>{const{children:t,...r}=e;return S.createElement($a.Provider,{value:r},t)};var l0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==pi.all&&(t._proxyFormState[i]=!n||pi.all),r&&(r[i]=!0),e[i]}});return o};const Pu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Nu(e){const t=ir(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),c=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pu(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>l0(i,r,c.current,!1),[i,r])}var c0=e=>typeof e=="string",d0=(e,t,r,n,o)=>c0(e)?je(r,e,o):Array.isArray(e)?e.map(a=>je(r,a)):r,mi=e=>Da(e)||!Eu(e);function Tu(e,t,r=new WeakSet){if(mi(e)||mi(t))return e===t;if(gr(e)&&gr(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(gr(i)&&gr(l)||Tt(i)&&Tt(l)||Array.isArray(i)&&Array.isArray(l)?!Tu(i,l,r):i!==l)return!1}}return!0}function u0(e){const t=ir(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},c=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,c.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return Pu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=d0(n,r._names,b.values||r._formValues,!1,c.current);if(u.current){const x=u.current(v);Tu(x,f.current)||(m(x),f.current=x)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function f0(e){const t=ir(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=n0(o._names.array,r),c=S.useMemo(()=>je(o._formValues,r,je(o._defaultValues,r,i)),[o,r,i]),u=u0({control:o,name:r,defaultValue:c,exact:!0}),f=Nu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...Ro(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!je(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!je(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!je(f.validatingFields,r)},error:{enumerable:!0,get:()=>je(f.errors,r)}}),[f,r]),b=S.useCallback(h=>g.current.onChange({target:{value:t0(h),name:r},type:fi.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:je(o._formValues,r),name:r},type:fi.BLUR}),[r,o._formValues]),x=S.useCallback(h=>{const C=je(o._fields,r);C&&h&&(C._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:E=>h.setCustomValidity(E),reportValidity:()=>h.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...Ro(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:x}),[r,n,f.disabled,b,v,x,u]);return S.useEffect(()=>{const h=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...Ro(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,k)=>{const N=je(o._fields,E);N&&N._f&&(N._f.mount=k)};if(C(r,!0),h){const E=Ru(je(o._options.defaultValues,r));ui(o._defaultValues,r,E),Ko(je(o._formValues,r))&&ui(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?h&&!o._state.action:h)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const _u=e=>e.render(f0(e)),Au=S.createContext(void 0),Iu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(Au.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(i0,{...t,children:o})})},Mu=()=>{const e=S.useContext(Au),t=ir();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},p0=({type:e="button",variant:t="outline",...r})=>{const n=()=>e==="submit"||e==="reset"?"default":t;return s.jsx(Qe,{type:e,variant:n(),...r})};var Ou={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gi=S.createContext&&S.createContext(Ou),m0=["attr","size","title"];function g0(e,t){if(e==null)return{};var r=v0(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function v0(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function gn(){return gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gn.apply(this,arguments)}function vi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vi(Object(r),!0).forEach(function(n){h0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h0(e,t,r){return t=x0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x0(e){var t=b0(e,"string");return typeof t=="symbol"?t:t+""}function b0(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Du(e){return e&&e.map((t,r)=>S.createElement(t.tag,vn({key:r},t.attr),Du(t.child)))}function $u(e){return t=>S.createElement(y0,gn({attr:vn({},e.attr)},t),Du(e.child))}function y0(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=g0(e,m0),l=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),S.createElement("svg",gn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:c,style:vn(vn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return gi!==void 0?S.createElement(gi.Consumer,null,r=>t(r)):t(Ou)}function w0(e){return $u({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var C0="Label",Lu=d.forwardRef((e,t)=>s.jsx(q.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Lu.displayName=C0;var S0=Lu;function La({className:e,...t}){return s.jsx(S0,{"data-slot":"label",className:j("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Fu=d.createContext({}),E0=({...e})=>s.jsx(Fu.Provider,{value:{name:e.name},children:s.jsx(_u,{...e})}),Xn=()=>{const e=d.useContext(Fu),t=d.useContext(Vu),{getFieldState:r}=ir(),n=Nu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},Vu=d.createContext({});function R0({className:e,...t}){const r=d.useId();return s.jsx(Vu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:j("qodo qodo-form-item grid gap-2",e),...t})})}function k0({className:e,...t}){const{formItemId:r}=Xn();return s.jsx(La,{"data-slot":"form-label",className:j("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function j0({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Xn();return s.jsx(vv,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function P0({className:e,...t}){const{formDescriptionId:r}=Xn();return s.jsx("p",{"data-slot":"form-description",id:r,className:j("text-purple-muted-300 text-sm",e),...t})}function N0({className:e,...t}){const{error:r,formMessageId:n}=Xn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:j("text-destructive text-sm",e),...t,children:o}):null}var[Zn,Mk]=ye("Tooltip",[ft]),Jn=ft(),Bu="TooltipProvider",T0=700,Yo="tooltip.open",[_0,Fa]=Zn(Bu),Gu=e=>{const{__scopeTooltip:t,delayDuration:r=T0,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(_0,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Gu.displayName=Bu;var Sr="Tooltip",[A0,Dr]=Zn(Sr),Wu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,c=Fa(Sr,e.__scopeTooltip),u=Jn(t),[f,p]=d.useState(null),g=me(),m=d.useRef(0),b=i??c.disableHoverableContent,v=l??c.delayDuration,x=d.useRef(!1),[y,h]=be({prop:n,defaultProp:o??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Yo))):c.onClose(),a==null||a(T)},caller:Sr}),C=d.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),E=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,h(!0)},[h]),k=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h(!1)},[h]),N=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,h(!0),m.current=0},v)},[v,h]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(Tr,{...u,children:s.jsx(A0,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?N():E()},[c.isOpenDelayedRef,N,E]),onTriggerLeave:d.useCallback(()=>{b?k():(window.clearTimeout(m.current),m.current=0)},[k,b]),onOpen:E,onClose:k,disableHoverableContent:b,children:r})})};Wu.displayName=Sr;var Xo="TooltipTrigger",zu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Dr(Xo,r),a=Fa(Xo,r),i=Jn(r),l=d.useRef(null),c=ae(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(_r,{asChild:!0,...i,children:s.jsx(q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});zu.displayName=Xo;var Va="TooltipPortal",[I0,M0]=Zn(Va,{forceMount:void 0}),qu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Dr(Va,t);return s.jsx(I0,{scope:t,forceMount:r,children:s.jsx(Ce,{present:r||a.open,children:s.jsx(ar,{asChild:!0,container:o,children:n})})})};qu.displayName=Va;var Jt="TooltipContent",Uu=d.forwardRef((e,t)=>{const r=M0(Jt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Dr(Jt,e.__scopeTooltip);return s.jsx(Ce,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Hu,{side:o,...a,ref:t}):s.jsx(O0,{side:o,...a,ref:t})})}),O0=d.forwardRef((e,t)=>{const r=Dr(Jt,e.__scopeTooltip),n=Fa(Jt,e.__scopeTooltip),o=d.useRef(null),a=ae(t,o),[i,l]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=d.useCallback(()=>{l(null),p(!1)},[p]),m=d.useCallback((b,v)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},h=F0(y,x.getBoundingClientRect()),C=V0(y,h),E=B0(v.getBoundingClientRect()),k=W0([...C,...E]);l(k),p(!0)},[p]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(c&&f){const b=x=>m(x,f),v=x=>m(x,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[c,f,m,g]),d.useEffect(()=>{if(i){const b=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},h=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!G0(y,i);h?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,g]),s.jsx(Hu,{...e,ref:a})}),[D0,$0]=Zn(Sr,{isInside:!1}),L0=xv("TooltipContent"),Hu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,c=Dr(Jt,r),u=Jn(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Yo,f),()=>document.removeEventListener(Yo,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),s.jsx(rr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(An,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[s.jsx(L0,{children:n}),s.jsx(D0,{scope:r,isInside:!0,children:s.jsx(dx,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Uu.displayName=Jt;var Ku="TooltipArrow",Yu=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Jn(r);return $0(Ku,r).isInside?null:s.jsx(In,{...o,...n,ref:t})});Yu.displayName=Ku;function F0(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function V0(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function B0(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function G0(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function W0(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),z0(t)}function z0(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var q0=Gu,U0=Wu,H0=zu,K0=qu,Y0=Uu,X0=Yu;function Xu({delayDuration:e=0,...t}){return s.jsx(q0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Zu({...e}){return s.jsx(Xu,{children:s.jsx(U0,{"data-slot":"tooltip",...e})})}function Ju({...e}){return s.jsx(H0,{"data-slot":"tooltip-trigger",...e})}function Qu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(K0,{children:s.jsxs(Y0,{"data-slot":"tooltip-content",sideOffset:t,className:j("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&s.jsx(X0,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const It=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:c,disabled:u,readOnly:f}=Mu(),p=()=>a?s.jsxs(Zu,{children:[s.jsx(Ju,{asChild:!0,children:s.jsx("span",{children:s.jsx(w0,{size:16})})}),s.jsx(Qu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(P0,{children:o}):s.jsx(s.Fragment,{});return s.jsx(E0,{control:c,name:r,render:({field:m,fieldState:b})=>s.jsxs(R0,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(k0,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(j0,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(N0,{})]})})},Z0=S.forwardRef((e,t)=>s.jsx(jr,{...e,ref:t})),J0=S.forwardRef((e,t)=>It(Z0)({...e,ref:t})),Q0=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=c=>{n({target:{value:c}})};return s.jsx(Ea,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),eC=It(Q0);var Ba="Radio",[tC,ef]=ye(Ba),[rC,nC]=tC(Ba),tf=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:c,form:u,...f}=e,[p,g]=d.useState(null),m=ae(t,x=>g(x)),b=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(rC,{scope:r,checked:o,disabled:i,children:[s.jsx(q.button,{type:"button",role:"radio","aria-checked":o,"data-state":af(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||c==null||c(),v&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})}),v&&s.jsx(of,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});tf.displayName=Ba;var rf="RadioIndicator",nf=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=nC(rf,r);return s.jsx(Ce,{present:n||a.checked,children:s.jsx(q.span,{"data-state":af(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});nf.displayName=rf;var oC="RadioBubbleInput",of=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),l=ae(i,a),c=Mn(r),u=_n(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[c,r,n]),s.jsx(q.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});of.displayName=oC;function af(e){return e?"checked":"unchecked"}var aC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qn="RadioGroup",[sC,Ok]=ye(Qn,[vt,ef]),sf=vt(),lf=ef(),[iC,lC]=sC(Qn),cf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=sf(r),b=_t(u),[v,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:Qn});return s.jsx(iC,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:x,children:s.jsx(zn,{asChild:!0,...m,orientation:c,dir:b,loop:f,children:s.jsx(q.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});cf.displayName=Qn;var df="RadioGroupItem",uf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=lC(df,r),i=a.disabled||n,l=sf(r),c=lf(r),u=d.useRef(null),f=ae(t,u),p=a.value===o.value,g=d.useRef(!1);return d.useEffect(()=>{const m=v=>{aC.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(qn,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(tf,{disabled:i,required:a.required,checked:p,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});uf.displayName=df;var cC="RadioGroupIndicator",ff=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=lf(r);return s.jsx(nf,{...o,...n,ref:t})});ff.displayName=cC;var dC=cf,uC=uf,fC=ff;function pC({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(dC,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:j("qodo qodo-radio-group grid gap-3 group",e),...n})}function mC({className:e,...t}){return s.jsx(uC,{"data-slot":"radio-group-item",className:j("qodo qodo-radio-group-item cursor-pointer border-[var(--border-input-neutral-idle)] bg-[var(--fill-input-neutral-idle)] focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","aria-checked:border-[var(--border-input-emphasis-active)] hover:aria-checked:border-[var(--border-input-emphasis-active)]","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","data-disabled:cursor-not-allowed data-disabled:opacity-50","aria-disabled:cursor-not-allowed aria-disabled:opacity-50","mt-[2px] mr-0",e),...t,children:s.jsx(fC,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(Gg,{className:"stroke-transparent fill-[var(--icon-input-emphasis-active)] absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Ga=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=j("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":c==="horizontal","flex-col gap-3":c==="vertical"},l);return s.jsx(pC,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});Ga.displayName="BaseRadioGroupComponent";const Wa=({label:e,description:t,disabled:r=!1,labelClassName:n,descriptionClassName:o,labelWrapperClassName:a})=>s.jsxs("div",{className:j("flex flex-col gap-2",a),children:[e&&s.jsx("div",{className:j("text-[var(--text-bg-neutral-mid)] font-normal text-sm","group-has-[button:disabled]/radio-item:opacity-70","group-has-[button:disabled]/checkbox-item:opacity-70",{"opacity-70":r},n),children:e}),t&&s.jsx("div",{className:j("text-sm text-[var(--text-bg-neutral-mild)] font-normal",o),children:t})]});Wa.displayName="LabelWithDescription";const za=({value:e="",disabled:t,error:r,name:n="radio",label:o,description:a,wrapperClassName:i,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})=>{const f=`${n}-${e}`;return s.jsxs(La,{htmlFor:f,className:j("group/radio-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal leading-5 cursor-pointer","has-[button:disabled]:cursor-not-allowed has-[button:disabled]:hover:bg-transparent",{"cursor-pointer":!t,"!cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},i),children:[s.jsx(mC,{value:e,id:f,disabled:t||r}),s.jsx(Wa,{label:o,description:a,disabled:t,labelClassName:l,descriptionClassName:c,labelWrapperClassName:u})]},e)};za.displayName="RadioGroupItemComponent";const gC=It(Ga),vC=e=>s.jsx("hr",{className:"w-full h-px border-[var(--base-sidebar-border)]",...e}),hC=({children:e,description:t,className:r})=>s.jsxs("div",{className:j("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),pf=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=j("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});pf.displayName="FormGroup";function xC({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:j("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const bC=S.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=It(xC);return s.jsx(o,{...r,ref:n,className:j({"font-plex-mono text-sm leading-relaxed rounded dark:bg-fill-input-neutral-idle px-3 py-2 border-0":e==="code"},t)})}),mf=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Zt,{variant:a,disabled:n,size:"sm",className:j("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(En,{className:"w-[10px] h-[10px]"})})]}),yC=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:j("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(mf,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Qe,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(iv,{className:"h-4 w-4"})})]})}),ko={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},wC=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},gf=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:c,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=wC,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:h=()=>{},onResetTags:C=()=>{}})=>{const[E,k]=S.useState(""),[N,T]=S.useState(!1),P=S.useRef(null),V=S.useRef(null),H=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const Q=e.length>=i,W=L=>{if(Q||e.some(K=>K.id===L.id))return;const A=[...e,L];x(A),y(L)},D=L=>{const A=e.filter(K=>K.id!==L);x(A),h(L)},I=()=>{x==null||x([]),C()},O=L=>{const A=L.target.value;k(A),T(!0)},R=()=>{const L=E.trim().toLowerCase();if(!L)return[];const A=new Set(e.map(K=>K.id));return o.filter(K=>K.label.toLowerCase().includes(L)&&!A.has(K.id))},M=L=>v?v(L):L,B=()=>{const L=E.trim();if(!L)return;const A=M(L);if(!A)return;if(e.some(ee=>ee.id===A)){k(""),T(!1);return}const K=o.find(ee=>ee.id===A||M(ee.label)===A);K?W(K):a&&W({id:A,label:A}),k(""),T(!1)},J=L=>{const A=L.key===ko.BACKSPACE&&!E&&e.length>0,K=L.key===ko.ENTER&&E,ee=L.key===ko.ESCAPE;K?(L.preventDefault(),B(),H.current&&(H.current.scrollLeft=H.current.scrollWidth)):A?D(e[e.length-1].id):ee&&T(!1)},_=()=>{if(E&&R().length>0)return s.jsx(Sa,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:L=>L.preventDefault(),onCloseAutoFocus:L=>L.preventDefault(),onMouseDown:L=>L.preventDefault(),children:s.jsx("div",{className:j("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:R().map(L=>s.jsx(yC,{label:L.label,id:L.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var A;W(L),k(""),T(!1),(A=P.current)==null||A.focus()}},L.id))})})},G=()=>g||s.jsx(av,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Z=()=>e.map(L=>s.jsx(mf,{label:L.label,id:L.id,onRemoveTag:D,disabled:l,className:p,variant:t},L.id)),z=()=>e.length===0?s.jsx(s.Fragment,{}):s.jsx(En,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:I});return s.jsx("div",{className:j("w-full",c),children:s.jsxs(wa,{open:N&&!l,onOpenChange:T,modal:!1,children:[s.jsx(Ca,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:j("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:L=>{var A;L.stopPropagation(),T(!0),(A=P.current)==null||A.focus()},children:[G(),s.jsxs("div",{ref:H,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Z(),s.jsx(jr,{ref:P,value:E,onChange:O,onClick:L=>L.stopPropagation(),onFocus:()=>T(!0),onBlur:b,onKeyDown:J,placeholder:r,disabled:l||Q,className:j("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),z()]})}),_()]})})};function CC(e){const{control:t}=ir();return s.jsx(_u,{name:e.name,control:t,render:({field:r})=>s.jsx(gf,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const SC=It(CC),EC=12,hi={SINGLE:"single",MULTIPLE:"multiple"},xi={LTR:"ltr"};var vf=typeof global=="object"&&global&&global.Object===Object&&global,RC=typeof self=="object"&&self&&self.Object===Object&&self,xt=vf||RC||Function("return this")(),hn=xt.Symbol,hf=Object.prototype,kC=hf.hasOwnProperty,jC=hf.toString,pr=hn?hn.toStringTag:void 0;function PC(e){var t=kC.call(e,pr),r=e[pr];try{e[pr]=void 0;var n=!0}catch{}var o=jC.call(e);return n&&(t?e[pr]=r:delete e[pr]),o}var NC=Object.prototype,TC=NC.toString;function _C(e){return TC.call(e)}var AC="[object Null]",IC="[object Undefined]",bi=hn?hn.toStringTag:void 0;function $r(e){return e==null?e===void 0?IC:AC:bi&&bi in Object(e)?PC(e):_C(e)}function qa(e){return e!=null&&typeof e=="object"}var MC=Array.isArray;function xf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var OC="[object AsyncFunction]",DC="[object Function]",$C="[object GeneratorFunction]",LC="[object Proxy]";function bf(e){if(!xf(e))return!1;var t=$r(e);return t==DC||t==$C||t==OC||t==LC}var jo=xt["__core-js_shared__"],yi=(function(){var e=/[^.]+$/.exec(jo&&jo.keys&&jo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function FC(e){return!!yi&&yi in e}var VC=Function.prototype,BC=VC.toString;function Mt(e){if(e!=null){try{return BC.call(e)}catch{}try{return e+""}catch{}}return""}var GC=/[\\^$.*+?()[\]{}|]/g,WC=/^\[object .+?Constructor\]$/,zC=Function.prototype,qC=Object.prototype,UC=zC.toString,HC=qC.hasOwnProperty,KC=RegExp("^"+UC.call(HC).replace(GC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function YC(e){if(!xf(e)||FC(e))return!1;var t=bf(e)?KC:WC;return t.test(Mt(e))}function XC(e,t){return e==null?void 0:e[t]}function Lr(e,t){var r=XC(e,t);return YC(r)?r:void 0}var Zo=Lr(xt,"WeakMap"),ZC=9007199254740991;function yf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ZC}function JC(e){return e!=null&&yf(e.length)&&!bf(e)}var QC=Object.prototype;function wf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||QC;return e===r}var e1="[object Arguments]";function wi(e){return qa(e)&&$r(e)==e1}var Cf=Object.prototype,t1=Cf.hasOwnProperty,r1=Cf.propertyIsEnumerable,n1=wi((function(){return arguments})())?wi:function(e){return qa(e)&&t1.call(e,"callee")&&!r1.call(e,"callee")};function o1(){return!1}var Sf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ci=Sf&&typeof module=="object"&&module&&!module.nodeType&&module,a1=Ci&&Ci.exports===Sf,Si=a1?xt.Buffer:void 0,s1=Si?Si.isBuffer:void 0,i1=s1||o1,l1="[object Arguments]",c1="[object Array]",d1="[object Boolean]",u1="[object Date]",f1="[object Error]",p1="[object Function]",m1="[object Map]",g1="[object Number]",v1="[object Object]",h1="[object RegExp]",x1="[object Set]",b1="[object String]",y1="[object WeakMap]",w1="[object ArrayBuffer]",C1="[object DataView]",S1="[object Float32Array]",E1="[object Float64Array]",R1="[object Int8Array]",k1="[object Int16Array]",j1="[object Int32Array]",P1="[object Uint8Array]",N1="[object Uint8ClampedArray]",T1="[object Uint16Array]",_1="[object Uint32Array]",pe={};pe[S1]=pe[E1]=pe[R1]=pe[k1]=pe[j1]=pe[P1]=pe[N1]=pe[T1]=pe[_1]=!0;pe[l1]=pe[c1]=pe[w1]=pe[d1]=pe[C1]=pe[u1]=pe[f1]=pe[p1]=pe[m1]=pe[g1]=pe[v1]=pe[h1]=pe[x1]=pe[b1]=pe[y1]=!1;function A1(e){return qa(e)&&yf(e.length)&&!!pe[$r(e)]}function I1(e){return function(t){return e(t)}}var Ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yr=Ef&&typeof module=="object"&&module&&!module.nodeType&&module,M1=yr&&yr.exports===Ef,Po=M1&&vf.process,Ei=(function(){try{var e=yr&&yr.require&&yr.require("util").types;return e||Po&&Po.binding&&Po.binding("util")}catch{}})(),Ri=Ei&&Ei.isTypedArray,O1=Ri?I1(Ri):A1;function D1(e,t){return function(r){return e(t(r))}}var $1=D1(Object.keys,Object),L1=Object.prototype,F1=L1.hasOwnProperty;function V1(e){if(!wf(e))return $1(e);var t=[];for(var r in Object(e))F1.call(e,r)&&r!="constructor"&&t.push(r);return t}var Jo=Lr(xt,"Map"),Qo=Lr(xt,"DataView"),ea=Lr(xt,"Promise"),ta=Lr(xt,"Set"),ki="[object Map]",B1="[object Object]",ji="[object Promise]",Pi="[object Set]",Ni="[object WeakMap]",Ti="[object DataView]",G1=Mt(Qo),W1=Mt(Jo),z1=Mt(ea),q1=Mt(ta),U1=Mt(Zo),St=$r;(Qo&&St(new Qo(new ArrayBuffer(1)))!=Ti||Jo&&St(new Jo)!=ki||ea&&St(ea.resolve())!=ji||ta&&St(new ta)!=Pi||Zo&&St(new Zo)!=Ni)&&(St=function(e){var t=$r(e),r=t==B1?e.constructor:void 0,n=r?Mt(r):"";if(n)switch(n){case G1:return Ti;case W1:return ki;case z1:return ji;case q1:return Pi;case U1:return Ni}return t});var H1="[object Map]",K1="[object Set]",Y1=Object.prototype,X1=Y1.hasOwnProperty;function lr(e){if(e==null)return!0;if(JC(e)&&(MC(e)||typeof e=="string"||typeof e.splice=="function"||i1(e)||O1(e)||n1(e)))return!e.length;var t=St(e);if(t==H1||t==K1)return!e.size;if(wf(e))return!V1(e).length;for(var r in e)if(X1.call(e,r))return!1;return!0}function eo(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>eo(t))}function Ua(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Ua(r))}),t}function Ha(e,t){return lr(e.children)?!1:eo(e).every(n=>t.has(n))}function Z1(e,t){return lr(e.children)?!1:eo(e).some(n=>t.has(n))}function Rf(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=Rf(r.children,t);if(n)return n}}return null}function Ka(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Ka(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function kf(e,t){e.forEach(r=>{lr(r.children)||(Ha(r,t)?t.add(r.value):t.delete(r.value),r.children&&kf(r.children,t))})}const J1=e=>e?Array.isArray(e)?e:[e]:[],Q1=e=>Ka(e,t=>[t.value,t.label]),eS=e=>Ka(e,t=>t.icon?[t.value,t.icon]:null);function tS(e,t){Ua(e).forEach(n=>t.delete(n))}function rS(e,t){Ua(e).forEach(n=>t.add(n))}function jf(e,t){const r=new Set(t);return e.flatMap(n=>!lr(n.children)&&n.children?Ha(n,r)?[n.value]:jf(n.children,t):r.has(n.value)?[n.value]:[])}function nS(e){return e&&e>1?e*EC:0}function Pf({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=xi.LTR}){const i=!lr(e.children),l=t.has(e.value),c=`${nS(n)}px`,u=Ha(e,t),p=Z1(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(zg,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(Ug,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(tr,{className:j("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),x=()=>{if(i)return e.children.map(h=>s.jsx(Pf,{option:h,selected:t,onSelect:r,nestLevel:n+1,dir:a},h.value))},y=()=>s.jsxs("div",{className:j("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===xi.LTR}),style:{paddingLeft:c},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(fd,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:j("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),x()]})}function oS({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=hi.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:c,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(Sn,{}),dir:b="ltr",...v}){const[x,y]=S.useState(0),[h,C]=S.useState(!1),E=S.useRef(null),k=o===hi.MULTIPLE,[N,T]=S.useState(e!==void 0?e:k?[]:""),P=J1(N),V=new Set(P);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[N]);const H=Q1(t),re=eS(t);S.useEffect(()=>{e!==void 0&&T(k?e||[]:e||"")},[e,k]);function te(O,R){if(!k){T(O),r==null||r(O),C(!1);return}T(M=>{const B=Array.isArray(M)?M:[],J=new Set(B),_=Rf(t,O);if(!_)return B;R?Q(_,J):W(O,J);const G=Array.from(J);return r==null||r(G),G})}function Q(O,R){eo(O).every(J=>R.has(J))?tS(O,R):rS(O,R)}function W(O,R){R.has(O)?R.delete(O):R.add(O),kf(t,R)}const D=()=>{const O=jf(t,P);return O.length===0?s.jsx(Zt,{variant:p,size:"md",className:j("text-purple-muted-300",f),children:a}):O.map(M=>{const B=re.get(M),J=H.get(M)||M;return s.jsx(Zt,{variant:p,size:"md",className:j("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[B&&s.jsx("div",{className:"flex-shrink-0",children:B}),s.jsx("span",{children:J})]})},M)})},I=()=>{if(g)return s.jsx(ld,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(wa,{open:h,onOpenChange:n?void 0:C,children:[s.jsx(Ca,{asChild:!0,disabled:n,children:s.jsxs("div",{className:j("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:j("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",c),children:D()}),s.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:m})]})}),s.jsx(Sa,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:x??"auto"},children:s.jsxs(id,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[I(),s.jsxs(cd,{children:[s.jsx(dd,{children:l}),s.jsx(ud,{children:t.map(O=>s.jsx(Pf,{disabled:n,option:O,selected:V,onSelect:te,dir:b},O.value))})]})]})})]})}const Nf=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,c=u=>{n||r&&r({target:{value:u}})};return s.jsx(oS,{options:t,value:o,disabled:a,...l,onSelect:c,mode:i})});Nf.displayName="BaseSelectComponent";const aS=It(Nf),Ya=S.forwardRef((e,t)=>{const{value:r=[],defaultValue:n=[],onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:c="vertical",onChange:u,children:f,...p}=e,[g,m]=S.useState(lr(r)?n:r),b=c==="horizontal",v=r!==void 0?r:g,x=(C,E)=>{if(i)return;const k=E?[...v,C]:v.filter(N=>N!==C);r===void 0&&m(k),u==null||u({target:{value:k}}),o==null||o(k)},y=j("qodo qodo-custom-checkbox-group","flex",{"flex-row gap-6":b,"flex-col gap-3":!b},l),h=()=>S.Children.map(f,C=>{if(!S.isValidElement(C))return C;const E=C.props.name;if(!E)return C;const k=C.props.disabled,N=i||a||k;return S.cloneElement(C,{checked:v.includes(E),onCheckedChange:T=>x(E,T),disabled:N,name:E})});return s.jsx("div",{ref:t,className:y,...p,children:h()})});Ya.displayName="CheckboxGroupComponent";var to="Checkbox",[sS,Dk]=ye(to),[iS,Xa]=sS(to);function lS(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[g,m]=be({prop:r,defaultProp:o??!1,onChange:c,caller:to}),[b,v]=d.useState(null),[x,y]=d.useState(null),h=d.useRef(!1),C=b?!!i||!!b.closest("form"):!0,E={checked:g,disabled:a,setChecked:m,control:b,setControl:v,name:l,form:i,value:f,hasConsumerStoppedPropagationRef:h,required:u,defaultChecked:it(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:y};return s.jsx(iS,{scope:t,...E,children:cS(p)?p(E):n})}var Tf="CheckboxTrigger",_f=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:i,disabled:l,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:m,bubbleInput:b}=Xa(Tf,e),v=ae(o,f),x=d.useRef(c);return d.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const h=()=>p(x.current);return y.addEventListener("reset",h),()=>y.removeEventListener("reset",h)}},[a,p]),s.jsx(q.button,{type:"button",role:"checkbox","aria-checked":it(c)?"mixed":c,"aria-required":u,"data-state":Df(c),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:v,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(r,y=>{p(h=>it(h)?!0:!h),b&&m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});_f.displayName=Tf;var Za=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:c,onCheckedChange:u,form:f,...p}=e;return s.jsx(lS,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:l,required:i,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>s.jsxs(s.Fragment,{children:[s.jsx(_f,{...p,ref:t,__scopeCheckbox:r}),g&&s.jsx(Of,{__scopeCheckbox:r})]})})});Za.displayName=to;var Af="CheckboxIndicator",If=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=Xa(Af,r);return s.jsx(Ce,{present:n||it(a.checked)||a.checked===!0,children:s.jsx(q.span,{"data-state":Df(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});If.displayName=Af;var Mf="CheckboxBubbleInput",Of=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:l,disabled:c,name:u,value:f,form:p,bubbleInput:g,setBubbleInput:m}=Xa(Mf,e),b=ae(r,m),v=Mn(a),x=_n(n);d.useEffect(()=>{const h=g;if(!h)return;const C=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(C,"checked").set,N=!o.current;if(v!==a&&k){const T=new Event("click",{bubbles:N});h.indeterminate=it(a),k.call(h,it(a)?!1:a),h.dispatchEvent(T)}},[g,v,a,o]);const y=d.useRef(it(a)?!1:a);return s.jsx(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Of.displayName=Mf;function cS(e){return typeof e=="function"}function it(e){return e==="indeterminate"}function Df(e){return it(e)?"indeterminate":e?"checked":"unchecked"}const $f=d.forwardRef(({className:e,...t},r)=>s.jsx(Za,{ref:r,className:j("h-4 w-4 shrink-0 rounded-xs shadow disabled:cursor-not-allowed bg-[var(--fill-input-neutral-idle)] border border-[var(--border-input-neutral-idle)] hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)] ","active:border-[var(--border-input-neutral-active)] active:bg-[var(--fill-input-neutral-active)] disabled:border-[var(--border-input-neutral-disabled)] disabled:bg-[var(--fill-input-neutral-disabled)] ","hover:disabled:border-[var(--border-input-neutral-disabled)] hover:disabled:bg-[var(--fill-input-neutral-disabled)] ","data-[state=checked]:border-[var(--border-input-emphasis-idle)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)] hover:data-[state=checked]:border-[var(--border-input-emphasis-hover)] hover:data-[state=checked]:bg-[var(--fill-input-emphasis-hover)] active:data-[state=checked]:border-[var(--border-input-emphasis-active)] active:data-[state=checked]:bg-[var(--fill-input-emphasis-active)] disabled:data-[state=checked]:border-[var(--border-input-emphasis-disabled)] disabled:data-[state=checked]:bg-[var(--fill-input-emphasis-disabled)] ",e),...t,children:s.jsx(If,{className:j("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?s.jsx(rv,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"}):s.jsx(tr,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"})})}));$f.displayName=Za.displayName;const Ja=({disabled:e,error:t,name:r="checkbox",checked:n,onCheckedChange:o,label:a,description:i,labelWrapperClassName:l,labelClassName:c,descriptionClassName:u,checkboxClassName:f,wrapperClassName:p})=>s.jsxs(La,{htmlFor:r,className:j("group/checkbox-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer":!e,"cursor-not-allowed":e,"border border-destructive":t},p),children:[s.jsx($f,{id:r,disabled:e||t,checked:n,onCheckedChange:o,className:j("mt-0.5",f)}),s.jsx(Wa,{label:a,description:i,disabled:e,labelClassName:c,descriptionClassName:u,labelWrapperClassName:l})]});Ja.displayName="CheckboxGroupItemComponent";const dS=It(Ya),Pe=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,c=j("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(Iu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:c,onSubmit:l(a),...i})})};Pe.Button=p0;Pe.Input=J0;Pe.Select=aS;Pe.Combobox=eC;Pe.RadioGroup=gC;Pe.RadioGroupItem=za;Pe.Group=pf;Pe.Textarea=bC;Pe.Divider=vC;Pe.Title=hC;Pe.TagsInput=SC;Pe.CheckboxGroup=dS;Pe.Checkbox=Ja;function uS(e){return e==null?[]:Array.isArray(e)?e:[e]}var fS=e=>Array.from(Array(e).keys()),_i=e=>(e==null?void 0:e.constructor.name)==="Array",pS=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Qa(e[r],t[r]))return!1;return!0},Qa=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(_i(e)&&_i(t))return pS(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!Qa(e[a],t[a]))return!1}return!0},mS=e=>e!=null&&typeof e=="object",on=e=>typeof e=="string",vr=e=>typeof e=="function",gS=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),vS=e=>Object.prototype.toString.call(e),Lf=Function.prototype.toString,hS=Lf.call(Object),xS=e=>{if(!mS(e)||vS(e)!="[object Object]"||wS(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=gS(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Lf.call(r)==hS},bS=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,yS=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,wS=e=>bS(e)||yS(e),CS=e=>e(),SS=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},ES=e=>Number.isNaN(e),RS=e=>ES(e)?0:e,kS=(e,t,r)=>{const n=RS(e),o=n>=t,a=r==null||n<=r;return o&&a};function Ff(e){if(!xS(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=Ff(o))}return r}function Ai(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function jS(e,t){if(e==null)throw new Error(t())}var Vf=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,PS=9,NS=e=>Vf(e)&&e.nodeType===PS,TS=e=>Vf(e)&&e===e.window;function _S(e){if(!e)return!1;const t=e.getRootNode();return Bf(t)===e}function AS(e){return NS(e)?e:TS(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Bf(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var IS=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),MS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ii=e=>{const t={};let r;for(;r=MS.exec(e);)t[r[1]]=r[2];return t},OS=(e,t)=>{if(on(e)){if(on(t))return`${e};${t}`;e=Ii(e)}else on(t)&&(t=Ii(t));return Object.assign({},e??{},t??{})};function Be(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=SS(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=IS(t[o],r[o]);continue}if(o==="style"){t[o]=OS(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function DS(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((c,u)=>!Qa(n[u],c)))&&(n=i,o=t(i,a)),o}}var qt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(qt||{}),No="__init__";function $S(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>AS(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Bf(t()),isActiveElement:_S,getById:i=>t().getElementById(i)}}function LS(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var FS=()=>e=>Array.from(new Set(e)),Gf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function xn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const c=S.useRef(l.current);Gf(()=>{c.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=c.current,m=vr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?kr.flushSync:CS)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}xn.cleanup=e=>{S.useEffect(()=>e,[])};xn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function VS(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var BS=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function GS(e,t={}){var re,te,Q,W;const r=S.useMemo(()=>{const{id:D,ids:I,getRootNode:O}=t;return $S({id:D,ids:I,getRootNode:O})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:Ff(t),scope:r}))??t,a=WS(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:xn,scope:r,flush:Mi,getContext(){return c},getComputed(){return k},getRefs(){return v},getEvent(){return m()}}),l=Wf(i),c={get(D){var I;return(I=l.current)==null?void 0:I[D].ref.current},set(D,I){var O;(O=l.current)==null||O[D].set(I)},initial(D){var I;return(I=l.current)==null?void 0:I[D].initial},hash(D){var O,R;const I=(O=l.current)==null?void 0:O[D].get();return(R=l.current)==null?void 0:R[D].hash(I)}},u=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),b=()=>({...N,matches(...D){return D.includes(N.ref.current)},hasTag(D){var I,O;return!!((O=(I=e.states[N.ref.current])==null?void 0:I.tags)!=null&&O.includes(D))}}),v=VS(((Q=e.refs)==null?void 0:Q.call(e,{prop:a,context:c}))??{}),x=()=>({state:b(),context:c,event:m(),prop:a,send:H,action:y,guard:h,track:BS,refs:v,computed:k,flush:Mi,scope:r,choose:E}),y=D=>{const I=vr(D)?D(x()):D;if(!I)return;const O=I.map(R=>{var B,J;const M=(J=(B=e.implementations)==null?void 0:B.actions)==null?void 0:J[R];return M||Ai(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of O)R==null||R(x())},h=D=>{var I,O;return vr(D)?D(x()):(O=(I=e.implementations)==null?void 0:I.guards)==null?void 0:O[D](x())},C=D=>{const I=vr(D)?D(x()):D;if(!I)return;const O=I.map(M=>{var J,_;const B=(_=(J=e.implementations)==null?void 0:J.effects)==null?void 0:_[M];return B||Ai(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of O){const B=M==null?void 0:M(x());B&&R.push(B)}return()=>R.forEach(M=>M==null?void 0:M())},E=D=>uS(D).find(I=>{let O=!I.guard;return on(I.guard)?O=!!h(I.guard):vr(I.guard)&&(O=I.guard(x())),O}),k=D=>{jS(e.computed,()=>"[zag-js] No computed object found on machine");const I=e.computed[D];return I({context:c,event:m(),prop:a,refs:v,scope:r,computed:k})},N=xn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,I){var R,M,B,J;if(I){const _=u.current.get(I);_==null||_(),u.current.delete(I)}I&&y((R=e.states[I])==null?void 0:R.exit),y((M=f.current)==null?void 0:M.actions);const O=C((B=e.states[D])==null?void 0:B.effects);if(O&&u.current.set(D,O),I===No){y(e.entry);const _=C(e.effects);_&&u.current.set(No,_)}y((J=e.states[D])==null?void 0:J.entry)}})),T=S.useRef(void 0),P=S.useRef(qt.NotStarted);Gf(()=>{queueMicrotask(()=>{const O=P.current===qt.Started;P.current=qt.Started,n(O?"rehydrating...":"initializing...");const R=T.current??N.initial;N.invoke(R,O?N.get():No)});const D=u.current,I=N.ref.current;return()=>{n("unmounting..."),T.current=I,P.current=qt.Stopped,D.forEach(O=>O==null?void 0:O()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in N?N.ref.current:N.get(),H=D=>{queueMicrotask(()=>{var J,_;if(P.current!==qt.Started)return;p.current=g.current,g.current=D;let I=V();const O=((J=e.states[I].on)==null?void 0:J[D.type])??((_=e.on)==null?void 0:_[D.type]),R=E(O);if(!R)return;f.current=R;const M=R.target??I;n("transition",D.type,R.target||I,`(${R.actions})`);const B=M!==I;B?kr.flushSync(()=>N.set(M)):R.reenter&&!B?N.invoke(I,I):y(R.actions??[])})};return(W=e.watch)==null||W.call(e,x()),{state:b(),send:H,context:c,prop:a,scope:r,refs:v,computed:k,event:m(),getStatus:()=>P.current}}function Wf(e){const t=S.useRef(e);return t.current=e,t}function WS(e){const t=Wf(e);return function(n){return t.current[n]}}function Mi(e){queueMicrotask(()=>{kr.flushSync(()=>e())})}var zS=LS(e=>e);function qS(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function US(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const To=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),c=US(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?qS(n,c):c})}));return t.displayName=e.displayName||e.name,t},HS=()=>{const e=new Map;return new Proxy(To,{apply(t,r,n){return To(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,To(n)),e.get(n)}})},Xe=HS();function KS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Fr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function c(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??KS(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,c),p}return u}return[l.Provider,c,l]}const[YS,nt]=Fr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),zf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});zf.displayName="StepsCompletedContent";const es=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),qf=S.forwardRef((e,t)=>{const[r,n]=es()(e,["index"]),o=nt(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});qf.displayName="StepsContent";const[XS,ts]=Fr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Uf=S.forwardRef((e,t)=>{const r=nt(),n=ts(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Uf.displayName="StepsIndicator";const[ZS,$k]=Fr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),Hf=S.forwardRef((e,t)=>{const[r,n]=es()(e,["index"]),o=nt(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(XS,{value:r,children:s.jsx(ZS,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});Hf.displayName="StepsItem";const Kf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});Kf.displayName="StepsList";const Yf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Yf.displayName="StepsNextTrigger";const Xf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Xf.displayName="StepsPrevTrigger";var hr=(e,t=[])=>({parts:(...r)=>{if(JS(t))return hr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>hr(e,[...t,...r]),omit:(...r)=>hr(e,t.filter(n=>!r.includes(n))),rename:r=>hr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Gt(e)}"][data-part="${Gt(n)}"]`,`& [data-scope="${Gt(e)}"][data-part="${Gt(n)}"]`].join(", "),attrs:{"data-scope":Gt(e),"data-part":Gt(n)}}}),{})}),Gt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),JS=e=>e.length===0,QS=hr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=QS.build(),eE=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},tE=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Oi=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},rE=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function nE(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),c=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Oi(i,y.index),contentId:rE(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===c-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:x,getRootProps(){return t.element({...ze.root.attrs,id:eE(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const h=fS(c).map((C,E)=>Oi(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:tE(i),role:"tablist","aria-owns":h.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const h=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":h.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const h=g(y);return t.button({...ze.trigger.attrs,id:h.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||h.current?0:-1,"aria-selected":h.current,"aria-controls":h.contentId,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const h=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:h.contentId,role:"tabpanel",tabIndex:0,hidden:!h.current,"data-state":h.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":h.triggerId})},getIndicatorProps(y){const h=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getSeparatorProps(y){const h=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(h.completed),"data-current":We(h.current),"data-incomplete":We(h.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},getProgressProps(){return t.element({dir:a("dir"),...ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":We(u===100)})}}}var oE={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:DS(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){aE(t("count"),e.get("step"))}}}},aE=(e,t)=>{if(!kS(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};FS()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[Lk,sE]=Fr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[Fk,iE]=Fr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function lE(e){const t=S.useId(),{getRootNode:r}=sE(),{dir:n}=iE(),o={id:t,dir:n,getRootNode:r,...e},a=GS(oE,o);return nE(a,zS)}const Zf=S.forwardRef((e,t)=>{const[r,n]=es()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=lE(r),a=Be(o.getRootProps(),n);return s.jsx(YS,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});Zf.displayName="StepsRoot";const Jf=S.forwardRef((e,t)=>{const r=nt(),n=ts(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Jf.displayName="StepsSeparator";const Qf=S.forwardRef((e,t)=>{const r=nt(),n=ts(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});Qf.displayName="StepsTrigger";function cE(e){return $u({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const ep=S.createContext(void 0),dE=({children:e,step:t})=>s.jsx(ep.Provider,{value:{step:t},children:e}),tp=()=>{const e=S.useContext(ep);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},uE=({className:e,step:t,...r})=>{const n=j("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(dE,{step:t??0,children:s.jsx(Zf,{className:n,step:t,...r})})},fE=({className:e,...t})=>{const r=j("flex flex-row gap-4",e);return s.jsx(Kf,{className:r,...t})},pE=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4",e);return s.jsx(Hf,{className:r,...t})},mE=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(Qf,{className:r,...t})},gE=({index:e,className:t,...r})=>{const{step:n}=tp(),o=e===n,a=e<n,i=j("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),l=j({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(Uf,{className:i,...r,children:a?s.jsx(cE,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},vE=({index:e,className:t,...r})=>{const{step:n}=tp(),o=e<n,a=j("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(Jf,{className:a,...r})},hE=({className:e,...t})=>{const r=j(e);return s.jsx(qf,{className:r,...t})},xE=({className:e,...t})=>{const r=j(e);return s.jsx(zf,{className:r,...t})},bE=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Xf,{className:r,...t})},yE=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Yf,{className:r,...t})},wE={Root:uE,List:fE,Item:pE,Trigger:mE,Indicator:gE,Separator:vE,Content:hE,CompletedContent:xE,PrevTrigger:bE,NextTrigger:yE},Vr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Xu,{...r,children:s.jsxs(Zu,{children:[s.jsx(Ju,{...n,children:e}),t&&s.jsx(Qu,{...o,children:t})]})});/**
210
210
  * react-table
211
211
  *
212
212
  * Copyright (c) TanStack