try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bfce8b3d-8d18-4a31-8bb6-559958aaf147",e._sentryDebugIdIdentifier="sentry-dbid-bfce8b3d-8d18-4a31-8bb6-559958aaf147")}catch(e){}{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:anthropic-apps":!0})}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[94882],{0x43bc2151:(e,t,r)=>{r.d(t,{jH:()=>a});var n=r(0xfc89b4a4);r(0x22102fd88);var o=n.createContext(void 0);function a(e){let t=n.useContext(o);return e||t||"ltr"}},0xff9ead2a:(e,t,r)=>{r.d(t,{RG:()=>b,bL:()=>A,q7:()=>E});var n=r(0xfc89b4a4),o=r(0x17a935e7f),a=r(0x1c7182bed),l=r(0x1f5d8ad93),i=r(0x69c4a1b),u=r(0x1311a99af),s=r(0x11e141ae5),d=r(0x1752c78f7),c=r(0x23f526c7f),f=r(0x43bc2151),p=r(0x22102fd88),h="rovingFocusGroup.onEntryFocus",v={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[g,x,w]=(0,a.N)(m),[y,b]=(0,i.A)(m,[w]),[R,C]=y(m),M=n.forwardRef((e,t)=>(0,p.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(j,{...e,ref:t})})}));M.displayName=m;var j=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:a,loop:i=!1,dir:u,currentTabStopId:g,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:y,onEntryFocus:b,preventScrollOnEntryFocus:C=!1,...M}=e,j=n.useRef(null),D=(0,l.s)(t,j),k=(0,f.jH)(u),[_,A]=(0,c.i)({prop:g,defaultProp:null!=w?w:null,onChange:y,caller:m}),[E,T]=n.useState(!1),P=(0,d.c)(b),O=x(r),S=n.useRef(!1),[N,L]=n.useState(0);return n.useEffect(()=>{let e=j.current;if(e)return e.addEventListener(h,P),()=>e.removeEventListener(h,P)},[P]),(0,p.jsx)(R,{scope:r,orientation:a,dir:k,loop:i,currentTabStopId:_,onItemFocus:n.useCallback(e=>A(e),[A]),onItemShiftTab:n.useCallback(()=>T(!0),[]),onFocusableItemAdd:n.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>L(e=>e-1),[]),children:(0,p.jsx)(s.sG.div,{tabIndex:E||0===N?-1:0,"data-orientation":a,...M,ref:D,style:{outline:"none",...e.style},onMouseDown:(0,o.m)(e.onMouseDown,()=>{S.current=!0}),onFocus:(0,o.m)(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!E){let t=new CustomEvent(h,v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=O().filter(e=>e.focusable);I([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),C)}}S.current=!1}),onBlur:(0,o.m)(e.onBlur,()=>T(!1))})})}),D="RovingFocusGroupItem",k=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:a=!0,active:l=!1,tabStopId:i,children:d,...c}=e,f=(0,u.B)(),h=i||f,v=C(D,r),m=v.currentTabStopId===h,w=x(r),{onFocusableItemAdd:y,onFocusableItemRemove:b,currentTabStopId:R}=v;return n.useEffect(()=>{if(a)return y(),()=>b()},[a,y,b]),(0,p.jsx)(g.ItemSlot,{scope:r,id:h,focusable:a,active:l,children:(0,p.jsx)(s.sG.span,{tabIndex:m?0:-1,"data-orientation":v.orientation,...c,ref:t,onMouseDown:(0,o.m)(e.onMouseDown,e=>{a?v.onItemFocus(h):e.preventDefault()}),onFocus:(0,o.m)(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:(0,o.m)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let o=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return _[o]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=w().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=v.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>I(r))}}),children:"function"==typeof d?d({isCurrentTabStop:m,hasTabStop:null!=R}):d})})});k.displayName=D;var _={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var A=M,E=k},0x1c7182bed:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function o(e,t){var r=n(e,t,"get");return r.get?r.get.call(e):r.value}function a(e,t,r){var o=n(e,t,"set");if(o.set)o.set.call(e,r);else{if(!o.writable)throw TypeError("attempted to set read only private field");o.value=r}return r}r.d(t,{N:()=>f});var l,i=r(0xfc89b4a4),u=r(0x69c4a1b),s=r(0x1f5d8ad93),d=r(0x1702ca3c6),c=r(0x22102fd88);function f(e){let t=e+"CollectionProvider",[r,n]=(0,u.A)(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{let{scope:t,children:r}=e,n=i.useRef(null),a=i.useRef(new Map).current;return(0,c.jsx)(o,{scope:t,itemMap:a,collectionRef:n,children:r})};l.displayName=t;let f=e+"CollectionSlot",p=(0,d.TL)(f),h=i.forwardRef((e,t)=>{let{scope:r,children:n}=e,o=a(f,r),l=(0,s.s)(t,o.collectionRef);return(0,c.jsx)(p,{ref:l,children:n})});h.displayName=f;let v=e+"CollectionItemSlot",m="data-radix-collection-item",g=(0,d.TL)(v),x=i.forwardRef((e,t)=>{let{scope:r,children:n,...o}=e,l=i.useRef(null),u=(0,s.s)(t,l),d=a(v,r);return i.useEffect(()=>(d.itemMap.set(l,{ref:l,...o}),()=>void d.itemMap.delete(l))),(0,c.jsx)(g,{...{[m]:""},ref:u,children:n})});return x.displayName=v,[{Provider:l,Slot:h,ItemSlot:x},function(t){let r=a(e+"CollectionConsumer",t);return i.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(m,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var p=new WeakMap;function h(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=function(e,t){let r=e.length,n=v(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}(e,t);return -1===r?void 0:e[r]}function v(e){return e!=e||0===e?0:Math.trunc(e)}l=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?o(this,l)[o(this,l).indexOf(e)]=e:o(this,l).push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),i=o(this,l).length,u=v(e),s=u>=0?u:i+u,d=s<0||s>=i?-1:s;if(d===this.size||a&&d===this.size-1||-1===d)return this.set(t,r),this;let c=this.size+ +!a;u<0&&s++;let f=[...o(this,l)],p=!1;for(let e=s;e=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],o=0;for(let e of this)Reflect.apply(t,r,[e,o,this])&&n.push(e),o++;return new e(n)}map(t,r){let n=[],o=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,o,this])]),o++;return new e(n)}reduce(){for(var e=arguments.length,t=Array(e),r=0;r=0;e--){let r=this.at(e);a=e===this.size-1&&1===t.length?r:Reflect.apply(n,this,[a,r,e,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(){for(var t=arguments.length,r=Array(t),n=0;n0&&(o=r-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}constructor(e){super(e),function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,l,{writable:!0,value:void 0}),a(this,l,[...super.keys()]),p.set(this,!0)}}},0x1fb5bdc42:(e,t,r)=>{r.d(t,{UC:()=>e$,I:()=>eV,lp:()=>eq,mB:()=>eX,q7:()=>e0,ZL:()=>eQ,bL:()=>eY,Pb:()=>e1,G5:()=>e8,ZP:()=>e2,l9:()=>eJ});var n=r(0xfc89b4a4),o=r(0x17a935e7f),a=r(0x1f5d8ad93),l=r(0x69c4a1b),i=r(0x23f526c7f),u=r(0x11e141ae5),s=r(0x1c7182bed),d=r(0x43bc2151),c=r(0x21543ade6),f=r(0xd6c61273),p=r(0x14d2f6b89),h=r(0x1311a99af),v=r(0x22e90998b),m=r(0xb5e3133c),g=r(0x8967a633),x=r(0xff9ead2a),w=r(0x1702ca3c6),y=r(0x1752c78f7),b=r(0x72220e06),R=r(0x1d70a214f),C=r(0x22102fd88),M=["Enter"," "],j=["ArrowUp","PageDown","End"],D=["ArrowDown","PageUp","Home",...j],k={ltr:[...M,"ArrowRight"],rtl:[...M,"ArrowLeft"]},_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},I="Menu",[A,E,T]=(0,s.N)(I),[P,O]=(0,l.A)(I,[T,v.Bk,x.RG]),S=(0,v.Bk)(),N=(0,x.RG)(),[L,F]=P(I),[K,G]=P(I),B=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:a,onOpenChange:l,modal:i=!0}=e,u=S(t),[s,c]=n.useState(null),f=n.useRef(!1),p=(0,y.c)(l),h=(0,d.jH)(a);return n.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.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,C.jsx)(v.bL,{...u,children:(0,C.jsx)(L,{scope:t,open:r,onOpenChange:p,content:s,onContentChange:c,children:(0,C.jsx)(K,{scope:t,onClose:n.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:i,children:o})})})};B.displayName=I;var z=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=S(r);return(0,C.jsx)(v.Mz,{...o,...n,ref:t})});z.displayName="MenuAnchor";var U="MenuPortal",[V,q]=P(U,{forceMount:void 0}),H=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=F(U,t);return(0,C.jsx)(V,{scope:t,forceMount:r,children:(0,C.jsx)(g.C,{present:r||a.open,children:(0,C.jsx)(m.Z,{asChild:!0,container:o,children:n})})})};H.displayName=U;var X="MenuContent",[W,Z]=P(X),Y=n.forwardRef((e,t)=>{let r=q(X,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=F(X,e.__scopeMenu),l=G(X,e.__scopeMenu);return(0,C.jsx)(A.Provider,{scope:e.__scopeMenu,children:(0,C.jsx)(g.C,{present:n||a.open,children:(0,C.jsx)(A.Slot,{scope:e.__scopeMenu,children:l.modal?(0,C.jsx)(J,{...o,ref:t}):(0,C.jsx)(Q,{...o,ref:t})})})})}),J=n.forwardRef((e,t)=>{let r=F(X,e.__scopeMenu),l=n.useRef(null),i=(0,a.s)(t,l);return n.useEffect(()=>{let e=l.current;if(e)return(0,b.Eq)(e)},[]),(0,C.jsx)(ee,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,o.m)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Q=n.forwardRef((e,t)=>{let r=F(X,e.__scopeMenu);return(0,C.jsx)(ee,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),$=(0,w.TL)("MenuContent.ScrollLock"),ee=n.forwardRef((e,t)=>{let{__scopeMenu:r,loop:l=!1,trapFocus:i,onOpenAutoFocus:u,onCloseAutoFocus:s,disableOutsidePointerEvents:d,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:y,onDismiss:b,disableOutsideScroll:M,...k}=e,_=F(X,r),I=G(X,r),A=S(r),T=N(r),P=E(r),[O,L]=n.useState(null),K=n.useRef(null),B=(0,a.s)(t,K,_.onContentChange),z=n.useRef(0),U=n.useRef(""),V=n.useRef(0),q=n.useRef(null),H=n.useRef("right"),Z=n.useRef(0),Y=M?R.A:n.Fragment;n.useEffect(()=>()=>window.clearTimeout(z.current),[]),(0,f.Oh)();let J=n.useCallback(e=>{var t,r;return H.current===(null==(t=q.current)?void 0:t.side)&&function(e,t){return!!t&&function(e,t){let{x:r,y:n}=e,o=!1;for(let e=0,a=t.length-1;en!=c>n&&r<(d-u)*(n-s)/(c-s)+u&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,null==(r=q.current)?void 0:r.area)},[]);return(0,C.jsx)(W,{scope:r,searchRef:U,onItemEnter:n.useCallback(e=>{J(e)&&e.preventDefault()},[J]),onItemLeave:n.useCallback(e=>{var t;J(e)||(null==(t=K.current)||t.focus(),L(null))},[J]),onTriggerLeave:n.useCallback(e=>{J(e)&&e.preventDefault()},[J]),pointerGraceTimerRef:V,onPointerGraceIntentChange:n.useCallback(e=>{q.current=e},[]),children:(0,C.jsx)(Y,{...M?{as:$,allowPinchZoom:!0}:void 0,children:(0,C.jsx)(p.n,{asChild:!0,trapped:i,onMountAutoFocus:(0,o.m)(u,e=>{var t;e.preventDefault(),null==(t=K.current)||t.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,C.jsx)(c.qW,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:y,onDismiss:b,children:(0,C.jsx)(x.bL,{asChild:!0,...T,dir:I.dir,orientation:"vertical",loop:l,currentTabStopId:O,onCurrentTabStopIdChange:L,onEntryFocus:(0,o.m)(h,e=>{I.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,C.jsx)(v.UC,{role:"menu","aria-orientation":"vertical","data-state":e_(_.open),"data-radix-menu-content":"",dir:I.dir,...A,...k,ref:B,style:{outline:"none",...k.style},onKeyDown:(0,o.m)(k.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&(e=>{var t,r;let n=U.current+e,o=P().filter(e=>!e.disabled),a=document.activeElement,l=null==(t=o.find(e=>e.ref.current===a))?void 0:t.textValue,i=function(e,t,r){var n;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,l=(n=Math.max(a,0),e.map((t,r)=>e[(n+r)%e.length]));1===o.length&&(l=l.filter(e=>e!==r));let i=l.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return i!==r?i:void 0}(o.map(e=>e.textValue),n,l),u=null==(r=o.find(e=>e.textValue===i))?void 0:r.ref.current;!function e(t){U.current=t,window.clearTimeout(z.current),""!==t&&(z.current=window.setTimeout(()=>e(""),1e3))}(n),u&&setTimeout(()=>u.focus())})(e.key));let o=K.current;if(e.target!==o||!D.includes(e.key))return;e.preventDefault();let a=P().filter(e=>!e.disabled).map(e=>e.ref.current);j.includes(e.key)&&a.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(a)}),onBlur:(0,o.m)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(z.current),U.current="")}),onPointerMove:(0,o.m)(e.onPointerMove,eE(e=>{let t=e.target,r=Z.current!==e.clientX;e.currentTarget.contains(t)&&r&&(H.current=e.clientX>Z.current?"right":"left",Z.current=e.clientX)}))})})})})})})});Y.displayName=X;var et=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,C.jsx)(u.sG.div,{role:"group",...n,ref:t})});et.displayName="MenuGroup";var er=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,C.jsx)(u.sG.div,{...n,ref:t})});er.displayName="MenuLabel";var en="MenuItem",eo="menu.itemSelect",ea=n.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:l,...i}=e,s=n.useRef(null),d=G(en,e.__scopeMenu),c=Z(en,e.__scopeMenu),f=(0,a.s)(t,s),p=n.useRef(!1);return(0,C.jsx)(el,{...i,ref:f,disabled:r,onClick:(0,o.m)(e.onClick,()=>{let e=s.current;if(!r&&e){let t=new CustomEvent(eo,{bubbles:!0,cancelable:!0});e.addEventListener(eo,e=>null==l?void 0:l(e),{once:!0}),(0,u.hO)(e,t),t.defaultPrevented?p.current=!1:d.onClose()}}),onPointerDown:t=>{var r;null==(r=e.onPointerDown)||r.call(e,t),p.current=!0},onPointerUp:(0,o.m)(e.onPointerUp,e=>{var t;p.current||null==(t=e.currentTarget)||t.click()}),onKeyDown:(0,o.m)(e.onKeyDown,e=>{let t=""!==c.searchRef.current;r||t&&" "===e.key||M.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ea.displayName=en;var el=n.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:l=!1,textValue:i,...s}=e,d=Z(en,r),c=N(r),f=n.useRef(null),p=(0,a.s)(t,f),[h,v]=n.useState(!1),[m,g]=n.useState("");return n.useEffect(()=>{let e=f.current;if(e){var t;g((null!=(t=e.textContent)?t:"").trim())}},[s.children]),(0,C.jsx)(A.ItemSlot,{scope:r,disabled:l,textValue:null!=i?i:m,children:(0,C.jsx)(x.q7,{asChild:!0,...c,focusable:!l,children:(0,C.jsx)(u.sG.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...s,ref:p,onPointerMove:(0,o.m)(e.onPointerMove,eE(e=>{l?d.onItemLeave(e):(d.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,o.m)(e.onPointerLeave,eE(e=>d.onItemLeave(e))),onFocus:(0,o.m)(e.onFocus,()=>v(!0)),onBlur:(0,o.m)(e.onBlur,()=>v(!1))})})})}),ei=n.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...a}=e;return(0,C.jsx)(ev,{scope:e.__scopeMenu,checked:r,children:(0,C.jsx)(ea,{role:"menuitemcheckbox","aria-checked":eI(r)?"mixed":r,...a,ref:t,"data-state":eA(r),onSelect:(0,o.m)(a.onSelect,()=>null==n?void 0:n(!!eI(r)||!r),{checkForDefaultPrevented:!1})})})});ei.displayName="MenuCheckboxItem";var eu="MenuRadioGroup",[es,ed]=P(eu,{value:void 0,onValueChange:()=>{}}),ec=n.forwardRef((e,t)=>{let{value:r,onValueChange:n,...o}=e,a=(0,y.c)(n);return(0,C.jsx)(es,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,C.jsx)(et,{...o,ref:t})})});ec.displayName=eu;var ef="MenuRadioItem",ep=n.forwardRef((e,t)=>{let{value:r,...n}=e,a=ed(ef,e.__scopeMenu),l=r===a.value;return(0,C.jsx)(ev,{scope:e.__scopeMenu,checked:l,children:(0,C.jsx)(ea,{role:"menuitemradio","aria-checked":l,...n,ref:t,"data-state":eA(l),onSelect:(0,o.m)(n.onSelect,()=>{var e;return null==(e=a.onValueChange)?void 0:e.call(a,r)},{checkForDefaultPrevented:!1})})})});ep.displayName=ef;var eh="MenuItemIndicator",[ev,em]=P(eh,{checked:!1}),eg=n.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...o}=e,a=em(eh,r);return(0,C.jsx)(g.C,{present:n||eI(a.checked)||!0===a.checked,children:(0,C.jsx)(u.sG.span,{...o,ref:t,"data-state":eA(a.checked)})})});eg.displayName=eh;var ex=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,C.jsx)(u.sG.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});ex.displayName="MenuSeparator";var ew=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=S(r);return(0,C.jsx)(v.i3,{...o,...n,ref:t})});ew.displayName="MenuArrow";var ey="MenuSub",[eb,eR]=P(ey),eC=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:a}=e,l=F(ey,t),i=S(t),[u,s]=n.useState(null),[d,c]=n.useState(null),f=(0,y.c)(a);return n.useEffect(()=>(!1===l.open&&f(!1),()=>f(!1)),[l.open,f]),(0,C.jsx)(v.bL,{...i,children:(0,C.jsx)(L,{scope:t,open:o,onOpenChange:f,content:d,onContentChange:c,children:(0,C.jsx)(eb,{scope:t,contentId:(0,h.B)(),triggerId:(0,h.B)(),trigger:u,onTriggerChange:s,children:r})})})};eC.displayName=ey;var eM="MenuSubTrigger",ej=n.forwardRef((e,t)=>{let r=F(eM,e.__scopeMenu),l=G(eM,e.__scopeMenu),i=eR(eM,e.__scopeMenu),u=Z(eM,e.__scopeMenu),s=n.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:c}=u,f={__scopeMenu:e.__scopeMenu},p=n.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return n.useEffect(()=>p,[p]),n.useEffect(()=>{let e=d.current;return()=>{window.clearTimeout(e),c(null)}},[d,c]),(0,C.jsx)(z,{asChild:!0,...f,children:(0,C.jsx)(el,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":e_(r.open),...e,ref:(0,a.t)(t,i.onTriggerChange),onClick:t=>{var n;null==(n=e.onClick)||n.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:(0,o.m)(e.onPointerMove,eE(t=>{u.onItemEnter(t),!t.defaultPrevented&&(e.disabled||r.open||s.current||(u.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100)))})),onPointerLeave:(0,o.m)(e.onPointerLeave,eE(e=>{var t,n;p();let o=null==(t=r.content)?void 0:t.getBoundingClientRect();if(o){let t=null==(n=r.content)?void 0:n.dataset.side,a="right"===t,l=o[a?"left":"right"],i=o[a?"right":"left"];u.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:l,y:o.top},{x:i,y:o.top},{x:i,y:o.bottom},{x:l,y:o.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(e),e.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:(0,o.m)(e.onKeyDown,t=>{let n=""!==u.searchRef.current;if(!e.disabled&&(!n||" "!==t.key)&&k[l.dir].includes(t.key)){var o;r.onOpenChange(!0),null==(o=r.content)||o.focus(),t.preventDefault()}})})})});ej.displayName=eM;var eD="MenuSubContent",ek=n.forwardRef((e,t)=>{let r=q(X,e.__scopeMenu),{forceMount:l=r.forceMount,...i}=e,u=F(X,e.__scopeMenu),s=G(X,e.__scopeMenu),d=eR(eD,e.__scopeMenu),c=n.useRef(null),f=(0,a.s)(t,c);return(0,C.jsx)(A.Provider,{scope:e.__scopeMenu,children:(0,C.jsx)(g.C,{present:l||u.open,children:(0,C.jsx)(A.Slot,{scope:e.__scopeMenu,children:(0,C.jsx)(ee,{id:d.contentId,"aria-labelledby":d.triggerId,...i,ref:f,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;s.isUsingKeyboardRef.current&&(null==(t=c.current)||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,o.m)(e.onFocusOutside,e=>{e.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:(0,o.m)(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:(0,o.m)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=_[s.dir].includes(e.key);if(t&&r){var n;u.onOpenChange(!1),null==(n=d.trigger)||n.focus(),e.preventDefault()}})})})})})});function e_(e){return e?"open":"closed"}function eI(e){return"indeterminate"===e}function eA(e){return eI(e)?"indeterminate":e?"checked":"unchecked"}function eE(e){return t=>"mouse"===t.pointerType?e(t):void 0}ek.displayName=eD;var eT="DropdownMenu",[eP,eO]=(0,l.A)(eT,[O]),eS=O(),[eN,eL]=eP(eT),eF=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:a,defaultOpen:l,onOpenChange:u,modal:s=!0}=e,d=eS(t),c=n.useRef(null),[f,p]=(0,i.i)({prop:a,defaultProp:null!=l&&l,onChange:u,caller:eT});return(0,C.jsx)(eN,{scope:t,triggerId:(0,h.B)(),triggerRef:c,contentId:(0,h.B)(),open:f,onOpenChange:p,onOpenToggle:n.useCallback(()=>p(e=>!e),[p]),modal:s,children:(0,C.jsx)(B,{...d,open:f,onOpenChange:p,dir:o,modal:s,children:r})})};eF.displayName=eT;var eK="DropdownMenuTrigger",eG=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...l}=e,i=eL(eK,r),s=eS(r);return(0,C.jsx)(z,{asChild:!0,...s,children:(0,C.jsx)(u.sG.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...l,ref:(0,a.t)(t,i.triggerRef),onPointerDown:(0,o.m)(e.onPointerDown,e=>{!n&&0===e.button&&!1===e.ctrlKey&&(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:(0,o.m)(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});eG.displayName=eK;var eB=e=>{let{__scopeDropdownMenu:t,...r}=e,n=eS(t);return(0,C.jsx)(H,{...n,...r})};eB.displayName="DropdownMenuPortal";var ez="DropdownMenuContent",eU=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...a}=e,l=eL(ez,r),i=eS(r),u=n.useRef(!1);return(0,C.jsx)(Y,{id:l.contentId,"aria-labelledby":l.triggerId,...i,...a,ref:t,onCloseAutoFocus:(0,o.m)(e.onCloseAutoFocus,e=>{var t;u.current||null==(t=l.triggerRef.current)||t.focus(),u.current=!1,e.preventDefault()}),onInteractOutside:(0,o.m)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!l.modal||n)&&(u.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)"}})});eU.displayName=ez;var eV=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(et,{...o,...n,ref:t})});eV.displayName="DropdownMenuGroup";var eq=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(er,{...o,...n,ref:t})});eq.displayName="DropdownMenuLabel";var eH=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ea,{...o,...n,ref:t})});eH.displayName="DropdownMenuItem",n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ei,{...o,...n,ref:t})}).displayName="DropdownMenuCheckboxItem",n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ec,{...o,...n,ref:t})}).displayName="DropdownMenuRadioGroup",n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ep,{...o,...n,ref:t})}).displayName="DropdownMenuRadioItem",n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(eg,{...o,...n,ref:t})}).displayName="DropdownMenuItemIndicator";var eX=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ex,{...o,...n,ref:t})});eX.displayName="DropdownMenuSeparator",n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ew,{...o,...n,ref:t})}).displayName="DropdownMenuArrow";var eW=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ej,{...o,...n,ref:t})});eW.displayName="DropdownMenuSubTrigger";var eZ=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eS(r);return(0,C.jsx)(ek,{...o,...n,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)"}})});eZ.displayName="DropdownMenuSubContent";var eY=eF,eJ=eG,eQ=eB,e$=eU,e0=eH,e1=e=>{let{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,l=eS(t),[u,s]=(0,i.i)({prop:n,defaultProp:null!=a&&a,onChange:o,caller:"DropdownMenuSub"});return(0,C.jsx)(eC,{...l,open:u,onOpenChange:s,children:r})},e2=eW,e8=eZ}}]);