brd-ui-kit 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { IconTypes, Size } from '../../../types/types';
|
|
2
2
|
type Props = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
|
|
3
3
|
type: IconTypes;
|
|
4
|
-
|
|
4
|
+
classes?: {
|
|
5
|
+
wrapper?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
};
|
|
5
8
|
size?: Size;
|
|
6
9
|
viewBox?: string;
|
|
7
10
|
strokeWidth?: number;
|
|
11
|
+
color?: string;
|
|
8
12
|
};
|
|
9
|
-
export declare const Icon: ({ type, size, viewBox, strokeWidth,
|
|
13
|
+
export declare const Icon: ({ type, size, viewBox, strokeWidth, classes, color, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
export {};
|
|
@@ -2,12 +2,16 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { IconTypes, Size } from '../../../types/types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ type, size, viewBox, strokeWidth,
|
|
5
|
+
component: ({ type, size, viewBox, strokeWidth, classes, color, ...rest }: import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & {
|
|
6
6
|
type: IconTypes;
|
|
7
|
-
|
|
7
|
+
classes?: {
|
|
8
|
+
wrapper?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
};
|
|
8
11
|
size?: Size;
|
|
9
12
|
viewBox?: string;
|
|
10
13
|
strokeWidth?: number;
|
|
14
|
+
color?: string;
|
|
11
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
args: {
|
|
13
17
|
type: "settings";
|
package/dist/index.cjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
hover:bg-tertiary-inverse-bg border-transparent shadow-[0_1px_3px_rgba(0,0,0,0.2)]
|
|
13
13
|
hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),sh=_e("flex flex-col space-y-1.5 p-6"),ih=_e(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
|
|
14
14
|
tracking-tight`),ah=_e(`${qe("body-sm-regular")} text-muted-foreground
|
|
15
|
-
group-data-[disabled=true]/card:text-disabled-text`),lh=_e("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),ch=_e("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),Yc=({ref:e,className:t,variant:n,disabled:r,active:o,...s})=>v.jsx("div",{ref:e,"data-disabled":r||void 0,className:L(oh({variant:n,active:o}),t),...s});Yc.displayName="Card";const Xc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(sh(),t),...n});Xc.displayName="CardHeader";const Zc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ih(),t),...n});Zc.displayName="CardTitle";const Qc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ah(),t),...n});Qc.displayName="CardDescription";const Jc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(lh(),t),...n});Jc.displayName="CardContent";const eu=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ch(),t),...n});eu.displayName="CardFooter";function uh(e,t){const n=u.createContext(t),r=s=>{const{children:i,...a}=s,l=u.useMemo(()=>a,Object.values(a));return v.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Vt(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i),l=n.length;n=[...n,i];const c=p=>{const{scope:g,children:f,...h}=p,m=g?.[e]?.[l]||a,b=u.useMemo(()=>h,Object.values(h));return v.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function d(p,g){const f=g?.[e]?.[l]||a,h=u.useContext(f);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=a?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,dh(o,...t)]}function dh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const p=l(s)[`__scope${c}`];return{...a,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var dn=globalThis?.document?u.useLayoutEffect:()=>{},fh=u[" useInsertionEffect ".trim().toString()]||dn;function _n({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=ph({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=u.useRef(e!==void 0);u.useEffect(()=>{const p=d.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=u.useCallback(d=>{if(a){const p=gh(d)?d(e):d;p!==e&&i.current?.(p)}else s(d)},[a,e,s,i]);return[l,c]}function ph({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return fh(()=>{s.current=t},[t]),u.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function gh(e){return typeof e=="function"}function Fi(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ao(e){const[t,n]=u.useState(void 0);return dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function mh(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Kt=e=>{const{present:t,children:n}=e,r=hh(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=He(r.ref,bh(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};Kt.displayName="Presence";function hh(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[a,l]=mh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=jr(r.current);s.current=a==="mounted"?c:"none"},[a]),dn(()=>{const c=r.current,d=o.current;if(d!==e){const g=s.current,f=jr(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&g!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),dn(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,p=f=>{const m=jr(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=f=>{f.target===t&&(s.current=jr(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function jr(e){return e?.animationName||"none"}function bh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function po(e){const t=vh(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(yh);if(l){const c=l.props.children,d=a.map(p=>p===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:p);return v.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vh(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=wh(o),a=Ch(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Mi(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tu=Symbol("radix.slottable");function xh(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=tu,t}function yh(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tu}function Ch(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Sh.reduce((e,t)=>{const n=po(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rh(e,t){e&&gn.flushSync(()=>e.dispatchEvent(t))}var To="Checkbox",[Eh]=Vt(To),[Ih,Vi]=Eh(To);function kh(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:p}=e,[g,f]=_n({prop:n,defaultProp:o??!1,onChange:l,caller:To}),[h,m]=u.useState(null),[b,y]=u.useState(null),x=u.useRef(!1),w=h?!!i||!!h.closest("form"):!0,C={checked:g,disabled:s,setChecked:f,control:h,setControl:m,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:an(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:y};return v.jsx(Ih,{scope:t,...C,children:Nh(p)?p(C):r})}var nu="CheckboxTrigger",ru=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:f,bubbleInput:h}=Vi(nu,e),m=He(o,d),b=u.useRef(l);return u.useEffect(()=>{const y=s?.form;if(y){const x=()=>p(b.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[s,p]),v.jsx(Ae.button,{type:"button",role:"checkbox","aria-checked":an(l)?"mixed":l,"aria-required":c,"data-state":lu(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:m,onKeyDown:Oe(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Oe(n,y=>{p(x=>an(x)?!0:!x),h&&f&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});ru.displayName=nu;var Li=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:d,...p}=e;return v.jsx(kh,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:g})=>v.jsxs(v.Fragment,{children:[v.jsx(ru,{...p,ref:t,__scopeCheckbox:n}),g&&v.jsx(au,{__scopeCheckbox:n})]})})});Li.displayName=To;var ou="CheckboxIndicator",su=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Vi(ou,n);return v.jsx(Kt,{present:r||an(s.checked)||s.checked===!0,children:v.jsx(Ae.span,{"data-state":lu(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});su.displayName=ou;var iu="CheckboxBubbleInput",au=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:d,form:p,bubbleInput:g,setBubbleInput:f}=Vi(iu,e),h=He(n,f),m=Fi(s),b=Ao(r);u.useEffect(()=>{const x=g;if(!x)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,I=!o.current;if(m!==s&&S){const E=new Event("click",{bubbles:I});x.indeterminate=an(s),S.call(x,an(s)?!1:s),x.dispatchEvent(E)}},[g,m,s,o]);const y=u.useRef(an(s)?!1:s);return v.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:l,name:c,value:d,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});au.displayName=iu;function Nh(e){return typeof e=="function"}function an(e){return e==="indeterminate"}function lu(e){return an(e)?"indeterminate":e?"checked":"unchecked"}const cu=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ph=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Oh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const bl=e=>{const t=Oh(e);return t.charAt(0).toUpperCase()+t.slice(1)};var _h={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ah=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Th=Te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>Te.createElement("svg",{ref:l,..._h,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cu("lucide",o),...!s&&!Ah(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,d])=>Te.createElement(c,d)),...Array.isArray(s)?s:[s]]));const Se=(e,t)=>{const n=Te.forwardRef(({className:r,...o},s)=>Te.createElement(Th,{ref:s,iconNode:t,className:cu(`lucide-${Ph(bl(e))}`,`lucide-${e}`,r),...o}));return n.displayName=bl(e),n};const Mh=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],Dh=Se("bell-ring",Mh);const Fh=[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]],Vh=Se("book-user",Fh);const Lh=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],jh=Se("briefcase-business",Lh);const $h=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],zh=Se("building-2",$h);const Gh=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Hh=Se("calendar-1",Gh);const Bh=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Wh=Se("chart-line",Bh);const Uh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qh=Se("chevron-down",Uh);const Kh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uu=Se("chevron-left",Kh);const Yh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],du=Se("chevron-right",Yh);const Xh=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Zh=Se("chevrons-up-down",Xh);const Qh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jh=Se("circle-question-mark",Qh);const eb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],tb=Se("clock-3",eb);const nb=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],rb=Se("credit-card",nb);const ob=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],sb=Se("dollar-sign",ob);const ib=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],fu=Se("ellipsis",ib);const ab=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],lb=Se("eye-off",ab);const cb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ub=Se("eye",cb);const db=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],fb=Se("folder-open",db);const pb=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],gb=Se("funnel",pb);const mb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],hb=Se("layout-grid",mb);const bb=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],vb=Se("list-filter",bb);const xb=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],yb=Se("list-todo",xb);const Cb=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],wb=Se("message-circle",Cb);const Sb=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Rb=Se("package",Sb);const Eb=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Ib=Se("palette",Eb);const kb=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Nb=Se("phone",kb);const Pb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ob=Se("plus",Pb);const _b=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ab=Se("rotate-ccw",_b);const Tb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Mb=Se("search",Tb);const Db=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fb=Se("settings",Db);const Vb=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Lb=Se("tag",Vb);const jb=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],$b=Se("user-cog",jb);const zb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Gb=Se("users",zb);const Hb=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Bb=Se("wrench",Hb);const Wb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ub=Se("x",Wb);function pu({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return v.jsx("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:v.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function gu({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return v.jsxs("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:[v.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),v.jsx("path",{d:"M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"})]})}pu.displayName="Check";gu.displayName="CircleCheck";const qb={settings:Fb,plus:Ob,wrench:Bb,phone:Nb,palette:Ib,building:zh,close:Ub,done:pu,check:gu,users:Gb,"layout-grid":hb,bell:Dh,"book-user":Vh,"user-gear":$b,folder:fb,"briefcase-business":jh,calendar:Hh,"chart-line":Wh,message:wb,search:Mb,"list-filter":vb,funnel:gb,dots:fu,"check-list":yb,tag:Lb,chevron:qh,chevrons:Zh,"rotate-ccw":Ab,question:Jh,clock:tb,eye:ub,"eye-off":lb,package:Rb,"credit-card":rb,"dollar-sign":sb},Kb={xs:"w-2.5 h-2.5",sm:"w-3.75 h-3.75",md:"w-5 h-5",lg:"w-6.25 h-6.25"},Ut=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,className:o,...s})=>{const i=qb[e],a=Kb[t],l=L(a,o);return v.jsx("div",{...s,children:v.jsx(i,{viewBox:n,strokeWidth:r,className:l})})},Yb=["peer bg-primary-bg border-inp-default-border grid size-5 shrink-0 cursor-pointer place-content-center rounded border","focus-visible:ring-inp-focus-border focus-visible:ring-1 focus-visible:outline-none","text-transparent transition-all duration-200","disabled:cursor-not-allowed","disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border","disabled:data-[state=checked]:text-disabled-text","data-[state=checked]:border-primary-inverse-bg","data-[state=checked]:bg-primary-inverse-bg data-[state=checked]:text-primary-inverse-text","enabled:hover:border-inp-hover-border","enabled:hover:data-[state=checked]:bg-primary-inverse-hover-bg","enabled:hover:data-[state=checked]:border-primary-inverse-hover-bg"].join(" "),Xb="grid place-content-center text-current",ji=({className:e,ref:t,...n})=>v.jsx(Li,{ref:t,className:L(Yb,e),...n,children:v.jsx(su,{className:L(Xb),children:v.jsx(Ut,{type:"done",viewBox:"3 3 14 14"})})});ji.displayName=Li.displayName;function Cs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=u.useRef(e!==void 0),[s,i]=u.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){u.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
15
|
+
group-data-[disabled=true]/card:text-disabled-text`),lh=_e("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),ch=_e("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0"),Yc=({ref:e,className:t,variant:n,disabled:r,active:o,...s})=>v.jsx("div",{ref:e,"data-disabled":r||void 0,className:L(oh({variant:n,active:o}),t),...s});Yc.displayName="Card";const Xc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(sh(),t),...n});Xc.displayName="CardHeader";const Zc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ih(),t),...n});Zc.displayName="CardTitle";const Qc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ah(),t),...n});Qc.displayName="CardDescription";const Jc=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(lh(),t),...n});Jc.displayName="CardContent";const eu=({ref:e,className:t,...n})=>v.jsx("div",{ref:e,className:L(ch(),t),...n});eu.displayName="CardFooter";function uh(e,t){const n=u.createContext(t),r=s=>{const{children:i,...a}=s,l=u.useMemo(()=>a,Object.values(a));return v.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Vt(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i),l=n.length;n=[...n,i];const c=p=>{const{scope:g,children:f,...h}=p,m=g?.[e]?.[l]||a,b=u.useMemo(()=>h,Object.values(h));return v.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function d(p,g){const f=g?.[e]?.[l]||a,h=u.useContext(f);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=a?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,dh(o,...t)]}function dh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const p=l(s)[`__scope${c}`];return{...a,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var dn=globalThis?.document?u.useLayoutEffect:()=>{},fh=u[" useInsertionEffect ".trim().toString()]||dn;function _n({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=ph({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=u.useRef(e!==void 0);u.useEffect(()=>{const p=d.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=u.useCallback(d=>{if(a){const p=gh(d)?d(e):d;p!==e&&i.current?.(p)}else s(d)},[a,e,s,i]);return[l,c]}function ph({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return fh(()=>{s.current=t},[t]),u.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function gh(e){return typeof e=="function"}function Fi(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ao(e){const[t,n]=u.useState(void 0);return dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function mh(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Kt=e=>{const{present:t,children:n}=e,r=hh(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=He(r.ref,bh(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};Kt.displayName="Presence";function hh(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[a,l]=mh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=jr(r.current);s.current=a==="mounted"?c:"none"},[a]),dn(()=>{const c=r.current,d=o.current;if(d!==e){const g=s.current,f=jr(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&g!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),dn(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,p=f=>{const m=jr(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=f=>{f.target===t&&(s.current=jr(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function jr(e){return e?.animationName||"none"}function bh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function po(e){const t=vh(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(yh);if(l){const c=l.props.children,d=a.map(p=>p===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:p);return v.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return v.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vh(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=wh(o),a=Ch(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Mi(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tu=Symbol("radix.slottable");function xh(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=tu,t}function yh(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tu}function Ch(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Sh.reduce((e,t)=>{const n=po(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rh(e,t){e&&gn.flushSync(()=>e.dispatchEvent(t))}var To="Checkbox",[Eh]=Vt(To),[Ih,Vi]=Eh(To);function kh(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:p}=e,[g,f]=_n({prop:n,defaultProp:o??!1,onChange:l,caller:To}),[h,m]=u.useState(null),[b,y]=u.useState(null),x=u.useRef(!1),w=h?!!i||!!h.closest("form"):!0,C={checked:g,disabled:s,setChecked:f,control:h,setControl:m,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:an(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:y};return v.jsx(Ih,{scope:t,...C,children:Nh(p)?p(C):r})}var nu="CheckboxTrigger",ru=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:f,bubbleInput:h}=Vi(nu,e),m=He(o,d),b=u.useRef(l);return u.useEffect(()=>{const y=s?.form;if(y){const x=()=>p(b.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[s,p]),v.jsx(Ae.button,{type:"button",role:"checkbox","aria-checked":an(l)?"mixed":l,"aria-required":c,"data-state":lu(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:m,onKeyDown:Oe(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Oe(n,y=>{p(x=>an(x)?!0:!x),h&&f&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});ru.displayName=nu;var Li=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:d,...p}=e;return v.jsx(kh,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:g})=>v.jsxs(v.Fragment,{children:[v.jsx(ru,{...p,ref:t,__scopeCheckbox:n}),g&&v.jsx(au,{__scopeCheckbox:n})]})})});Li.displayName=To;var ou="CheckboxIndicator",su=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Vi(ou,n);return v.jsx(Kt,{present:r||an(s.checked)||s.checked===!0,children:v.jsx(Ae.span,{"data-state":lu(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});su.displayName=ou;var iu="CheckboxBubbleInput",au=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:d,form:p,bubbleInput:g,setBubbleInput:f}=Vi(iu,e),h=He(n,f),m=Fi(s),b=Ao(r);u.useEffect(()=>{const x=g;if(!x)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,I=!o.current;if(m!==s&&S){const E=new Event("click",{bubbles:I});x.indeterminate=an(s),S.call(x,an(s)?!1:s),x.dispatchEvent(E)}},[g,m,s,o]);const y=u.useRef(an(s)?!1:s);return v.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:l,name:c,value:d,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});au.displayName=iu;function Nh(e){return typeof e=="function"}function an(e){return e==="indeterminate"}function lu(e){return an(e)?"indeterminate":e?"checked":"unchecked"}const cu=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ph=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Oh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const bl=e=>{const t=Oh(e);return t.charAt(0).toUpperCase()+t.slice(1)};var _h={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ah=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Th=Te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>Te.createElement("svg",{ref:l,..._h,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cu("lucide",o),...!s&&!Ah(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,d])=>Te.createElement(c,d)),...Array.isArray(s)?s:[s]]));const Se=(e,t)=>{const n=Te.forwardRef(({className:r,...o},s)=>Te.createElement(Th,{ref:s,iconNode:t,className:cu(`lucide-${Ph(bl(e))}`,`lucide-${e}`,r),...o}));return n.displayName=bl(e),n};const Mh=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],Dh=Se("bell-ring",Mh);const Fh=[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]],Vh=Se("book-user",Fh);const Lh=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],jh=Se("briefcase-business",Lh);const $h=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],zh=Se("building-2",$h);const Gh=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Hh=Se("calendar-1",Gh);const Bh=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Wh=Se("chart-line",Bh);const Uh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qh=Se("chevron-down",Uh);const Kh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uu=Se("chevron-left",Kh);const Yh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],du=Se("chevron-right",Yh);const Xh=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Zh=Se("chevrons-up-down",Xh);const Qh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jh=Se("circle-question-mark",Qh);const eb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],tb=Se("clock-3",eb);const nb=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],rb=Se("credit-card",nb);const ob=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],sb=Se("dollar-sign",ob);const ib=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],fu=Se("ellipsis",ib);const ab=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],lb=Se("eye-off",ab);const cb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ub=Se("eye",cb);const db=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],fb=Se("folder-open",db);const pb=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],gb=Se("funnel",pb);const mb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],hb=Se("layout-grid",mb);const bb=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],vb=Se("list-filter",bb);const xb=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],yb=Se("list-todo",xb);const Cb=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],wb=Se("message-circle",Cb);const Sb=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Rb=Se("package",Sb);const Eb=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Ib=Se("palette",Eb);const kb=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Nb=Se("phone",kb);const Pb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ob=Se("plus",Pb);const _b=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ab=Se("rotate-ccw",_b);const Tb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Mb=Se("search",Tb);const Db=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fb=Se("settings",Db);const Vb=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Lb=Se("tag",Vb);const jb=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],$b=Se("user-cog",jb);const zb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Gb=Se("users",zb);const Hb=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Bb=Se("wrench",Hb);const Wb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ub=Se("x",Wb);function pu({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return v.jsx("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:v.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"})})}function gu({ref:e,className:t,color:n="currentColor",size:r=24,...o}){return v.jsxs("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",stroke:n,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:t,...o,children:[v.jsx("path",{d:"M13.4375 8.125L8.85414 12.5L6.5625 10.3125"}),v.jsx("path",{d:"M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"})]})}pu.displayName="Check";gu.displayName="CircleCheck";const qb={settings:Fb,plus:Ob,wrench:Bb,phone:Nb,palette:Ib,building:zh,close:Ub,done:pu,check:gu,users:Gb,"layout-grid":hb,bell:Dh,"book-user":Vh,"user-gear":$b,folder:fb,"briefcase-business":jh,calendar:Hh,"chart-line":Wh,message:wb,search:Mb,"list-filter":vb,funnel:gb,dots:fu,"check-list":yb,tag:Lb,chevron:qh,chevrons:Zh,"rotate-ccw":Ab,question:Jh,clock:tb,eye:ub,"eye-off":lb,package:Rb,"credit-card":rb,"dollar-sign":sb},Kb={xs:"w-2.5 h-2.5",sm:"w-3.75 h-3.75",md:"w-5 h-5",lg:"w-6.25 h-6.25"},Ut=({type:e,size:t="md",viewBox:n="0 0 24 24",strokeWidth:r=1.5,classes:o,color:s,...i})=>{const a=qb[e],l=Kb[t],c=L(l,o?.icon);return v.jsx("div",{...i,className:o?.wrapper,children:v.jsx(a,{viewBox:n,strokeWidth:r,className:c,color:s})})},Yb=["peer bg-primary-bg border-inp-default-border grid size-5 shrink-0 cursor-pointer place-content-center rounded border","focus-visible:ring-inp-focus-border focus-visible:ring-1 focus-visible:outline-none","text-transparent transition-all duration-200","disabled:cursor-not-allowed","disabled:border-disabled-border disabled:bg-disabled-bg","disabled:data-[state=checked]:bg-disabled-bg","disabled:data-[state=checked]:border-disabled-border","disabled:data-[state=checked]:text-disabled-text","data-[state=checked]:border-primary-inverse-bg","data-[state=checked]:bg-primary-inverse-bg data-[state=checked]:text-primary-inverse-text","enabled:hover:border-inp-hover-border","enabled:hover:data-[state=checked]:bg-primary-inverse-hover-bg","enabled:hover:data-[state=checked]:border-primary-inverse-hover-bg"].join(" "),Xb="grid place-content-center text-current",ji=({className:e,ref:t,...n})=>v.jsx(Li,{ref:t,className:L(Yb,e),...n,children:v.jsx(su,{className:L(Xb),children:v.jsx(Ut,{type:"done",viewBox:"3 3 14 14"})})});ji.displayName=Li.displayName;function Cs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=u.useRef(e!==void 0),[s,i]=u.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){u.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
16
16
|
`))},[r,n,e]);const{current:c}=u.useRef(t);u.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
17
17
|
`))},[JSON.stringify(t)])}const l=u.useCallback(c=>{o||i(c)},[]);return[a,l]}const vl={};function wt(e,t){const n=u.useRef(vl);return n.current===vl&&(n.current=e(t)),n}const ws=u[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Zb=ws&&ws!==u.useLayoutEffect?ws:e=>e();function re(e){const t=wt(Qb).current;return t.next=e,Zb(t.effect),t.trampoline}function Qb(){const e={next:void 0,callback:Jb,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Jb(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const ev=()=>{},oe=typeof document<"u"?u.useLayoutEffect:ev,$i=u.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&($i.displayName="CompositeListContext");function tv(){return u.useContext($i)}function mu(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=re(o),i=u.useRef(0),a=wt(rv).current,l=wt(nv).current,[c,d]=u.useState(0),p=u.useRef(c),g=re((y,x)=>{l.set(y,x??null),p.current+=1,d(p.current)}),f=re(y=>{l.delete(y),p.current+=1,d(p.current)}),h=u.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(w=>w.isConnected).sort(ov).forEach((w,C)=>{const S=l.get(w)??{};y.set(w,{...S,index:C})}),y},[l,c]);oe(()=>{if(typeof MutationObserver!="function"||h.size===0)return;const y=new MutationObserver(x=>{const w=new Set,C=S=>w.has(S)?w.delete(S):w.add(S);x.forEach(S=>{S.removedNodes.forEach(C),S.addedNodes.forEach(C)}),w.size===0&&(p.current+=1,d(p.current))});return h.forEach((x,w)=>{w.parentElement&&y.observe(w.parentElement,{childList:!0})}),()=>{y.disconnect()}},[h]),oe(()=>{p.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),i.current=h.size),s(h)},[s,h,n,r,c]),oe(()=>()=>{n.current=[]},[n]),oe(()=>()=>{r&&(r.current=[])},[r]);const m=re(y=>(a.add(y),()=>{a.delete(y)}));oe(()=>{a.forEach(y=>y(h))},[a,h]);const b=u.useMemo(()=>({register:g,unregister:f,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:i}),[g,f,m,n,r,i]);return v.jsx($i.Provider,{value:b,children:t})}function nv(){return new Map}function rv(){return new Set}function ov(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const hu=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(hu.displayName="DirectionContext");function bu(){return u.useContext(hu)?.direction??"ltr"}function Ot(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function gr(e,t,n,r){const o=wt(vu).current;return iv(o,e,t,n,r)&&xu(o,[e,t,n,r]),o.callback}function sv(e){const t=wt(vu).current;return av(t,e)&&xu(t,e),t.callback}function vu(){return{callback:null,cleanup:null,refs:[]}}function iv(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function av(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function xu(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const lv=parseInt(u.version,10);function zi(e){return lv>=e}function xl(e){if(!u.isValidElement(e))return null;const t=e,n=t.props;return(zi(19)?n?.ref:t.ref)??null}function ei(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function cv(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function uv(e,t){return typeof e=="function"?e(t):e}function dv(e,t){return typeof e=="function"?e(t):e}const ir={};function yu(e,t,n,r,o){let s={...ti(e,ir)};return t&&(s=io(s,t)),n&&(s=io(s,n)),r&&(s=io(s,r)),s}function fv(e){if(e.length===0)return ir;if(e.length===1)return ti(e[0],ir);let t={...ti(e[0],ir)};for(let n=1;n<e.length;n+=1)t=io(t,e[n]);return t}function io(e,t){return Cu(t)?t(e):pv(e,t)}function pv(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ei(e.style,r);break}case"className":{e[n]=wu(e.className,r);break}default:gv(n,r)?e[n]=mv(e[n],r):e[n]=r}}return e}function gv(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Cu(e){return typeof e=="function"}function ti(e,t){return Cu(e)?e(t):e??ir}function mv(e,t){return t?e?n=>{if(hv(n)){const o=n;ni(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function ni(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wu(e,t){return t?e?t+" "+e:t:e}function hv(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Ve(){}const $r=Object.freeze([]),rt=Object.freeze({}),bv={style:{transition:"none"}},vv="data-base-ui-click-trigger",xv={fallbackAxisSide:"none"},yv={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function ot(e,t,n={}){const r=t.render,o=Cv(t,n);if(n.enabled===!1)return null;const s=n.state??rt;return Sv(e,r,o,s)}function Cv(e,t={}){const{className:n,style:r,render:o}=e,{state:s=rt,ref:i,props:a,stateAttributesMapping:l,enabled:c=!0}=t,d=c?uv(n,s):void 0,p=c?dv(r,s):void 0,g=c?cv(s,l):rt,f=c?ei(g,Array.isArray(a)?fv(a):a)??rt:rt;return typeof document<"u"&&(c?Array.isArray(i)?f.ref=sv([f.ref,xl(o),...i]):f.ref=gr(f.ref,xl(o),i):gr(null,null)),c?(d!==void 0&&(f.className=wu(f.className,d)),p!==void 0&&(f.style=ei(f.style,p)),f):rt}const wv=Symbol.for("react.lazy");function Sv(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=yu(n,t.props);o.ref=n.ref;let s=t;if(s?.$$typeof===wv&&(s=u.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!u.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
18
18
|
`));return u.cloneElement(s,o)}if(e&&typeof e=="string")return Rv(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Ot(8))}function Rv(e,t){return e==="button"?Te.createElement("button",{type:"button",...t,key:t.key}):e==="img"?Te.createElement("img",{alt:"",...t,key:t.key}):u.createElement(e,t)}const xt="none",ri="trigger-press",Ev="trigger-hover",Gi="outside-press",Iv="item-press",yl="clear-press",kv="chip-remove-press",Vn="input-change",rn="input-clear",Nv="input-press",Mo="focus-out",Su="escape-key",ar="list-navigation";function pe(e,t,n,r){let o=!1,s=!1;const i=rt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}function er(e,t,n){const r=n??rt;return{reason:e,event:t??new Event("base-ui"),...r}}const oi={...u};let Cl=0;function Pv(e,t="mui"){const[n,r]=u.useState(e),o=e||n;return u.useEffect(()=>{n==null&&(Cl+=1,r(`${t}-${Cl}`))},[n,t]),o}const wl=oi.useId;function Hi(e,t){if(wl!==void 0){const n=wl();return e??(t?`${t}-${n}`:n)}return Pv(e,t)}function Bi(e){return Hi(e,"base-ui")}const Ov=[];function Ru(e){u.useEffect(e,Ov)}const zr=null;let Sl=globalThis.requestAnimationFrame;class _v{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Sl!==requestAnimationFrame&&(Sl=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Gr=new _v;class Tt{static create(){return new Tt}static request(t){return Gr.request(t)}static cancel(t){return Gr.cancel(t)}currentId=zr;request(t){this.cancel(),this.currentId=Gr.request(()=>{this.currentId=zr,t()})}cancel=()=>{this.currentId!==zr&&(Gr.cancel(this.currentId),this.currentId=zr)};disposeEffect=()=>this.cancel}function Wi(){const e=wt(Tt.create).current;return Ru(e.disposeEffect),e}function zt(e){return e==null?e:"current"in e?e.current:e}let mr=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Av={[mr.startingStyle]:""},Tv={[mr.endingStyle]:""},Eu={transitionStatus(e){return e==="starting"?Av:e==="ending"?Tv:null}};function Mv(e,t=!1,n=!0){const r=Wi();return re((o,s=null)=>{r.cancel();function i(){gn.flushSync(o)}const a=zt(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const p=mr.startingStyle;if(!l.hasAttribute(p)){r.request(d);return}const g=new MutationObserver(()=>{l.hasAttribute(p)||(g.disconnect(),d())});g.observe(l,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>g.disconnect(),{once:!0})},d=function(){Promise.all(l.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||i()}).catch(()=>{const p=l.getAnimations();if(n){if(s?.aborted)return;i()}else p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&d()})};if(t){c();return}r.request(d)}})}function Iu(e,t=!1,n=!1){const[r,o]=u.useState(e&&t?"idle":void 0),[s,i]=u.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),oe(()=>{if(!e&&s&&r!=="ending"&&n){const a=Tt.request(()=>{o("ending")});return()=>{Tt.cancel(a)}}},[e,s,r,n]),oe(()=>{if(!e||t)return;const a=Tt.request(()=>{o(void 0)});return()=>{Tt.cancel(a)}},[t,e]),oe(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=Tt.request(()=>{o("idle")});return()=>{Tt.cancel(a)}},[t,e,s,o,r]),u.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:r}),[s,r])}let ku=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Nu(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:d,nextIndexRef:p}=tv(),g=u.useRef(-1),[f,h]=u.useState(s??(o===ku.GuessFromOrder?()=>{if(g.current===-1){const y=p.current;p.current+=1,g.current=y}return g.current}:-1)),m=u.useRef(null),b=u.useCallback(y=>{if(m.current=y,f!==-1&&y!==null&&(c.current[f]=y,d)){const x=t!==void 0;d.current[f]=x?t:r?.current?.textContent??y.textContent}},[f,c,d,t,r]);return oe(()=>{if(s!=null)return;const y=m.current;if(y)return i(y,n),()=>{a(y)}},[s,i,a,n]),oe(()=>{if(s==null)return l(y=>{const x=m.current?y.get(m.current)?.index:null;x!=null&&h(x)})},[s,l,h]),u.useMemo(()=>({ref:b,index:f}),[f,b])}function Do(){return typeof window<"u"}function hn(e){return Ui(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lt(e){var t;return(t=(Ui(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ui(e){return Do()?e instanceof Node||e instanceof Ze(e).Node:!1}function Fe(e){return Do()?e instanceof Element||e instanceof Ze(e).Element:!1}function Be(e){return Do()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function si(e){return!Do()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}function bn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Dv(e){return/^(table|td|th)$/.test(hn(e))}function Fo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Fv=/transform|translate|scale|rotate|perspective|filter/,Vv=/paint|layout|strict|content/,Sn=e=>!!e&&e!=="none";let Ss;function qi(e){const t=Fe(e)?ht(e):e;return Sn(t.transform)||Sn(t.translate)||Sn(t.scale)||Sn(t.rotate)||Sn(t.perspective)||!Vo()&&(Sn(t.backdropFilter)||Sn(t.filter))||Fv.test(t.willChange||"")||Vv.test(t.contain||"")}function Lv(e){let t=qt(e);for(;Be(t)&&!Wt(t);){if(qi(t))return t;if(Fo(t))return null;t=qt(t)}return null}function Vo(){return Ss==null&&(Ss=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ss}function Wt(e){return/^(html|body|#document)$/.test(hn(e))}function ht(e){return Ze(e).getComputedStyle(e)}function Lo(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qt(e){if(hn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||si(e)&&e.host||Lt(e);return si(t)?t.host:t}function Pu(e){const t=qt(e);return Wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&bn(t)?t:Pu(t)}function ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Pu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ze(o);if(s){const a=ii(i);return t.concat(i,i.visualViewport||[],bn(o)?o:[],a&&n?ln(a):[])}else return t.concat(o,ln(o,[],n))}function ii(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let ai;process.env.NODE_ENV!=="production"&&(ai=new Set);function Rl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ai.has(t)||(ai.add(t),console.error(`Base UI: ${t}`))}}const Ou=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ou.displayName="CompositeRootContext");function jv(e=!1){const t=u.useContext(Ou);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ot(16));return t}function $v(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:u.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=o,!s&&n&&(c.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(c["aria-disabled"]=n),s&&(!t||a)&&(c.disabled=n),c},[r,n,t,i,a,s,o])}}function jo(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=u.useRef(null),i=jv(!0)!==void 0,a=re(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:l}=$v({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&u.useEffect(()=>{if(!s.current)return;const g=s.current.tagName==="BUTTON";if(o){if(!g){const f=oi.captureOwnerStack?.()||"";Rl(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${f}`)}}else if(g){const f=oi.captureOwnerStack?.()||"";Rl(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${f}`)}},[o]);const c=u.useCallback(()=>{const g=s.current;zv(g)&&i&&t&&l.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,l.disabled,i]);oe(c,[c]);const d=u.useCallback((g={})=>{const{onClick:f,onMouseDown:h,onKeyUp:m,onKeyDown:b,onPointerDown:y,...x}=g;return yu({type:o?"button":void 0,onClick(C){if(t){C.preventDefault();return}f?.(C)},onMouseDown(C){t||h?.(C)},onKeyDown(C){if(t||(ni(C),b?.(C)),C.baseUIHandlerPrevented)return;const S=C.target===C.currentTarget&&!o&&!a()&&!t,I=C.key==="Enter",E=C.key===" ";S&&((E||I)&&C.preventDefault(),I&&f?.(C))},onKeyUp(C){t||(ni(C),m?.(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!o&&!t&&C.key===" "&&f?.(C)},onPointerDown(C){if(t){C.preventDefault();return}y?.(C)}},o?void 0:{role:"button"},l,x)},[t,l,o,a]),p=re(g=>{s.current=g,c()});return{getButtonProps:d,buttonRef:p}}function zv(e){return Be(e)&&e.tagName==="BUTTON"}const An=typeof navigator<"u",Rs=Bv(),_u=Uv(),Ki=Wv(),Au=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Tu=Rs.platform==="MacIntel"&&Rs.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Rs.platform),El=An&&/firefox/i.test(Ki),Gv=An&&/apple/i.test(navigator.vendor),go=An&&/android/i.test(_u)||/android/i.test(Ki);An&&_u.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Hv=Ki.includes("jsdom/");function Bv(){if(!An)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Wv(){if(!An)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Uv(){if(!An)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const li="data-base-ui-focusable",Mu="active",Du="selected",qv="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",cn="ArrowLeft",un="ArrowRight",Yi="ArrowUp",xr="ArrowDown";function Ht(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ie(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&si(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Nt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Kv(e){return e.matches("html,body")}function Xi(e){return Be(e)&&e.matches(qv)}function ci(e){return e?e.getAttribute("role")==="combobox"&&Xi(e):!1}function ui(e){return e?e.hasAttribute(li)?e:e.querySelector(`[${li}]`)||e:null}function $n(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...$n(e,o.id,n)])}function Il(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function De(e){e.preventDefault(),e.stopPropagation()}function Yv(e){return"nativeEvent"in e}function Fu(e){return e.pointerType===""&&e.isTrusted?!0:go&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vu(e){return Hv?!1:!go&&e.width===0&&e.height===0||go&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function kl(e,t){return["mouse","pen"].includes(e)}function Lu(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Xv=["top","right","bottom","left"],fn=Math.min,gt=Math.max,mo=Math.round,Ln=Math.floor,Dt=e=>({x:e,y:e}),Zv={left:"right",right:"left",bottom:"top",top:"bottom"};function ho(e,t,n){return gt(e,fn(t,n))}function Ft(e,t){return typeof e=="function"?e(t):e}function mt(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function Zi(e){return e==="x"?"y":"x"}function $o(e){return e==="y"?"height":"width"}function Ct(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zo(e){return Zi(Ct(e))}function Qv(e,t,n){n===void 0&&(n=!1);const r=Yt(e),o=zo(e),s=$o(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=bo(i)),[i,bo(i)]}function Jv(e){const t=bo(e);return[di(e),t,di(t)]}function di(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nl=["left","right"],Pl=["right","left"],ex=["top","bottom"],tx=["bottom","top"];function nx(e,t,n){switch(e){case"top":case"bottom":return n?t?Pl:Nl:t?Nl:Pl;case"left":case"right":return t?ex:tx;default:return[]}}function rx(e,t,n,r){const o=Yt(e);let s=nx(mt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(di)))),s}function bo(e){const t=mt(e);return Zv[t]+e.slice(t.length)}function ox(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qi(e){return typeof e!="number"?ox(e):{top:e,right:e,bottom:e,left:e}}function vo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Hr(e,t,n){return Math.floor(e/t)!==n}function lr(e,t){return t<0||t>=e.current.length}function Es(e,t){return tt(e,{disabledIndices:t})}function Ol(e,t){return tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.current.length-1&&cr(e,s,r));return s}function sx(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:d=!1}){let p=c;const g=[],f={};let h=!1;{let y=null,x=-1;e.current.forEach((w,C)=>{if(w==null)return;const S=w.closest('[role="row"]');S&&(h=!0),(S!==y||x===-1)&&(y=S,x+=1,g[x]=[]),g[x].push(C),f[C]=x})}const m=h&&g.length>0&&g.some(y=>y.length!==s);function b(y){if(!m||c===-1)return;const x=f[c];if(x==null)return;const w=g[x].indexOf(c);let C=y==="up"?x-1:x+1;r&&(C<0?C=g.length-1:C>=g.length&&(C=0));const S=new Set;for(;C>=0&&C<g.length&&!S.has(C);){S.add(C);const I=g[C];if(I.length===0){C=y==="up"?C-1:C+1;continue}const E=Math.min(w,I.length-1);for(let R=E;R>=0;R-=1){const F=I[R];if(!cr(e,F,i))return F}C=y==="up"?C-1:C+1,r&&(C<0?C=g.length-1:C>=g.length&&(C=0))}}if(t.key===Yi){const y=b("up");if(y!==void 0)d&&De(t),p=y;else{if(d&&De(t),c===-1)p=l;else if(p=tt(e,{startingIndex:p,amount:s,decrement:!0,disabledIndices:i}),r&&(c-s<a||p<0)){const x=c%s,w=l%s,C=l-(w-x);w===x?p=l:p=w>x?C:C-s}lr(e,p)&&(p=c)}}if(t.key===xr){const y=b("down");y!==void 0?(d&&De(t),p=y):(d&&De(t),c===-1?p=a:(p=tt(e,{startingIndex:c,amount:s,disabledIndices:i}),r&&c+s>l&&(p=tt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),lr(e,p)&&(p=c))}if(n==="both"){const y=Ln(c/s);t.key===(o?cn:un)&&(d&&De(t),c%s!==s-1?(p=tt(e,{startingIndex:c,disabledIndices:i}),r&&Hr(p,s,y)&&(p=tt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):r&&(p=tt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Hr(p,s,y)&&(p=c)),t.key===(o?un:cn)&&(d&&De(t),c%s!==0?(p=tt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),r&&Hr(p,s,y)&&(p=tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):r&&(p=tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Hr(p,s,y)&&(p=c));const x=Ln(l/s)===y;lr(e,p)&&(r&&x?p=t.key===(o?un:cn)?l:tt(e,{startingIndex:c-c%s-1,disabledIndices:i}):p=c)}return p}function ix(e,t,n){const r=[];let o=0;return e.forEach(({width:s,height:i},a)=>{if(s>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${a} is greater than grid columns`);let l=!1;for(;!l;){const c=[];for(let d=0;d<s;d+=1)for(let p=0;p<i;p+=1)c.push(o+d+p*t);o%t+s<=t&&c.every(d=>r[d]==null)?(c.forEach(d=>{r[d]=a}),l=!0):o+=1}}),[...r]}function ax(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function lx(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function cr(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var cx=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],xo=cx.join(","),ju=typeof Element>"u",Wn=ju?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,yo=!ju&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Co=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Co(t.parentNode));return i},ux=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},$u=function(t,n,r){if(Co(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(xo));return n&&Wn.call(t,xo)&&o.unshift(t),o=o.filter(r),o},wo=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Co(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=wo(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var d=Wn.call(i,xo);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),g=!Co(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&g){var f=wo(p===!0?i.children:p.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},zu=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Gu=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ux(t))&&!zu(t)?0:t.tabIndex},dx=function(t,n){var r=Gu(t);return r<0&&n&&!zu(t)?0:r},fx=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Hu=function(t){return t.tagName==="INPUT"},px=function(t){return Hu(t)&&t.type==="hidden"},gx=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},mx=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},hx=function(t){if(!t.name)return!0;var n=t.form||yo(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=mx(o,t.form);return!s||s===t},bx=function(t){return Hu(t)&&t.type==="radio"},vx=function(t){return bx(t)&&!hx(t)},xx=function(t){var n,r=t&&yo(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,p;r=yo(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},_l=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},yx=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=Wn.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wn.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,d=yo(t);if(c&&!c.shadowRoot&&o(c)===!0)return _l(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=l}if(xx(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return _l(t);return!1},Cx=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Wn.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},fi=function(t,n){return!(n.disabled||px(n)||yx(n,t)||gx(n)||Cx(n))},pi=function(t,n){return!(vx(n)||Gu(n)<0||!fi(t,n))},wx=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Bu=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=dx(a,i),c=i?Bu(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(fx).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Go=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wo([t],n.includeContainer,{filter:pi.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wx}):r=$u(t,n.includeContainer,pi.bind(null,n)),Bu(r)},Sx=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wo([t],n.includeContainer,{filter:fi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=$u(t,n.includeContainer,fi.bind(null,n)),r},Wu=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wn.call(t,xo)===!1?!1:pi(n,t)};function Ge(e){return e?.ownerDocument||document}const yr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Uu(e,t){const n=Go(e,yr()),r=n.length;if(r===0)return;const o=Ht(Ge(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function qu(e){return Uu(Ge(e).body,1)||e}function Ku(e){return Uu(Ge(e).body,-1)||e}function ur(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ie(n,r)}function Rx(e){Go(e,yr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Al(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Ji(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=re(o),i=Mv(r,n,!1);u.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}const tr=0;class Un{static create(){return new Un}currentId=tr;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=tr,n()},t)}isStarted(){return this.currentId!==tr}clear=()=>{this.currentId!==tr&&(clearTimeout(this.currentId),this.currentId=tr)};disposeEffect=()=>this.clear}function En(){const e=wt(Un.create).current;return Ru(e.disposeEffect),e}let Tl={},Ml={},Dl="";function Ex(e){if(typeof document>"u")return!1;const t=Ge(e);return Ze(t).innerWidth-t.documentElement.clientWidth>0}function Ix(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Ge(e),r=n.documentElement,o=n.body,s=bn(r)?r:o,i=s.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const c=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=a,l===c}function kx(e){const t=Ge(e),n=t.documentElement,r=t.body,o=bn(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Nx(e){const t=Ge(e),n=t.documentElement,r=t.body,o=Ze(n);let s=0,i=0,a=!1;const l=Tt.create();if(Au&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){const g=o.getComputedStyle(n),f=o.getComputedStyle(r),b=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Tl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Dl=n.style.scrollBehavior,Ml={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,w=g.overflowY==="scroll"||f.overflowY==="scroll",C=g.overflowX==="scroll"||f.overflowX==="scroll",S=Math.max(0,o.innerWidth-r.clientWidth),I=Math.max(0,o.innerHeight-r.clientHeight),E=parseFloat(f.marginTop)+parseFloat(f.marginBottom),R=parseFloat(f.marginLeft)+parseFloat(f.marginRight),F=bn(n)?n:r;if(a=Ix(e),a){n.style.scrollbarGutter=b,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:b,overflowY:"hidden",overflowX:"hidden"}),(y||w)&&(n.style.overflowY="scroll"),(x||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:E||I?`calc(100dvh - ${E+I}px)`:"100dvh",width:R||S?`calc(100vw - ${R+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Tl),Object.assign(r.style,Ml),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Dl)}function p(){d(),l.request(c)}return c(),o.addEventListener("resize",p),()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class Px{lockCount=0;restore=null;timeoutLock=Un.create();timeoutUnlock=Un.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ge(t).documentElement,o=Ze(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Ve;return}const s=Tu||!Ex(t);this.restore=s?kx(t):Nx(t)}}const Ox=new Px;function _x(e=!0,t=null){oe(()=>{if(e)return Ox.acquire(t)},[e,t])}function yt(e){const t=wt(Ax,e).current;return t.next=e,oe(t.effect),t}function Ax(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Tx(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const Yu=u.createContext(null);process.env.NODE_ENV!=="production"&&(Yu.displayName="FloatingNodeContext");const Xu=u.createContext(null);process.env.NODE_ENV!=="production"&&(Xu.displayName="FloatingTreeContext");const Zu=()=>u.useContext(Yu)?.id||null,Ho=e=>{const t=u.useContext(Xu);return e??t};function So(e){return`data-base-ui-${e}`}const Qu={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},ea={...Qu,position:"fixed",top:0,left:0},Mx={...Qu,position:"absolute"},hr=u.forwardRef(function(t,n){const[r,o]=u.useState();oe(()=>{Gv&&o("button")},[]);const s={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:ea,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(hr.displayName="FocusGuard");let Fl=0;function dr(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Fl);const s=()=>e?.focus({preventScroll:n});o?s():Fl=requestAnimationFrame(s)}const zn={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Vl(e){return e==="inert"?zn.inert:e==="aria-hidden"?zn["aria-hidden"]:zn.none}let Br=new WeakSet,Wr={},Is=0;const Ju=e=>e&&(e.host||Ju(e.parentNode)),Dx=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ju(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Fx(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Dx(t,e),a=new Set,l=new Set(i),c=[];Wr[o]||(Wr[o]=new WeakMap);const d=Wr[o];i.forEach(p),g(t),a.clear();function p(f){!f||a.has(f)||(a.add(f),f.parentNode&&p(f.parentNode))}function g(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(hn(h)!=="script")if(a.has(h))g(h);else{const m=s?h.getAttribute(s):null,b=m!==null&&m!=="false",y=Vl(s),x=(y.get(h)||0)+1,w=(d.get(h)||0)+1;y.set(h,x),d.set(h,w),c.push(h),x===1&&b&&Br.add(h),w===1&&h.setAttribute(o,""),!b&&s&&h.setAttribute(s,s==="inert"?"":"true")}})}return Is+=1,()=>{c.forEach(f=>{const h=Vl(s),b=(h.get(f)||0)-1,y=(d.get(f)||0)-1;h.set(f,b),d.set(f,y),b||(!Br.has(f)&&s&&f.removeAttribute(s),Br.delete(f)),y||f.removeAttribute(o)}),Is-=1,Is||(zn.inert=new WeakMap,zn["aria-hidden"]=new WeakMap,zn.none=new WeakMap,Br=new WeakSet,Wr={})}}function Vx(e,t=!1,n=!1){const r=Ge(e[0]).body;return Fx(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ta=u.createContext(null);process.env.NODE_ENV!=="production"&&(ta.displayName="PortalContext");const ed=()=>u.useContext(ta),Lx=So("portal");function jx(e={}){const{ref:t,container:n,componentProps:r=rt,elementProps:o}=e,s=Hi(),a=ed()?.portalNode,[l,c]=u.useState(null),[d,p]=u.useState(null),g=re(b=>{b!==null&&p(b)}),f=u.useRef(null);oe(()=>{if(n===null){f.current&&(f.current=null,p(null),c(null));return}if(s==null)return;const b=(n&&(Ui(n)?n:n.current))??a??document.body;if(b==null){f.current&&(f.current=null,p(null),c(null));return}f.current!==b&&(f.current=b,p(null),c(b))},[n,a,s]);const h=ot("div",r,{ref:[t,g],props:[{id:s,[Lx]:""},o]});return{portalNode:d,portalSubtree:l&&h?gn.createPortal(h,l):null}}const td=u.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:d}=jx({container:o,ref:n,componentProps:t,elementProps:l}),p=u.useRef(null),g=u.useRef(null),f=u.useRef(null),h=u.useRef(null),[m,b]=u.useState(null),y=m?.modal,x=m?.open,w=typeof a=="boolean"?a:!!m&&!m.modal&&m.open&&!!c;u.useEffect(()=>{if(!c||y)return;function S(I){c&&I.relatedTarget&&ur(I)&&(I.type==="focusin"?Al:Rx)(c)}return c.addEventListener("focusin",S,!0),c.addEventListener("focusout",S,!0),()=>{c.removeEventListener("focusin",S,!0),c.removeEventListener("focusout",S,!0)}},[c,y]),u.useEffect(()=>{!c||x||Al(c)},[x,c]);const C=u.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:f,afterInsideRef:h,portalNode:c,setFocusManagerState:b}),[c]);return v.jsxs(u.Fragment,{children:[d,v.jsxs(ta.Provider,{value:C,children:[w&&c&&v.jsx(hr,{"data-type":"outside",ref:p,onFocus:S=>{if(ur(S,c))f.current?.focus();else{const I=m?m.domReference:null;Ku(I)?.focus()}}}),w&&c&&v.jsx("span",{"aria-owns":c.id,style:yv}),c&&gn.createPortal(r,c),w&&c&&v.jsx(hr,{"data-type":"outside",ref:g,onFocus:S=>{if(ur(S,c))h.current?.focus();else{const I=m?m.domReference:null;qu(I)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,pe(Mo,S.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(td.displayName="FloatingPortal");function $x(e,t){const n=Ze(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Ll=20;let on=[];function na(){on=on.filter(e=>e.deref()?.isConnected)}function zx(e){na(),e&&hn(e)!=="body"&&(on.push(new WeakRef(e)),on.length>Ll&&(on=on.slice(-Ll)))}function ks(){return na(),on[on.length-1]?.deref()}function Gx(e){if(!e)return null;const t=yr();return Wu(e,t)?e:Go(e,t)[0]||e}function Hx(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():ht(e).display!=="none"}function jl(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=yr(),o=Sx(e,n).filter(i=>{const a=i.getAttribute("data-tabindex")||"";return Wu(i,n)||i.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Bx(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:c="",nextFocusableElement:d,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:f}=e,h="rootStore"in t?t.rootStore:t,m=h.useState("open"),b=h.useState("domReferenceElement"),y=h.useState("floatingElement"),{events:x,dataRef:w}=h.context,C=re(()=>w.current.floatingContext?.nodeId),S=o===!1,I=ci(b)&&S,E=u.useRef(["content"]),R=yt(o),F=yt(s),N=yt(c),T=Ho(f),_=ed(),q=u.useRef(null),Y=u.useRef(null),H=u.useRef(!1),P=u.useRef(!1),B=u.useRef(!1),z=u.useRef(-1),te=u.useRef(""),A=u.useRef(""),Re=u.useRef(null),ge=u.useRef(null),Ce=gr(Re,g,_?.beforeInsideRef),ae=gr(ge,_?.afterInsideRef),le=En(),ve=En(),Ee=Wi(),ke=_!=null,X=ui(y),me=re((M=X)=>M?Go(M,yr()):[]),we=re(M=>{const G=me(M);return E.current.map(()=>G).filter(Boolean).flat()});u.useEffect(()=>{if(r||!a)return;function M(fe){fe.key==="Tab"&&Ie(X,Ht(Ge(X)))&&me().length===0&&!I&&De(fe)}const G=Ge(X);return G.addEventListener("keydown",M),()=>{G.removeEventListener("keydown",M)}},[r,b,X,a,E,I,me,we]),u.useEffect(()=>{if(r||!m)return;const M=Ge(X);function G(){B.current=!1}function fe(W){const U=dt(W),D=Ie(y,U)||Ie(b,U)||Ie(_?.portalNode,U);B.current=!D,A.current=W.pointerType||"keyboard",U?.closest(`[${vv}]`)&&(P.current=!0)}function k(){A.current="keyboard"}return M.addEventListener("pointerdown",fe,!0),M.addEventListener("pointerup",G,!0),M.addEventListener("pointercancel",G,!0),M.addEventListener("keydown",k,!0),()=>{M.removeEventListener("pointerdown",fe,!0),M.removeEventListener("pointerup",G,!0),M.removeEventListener("pointercancel",G,!0),M.removeEventListener("keydown",k,!0)}},[r,y,b,X,m,_]),u.useEffect(()=>{if(r||!l)return;const M=Ge(X);function G(){P.current=!0,ve.start(0,()=>{P.current=!1})}function fe(K){const j=dt(K),ie=me().indexOf(j);ie!==-1&&(z.current=ie)}function k(K){const j=K.relatedTarget,Q=K.currentTarget,ie=dt(K);queueMicrotask(()=>{const xe=C(),We=h.context.triggerElements,st=j?.hasAttribute(So("focus-guard"))&&[Re.current,ge.current,_?.beforeInsideRef.current,_?.afterInsideRef.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,zt(p),zt(d)].includes(j),Le=!(Ie(b,j)||Ie(y,j)||Ie(j,y)||Ie(_?.portalNode,j)||j!=null&&We.hasElement(j)||We.hasMatchingElement(Ne=>Ie(Ne,j))||st||T&&($n(T.nodesRef.current,xe).find(Ne=>Ie(Ne.context?.elements.floating,j)||Ie(Ne.context?.elements.domReference,j))||Il(T.nodesRef.current,xe).find(Ne=>[Ne.context?.elements.floating,ui(Ne.context?.elements.floating)].includes(j)||Ne.context?.elements.domReference===j)));if(Q===b&&X&&jl(X,E),i&&Q!==b&&!Hx(ie)&&Ht(M)===M.body){if(Be(X)&&(X.focus(),i==="popup")){Ee.request(()=>{X.focus()});return}const Ne=z.current,$e=me(),it=$e[Ne]||$e[$e.length-1]||X;Be(it)&&it.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(I||!a)&&j&&Le&&!P.current&&(I||j!==ks())&&(H.current=!0,h.setOpen(!1,pe(Mo,K)))})}function W(){B.current||(w.current.insideReactTree=!0,le.start(0,()=>{w.current.insideReactTree=!1}))}const U=Be(b)?b:null,D=[];if(!(!y&&!U))return U&&(U.addEventListener("focusout",k),U.addEventListener("pointerdown",G),D.push(()=>{U.removeEventListener("focusout",k),U.removeEventListener("pointerdown",G)})),y&&(y.addEventListener("focusin",fe),y.addEventListener("focusout",k),_&&(y.addEventListener("focusout",W,!0),D.push(()=>{y.removeEventListener("focusout",W,!0)})),D.push(()=>{y.removeEventListener("focusin",fe),y.removeEventListener("focusout",k)})),()=>{D.forEach(K=>{K()})}},[r,b,y,X,a,T,_,h,l,i,me,I,C,E,w,le,ve,Ee,d,p]),u.useEffect(()=>{if(r||!y||!m)return;const M=Array.from(_?.portalNode?.querySelectorAll(`[${So("portal")}]`)||[]),fe=(T?Il(T.nodesRef.current,C()):[]).find(W=>ci(W.context?.elements.domReference||null))?.context?.elements.domReference,k=[y,fe,...M,q.current,Y.current,Re.current,ge.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,zt(p),zt(d),I?b:null].filter(W=>W!=null);return Vx(k,a||I)},[m,r,b,y,a,E,_,I,T,C,d,p]),oe(()=>{if(!m||r||!Be(X))return;const M=Ge(X),G=Ht(M);queueMicrotask(()=>{const fe=we(X),k=R.current,W=typeof k=="function"?k(N.current||""):k;if(W===void 0||W===!1)return;let U;W===!0||W===null?U=fe[0]||X:U=zt(W),U=U||fe[0]||X,!Ie(X,G)&&dr(U,{preventScroll:U===X})})},[r,m,X,S,we,R,N]),oe(()=>{if(r||!X)return;const M=Ge(X),G=Ht(M);zx(G);function fe(U){if(U.open||(te.current=$x(U.nativeEvent,A.current)),U.reason===Ev&&U.nativeEvent.type==="mouseleave"&&(H.current=!0),U.reason===Gi)if(U.nested)H.current=!1;else if(Fu(U.nativeEvent)||Vu(U.nativeEvent))H.current=!1;else{let D=!1;document.createElement("div").focus({get preventScroll(){return D=!0,!1}}),D?H.current=!1:H.current=!0}}x.on("openchange",fe);const k=M.createElement("span");k.setAttribute("tabindex","-1"),k.setAttribute("aria-hidden","true"),Object.assign(k.style,ea),ke&&b&&b.insertAdjacentElement("afterend",k);function W(){const U=F.current;let D=typeof U=="function"?U(te.current):U;if(D===void 0||D===!1)return null;if(D===null&&(D=!0),typeof D=="boolean"){const j=b||ks();return j&&j.isConnected?j:k}const K=b||ks()||k;return zt(D)||K}return()=>{x.off("openchange",fe);const U=Ht(M),D=Ie(y,U)||T&&$n(T.nodesRef.current,C(),!1).some(j=>Ie(j.context?.elements.floating,U)),K=W();queueMicrotask(()=>{const j=Gx(K),Q=typeof F.current!="boolean";F.current&&!H.current&&Be(j)&&(!(!Q&&j!==U&&U!==M.body)||D)&&j.focus({preventScroll:!0}),k.remove(),H.current=!1})}},[r,y,X,F,w,x,T,ke,b,C]),oe(()=>{if(!Au||m||!y)return;const M=Ht(Ge(y));!Be(M)||!Xi(M)||Ie(y,M)&&M.blur()},[m,y]),oe(()=>{if(!(r||!_))return _.setFocusManagerState({modal:a,closeOnFocusOut:l,open:m,onOpenChange:h.setOpen,domReference:b}),()=>{_.setFocusManagerState(null)}},[r,_,a,m,h,l,b]),oe(()=>{if(!(r||!X))return jl(X,E),()=>{queueMicrotask(na)}},[r,X,E]);const O=!r&&(a?!I:!0)&&(ke||a);return v.jsxs(u.Fragment,{children:[O&&v.jsx(hr,{"data-type":"inside",ref:Ce,onFocus:M=>{if(a){const G=we();dr(G[G.length-1])}else _?.portalNode&&(H.current=!1,ur(M,_.portalNode)?qu(b)?.focus():zt(p??_.beforeOutsideRef)?.focus())}}),n,O&&v.jsx(hr,{"data-type":"inside",ref:ae,onFocus:M=>{a?dr(we()[0]):_?.portalNode&&(l&&(H.current=!0),ur(M,_.portalNode)?Ku(b)?.focus():zt(d??_.afterOutsideRef)?.focus())}})]})}function nd(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:s="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=ri}=t,p=u.useRef(void 0),g=Wi(),f=En(),h=u.useMemo(()=>({onPointerDown(m){p.current=m.pointerType},onMouseDown(m){const b=p.current,y=m.nativeEvent,x=n.select("open");if(m.button!==0||s==="click"||kl(b)&&a)return;const w=r.current.openEvent,C=w?.type,S=n.select("domReferenceElement")!==m.currentTarget,I=x&&S||!(x&&i&&(!(w&&l)||C==="click"||C==="mousedown"));if(Xi(y.target)){const R=pe(d,y,y.target);I&&b==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,R)}):n.setOpen(I,R);return}const E=m.currentTarget;g.request(()=>{const R=pe(d,y,E);I&&b==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,R)}):n.setOpen(I,R)})},onClick(m){if(s==="mousedown-only")return;const b=p.current;if(s==="mousedown"&&b){p.current=void 0;return}if(kl(b)&&a)return;const y=n.select("open"),x=r.current.openEvent,w=n.select("domReferenceElement")!==m.currentTarget,C=y&&w||!(y&&i&&(!(x&&l)||Lu(x))),S=pe(d,m.nativeEvent,m.currentTarget);C&&b==="touch"&&c>0?f.start(c,()=>{n.setOpen(!0,S)}):n.setOpen(C,S)},onKeyDown(){p.current=void 0}}),[r,s,a,n,l,i,g,f,c,d]);return u.useMemo(()=>o?{reference:h}:rt,[o,h])}function $l(e,t,n){let{reference:r,floating:o}=e;const s=Ct(t),i=zo(t),a=$o(i),l=mt(t),c=s==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(Yt(t)){case"start":f[i]-=g*(n&&c?-1:1);break;case"end":f[i]+=g*(n&&c?-1:1);break}return f}async function Wx(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:g=!1,padding:f=0}=Ft(t,e),h=Qi(f),b=a[g?p==="floating"?"reference":"floating":p],y=vo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),x=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},S=vo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-S.top+h.top)/C.y,bottom:(S.bottom-y.bottom+h.bottom)/C.y,left:(y.left-S.left+h.left)/C.x,right:(S.right-y.right+h.right)/C.x}}const Ux=50,qx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Wx},l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=$l(c,r,l),g=r,f=0;const h={};for(let m=0;m<s.length;m++){const b=s[m];if(!b)continue;const{name:y,fn:x}=b,{x:w,y:C,data:S,reset:I}=await x({x:d,y:p,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,p=C??p,h[y]={...h[y],...S},I&&f<Ux&&(f++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(c=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:p}=$l(c,g,l)),m=-1)}return{x:d,y:p,placement:g,strategy:o,middlewareData:h}},Kx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Ft(e,t)||{};if(c==null)return{};const p=Qi(d),g={x:n,y:r},f=zo(o),h=$o(f),m=await i.getDimensions(c),b=f==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[h]+s.reference[f]-g[f]-s.floating[h],S=g[f]-s.reference[f],I=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=I?I[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(I)))&&(E=a.floating[w]||s.floating[h]);const R=C/2-S/2,F=E/2-m[h]/2-1,N=fn(p[y],F),T=fn(p[x],F),_=N,q=E-m[h]-T,Y=E/2-m[h]/2+R,H=ho(_,Y,q),P=!l.arrow&&Yt(o)!=null&&Y!==H&&s.reference[h]/2-(Y<_?N:T)-m[h]/2<0,B=P?Y<_?Y-_:Y-q:0;return{[f]:g[f]+B,data:{[f]:H,centerOffset:Y-H-B,...P&&{alignmentOffset:B}},reset:P}}}),Yx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=Ft(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=mt(o),x=Ct(a),w=mt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=g||(w||!m?[bo(a)]:Jv(a)),I=h!=="none";!g&&I&&S.push(...rx(a,m,h,C));const E=[a,...S],R=await l.detectOverflow(t,b),F=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&F.push(R[y]),p){const Y=Qv(o,i,C);F.push(R[Y[0]],R[Y[1]])}if(N=[...N,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var T,_;const Y=(((T=s.flip)==null?void 0:T.index)||0)+1,H=E[Y];if(H&&(!(p==="alignment"?x!==Ct(H):!1)||N.every(z=>Ct(z.placement)===x?z.overflows[0]>0:!0)))return{data:{index:Y,overflows:N},reset:{placement:H}};let P=(_=N.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:_.placement;if(!P)switch(f){case"bestFit":{var q;const B=(q=N.filter(z=>{if(I){const te=Ct(z.placement);return te===x||te==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(te=>te>0).reduce((te,A)=>te+A,0)]).sort((z,te)=>z[1]-te[1])[0])==null?void 0:q[0];B&&(P=B);break}case"initialPlacement":P=a;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function zl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gl(e){return Xv.some(t=>e[t]>=0)}const Xx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ft(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=zl(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Gl(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=zl(i,n.floating);return{data:{escapedOffsets:a,escaped:Gl(a)}}}default:return{}}}}},rd=new Set(["left","top"]);async function Zx(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=mt(n),a=Yt(n),l=Ct(n)==="y",c=rd.has(i)?-1:1,d=s&&l?-1:1,p=Ft(t,e);let{mainAxis:g,crossAxis:f,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*d,y:g*c}:{x:g*c,y:f*d}}const Qx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Zx(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Jx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...c}=Ft(e,t),d={x:n,y:r},p=await s.detectOverflow(t,c),g=Ct(mt(o)),f=Zi(g);let h=d[f],m=d[g];if(i){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=h+p[y],C=h-p[x];h=ho(w,h,C)}if(a){const y=g==="y"?"top":"left",x=g==="y"?"bottom":"right",w=m+p[y],C=m-p[x];m=ho(w,m,C)}const b=l.fn({...t,[f]:h,[g]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[f]:i,[g]:a}}}}}},ey=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ft(e,t),d={x:n,y:r},p=Ct(o),g=Zi(p);let f=d[g],h=d[p];const m=Ft(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=g==="y"?"height":"width",C=s.reference[g]-s.floating[w]+b.mainAxis,S=s.reference[g]+s.reference[w]-b.mainAxis;f<C?f=C:f>S&&(f=S)}if(c){var y,x;const w=g==="y"?"width":"height",C=rd.has(mt(o)),S=s.reference[p]-s.floating[w]+(C&&((y=i.offset)==null?void 0:y[p])||0)+(C?0:b.crossAxis),I=s.reference[p]+s.reference[w]+(C?0:((x=i.offset)==null?void 0:x[p])||0)-(C?b.crossAxis:0);h<S?h=S:h>I&&(h=I)}return{[g]:f,[p]:h}}}},ty=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Ft(e,t),d=await i.detectOverflow(t,c),p=mt(o),g=Yt(o),f=Ct(o)==="y",{width:h,height:m}=s.floating;let b,y;p==="top"||p==="bottom"?(b=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,b=g==="end"?"top":"bottom");const x=m-d.top-d.bottom,w=h-d.left-d.right,C=fn(m-d[b],x),S=fn(h-d[y],w),I=!t.middlewareData.shift;let E=C,R=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),I&&!g){const N=gt(d.left,0),T=gt(d.right,0),_=gt(d.top,0),q=gt(d.bottom,0);f?R=h-2*(N!==0||T!==0?N+T:gt(d.left,d.right)):E=m-2*(_!==0||q!==0?_+q:gt(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:E});const F=await i.getDimensions(a.floating);return h!==F.width||m!==F.height?{reset:{rects:!0}}:{}}}};function od(e){const t=ht(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Be(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=mo(n)!==s||mo(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ra(e){return Fe(e)?e:e.contextElement}function Gn(e){const t=ra(e);if(!Be(t))return Dt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=od(t);let i=(s?mo(n.width):n.width)/r,a=(s?mo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ny=Dt(0);function sd(e){const t=Ze(e);return!Vo()||!t.visualViewport?ny:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ry(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function In(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ra(e);let i=Dt(1);t&&(r?Fe(r)&&(i=Gn(r)):i=Gn(e));const a=ry(s,n,r)?sd(s):Dt(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,p=o.height/i.y;if(s){const g=Ze(s),f=r&&Fe(r)?Ze(r):r;let h=g,m=ii(h);for(;m&&r&&f!==h;){const b=Gn(m),y=m.getBoundingClientRect(),x=ht(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,C=y.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,p*=b.y,l+=w,c+=C,h=Ze(m),m=ii(h)}}return vo({width:d,height:p,x:l,y:c})}function Bo(e,t){const n=Lo(e).scrollLeft;return t?t.left+n:In(Lt(e)).left+n}function id(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function oy(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Lt(r),a=t?Fo(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Dt(1);const d=Dt(0),p=Be(r);if((p||!p&&!s)&&((hn(r)!=="body"||bn(i))&&(l=Lo(r)),p)){const f=In(r);c=Gn(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const g=i&&!p&&!s?id(i,l):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+g.x,y:n.y*c.y-l.scrollTop*c.y+d.y+g.y}}function sy(e){return Array.from(e.getClientRects())}function iy(e){const t=Lt(e),n=Lo(e),r=e.ownerDocument.body,o=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Bo(e);const a=-n.scrollTop;return ht(r).direction==="rtl"&&(i+=gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Hl=25;function ay(e,t){const n=Ze(e),r=Lt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=Vo();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Bo(r);if(c<=0){const d=r.ownerDocument,p=d.body,g=getComputedStyle(p),f=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,h=Math.abs(r.clientWidth-p.clientWidth-f);h<=Hl&&(s-=h)}else c<=Hl&&(s+=c);return{width:s,height:i,x:a,y:l}}function ly(e,t){const n=In(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Be(e)?Gn(e):Dt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Bl(e,t,n){let r;if(t==="viewport")r=ay(e,n);else if(t==="document")r=iy(Lt(e));else if(Fe(t))r=ly(t,n);else{const o=sd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vo(r)}function ad(e,t){const n=qt(e);return n===t||!Fe(n)||Wt(n)?!1:ht(n).position==="fixed"||ad(n,t)}function cy(e,t){const n=t.get(e);if(n)return n;let r=ln(e,[],!1).filter(a=>Fe(a)&&hn(a)!=="body"),o=null;const s=ht(e).position==="fixed";let i=s?qt(e):e;for(;Fe(i)&&!Wt(i);){const a=ht(i),l=qi(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||bn(i)&&!l&&ad(e,i))?r=r.filter(d=>d!==i):o=a,i=qt(i)}return t.set(e,r),r}function uy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Fo(t)?[]:cy(t,this._c):[].concat(n),r],a=Bl(t,i[0],o);let l=a.top,c=a.right,d=a.bottom,p=a.left;for(let g=1;g<i.length;g++){const f=Bl(t,i[g],o);l=gt(f.top,l),c=fn(f.right,c),d=fn(f.bottom,d),p=gt(f.left,p)}return{width:c-p,height:d-l,x:p,y:l}}function dy(e){const{width:t,height:n}=od(e);return{width:t,height:n}}function fy(e,t,n){const r=Be(t),o=Lt(t),s=n==="fixed",i=In(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Dt(0);function c(){l.x=Bo(o)}if(r||!r&&!s)if((hn(t)!=="body"||bn(o))&&(a=Lo(t)),r){const f=In(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();s&&!r&&o&&c();const d=o&&!r&&!s?id(o,a):Dt(0),p=i.left+a.scrollLeft-l.x-d.x,g=i.top+a.scrollTop-l.y-d.y;return{x:p,y:g,width:i.width,height:i.height}}function Ns(e){return ht(e).position==="static"}function Wl(e,t){if(!Be(e)||ht(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lt(e)===n&&(n=n.ownerDocument.body),n}function ld(e,t){const n=Ze(e);if(Fo(e))return n;if(!Be(e)){let o=qt(e);for(;o&&!Wt(o);){if(Fe(o)&&!Ns(o))return o;o=qt(o)}return n}let r=Wl(e,t);for(;r&&Dv(r)&&Ns(r);)r=Wl(r,t);return r&&Wt(r)&&Ns(r)&&!qi(r)?n:r||Lv(e)||n}const py=async function(e){const t=this.getOffsetParent||ld,n=this.getDimensions,r=await n(e.floating);return{reference:fy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gy(e){return ht(e).direction==="rtl"}const my={convertOffsetParentRelativeRectToViewportRelativeRect:oy,getDocumentElement:Lt,getClippingRect:uy,getOffsetParent:ld,getElementRects:py,getClientRects:sy,getDimensions:dy,getScale:Gn,isElement:Fe,isRTL:gy};function cd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hy(e,t){let n=null,r;const o=Lt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:p,width:g,height:f}=c;if(a||t(),!g||!f)return;const h=Ln(p),m=Ln(o.clientWidth-(d+g)),b=Ln(o.clientHeight-(p+f)),y=Ln(d),w={rootMargin:-h+"px "+-m+"px "+-b+"px "+-y+"px",threshold:gt(0,fn(1,l))||1};let C=!0;function S(I){const E=I[0].intersectionRatio;if(E!==l){if(!C)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!cd(c,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function gi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ra(e),d=o||s?[...c?ln(c):[],...t?ln(t):[]]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const p=c&&a?hy(c,n):null;let g=-1,f=null;i&&(f=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!l&&f.observe(c),t&&f.observe(t));let h,m=l?In(e):null;l&&b();function b(){const y=In(e);m&&!cd(m,y)&&n(),m=y,h=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),p?.(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const by=Qx,vy=Jx,xy=Yx,yy=ty,Cy=Xx,Ul=Kx,wy=ey,Sy=(e,t,n)=>{const r=new Map,o={platform:my,...n},s={...o.platform,_c:r};return qx(e,t,{...o,platform:s})};var Ry=typeof document<"u",Ey=function(){},ao=Ry?Te.useLayoutEffect:Ey;function Ro(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ro(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ro(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ud(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ql(e,t){const n=ud(e);return Math.round(t*n)/n}function Ps(e){const t=u.useRef(e);return ao(()=>{t.current=e}),t}function dd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,p]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,f]=u.useState(r);Ro(g,r)||f(r);const[h,m]=u.useState(null),[b,y]=u.useState(null),x=u.useCallback(z=>{z!==I.current&&(I.current=z,m(z))},[]),w=u.useCallback(z=>{z!==E.current&&(E.current=z,y(z))},[]),C=s||h,S=i||b,I=u.useRef(null),E=u.useRef(null),R=u.useRef(d),F=l!=null,N=Ps(l),T=Ps(o),_=Ps(c),q=u.useCallback(()=>{if(!I.current||!E.current)return;const z={placement:t,strategy:n,middleware:g};T.current&&(z.platform=T.current),Sy(I.current,E.current,z).then(te=>{const A={...te,isPositioned:_.current!==!1};Y.current&&!Ro(R.current,A)&&(R.current=A,gn.flushSync(()=>{p(A)}))})},[g,t,n,T,_]);ao(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(z=>({...z,isPositioned:!1})))},[c]);const Y=u.useRef(!1);ao(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ao(()=>{if(C&&(I.current=C),S&&(E.current=S),C&&S){if(N.current)return N.current(C,S,q);q()}},[C,S,q,N,F]);const H=u.useMemo(()=>({reference:I,floating:E,setReference:x,setFloating:w}),[x,w]),P=u.useMemo(()=>({reference:C,floating:S}),[C,S]),B=u.useMemo(()=>{const z={position:n,left:0,top:0};if(!P.floating)return z;const te=ql(P.floating,d.x),A=ql(P.floating,d.y);return a?{...z,transform:"translate("+te+"px, "+A+"px)",...ud(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:A}},[n,a,P.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:q,refs:H,elements:P,floatingStyles:B}),[d,q,H,P,B])}const Iy=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ul({element:r.current,padding:o}).fn(n):{}:r?Ul({element:r,padding:o}).fn(n):{}}}},fd=(e,t)=>{const n=by(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{const n=vy(e);return{name:n.name,fn:n.fn,options:[e,t]}},gd=(e,t)=>({fn:wy(e).fn,options:[e,t]}),md=(e,t)=>{const n=xy(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=(e,t)=>{const n=yy(e);return{name:n.name,fn:n.fn,options:[e,t]}},bd=(e,t)=>{const n=Cy(e);return{name:n.name,fn:n.fn,options:[e,t]}},ky=(e,t)=>{const n=Iy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ny={intentional:"onClick",sloppy:"onPointerDown"};function Py(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Oy(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:l}=n.context,{enabled:c=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:f=!1,referencePressEvent:h="sloppy",ancestorScroll:m=!1,bubbles:b,externalTree:y}=t,x=Ho(y),w=re(typeof p=="function"?p:()=>!1),C=typeof p=="function"?w:p,S=u.useRef(!1),{escapeKey:I,outsidePress:E}=Py(b),R=u.useRef(null),F=En(),N=En(),T=re(()=>{N.clear(),l.current.insideReactTree=!1}),_=u.useRef(!1),q=u.useRef(""),Y=re(O=>{q.current=O.pointerType}),H=re(()=>{const O=q.current,M=O==="pen"||!O?"mouse":O,G=typeof g=="function"?g():g;return typeof G=="string"?G:G[M]}),P=re(O=>{if(!r||!c||!d||O.key!=="Escape"||_.current)return;const M=l.current.floatingContext?.nodeId,G=x?$n(x.nodesRef.current,M):[];if(!I&&G.length>0){let W=!0;if(G.forEach(U=>{U.context?.open&&!U.context.dataRef.current.__escapeKeyBubbles&&(W=!1)}),!W)return}const fe=Yv(O)?O.nativeEvent:O,k=pe(Su,fe);n.setOpen(!1,k),!I&&!k.isPropagationAllowed&&O.stopPropagation()}),B=re(O=>{const M=H();return M==="intentional"&&O.type!=="click"||M==="sloppy"&&O.type==="click"}),z=re(()=>{l.current.insideReactTree=!0,N.start(0,T)}),te=re((O,M=!1)=>{if(B(O)){T();return}if(l.current.insideReactTree){T();return}if(H()==="intentional"&&M||typeof C=="function"&&!C(O))return;const G=dt(O),fe=`[${So("inert")}]`,k=Ge(n.select("floatingElement")).querySelectorAll(fe),W=n.context.triggerElements;if(G&&(W.hasElement(G)||W.hasMatchingElement(Q=>Ie(Q,G))))return;let U=Fe(G)?G:null;for(;U&&!Wt(U);){const Q=qt(U);if(Wt(Q)||!Fe(Q))break;U=Q}if(k.length&&Fe(G)&&!Kv(G)&&!Ie(G,n.select("floatingElement"))&&Array.from(k).every(Q=>!Ie(U,Q)))return;if(Be(G)&&!("touches"in O)){const Q=Wt(G),ie=ht(G),xe=/auto|scroll/,We=Q||xe.test(ie.overflowX),st=Q||xe.test(ie.overflowY),Le=We&&G.clientWidth>0&&G.scrollWidth>G.clientWidth,Ne=st&&G.clientHeight>0&&G.scrollHeight>G.clientHeight,$e=ie.direction==="rtl",it=Ne&&($e?O.offsetX<=G.offsetWidth-G.clientWidth:O.offsetX>G.clientWidth),nt=Le&&O.offsetY>G.clientHeight;if(it||nt)return}const D=l.current.floatingContext?.nodeId,K=x&&$n(x.nodesRef.current,D).some(Q=>Nt(O,Q.context?.elements.floating));if(Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement"))||K)return;const j=x?$n(x.nodesRef.current,D):[];if(j.length>0){let Q=!0;if(j.forEach(ie=>{ie.context?.open&&!ie.context.dataRef.current.__outsidePressBubbles&&(Q=!1)}),!Q)return}n.setOpen(!1,pe(Gi,O)),T()}),A=re(O=>{H()!=="sloppy"||O.pointerType==="touch"||!n.select("open")||!c||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement"))||te(O)}),Re=re(O=>{if(H()!=="sloppy"||!n.select("open")||!c||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement")))return;const M=O.touches[0];M&&(R.current={startTime:Date.now(),startX:M.clientX,startY:M.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{R.current&&(R.current.dismissOnTouchEnd=!1,R.current.dismissOnMouseDown=!1)}))}),ge=re(O=>{const M=dt(O);function G(){Re(O),M?.removeEventListener(O.type,G)}M?.addEventListener(O.type,G)}),Ce=re(O=>{const M=S.current;if(S.current=!1,F.clear(),O.type==="mousedown"&&R.current&&!R.current.dismissOnMouseDown)return;const G=dt(O);function fe(){O.type==="pointerdown"?A(O):te(O,M),G?.removeEventListener(O.type,fe)}G?.addEventListener(O.type,fe)}),ae=re(O=>{if(H()!=="sloppy"||!R.current||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement")))return;const M=O.touches[0];if(!M)return;const G=Math.abs(M.clientX-R.current.startX),fe=Math.abs(M.clientY-R.current.startY),k=Math.sqrt(G*G+fe*fe);k>5&&(R.current.dismissOnTouchEnd=!0),k>10&&(te(O),F.clear(),R.current=null)}),le=re(O=>{const M=dt(O);function G(){ae(O),M?.removeEventListener(O.type,G)}M?.addEventListener(O.type,G)}),ve=re(O=>{H()!=="sloppy"||!R.current||Nt(O,n.select("floatingElement"))||Nt(O,n.select("domReferenceElement"))||(R.current.dismissOnTouchEnd&&te(O),F.clear(),R.current=null)}),Ee=re(O=>{const M=dt(O);function G(){ve(O),M?.removeEventListener(O.type,G)}M?.addEventListener(O.type,G)});u.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=I,l.current.__outsidePressBubbles=E;const O=new Un;function M(U){n.setOpen(!1,pe(xt,U))}function G(){O.clear(),_.current=!0}function fe(){O.start(Vo()?5:0,()=>{_.current=!1})}const k=Ge(o);k.addEventListener("pointerdown",Y,!0),d&&(k.addEventListener("keydown",P),k.addEventListener("compositionstart",G),k.addEventListener("compositionend",fe)),C&&(k.addEventListener("click",Ce,!0),k.addEventListener("pointerdown",Ce,!0),k.addEventListener("touchstart",ge,!0),k.addEventListener("touchmove",le,!0),k.addEventListener("touchend",Ee,!0),k.addEventListener("mousedown",Ce,!0));let W=[];return m&&(Fe(i)&&(W=ln(i)),Fe(o)&&(W=W.concat(ln(o))),!Fe(s)&&s&&s.contextElement&&(W=W.concat(ln(s.contextElement)))),W=W.filter(U=>U!==k.defaultView?.visualViewport),W.forEach(U=>{U.addEventListener("scroll",M,{passive:!0})}),()=>{k.removeEventListener("pointerdown",Y,!0),d&&(k.removeEventListener("keydown",P),k.removeEventListener("compositionstart",G),k.removeEventListener("compositionend",fe)),C&&(k.removeEventListener("click",Ce,!0),k.removeEventListener("pointerdown",Ce,!0),k.removeEventListener("touchstart",ge,!0),k.removeEventListener("touchmove",le,!0),k.removeEventListener("touchend",Ee,!0),k.removeEventListener("mousedown",Ce,!0)),W.forEach(U=>{U.removeEventListener("scroll",M)}),O.clear(),S.current=!1}},[l,o,s,i,d,C,r,a,m,c,I,E,P,te,Ce,A,ge,le,Ee,Y,n]),u.useEffect(T,[C,T]);const ke=u.useMemo(()=>({onKeyDown:P,...f&&{[Ny[h]]:O=>{n.setOpen(!1,pe(ri,O.nativeEvent))},...h!=="intentional"&&{onClick(O){n.setOpen(!1,pe(ri,O.nativeEvent))}}}}),[P,n,f,h]),X=re(O=>{const M=dt(O.nativeEvent);!Ie(n.select("floatingElement"),M)||O.button!==0||(S.current=!0)}),me=re(O=>{!r||!c||O.button!==0||(S.current=!0)}),we=u.useMemo(()=>({onKeyDown:P,onPointerDown:X,onMouseDown:X,onMouseUp:X,onClickCapture:z,onMouseDownCapture(O){z(),me(O)},onPointerDownCapture(O){z(),me(O)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[P,X,z,me]);return u.useMemo(()=>c?{reference:ke,floating:we,trigger:ke}:{},[c,ke,we])}var _y=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|