1import{a as e}from"./chunk-BEqpzyXh.js";import{n as t}from"./createLucideIcon-CEDU0v2w.js";import{t as n}from"./jsx-runtime-DOlcsXOY.js";import{t as r}from"./utils-DG_tBWRI.js";import{a as i,i as a,n as o}from"./button-D1RyJpAF.js";import{n as s,t as c}from"./dist-CW0zX2Ne.js";import{a as l,c as u,f as d,i as f,l as p,m,n as h,o as g,r as _,s as v,t as y,u as b}from"./es2015-cHgCJkoH.js";import{a as x,i as S,n as C,r as w,t as ee}from"./dist-FYLSNISn.js";var T=e(t(),1),E=n();function D(e){let t=e+`CollectionProvider`,[n,r]=m(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:n}=e,r=T.useRef(null),i=T.useRef(new Map).current;return(0,E.jsx)(a,{scope:t,itemMap:i,collectionRef:r,children:n})};c.displayName=t;let l=e+`CollectionSlot`,u=o(l),d=T.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,E.jsx)(u,{ref:i(t,s(l,n).collectionRef),children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,h=o(f),g=T.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,o=T.useRef(null),c=i(t,o),l=s(f,n);return T.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,E.jsx)(h,{[p]:``,ref:c,children:r})});g.displayName=f;function _(t){let n=s(e+`CollectionConsumer`,t);return T.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:c,Slot:d,ItemSlot:g},_,r]}var O=T.createContext(void 0);function k(e){let t=T.useContext(O);return e||t||`ltr`}var A=`rovingFocusGroup.onEntryFocus`,j={bubbles:!1,cancelable:!0},M=`RovingFocusGroup`,[N,P,te]=D(M),[F,I]=m(M,[te]),[L,ne]=F(M),R=T.forwardRef((e,t)=>(0,E.jsx)(N.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,E.jsx)(N.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,E.jsx)(re,{...e,ref:t})})}));R.displayName=M;var re=T.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...m}=e,h=T.useRef(null),g=i(t,h),_=k(o),[y,x]=b({prop:s,defaultProp:l??null,onChange:u,caller:M}),[S,C]=T.useState(!1),w=v(f),ee=P(n),D=T.useRef(!1),[O,N]=T.useState(0);return T.useEffect(()=>{let e=h.current;if(e)return e.addEventListener(A,w),()=>e.removeEventListener(A,w)},[w]),(0,E.jsx)(L,{scope:n,orientation:r,dir:_,loop:a,currentTabStopId:y,onItemFocus:T.useCallback(e=>x(e),[x]),onItemShiftTab:T.useCallback(()=>C(!0),[]),onFocusableItemAdd:T.useCallback(()=>N(e=>e+1),[]),onFocusableItemRemove:T.useCallback(()=>N(e=>e-1),[]),children:(0,E.jsx)(c.div,{tabIndex:S||O===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:`none`,...e.style},onMouseDown:d(e.onMouseDown,()=>{D.current=!0}),onFocus:d(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(A,j);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=ee().filter(e=>e.focusable);ce([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),p)}}D.current=!1}),onBlur:d(e.onBlur,()=>C(!1))})})}),z=`RovingFocusGroupItem`,ie=T.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=u(),f=a||l,p=ne(z,n),m=p.currentTabStopId===f,h=P(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p;return T.useEffect(()=>{if(r)return g(),()=>_()},[r,g,_]),(0,E.jsx)(N.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,E.jsx)(c.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...s,ref:t,onMouseDown:d(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:d(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:d(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=se(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?le(n,r+1):n.slice(r+1)}setTimeout(()=>ce(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:v!=null}):o})})});
vendor: 13,740 bytes, line 1
1ie.displayName=z;var ae={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function oe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function se(e,t,n){let r=oe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return ae[r]}function ce(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function le(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ue=R,de=ie,fe=[`Enter`,` `],pe=[`ArrowDown`,`PageUp`,`Home`],me=[`ArrowUp`,`PageDown`,`End`],he=[...pe,...me],ge={ltr:[...fe,`ArrowRight`],rtl:[...fe,`ArrowLeft`]},_e={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,ve,ye]=D(B),[H,be]=m(B,[ye,x,I]),U=x(),xe=I(),[Se,W]=H(B),[Ce,G]=H(B),we=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=U(t),[c,l]=T.useState(null),u=T.useRef(!1),d=v(a),f=k(i);return T.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,E.jsx)(S,{...s,children:(0,E.jsx)(Se,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,E.jsx)(Ce,{scope:t,onClose:T.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};we.displayName=B;var Te=`MenuAnchor`,Ee=T.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,E.jsx)(ee,{...i,...r,ref:t})});Ee.displayName=Te;var De=`MenuPortal`,[Oe,ke]=H(De,{forceMount:void 0}),Ae=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(De,t);return(0,E.jsx)(Oe,{scope:t,forceMount:n,children:(0,E.jsx)(p,{present:n||a.open,children:(0,E.jsx)(f,{asChild:!0,container:i,children:r})})})};Ae.displayName=De;var K=`MenuContent`,[je,Me]=H(K),Ne=T.forwardRef((e,t)=>{let n=ke(K,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(K,e.__scopeMenu),o=G(K,e.__scopeMenu);return(0,E.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,E.jsx)(p,{present:r||a.open,children:(0,E.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,E.jsx)(Pe,{...i,ref:t}):(0,E.jsx)(Fe,{...i,ref:t})})})})}),Pe=T.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu),r=T.useRef(null),a=i(t,r);return T.useEffect(()=>{let e=r.current;if(e)return y(e)},[]),(0,E.jsx)(Le,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:d(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Fe=T.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu);return(0,E.jsx)(Le,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ie=o(`MenuContent.ScrollLock`),Le=T.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:y,disableOutsideScroll:b,...x}=e,S=W(K,n),C=G(K,n),ee=U(n),D=xe(n),O=ve(n),[k,A]=T.useState(null),j=T.useRef(null),M=i(t,j,S.onContentChange),N=T.useRef(0),P=T.useRef(``),te=T.useRef(0),F=T.useRef(null),I=T.useRef(`right`),L=T.useRef(0),ne=b?h:T.Fragment,R=b?{as:Ie,allowPinchZoom:!0}:void 0,re=e=>{let t=P.current+e,n=O().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=_t(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){P.current=t,window.clearTimeout(N.current),t!==``&&(N.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};T.useEffect(()=>()=>window.clearTimeout(N.current),[]),_();let z=T.useCallback(e=>I.current===F.current?.side&&yt(e,F.current?.area),[]);return(0,E.jsx)(je,{scope:n,searchRef:P,onItemEnter:T.useCallback(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:T.useCallback(e=>{z(e)||(j.current?.focus(),A(null))},[z]),onTriggerLeave:T.useCallback(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:te,onPointerGraceIntentChange:T.useCallback(e=>{F.current=e},[]),children:(0,E.jsx)(ne,{...R,children:(0,E.jsx)(l,{asChild:!0,trapped:a,onMountAutoFocus:d(o,e=>{e.preventDefault(),j.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,E.jsx)(g,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:y,children:(0,E.jsx)(ue,{asChild:!0,...D,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:k,onCurrentTabStopIdChange:A,onEntryFocus:d(u,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,E.jsx)(w,{role:`menu`,"aria-orientation":`vertical`,"data-state":pt(S.open),"data-radix-menu-content":``,dir:C.dir,...ee,...x,ref:M,style:{outline:`none`,...x.style},onKeyDown:d(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=j.current;if(e.target!==i||!he.includes(e.key))return;e.preventDefault();let a=O().filter(e=>!e.disabled).map(e=>e.ref.current);me.includes(e.key)&&a.reverse(),ht(a)}),onBlur:d(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(N.current),P.current=``)}),onPointerMove:d(e.onPointerMove,Z(e=>{let t=e.target,n=L.current!==e.clientX;e.currentTarget.contains(t)&&n&&(I.current=e.clientX>L.current?`right`:`left`,L.current=e.clientX)}))})})})})})})});Ne.displayName=K;var Re=`MenuGroup`,ze=T.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,E.jsx)(c.div,{role:`group`,...r,ref:t})});ze.displayName=Re;var Be=`MenuLabel`,Ve=T.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,E.jsx)(c.div,{...r,ref:t})});Ve.displayName=Be;var q=`MenuItem`,He=`menu.itemSelect`,J=T.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=T.useRef(null),c=G(q,e.__scopeMenu),l=Me(q,e.__scopeMenu),u=i(t,o),f=T.useRef(!1),p=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(He,{bubbles:!0,cancelable:!0});e.addEventListener(He,e=>r?.(e),{once:!0}),s(e,t),t.defaultPrevented?f.current=!1:c.onClose()}};return(0,E.jsx)(Ue,{...a,ref:u,disabled:n,onClick:d(e.onClick,p),onPointerDown:t=>{e.onPointerDown?.(t),f.current=!0},onPointerUp:d(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:d(e.onKeyDown,e=>{let t=l.searchRef.current!==``;n||t&&e.key===` `||fe.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});J.displayName=q;var Ue=T.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,s=Me(q,n),l=xe(n),u=T.useRef(null),f=i(t,u),[p,m]=T.useState(!1),[h,g]=T.useState(``);return T.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[o.children]),(0,E.jsx)(V.ItemSlot,{scope:n,disabled:r,textValue:a??h,children:(0,E.jsx)(de,{asChild:!0,...l,focusable:!r,children:(0,E.jsx)(c.div,{role:`menuitem`,"data-highlighted":p?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:f,onPointerMove:d(e.onPointerMove,Z(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:d(e.onPointerLeave,Z(e=>s.onItemLeave(e))),onFocus:d(e.onFocus,()=>m(!0)),onBlur:d(e.onBlur,()=>m(!1))})})})}),We=`MenuCheckboxItem`,Ge=T.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,E.jsx)($e,{scope:e.__scopeMenu,checked:n,children:(0,E.jsx)(J,{role:`menuitemcheckbox`,"aria-checked":X(n)?`mixed`:n,...i,ref:t,"data-state":mt(n),onSelect:d(i.onSelect,()=>r?.(X(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ge.displayName=We;var Ke=`MenuRadioGroup`,[qe,Je]=H(Ke,{value:void 0,onValueChange:()=>{}}),Ye=T.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=v(r);return(0,E.jsx)(qe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,E.jsx)(ze,{...i,ref:t})})});Ye.displayName=Ke;var Xe=`MenuRadioItem`,Ze=T.forwardRef((e,t)=>{let{value:n,...r}=e,i=Je(Xe,e.__scopeMenu),a=n===i.value;return(0,E.jsx)($e,{scope:e.__scopeMenu,checked:a,children:(0,E.jsx)(J,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":mt(a),onSelect:d(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ze.displayName=Xe;var Qe=`MenuItemIndicator`,[$e,et]=H(Qe,{checked:!1}),tt=T.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=et(Qe,n);return(0,E.jsx)(p,{present:r||X(a.checked)||a.checked===!0,children:(0,E.jsx)(c.span,{...i,ref:t,"data-state":mt(a.checked)})})});tt.displayName=Qe;var nt=`MenuSeparator`,rt=T.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,E.jsx)(c.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});rt.displayName=nt;var it=`MenuArrow`,at=T.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,E.jsx)(C,{...i,...r,ref:t})});at.displayName=it;var ot=`MenuSub`,[st,ct]=H(ot),lt=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=W(ot,t),o=U(t),[s,c]=T.useState(null),[l,d]=T.useState(null),f=v(i);return T.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,E.jsx)(S,{...o,children:(0,E.jsx)(Se,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:d,children:(0,E.jsx)(st,{scope:t,contentId:u(),triggerId:u(),trigger:s,onTriggerChange:c,children:n})})})};lt.displayName=ot;var Y=`MenuSubTrigger`,ut=T.forwardRef((e,t)=>{let n=W(Y,e.__scopeMenu),r=G(Y,e.__scopeMenu),i=ct(Y,e.__scopeMenu),o=Me(Y,e.__scopeMenu),s=T.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},f=T.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return T.useEffect(()=>f,[f]),T.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),(0,E.jsx)(Ee,{asChild:!0,...u,children:(0,E.jsx)(Ue,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":pt(n.open),...e,ref:a(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:d(e.onPointerMove,Z(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:d(e.onPointerLeave,Z(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:d(e.onKeyDown,t=>{let i=o.searchRef.current!==``;e.disabled||i&&t.key===` `||ge[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});ut.displayName=Y;var dt=`MenuSubContent`,ft=T.forwardRef((e,t)=>{let n=ke(K,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=W(K,e.__scopeMenu),s=G(K,e.__scopeMenu),c=ct(dt,e.__scopeMenu),l=T.useRef(null),u=i(t,l);return(0,E.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,E.jsx)(p,{present:r||o.open,children:(0,E.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,E.jsx)(Le,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:`start`,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:d(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:d(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:d(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=_e[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});ft.displayName=dt;function pt(e){return e?`open`:`closed`}function X(e){return e===`indeterminate`}function mt(e){return X(e)?`indeterminate`:e?`checked`:`unchecked`}function ht(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _t(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=gt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function vt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function yt(e,t){return t?vt({x:e.clientX,y:e.clientY},t):!1}function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}var bt=we,xt=Ee,St=Ae,Ct=Ne,wt=ze,Tt=Ve,Et=J,Dt=Ge,Ot=Ye,kt=Ze,At=tt,jt=rt,Mt=at,Nt=ut,Pt=ft,Q=`DropdownMenu`,[Ft,It]=m(Q,[be]),$=be(),[Lt,Rt]=Ft(Q),zt=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$(t),l=T.useRef(null),[d,f]=b({prop:i,defaultProp:a??!1,onChange:o,caller:Q});return(0,E.jsx)(Lt,{scope:t,triggerId:u(),triggerRef:l,contentId:u(),open:d,onOpenChange:f,onOpenToggle:T.useCallback(()=>f(e=>!e),[f]),modal:s,children:(0,E.jsx)(bt,{...c,open:d,onOpenChange:f,dir:r,modal:s,children:n})})};zt.displayName=Q;var Bt=`DropdownMenuTrigger`,Vt=T.forwardRef((e,t)=>
1{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=Rt(Bt,n),s=$(n);return(0,E.jsx)(xt,{asChild:!0,...s,children:(0,E.jsx)(c.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:a(t,o.triggerRef),onPointerDown:d(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:d(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Vt.displayName=Bt;var Ht=`DropdownMenuPortal`,Ut=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$(t);return(0,E.jsx)(St,{...r,...n})};Ut.displayName=Ht;var Wt=`DropdownMenuContent`,Gt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Rt(Wt,n),a=$(n),o=T.useRef(!1);return(0,E.jsx)(Ct,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:d(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:d(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Gt.displayName=Wt;var Kt=`DropdownMenuGroup`,qt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(wt,{...i,...r,ref:t})});qt.displayName=Kt;var Jt=`DropdownMenuLabel`,Yt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Tt,{...i,...r,ref:t})});Yt.displayName=Jt;var Xt=`DropdownMenuItem`,Zt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Et,{...i,...r,ref:t})});Zt.displayName=Xt;var Qt=`DropdownMenuCheckboxItem`,$t=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Dt,{...i,...r,ref:t})});$t.displayName=Qt;var en=`DropdownMenuRadioGroup`,tn=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Ot,{...i,...r,ref:t})});tn.displayName=en;var nn=`DropdownMenuRadioItem`,rn=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(kt,{...i,...r,ref:t})});rn.displayName=nn;var an=`DropdownMenuItemIndicator`,on=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(At,{...i,...r,ref:t})});on.displayName=an;var sn=`DropdownMenuSeparator`,cn=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(jt,{...i,...r,ref:t})});cn.displayName=sn;var ln=`DropdownMenuArrow`,un=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Mt,{...i,...r,ref:t})});un.displayName=ln;var dn=`DropdownMenuSubTrigger`,fn=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Nt,{...i,...r,ref:t})});fn.displayName=dn;var pn=`DropdownMenuSubContent`,mn=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,E.jsx)(Pt,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});mn.displayName=pn;var hn=zt,gn=Vt,_n=Ut,vn=Gt,yn=Yt,bn=Zt,xn=cn;function Sn({...e}){return(0,E.jsx)(hn,{"data-slot":`dropdown-menu`,...e})}function Cn({...e}){return(0,E.jsx)(gn,{"data-slot":`dropdown-menu-trigger`,...e})}function wn({...e}){return(0,E.jsx)(_n,{"data-slot":`dropdown-menu-portal`,...e})}function Tn({className:e,sideOffset:t=6,...n}){return(0,E.jsx)(wn,{children:(0,E.jsx)(vn,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:r(`z-50 min-w-[12rem] overflow-hidden rounded-lg border border-surface-border bg-white p-1 shadow-[0_10px_30px_rgba(23,20,18,0.08)] outline-none`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...n})})}function En({className:e,inset:t,...n}){return(0,E.jsx)(bn,{"data-slot":`dropdown-menu-item`,"data-inset":t||void 0,className:r(`flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-2 text-sm text-text-secondary outline-none transition-colors`,`hover:bg-surface-quiet hover:text-text-primary`,`focus:bg-surface-quiet focus:text-text-primary`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[inset]:pl-8`,`[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,e),...n})}function Dn({className:e,inset:t,...n}){return(0,E.jsx)(yn,{"data-slot":`dropdown-menu-label`,"data-inset":t||void 0,className:r(`px-2.5 py-1.5 text-xs font-semibold text-text-tertiary uppercase tracking-wider`,`data-[inset]:pl-8`,e),...n})}function On({className:e,...t}){return(0,E.jsx)(xn,{"data-slot":`dropdown-menu-separator`,className:r(`-mx-1 my-1 h-px bg-surface-border`,e),...t})}export{On as a,Dn as i,Tn as n,Cn as o,En as r,Sn as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.