@collective-intelligence/ui-react 0.1.25 → 0.1.27
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/README.md +40 -0
- package/dist/components/ui/index.d.ts +15 -0
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui-extensions/atoms/ThemeToggle/index.js +1 -1
- package/dist/components/ui-extensions/index.js +4 -4
- package/dist/components/ui-extensions/molecules/VideoPlayer/index.js +1 -1
- package/dist/{index-c5j7wr0c.js → index-9b0ygc2v.js} +2 -2
- package/dist/{index-3me0m2fg.js → index-w7ba75b9.js} +1 -1
- package/dist/{index-zk28jg41.js → index-way3rqhy.js} +1 -1
- package/dist/{index-jqw3cf33.js → index-wqsh9yj5.js} +1 -1
- package/dist/{index-7z26q7c0.js → index-x5ks3173.js} +4 -4
- package/dist/index-yrsgjmrw.js +6 -0
- package/dist/resources.js +1 -1
- package/package.json +2 -2
- package/dist/index-3eqse77d.js +0 -6
package/dist/index-3eqse77d.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{xe,a,x,P,lr,p,n,r,i,o,y,g,u,D,z,ne,l,c,N,_,ie,se,ye,xt,W,d,s,C,q,K,le,J}from"./index-7z26q7c0.js";import{f,w}from"./index-k2h122pf.js";import{O,F,B,U,k,E,H,M,Z}from"./index-c5j7wr0c.js";import{ut,T,wr,Fe,Be}from"./index-cxjzg167.js";import{v}from"./index-dt6f1hvx.js";import{e}from"./index-fwsd4nes.js";import*as oo from"react";import{jsx as Zo}from"react/jsx-runtime";var us=Object.defineProperty,sr=(m,t)=>us(m,"name",{value:t,configurable:!0}),rn="Collapsible",[ps,rr]=i(rn),[ms,nn]=ps(rn),fs=oo.forwardRef(sr(function(t,h){let{__scopeCollapsible:b,open:G,defaultOpen:S,disabled:X,onOpenChange:te,...Q}=t,[ee,ce]=s({prop:G,defaultProp:S??!1,onChange:te,caller:rn});return Zo(ms,{scope:b,disabled:X,contentId:c(),open:ee,onOpenToggle:oo.useCallback(()=>ce((V)=>!V),[ce]),children:Zo(o.div,{"data-state":Cr(ee),"data-disabled":X?"":void 0,...Q,ref:h})})},"Collapsible")),gs="CollapsibleTrigger",an=oo.forwardRef(sr(function(t,h){let{__scopeCollapsible:b,...G}=t,S=nn(gs,b);return Zo(o.button,{type:"button","aria-controls":S.open?S.contentId:void 0,"aria-expanded":S.open||!1,"data-state":Cr(S.open),"data-disabled":S.disabled?"":void 0,disabled:S.disabled,...G,ref:h,onClick:r(t.onClick,S.onOpenToggle)})},"CollapsibleTrigger")),ia="CollapsibleContent",sn=oo.forwardRef(sr(function(t,h){let{forceMount:b,...G}=t,S=nn(ia,t.__scopeCollapsible);return Zo(d,{present:b||S.open,children:({present:X})=>Zo(vs,{...G,ref:h,present:X})})},"CollapsibleContent")),vs=oo.forwardRef(sr(function(t,h){let{__scopeCollapsible:b,present:G,children:S,...X}=t,te=nn(ia,b),[Q,ee]=oo.useState(G),ce=oo.useRef(null),V=a(h,ce),ge=oo.useRef(0),he=ge.current,Te=oo.useRef(0),we=Te.current,be=te.open||Q,Ce=oo.useRef(be),Me=oo.useRef(void 0);return oo.useEffect(()=>{let Re=requestAnimationFrame(()=>Ce.current=!1);return()=>cancelAnimationFrame(Re)},[]),l(()=>{let Re=ce.current;if(Re){Me.current=Me.current||{transitionDuration:Re.style.transitionDuration,animationName:Re.style.animationName},Re.style.transitionDuration="0s",Re.style.animationName="none";let Pe=Re.getBoundingClientRect();if(ge.current=Pe.height,Te.current=Pe.width,!Ce.current)Re.style.transitionDuration=Me.current.transitionDuration,Re.style.animationName=Me.current.animationName;ee(G)}},[te.open,G]),Zo(o.div,{"data-state":Cr(te.open),"data-disabled":te.disabled?"":void 0,id:te.contentId,hidden:!be,...X,ref:V,style:{["--radix-collapsible-content-height"]:he?`${he}px`:void 0,["--radix-collapsible-content-width"]:we?`${we}px`:void 0,...t.style},children:be&&S})},"CollapsibleContentImpl"));function Cr(m){return m?"open":"closed"}sr(Cr,"getState");var wt=fs,Pr=an,Tr=sn;import{jsx as ln}from"react/jsx-runtime";var bs=p("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}}}),Ke=({className:m,variant:t,...h})=>ln("div",{"data-slot":"alert",role:"alert",className:e(bs({variant:t}),m),...h}),je=({className:m,...t})=>ln("div",{"data-slot":"alert-title",className:e("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",m),...t}),Ye=({className:m,...t})=>ln("div",{"data-slot":"alert-description",className:e("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",m),...t});import{jsx as xs}from"react/jsx-runtime";var kr=p("inline-flex items-center justify-center rounded-full border px-2.5 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{defaultVariants:{variant:"default"},variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",mono:"border-transparent bg-(--bg-surface-alt)/70 text-(--text-secondary) font-mono text-[10.5px] tracking-tight",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",soft:"border-transparent bg-(--bg-accent-soft) text-(--accent) [a&]:hover:bg-(--bg-accent-soft)/80"}}}),ue=({className:m,variant:t,asChild:h=!1,...b})=>xs(h?P:"span",{"data-slot":"badge",className:e(kr({variant:t}),m),...b});import{jsx as _o,jsxs as sa}from"react/jsx-runtime";var Er=p("flex flex-col text-card-foreground",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-card gap-6 rounded-lg border border-(--border-default) py-6 shadow-(--shadow-sm) dark:shadow-none",island:"gap-6 rounded-lg border border-border bg-card py-6 shadow-(--shadow-sm) dark:shadow-none",sheet:"overflow-hidden rounded-lg border border-border bg-card shadow-(--shadow-sm) dark:shadow-none"}}}),Cs=()=>sa("div",{"aria-hidden":!0,"data-slot":"card-accent-gradient",className:"pointer-events-none absolute inset-0",children:[_o("div",{className:"absolute -left-20 -top-24 h-72 w-72 rounded-full bg-(--accent) opacity-[0.09] blur-3xl will-change-transform animate-[aurora-drift_18s_ease-in-out_infinite]"}),_o("div",{className:"absolute -right-10 -top-16 h-64 w-64 rounded-full bg-(--accent) opacity-[0.05] blur-3xl will-change-transform animate-[aurora-drift_24s_ease-in-out_infinite_reverse]"})]}),Ur=({className:m,...t})=>_o("div",{"data-slot":"card-header",className:e("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",m),...t}),Vr=({className:m,...t})=>_o("div",{"data-slot":"card-title",className:e("leading-none font-semibold",m),...t}),Hr=({className:m,...t})=>_o("div",{"data-slot":"card-description",className:e("text-muted-foreground text-sm",m),...t}),Gr=({className:m,...t})=>_o("div",{"data-slot":"card-action",className:e("col-start-2 row-span-2 row-start-1 self-start justify-self-end",m),...t}),Rt=({className:m,...t})=>_o("div",{"data-slot":"card-content",className:e("px-6",m),...t}),$r=({className:m,...t})=>_o("div",{"data-slot":"card-footer",className:e("flex items-center px-6 [.border-t]:pt-6",m),...t}),re=({children:m,className:t,variant:h,visual:b,...G})=>sa("div",{"data-slot":"card","data-variant":h??"default","data-visual":b,className:e(Er({variant:h}),b==="accent_gradient"&&"relative overflow-hidden",t),...G,children:[b==="accent_gradient"?_o(Cs,{}):null,m]});import*as Yt from"react";import{Fragment as ys,jsx as Oo,jsxs as Ps}from"react/jsx-runtime";var Rs=Object.defineProperty,ko=(m,t)=>Rs(m,"name",{value:t,configurable:!0}),cn="Checkbox",[ws,Ru]=i(cn),[Ss,dn]=ws(cn);function la(m){let{__scopeCheckbox:t,checked:h,children:b,defaultChecked:G,disabled:S,form:X,name:te,onCheckedChange:Q,required:ee,value:ce="on",internal_do_not_use_render:V}=m,[ge,he]=s({prop:h,defaultProp:G??!1,onChange:Q,caller:cn}),[Te,we]=Yt.useState(null),[be,Ce]=Yt.useState(null),Me=Yt.useRef(!1),[Re,Pe]=Yt.useReducer((Ge)=>Ge+1,0),nt=Te?!!X||!!Te.closest("form"):!0,De={checked:ge,disabled:S,setChecked:he,control:Te,setControl:we,name:te,form:X,value:ce,hasConsumerStoppedPropagationRef:Me,userInteractionCount:Re,onUserInteraction:Pe,required:ee,defaultChecked:Eo(G)?!1:G,isFormControl:nt,bubbleInput:be,setBubbleInput:Ce};return Oo(Ss,{scope:t,...De,children:ua(V)?V(De):b})}ko(la,"CheckboxProvider");var Ts="CheckboxTrigger",Is=Yt.forwardRef(ko(function({__scopeCheckbox:t,onKeyDown:h,onClick:b,...G},S){let{control:X,value:te,disabled:Q,checked:ee,required:ce,setControl:V,setChecked:ge,hasConsumerStoppedPropagationRef:he,onUserInteraction:Te,isFormControl:we,bubbleInput:be}=dn(Ts,t),Ce=a(S,V),Me=Yt.useRef(ee);return Yt.useEffect(()=>{let Re=X?.form;if(Re){let Pe=ko(()=>ge(Me.current),"reset");return Re.addEventListener("reset",Pe),()=>Re.removeEventListener("reset",Pe)}},[X,ge]),Oo(o.button,{type:"button",role:"checkbox","aria-checked":Eo(ee)?"mixed":ee,"aria-required":ce,"data-state":un(ee),"data-disabled":Q?"":void 0,disabled:Q,value:te,...G,ref:Ce,onKeyDown:r(h,(Re)=>{if(Re.key==="Enter")Re.preventDefault()}),onClick:r(b,(Re)=>{if(Te(),ge((Pe)=>Eo(Pe)?!0:!Pe),be&&we){if(he.current=Re.isPropagationStopped(),!he.current)Re.stopPropagation()}})})},"CheckboxTrigger")),ca=Yt.forwardRef(ko(function(t,h){let{__scopeCheckbox:b,name:G,checked:S,defaultChecked:X,required:te,disabled:Q,value:ee,onCheckedChange:ce,form:V,...ge}=t;return Oo(la,{__scopeCheckbox:b,checked:S,defaultChecked:X,disabled:Q,required:te,onCheckedChange:ce,name:G,form:V,value:ee,internal_do_not_use_render:({isFormControl:he})=>Ps(ys,{children:[Oo(Is,{...ge,ref:h,__scopeCheckbox:b}),he&&Oo(ks,{__scopeCheckbox:b})]})})},"Checkbox")),_s="CheckboxIndicator",da=Yt.forwardRef(ko(function(t,h){let{__scopeCheckbox:b,forceMount:G,...S}=t,X=dn(_s,b);return Oo(d,{present:G||Eo(X.checked)||X.checked===!0,children:Oo(o.span,{"data-state":un(X.checked),"data-disabled":X.disabled?"":void 0,...S,ref:h,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),Es="CheckboxBubbleInput",ks=Yt.forwardRef(ko(function({__scopeCheckbox:t,onClick:h,...b},G){let{control:S,hasConsumerStoppedPropagationRef:X,userInteractionCount:te,checked:Q,defaultChecked:ee,required:ce,disabled:V,name:ge,value:he,form:Te,bubbleInput:we,setBubbleInput:be}=dn(Es,t),Ce=a(G,be),Me=N(S),Re=Yt.useRef(!1),Pe=Yt.useRef(Q),nt=Yt.useRef(te);Yt.useEffect(()=>{let Ge=we;if(!Ge)return;let it=window.HTMLInputElement.prototype,ct=Object.getOwnPropertyDescriptor(it,"checked").set,st=te!==nt.current;nt.current=te;let bt=Pe.current!==Q;Pe.current=Q;let Ct=!(st&&X.current);if(bt&&ct){Re.current=!st;let dt=new Event("click",{bubbles:Ct});Ge.indeterminate=Eo(Q),ct.call(Ge,Eo(Q)?!1:Q),Ge.dispatchEvent(dt),Re.current=!1}},[we,Q,X,te]);let De=Yt.useRef(Eo(Q)?!1:Q);return Oo(o.input,{type:"checkbox","aria-hidden":!0,defaultChecked:ee??De.current,required:ce,disabled:V,name:ge,value:he,form:Te,...b,tabIndex:-1,ref:Ce,onClick:r(h,(Ge)=>{if(Re.current)Ge.stopPropagation()}),style:{...b.style,...Me,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function ua(m){return typeof m==="function"}ko(ua,"isFunction");function Eo(m){return m==="indeterminate"}ko(Eo,"isIndeterminate");function un(m){return Eo(m)?"indeterminate":m?"checked":"unchecked"}ko(un,"getState");import{jsx as pn}from"react/jsx-runtime";var Xe=({className:m,...t})=>pn(ca,{"data-slot":"checkbox",className:e("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",m),...t,children:pn(da,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:pn(f,{className:"size-3.5 text-current"})})});import{jsx as mn}from"react/jsx-runtime";var de=({...m})=>mn(wt,{"data-slot":"collapsible",...m}),fe=({...m})=>mn(an,{"data-slot":"collapsible-trigger",...m}),pe=({...m})=>mn(sn,{"data-slot":"collapsible-content",...m});import*as ho from"react";var pa=1,Ds=0.9,Ns=0.8,As=0.17,fn=0.1,gn=0.999,Os=0.9999,Ls=0.99,Gs=/[\\\/_+.#"@\[\(\{&]/,Bs=/[\\\/_+.#"@\[\(\{&]/g,Fs=/[\s-]/,fa=/[\s-]/g;function vn(m,t,h,b,G,S,X){if(S===t.length)return G===m.length?pa:Ls;var te=`${G},${S}`;if(X[te]!==void 0)return X[te];for(var Q=b.charAt(S),ee=h.indexOf(Q,G),ce=0,V,ge,he,Te;ee>=0;)V=vn(m,t,h,b,ee+1,S+1,X),V>ce&&(ee===G?V*=pa:Gs.test(m.charAt(ee-1))?(V*=Ns,he=m.slice(G,ee-1).match(Bs),he&&G>0&&(V*=Math.pow(gn,he.length))):Fs.test(m.charAt(ee-1))?(V*=Ds,Te=m.slice(G,ee-1).match(fa),Te&&G>0&&(V*=Math.pow(gn,Te.length))):(V*=As,G>0&&(V*=Math.pow(gn,ee-G))),m.charAt(ee)!==t.charAt(S)&&(V*=Os)),(V<fn&&h.charAt(ee-1)===b.charAt(S+1)||b.charAt(S+1)===b.charAt(S)&&h.charAt(ee-1)!==b.charAt(S))&&(ge=vn(m,t,h,b,ee+1,S+2,X),ge*fn>V&&(V=ge*fn)),V>ce&&(ce=V),ee=h.indexOf(Q,ee+1);return X[te]=ce,ce}function ma(m){return m.toLowerCase().replace(fa," ")}function ga(m,t,h){return m=h&&h.length>0?`${m+" "+h.join(" ")}`:m,vn(m,t,ma(m),ma(t),0,0,{})}import*as ke from"react";var cr='[cmdk-group=""]',hn='[cmdk-group-items=""]',Vs='[cmdk-group-heading=""]',ha='[cmdk-item=""]',va=`${ha}:not([aria-disabled="true"])`,bn="cmdk-item-select",Jo="data-value",Hs=(m,t,h)=>ga(m,t,h),ba=ke.createContext(void 0),dr=()=>ke.useContext(ba),xa=ke.createContext(void 0),xn=()=>ke.useContext(xa),Ca=ke.createContext(void 0),Ra=ke.forwardRef((m,t)=>{let h=Qo(()=>{var ve,Ae;return{search:"",value:(Ae=(ve=m.value)!=null?ve:m.defaultValue)!=null?Ae:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),b=Qo(()=>new Set),G=Qo(()=>new Map),S=Qo(()=>new Map),X=Qo(()=>new Set),te=ya(m),{label:Q,children:ee,value:ce,onValueChange:V,filter:ge,shouldFilter:he,loop:Te,disablePointerSelection:we=!1,vimBindings:be=!0,...Ce}=m,Me=c(),Re=c(),Pe=c(),nt=ke.useRef(null),De=Js();Ho(()=>{if(ce!==void 0){let ve=ce.trim();h.current.value=ve,Ge.emit()}},[ce]),Ho(()=>{De(6,Ct)},[]);let Ge=ke.useMemo(()=>({subscribe:(ve)=>(X.current.add(ve),()=>X.current.delete(ve)),snapshot:()=>h.current,setState:(ve,Ae,Ee)=>{var Ie,Le,ot,Ne;if(!Object.is(h.current[ve],Ae)){if(h.current[ve]=Ae,ve==="search")bt(),ct(),De(1,st);else if(ve==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Oe=document.getElementById(Pe);Oe?Oe.focus():(Ie=document.getElementById(Me))==null||Ie.focus()}if(De(7,()=>{var Oe;h.current.selectedItemId=(Oe=dt())==null?void 0:Oe.id,Ge.emit()}),Ee||De(5,Ct),((Le=te.current)==null?void 0:Le.value)!==void 0){let Oe=Ae!=null?Ae:"";(Ne=(ot=te.current).onValueChange)==null||Ne.call(ot,Oe);return}}Ge.emit()}},emit:()=>{X.current.forEach((ve)=>ve())}}),[]),it=ke.useMemo(()=>({value:(ve,Ae,Ee)=>{var Ie;Ae!==((Ie=S.current.get(ve))==null?void 0:Ie.value)&&(S.current.set(ve,{value:Ae,keywords:Ee}),h.current.filtered.items.set(ve,lt(Ae,Ee)),De(2,()=>{ct(),Ge.emit()}))},item:(ve,Ae)=>(b.current.add(ve),Ae&&(G.current.has(Ae)?G.current.get(Ae).add(ve):G.current.set(Ae,new Set([ve]))),De(3,()=>{bt(),ct(),h.current.value||st(),Ge.emit()}),()=>{S.current.delete(ve),b.current.delete(ve),h.current.filtered.items.delete(ve);let Ee=dt();De(4,()=>{bt(),(Ee==null?void 0:Ee.getAttribute("id"))===ve&&st(),Ge.emit()})}),group:(ve)=>(G.current.has(ve)||G.current.set(ve,new Set),()=>{S.current.delete(ve),G.current.delete(ve)}),filter:()=>te.current.shouldFilter,label:Q||m["aria-label"],getDisablePointerSelection:()=>te.current.disablePointerSelection,listId:Me,inputId:Pe,labelId:Re,listInnerRef:nt}),[]);function lt(ve,Ae){var Ee,Ie;let Le=(Ie=(Ee=te.current)==null?void 0:Ee.filter)!=null?Ie:Hs;return ve?Le(ve,h.current.search,Ae):0}function ct(){if(!h.current.search||te.current.shouldFilter===!1)return;let ve=h.current.filtered.items,Ae=[];h.current.filtered.groups.forEach((Ie)=>{let Le=G.current.get(Ie),ot=0;Le.forEach((Ne)=>{let Oe=ve.get(Ne);ot=Math.max(Oe,ot)}),Ae.push([Ie,ot])});let Ee=nt.current;We().sort((Ie,Le)=>{var ot,Ne;let Oe=Ie.getAttribute("id"),St=Le.getAttribute("id");return((ot=ve.get(St))!=null?ot:0)-((Ne=ve.get(Oe))!=null?Ne:0)}).forEach((Ie)=>{let Le=Ie.closest(hn);Le?Le.appendChild(Ie.parentElement===Le?Ie:Ie.closest(`${hn} > *`)):Ee.appendChild(Ie.parentElement===Ee?Ie:Ie.closest(`${hn} > *`))}),Ae.sort((Ie,Le)=>Le[1]-Ie[1]).forEach((Ie)=>{var Le;let ot=(Le=nt.current)==null?void 0:Le.querySelector(`${cr}[${Jo}="${encodeURIComponent(Ie[0])}"]`);ot==null||ot.parentElement.appendChild(ot)})}function st(){let ve=We().find((Ee)=>Ee.getAttribute("aria-disabled")!=="true"),Ae=ve==null?void 0:ve.getAttribute(Jo);Ge.setState("value",Ae||void 0)}function bt(){var ve,Ae,Ee,Ie;if(!h.current.search||te.current.shouldFilter===!1){h.current.filtered.count=b.current.size;return}h.current.filtered.groups=new Set;let Le=0;for(let ot of b.current){let Ne=(Ae=(ve=S.current.get(ot))==null?void 0:ve.value)!=null?Ae:"",Oe=(Ie=(Ee=S.current.get(ot))==null?void 0:Ee.keywords)!=null?Ie:[],St=lt(Ne,Oe);h.current.filtered.items.set(ot,St),St>0&&Le++}for(let[ot,Ne]of G.current)for(let Oe of Ne)if(h.current.filtered.items.get(Oe)>0){h.current.filtered.groups.add(ot);break}h.current.filtered.count=Le}function Ct(){var ve,Ae,Ee;let Ie=dt();Ie&&(((ve=Ie.parentElement)==null?void 0:ve.firstChild)===Ie&&((Ee=(Ae=Ie.closest(cr))==null?void 0:Ae.querySelector(Vs))==null||Ee.scrollIntoView({block:"nearest"})),Ie.scrollIntoView({block:"nearest"}))}function dt(){var ve;return(ve=nt.current)==null?void 0:ve.querySelector(`${ha}[aria-selected="true"]`)}function We(){var ve;return Array.from(((ve=nt.current)==null?void 0:ve.querySelectorAll(va))||[])}function He(ve){let Ae=We()[ve];Ae&&Ge.setState("value",Ae.getAttribute(Jo))}function vt(ve){var Ae;let Ee=dt(),Ie=We(),Le=Ie.findIndex((Ne)=>Ne===Ee),ot=Ie[Le+ve];(Ae=te.current)!=null&&Ae.loop&&(ot=Le+ve<0?Ie[Ie.length-1]:Le+ve===Ie.length?Ie[0]:Ie[Le+ve]),ot&&Ge.setState("value",ot.getAttribute(Jo))}function jt(ve){let Ae=dt(),Ee=Ae==null?void 0:Ae.closest(cr),Ie;for(;Ee&&!Ie;)Ee=ve>0?Xs(Ee,cr):Zs(Ee,cr),Ie=Ee==null?void 0:Ee.querySelector(va);Ie?Ge.setState("value",Ie.getAttribute(Jo)):vt(ve)}let yt=()=>He(We().length-1),Wt=(ve)=>{ve.preventDefault(),ve.metaKey?yt():ve.altKey?jt(1):vt(1)},qt=(ve)=>{ve.preventDefault(),ve.metaKey?He(0):ve.altKey?jt(-1):vt(-1)};return ke.createElement(o.div,{ref:t,tabIndex:-1,...Ce,"cmdk-root":"",onKeyDown:(ve)=>{var Ae;(Ae=Ce.onKeyDown)==null||Ae.call(Ce,ve);let Ee=ve.nativeEvent.isComposing||ve.keyCode===229;if(!(ve.defaultPrevented||Ee))switch(ve.key){case"n":case"j":{be&&ve.ctrlKey&&Wt(ve);break}case"ArrowDown":{Wt(ve);break}case"p":case"k":{be&&ve.ctrlKey&&qt(ve);break}case"ArrowUp":{qt(ve);break}case"Home":{ve.preventDefault(),He(0);break}case"End":{ve.preventDefault(),yt();break}case"Enter":{ve.preventDefault();let Ie=dt();if(Ie){let Le=new Event(bn);Ie.dispatchEvent(Le)}}}}},ke.createElement("label",{"cmdk-label":"",htmlFor:it.inputId,id:it.labelId,style:el},Q),Rr(m,(ve)=>ke.createElement(xa.Provider,{value:Ge},ke.createElement(ba.Provider,{value:it},ve))))}),zs=ke.forwardRef((m,t)=>{var h,b;let G=c(),S=ke.useRef(null),X=ke.useContext(Ca),te=dr(),Q=ya(m),ee=(b=(h=Q.current)==null?void 0:h.forceMount)!=null?b:X==null?void 0:X.forceMount;Ho(()=>{if(!ee)return te.item(G,X==null?void 0:X.id)},[ee]);let ce=Pa(G,S,[m.value,m.children,S],m.keywords),V=xn(),ge=Lo((De)=>De.value&&De.value===ce.current),he=Lo((De)=>ee||te.filter()===!1?!0:De.search?De.filtered.items.get(G)>0:!0);ke.useEffect(()=>{let De=S.current;if(!(!De||m.disabled))return De.addEventListener(bn,Te),()=>De.removeEventListener(bn,Te)},[he,m.onSelect,m.disabled]);function Te(){var De,Ge;we(),(Ge=(De=Q.current).onSelect)==null||Ge.call(De,ce.current)}function we(){V.setState("value",ce.current,!0)}if(!he)return null;let{disabled:be,value:Ce,onSelect:Me,forceMount:Re,keywords:Pe,...nt}=m;return ke.createElement(o.div,{ref:xe(S,t),...nt,id:G,"cmdk-item":"",role:"option","aria-disabled":!!be,"aria-selected":!!ge,"data-disabled":!!be,"data-selected":!!ge,onPointerMove:be||te.getDisablePointerSelection()?void 0:we,onClick:be?void 0:Te},m.children)}),js=ke.forwardRef((m,t)=>{let{heading:h,children:b,forceMount:G,...S}=m,X=c(),te=ke.useRef(null),Q=ke.useRef(null),ee=c(),ce=dr(),V=Lo((he)=>G||ce.filter()===!1?!0:he.search?he.filtered.groups.has(X):!0);Ho(()=>ce.group(X),[]),Pa(X,te,[m.value,m.heading,Q]);let ge=ke.useMemo(()=>({id:X,forceMount:G}),[G]);return ke.createElement(o.div,{ref:xe(te,t),...S,"cmdk-group":"",role:"presentation",hidden:V?void 0:!0},h&&ke.createElement("div",{ref:Q,"cmdk-group-heading":"","aria-hidden":!0,id:ee},h),Rr(m,(he)=>ke.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":h?ee:void 0},ke.createElement(Ca.Provider,{value:ge},he))))}),Us=ke.forwardRef((m,t)=>{let{alwaysRender:h,...b}=m,G=ke.useRef(null),S=Lo((X)=>!X.search);return!h&&!S?null:ke.createElement(o.div,{ref:xe(G,t),...b,"cmdk-separator":"",role:"separator"})}),Ks=ke.forwardRef((m,t)=>{let{onValueChange:h,...b}=m,G=m.value!=null,S=xn(),X=Lo((ee)=>ee.search),te=Lo((ee)=>ee.selectedItemId),Q=dr();return ke.useEffect(()=>{m.value!=null&&S.setState("search",m.value)},[m.value]),ke.createElement(o.input,{ref:t,...b,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":Q.listId,"aria-labelledby":Q.labelId,"aria-activedescendant":te,id:Q.inputId,type:"text",value:G?m.value:X,onChange:(ee)=>{G||S.setState("search",ee.target.value),h==null||h(ee.target.value)}})}),$s=ke.forwardRef((m,t)=>{let{children:h,label:b="Suggestions",...G}=m,S=ke.useRef(null),X=ke.useRef(null),te=Lo((ee)=>ee.selectedItemId),Q=dr();return ke.useEffect(()=>{if(X.current&&S.current){let ee=X.current,ce=S.current,V,ge=new ResizeObserver(()=>{V=requestAnimationFrame(()=>{let he=ee.offsetHeight;ce.style.setProperty("--cmdk-list-height",he.toFixed(1)+"px")})});return ge.observe(ee),()=>{cancelAnimationFrame(V),ge.unobserve(ee)}}},[]),ke.createElement(o.div,{ref:xe(S,t),...G,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":te,"aria-label":b,id:Q.listId},Rr(m,(ee)=>ke.createElement("div",{ref:xe(X,Q.listInnerRef),"cmdk-list-sizer":""},ee)))}),Ys=ke.forwardRef((m,t)=>{let{open:h,onOpenChange:b,overlayClassName:G,contentClassName:S,container:X,...te}=m;return ke.createElement(O,{open:h,onOpenChange:b},ke.createElement(F,{container:X},ke.createElement(B,{"cmdk-overlay":"",className:G}),ke.createElement(U,{"aria-label":m.label,"cmdk-dialog":"",className:S},ke.createElement(Ra,{ref:t,...te}))))}),Ws=ke.forwardRef((m,t)=>Lo((h)=>h.filtered.count===0)?ke.createElement(o.div,{ref:t,...m,"cmdk-empty":"",role:"presentation"}):null),qs=ke.forwardRef((m,t)=>{let{progress:h,children:b,label:G="Loading...",...S}=m;return ke.createElement(o.div,{ref:t,...S,"cmdk-loading":"",role:"progressbar","aria-valuenow":h,"aria-valuemin":0,"aria-valuemax":100,"aria-label":G},Rr(m,(X)=>ke.createElement("div",{"aria-hidden":!0},X)))}),Go=Object.assign(Ra,{List:$s,Item:zs,Input:Ks,Group:js,Separator:Us,Dialog:Ys,Empty:Ws,Loading:qs});function Xs(m,t){let h=m.nextElementSibling;for(;h;){if(h.matches(t))return h;h=h.nextElementSibling}}function Zs(m,t){let h=m.previousElementSibling;for(;h;){if(h.matches(t))return h;h=h.previousElementSibling}}function ya(m){let t=ke.useRef(m);return Ho(()=>{t.current=m}),t}var Ho=typeof window>"u"?ke.useEffect:ke.useLayoutEffect;function Qo(m){let t=ke.useRef();return t.current===void 0&&(t.current=m()),t}function Lo(m){let t=xn(),h=()=>m(t.snapshot());return ke.useSyncExternalStore(t.subscribe,h,h)}function Pa(m,t,h,b=[]){let G=ke.useRef(),S=dr();return Ho(()=>{var X;let te=(()=>{var ee;for(let ce of h){if(typeof ce=="string")return ce.trim();if(typeof ce=="object"&&"current"in ce)return ce.current?(ee=ce.current.textContent)==null?void 0:ee.trim():G.current}})(),Q=b.map((ee)=>ee.trim());S.value(m,te,Q),(X=t.current)==null||X.setAttribute(Jo,te),G.current=te}),G}var Js=()=>{let[m,t]=ke.useState(),h=Qo(()=>new Map);return Ho(()=>{h.current.forEach((b)=>b()),h.current=new Map},[m]),(b,G)=>{h.current.set(b,G),t({})}};function Qs(m){let t=m.type;return typeof t=="function"?t(m.props):("render"in t)?t.render(m.props):m}function Rr({asChild:m,children:t},h){return m&&ke.isValidElement(t)?ke.cloneElement(Qs(t),{ref:t.ref},h(t.props.children)):h(t)}var el={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};import{jsx as fo,jsxs as Cn}from"react/jsx-runtime";var oe=({className:m,...t})=>fo(Go,{"data-slot":"command",className:e("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",m),...t}),zr=({title:m="Command Palette",description:t="Search for a command to run...",children:h,...b})=>Cn(k,{...b,children:[Cn(H,{className:"sr-only",children:[fo(M,{children:m}),fo(Z,{children:t})]}),fo(E,{className:"overflow-hidden p-0",children:fo(oe,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:h})})]}),Ze=({className:m,...t})=>Cn("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[fo(Be,{className:"size-4 shrink-0 opacity-50"}),fo(Go.Input,{"data-slot":"command-input",className:e("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",m),...t})]}),me=({className:m,...t})=>fo(Go.List,{"data-slot":"command-list",className:e("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",m),...t}),Qe=({...m})=>fo(Go.Empty,{"data-slot":"command-empty",className:"px-3 py-6 text-center text-sm",...m}),j=({className:m,...t})=>fo(Go.Group,{"data-slot":"command-group",className:e("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",m),...t}),Lt=({className:m,...t})=>fo(Go.Separator,{"data-slot":"command-separator",className:e("bg-border -mx-1 h-px",m),...t}),A=({className:m,...t})=>fo(Go.Item,{"data-slot":"command-item",className:e("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",m),...t}),Wr=({className:m,...t})=>fo("span",{"data-slot":"command-shortcut",className:e("text-muted-foreground ml-auto text-xs tracking-widest",m),...t});import*as Kt from"react";import{jsx as ro}from"react/jsx-runtime";var tl=Object.defineProperty,Mo=(m,t)=>tl(m,"name",{value:t,configurable:!0}),Rn="Popover",[Sa,rp]=i(Rn,[_]),yr=_(),[ol,zo]=Sa(Rn),rl=Mo((m)=>{let{__scopePopover:t,children:h,open:b,defaultOpen:G,onOpenChange:S,modal:X=!1}=m,te=yr(t),Q=Kt.useRef(null),[ee,ce]=Kt.useState(!1),[V,ge]=s({prop:b,defaultProp:G??!1,onChange:S,caller:Rn});return ro(ie,{...te,children:ro(ol,{scope:t,contentId:c(),triggerRef:Q,open:V,onOpenChange:ge,onOpenToggle:Kt.useCallback(()=>ge((he)=>!he),[ge]),hasCustomAnchor:ee,onCustomAnchorAdd:Kt.useCallback(()=>ce(!0),[]),onCustomAnchorRemove:Kt.useCallback(()=>ce(!1),[]),modal:X,children:h})})},"Popover"),nl="PopoverAnchor",al=Kt.forwardRef(Mo(function(t,h){let{__scopePopover:b,...G}=t,S=zo(nl,b),X=yr(b),{onCustomAnchorAdd:te,onCustomAnchorRemove:Q}=S;return Kt.useEffect(()=>(te(),()=>Q()),[te,Q]),ro(se,{...X,...G,ref:h})},"PopoverAnchor")),il="PopoverTrigger",sl=Kt.forwardRef(Mo(function(t,h){let{__scopePopover:b,...G}=t,S=zo(il,b),X=yr(b),te=a(h,S.triggerRef),Q=ro(o.button,{type:"button","aria-haspopup":"dialog","aria-expanded":S.open,"aria-controls":S.open?S.contentId:void 0,"data-state":yn(S.open),...G,ref:te,onClick:r(t.onClick,S.onOpenToggle)});return S.hasCustomAnchor?Q:ro(se,{asChild:!0,...X,children:Q})},"PopoverTrigger")),Ta="PopoverPortal",[ll,cl]=Sa(Ta,{forceMount:void 0}),dl=Mo((m)=>{let{__scopePopover:t,forceMount:h,children:b,container:G}=m,S=zo(Ta,t);return ro(ll,{scope:t,forceMount:h,children:ro(d,{present:h||S.open,children:ro(W,{asChild:!0,container:G,children:b})})})},"PopoverPortal"),ur="PopoverContent",ul=Kt.forwardRef(Mo(function(t,h){let b=cl(ur,t.__scopePopover),{forceMount:G=b.forceMount,...S}=t,X=zo(ur,t.__scopePopover);return ro(d,{present:G||X.open,children:X.modal?ro(ml,{...S,ref:h}):ro(fl,{...S,ref:h})})},"PopoverContent")),pl=x("PopoverContent.RemoveScroll"),ml=Kt.forwardRef(Mo(function(t,h){let b=zo(ur,t.__scopePopover),G=Kt.useRef(null),S=a(h,G),X=Kt.useRef(!1);return Kt.useEffect(()=>{let te=G.current;if(te)return le(te)},[]),ro(J,{as:pl,allowPinchZoom:!0,children:ro(Ia,{...t,ref:S,trapFocus:b.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:r(t.onCloseAutoFocus,(te)=>{if(te.preventDefault(),!X.current)b.triggerRef.current?.focus()}),onPointerDownOutside:r(t.onPointerDownOutside,(te)=>{let Q=te.detail.originalEvent,ee=Q.button===0&&Q.ctrlKey===!0,ce=Q.button===2||ee;X.current=ce},{checkForDefaultPrevented:!1}),onFocusOutside:r(t.onFocusOutside,(te)=>te.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),fl=Kt.forwardRef(Mo(function(t,h){let b=zo(ur,t.__scopePopover),G=Kt.useRef(!1),S=Kt.useRef(!1);return ro(Ia,{...t,ref:h,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:(X)=>{if(t.onCloseAutoFocus?.(X),!X.defaultPrevented){if(!G.current)b.triggerRef.current?.focus();X.preventDefault()}G.current=!1,S.current=!1},onInteractOutside:(X)=>{if(t.onInteractOutside?.(X),!X.defaultPrevented){if(G.current=!0,X.detail.originalEvent.type==="pointerdown")S.current=!0}let te=X.target;if(b.triggerRef.current?.contains(te))X.preventDefault();if(X.detail.originalEvent.type==="focusin"&&S.current)X.preventDefault()}})},"PopoverContentNonModal")),Ia=Kt.forwardRef(Mo(function(t,h){let{__scopePopover:b,trapFocus:G,onOpenAutoFocus:S,onCloseAutoFocus:X,disableOutsidePointerEvents:te,onEscapeKeyDown:Q,onPointerDownOutside:ee,onFocusOutside:ce,onInteractOutside:V,...ge}=t,he=zo(ur,b),Te=yr(b);return z(),ro(ne,{asChild:!0,loop:!0,trapped:G,onMountAutoFocus:S,onUnmountAutoFocus:X,children:ro(D,{asChild:!0,disableOutsidePointerEvents:te,onInteractOutside:V,onEscapeKeyDown:Q,onPointerDownOutside:ee,onFocusOutside:ce,onDismiss:()=>he.onOpenChange(!1),deferPointerDownOutside:!0,children:ro(ye,{"data-state":yn(he.open),role:"dialog",id:he.contentId,...Te,...ge,ref:h,style:{...ge.style,...{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}})})})},"PopoverContentImpl"));function yn(m){return m?"open":"closed"}Mo(yn,"getState");var _a=rl,Ea=al,ka=sl,Ma=dl,Da=ul;import{jsx as pr}from"react/jsx-runtime";var R=({...m})=>pr(_a,{"data-slot":"popover",...m}),L=({...m})=>pr(ka,{"data-slot":"popover-trigger",...m}),I=({className:m,align:t="center",sideOffset:h=4,...b})=>pr(Ma,{children:pr(Da,{"data-slot":"popover-content",align:t,sideOffset:h,className:e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",m),...b})}),qr=({...m})=>pr(Ea,{"data-slot":"popover-anchor",...m});import{jsx as Zt,jsxs as Po,Fragment as Na}from"react/jsx-runtime";var vl={className:void 0,disabled:!1,emptyMessage:"No option found.",hasMore:!1,loadMoreLabel:"Load more",loading:!1,loadingMessage:"Loading options...",loadingMore:!1,modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},hl=48,bl=({onVisible:m})=>{let t=ho.useRef(null),h=ho.useEffectEvent(m);return ho.useEffect(()=>{let b=t.current;if(!b||!("IntersectionObserver"in globalThis))return;let G=new IntersectionObserver((S)=>{if(S.some((X)=>X.isIntersecting))G.disconnect(),h()},{root:b.closest("[cmdk-list]"),rootMargin:`0px 0px ${hl}px 0px`});return G.observe(b),()=>{G.disconnect()}},[]),Zt("div",{ref:t,"aria-hidden":!0,className:"h-px"})},Pn=(m)=>{if(m===void 0||m==="")return[];return[m].flat()},pt=ho.forwardRef(function(t,h){let b={...vl,...t},{options:G,id:S,placeholder:X,searchPlaceholder:te,emptyMessage:Q,className:ee,width:ce,disabled:V,loading:ge,loadingMessage:he,onSearchChange:Te,onLoadMore:we,hasMore:be,loadingMore:Ce,loadMoreLabel:Me,modal:Re,actionOption:Pe,onOpenChange:nt}=b,[De,Ge]=ho.useState(!1),[it,lt]=ho.useState(()=>Pn(b.defaultValue)),ct=b.value!==void 0,st=ct?Pn(b.value):it,bt=(We)=>{Ge(We),nt?.(We)},Ct=(We)=>{if(b.multiple===!0){let vt=st.includes(We)?st.filter((jt)=>jt!==We):[...st,We];if(!ct)lt(vt);b.onChange?.(vt);return}let He=st[0]===We?"":We;if(!ct)lt(Pn(He));b.onChange?.(He),bt(!1)},dt=(We)=>G.find((He)=>He.value===We)?.label??(b.multiple===!0?b.selectedLabels?.[We]:b.selectedLabel)??We;return Po(R,{modal:Re,open:De,onOpenChange:bt,children:[Zt(L,{asChild:!0,children:Po(n,{ref:h,id:S,variant:"outline","aria-expanded":De,"aria-busy":ge,className:e("justify-between",ee),style:{width:ce},disabled:V,children:[st.length>0?Zt("span",{className:"min-w-0 truncate",children:st.map(dt).join(", ")}):Zt("span",{className:"min-w-0 truncate text-muted-foreground",children:X}),ge?Zt(T,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):Zt(Fe,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),Zt(I,{className:"p-0",style:{width:"var(--radix-popover-trigger-width)"},children:Po(oe,{shouldFilter:!Te,children:[Zt(Ze,{...Te?{onValueChange:Te}:{},placeholder:te}),Zt(me,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.5rem))]",children:ge?Po("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[Zt(T,{"aria-hidden":!0,className:"size-4 animate-spin"}),he]}):Po(Na,{children:[Zt(Qe,{children:Q}),Po(j,{children:[G.map((We)=>Po(A,{value:We.label,keywords:[We.label],disabled:We.disabled===!0,onSelect:()=>{Ct(We.value)},children:[Zt(f,{className:e("mr-2 h-4 w-4",st.includes(We.value)?"opacity-100":"opacity-0")}),Zt("span",{className:"min-w-0 truncate",title:We.label,children:We.label})]},We.value)),be&&we&&!Ce?Zt(bl,{onVisible:we},G.length):null]}),be&&we?Po(Na,{children:[Zt(Lt,{}),Zt(j,{children:Po(A,{disabled:Ce,value:Me,onSelect:we,children:[Ce?Zt(T,{"aria-hidden":!0,className:"animate-spin"}):null,Me]})})]}):null,Pe&&G.length>0?Zt(Lt,{}):null,Pe?Zt(j,{children:Po(A,{value:Pe.label,keywords:[Pe.label],onSelect:()=>{Ct(Pe.value)},children:[Pe.icon,Pe.label]})}):null]})})]})})]})});pt.displayName="Combobox";import{jsx as xl}from"react/jsx-runtime";var Je=({className:m,...t})=>xl("textarea",{"data-slot":"textarea",className:e("border-input placeholder:text-muted-foreground 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 field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",m),...t});import*as Sr from"react";var Cl=Object.defineProperty,Rl=(m,t)=>Cl(m,"name",{value:t,configurable:!0});function Ue(m){let t=Sr.useRef({value:m,previous:m});return Sr.useMemo(()=>{if(t.current.value!==m)t.current.previous=t.current.value,t.current.value=m;return t.current.previous},[m])}Rl(Ue,"usePrevious");import*as Aa from"react";import{jsx as wl}from"react/jsx-runtime";var yl=Object.defineProperty,Pl=(m,t)=>yl(m,"name",{value:t,configurable:!0}),wn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Sl=Aa.forwardRef(Pl(function(t,h){return wl(o.span,{...t,ref:h,style:{...wn,...t.style}})},"VisuallyHidden")),It=Sl;import*as _n from"react";import{jsx as Sn}from"react/jsx-runtime";var Il=Object.defineProperty,Do=(m,t)=>Il(m,"name",{value:t,configurable:!0}),Oa="Progress",En=100,[_l,Pp]=i(Oa),[El,kl]=_l(Oa),Ml=_n.forwardRef(Do(function(t,h){let{__scopeProgress:b,value:G=null,max:S,getValueLabel:X=La,...te}=t;if((S||S===0)&&!Tn(S))console.error(Ga(`${S}`,"Progress"));let Q=Tn(S)?S:En;if(G!==null&&!In(G,Q))console.error(Ba(`${G}`,"Progress"));let ee=In(G,Q)?G:null,ce=mr(ee)?X(ee,Q):void 0;return Sn(El,{scope:b,value:ee,max:Q,children:Sn(o.div,{"aria-valuemax":Q,"aria-valuemin":0,"aria-valuenow":mr(ee)?ee:void 0,"aria-valuetext":ce,role:"progressbar","data-state":kn(ee,Q),"data-value":ee??void 0,"data-max":Q,...te,ref:h})})},"Progress")),Dl="ProgressIndicator",Nl=_n.forwardRef(Do(function(t,h){let{__scopeProgress:b,...G}=t,S=kl(Dl,b);return Sn(o.div,{"data-state":kn(S.value,S.max),"data-value":S.value??void 0,"data-max":S.max,...G,ref:h})},"ProgressIndicator"));function La(m,t){return`${Math.round(m/t*100)}%`}Do(La,"defaultGetValueLabel");function kn(m,t){return m==null?"indeterminate":m===t?"complete":"loading"}Do(kn,"getProgressState");function mr(m){return typeof m==="number"}Do(mr,"isNumber");function Tn(m){return mr(m)&&!isNaN(m)&&m>0}Do(Tn,"isValidMaxNumber");function In(m,t){return mr(m)&&!isNaN(m)&&m<=t&&m>=0}Do(In,"isValidValueNumber");function Ga(m,t){return`Invalid prop \`max\` of value \`${m}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${En}\`.`}Do(Ga,"getInvalidMaxError");function Ba(m,t){return`Invalid prop \`value\` of value \`${m}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
|
-
- a positive number
|
|
3
|
-
- less than the value passed to \`max\` (or ${En} if no \`max\` prop is set)
|
|
4
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
|
-
|
|
6
|
-
Defaulting to \`null\`.`}Do(Ba,"getInvalidValueError");var Fa=Ml,Va=Nl;import{jsx as Ha}from"react/jsx-runtime";var Pt=({className:m,value:t,...h})=>Ha(Fa,{"data-slot":"progress",className:e("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",m),value:t,...h,children:Ha(Va,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t??0)}%)`}})});import*as lo from"react";import*as no from"react";import{Fragment as Hp,jsx as fr,jsxs as zp}from"react/jsx-runtime";import{Fragment as Ul,jsx as bo,jsxs as Kl}from"react/jsx-runtime";var Ol=Object.defineProperty,ao=(m,t)=>Ol(m,"name",{value:t,configurable:!0}),ja="Radio",[Ll,Ua]=i(ja),[Gl,Ir]=Ll(ja);function Ka(m){let{__scopeRadio:t,checked:h=!1,children:b,disabled:G,form:S,name:X,onCheck:te,required:Q,value:ee="on",internal_do_not_use_render:ce}=m,[V,ge]=no.useState(null),[he,Te]=no.useState(null),we=no.useRef(!1),[be,Ce]=no.useReducer((Pe)=>Pe+1,0),Me=V?!!S||!!V.closest("form"):!0,Re={checked:h,disabled:G,required:Q,name:X,form:S,value:ee,control:V,setControl:ge,hasConsumerStoppedPropagationRef:we,userInteractionCount:be,onUserInteraction:Ce,isFormControl:Me,bubbleInput:he,setBubbleInput:Te,onCheck:ao(()=>te?.(),"onCheck")};return fr(Gl,{scope:t,...Re,children:$a(ce)?ce(Re):b})}ao(Ka,"RadioProvider");var Bl="RadioTrigger",Fl=no.forwardRef(ao(function({__scopeRadio:t,onClick:h,...b},G){let{checked:S,disabled:X,value:te,setControl:Q,onCheck:ee,hasConsumerStoppedPropagationRef:ce,onUserInteraction:V,isFormControl:ge,bubbleInput:he}=Ir(Bl,t),Te=a(G,Q);return fr(o.button,{type:"button",role:"radio","aria-checked":S,"data-state":Mn(S),"data-disabled":X?"":void 0,disabled:X,value:te,...b,ref:Te,onClick:r(h,(we)=>{if(!S)V(),ee();if(he&&ge){if(ce.current=we.isPropagationStopped(),!ce.current)we.stopPropagation()}})})},"RadioTrigger")),Vl="RadioIndicator",Hl=no.forwardRef(ao(function(t,h){let{__scopeRadio:b,forceMount:G,...S}=t,X=Ir(Vl,b);return fr(d,{present:G||X.checked,children:fr(o.span,{"data-state":Mn(X.checked),"data-disabled":X.disabled?"":void 0,...S,ref:h})})},"RadioIndicator")),zl="RadioBubbleInput",jl=no.forwardRef(ao(function({__scopeRadio:t,onClick:h,...b},G){let{control:S,checked:X,required:te,disabled:Q,name:ee,value:ce,form:V,bubbleInput:ge,setBubbleInput:he,hasConsumerStoppedPropagationRef:Te,userInteractionCount:we}=Ir(zl,t),be=a(G,he),Ce=N(S),Me=no.useRef(!1),Re=no.useRef(X),Pe=no.useRef(we);no.useEffect(()=>{let De=ge;if(!De)return;let Ge=window.HTMLInputElement.prototype,lt=Object.getOwnPropertyDescriptor(Ge,"checked").set,ct=we!==Pe.current;Pe.current=we;let st=Re.current!==X;Re.current=X;let bt=!(ct&&Te.current);if(st&<){Me.current=!ct;let Ct=new Event("click",{bubbles:bt});lt.call(De,X),De.dispatchEvent(Ct),Me.current=!1}},[ge,X,Te,we]);let nt=no.useRef(X);return fr(o.input,{type:"radio","aria-hidden":!0,defaultChecked:nt.current,required:te,disabled:Q,name:ee,value:ce,form:V,...b,tabIndex:-1,ref:be,onClick:r(h,(De)=>{if(Me.current)De.stopPropagation()}),style:{...b.style,...Ce,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"RadioBubbleInput"));function $a(m){return typeof m==="function"}ao($a,"isFunction");function Mn(m){return m?"checked":"unchecked"}ao(Mn,"getState");var $l=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dn="RadioGroup",[Yl,Up]=i(Dn,[C,Ua]),Ya=C(),_r=Ua(),[Wl,ql]=Yl(Dn),Tt=lo.forwardRef(ao(function(t,h){let{__scopeRadioGroup:b,name:G,form:S,defaultValue:X,value:te,required:Q=!1,disabled:ee=!1,orientation:ce,dir:V,loop:ge=!0,onValueChange:he,...Te}=t,we=Ya(b),be=g(V),[Ce,Me]=s({prop:te,defaultProp:X??null,onChange:he,caller:Dn}),[Re,Pe]=lo.useState(null),nt=a(h,Pe),De=lo.useRef(Ce);return lo.useEffect(()=>{let Ge=S?Re?.ownerDocument.getElementById(S):Re?.closest("form");if(Ge instanceof HTMLFormElement){let it=ao(()=>Me(De.current),"reset");return Ge.addEventListener("reset",it),()=>Ge.removeEventListener("reset",it)}},[Re,S,Me]),bo(Wl,{scope:b,name:G,form:S,required:Q,disabled:ee,value:Ce,onValueChange:Me,children:bo(q,{asChild:!0,...we,orientation:ce,dir:be,loop:ge,children:bo(o.div,{role:"radiogroup","aria-required":Q,"aria-orientation":ce,"data-disabled":ee?"":void 0,dir:be,...Te,ref:nt})})})},"RadioGroup")),Xl="RadioGroupItemProvider",Zl="RadioGroupItemTrigger";function Wa(m){let{__scopeRadioGroup:t,value:h,disabled:b,children:G,internal_do_not_use_render:S}=m,X=ql(Xl,t),te=_r(t),Q=X.disabled||b;return bo(Ka,{...te,checked:X.value===h,disabled:Q,required:X.required,name:X.name,form:X.form,value:h,onCheck:()=>X.onValueChange(h),internal_do_not_use_render:S,children:G})}ao(Wa,"RadioGroupItemProvider");var Jl=lo.forwardRef(ao(function(t,h){let{__scopeRadioGroup:b,...G}=t,S=Ya(b),X=_r(b),{checked:te,disabled:Q}=Ir(Zl,X.__scopeRadio),ee=lo.useRef(null),ce=a(h,ee),V=lo.useRef(!1);return lo.useEffect(()=>{let ge=ao((Te)=>{if($l.includes(Te.key))V.current=!0},"handleKeyDown"),he=ao(()=>V.current=!1,"handleKeyUp");return document.addEventListener("keydown",ge),document.addEventListener("keyup",he),()=>{document.removeEventListener("keydown",ge),document.removeEventListener("keyup",he)}},[]),bo(K,{asChild:!0,...S,focusable:!Q,active:te,children:bo(Fl,{...X,...G,ref:ce,onKeyDown:r(G.onKeyDown,(ge)=>{if(ge.key==="Enter")ge.preventDefault()}),onFocus:r(G.onFocus,()=>{if(V.current)ee.current?.click()})})})},"RadioGroupItemTrigger")),kt=lo.forwardRef(ao(function(t,h){let{__scopeRadioGroup:b,value:G,disabled:S,...X}=t;return bo(Wa,{__scopeRadioGroup:b,value:G,disabled:S,internal_do_not_use_render:({isFormControl:te})=>Kl(Ul,{children:[bo(Jl,{...X,ref:h,__scopeRadioGroup:b}),te&&bo(Ql,{__scopeRadioGroup:b})]})})},"RadioGroupItem")),Ql=lo.forwardRef(ao(function(t,h){let{__scopeRadioGroup:b,...G}=t,S=_r(b);return bo(jl,{...S,...G,ref:h})},"RadioGroupItemBubbleInput")),Et=lo.forwardRef(ao(function(t,h){let{__scopeRadioGroup:b,...G}=t,S=_r(b);return bo(Hl,{...S,...G,ref:h})},"RadioGroupIndicator"));import{jsx as Nr}from"react/jsx-runtime";var Mt=({className:m,...t})=>Nr(Tt,{"data-slot":"radio-group",className:e("grid gap-3",m),...t}),Dt=({className:m,...t})=>Nr(kt,{"data-slot":"radio-group-item",className:e("border-input text-primary 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",m),...t,children:Nr(Et,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:Nr(w,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})});var tc=Object.defineProperty,oc=(m,t)=>tc(m,"name",{value:t,configurable:!0});function ae(m,[t,h]){return Math.min(h,Math.max(t,m))}oc(ae,"clamp");import*as _e from"react";import*as An from"react-dom";import{Fragment as On,jsx as ze,jsxs as Lr}from"react/jsx-runtime";var rc=Object.defineProperty,at=(m,t)=>rc(m,"name",{value:t,configurable:!0}),nc=[" ","Enter","ArrowUp","ArrowDown"],ac=[" ","Enter"],er="Select",[Br,Fr,ic]=y(er),[Uo,xm]=i(er,[ic,_]),Ln=_(),[sc,Bo]=Uo(er),[lc,cc]=Uo(er);function Qa(m){let{__scopeSelect:t,children:h,open:b,defaultOpen:G,onOpenChange:S,value:X,defaultValue:te,onValueChange:Q,dir:ee,name:ce,autoComplete:V,disabled:ge,required:he,form:Te,internal_do_not_use_render:we}=m,be=Ln(t),[Ce,Me]=_e.useState(null),[Re,Pe]=_e.useState(null),[nt,De]=_e.useState(!1),Ge=g(ee),[it,lt]=s({prop:b,defaultProp:G??!1,onChange:S,caller:er}),[ct,st]=s({prop:X,defaultProp:te,onChange:Q,caller:er}),bt=_e.useRef(null),Ct=_e.useRef(ct);_e.useEffect(()=>{let ve=Te?Ce?.ownerDocument.getElementById(Te):Ce?.form;if(ve instanceof HTMLFormElement){let Ae=at(()=>st(Ct.current),"reset");return ve.addEventListener("reset",Ae),()=>ve.removeEventListener("reset",Ae)}},[Te,Ce,st]);let dt=Ce?!!Te||!!Ce.closest("form"):!0,[We,He]=_e.useState(new Set),vt=c(),jt=Array.from(We).map((ve)=>ve.props.value).join(";"),yt=_e.useCallback((ve)=>{He((Ae)=>new Set(Ae).add(ve))},[]),Wt=_e.useCallback((ve)=>{He((Ae)=>{let Ee=new Set(Ae);return Ee.delete(ve),Ee})},[]),qt={required:he,trigger:Ce,onTriggerChange:Me,valueNode:Re,onValueNodeChange:Pe,valueNodeHasChildren:nt,onValueNodeHasChildrenChange:De,contentId:vt,value:ct,onValueChange:st,open:it,onOpenChange:lt,dir:Ge,triggerPointerDownPosRef:bt,disabled:ge,name:ce,autoComplete:V,form:Te,nativeOptions:We,nativeSelectKey:jt,isFormControl:dt};return ze(ie,{...be,children:ze(sc,{scope:t,...qt,children:ze(Br.Provider,{scope:t,children:ze(lc,{scope:t,onNativeOptionAdd:yt,onNativeOptionRemove:Wt,children:bi(we)?we(qt):h})})})})}at(Qa,"SelectProvider");var ei=at((m)=>{let{__scopeSelect:t,children:h,...b}=m;return ze(Qa,{__scopeSelect:t,...b,internal_do_not_use_render:({isFormControl:G})=>Lr(On,{children:[h,G?ze(Ic,{__scopeSelect:t}):null]})})},"Select"),dc="SelectTrigger",ti=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,disabled:G=!1,...S}=t,X=Ln(b),te=Bo(dc,b),Q=te.disabled||G,ee=a(h,te.onTriggerChange),ce=Fr(b),V=_e.useRef("touch"),[ge,he,Te]=Bn((be)=>{let Ce=ce().filter((Pe)=>!Pe.disabled),Me=Ce.find((Pe)=>Pe.value===te.value),Re=Fn(Ce,be,Me);if(Re!==void 0)te.onValueChange(Re.value)}),we=at((be)=>{if(!Q)te.onOpenChange(!0),Te();if(be)te.triggerPointerDownPosRef.current={x:Math.round(be.pageX),y:Math.round(be.pageY)}},"handleOpen");return ze(se,{asChild:!0,...X,children:ze(o.button,{type:"button",role:"combobox","aria-controls":te.open?te.contentId:void 0,"aria-expanded":te.open,"aria-required":te.required,"aria-autocomplete":"none",dir:te.dir,"data-state":te.open?"open":"closed",disabled:Q,"data-disabled":Q?"":void 0,"data-placeholder":gr(te.value)?"":void 0,...S,ref:ee,onClick:r(S.onClick,(be)=>{if(be.currentTarget.focus(),V.current!=="mouse")we(be)}),onPointerDown:r(S.onPointerDown,(be)=>{V.current=be.pointerType;let Ce=be.target;if(Ce.hasPointerCapture(be.pointerId))Ce.releasePointerCapture(be.pointerId);if(be.button===0&&be.ctrlKey===!1&&be.pointerType==="mouse")we(be),be.preventDefault()}),onKeyDown:r(S.onKeyDown,(be)=>{let Ce=ge.current!=="";if(!(be.ctrlKey||be.altKey||be.metaKey)&&be.key.length===1)he(be.key);if(Ce&&be.key===" ")return;if(nc.includes(be.key))we(),be.preventDefault()})})})},"SelectTrigger")),uc="SelectValue",oi=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,className:G,style:S,children:X,placeholder:te="",...Q}=t,ee=Bo(uc,b),{onValueNodeHasChildrenChange:ce}=ee,V=X!==void 0,ge=a(h,ee.onValueNodeChange);l(()=>{ce(V)},[ce,V]);let he=gr(ee.value);return ze(o.span,{...Q,asChild:he?!1:Q.asChild,ref:ge,style:{pointerEvents:"none"},children:ze(_e.Fragment,{children:he?te:X},he?"placeholder":"value")})},"SelectValue")),ri=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,children:G,...S}=t;return ze(o.span,{"aria-hidden":!0,...S,ref:h,children:G||"▼"})},"SelectIcon")),pc="SelectPortal",[mc,fc]=Uo(pc,{forceMount:void 0}),ni=at((m)=>{let{__scopeSelect:t,forceMount:h,...b}=m;return ze(mc,{scope:m.__scopeSelect,forceMount:h,children:ze(W,{asChild:!0,...b})})},"SelectPortal"),jo="SelectContent",ai=_e.forwardRef(at(function(t,h){let b=fc(jo,t.__scopeSelect),{forceMount:G=b.forceMount,...S}=t,X=Bo(jo,t.__scopeSelect),[te,Q]=_e.useState();return l(()=>{Q(new DocumentFragment)},[]),ze(d,{present:G||X.open,children:({present:ee})=>ee?ze(hc,{...S,ref:h}):ze(gc,{...S,fragment:te})})},"SelectContent")),gc=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,children:G,fragment:S}=t;if(!S)return null;return An.createPortal(ze(ii,{scope:b,children:ze(Br.Slot,{scope:b,children:ze("div",{ref:h,children:G})})}),S)},"SelectContentFragment")),xo=10,[ii,Ko]=Uo(jo),vc=x("SelectContent.RemoveScroll"),hc=_e.forwardRef(at(function(t,h){let{__scopeSelect:b}=t,{position:G="item-aligned",onCloseAutoFocus:S,onEscapeKeyDown:X,onPointerDownOutside:te,side:Q,sideOffset:ee,align:ce,alignOffset:V,arrowPadding:ge,collisionBoundary:he,collisionPadding:Te,sticky:we,hideWhenDetached:be,avoidCollisions:Ce,...Me}=t,Re=Bo(jo,b),[Pe,nt]=_e.useState(null),[De,Ge]=_e.useState(null),it=a(h,nt),[lt,ct]=_e.useState(null),[st,bt]=_e.useState(null),Ct=Fr(b),[dt,We]=_e.useState(!1),He=_e.useRef(!1);_e.useEffect(()=>{if(Pe)return le(Pe)},[Pe]),z();let vt=_e.useCallback((Ne)=>{let[Oe,...St]=Ct().map((zt)=>zt.ref.current),[ft]=St.slice(-1),gt=document.activeElement;for(let zt of Ne){if(zt===gt)return;if(zt?.scrollIntoView({block:"nearest"}),zt===Oe&&De)De.scrollTop=0;if(zt===ft&&De)De.scrollTop=De.scrollHeight;if(zt?.focus(),document.activeElement!==gt)return}},[Ct,De]),jt=_e.useCallback(()=>vt([lt,Pe]),[vt,lt,Pe]);_e.useEffect(()=>{if(dt)jt()},[dt,jt]);let{onOpenChange:yt,triggerPointerDownPosRef:Wt}=Re;_e.useEffect(()=>{if(Pe){let Ne={x:0,y:0},Oe=at((ft)=>{Ne={x:Math.abs(Math.round(ft.pageX)-(Wt.current?.x??0)),y:Math.abs(Math.round(ft.pageY)-(Wt.current?.y??0))}},"handlePointerMove"),St=at((ft)=>{if(Ne.x<=10&&Ne.y<=10)ft.preventDefault();else if(!ft.composedPath().includes(Pe))yt(!1);document.removeEventListener("pointermove",Oe),Wt.current=null},"handlePointerUp");if(Wt.current!==null)document.addEventListener("pointermove",Oe),document.addEventListener("pointerup",St,{capture:!0,once:!0});return()=>{document.removeEventListener("pointermove",Oe),document.removeEventListener("pointerup",St,{capture:!0})}}},[Pe,yt,Wt]),_e.useEffect(()=>{let Ne=at(()=>yt(!1),"close");return window.addEventListener("blur",Ne),window.addEventListener("resize",Ne),()=>{window.removeEventListener("blur",Ne),window.removeEventListener("resize",Ne)}},[yt]);let[qt,ve]=Bn((Ne)=>{let Oe=Ct().filter((gt)=>!gt.disabled),St=Oe.find((gt)=>gt.ref.current===document.activeElement),ft=Fn(Oe,Ne,St);if(ft)setTimeout(()=>ft.ref.current?.focus())}),Ae=_e.useCallback((Ne,Oe,St)=>{let ft=!He.current&&!St;if(Re.value!==void 0&&Re.value===Oe||ft){if(ct(Ne),ft)He.current=!0}},[Re.value]),Ee=_e.useCallback(()=>Pe?.focus(),[Pe]),Ie=_e.useCallback((Ne,Oe,St)=>{let ft=!He.current&&!St;if(Re.value!==void 0&&Re.value===Oe||ft)bt(Ne)},[Re.value]),Le=G==="popper"?qa:bc,ot=Le===qa?{side:Q,sideOffset:ee,align:ce,alignOffset:V,arrowPadding:ge,collisionBoundary:he,collisionPadding:Te,sticky:we,hideWhenDetached:be,avoidCollisions:Ce}:{};return ze(ii,{scope:b,content:Pe,viewport:De,onViewportChange:Ge,itemRefCallback:Ae,selectedItem:lt,onItemLeave:Ee,itemTextRefCallback:Ie,focusSelectedItem:jt,selectedItemText:st,position:G,isPositioned:dt,searchRef:qt,children:ze(J,{as:vc,allowPinchZoom:!0,children:ze(ne,{asChild:!0,trapped:Re.open,onMountAutoFocus:(Ne)=>{Ne.preventDefault()},onUnmountAutoFocus:r(S,(Ne)=>{Re.trigger?.focus({preventScroll:!0}),Ne.preventDefault()}),children:ze(D,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:X,onPointerDownOutside:te,onFocusOutside:(Ne)=>Ne.preventDefault(),onDismiss:()=>Re.onOpenChange(!1),children:ze(Le,{role:"listbox",id:Re.contentId,"data-state":Re.open?"open":"closed",dir:Re.dir,onContextMenu:(Ne)=>Ne.preventDefault(),...Me,...ot,onPlaced:()=>We(!0),ref:it,style:{display:"flex",flexDirection:"column",outline:"none",...Me.style},onKeyDown:r(Me.onKeyDown,(Ne)=>{let Oe=Ne.ctrlKey||Ne.altKey||Ne.metaKey;if(Ne.key==="Tab")Ne.preventDefault();if(!Oe&&Ne.key.length===1)ve(Ne.key);if(["ArrowUp","ArrowDown","Home","End"].includes(Ne.key)){let ft=Ct().filter((gt)=>!gt.disabled).map((gt)=>gt.ref.current);if(["ArrowUp","End"].includes(Ne.key))ft=ft.slice().reverse();if(["ArrowUp","ArrowDown"].includes(Ne.key)){let gt=Ne.target,zt=ft.indexOf(gt);ft=ft.slice(zt+1)}setTimeout(()=>vt(ft)),Ne.preventDefault()}})})})})})})},"SelectContentImpl")),bc=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,onPlaced:G,...S}=t,X=Bo(jo,b),te=Ko(jo,b),[Q,ee]=_e.useState(null),[ce,V]=_e.useState(null),ge=a(h,V),he=Fr(b),Te=_e.useRef(!1),we=_e.useRef(!0),{viewport:be,selectedItem:Ce,selectedItemText:Me,focusSelectedItem:Re}=te,Pe=_e.useCallback(()=>{if(X.trigger&&X.valueNode&&Q&&ce&&be&&Ce&&Me){let it=X.trigger.getBoundingClientRect(),lt=ce.getBoundingClientRect(),ct=X.valueNode.getBoundingClientRect(),st=Me.getBoundingClientRect();if(X.dir!=="rtl"){let gt=st.left-lt.left,zt=ct.left-gt,vo=it.left-zt,So=it.width+vo,$o=Math.max(So,lt.width),To=window.innerWidth-xo,Yo=ae(zt,[xo,Math.max(xo,To-$o)]);Q.style.minWidth=So+"px",Q.style.left=Yo+"px"}else{let gt=lt.right-st.right,zt=window.innerWidth-ct.right-gt,vo=window.innerWidth-it.right-zt,So=it.width+vo,$o=Math.max(So,lt.width),To=window.innerWidth-xo,Yo=ae(zt,[xo,Math.max(xo,To-$o)]);Q.style.minWidth=So+"px",Q.style.right=Yo+"px"}let bt=he(),Ct=window.innerHeight-xo*2,dt=be.scrollHeight,We=window.getComputedStyle(ce),He=parseInt(We.borderTopWidth,10),vt=parseInt(We.paddingTop,10),jt=parseInt(We.borderBottomWidth,10),yt=parseInt(We.paddingBottom,10),Wt=He+vt+dt+yt+jt,qt=Math.min(Ce.offsetHeight*5,Wt),ve=window.getComputedStyle(be),Ae=parseInt(ve.paddingTop,10),Ee=parseInt(ve.paddingBottom,10),Ie=it.top+it.height/2-xo,Le=Ct-Ie,ot=Ce.offsetHeight/2,Ne=Ce.offsetTop+ot,Oe=He+vt+Ne,St=Wt-Oe;if(Oe<=Ie){let gt=bt.length>0&&Ce===bt[bt.length-1].ref.current;Q.style.bottom="0px";let zt=ce.clientHeight-be.offsetTop-be.offsetHeight,vo=Math.max(Le,ot+(gt?Ee:0)+zt+jt),So=Oe+vo;Q.style.height=So+"px"}else{let gt=bt.length>0&&Ce===bt[0].ref.current;Q.style.top="0px";let vo=Math.max(Ie,He+be.offsetTop+(gt?Ae:0)+ot)+St;Q.style.height=vo+"px",be.scrollTop=Oe-Ie+be.offsetTop}Q.style.margin=`${xo}px 0`,Q.style.minHeight=qt+"px",Q.style.maxHeight=Ct+"px",G?.(),requestAnimationFrame(()=>Te.current=!0)}},[he,X.trigger,X.valueNode,Q,ce,be,Ce,Me,X.dir,G]);l(()=>Pe(),[Pe]);let[nt,De]=_e.useState();l(()=>{if(ce)De(window.getComputedStyle(ce).zIndex)},[ce]);let Ge=_e.useCallback((it)=>{if(it&&we.current===!0)Pe(),Re?.(),we.current=!1},[Pe,Re]);return ze(xc,{scope:b,contentWrapper:Q,shouldExpandOnScrollRef:Te,onScrollButtonChange:Ge,children:ze("div",{ref:ee,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:nt},children:ze(o.div,{...S,ref:ge,style:{boxSizing:"border-box",maxHeight:"100%",...S.style}})})})},"SelectItemAlignedPosition")),qa=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,align:G="start",collisionPadding:S=xo,...X}=t,te=Ln(b);return ze(ye,{...te,...X,ref:h,align:G,collisionPadding:S,style:{boxSizing:"border-box",...X.style,...{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}})},"SelectPopperPosition")),[xc,Gn]=Uo(jo,{}),Xa="SelectViewport",si=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,nonce:G,...S}=t,X=Ko(Xa,b),te=Gn(Xa,b),Q=a(h,X.onViewportChange),ee=_e.useRef(0);return Lr(On,{children:[ze("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:G}),ze(Br.Slot,{scope:b,children:ze(o.div,{"data-radix-select-viewport":"",role:"presentation",...S,ref:Q,style:{position:"relative",flex:1,overflow:"hidden auto",...S.style},onScroll:r(S.onScroll,(ce)=>{let V=ce.currentTarget,{contentWrapper:ge,shouldExpandOnScrollRef:he}=te;if(he?.current&&ge){let Te=Math.abs(ee.current-V.scrollTop);if(Te>0){let we=window.innerHeight-xo*2,be=parseFloat(ge.style.minHeight),Ce=parseFloat(ge.style.height),Me=Math.max(be,Ce);if(Me<we){let Re=Me+Te,Pe=Math.min(we,Re),nt=Re-Pe;if(ge.style.height=Pe+"px",ge.style.bottom==="0px")V.scrollTop=nt>0?nt:0,ge.style.justifyContent="flex-end"}}}ee.current=V.scrollTop})})})]})},"SelectViewport")),Cc="SelectGroup",[Rc,yc]=Uo(Cc),li=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,...G}=t,S=c();return ze(Rc,{scope:b,id:S,children:ze(o.div,{role:"group","aria-labelledby":S,...G,ref:h})})},"SelectGroup")),Pc="SelectLabel",ci=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,...G}=t,S=yc(Pc,b);return ze(o.div,{id:S.id,...G,ref:h})},"SelectLabel")),Nn="SelectItem",[wc,di]=Uo(Nn),ui=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,value:G,disabled:S=!1,textValue:X,...te}=t,Q=Bo(Nn,b),ee=Ko(Nn,b),ce=Q.value===G,[V,ge]=_e.useState(X??""),[he,Te]=_e.useState(!1),we=u((Pe)=>ee.itemRefCallback?.(Pe,G,S)),be=a(h,we),Ce=c(),Me=_e.useRef("touch"),Re=at(()=>{if(!S)Q.onValueChange(G),Q.onOpenChange(!1)},"handleSelect");return ze(wc,{scope:b,value:G,disabled:S,textId:Ce,isSelected:ce,onItemTextChange:_e.useCallback((Pe)=>{ge((nt)=>nt||(Pe?.textContent??"").trim())},[]),children:ze(Br.ItemSlot,{scope:b,value:G,disabled:S,textValue:V,children:ze(o.div,{role:"option","aria-labelledby":Ce,"data-highlighted":he?"":void 0,"aria-selected":ce&&he,"data-state":ce?"checked":"unchecked","aria-disabled":S||void 0,"data-disabled":S?"":void 0,tabIndex:S?void 0:-1,...te,ref:be,onFocus:r(te.onFocus,()=>Te(!0)),onBlur:r(te.onBlur,()=>Te(!1)),onClick:r(te.onClick,()=>{if(Me.current!=="mouse")Re()}),onPointerUp:r(te.onPointerUp,()=>{if(Me.current==="mouse")Re()}),onPointerDown:r(te.onPointerDown,(Pe)=>{Me.current=Pe.pointerType}),onPointerMove:r(te.onPointerMove,(Pe)=>{if(Me.current=Pe.pointerType,S)ee.onItemLeave?.();else if(Me.current==="mouse")Pe.currentTarget.focus({preventScroll:!0})}),onPointerLeave:r(te.onPointerLeave,(Pe)=>{if(Pe.currentTarget===document.activeElement)ee.onItemLeave?.()}),onKeyDown:r(te.onKeyDown,(Pe)=>{if(S||Pe.target!==Pe.currentTarget)return;if(ee.searchRef?.current!==""&&Pe.key===" ")return;if(ac.includes(Pe.key))Re();if(Pe.key===" ")Pe.preventDefault()})})})})},"SelectItem")),Or="SelectItemText",pi=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,className:G,style:S,...X}=t,te=Bo(Or,b),Q=Ko(Or,b),ee=di(Or,b),ce=cc(Or,b),[V,ge]=_e.useState(null),he=u((Re)=>Q.itemTextRefCallback?.(Re,ee.value,ee.disabled)),Te=a(h,ge,ee.onItemTextChange,he),we=V?.textContent,be=_e.useMemo(()=>ze("option",{value:ee.value,disabled:ee.disabled,children:we},ee.value),[ee.disabled,ee.value,we]),{onNativeOptionAdd:Ce,onNativeOptionRemove:Me}=ce;return l(()=>(Ce(be),()=>Me(be)),[Ce,Me,be]),Lr(On,{children:[ze(o.span,{id:ee.textId,...X,ref:Te}),ee.isSelected&&te.valueNode&&!te.valueNodeHasChildren&&!gr(te.value)?An.createPortal(X.children,te.valueNode):null]})},"SelectItemText")),Sc="SelectItemIndicator",mi=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,...G}=t;return di(Sc,b).isSelected?ze(o.span,{"aria-hidden":!0,...G,ref:h}):null},"SelectItemIndicator")),Za="SelectScrollUpButton",fi=_e.forwardRef(at(function(t,h){let b=Ko(Za,t.__scopeSelect),G=Gn(Za,t.__scopeSelect),[S,X]=_e.useState(!1),te=a(h,G.onScrollButtonChange);return l(()=>{if(b.viewport&&b.isPositioned){let ee=function(){let V=ce.scrollTop>0;X(V)};var Q=ee;at(ee,"handleScroll");let ce=b.viewport;return ee(),ce.addEventListener("scroll",ee),()=>ce.removeEventListener("scroll",ee)}},[b.viewport,b.isPositioned]),S?ze(vi,{...t,ref:te,onAutoScroll:()=>{let{viewport:Q,selectedItem:ee}=b;if(Q&&ee)Q.scrollTop=Q.scrollTop-ee.offsetHeight}}):null},"SelectScrollUpButton")),Ja="SelectScrollDownButton",gi=_e.forwardRef(at(function(t,h){let b=Ko(Ja,t.__scopeSelect),G=Gn(Ja,t.__scopeSelect),[S,X]=_e.useState(!1),te=a(h,G.onScrollButtonChange);return l(()=>{if(b.viewport&&b.isPositioned){let ee=function(){let V=ce.scrollHeight-ce.clientHeight,ge=Math.ceil(ce.scrollTop)<V;X(ge)};var Q=ee;at(ee,"handleScroll");let ce=b.viewport;return ee(),ce.addEventListener("scroll",ee),()=>ce.removeEventListener("scroll",ee)}},[b.viewport,b.isPositioned]),S?ze(vi,{...t,ref:te,onAutoScroll:()=>{let{viewport:Q,selectedItem:ee}=b;if(Q&&ee)Q.scrollTop=Q.scrollTop+ee.offsetHeight}}):null},"SelectScrollDownButton")),vi=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,onAutoScroll:G,...S}=t,X=Ko("SelectScrollButton",b),te=_e.useRef(null),Q=Fr(b),ee=_e.useCallback(()=>{if(te.current!==null)window.clearInterval(te.current),te.current=null},[]);return _e.useEffect(()=>()=>ee(),[ee]),l(()=>{Q().find((V)=>V.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[Q]),ze(o.div,{"aria-hidden":!0,...S,ref:h,style:{flexShrink:0,...S.style},onPointerDown:r(S.onPointerDown,()=>{if(te.current===null)te.current=window.setInterval(G,50)}),onPointerMove:r(S.onPointerMove,()=>{if(X.onItemLeave?.(),te.current===null)te.current=window.setInterval(G,50)}),onPointerLeave:r(S.onPointerLeave,()=>{ee()})})},"SelectScrollButtonImpl")),hi=_e.forwardRef(at(function(t,h){let{__scopeSelect:b,...G}=t;return ze(o.div,{"aria-hidden":!0,...G,ref:h})},"SelectSeparator"));var Tc="SelectBubbleInput",Ic=_e.forwardRef(at(function({__scopeSelect:t,...h},b){let G=Bo(Tc,t),{value:S,onValueChange:X,required:te,disabled:Q,name:ee,autoComplete:ce,form:V}=G,{nativeOptions:ge,nativeSelectKey:he}=G,Te=_e.useRef(null),we=a(b,Te),be=S??"",Ce=Ue(be),Me=Array.from(ge).some((Re)=>(Re.props.value??"")==="");return _e.useEffect(()=>{let Re=Te.current;if(!Re)return;let Pe=window.HTMLSelectElement.prototype,De=Object.getOwnPropertyDescriptor(Pe,"value").set;if(Ce!==be&&De){let Ge=new Event("change",{bubbles:!0});De.call(Re,be),Re.dispatchEvent(Ge)}},[Ce,be]),Lr(o.select,{"aria-hidden":!0,required:te,tabIndex:-1,name:ee,autoComplete:ce,disabled:Q,form:V,onChange:(Re)=>X(Re.target.value),...h,style:{...wn,...h.style},ref:we,defaultValue:be,children:[gr(S)&&!Me?ze("option",{value:""}):null,Array.from(ge)]},he)},"SelectBubbleInput"));function bi(m){return typeof m==="function"}at(bi,"isFunction");function gr(m){return m===""||m===void 0}at(gr,"shouldShowPlaceholder");function Bn(m){let t=u(m),h=_e.useRef(""),b=_e.useRef(0),G=_e.useCallback((X)=>{let te=h.current+X;t(te),at(function Q(ee){if(h.current=ee,window.clearTimeout(b.current),ee!=="")b.current=window.setTimeout(()=>Q(""),1000)},"updateSearch")(te)},[t]),S=_e.useCallback(()=>{h.current="",window.clearTimeout(b.current)},[]);return _e.useEffect(()=>()=>window.clearTimeout(b.current),[]),[h,G,S]}at(Bn,"useTypeaheadSearch");function Fn(m,t,h){let G=t.length>1&&Array.from(t).every((ee)=>ee===t[0])?t[0]:t,S=h?m.indexOf(h):-1,X=xi(m,Math.max(S,0));if(G.length===1)X=X.filter((ee)=>ee!==h);let Q=X.find((ee)=>ee.textValue.toLowerCase().startsWith(G.toLowerCase()));return Q!==h?Q:void 0}at(Fn,"findNextItem");function xi(m,t){return m.map((h,b)=>m[(t+b)%m.length])}at(xi,"wrapArray");import{jsx as Jt,jsxs as Vn}from"react/jsx-runtime";var At=({...m})=>Jt(ei,{"data-slot":"select",...m}),Kr=({...m})=>Jt(li,{"data-slot":"select-group",...m}),Nt=({...m})=>Jt(oi,{"data-slot":"select-value",...m}),_t=({className:m,size:t="default",children:h,...b})=>Vn(ti,{"data-slot":"select-trigger","data-size":t,className:e("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground 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 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",m),...b,children:[h,Jt(ri,{asChild:!0,children:Jt(v,{className:"size-4 opacity-50"})})]}),jr=({className:m,...t})=>Jt(ci,{"data-slot":"select-label",className:e("text-muted-foreground px-2 py-1.5 text-xs",m),...t}),Ot=({className:m,children:t,...h})=>Vn(ui,{"data-slot":"select-item",className:e("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",m),...h,children:[Jt("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:Jt(mi,{children:Jt(f,{className:"size-4"})})}),Jt(pi,{children:t})]}),Yr=({className:m,...t})=>Jt(hi,{"data-slot":"select-separator",className:e("bg-border pointer-events-none -mx-1 my-1 h-px",m),...t}),Mr=({className:m,...t})=>Jt(fi,{"data-slot":"select-scroll-up-button",className:e("flex cursor-default items-center justify-center py-1",m),...t,children:Jt(wr,{className:"size-4"})}),Dr=({className:m,...t})=>Jt(gi,{"data-slot":"select-scroll-down-button",className:e("flex cursor-default items-center justify-center py-1",m),...t,children:Jt(v,{className:"size-4"})}),Ft=({className:m,children:t,position:h="popper",...b})=>Jt(ni,{children:Vn(ai,{"data-slot":"select-content",className:e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",h==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",m),position:h,...b,children:[Jt(Mr,{}),Jt(si,{className:e("p-1",h==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),Jt(Dr,{})]})});import{jsx as Ec}from"react/jsx-runtime";var Ve=({className:m,...t})=>Ec("div",{"data-slot":"skeleton",className:e("bg-accent animate-pulse rounded-md",m),...t});import*as qe from"react";import{jsx as io,jsxs as Mc}from"react/jsx-runtime";var kc=Object.defineProperty,Qt=(m,t)=>kc(m,"name",{value:t,configurable:!0}),[jn,Vm]=i("Tooltip",[_]),Zr=_(),Dc="TooltipProvider",Nc=700,Hn="tooltip.open",[Ac,Un]=jn(Dc),Oc=Qt((m)=>{let{__scopeTooltip:t,delayDuration:h=Nc,skipDelayDuration:b=300,disableHoverableContent:G=!1,children:S}=m,X=qe.useRef(!0),te=qe.useRef(!1),Q=qe.useRef(0);return qe.useEffect(()=>{let ee=Q.current;return()=>window.clearTimeout(ee)},[]),io(Ac,{scope:t,isOpenDelayedRef:X,delayDuration:h,onOpen:qe.useCallback(()=>{if(b<=0)return;window.clearTimeout(Q.current),X.current=!1},[b]),onClose:qe.useCallback(()=>{if(b<=0)return;window.clearTimeout(Q.current),Q.current=window.setTimeout(()=>X.current=!0,b)},[b]),isPointerInTransitRef:te,onPointerInTransitChange:qe.useCallback((ee)=>{te.current=ee},[]),disableHoverableContent:G,children:S})},"TooltipProvider"),zn="Tooltip",[Lc,hr]=jn(zn),Gc=Qt((m)=>{let{__scopeTooltip:t,children:h,open:b,defaultOpen:G,onOpenChange:S,disableHoverableContent:X,delayDuration:te}=m,Q=Un(zn,m.__scopeTooltip),ee=Zr(t),[ce,V]=qe.useState(null),[ge,he]=qe.useState(void 0),Te=c(),we=qe.useRef(0),be=X??Q.disableHoverableContent,Ce=te??Q.delayDuration,Me=qe.useRef(!1),[Re,Pe]=s({prop:b,defaultProp:G??!1,onChange:Qt((ct)=>{if(ct)Q.onOpen(),document.dispatchEvent(new CustomEvent(Hn));else Q.onClose();S?.(ct)},"onChange"),caller:zn}),nt=qe.useMemo(()=>Re?Me.current?"delayed-open":"instant-open":"closed",[Re]),De=qe.useCallback(()=>{window.clearTimeout(we.current),we.current=0,Me.current=!1,Pe(!0)},[Pe]),Ge=qe.useCallback(()=>{window.clearTimeout(we.current),we.current=0,Pe(!1)},[Pe]),it=qe.useCallback(()=>{window.clearTimeout(we.current),we.current=window.setTimeout(()=>{Me.current=!0,Pe(!0),we.current=0},Ce)},[Ce,Pe]);return qe.useEffect(()=>()=>{if(we.current)window.clearTimeout(we.current),we.current=0},[]),io(ie,{...ee,children:io(Lc,{scope:t,contentId:ge??Te,setContentId:he,open:Re,stateAttribute:nt,trigger:ce,onTriggerChange:V,onTriggerEnter:qe.useCallback(()=>{if(Q.isOpenDelayedRef.current)it();else De()},[Q.isOpenDelayedRef,it,De]),onTriggerLeave:qe.useCallback(()=>{if(be)Ge();else window.clearTimeout(we.current),we.current=0},[Ge,be]),onOpen:De,onClose:Ge,disableHoverableContent:be,children:h})})},"Tooltip"),Ci="TooltipTrigger",Bc=qe.forwardRef(Qt(function(t,h){let{__scopeTooltip:b,...G}=t,S=hr(Ci,b),X=Un(Ci,b),te=Zr(b),Q=qe.useRef(null),ee=a(h,Q,S.onTriggerChange),ce=qe.useRef(!1),V=qe.useRef(!1),ge=qe.useCallback(()=>ce.current=!1,[]);return qe.useEffect(()=>()=>document.removeEventListener("pointerup",ge),[ge]),io(se,{asChild:!0,...te,children:io(o.button,{"aria-describedby":S.open?S.contentId:void 0,"data-state":S.stateAttribute,...G,ref:ee,onPointerMove:r(t.onPointerMove,(he)=>{if(he.pointerType==="touch")return;if(!V.current&&!X.isPointerInTransitRef.current)S.onTriggerEnter(),V.current=!0}),onPointerLeave:r(t.onPointerLeave,()=>{S.onTriggerLeave(),V.current=!1}),onPointerDown:r(t.onPointerDown,()=>{if(S.open)S.onClose();ce.current=!0,document.addEventListener("pointerup",ge,{once:!0})}),onFocus:r(t.onFocus,()=>{if(!ce.current)S.onOpen()}),onBlur:r(t.onBlur,S.onClose),onClick:r(t.onClick,S.onClose)})})},"TooltipTrigger")),Ri="TooltipPortal",[Fc,Vc]=jn(Ri,{forceMount:void 0}),Hc=Qt((m)=>{let{__scopeTooltip:t,forceMount:h,children:b,container:G}=m,S=hr(Ri,t);return io(Fc,{scope:t,forceMount:h,children:io(d,{present:h||S.open,children:io(W,{asChild:!0,container:G,children:b})})})},"TooltipPortal"),vr="TooltipContent",zc=qe.forwardRef(Qt(function(t,h){let b=Vc(vr,t.__scopeTooltip),{forceMount:G=b.forceMount,side:S="top",...X}=t,te=hr(vr,t.__scopeTooltip);return io(d,{present:G||te.open,children:te.disableHoverableContent?io(yi,{side:S,...X,ref:h}):io(jc,{side:S,...X,ref:h})})},"TooltipContent")),jc=qe.forwardRef(Qt(function(t,h){let b=hr(vr,t.__scopeTooltip),G=Un(vr,t.__scopeTooltip),S=qe.useRef(null),X=a(h,S),[te,Q]=qe.useState(null),{trigger:ee,onClose:ce}=b,V=S.current,{onPointerInTransitChange:ge}=G,he=qe.useCallback(()=>{Q(null),ge(!1)},[ge]),Te=qe.useCallback((we,be)=>{let Ce=we.currentTarget,Me={x:we.clientX,y:we.clientY},Re=Pi(Me,Ce.getBoundingClientRect()),Pe=wi(Me,Re),nt=Si(be.getBoundingClientRect()),De=Ii([...Pe,...nt]);Q(De),ge(!0)},[ge]);return qe.useEffect(()=>()=>he(),[he]),qe.useEffect(()=>{if(ee&&V){let we=Qt((Ce)=>Te(Ce,V),"handleTriggerLeave"),be=Qt((Ce)=>Te(Ce,ee),"handleContentLeave");return ee.addEventListener("pointerleave",we),V.addEventListener("pointerleave",be),()=>{ee.removeEventListener("pointerleave",we),V.removeEventListener("pointerleave",be)}}},[ee,V,Te,he]),qe.useEffect(()=>{if(te){let we=Qt((be)=>{let Ce=be.target,Me={x:be.clientX,y:be.clientY},Re=ee?.contains(Ce)||V?.contains(Ce),Pe=!Ti(Me,te);if(Re)he();else if(Pe)he(),ce()},"handleTrackPointerGrace");return document.addEventListener("pointermove",we),()=>document.removeEventListener("pointermove",we)}},[ee,V,te,ce,he]),io(yi,{...t,ref:X})},"TooltipContentHoverable")),Uc=lr("TooltipContent"),yi=qe.forwardRef(Qt(function(t,h){let{__scopeTooltip:b,children:G,"aria-label":S,id:X,onEscapeKeyDown:te,onPointerDownOutside:Q,...ee}=t,ce=hr(vr,b),V=Zr(b),{onClose:ge}=ce;qe.useEffect(()=>(document.addEventListener(Hn,ge),()=>document.removeEventListener(Hn,ge)),[ge]),qe.useEffect(()=>{if(ce.trigger){let Te=Qt((we)=>{if(we.target instanceof Node&&we.target.contains(ce.trigger))ge()},"handleScroll");return window.addEventListener("scroll",Te,{capture:!0}),()=>window.removeEventListener("scroll",Te,{capture:!0})}},[ce.trigger,ge]);let{setContentId:he}=ce;return l(()=>(he(X),()=>{he(void 0)}),[X,he]),io(D,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:te,onPointerDownOutside:Q,onFocusOutside:(Te)=>Te.preventDefault(),onDismiss:ge,children:Mc(ye,{"data-state":ce.stateAttribute,role:S?void 0:"tooltip",id:S?void 0:ce.contentId,...V,...ee,ref:h,style:{...ee.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:[io(Uc,{children:G}),S?io(It,{id:ce.contentId,role:"tooltip",children:S}):null]})})},"TooltipContentImpl")),Kc=qe.forwardRef(Qt(function(t,h){let{__scopeTooltip:b,...G}=t,S=Zr(b);return io(xt,{...S,...G,ref:h})},"TooltipArrow"));function Pi(m,t){let h=Math.abs(t.top-m.y),b=Math.abs(t.bottom-m.y),G=Math.abs(t.right-m.x),S=Math.abs(t.left-m.x);switch(Math.min(h,b,G,S)){case S:return"left";case G:return"right";case h:return"top";case b:return"bottom";default:throw Error("unreachable")}}Qt(Pi,"getExitSideFromRect");function wi(m,t,h=5){let b=[];switch(t){case"top":b.push({x:m.x-h,y:m.y+h},{x:m.x+h,y:m.y+h});break;case"bottom":b.push({x:m.x-h,y:m.y-h},{x:m.x+h,y:m.y-h});break;case"left":b.push({x:m.x+h,y:m.y-h},{x:m.x+h,y:m.y+h});break;case"right":b.push({x:m.x-h,y:m.y-h},{x:m.x-h,y:m.y+h});break}return b}Qt(wi,"getPaddedExitPoints");function Si(m){let{top:t,right:h,bottom:b,left:G}=m;return[{x:G,y:t},{x:h,y:t},{x:h,y:b},{x:G,y:b}]}Qt(Si,"getPointsFromRect");function Ti(m,t){let{x:h,y:b}=m,G=!1;for(let S=0,X=t.length-1;S<t.length;X=S++){let te=t[S],Q=t[X],{x:ee,y:ce}=te,{x:V,y:ge}=Q;if(ce>b!==ge>b&&h<(V-ee)*(b-ce)/(ge-ce)+ee)G=!G}return G}Qt(Ti,"isPointInPolygon");function Ii(m){let t=m.slice();return t.sort((h,b)=>{if(h.x<b.x)return-1;else if(h.x>b.x)return 1;else if(h.y<b.y)return-1;else if(h.y>b.y)return 1;else return 0}),_i(t)}Qt(Ii,"getHull");function _i(m){if(m.length<=1)return m.slice();let t=[];for(let b=0;b<m.length;b++){let G=m[b];while(t.length>=2){let S=t[t.length-1],X=t[t.length-2];if((S.x-X.x)*(G.y-X.y)>=(S.y-X.y)*(G.x-X.x))t.pop();else break}t.push(G)}t.pop();let h=[];for(let b=m.length-1;b>=0;b--){let G=m[b];while(h.length>=2){let S=h[h.length-1],X=h[h.length-2];if((S.x-X.x)*(G.y-X.y)>=(S.y-X.y)*(G.x-X.x))h.pop();else break}h.push(G)}if(h.pop(),t.length===1&&h.length===1&&t[0].x===h[0].x&&t[0].y===h[0].y)return t;else return t.concat(h)}Qt(_i,"getHullPresorted");var Ei=Oc,ki=Gc,Mi=Bc,Di=Hc,Ni=zc,Ai=Kc;import{jsx as tr,jsxs as Yc}from"react/jsx-runtime";var Bt=({delayDuration:m=0,...t})=>tr(Ei,{"data-slot":"tooltip-provider",delayDuration:m,...t}),et=({...m})=>tr(Bt,{children:tr(ki,{"data-slot":"tooltip",...m})}),tt=({...m})=>tr(Mi,{"data-slot":"tooltip-trigger",...m}),rt=({className:m,sideOffset:t=0,children:h,...b})=>tr(Di,{children:Yc(Ni,{"data-slot":"tooltip-content",sideOffset:t,className:e("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",m),...b,children:[h,tr(Ai,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})});import Se from"react";import qc from"react-dom";function Wc(m){if(!m||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],h=document.createElement("style");h.type="text/css",t.appendChild(h),h.styleSheet?h.styleSheet.cssText=m:h.appendChild(document.createTextNode(m))}var Xc=(m)=>{switch(m){case"success":return Qc;case"info":return td;case"warning":return ed;case"error":return od;default:return null}},Zc=Array(12).fill(0),Jc=({visible:m,className:t})=>Se.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":m},Se.createElement("div",{className:"sonner-spinner"},Zc.map((h,b)=>Se.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${b}`})))),Qc=Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Se.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ed=Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Se.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),td=Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),od=Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),rd=Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nd=()=>{let[m,t]=Se.useState(document.hidden);return Se.useEffect(()=>{let h=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",h),()=>document.removeEventListener("visibilitychange",h)},[]),m},ad=1,id=100,Oi=(m)=>{var t;return typeof(m==null?void 0:m.id)==="number"||(m==null?void 0:(t=m.id)==null?void 0:t.length)>0?m.id:ad++};class Bi{constructor(){this.subscribe=(m)=>(this.subscribers.push(m),this.getActiveToasts().forEach((t)=>m(t)),()=>{let t=this.subscribers.indexOf(m);this.subscribers.splice(t,1)}),this.publish=(m)=>{this.subscribers.forEach((t)=>t(m))},this.addToast=(m)=>{this.publish(m),this.toasts=[...this.toasts,m],this.trimHistory()},this.trimHistory=()=>{let m=this.toasts.length-id;if(m<=0)return;this.toasts=this.toasts.filter((t)=>{if(m>0&&this.dismissedToasts.has(t.id))return this.dismissedToasts.delete(t.id),m--,!1;return!0})},this.create=(m)=>{let{message:t,...h}=m,b=Oi(m),G=this.pendingDismissals.get(b);if(G!==void 0)cancelAnimationFrame(G),this.pendingDismissals.delete(b),this.dismissedToasts.delete(b);let S=this.dismissedToasts.has(b),X=m.dismissible===void 0?!0:m.dismissible;if(S)this.dismissedToasts.delete(b),this.toasts=this.toasts.filter((Q)=>Q.id!==b);if(S?void 0:this.toasts.find((Q)=>Q.id===b))this.toasts=this.toasts.map((Q)=>{if(Q.id===b)return this.publish({...Q,...m,id:b,title:t}),{...Q,...m,id:b,dismissible:X,title:t};return Q});else this.addToast({title:t,...h,dismissible:X,id:b});return b},this.dismiss=(m)=>{if(m===void 0||m===null)return this.getActiveToasts().forEach((h)=>{this.dismissedToasts.add(h.id),this.subscribers.forEach((b)=>b({id:h.id,dismiss:!0}))}),m;this.dismissedToasts.add(m);let t=this.pendingDismissals.get(m);if(t!==void 0)cancelAnimationFrame(t);return this.pendingDismissals.set(m,requestAnimationFrame(()=>{this.pendingDismissals.delete(m),this.subscribers.forEach((h)=>h({id:m,dismiss:!0}))})),m},this.message=(m,t)=>this.create({...t,message:m,type:void 0}),this.error=(m,t)=>this.create({...t,message:m,type:"error"}),this.success=(m,t)=>this.create({...t,type:"success",message:m}),this.info=(m,t)=>this.create({...t,type:"info",message:m}),this.warning=(m,t)=>this.create({...t,type:"warning",message:m}),this.loading=(m,t)=>this.create({...t,type:"loading",message:m}),this.promise=(m,t)=>{if(!t)return;let h=void 0;if(t.loading!==void 0)h=this.create({...t,promise:m,type:"loading",message:t.loading,description:typeof t.description!=="function"?t.description:void 0});let b=Promise.resolve(m instanceof Function?m():m),G=h!==void 0,S,X=b.then(async(Q)=>{if(S=["resolve",Q],Se.isValidElement(Q))G=!1,this.create({id:h,type:"default",message:Q});else if(ld(Q)&&!Q.ok){G=!1;let ce=typeof t.error==="function"?await t.error(`HTTP error! status: ${Q.status}`):t.error,V=typeof t.description==="function"?await t.description(`HTTP error! status: ${Q.status}`):t.description,he=typeof ce==="object"&&!Se.isValidElement(ce)?ce:{message:ce};this.create({id:h,type:"error",description:V,...he})}else if(Q instanceof Error){G=!1;let ce=typeof t.error==="function"?await t.error(Q):t.error,V=typeof t.description==="function"?await t.description(Q):t.description,he=typeof ce==="object"&&!Se.isValidElement(ce)?ce:{message:ce};this.create({id:h,type:"error",description:V,...he})}else if(t.success!==void 0){G=!1;let ce=typeof t.success==="function"?await t.success(Q):t.success,V=typeof t.description==="function"?await t.description(Q):t.description,he=typeof ce==="object"&&!Se.isValidElement(ce)?ce:{message:ce};this.create({id:h,type:"success",description:V,...he})}}).catch(async(Q)=>{if(S=["reject",Q],t.error!==void 0){G=!1;let ee=typeof t.error==="function"?await t.error(Q):t.error,ce=typeof t.description==="function"?await t.description(Q):t.description,ge=typeof ee==="object"&&!Se.isValidElement(ee)?ee:{message:ee};this.create({id:h,type:"error",description:ce,...ge})}}).finally(()=>{if(G)this.dismiss(h),h=void 0;t.finally==null||t.finally.call(t)}),te=()=>new Promise((Q,ee)=>X.then(()=>S[0]==="reject"?ee(S[1]):Q(S[1])).catch(ee));if(typeof h!=="string"&&typeof h!=="number")return{unwrap:te};else return Object.assign(h,{unwrap:te})},this.custom=(m,t)=>{let h=Oi(t);return this.create({...t,jsx:m(h),id:h,type:void 0}),h},this.getActiveToasts=()=>this.toasts.filter((m)=>!this.dismissedToasts.has(m.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}var po=new Bi,sd=(m,t)=>po.message(m,t),ld=(m)=>m&&typeof m==="object"&&("ok"in m)&&typeof m.ok==="boolean"&&("status"in m)&&typeof m.status==="number",cd=sd,dd=()=>po.toasts,ud=()=>po.getActiveToasts(),Y=Object.assign(cd,{success:po.success,info:po.info,warning:po.warning,error:po.error,custom:po.custom,message:po.message,promise:po.promise,dismiss:po.dismiss,loading:po.loading},{getHistory:dd,getToasts:ud});Wc("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Jr(m){return m.label!==void 0}var pd=3,md="24px",fd="16px",Li=4000,gd=356,vd=14,hd=45,bd=200;function wo(...m){return m.filter(Boolean).join(" ")}function xd(m){let[t,h]=m.split("-"),b=[];if(t)b.push(t);if(h)b.push(h);return b}var Cd=(m)=>{var t,h,b,G,S,X,te,Q,ee;let{invert:ce,toast:V,unstyled:ge,interacting:he,setHeights:Te,visibleToasts:we,heights:be,index:Ce,toasts:Me,expanded:Re,removeToast:Pe,defaultRichColors:nt,closeButton:De,style:Ge,cancelButtonStyle:it,actionButtonStyle:lt,className:ct="",descriptionClassName:st="",duration:bt,position:Ct,gap:dt,expandByDefault:We,classNames:He,icons:vt,closeButtonAriaLabel:jt="Close toast"}=m,[yt,Wt]=Se.useState(null),[qt,ve]=Se.useState(null),[Ae,Ee]=Se.useState(!1),[Ie,Le]=Se.useState(!1),[ot,Ne]=Se.useState(!1),[Oe,St]=Se.useState(!1),[ft,gt]=Se.useState(!1),[zt,vo]=Se.useState(0),[So,$o]=Se.useState(0),To=Se.useRef(V.duration||bt||Li),Yo=Se.useRef(null),Io=Se.useRef(null),os=Ce===0,rs=Ce+1<=we,so=V.type,Jn=so!=null?so:"default",Wo=V.dismissible!==!1,ns=V.className||"",as=V.descriptionClassName||"",xr=Se.useMemo(()=>be.findIndex(($e)=>$e.toastId===V.id)||0,[be,V.id]),is=Se.useMemo(()=>{var $e;return($e=V.closeButton)!=null?$e:De},[V.closeButton,De]),Qn=Se.useMemo(()=>V.duration||bt||Li,[V.duration,bt]),Qr=Se.useRef(0),qo=Se.useRef(0),ea=Se.useRef(0),Xo=Se.useRef(null),[ss,ls]=Ct.split("-"),ta=Se.useMemo(()=>be.reduce(($e,Xt,eo)=>{if(eo>=xr)return $e;return $e+Xt.height},0),[be,xr]),oa=nd(),Co=Se.useMemo(()=>{var $e;return($e=m.swipeDirections)!=null?$e:xd(Ct)},[m.swipeDirections,Ct]),cs=V.invert||ce,en=so==="loading";qo.current=Se.useMemo(()=>xr*dt+ta,[xr,ta]),Se.useEffect(()=>{To.current=Qn},[Qn]),Se.useEffect(()=>{Ee(!0)},[]),Se.useEffect(()=>{let $e=Io.current;if($e){let Xt=$e.getBoundingClientRect().height;return $o(Xt),Te((eo)=>[{toastId:V.id,height:Xt,position:V.position},...eo]),()=>Te((eo)=>eo.filter((uo)=>uo.toastId!==V.id))}},[Te,V.id]),Se.useLayoutEffect(()=>{if(!Ae)return;let $e=Io.current,Xt=$e.style.height;$e.style.height="auto";let eo=$e.getBoundingClientRect().height;$e.style.height=Xt,$o(eo),Te((uo)=>{if(!uo.find((to)=>to.toastId===V.id))return[{toastId:V.id,height:eo,position:V.position},...uo];else return uo.map((to)=>to.toastId===V.id?{...to,height:eo}:to)})},[Ae,V.title,V.description,Te,V.id,V.jsx,V.action,V.cancel]);let Ao=Se.useCallback(()=>{Le(!0),vo(qo.current),Te(($e)=>$e.filter((Xt)=>Xt.toastId!==V.id)),setTimeout(()=>{Pe(V)},bd)},[V,Pe,Te,qo]);Se.useEffect(()=>{if(V.promise&&so==="loading"||V.duration===1/0||V.type==="loading")return;let $e,Xt=()=>{if(ea.current<Qr.current){let uo=new Date().getTime()-Qr.current;To.current=To.current-uo}ea.current=new Date().getTime()},eo=()=>{if(To.current===1/0)return;Qr.current=new Date().getTime(),$e=setTimeout(()=>{V.onAutoClose==null||V.onAutoClose.call(V,V),Ao()},To.current)};if(Re||he||oa)Xt();else eo();return()=>clearTimeout($e)},[Re,he,V,so,oa,Ao]),Se.useEffect(()=>{if(V.delete)Ao(),V.onDismiss==null||V.onDismiss.call(V,V)},[Ao,V.delete]);function ra(){var $e;if(vt==null?void 0:vt.loading){var Xt;return Se.createElement("div",{className:wo(He==null?void 0:He.loader,V==null?void 0:(Xt=V.classNames)==null?void 0:Xt.loader,"sonner-loader"),"data-visible":so==="loading"},vt.loading)}return Se.createElement(Jc,{className:wo(He==null?void 0:He.loader,V==null?void 0:($e=V.classNames)==null?void 0:$e.loader),visible:so==="loading"})}let ds=V.icon||(vt==null?void 0:vt[so])||Xc(so);var na,aa;return Se.createElement("li",{tabIndex:0,ref:Io,className:wo(ct,ns,He==null?void 0:He.toast,V==null?void 0:(t=V.classNames)==null?void 0:t.toast,He==null?void 0:He[Jn],V==null?void 0:(h=V.classNames)==null?void 0:h[Jn]),"data-sonner-toast":"","data-rich-colors":(na=V.richColors)!=null?na:nt,"data-styled":!Boolean(V.jsx||V.unstyled||ge),"data-mounted":Ae,"data-promise":Boolean(V.promise),"data-swiped":ft,"data-removed":Ie,"data-visible":rs,"data-y-position":ss,"data-x-position":ls,"data-index":Ce,"data-front":os,"data-swiping":ot,"data-dismissible":Wo,"data-type":so,"data-invert":cs,"data-swipe-out":Oe,"data-swipe-direction":qt,"data-expanded":Boolean(Re||We&&Ae),"data-testid":V.testId,style:{"--index":Ce,"--toasts-before":Ce,"--z-index":Me.length-Ce,"--offset":`${Ie?zt:qo.current}px`,"--initial-height":We?"auto":`${So}px`,...Ge,...V.style},onDragEnd:()=>{Ne(!1),Wt(null),Xo.current=null},onPointerDown:($e)=>{if($e.button===2)return;if(en||!Wo)return;if(Yo.current=new Date,vo(qo.current),$e.target.setPointerCapture($e.pointerId),$e.target.tagName==="BUTTON")return;Ne(!0),Xo.current={x:$e.clientX,y:$e.clientY}},onPointerUp:()=>{var $e,Xt,eo;if(Oe||!Wo)return;Xo.current=null;let uo=Number((($e=Io.current)==null?void 0:$e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ir=Number(((Xt=Io.current)==null?void 0:Xt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),to=new Date().getTime()-((eo=Yo.current)==null?void 0:eo.getTime()),go=yt==="x"?uo:ir,Ro=Math.abs(go)/to;if((yt==="x"?Co.includes(uo>0?"right":"left"):Co.includes(ir>0?"bottom":"top"))&&(Math.abs(go)>=hd||Ro>0.11)){if(vo(qo.current),V.onDismiss==null||V.onDismiss.call(V,V),yt==="x")ve(uo>0?"right":"left");else ve(ir>0?"down":"up");Ao(),St(!0);return}else{var yo,on;(yo=Io.current)==null||yo.style.setProperty("--swipe-amount-x","0px"),(on=Io.current)==null||on.style.setProperty("--swipe-amount-y","0px")}gt(!1),Ne(!1),Wt(null)},onPointerMove:($e)=>{var Xt,eo,uo;if(!Xo.current||!Wo)return;if(((Xt=window.getSelection())==null?void 0:Xt.toString().length)>0)return;let to=$e.clientY-Xo.current.y,go=$e.clientX-Xo.current.x;if(!yt&&(Math.abs(go)>1||Math.abs(to)>1))Wt(Math.abs(go)>Math.abs(to)?"x":"y");let Ro={x:0,y:0},tn=(yo)=>1/(1.5+Math.abs(yo)/20);if(yt==="y"){if(Co.includes("top")||Co.includes("bottom"))if(Co.includes("top")&&to<0||Co.includes("bottom")&&to>0)Ro.y=to;else{let yo=to*tn(to);Ro.y=Math.abs(yo)<Math.abs(to)?yo:to}}else if(yt==="x"){if(Co.includes("left")||Co.includes("right"))if(Co.includes("left")&&go<0||Co.includes("right")&&go>0)Ro.x=go;else{let yo=go*tn(go);Ro.x=Math.abs(yo)<Math.abs(go)?yo:go}}if(Math.abs(Ro.x)>0||Math.abs(Ro.y)>0)gt(!0);(eo=Io.current)==null||eo.style.setProperty("--swipe-amount-x",`${Ro.x}px`),(uo=Io.current)==null||uo.style.setProperty("--swipe-amount-y",`${Ro.y}px`)}},is&&!V.jsx&&so!=="loading"?Se.createElement("button",{"aria-label":jt,"data-disabled":en,"data-close-button":!0,onClick:en||!Wo?()=>{}:()=>{Ao(),V.onDismiss==null||V.onDismiss.call(V,V)},className:wo(He==null?void 0:He.closeButton,V==null?void 0:(b=V.classNames)==null?void 0:b.closeButton)},(aa=vt==null?void 0:vt.close)!=null?aa:rd):null,(so||V.icon||V.promise)&&V.icon!==null&&((vt==null?void 0:vt[so])!==null||V.icon)?Se.createElement("div",{"data-icon":"",className:wo(He==null?void 0:He.icon,V==null?void 0:(G=V.classNames)==null?void 0:G.icon)},so==="loading"?V.icon||ra():V.promise?ra():null,so!=="loading"?ds:null):null,Se.createElement("div",{"data-content":"",className:wo(He==null?void 0:He.content,V==null?void 0:(S=V.classNames)==null?void 0:S.content)},Se.createElement("div",{"data-title":"",className:wo(He==null?void 0:He.title,V==null?void 0:(X=V.classNames)==null?void 0:X.title)},V.jsx?V.jsx:typeof V.title==="function"?V.title():V.title),V.description?Se.createElement("div",{"data-description":"",className:wo(st,as,He==null?void 0:He.description,V==null?void 0:(te=V.classNames)==null?void 0:te.description)},typeof V.description==="function"?V.description():V.description):null),Se.isValidElement(V.cancel)?V.cancel:V.cancel&&Jr(V.cancel)?Se.createElement("button",{"data-button":!0,"data-cancel":!0,style:V.cancelButtonStyle||it,onClick:($e)=>{if(!Jr(V.cancel))return;if(!Wo)return;V.cancel.onClick==null||V.cancel.onClick.call(V.cancel,$e),Ao()},className:wo(He==null?void 0:He.cancelButton,V==null?void 0:(Q=V.classNames)==null?void 0:Q.cancelButton)},V.cancel.label):null,Se.isValidElement(V.action)?V.action:V.action&&Jr(V.action)?Se.createElement("button",{"data-button":!0,"data-action":!0,style:V.actionButtonStyle||lt,onClick:($e)=>{if(!Jr(V.action))return;if(V.action.onClick==null||V.action.onClick.call(V.action,$e),$e.defaultPrevented)return;Ao()},className:wo(He==null?void 0:He.actionButton,V==null?void 0:(ee=V.classNames)==null?void 0:ee.actionButton)},V.action.label):null)};function Gi(){if(typeof window>"u")return"ltr";if(typeof document>"u")return"ltr";let m=document.documentElement.getAttribute("dir");if(m==="auto"||!m)return window.getComputedStyle(document.documentElement).direction;return m}function Rd(m,t){let h={};return[m,t].forEach((b,G)=>{let S=G===1,X=S?"--mobile-offset":"--offset",te=S?fd:md;function Q(ee){["top","right","bottom","left"].forEach((ce)=>{h[`${X}-${ce}`]=typeof ee==="number"?`${ee}px`:ee})}if(typeof b==="number"||typeof b==="string")Q(b);else if(typeof b==="object")["top","right","bottom","left"].forEach((ee)=>{if(b[ee]===void 0)h[`${X}-${ee}`]=te;else h[`${X}-${ee}`]=typeof b[ee]==="number"?`${b[ee]}px`:b[ee]});else Q(te)}),h}var Ar=Se.forwardRef(function(t,h){let{id:b,invert:G,position:S="bottom-right",hotkey:X=["altKey","KeyT"],expand:te,closeButton:Q,className:ee,offset:ce,mobileOffset:V,theme:ge="light",richColors:he,duration:Te,style:we,visibleToasts:be=pd,toastOptions:Ce,dir:Me=Gi(),gap:Re=vd,icons:Pe,customAriaLabel:nt,containerAriaLabel:De="Notifications"}=t,[Ge,it]=Se.useState([]),lt=Se.useMemo(()=>{if(b)return Ge.filter((Ee)=>Ee.toasterId===b);return Ge.filter((Ee)=>!Ee.toasterId)},[Ge,b]),ct=Se.useMemo(()=>Array.from(new Set([S].concat(lt.filter((Ee)=>Ee.position).map((Ee)=>Ee.position)))),[lt,S]),[st,bt]=Se.useState([]),[Ct,dt]=Se.useState(!1),[We,He]=Se.useState(!1),[vt,jt]=Se.useState(ge!=="system"?ge:typeof window<"u"?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"light"),yt=Se.useRef(null),Wt=X.join("+").replace(/Key/g,"").replace(/Digit/g,""),qt=Se.useRef(null),ve=Se.useRef(!1),Ae=Se.useCallback((Ee)=>{it((Ie)=>{var Le;if(!((Le=Ie.find((ot)=>ot.id===Ee.id))==null?void 0:Le.delete))po.dismiss(Ee.id);return Ie.filter(({id:ot})=>ot!==Ee.id)})},[]);return Se.useEffect(()=>po.subscribe((Ee)=>{if(Ee.dismiss){requestAnimationFrame(()=>{it((Ie)=>Ie.map((Le)=>Le.id===Ee.id?{...Le,delete:!0}:Le))});return}setTimeout(()=>{qc.flushSync(()=>{it((Ie)=>{let Le=Ie.findIndex((ot)=>ot.id===Ee.id);if(Le!==-1)return[...Ie.slice(0,Le),{...Ie[Le],...Ee},...Ie.slice(Le+1)];return[Ee,...Ie]})})})}),[]),Se.useEffect(()=>{if(ge!=="system"){jt(ge);return}if(ge==="system")if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)jt("dark");else jt("light");if(typeof window>"u")return;let Ee=window.matchMedia("(prefers-color-scheme: dark)");try{Ee.addEventListener("change",({matches:Ie})=>{if(Ie)jt("dark");else jt("light")})}catch(Ie){Ee.addListener(({matches:Le})=>{try{if(Le)jt("dark");else jt("light")}catch(ot){console.error(ot)}})}},[ge]),Se.useEffect(()=>{if(Ge.length<=1)dt(!1)},[Ge]),Se.useEffect(()=>{let Ee=(Ie)=>{var Le;if(X.length>0&&X.every((Oe)=>Ie[Oe]||Ie.code===Oe)){var Ne;dt(!0),(Ne=yt.current)==null||Ne.focus()}if(Ie.code==="Escape"&&(document.activeElement===yt.current||((Le=yt.current)==null?void 0:Le.contains(document.activeElement))))dt(!1)};return document.addEventListener("keydown",Ee),()=>document.removeEventListener("keydown",Ee)},[X]),Se.useEffect(()=>{if(yt.current)return()=>{if(qt.current)qt.current.focus({preventScroll:!0}),qt.current=null,ve.current=!1}},[yt.current]),Se.createElement("section",{ref:h,"aria-label":nt!=null?nt:`${De} ${Wt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},ct.map((Ee,Ie)=>{var Le;let[ot,Ne]=Ee.split("-");if(!lt.length)return null;return Se.createElement("ol",{key:Ee,dir:Me==="auto"?Gi():Me,tabIndex:-1,ref:yt,className:ee,"data-sonner-toaster":!0,"data-sonner-theme":vt,"data-y-position":ot,"data-x-position":Ne,style:{"--front-toast-height":`${((Le=st[0])==null?void 0:Le.height)||0}px`,"--width":`${gd}px`,"--gap":`${Re}px`,...we,...Rd(ce,V)},onBlur:(Oe)=>{if(ve.current&&!Oe.currentTarget.contains(Oe.relatedTarget)){if(ve.current=!1,qt.current)qt.current.focus({preventScroll:!0}),qt.current=null}},onFocus:(Oe)=>{if(Oe.target instanceof HTMLElement&&Oe.target.dataset.dismissible==="false")return;if(!ve.current)ve.current=!0,qt.current=Oe.relatedTarget},onMouseEnter:()=>dt(!0),onMouseMove:()=>dt(!0),onMouseLeave:()=>{if(!We)dt(!1)},onDragEnd:()=>dt(!1),onPointerDown:(Oe)=>{if(Oe.target instanceof HTMLElement&&Oe.target.dataset.dismissible==="false")return;He(!0)},onPointerUp:()=>He(!1)},lt.filter((Oe)=>!Oe.position&&Ie===0||Oe.position===Ee).map((Oe,St)=>{var ft,gt;return Se.createElement(Cd,{key:Oe.id,icons:Pe,index:St,toast:Oe,defaultRichColors:he,duration:(ft=Ce==null?void 0:Ce.duration)!=null?ft:Te,className:Ce==null?void 0:Ce.className,descriptionClassName:Ce==null?void 0:Ce.descriptionClassName,invert:G,visibleToasts:be,closeButton:(gt=Ce==null?void 0:Ce.closeButton)!=null?gt:Q,interacting:We,position:Ee,style:Ce==null?void 0:Ce.style,unstyled:Ce==null?void 0:Ce.unstyled,classNames:Ce==null?void 0:Ce.classNames,cancelButtonStyle:Ce==null?void 0:Ce.cancelButtonStyle,actionButtonStyle:Ce==null?void 0:Ce.actionButtonStyle,closeButtonAriaLabel:Ce==null?void 0:Ce.closeButtonAriaLabel,removeToast:Ae,toasts:lt.filter((zt)=>zt.position==Oe.position),heights:st.filter((zt)=>zt.position==Oe.position),setHeights:bt,expandByDefault:te,gap:Re,expanded:Ct,swipeDirections:t.swipeDirections})}))}))});import*as No from"react";import{jsx as Fo}from"react/jsx-runtime";var yd=Object.defineProperty,or=(m,t)=>yd(m,"name",{value:t,configurable:!0}),Kn="Tabs",[Pd,of]=i(Kn,[C]),Fi=C(),[wd,$n]=Pd(Kn),Sd=No.forwardRef(or(function(t,h){let{__scopeTabs:b,value:G,onValueChange:S,defaultValue:X,orientation:te="horizontal",dir:Q,activationMode:ee="automatic",...ce}=t,V=g(Q),[ge,he]=s({prop:G,onChange:S,defaultProp:X??"",caller:Kn});return Fo(wd,{scope:b,baseId:c(),value:ge,onValueChange:he,orientation:te,dir:V,activationMode:ee,children:Fo(o.div,{dir:V,"data-orientation":te,...ce,ref:h})})},"Tabs")),Td="TabsList",Id=No.forwardRef(or(function(t,h){let{__scopeTabs:b,loop:G=!0,...S}=t,X=$n(Td,b),te=Fi(b);return Fo(q,{asChild:!0,...te,orientation:X.orientation,dir:X.dir,loop:G,children:Fo(o.div,{role:"tablist","aria-orientation":X.orientation,...S,ref:h})})},"TabsList")),_d="TabsTrigger",Ed=No.forwardRef(or(function(t,h){let{__scopeTabs:b,value:G,disabled:S=!1,...X}=t,te=$n(_d,b),Q=Fi(b),ee=Yn(te.baseId,G),ce=Wn(te.baseId,G),V=G===te.value;return Fo(K,{asChild:!0,...Q,focusable:!S,active:V,children:Fo(o.button,{type:"button",role:"tab","aria-selected":V,"aria-controls":ce,"data-state":V?"active":"inactive","data-disabled":S?"":void 0,disabled:S,id:ee,...X,ref:h,onMouseDown:r(t.onMouseDown,(ge)=>{if(!S&&ge.button===0&&ge.ctrlKey===!1)te.onValueChange(G);else ge.preventDefault()}),onKeyDown:r(t.onKeyDown,(ge)=>{if(S||ge.target!==ge.currentTarget)return;if([" ","Enter"].includes(ge.key))te.onValueChange(G)}),onFocus:r(t.onFocus,()=>{let ge=te.activationMode!=="manual";if(!V&&!S&&ge)te.onValueChange(G)})})})},"TabsTrigger")),kd="TabsContent",Md=No.forwardRef(or(function(t,h){let{__scopeTabs:b,value:G,forceMount:S,children:X,...te}=t,Q=$n(kd,b),ee=Yn(Q.baseId,G),ce=Wn(Q.baseId,G),V=G===Q.value,ge=No.useRef(V);return No.useEffect(()=>{let he=requestAnimationFrame(()=>ge.current=!1);return()=>cancelAnimationFrame(he)},[]),Fo(d,{present:S||V,children:({present:he})=>Fo(o.div,{"data-state":V?"active":"inactive","data-orientation":Q.orientation,role:"tabpanel","aria-labelledby":ee,hidden:!he,id:ce,tabIndex:0,...te,ref:h,style:{...t.style,animationDuration:ge.current?"0s":void 0},children:he&&X})})},"TabsContent"));function Yn(m,t){return`${m}-trigger-${t}`}or(Yn,"makeTriggerId");function Wn(m,t){return`${m}-content-${t}`}or(Wn,"makeContentId");var Vi=Sd,Hi=Id,zi=Ed,ji=Md;import{jsx as br,jsxs as Ui}from"react/jsx-runtime";var Ut=({className:m,...t})=>br(Vi,{"data-slot":"tabs",className:e("flex flex-col gap-2",m),...t}),Vt=({className:m,...t})=>br(Hi,{"data-slot":"tabs-list",className:e("inline-flex h-9 w-fit items-center justify-center gap-0.5 rounded-full border border-(--border-subtle) bg-(--bg-surface-alt)/55 p-[3px] text-muted-foreground",m),...t}),mt=({children:m,className:t,hasError:h=!1,...b})=>Ui(zi,{"data-slot":"tabs-trigger","data-error":h?"true":void 0,className:e("inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-full border border-transparent px-3.5 py-1 text-[13px] font-medium text-(--text-secondary) transition-[color,box-shadow,background-color] hover:text-(--text-primary) focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[error=true]:text-destructive data-[state=active]:border-(--border-subtle) data-[state=active]:bg-card data-[state=active]:font-semibold data-[state=active]:text-(--accent) data-[state=active]:shadow-(--shadow-sm) dark:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...b,children:[m,h?Ui("span",{className:"inline-flex items-center text-destructive",children:[br(ut,{"aria-hidden":"true",className:"size-3"}),br("span",{className:"sr-only",children:"Has an error"})]}):null]}),ht=({className:m,...t})=>br(ji,{"data-slot":"tabs-content",className:e("flex-1 outline-none",m),...t});import*as Ki from"react";import{jsx as Od}from"react/jsx-runtime";var Nd=Object.defineProperty,Ad=(m,t)=>Nd(m,"name",{value:t,configurable:!0}),Ld="Toggle",qn=Ki.forwardRef(Ad(function(t,h){let{pressed:b,defaultPressed:G,onPressedChange:S,...X}=t,[te,Q]=s({prop:b,onChange:S,defaultProp:G??!1,caller:Ld});return Od(o.button,{type:"button","aria-pressed":te,"data-state":te?"on":"off","data-disabled":t.disabled?"":void 0,...X,ref:h,onClick:r(t.onClick,()=>{if(!t.disabled)Q(!te)})})},"Toggle")),$i=qn;import{jsx as Bd}from"react/jsx-runtime";var Ht=p("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-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",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-9 px-2 min-w-9",lg:"h-10 px-2.5 min-w-10",sm:"h-8 px-1.5 min-w-8"},variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"}}}),Xr=({className:m,variant:t,size:h,...b})=>Bd($i,{"data-slot":"toggle",className:e(Ht({className:m,size:h,variant:t})),...b});import*as co from"react";import{jsx as mo}from"react/jsx-runtime";var Fd=Object.defineProperty,Vo=(m,t)=>Fd(m,"name",{value:t,configurable:!0}),nr="ToggleGroup",[Wi,Pf]=i(nr,[C]),qi=C(),Xi=co.forwardRef(Vo(function(t,h){let{type:b,...G}=t;if(b==="single")return mo(Vd,{role:"radiogroup",...G,ref:h});if(b==="multiple")return mo(Hd,{role:"toolbar",...G,ref:h});throw Error(`Missing prop \`type\` expected on \`${nr}\``)},"ToggleGroup")),[Zi,Ji]=Wi(nr),Vd=co.forwardRef(Vo(function(t,h){let{value:b,defaultValue:G,onValueChange:S=Vo(()=>{},"onValueChange"),...X}=t,[te,Q]=s({prop:b,defaultProp:G??"",onChange:S,caller:nr});return mo(Zi,{scope:t.__scopeToggleGroup,type:"single",value:co.useMemo(()=>te?[te]:[],[te]),onItemActivate:Q,onItemDeactivate:co.useCallback(()=>Q(""),[Q]),children:mo(Qi,{...X,ref:h})})},"ToggleGroupImplSingle")),Hd=co.forwardRef(Vo(function(t,h){let{value:b,defaultValue:G,onValueChange:S=Vo(()=>{},"onValueChange"),...X}=t,[te,Q]=s({prop:b,defaultProp:G??[],onChange:S,caller:nr}),ee=co.useCallback((V)=>Q((ge=[])=>[...ge,V]),[Q]),ce=co.useCallback((V)=>Q((ge=[])=>ge.filter((he)=>he!==V)),[Q]);return mo(Zi,{scope:t.__scopeToggleGroup,type:"multiple",value:te,onItemActivate:ee,onItemDeactivate:ce,children:mo(Qi,{...X,ref:h})})},"ToggleGroupImplMultiple")),[zd,jd]=Wi(nr),Qi=co.forwardRef(Vo(function(t,h){let{__scopeToggleGroup:b,disabled:G=!1,rovingFocus:S=!0,orientation:X,dir:te,loop:Q=!0,...ee}=t,ce=qi(b),V=g(te),ge={dir:V,...ee};return mo(zd,{scope:b,rovingFocus:S,disabled:G,children:S?mo(q,{asChild:!0,...ce,orientation:X,dir:V,loop:Q,children:mo(o.div,{...ge,ref:h})}):mo(o.div,{...ge,ref:h})})},"ToggleGroupImpl")),Xn="ToggleGroupItem",es=co.forwardRef(Vo(function(t,h){let b=Ji(Xn,t.__scopeToggleGroup),G=jd(Xn,t.__scopeToggleGroup),S=qi(t.__scopeToggleGroup),X=b.value.includes(t.value),te=G.disabled||t.disabled,Q={...t,pressed:X,disabled:te},ee=co.useRef(null);return G.rovingFocus?mo(K,{asChild:!0,...S,focusable:!te,active:X,ref:ee,children:mo(Yi,{...Q,ref:h})}):mo(Yi,{...Q,ref:h})},"ToggleGroupItem")),Yi=co.forwardRef(Vo(function(t,h){let{__scopeToggleGroup:b,value:G,...S}=t,X=Ji(Xn,b),te={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},Q=X.type==="single"?te:void 0;return mo(qn,{...Q,...S,ref:h,onPressedChange:(ee)=>{if(ee)X.onItemActivate(G);else X.onItemDeactivate(G)}})},"ToggleGroupItemImpl"));import*as ar from"react";import{jsx as Zn}from"react/jsx-runtime";var ts=ar.createContext({size:"default",variant:"default"}),Gt=({className:m,variant:t,size:h,children:b,...G})=>{let S=ar.useMemo(()=>({size:h,variant:t}),[h,t]);return Zn(Xi,{"data-slot":"toggle-group","data-variant":t,"data-size":h,className:e("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",m),...G,children:Zn(ts.Provider,{value:S,children:b})})},$t=({className:m,children:t,variant:h,size:b,...G})=>{let S=ar.useContext(ts);return Zn(es,{"data-slot":"toggle-group-item","data-variant":S.variant??h,"data-size":S.size??b,className:e(Ht({size:S.size??b,variant:S.variant??h}),"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",m),...G,children:t})};export{rr,wt,Pr,Tr,Ke,je,Ye,kr,ue,Er,Ur,Vr,Hr,Gr,Rt,$r,re,Xe,de,fe,pe,oe,zr,Ze,me,Qe,j,Lt,A,Wr,R,L,I,qr,pt,Je,Ue,It,Pt,Tt,kt,Et,Mt,Dt,ae,At,Kr,Nt,_t,jr,Ot,Yr,Mr,Dr,Ft,Ve,Bt,et,tt,rt,Y,Ar,Ut,Vt,mt,ht,Ht,Xr,Gt,$t};
|