Files
boc/web/_next/static/chunks/1y-t4rdf4jtp-.js
T

9 lines
94 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26674,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let a=e.r(47527)._(e.r(27245)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:n}=e,r=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||i.test(r))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${u}${o}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},83854,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return o}});let r=e.r(62714);function o(e,t){let n=(0,r.useRef)(null),o=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(n.current=a(e,r)),t&&(o.current=a(t,r))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},85018,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=e.r(29843),o=e.r(32623);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},41511,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},68017,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return v},useLinkStatus:function(){return x}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let a=e.r(47527),i=e.r(1624),s=a._(e.r(62714)),l=e.r(26674),u=e.r(88132),c=e.r(83854),d=e.r(29843),f=e.r(12787);e.r(8550);let p=e.r(42049),h=e.r(78970),m=e.r(85018),g=e.r(71510);function v(t){var n,r;let o,a,v,[x,y]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),E=(0,s.useRef)(null),{href:R,as:S,children:w,prefetch:k=null,passHref:C,replace:M,shallow:T,scroll:O,onClick:I,onMouseEnter:N,onTouchStart:A,legacyBehavior:P=!1,onNavigate:j,transitionTypes:L,ref:F,unstable_dynamicOnHover:D,..._}=t;o=w,P&&("string"==typeof o||"number"==typeof o)&&(o=(0,i.jsx)("a",{children:o}));let B=s.default.useContext(u.AppRouterContext),W=!1!==k,H=!1!==k?null===(r=k)||"auto"===r?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(n=S||R)?n:(0,l.formatUrl)(n);if(P){if(o?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(o)}let z=P?a&&"object"==typeof a&&a.ref:F,Y=s.default.useCallback(e=>(null!==B&&(E.current=(0,h.mountLinkInstance)(e,U,B,H,W,y)),()=>{E.current&&((0,h.unmountLinkForCurrentNavigation)(E.current),E.current=null),(0,h.unmountPrefetchableInstance)(e)}),[W,U,B,H,y]),V={ref:(0,c.useMergedRef)(Y,z),onClick(t){P||"function"!=typeof I||I(t),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!B||t.defaultPrevented||function(t,n,r,o,a,i,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(n)){o&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(39358);s.default.startTransition(()=>{d(n,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,r.current,l)})}}(t,U,E,M,O,j,L)},onMouseEnter(e){P||"function"!=typeof N||N(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),B&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){P||"function"!=typeof A||A(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),B&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(U)?V.href=U:P&&!C&&("a"!==a.type||"href"in a.props)||(V.href=(0,f.addBasePath)(U)),v=P?s.default.cloneElement(a,V):(0,i.jsx)("a",{..._,...V,children:o}),(0,i.jsx)(b.Provider,{value:x,children:v})}e.r(41511);let b=(0,s.createContext)(h.IDLE_LINK_STATUS),x=()=>(0,s.useContext)(b);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},34772,71672,96849,53743,99395,56790,72207,25599,37983,76730,96695,79019,6726,20287,80063,42289,68504,93002,54412,95992,e=>{"use strict";var t,n,r,o=e.i(1624),a=e.i(62714),i=e.i(68017),s=e.i(61268),l=e.i(91054);e.i(59217);var u=e.i(68427),c=e.i(1654),d=e.i(92150),f=e.i(93803),p=e.i(70452),h=a,m=e.i(27709);function g(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class v extends h.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,p.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,p.isHTMLElement)(e)&&e.offsetWidth||0,r=(0,p.isHTMLElement)(e)&&e.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function b({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){let l=(0,h.useId)(),u=(0,h.useRef)(null),c=(0,h.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:d}=(0,h.useContext)(m.MotionConfigContext),f=function(...e){return a.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=g(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():g(e[t],null)}}}}(...e),e)}(u,e.props?.ref??e?.ref);return(0,h.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:f,right:p,bottom:h,direction:m}=c.current;if(t||!1===s||!u.current||!e||!o)return;let g="rtl"===m,v="left"===n?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,b="bottom"===r?`bottom: ${h}`:`top: ${a}`;u.current.dataset.motionPopId=l;let x=document.createElement("style");d&&(x.nonce=d);let y=i??document.head;return y.appendChild(x),x.sheet&&x.sheet.insertRule(`
[data-motion-pop-id="${l}"] {
position: absolute !important;
width: ${e}px !important;
height: ${o}px !important;
${v}px !important;
${b}px !important;
}
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),y.contains(x)&&y.removeChild(x)}},[t]),(0,o.jsx)(v,{isPresent:t,childRef:u,sizeRef:c,pop:s,children:!1===s?e:h.cloneElement(e,{ref:f})})}let x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:l,anchorX:u,anchorY:p,root:h})=>{let m=(0,c.useConstant)(y),g=(0,a.useId)(),v=(0,a.useRef)(n),x=(0,a.useRef)(r);(0,d.useIsomorphicLayoutEffect)(()=>{v.current=n,x.current=r});let E=!0,R=(0,a.useMemo)(()=>(E=!1,{id:g,initial:t,isPresent:n,custom:i,onExitComplete:e=>{for(let t of(m.set(e,!0),m.values()))if(!t)return;r&&r()},register:e=>(m.set(e,!1),()=>{m.delete(e),v.current||m.size||x.current?.()})}),[n,m,r]);return s&&E&&(R={...R}),(0,a.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[n]),a.useEffect(()=>{n||m.size||!r||r()},[n]),e=(0,o.jsx)(b,{pop:"popLayout"===l,isPresent:n,anchorX:u,anchorY:p,root:h,children:e}),(0,o.jsx)(f.PresenceContext.Provider,{value:R,children:e})};function y(){return new Map}var E=e.i(97422);let R=e=>e.key||"";function S(e){let t=[];return a.Children.forEach(e,e=>{(0,a.isValidElement)(e)&&t.push(e)}),t}let w=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:l=!1,anchorX:f="left",anchorY:p="top",root:h})=>{let[m,g]=(0,E.usePresence)(l),v=(0,a.useMemo)(()=>S(e),[e]),b=l&&!m?[]:v.map(R),y=(0,a.useRef)(!0),w=(0,a.useRef)(v),k=(0,c.useConstant)(()=>new Map),C=(0,a.useRef)(new Set),[M,T]=(0,a.useState)(v),[O,I]=(0,a.useState)(v);(0,d.useIsomorphicLayoutEffect)(()=>{y.current=!1,w.current=v;for(let e=0;e<O.length;e++){let t=R(O[e]);b.includes(t)?(k.delete(t),C.current.delete(t)):!0!==k.get(t)&&k.set(t,!1)}},[O,b.length,b.join("-")]);let N=[];if(v!==M){let e=[...v];for(let t=0;t<O.length;t++){let n=O[t],r=R(n);b.includes(r)||(e.splice(t,0,n),N.push(n))}return"wait"===s&&N.length&&(e=N),I(S(e)),T(v),null}let{forceRender:A}=(0,a.useContext)(u.LayoutGroupContext);return(0,o.jsx)(o.Fragment,{children:O.map(e=>{let a=R(e),u=(!l||!!m)&&(v===O||b.includes(a));return(0,o.jsx)(x,{isPresent:u,initial:(!y.current||!!n)&&void 0,custom:t,presenceAffectsLayout:i,mode:s,root:h,onExitComplete:u?void 0:()=>{if(C.current.has(a)||!k.has(a))return;C.current.add(a),k.set(a,!0);let e=!0;k.forEach(t=>{t||(e=!1)}),e&&(A?.(),I(w.current),l&&g?.(),r&&r())},anchorX:f,anchorY:p,children:e},a)})})};var k=e.i(64828);let C=(0,k.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),M=(0,k.default)("users",[["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"}]]);e.s(["Users",0,M],71672);let T=(0,k.default)("landmark",[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z",key:"yxxwt6"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]]);e.s(["Landmark",0,T],96849);let O=(0,k.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",0,O],53743);let I=(0,k.default)("folder-kanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);e.s(["FolderKanban",0,I],99395);let N=(0,k.default)("settings",[["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"}]]),A=(0,k.default)("cog",[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]]);e.s(["Cog",0,A],56790);let P=(0,k.default)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);e.s(["HeadphonesIcon",0,P],72207);let j=(0,k.default)("scale",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]]);e.s(["Scale",0,j],25599);let L=(0,k.default)("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]),F=(0,k.default)("megaphone",[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]),D=(0,k.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",0,D],37983);let _=(0,k.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),B=(0,k.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var W=e.i(30573);let H=[{label:"Dashboard",href:"/dashboard",icon:C},{label:"CRM",href:"/dashboard/crm",icon:M},{label:"Finance",href:"/dashboard/finance",icon:T},{label:"Sales",href:"/dashboard/sales",icon:O},{label:"Projects",href:"/dashboard/projects",icon:I},{label:"Operations",href:"/dashboard/operations",icon:A},{label:"Support",href:"/dashboard/support",icon:P},{label:"Legal",href:"/dashboard/legal",icon:j},{label:"HR",href:"/dashboard/hr",icon:L},{label:"Marketing",href:"/dashboard/marketing",icon:F},{label:"Automation",href:"/dashboard/automation",icon:D},{label:"Settings",href:"/dashboard/settings",icon:N}];function U(){let[e,t]=(0,a.useState)(!1),n=(0,s.usePathname)();return(0,o.jsxs)(l.motion.aside,{initial:!1,animate:{width:e?72:240},transition:{duration:.2,ease:"easeInOut"},className:"fixed left-4 top-4 bottom-4 z-40 bg-white rounded-2xl shadow-[0_8px_32px_rgba(0,0,0,0.08)] border border-[#E5E7EB] flex flex-col overflow-hidden",children:[(0,o.jsxs)("div",{className:"flex items-center h-16 px-4 border-b border-[#E5E7EB]",children:[(0,o.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[#1E3A5F] flex items-center justify-center flex-shrink-0",children:(0,o.jsx)("span",{className:"text-white font-bold text-sm",children:"A"})}),(0,o.jsx)(w,{children:!e&&(0,o.jsx)(l.motion.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.15},className:"ml-3 font-semibold text-[#1E3A5F] text-sm tracking-wide whitespace-nowrap",children:"AMOS"})})]}),(0,o.jsx)("nav",{className:"flex-1 py-3 px-2 space-y-0.5 overflow-y-auto",children:H.map(t=>{let r=t.icon,a=n===t.href||n?.startsWith(t.href+"/");return(0,o.jsx)(i.default,{href:t.href,className:"block",children:(0,o.jsxs)(l.motion.div,{whileHover:{backgroundColor:"#F3F4F6"},className:(0,W.cn)("relative flex items-center h-10 rounded-xl px-2 transition-colors",a&&"bg-[#F3F4F6]"),children:[a&&(0,o.jsx)(l.motion.div,{layoutId:"activeIndicator",className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-[#2563EB] rounded-r-full",transition:{type:"spring",stiffness:380,damping:30}}),(0,o.jsx)(r,{className:(0,W.cn)("w-[18px] h-[18px] flex-shrink-0 transition-colors",a?"text-[#2563EB]":"text-[#6B7280]")}),(0,o.jsx)(w,{children:!e&&(0,o.jsx)(l.motion.span,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:(0,W.cn)("ml-3 text-sm font-medium whitespace-nowrap",a?"text-[#111827]":"text-[#6B7280]"),children:t.label})})]})},t.href)})}),(0,o.jsx)("div",{className:"p-2 border-t border-[#E5E7EB]",children:(0,o.jsx)("button",{onClick:()=>t(!e),className:"flex items-center justify-center w-full h-9 rounded-xl hover:bg-[#F3F4F6] transition-colors text-[#6B7280]",children:e?(0,o.jsx)(B,{className:"w-4 h-4"}):(0,o.jsx)(_,{className:"w-4 h-4"})})})]})}let z=(0,k.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,z],76730);let Y=(0,k.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["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"}]]);e.s(["Bell",0,Y],96695);let V=(0,k.default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,V],79019);let $=(0,k.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),K=(0,k.default)("building-2",[["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"}]]);e.s(["Building2",0,K],6726);let G=(0,k.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,G],20287);var q=e.i(1791),X=e.i(16942),J=e.i(46392);let Z=(0,e.i(54044).cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Q({className:e,variant:t="default",render:n,...r}){var o;return o={defaultTagName:"span",props:(0,X.mergeProps)({className:(0,W.cn)(Z({variant:t}),e)},r),render:n,state:{slot:"badge",variant:t}},(0,J.useRenderElement)(o.defaultTagName??"div",o,o)}e.s(["Badge",0,Q],80063),e.s([],23269),e.i(23269);var ee=e.i(33817);let et=a.createContext(void 0);function en(){let e=a.useContext(et);if(void 0===e)throw Error((0,ee.default)(13));return e}let er={imageLoadingStatus:()=>null},eo=a.forwardRef(function(e,t){let{className:n,render:r,style:i,...s}=e,[l,u]=a.useState("idle"),c=a.useMemo(()=>({imageLoadingStatus:l,setImageLoadingStatus:u}),[l,u]),d=(0,J.useRenderElement)("span",e,{state:{imageLoadingStatus:l},ref:t,props:s,stateAttributesMapping:er});return(0,o.jsx)(et.Provider,{value:c,children:d})});var ea=e.i(1572),ei=e.i(88368),es=e.i(64592),el=e.i(89636),eu=e.i(40030),ec=e.i(85384);let ed={...er,...el.transitionStatusMapping},ef=a.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:o,style:i,...s}=e,{setImageLoadingStatus:l}=en(),u=function(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:o}){let[i,s]=a.useState("idle");return(0,ei.useIsoLayoutEffect)(()=>{if(!e&&!o)return s("error"),ec.NOOP;let a=!0,i=new window.Image,l=e=>()=>{a&&s(e)};return s("loading"),i.onload=l("loaded"),i.onerror=l("error"),t&&(i.referrerPolicy=t),i.crossOrigin=n??null,r&&(i.sizes=r),o&&(i.srcset=o),e&&(i.src=e),i.complete&&s(i.naturalWidth>0?"loaded":"error"),()=>{a=!1}},[e,o,r,n,t]),i}(s.src,s),c="loaded"===u,{mounted:d,transitionStatus:f,setMounted:p}=(0,eu.useTransitionStatus)(c),h=a.useRef(null),m=(0,ea.useStableCallback)(e=>{o?.(e),l(e)});(0,ei.useIsoLayoutEffect)(()=>{"idle"!==u&&m(u)},[u,m]),(0,ei.useIsoLayoutEffect)(()=>()=>l("idle"),[l]),(0,es.useOpenChangeComplete)({open:c,ref:h,onComplete(){c||p(!1)}});let g=(0,J.useRenderElement)("img",e,{state:{imageLoadingStatus:u,transitionStatus:f},ref:[t,h],props:s,stateAttributesMapping:ed,enabled:d});return d?g:null});var ep=e.i(95023);let eh=a.forwardRef(function(e,t){let{className:n,render:r,delay:o,style:i,...s}=e,{imageLoadingStatus:l}=en(),[u,c]=a.useState(void 0===o),d=(0,ep.useTimeout)();return a.useEffect(()=>(void 0!==o?d.start(o,()=>c(!0)):c(!0),d.clear),[d,o]),(0,J.useRenderElement)("span",e,{state:{imageLoadingStatus:l},ref:t,props:s,stateAttributesMapping:er,enabled:"loaded"!==l&&(void 0===o||u)})});e.s(["Fallback",0,eh,"Image",0,ef,"Root",0,eo],69251);var em=e.i(69251),em=em;function eg({className:e,size:t="default",...n}){return(0,o.jsx)(em.Root,{"data-slot":"avatar","data-size":t,className:(0,W.cn)("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function ev({className:e,...t}){return(0,o.jsx)(em.Fallback,{"data-slot":"avatar-fallback",className:(0,W.cn)("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}e.s([],11985),e.i(11985);let eb=a.createContext(void 0);function ex(e){let t=a.useContext(eb);if(void 0===t&&!e)throw Error((0,ee.default)(33));return t}let ey=a.createContext(void 0);function eE(e){let t=a.useContext(ey);if(void 0===t&&!e)throw Error((0,ee.default)(36));return t}var eR=e.i(44258);let eS=a.forwardRef(function(e,t){let{render:n,className:r,style:o,...a}=e,{store:i}=eE(),{arrowRef:s,side:l,align:u,arrowUncentered:c,arrowStyles:d}=ex(),f=i.useState("open");return(0,J.useRenderElement)("div",e,{ref:[s,t],stateAttributesMapping:eR.popupStateMapping,state:{open:f,side:l,align:u,uncentered:c},props:{style:d,"aria-hidden":!0,...a}})}),ew=a.createContext(void 0);function ek(e=!0){let t=a.useContext(ew);if(void 0===t&&!e)throw Error((0,ee.default)(25));return t}var eC=e.i(78495);let eM={...eR.popupStateMapping,...el.transitionStatusMapping},eT=a.forwardRef(function(e,t){let{render:n,className:r,style:o,...a}=e,{store:i}=eE(),s=i.useState("open"),l=i.useState("mounted"),u=i.useState("transitionStatus"),c=i.useState("lastOpenChangeReason"),d=ek();return(0,J.useRenderElement)("div",e,{ref:d?.backdropRef?[t,d.backdropRef]:t,state:{open:s,transitionStatus:u},stateAttributesMapping:eM,props:[{role:"presentation",hidden:!l,style:{pointerEvents:c===eC.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},a]})});var eO=e.i(44727);let eI=a.createContext(void 0);var eN=e.i(41936),eA=e.i(51385),eP=e.i(47115);function ej(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:o,store:i,typingRef:s,itemRef:l,itemMetadata:u}=e,{events:c}=i.useState("floatingTreeRoot"),d=i.useState("open"),f=ek(!0),p=void 0!==f;return a.useMemo(()=>({id:r,role:"menuitem",tabIndex:d&&n?0:-1,onKeyDown(e){" "===e.key&&s?.current&&e.preventDefault()},onMouseMove(e){o&&c.emit("itemhover",{nodeId:o,target:e.currentTarget})},onClick(e){t&&c.emit("close",{domEvent:e,reason:eC.REASONS.itemPress})},onMouseUp(e){if(f){let t=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,p&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||p&&!eP.platform.os.mac&&2===e.button)return}l.current&&i.context.allowMouseUpTriggerRef.current&&(!p||2===e.button)&&(!u||"regular-item"===u.type)&&l.current.click()}}),[t,n,r,c,o,d,i,s,l,f,p,u])}let eL={type:"regular-item"};function eF(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:i,typingRef:s=i.context.typingRef,nativeButton:l,itemMetadata:u,nodeId:c}=e,d=i.useState("disabled"),f=a.useRef(null),{getButtonProps:p,buttonRef:h}=(0,eA.useButton)({disabled:n||d,focusableWhenDisabled:!0,native:l,composite:!0}),m=ej({closeOnClick:t,highlighted:r,id:o,nodeId:c,store:i,typingRef:s,itemRef:f,itemMetadata:u}),g=a.useCallback(e=>(0,X.mergeProps)(m,{onMouseEnter(){"submenu-trigger"===u.type&&u.setActive()}},e,p),[m,p,u]),v=(0,eN.useMergedRefs)(f,h);return a.useMemo(()=>({getItemProps:g,itemRef:v}),[g,v])}let eD=a.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),e_=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);function eB(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:l,subscribeMapChange:u,elementsRef:c,labelsRef:d,nextIndexRef:f}=a.useContext(eD),p=a.useRef(-1),[h,m]=a.useState(i??(o===e_.GuessFromOrder?()=>{if(-1===p.current){let e=f.current;f.current+=1,p.current=e}return p.current}:-1)),g=a.useRef(null),v=a.useCallback(e=>{if(g.current=e,-1!==h&&null!==e&&(c.current[h]=e,d)){let n=void 0!==t;d.current[h]=n?t:r?.current?.textContent??e.textContent}},[h,c,d,t,r]);return(0,ei.useIsoLayoutEffect)(()=>{if(null!=i)return;let e=g.current;if(e)return s(e,n),()=>{l(e)}},[i,s,l,n]),(0,ei.useIsoLayoutEffect)(()=>{if(null==i)return u(e=>{let t=g.current?e.get(g.current)?.index:null;null!=t&&m(t)})},[i,u,m]),{ref:v,index:h}}e.s(["useCompositeListItem",0,eB],42289);var eW=e.i(7345);let eH=((n={}).checked="data-checked",n.unchecked="data-unchecked",n.disabled="data-disabled",n.highlighted="data-highlighted",n),eU={checked:e=>e?{[eH.checked]:""}:{[eH.unchecked]:""},...el.transitionStatusMapping};var ez=e.i(93671);let eY=a.forwardRef(function(e,t){let{render:n,className:r,id:i,label:s,nativeButton:l=!1,disabled:u=!1,closeOnClick:c=!1,checked:d,defaultChecked:f,onCheckedChange:p,style:h,...m}=e,g=eB({label:s}),v=ex(!0),b=(0,eW.useBaseUiId)(i),{store:x}=eE(),y=x.useState("isActive",g.index),E=x.useState("itemProps"),[R,S]=(0,eO.useControlled)({controlled:d,default:f??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:w,itemRef:k}=eF({closeOnClick:c,disabled:u,highlighted:y,id:b,store:x,nativeButton:l,nodeId:v?.context.nodeId,itemMetadata:eL}),C=a.useMemo(()=>({disabled:u,highlighted:y,checked:R}),[u,y,R]),M=(0,J.useRenderElement)("div",e,{state:C,stateAttributesMapping:eU,props:[E,{role:"menuitemcheckbox","aria-checked":R,onClick:function(e){let t=(0,ez.createChangeEventDetails)(eC.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose(){}});p?.(!R,t),t.isCanceled||S(e=>!e)}},m,w],ref:[k,t,g.ref]});return(0,o.jsx)(eI.Provider,{value:C,children:M})}),eV=a.forwardRef(function(e,t){let{render:n,className:r,style:o,keepMounted:i=!1,...s}=e,l=function(){let e=a.useContext(eI);if(void 0===e)throw Error((0,ee.default)(30));return e}(),u=a.useRef(null),{transitionStatus:c,setMounted:d}=(0,eu.useTransitionStatus)(l.checked);(0,es.useOpenChangeComplete)({open:l.checked,ref:u,onComplete(){l.checked||d(!1)}});let f={checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:c};return(0,J.useRenderElement)("span",e,{state:f,ref:[t,u],stateAttributesMapping:eU,props:{"aria-hidden":!0,...s},enabled:i||l.checked})}),e$=a.createContext(void 0),eK=a.forwardRef(function(e,t){let{render:n,className:r,style:i,...s}=e,[l,u]=a.useState(void 0),c=(0,J.useRenderElement)("div",e,{ref:t,props:{role:"group","aria-labelledby":l,...s}});return(0,o.jsx)(e$.Provider,{value:u,children:c})}),eG=a.forwardRef(function(e,t){let{render:n,className:r,style:o,id:i,...s}=e,l=(0,eW.useBaseUiId)(i),u=function(){let e=a.useContext(e$);if(void 0===e)throw Error((0,ee.default)(31));return e}();return(0,ei.useIsoLayoutEffect)(()=>(u(l),()=>{u(void 0)}),[u,l]),(0,J.useRenderElement)("div",e,{ref:t,props:{id:l,role:"presentation",...s}})}),eq=a.forwardRef(function(e,t){let{render:n,className:r,id:o,label:a,nativeButton:i=!1,disabled:s=!1,closeOnClick:l=!0,style:u,...c}=e,d=eB({label:a}),f=ex(!0),p=(0,eW.useBaseUiId)(o),{store:h}=eE(),m=h.useState("isActive",d.index),g=h.useState("itemProps"),{getItemProps:v,itemRef:b}=eF({closeOnClick:l,disabled:s,highlighted:m,id:p,store:h,nativeButton:i,nodeId:f?.context.nodeId,itemMetadata:eL});return(0,J.useRenderElement)("div",e,{state:{disabled:s,highlighted:m},props:[g,c,v],ref:[b,t,d.ref]})}),eX=a.forwardRef(function(e,t){let{render:n,className:r,id:o,label:i,closeOnClick:s=!1,style:l,...u}=e,c=a.useRef(null),d=eB({label:i}),f=ex(!0),p=f?.context.nodeId,h=(0,eW.useBaseUiId)(o),{store:m}=eE(),g=m.useState("isActive",d.index),v=m.useState("itemProps"),b=m.context.typingRef,{getButtonProps:x,buttonRef:y}=(0,eA.useButton)({native:!1,composite:!0}),E=ej({closeOnClick:s,highlighted:g,id:h,nodeId:p,store:m,typingRef:b,itemRef:c});return(0,J.useRenderElement)("a",e,{state:{highlighted:g},props:[v,u,function(e){return(0,X.mergeProps)(E,e,x)}],ref:[c,y,t,d.ref]})});var eJ=e.i(4572),eZ=e.i(44227),eQ=e.i(19367),e0=e.i(96434),e1=e.i(57543),e2=e.i(12229),e3=e.i(21868),e4=e.i(85162),e6=e.i(57668),e7=e.i(71459),e5=e.i(87939),e8=e.i(18528),e9=e.i(20020),te=e.i(9985),tt=e.i(15069);let tn=0;function tr(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;function a(){(!o||o())&&e?.focus({preventScroll:n})}if(cancelAnimationFrame(tn),r)return a(),ec.NOOP;let i=requestAnimationFrame(a);return tn=i,()=>{tn===i&&(cancelAnimationFrame(i),tn=0)}}let to={inert:new WeakMap,"aria-hidden":new WeakMap},ta="data-base-ui-inert",ti={inert:new WeakSet,"aria-hidden":new WeakSet},ts=new WeakMap,tl=0,tu=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?(0,eJ.isShadowRoot)(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),tc=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},td=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==(0,eJ.getNodeName)(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function tf(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,a=(0,e2.ownerDocument)(e[0]).body;return function(e,t,n,r,{mark:o=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let i=null,s=null,l=tu(t,e),u=o?td(t,tc(l),new Set(l)):[],c=[],d=[];if(a){let e=to[a],n=ti[a];s=n,i=e;let r=tu(t,Array.from(t.querySelectorAll("[aria-live]"))),o=l.concat(r);td(t,tc(o),new Set(o)).forEach(t=>{let r=t.getAttribute(a),o=null!==r&&"false"!==r,i=(e.get(t)||0)+1;e.set(t,i),c.push(t),1===i&&o&&n.add(t),o||t.setAttribute(a,"inert"===a?"":"true")})}return o&&u.forEach(e=>{let t=(ts.get(e)||0)+1;ts.set(e,t),d.push(e),1===t&&e.setAttribute(ta,"")}),tl+=1,()=>{i&&c.forEach(e=>{let t=(i.get(e)||0)-1;i.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),o&&d.forEach(e=>{let t=(ts.get(e)||0)-1;ts.set(e,t),t||e.removeAttribute(ta)}),(tl-=1)||(to.inert=new WeakMap,to["aria-hidden"]=new WeakMap,ti.inert=new WeakSet,ti["aria-hidden"]=new WeakSet,ts=new WeakMap)}}(e,a,n,r,{mark:o})}var tp=e.i(37692),th=e.i(41252),tm=e.i(6663),tg=e.i(44689);let tv=[];function tb(){tv=tv.filter(e=>e.deref()?.isConnected)}function tx(e){tb(),e&&"body"!==(0,eJ.getNodeName)(e)&&(tv.push(new WeakRef(e)),tv.length>20&&(tv=tv.slice(-20)))}function ty(){return tb(),tv[tv.length-1]?.deref()}function tE(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let t=(0,e8.focusable)(e).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return(0,e8.isTabbable)(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),n=e.getAttribute("tabindex");0===t.length?"0"!==n&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==n||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function tR(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:d="",nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:h,externalTree:m,getInsideElements:g}=e,v="rootStore"in t?t.rootStore:t,b=v.useState("open"),x=v.useState("domReferenceElement"),y=v.useState("floatingElement"),{events:E,dataRef:R}=v.context,S=(0,ea.useStableCallback)(()=>R.current.floatingContext?.nodeId),w=(0,e7.isTypeableCombobox)(x)&&!1===i,k=(0,e0.useValueAsRef)(i),C=(0,e0.useValueAsRef)(s),M=(0,e0.useValueAsRef)(d),T=(0,e0.useValueAsRef)(b),O=(0,th.useFloatingTree)(m),I=(0,tp.usePortalContext)(),N=a.useRef(!1),A=a.useRef(!1),P=a.useRef(!1),j=a.useRef(null),L=a.useRef(""),F=a.useRef(""),D=a.useRef(null),_=a.useRef(null),B=(0,eN.useMergedRefs)(D,h,I?.beforeInsideRef),W=(0,eN.useMergedRefs)(_,I?.afterInsideRef),H=(0,ep.useTimeout)(),U=(0,ep.useTimeout)(),z=(0,e1.useAnimationFrame)(),Y=null!=I,V=(0,e7.getFloatingFocusElement)(y),$=(0,ea.useStableCallback)((e=V)=>e?(0,e8.tabbable)(e):[]),K=(0,ea.useStableCallback)(()=>g?.().filter(e=>null!=e)??[]);a.useEffect(()=>{if(r||!u)return;let e=(0,e2.ownerDocument)(V);return(0,eZ.addEventListener)(e,"keydown",function(e){"Tab"===e.key&&(0,e6.contains)(V,(0,e6.activeElement)((0,e2.ownerDocument)(V)))&&0===$().length&&!w&&(0,e5.stopEvent)(e)})},[r,V,u,w,$]),a.useEffect(()=>{if(r||!b)return;let e=(0,e2.ownerDocument)(V);function t(){P.current=!1}return(0,eQ.mergeCleanups)((0,eZ.addEventListener)(e,"pointerdown",function(e){let t=(0,e6.getTarget)(e),n=K();P.current=!((0,e6.contains)(y,t)||(0,e6.contains)(x,t)||(0,e6.contains)(I?.portalNode,t)||n.some(e=>e===t||(0,e6.contains)(e,t))),F.current=e.pointerType||"keyboard",t?.closest(`[${tm.CLICK_TRIGGER_IDENTIFIER}]`)&&(A.current=!0,U.start(0,()=>{A.current=!1}))},!0),(0,eZ.addEventListener)(e,"pointerup",t,!0),(0,eZ.addEventListener)(e,"pointercancel",t,!0),(0,eZ.addEventListener)(e,"keydown",function(){F.current="keyboard"},!0),t)},[r,y,x,V,b,I,U,K]),a.useEffect(()=>{if(r||!c)return;let e=(0,e2.ownerDocument)(V);function t(t){let n=t.relatedTarget,r=t.currentTarget,o=(0,e6.getTarget)(t);u&&null==n&&null!=o&&(0,e6.contains)(y,o)&&tx(o),queueMicrotask(()=>{let a=S(),i=v.context.triggerElements,s=K(),c=n?.hasAttribute((0,tt.createAttribute)("focus-guard"))&&[D.current,_.current,I?.beforeInsideRef.current,I?.afterInsideRef.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,(0,tg.resolveRef)(p),(0,tg.resolveRef)(f)].includes(n),d=!((0,e6.contains)(x,n)||(0,e6.contains)(y,n)||(0,e6.contains)(n,y)||(0,e6.contains)(I?.portalNode,n)||s.some(e=>e===n||(0,e6.contains)(e,n))||null!=n&&i.hasElement(n)||i.hasMatchingElement(e=>(0,e6.contains)(e,n))||c||O&&((0,e9.getNodeChildren)(O.nodesRef.current,a).find(e=>(0,e6.contains)(e.context?.elements.floating,n)||(0,e6.contains)(e.context?.elements.domReference,n))||(0,e9.getNodeAncestors)(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,(0,e7.getFloatingFocusElement)(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===x&&V&&tE(V),l&&r!==x&&!(0,te.isElementVisible)(o)&&(0,e6.activeElement)(e)===e.body){if((0,eJ.isHTMLElement)(V)&&(V.focus(),"popup"===l))return void z.request(()=>{V.focus()});let e=$(),t=j.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||V;(0,eJ.isHTMLElement)(n)&&n.focus()}if(R.current.insideReactTree){R.current.insideReactTree=!1;return}(w||!u)&&n&&d&&!A.current&&(w||n!==ty())&&(N.current=!0,v.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.focusOut,t)))})}let n=(0,eJ.isHTMLElement)(x)?x:null;if(y||n)return(0,eQ.mergeCleanups)(n&&(0,eZ.addEventListener)(n,"focusout",t),n&&(0,eZ.addEventListener)(n,"pointerdown",function(){A.current=!0,U.start(0,()=>{A.current=!1})}),y&&(0,eZ.addEventListener)(y,"focusin",function(e){let t=(0,e6.getTarget)(e);(0,e8.isTabbable)(t)&&(j.current=t)}),y&&(0,eZ.addEventListener)(y,"focusout",t),y&&I&&(0,eZ.addEventListener)(y,"focusout",function(){P.current||(R.current.insideReactTree=!0,H.start(0,()=>{R.current.insideReactTree=!1}))},!0))},[r,x,y,V,u,O,I,v,c,l,$,w,S,R,H,U,z,f,p,K]),a.useEffect(()=>{if(r||!y||!b)return;let e=Array.from(I?.portalNode?.querySelectorAll(`[${(0,tt.createAttribute)("portal")}]`)||[]),t=O?(0,e9.getNodeAncestors)(O.nodesRef.current,S()):[],n=t.find(e=>(0,e7.isTypeableCombobox)(e.context?.elements.domReference||null))?.context?.elements.domReference,o=tf([y,...e,D.current,_.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,...K(),n,(0,tg.resolveRef)(p),(0,tg.resolveRef)(f),w?x:null].filter(e=>null!=e),{ariaHidden:u||w,mark:!1}),a=tf([y,...e].filter(e=>null!=e));return()=>{a(),o()}},[b,r,x,y,u,I,w,O,S,f,p,K]),(0,ei.useIsoLayoutEffect)(()=>{if(!b||r||!(0,eJ.isHTMLElement)(V))return;let e=(0,e2.ownerDocument)(V),t=(0,e6.activeElement)(e);queueMicrotask(()=>{let n,r=k.current,o="function"==typeof r?r(M.current||""):r;if(void 0===o||!1===o||(0,e6.contains)(V,t))return;let a=null,i=()=>(null==a&&(a=$(V)),a[0]||V);n=(n=!0===o||null===o?i():(0,tg.resolveRef)(o))||i();let s=(0,e6.contains)(V,(0,e6.activeElement)(e));tr(n,{preventScroll:n===V,shouldFocus(){if(!T.current)return!1;if(s)return!0;let t=(0,e6.activeElement)(e);return!(t!==n&&(0,e6.contains)(V,t))}})})},[r,b,V,$,k,M,T]),(0,ei.useIsoLayoutEffect)(()=>{if(r||!V)return;let e=(0,e2.ownerDocument)(V),t=(0,e6.activeElement)(e),n=null==M.current;function o(e){var t,n;let r;if(e.open||(t=e.nativeEvent,n=F.current,r=(0,e3.ownerWindow)((0,e6.getTarget)(t)),L.current=t instanceof r.KeyboardEvent?"keyboard":t instanceof r.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof r.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===eC.REASONS.triggerHover&&"mouseleave"===e.nativeEvent.type&&(N.current=!0),e.reason===eC.REASONS.outsidePress)if(e.nested)N.current=!1;else if((0,e5.isVirtualClick)(e.nativeEvent)||(0,e5.isVirtualPointerEvent)(e.nativeEvent))N.current=!1;else{let e=!1;(0,e2.ownerDocument)(V).createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}return tx(t),E.on("openchange",o),()=>{E.off("openchange",o);let r=(0,e6.activeElement)(e),a=K(),i=(0,e6.contains)(y,r)||a.some(e=>e===r||(0,e6.contains)(e,r))||O&&(0,e9.getNodeChildren)(O.nodesRef.current,S(),!1).some(e=>(0,e6.contains)(e.context?.elements.floating,r)),s=C.current,l=function(){let e=C.current,r="function"==typeof e?e(L.current):e;if(void 0===r||!1===r)return null;null===r&&(r=!0);let o=x?.isConnected?x:null,a=t?.isConnected&&"body"!==(0,eJ.getNodeName)(t)?t:null,i=n?a||o:o||a;return(i||(i=ty()||null),"boolean"==typeof r)?i:(0,tg.resolveRef)(r)||i||null}();queueMicrotask(()=>{let t=l?(0,e8.isTabbable)(l)?l:(0,e8.tabbable)(l)[0]||l:null;s&&!N.current&&(0,eJ.isHTMLElement)(t)&&("boolean"!=typeof s||t===r||r===e.body||i)&&t.focus({preventScroll:!0}),N.current=!1})}},[r,y,V,C,M,E,O,x,S,K]),(0,ei.useIsoLayoutEffect)(()=>{if(!eP.platform.engine.webkit||b||!y)return;let e=(0,e6.activeElement)((0,e2.ownerDocument)(y));(0,eJ.isHTMLElement)(e)&&(0,e7.isTypeableElement)(e)&&(0,e6.contains)(y,e)&&e.blur()},[b,y]),(0,ei.useIsoLayoutEffect)(()=>{if(!r&&I)return I.setFocusManagerState({modal:u,closeOnFocusOut:c,open:b,onOpenChange:v.setOpen,domReference:x}),()=>{I.setFocusManagerState(null)}},[r,I,u,b,v,c,x]),(0,ei.useIsoLayoutEffect)(()=>{if(!r&&V)return tE(V),()=>{queueMicrotask(tb)}},[r,V]);let G=!r&&(!u||!w)&&(Y||u);return(0,o.jsxs)(a.Fragment,{children:[G&&(0,o.jsx)(e4.FocusGuard,{"data-type":"inside",ref:B,onFocus:e=>{if(u){let e=$();tr(e[e.length-1])}else if(I?.portalNode)if(N.current=!1,(0,e8.isOutsideEvent)(e,I.portalNode)){let e=(0,e8.getNextTabbable)(x);e?.focus()}else(0,tg.resolveRef)(p??I.beforeOutsideRef)?.focus()}}),n,G&&(0,o.jsx)(e4.FocusGuard,{"data-type":"inside",ref:W,onFocus:e=>{if(u)tr($()[0]);else if(I?.portalNode)if(c&&(N.current=!0),(0,e8.isOutsideEvent)(e,I.portalNode)){let e=(0,e8.getPreviousTabbable)(x);e?.focus()}else(0,tg.resolveRef)(f??I.afterOutsideRef)?.focus()}})]})}var tS=e.i(62605);let tw=a.createContext(void 0),tk="ArrowUp",tC="ArrowDown",tM="ArrowLeft",tT="ArrowRight",tO="Home",tI=new Set([tM,tT]),tN=new Set([tM,tT,tO,"End"]),tA=new Set([tk,tC]),tP=new Set([tk,tC,tO,"End"]),tj=new Set([...tI,...tA]),tL=new Set([...tj,tO,"End"]),tF=new Set(["Shift","Control","Alt","Meta"]);function tD(e,t,n){let r="left"===n?"offsetLeft":"offsetTop",o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function t_(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}e.s(["ARROW_DOWN",0,tC,"ARROW_KEYS",0,tj,"ARROW_LEFT",0,tM,"ARROW_RIGHT",0,tT,"ARROW_UP",0,tk,"COMPOSITE_KEYS",0,tL,"END",0,"End","HOME",0,tO,"HORIZONTAL_KEYS",0,tI,"HORIZONTAL_KEYS_WITH_EXTRA_KEYS",0,tN,"MODIFIER_KEYS",0,tF,"VERTICAL_KEYS",0,tA,"VERTICAL_KEYS_WITH_EXTRA_KEYS",0,tP,"isNativeInput",0,function(e){return!!((0,eJ.isHTMLElement)(e)&&"INPUT"===e.tagName&&null!=e.selectionStart||(0,eJ.isHTMLElement)(e)&&"TEXTAREA"===e.tagName)},"scrollIntoViewIfNeeded",0,function(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,a=e.scrollTop,i=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(i&&"vertical"!==r){let r=tD(e,t,"left"),a=t_(e),i=t_(t);"ltr"===n&&(r+t.offsetWidth+i.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?o=r+t.offsetWidth+i.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-i.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(o=r-i.scrollMarginLeft-a.scrollPaddingLeft)),"rtl"===n&&(r-i.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?o=r-i.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+i.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(o=r+t.offsetWidth+i.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&"horizontal"!==r){let n=tD(e,t,"top"),r=t_(e),o=t_(t);n-o.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-o.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+o.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+o.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:o,top:a,behavior:"auto"})}],68504);var tB=e.i(51811);let tW={...eR.popupStateMapping,...el.transitionStatusMapping},tH=a.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:s,...l}=e,{store:u}=eE(),{side:c,align:d}=ex(),f=null!=function(e){let t=a.useContext(tw);if(void 0===t&&!e)throw Error((0,ee.default)(69));return t}(!0),p=u.useState("open"),h=u.useState("transitionStatus"),m=u.useState("popupProps"),g=u.useState("mounted"),v=u.useState("instantType"),b=u.useState("activeTriggerElement"),x=u.useState("parent"),y=u.useState("lastOpenChangeReason"),E=u.useState("rootId"),R=u.useState("floatingRootContext"),S=u.useState("floatingTreeRoot"),w=u.useState("closeDelay"),k=u.useState("activeTriggerElement"),C=u.useState("hoverEnabled"),M=u.useState("disabled"),T=u.useState("openMethod"),O="context-menu"===x.type;(0,es.useOpenChangeComplete)({open:p,ref:u.context.popupRef,onComplete(){p&&u.context.onOpenChangeComplete?.(!0)}}),a.useEffect(()=>{function e(e){u.setOpen(!1,(0,ez.createChangeEventDetails)(e.reason,e.domEvent))}return S.events.on("close",e),()=>{S.events.off("close",e)}},[S.events,u]),(0,tS.useHoverFloatingInteraction)(R,{enabled:C&&!M&&!O&&"menubar"!==x.type,closeDelay:w});let I=a.useCallback(e=>{u.set("popupElement",e)},[u]),N={transitionStatus:h,side:c,align:d,open:p,nested:"menu"===x.type,instant:v},A=(0,J.useRenderElement)("div",e,{state:N,ref:[t,u.context.popupRef,I],stateAttributesMapping:tW,props:[m,{onKeyDown(e){f&&tL.has(e.key)&&e.stopPropagation()}},(0,tB.getDisabledMountTransitionStyles)(h),l,{"data-rootownerid":E}]}),P=void 0===x.type||O;return(b||"menubar"===x.type&&y!==eC.REASONS.outsidePress)&&(P=!0),(0,o.jsx)(tR,{context:R,openInteractionType:T,modal:O,disabled:!g,returnFocus:void 0===s?P:s,initialFocus:"menu"!==x.type,restoreFocus:!0,externalTree:"menubar"!==x.type?S:void 0,previousFocusableElement:k,nextFocusableElement:void 0===x.type?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===x.type?u.context.beforeContentFocusGuardRef:void 0,children:A})}),tU=a.createContext(void 0),tz=a.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:a}=eE();return a.useState("mounted")||n?(0,o.jsx)(tU.Provider,{value:n,children:(0,o.jsx)(tp.FloatingPortal,{ref:t,...r})}):null});var tY=e.i(68042),tV=e.i(53334),t$=e.i(16484);function tK(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,s=(0,ea.useStableCallback)(i),l=a.useRef(0),u=(0,t$.useRefWithInit)(tq).current,c=(0,t$.useRefWithInit)(tG).current,[d,f]=a.useState(0),p=a.useRef(d),h=(0,ea.useStableCallback)((e,t)=>{c.set(e,t??null),p.current+=1,f(p.current)}),m=(0,ea.useStableCallback)(e=>{c.delete(e),p.current+=1,f(p.current)}),g=a.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(tX).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,d]);(0,ei.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===g.size)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(p.current+=1,f(p.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),(0,ei.useIsoLayoutEffect)(()=>{p.current===d&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),l.current=g.size),s(g)},[s,g,n,r,d]),(0,ei.useIsoLayoutEffect)(()=>()=>{n.current=[]},[n]),(0,ei.useIsoLayoutEffect)(()=>()=>{r&&(r.current=[])},[r]);let v=(0,ea.useStableCallback)(e=>(u.add(e),()=>{u.delete(e)}));(0,ei.useIsoLayoutEffect)(()=>{u.forEach(e=>e(g))},[u,g]);let b=a.useMemo(()=>({register:h,unregister:m,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:l}),[h,m,v,n,r,l]);return(0,o.jsx)(eD.Provider,{value:b,children:t})}function tG(){return new Map}function tq(){return new Set}function tX(e,t){let 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}e.s(["CompositeList",0,tK],93002);let tJ=a.forwardRef(function(e,t){let n,{cutout:r,...a}=e;if(r){let e=r.getBoundingClientRect();n=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,o.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...a,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})});var tZ=e.i(81214),tQ=e.i(8779),t0=e.i(77509);let t1={},t2={},t3="";class t4{lockCount=0;restore=null;timeoutLock=ep.Timeout.create();timeoutUnlock=ep.Timeout.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,n,r,o,a;if(0===this.lockCount||null!==this.restore)return;let i=(0,e2.ownerDocument)(e).documentElement,s=(0,e3.ownerWindow)(i).getComputedStyle(i).overflowY;if("hidden"===s||"clip"===s){this.restore=ec.NOOP;return}let l=eP.platform.os.ios||!function(e){if("u"<typeof document)return!1;let t=(0,e2.ownerDocument)(e);return(0,e3.ownerWindow)(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=l?(n=(t=(0,e2.ownerDocument)(e)).documentElement,r=t.body,a={overflowY:(o=(0,eJ.isOverflowElement)(n)?n:r).style.overflowY,overflowX:o.style.overflowX},Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,a)}):function(e){let t=(0,e2.ownerDocument)(e),n=t.documentElement,r=t.body,o=(0,e3.ownerWindow)(n),a=0,i=0,s=!1,l=e1.AnimationFrame.create();if(eP.platform.engine.webkit&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){let t=o.getComputedStyle(n),l=o.getComputedStyle(r),u=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,i=n.scrollLeft,t1={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},t3=n.style.scrollBehavior,t2={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};let c=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===l.overflowY,p="scroll"===t.overflowX||"scroll"===l.overflowX,h=Math.max(0,o.innerWidth-r.clientWidth),m=Math.max(0,o.innerHeight-r.clientHeight),g=parseFloat(l.marginTop)+parseFloat(l.marginBottom),v=parseFloat(l.marginLeft)+parseFloat(l.marginRight),b=(0,eJ.isOverflowElement)(n)?n:r;if(s=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=(0,e2.ownerDocument)(e),n=t.documentElement,r=t.body,o=(0,eJ.isOverflowElement)(n)?n:r,a=o.style.overflowY,i=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";let s=o.offsetWidth;o.style.overflowY="hidden";let l=o.offsetWidth;return o.style.overflowY=a,n.style.scrollbarGutter=i,s===l}(e)){n.style.scrollbarGutter=u,b.style.overflowY="hidden",b.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:u,overflowY:"hidden",overflowX:"hidden"}),(c||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:g||m?`calc(100dvh - ${g+m}px)`:"100dvh",width:v||h?`calc(100vw - ${v+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,t1),Object.assign(r.style,t2),s||(n.scrollTop=a,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=t3)}u();let d=(0,eZ.addEventListener)(o,"resize",function(){c(),l.request(u)});return()=>{l.cancel(),c(),"function"==typeof o.removeEventListener&&d()}}(e)}}let t6=new t4,t7=a.forwardRef(function(e,t){let{anchor:n,positionMethod:r="absolute",className:i,render:s,side:l,align:u,sideOffset:c=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:v=tm.DROPDOWN_COLLISION_AVOIDANCE,style:b,...x}=e,{store:y}=eE(),E=function(){let e=a.useContext(tU);if(void 0===e)throw Error((0,ee.default)(32));return e}(),R=ek(!0),S=y.useState("parent"),w=y.useState("floatingRootContext"),k=y.useState("floatingTreeRoot"),C=y.useState("mounted"),M=y.useState("open"),T=y.useState("modal"),O=y.useState("openMethod"),I=y.useState("activeTriggerElement"),N=y.useState("transitionStatus"),A=y.useState("positionerElement"),P=y.useState("instantType"),j=y.useState("hasViewport"),L=y.useState("lastOpenChangeReason"),F=y.useState("floatingNodeId"),D=y.useState("floatingParentNodeId"),_=w.useState("domReferenceElement"),B=a.useRef(null),W=(0,tQ.useAnimationsFinished)(A,!1,!1),H=n,U=c,z=d,Y=u,V=v;"context-menu"===S.type&&(H=n??S.context?.anchor,Y=Y??"start",l||"center"===Y||(z=e.alignOffset??2,U=e.sideOffset??-5));let $=l,K=Y;"menu"===S.type?($=$??"inline-end",K=K??"start",V=e.collisionAvoidance??tm.POPUP_COLLISION_AVOIDANCE):"menubar"===S.type&&($=$??("vertical"===S.context.orientation?"inline-end":"bottom"),K=K??"start");let G="context-menu"===S.type,q=(0,tV.useAnchorPositioning)({anchor:H,floatingRootContext:w,positionMethod:R?"fixed":r,mounted:C,side:$,sideOffset:U,align:K,alignOffset:z,arrowPadding:G?0:h,collisionBoundary:f,collisionPadding:p,sticky:m,nodeId:F,keepMounted:E,disableAnchorTracking:g,collisionAvoidance:V,shiftCrossAxis:G&&!("side"in V&&"flip"===V.side),externalTree:k,adaptiveOrigin:j?tZ.adaptiveOrigin:void 0});a.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===F&&y.set("hoverEnabled",!1),e.nodeId!==F&&e.parentNodeId===y.select("floatingParentNodeId")&&y.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.siblingOpen)))}return k.events.on("menuopenchange",e),()=>{k.events.off("menuopenchange",e)}},[y,k.events,F]),a.useEffect(()=>{if(null!=y.select("floatingParentNodeId"))return k.events.on("menuopenchange",e),()=>{k.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==y.select("floatingParentNodeId"))return;let t=e.reason??eC.REASONS.siblingOpen;y.setOpen(!1,(0,ez.createChangeEventDetails)(t))}},[k.events,y]);let X=(0,ep.useTimeout)();a.useEffect(()=>{M||X.clear()},[M,X]),a.useEffect(()=>{function e(e){if(M&&e.nodeId===y.select("floatingParentNodeId"))if(e.target&&I&&I!==e.target){let e=y.select("closeDelay");e>0?X.isStarted()||X.start(e,()=>{y.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.siblingOpen))}):y.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.siblingOpen))}else X.clear()}return k.events.on("itemhover",e),()=>{k.events.off("itemhover",e)}},[k.events,M,I,y,X]),a.useEffect(()=>{let e={open:M,nodeId:F,parentNodeId:D,reason:y.select("lastOpenChangeReason")};k.events.emit("menuopenchange",e)},[k.events,M,y,F,D]),(0,ei.useIsoLayoutEffect)(()=>{let e=B.current;if(_&&(B.current=_),e&&_&&_!==e){y.set("instantType",void 0);let e=new AbortController;return W(()=>{y.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[_,W,y]);let J={open:M,side:q.side,align:q.align,anchorHidden:q.anchorHidden,nested:"menu"===S.type,instant:P},Z="menubar"===S.type&&S.context.modal,Q=T&&L!==eC.REASONS.triggerHover;!function(e,t,n,r){let[o,i]=a.useState(!1);(0,ei.useIsoLayoutEffect)(()=>{if(!e||!t||null==n)return void i(!1);let r=(0,e2.ownerDocument)(n).documentElement.clientWidth,o=n.offsetWidth;i(r>0&&o>0&&o>=r-20)},[e,t,n]),function(e=!0,t=null){(0,ei.useIsoLayoutEffect)(()=>{if(e)return t6.acquire(t)},[e,t])}(e&&(!t||o),r)}(M&&(Z||Q),"touch"===O,A,I);let et=(0,t0.usePositioner)(e,J,{styles:q.positionerStyles,transitionStatus:N,props:x,refs:[t,y.useStateSetter("positionerElement")],hidden:!C,inert:!M}),en=C&&"menu"!==S.type&&("menubar"!==S.type&&T&&L!==eC.REASONS.triggerHover||"menubar"===S.type&&S.context.modal),er=null;return"menubar"===S.type?er=S.context.contentElement:void 0===S.type&&(er=I),(0,o.jsxs)(eb.Provider,{value:q,children:[en&&(0,o.jsx)(tJ,{ref:"context-menu"===S.type||"nested-context-menu"===S.type?S.context.internalBackdropRef:null,inert:(0,tY.inertValue)(!M),cutout:er}),(0,o.jsx)(th.FloatingNode,{id:F,children:(0,o.jsx)(tK,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:et})})]})}),t5=a.createContext(void 0),t8=a.memo(a.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:s,onValueChange:l,disabled:u=!1,style:c,"aria-labelledby":d,...f}=e,[p,h]=a.useState(void 0),[m,g]=(0,eO.useControlled)({controlled:i,default:s,name:"MenuRadioGroup"}),v=(0,ea.useStableCallback)((e,t)=>{l?.(e,t),t.isCanceled||g(e)}),b=(0,J.useRenderElement)("div",e,{state:{disabled:u},ref:t,props:{role:"group","aria-labelledby":d??p,"aria-disabled":u||void 0,...f}}),x=a.useMemo(()=>({value:m,setValue:v,disabled:u}),[m,v,u]);return(0,o.jsx)(e$.Provider,{value:h,children:(0,o.jsx)(t5.Provider,{value:x,children:b})})})),t9=a.createContext(void 0),ne=a.forwardRef(function(e,t){let{render:n,className:r,id:i,label:s,nativeButton:l=!1,disabled:u=!1,closeOnClick:c=!1,value:d,style:f,...p}=e,h=eB({label:s}),m=ex(!0),g=(0,eW.useBaseUiId)(i),{store:v}=eE(),b=v.useState("isActive",h.index),x=v.useState("itemProps"),{value:y,setValue:E,disabled:R}=function(){let e=a.useContext(t5);if(void 0===e)throw Error((0,ee.default)(34));return e}(),S=R||u,w=y===d,{getItemProps:k,itemRef:C}=eF({closeOnClick:c,disabled:S,highlighted:b,id:g,store:v,nativeButton:l,nodeId:m?.context.nodeId,itemMetadata:eL}),M=a.useMemo(()=>({disabled:S,highlighted:b,checked:w}),[S,b,w]),T=(0,J.useRenderElement)("div",e,{state:M,stateAttributesMapping:eU,props:[x,{role:"menuitemradio","aria-checked":w,onClick:function(e){E(d,(0,ez.createChangeEventDetails)(eC.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose(){}}))}},p,k],ref:[C,t,h.ref]});return(0,o.jsx)(t9.Provider,{value:M,children:T})}),nt=a.forwardRef(function(e,t){let{render:n,className:r,style:o,keepMounted:i=!1,...s}=e,l=function(){let e=a.useContext(t9);if(void 0===e)throw Error((0,ee.default)(35));return e}(),u=a.useRef(null),{transitionStatus:c,setMounted:d}=(0,eu.useTransitionStatus)(l.checked);(0,es.useOpenChangeComplete)({open:l.checked,ref:u,onComplete(){l.checked||d(!1)}});let f={checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:c};return(0,J.useRenderElement)("span",e,{state:f,stateAttributesMapping:eU,ref:[t,u],props:{"aria-hidden":!0,...s},enabled:i||l.checked})});var nn=e.i(70638),nr=e.i(21492),no=e.i(20225),na=e.i(15126);function ni(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ns(e,t){return ni(t,e===na.ARROW_UP||e===na.ARROW_DOWN,e===na.ARROW_LEFT||e===na.ARROW_RIGHT)}function nl(e,t,n){return ni(t,e===na.ARROW_DOWN,n?e===na.ARROW_LEFT:e===na.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}var nu=e.i(13256);let nc=a.createContext(null);function nd(e){let t=a.useContext(nc);if(null===t&&!e)throw Error((0,ee.default)(5));return t}var nf=e.i(98474),np=e.i(1076),nh=e.i(80517),nm=e.i(74904),ng=e.i(29674),nv=e.i(47673);let nb={...ng.popupStoreSelectors,disabled:(0,np.createSelector)(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:(0,np.createSelector)(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),openMethod:(0,np.createSelector)(e=>e.openMethod),allowMouseEnter:(0,np.createSelector)(e=>e.allowMouseEnter),highlightItemOnHover:(0,np.createSelector)(e=>e.highlightItemOnHover),stickIfOpen:(0,np.createSelector)(e=>e.stickIfOpen),parent:(0,np.createSelector)(e=>e.parent),rootId:(0,np.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:(0,np.createSelector)(e=>e.activeIndex),isActive:(0,np.createSelector)((e,t)=>e.activeIndex===t),hoverEnabled:(0,np.createSelector)(e=>e.hoverEnabled),instantType:(0,np.createSelector)(e=>e.instantType),lastOpenChangeReason:(0,np.createSelector)(e=>e.openChangeReason),floatingTreeRoot:(0,np.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:(0,np.createSelector)(e=>e.floatingNodeId),floatingParentNodeId:(0,np.createSelector)(e=>e.floatingParentNodeId),itemProps:(0,np.createSelector)(e=>e.itemProps),closeDelay:(0,np.createSelector)(e=>e.closeDelay),hasViewport:(0,np.createSelector)(e=>e.hasViewport),keyboardEventRelay:(0,np.createSelector)(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class nx extends nh.ReactStore{constructor(e){super({...{...(0,ng.createInitialPopupStoreState)(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new nm.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ec.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:a.createRef(),popupRef:a.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:a.createRef(),beforeContentFocusGuardRef:a.createRef(),onOpenChangeComplete:void 0,triggerElements:new nv.PopupTriggerMap},nb),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let o=e.store.select("rootId"),a=e.store.select("floatingTreeRoot"),i=e.store.select("keyboardEventRelay");(t!==o||n!==a||r!==i)&&(t=o,n=a,r=i,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){let n=(0,t$.useRefWithInit)(()=>new nx(t)).current;return e??n}unsubscribeParentListener=null}var ny=e.i(73882);let nE=a.createContext(void 0);function nR(){return a.useContext(nE)}let nS=(0,nr.fastComponent)(function(e){let t,{children:n,open:r,onOpenChange:i,onOpenChangeComplete:s,defaultOpen:l=!1,disabled:u=!1,modal:c,loopFocus:d=!0,orientation:f="vertical",actionsRef:p,closeParentOnEsc:h=!1,handle:m,triggerId:g,defaultTriggerId:v=null,highlightItemOnHover:b=!0}=e,x=ek(!0),y=eE(!0),E=nd(!0),R=nR(),S=a.useMemo(()=>R&&y?{type:"menu",store:y.store}:E?{type:"menubar",context:E}:x&&!y?{type:"context-menu",context:x}:{type:void 0},[x,y,E,R]),w=nx.useStore(m?.store,{open:l,openProp:r,activeTriggerId:v,triggerIdProp:g,parent:S});(0,ny.useInitialOpenSync)(w,r,l,v),w.useControlledProp("openProp",r),w.useControlledProp("triggerIdProp",g),w.useContextCallback("onOpenChangeComplete",s);let k=(0,nn.useId)(),C=(0,nn.useId)(),M=w.useState("floatingTreeRoot"),T=(0,th.useFloatingNodeId)(M),O=(0,th.useFloatingParentNodeId)(),I=w.useState("open"),N=w.useState("activeTriggerElement"),A=w.useState("positionerElement"),P=w.useState("hoverEnabled"),j=w.useState("disabled"),L=w.useState("lastOpenChangeReason"),F=w.useState("parent"),D=w.useState("activeIndex"),_=w.useState("payload"),B=w.useState("floatingParentNodeId"),W=a.useRef(null),H=a.useRef("context-menu"!==F.type),U=(0,ep.useTimeout)(),z=a.useRef(!0),Y=(0,ep.useTimeout)(),V=null!=B,{openMethod:$,triggerProps:K}=function(e){var t;let n,r,[o,i]=a.useState(null),s=function(e,t){var n;let r,o,{onClick:i,onPointerDown:s}=(n=(0,ea.useStableCallback)((n,r)=>{("function"==typeof e?e():e)||t(r||(eP.platform.os.ios?"touch":""))}),r=a.useRef(""),o=a.useCallback(e=>{e.defaultPrevented||(r.current=e.pointerType,n(e,e.pointerType))},[n]),{onClick:a.useCallback(e=>{0===e.detail?n(e,"keyboard"):("pointerType"in e?n(e,e.pointerType):n(e,r.current),r.current="")},[n]),onPointerDown:o});return a.useMemo(()=>({onClick:i,onPointerDown:s}),[i,s])}(e,i);return t=t=>{t&&!e&&i(null)},n=a.useRef(e),r=(0,ea.useStableCallback)(t),(0,ei.useIsoLayoutEffect)(()=>{n.current!==e&&r(n.current)},[e,r]),(0,ei.useIsoLayoutEffect)(()=>{n.current=e},[e]),a.useMemo(()=>({openMethod:o,triggerProps:s}),[o,s])}(I);w.useSyncedValues({disabled:u,highlightItemOnHover:b,modal:void 0===F.type?c:void 0,openMethod:$,rootId:k}),(0,ny.useImplicitActiveTrigger)(w);let{forceUnmount:G}=(0,ny.useOpenStateTransitions)(I,w,()=>{w.update({allowMouseEnter:!1,stickIfOpen:!0})});(0,ei.useIsoLayoutEffect)(()=>{x&&!y?w.update({parent:{type:"context-menu",context:x},floatingNodeId:T,floatingParentNodeId:O}):y&&w.update({floatingNodeId:T,floatingParentNodeId:O})},[x,y,T,O,w]),a.useEffect(()=>{if(I||(W.current=null),"context-menu"===F.type){if(!I){U.clear(),H.current=!1;return}U.start(500,()=>{H.current=!0})}},[U,I,F.type]),(0,ei.useIsoLayoutEffect)(()=>{I||P||w.set("hoverEnabled",!0)},[I,P,w]);let q=(0,ea.useStableCallback)((e,t)=>{let n=t.reason;if(I===e&&t.trigger===N&&L===n)return;let r=(0,ny.attachPreventUnmountOnClose)(t);if(e||null!=t.trigger||(t.trigger=N??void 0),i?.(e,t),t.isCanceled)return;w.state.floatingRootContext.dispatchOpenChange(e,t);let o=t.event;if(!1===e&&o?.type==="click"&&"touch"===o.pointerType&&!z.current)return;e&&n===eC.REASONS.triggerFocus?(z.current=!1,Y.start(300,()=>{z.current=!0})):(z.current=!0,Y.clear());let a=(n===eC.REASONS.triggerPress||n===eC.REASONS.itemPress)&&0===o.detail&&o?.isTrusted,s=!e&&(n===eC.REASONS.escapeKey||null==n),l={open:e,openChangeReason:n};W.current=t.event??null,(0,ny.setPopupOpenState)(l,e,t.trigger,r()),w.update(l),"menubar"===F.type&&(n===eC.REASONS.triggerFocus||n===eC.REASONS.focusOut||n===eC.REASONS.triggerHover||n===eC.REASONS.listNavigation||n===eC.REASONS.siblingOpen)?w.set("instantType","group"):a||s?w.set("instantType",a?"click":"dismiss"):w.set("instantType",void 0)}),J=(0,nu.useSyncedFloatingRootContext)({popupStore:w,floatingId:C,nested:null!=O,onOpenChange:q}),Z=J.context.events;a.useEffect(()=>{let e=({open:e,eventDetails:t})=>q(e,t);return Z.on("setOpen",e),()=>{Z?.off("setOpen",e)}},[Z,q]);let Q=a.useCallback(()=>{w.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.imperativeAction))},[w]);a.useImperativeHandle(p,()=>({unmount:G,close:Q}),[G,Q]),"context-menu"===F.type&&(t=F.context),a.useImperativeHandle(t?.positionerRef,()=>A,[A]),a.useImperativeHandle(t?.actionsRef,()=>({setOpen:q}),[q]);let ee=(0,no.useDismiss)(J,{enabled:!j,bubbles:{escapeKey:h&&"menu"===F.type},outsidePress:()=>"context-menu"!==F.type||W.current?.type==="contextmenu"||H.current,externalTree:V?M:void 0}),et=(0,nf.useDirection)(),en=a.useCallback(e=>{w.select("activeIndex")!==e&&w.set("activeIndex",e)},[w]),er=function(e,t){let{listRef:n,activeIndex:r,onNavigate:o=()=>{},enabled:i=!0,selectedIndex:s=null,allowEscape:l=!1,loopFocus:u=!1,nested:c=!1,rtl:d=!1,virtual:f=!1,focusItemOnOpen:p="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:m=!0,disabledIndices:g,orientation:v="vertical",parentOrientation:b,id:x,resetOnPointerLeave:y=!0,externalTree:E,grid:R}=t,S=null!=R,w="rootStore"in e?e.rootStore:e,k=w.useState("open"),C=w.useState("floatingElement"),M=w.useState("domReferenceElement"),T=w.context.dataRef,O=(0,e7.getFloatingFocusElement)(C),I=(0,e7.isTypeableCombobox)(M),N=(0,e0.useValueAsRef)(O),A=(0,th.useFloatingParentNodeId)(),P=(0,th.useFloatingTree)(E),j=a.useRef(p),L=a.useRef(s??-1),F=a.useRef(null),D=a.useRef(!0),_=(0,ea.useStableCallback)(e=>{o(-1===L.current?null:L.current,e)}),B=a.useRef(!!C),W=a.useRef(k),H=a.useRef(!1),U=a.useRef(!1),z=a.useRef(null),Y=(0,e0.useValueAsRef)(g),V=(0,e0.useValueAsRef)(k),$=(0,e0.useValueAsRef)(s),K=(0,e0.useValueAsRef)(y),G=(0,e1.useAnimationFrame)(),q=(0,e1.useAnimationFrame)(),X=(0,ea.useStableCallback)(()=>{function e(e){f?P?.events.emit("virtualfocus",e):z.current=tr(e,{sync:H.current,preventScroll:!0})}let t=n.current[L.current],r=U.current;t&&e(t),(H.current?e=>e():e=>G.request(e))(()=>{let o=n.current[L.current]||t;!o||(t||e(o),en&&(r||!D.current)&&o.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,ei.useIsoLayoutEffect)(()=>{T.current.orientation=v},[T,v]),(0,ei.useIsoLayoutEffect)(()=>{i&&(k&&C?(L.current=s??-1,j.current&&null!=s&&(U.current=!0,_())):B.current&&(L.current=-1,_()))},[i,k,C,s,_]),(0,ei.useIsoLayoutEffect)(()=>{if(i){if(!k){H.current=!1;return}if(C)if(null==r){if(H.current=!1,null!=$.current)return;if(B.current&&(L.current=-1,X()),(!W.current||!B.current)&&j.current&&(null!=F.current||!0===j.current&&null==F.current)){let e=0,t=()=>{null==n.current[0]?(e<2&&(e?e=>q.request(e):queueMicrotask)(t),e+=1):(L.current=null==F.current||nl(F.current,v,d)||c?(0,te.getMinListIndex)(n):(0,te.getMaxListIndex)(n),F.current=null,_())};t()}}else(0,te.isIndexOutOfListBounds)(n.current,r)||(L.current=r,X(),U.current=!1)}},[i,k,C,r,$,c,n,v,d,_,X,q]),(0,ei.useIsoLayoutEffect)(()=>{if(!i||C||!P||f||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===A)?.context?.elements.floating,n=(0,e6.activeElement)((0,e2.ownerDocument)(M??t??null)),r=e.some(e=>e.context&&(0,e6.contains)(e.context.elements.floating,n));t&&!r&&D.current&&t.focus({preventScroll:!0})},[i,C,M,P,A,f]),(0,ei.useIsoLayoutEffect)(()=>{W.current=k,B.current=!!C}),(0,ei.useIsoLayoutEffect)(()=>{k||(F.current=null,j.current=p)},[k,p]);let J=null!=r,Z=(0,ea.useStableCallback)(e=>{if(!V.current)return;let t=n.current.indexOf(e.currentTarget);-1!==t&&(L.current!==t||r!==t)&&(L.current=t,_(e))}),Q=(0,ea.useStableCallback)(()=>b??P?.nodesRef.current.find(e=>e.id===A)?.context?.dataRef?.current.orientation),ee=(0,ea.useStableCallback)(()=>(0,te.getMinListIndex)(n,Y.current)),et=(0,ea.useStableCallback)(e=>{var t;let r,o;if(D.current=!1,H.current=!0,229===e.which||!V.current&&e.currentTarget===N.current)return;if(c&&(t=e.key,r=d?t===na.ARROW_RIGHT:t===na.ARROW_LEFT,o=t===na.ARROW_UP,"both"===v||"horizontal"===v&&S?"Escape"===t:ni(v,r,o))){ns(e.key,Q())||(0,e5.stopEvent)(e),w.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.listNavigation,e.nativeEvent)),(0,eJ.isHTMLElement)(M)&&(f?P?.events.emit("virtualfocus",M):M.focus());return}let a=L.current,i=(0,te.getMinListIndex)(n,g),s=(0,te.getMaxListIndex)(n,g);if(I||("Home"===e.key&&((0,e5.stopEvent)(e),L.current=i,_(e)),"End"===e.key&&((0,e5.stopEvent)(e),L.current=s,_(e))),null!=R){let t=R(e,L.current,n,v,u,d,g,i,s);if(null!=t&&(L.current=t,_(e)),"both"===v)return}if(ns(e.key,v)){if((0,e5.stopEvent)(e),k&&!f&&(0,e6.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){L.current=nl(e.key,v,d)?i:s,_(e);return}nl(e.key,v,d)?u?a>=s?l&&a!==n.current.length?L.current=-1:(H.current=!1,L.current=i):L.current=(0,te.findNonDisabledListIndex)(n.current,{startingIndex:a,disabledIndices:g}):L.current=Math.min(s,(0,te.findNonDisabledListIndex)(n.current,{startingIndex:a,disabledIndices:g})):u?a<=i?l&&-1!==a?L.current=n.current.length:(H.current=!1,L.current=s):L.current=(0,te.findNonDisabledListIndex)(n.current,{startingIndex:a,decrement:!0,disabledIndices:g}):L.current=Math.max(i,(0,te.findNonDisabledListIndex)(n.current,{startingIndex:a,decrement:!0,disabledIndices:g})),(0,te.isIndexOutOfListBounds)(n.current,L.current)&&(L.current=-1),_(e)}}),en=a.useMemo(()=>({onFocus(e){H.current=!0,Z(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){H.current=!0,U.current=!1,h&&Z(e)},onPointerLeave(e){if(!V.current||!D.current||"touch"===e.pointerType)return;H.current=!0;let t=e.relatedTarget;if(!(!h||n.current.includes(t))&&K.current&&(z.current?.(),z.current=null,L.current=-1,_(e),!f)){let e=N.current,t=(0,e6.activeElement)((0,e2.ownerDocument)(e));e&&(0,e6.contains)(e,t)&&e.focus({preventScroll:!0})}}}),[Z,V,N,h,n,_,K,f]),er=a.useMemo(()=>f&&k&&J&&{"aria-activedescendant":`${x}-${r}`},[f,k,J,x,r]),eo=a.useMemo(()=>({"aria-orientation":"both"===v?void 0:v,...!I?er:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&k&&!f){let t=(0,e6.getTarget)(e.nativeEvent);if(t&&!(0,e6.contains)(N.current,t))return;(0,e5.stopEvent)(e),w.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.focusOut,e.nativeEvent)),(0,eJ.isHTMLElement)(M)&&M.focus();return}et(e)},onPointerMove(){D.current=!0}}),[er,et,N,v,I,w,k,f,M]),es=a.useMemo(()=>{function e(e){w.setOpen(!0,(0,ez.createChangeEventDetails)(eC.REASONS.listNavigation,e.nativeEvent,e.currentTarget))}function t(e){"auto"===p&&(0,e5.isVirtualClick)(e.nativeEvent)&&(j.current=!f)}function n(e){j.current=p,"auto"===p&&(0,e5.isVirtualPointerEvent)(e.nativeEvent)&&(j.current=!0)}return{onKeyDown(t){var n,r;let o=w.select("open");D.current=!1;let a=t.key.startsWith("Arrow"),i=(n=t.key,r=Q(),ni(r,d?n===na.ARROW_LEFT:n===na.ARROW_RIGHT,n===na.ARROW_DOWN)),s=ns(t.key,v),l=(c?i:s)||"Enter"===t.key||""===t.key.trim();if(f&&o)return et(t);if(o||m||!a){if(l){let e=ns(t.key,Q());F.current=c&&e?null:t.key}if(c){i&&((0,e5.stopEvent)(t),o?(L.current=ee(),_(t)):e(t));return}s&&(null!=$.current&&(L.current=$.current),(0,e5.stopEvent)(t),!o&&m?e(t):et(t),o&&_(t))}},onFocus(e){w.select("open")&&!f&&(L.current=-1,_(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[et,p,ee,c,_,w,m,v,Q,d,$,f]),el=a.useMemo(()=>({...er,...es}),[er,es]);return a.useMemo(()=>i?{reference:el,floating:eo,item:en,trigger:es}:{},[i,el,eo,es,en])}(J,{enabled:!j,listRef:w.context.itemDomElements,activeIndex:D,nested:void 0!==F.type,loopFocus:d,orientation:f,parentOrientation:"menubar"===F.type?F.context.orientation:void 0,rtl:"rtl"===et,disabledIndices:ec.EMPTY_ARRAY,onNavigate:en,openOnArrowKeyDown:"context-menu"!==F.type,externalTree:V?M:void 0,focusItemOnHover:b}),eo=a.useCallback(e=>{w.context.typingRef.current=e},[w]),es=function(e,t){let{listRef:n,elementsRef:r,activeIndex:o,onMatch:i,disabledIndices:s,onTyping:l,enabled:u=!0,resetMs:c=750,selectedIndex:d=null}=t,f="rootStore"in e?e.rootStore:e,p=f.useState("open"),h=(0,ep.useTimeout)(),m=a.useRef(""),g=a.useRef(d??o??-1),v=a.useRef(null),b=(0,ea.useStableCallback)(e=>{function t(e){let t;return!!(!(t=r?.current[e])||(0,te.isElementVisible)(t))&&(null==s||!(0,te.isListIndexDisabled)(ec.EMPTY_ARRAY,e,s))}function a(e,n,r=0){if(0===e.length)return -1;let o=(r%e.length+e.length)%e.length,i=n.toLowerCase();for(let n=0;n<e.length;n+=1){let r=(o+n)%e.length,a=e[r];if(a?.toLowerCase().startsWith(i)&&t(r))return r}return -1}let u=n.current;if(m.current.length>0&&" "===e.key&&((0,e5.stopEvent)(e),l?.(!0)),m.current.length>0&&" "!==m.current[0]&&-1===a(u,m.current)&&" "!==e.key&&l?.(!1),null==u||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;p&&" "!==e.key&&((0,e5.stopEvent)(e),l?.(!0));let f=""===m.current;f&&(g.current=d??o??-1),u.every((e,n)=>!(e&&t(n))||e[0]?.toLowerCase()!==e[1]?.toLowerCase())&&m.current===e.key&&(m.current="",g.current=v.current),m.current+=e.key,h.start(c,()=>{m.current="",g.current=v.current,l?.(!1)});let b=f?d??o??-1:g.current,x=a(u,m.current,(b??0)+1);-1!==x?(i?.(x),v.current=x):" "!==e.key&&(m.current="",l?.(!1))}),x=(0,ea.useStableCallback)(e=>{let t=e.relatedTarget,n=f.select("domReferenceElement"),r=f.select("floatingElement");(0,e6.contains)(n,t)||(0,e6.contains)(r,t)||(h.clear(),m.current="",g.current=v.current,l?.(!1))});(0,ei.useIsoLayoutEffect)(()=>{(p||null===d)&&(h.clear(),v.current=null,""!==m.current&&(m.current=""))},[p,d,h]),(0,ei.useIsoLayoutEffect)(()=>{p&&""===m.current&&(g.current=d??o??-1)},[p,d,o]);let y=a.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return a.useMemo(()=>u?{reference:y,floating:y}:{},[u,y])}(J,{enabled:!j,listRef:w.context.itemLabels,elementsRef:w.context.itemDomElements,activeIndex:D,resetMs:tm.TYPEAHEAD_RESET_MS,onMatch:e=>{I&&e!==D&&w.set("activeIndex",e)},onTyping:eo}),el=a.useMemo(()=>{let e=(0,X.mergeProps)(es.reference,er.reference,ee.reference,{onMouseMove(){w.set("allowMouseEnter",!0)}},K);return e["aria-haspopup"]="menu",e["aria-expanded"]=I,e},[w,es.reference,er.reference,ee.reference,K,I]),eu=a.useMemo(()=>{let e=(0,X.mergeProps)(er.trigger,ee.trigger,K);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e},[er.trigger,ee.trigger,K]),ed=a.useMemo(()=>(0,X.mergeProps)(ny.FOCUSABLE_POPUP_PROPS,{id:C,role:"menu","aria-labelledby":N?.id,onMouseMove(){w.set("allowMouseEnter",!0),"menu"===F.type&&w.set("hoverEnabled",!1)},onClick(){w.select("hoverEnabled")&&w.set("hoverEnabled",!1)},onKeyDown(e){let t=w.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},es.floating,er.floating,ee.floating),[N,C,F.type,w,es.floating,er.floating,ee.floating]),ef=er.item??ec.EMPTY_OBJECT;(0,ny.usePopupInteractionProps)(w,{floatingRootContext:J,activeTriggerProps:el,inactiveTriggerProps:eu,popupProps:ed,itemProps:ef});let eh=a.useMemo(()=>({store:w,parent:S}),[w,S]),em=(0,o.jsx)(ey.Provider,{value:eh,children:"function"==typeof n?n({payload:_}):n});return void 0===F.type||"context-menu"===F.type?(0,o.jsx)(th.FloatingTree,{externalTree:M,children:em}):em});var nw=e.i(76156);function nk(e,t={}){let{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:l=0,reason:u=eC.REASONS.triggerPress}=t,c="rootStore"in e?e.rootStore:e,d=c.context.dataRef,f=a.useRef(void 0),p=(0,e1.useAnimationFrame)(),h=(0,ep.useTimeout)(),m=a.useMemo(()=>{function e(e,t,n,r){let o=(0,ez.createChangeEventDetails)(u,t,n);e&&"touch"===r&&l>0?h.start(l,()=>{c.setOpen(!0,o)}):c.setOpen(e,o)}function t(e,t,n){let r=d.current.openEvent,a=c.select("domReferenceElement")!==t;return!!e&&!!a||!e||!o||!!r&&!!s&&!n(r.type)}return{onPointerDown(e){f.current=e.pointerType},onMouseDown(n){let o=f.current,a=n.nativeEvent,s=c.select("open");if(0!==n.button||"click"===r||(0,e5.isMouseLikePointerType)(o,!0)&&i)return;let l=t(s,n.currentTarget,e=>"click"===e||"mousedown"===e),u=(0,e6.getTarget)(a);if((0,e7.isTypeableElement)(u))return void e(l,a,u,o);let d=n.currentTarget;p.request(()=>{e(l,a,d,o)})},onClick(n){if("mousedown-only"===r)return;let o=f.current;if("mousedown"===r&&o){f.current=void 0;return}(0,e5.isMouseLikePointerType)(o,!0)&&i||e(t(c.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,o)},onKeyDown(){f.current=void 0}}},[d,r,i,u,c,s,o,p,h,l]);return a.useMemo(()=>n?{reference:m}:ec.EMPTY_OBJECT,[n,m])}var nC=e.i(76252),nM=e.i(44994),nT=e.i(84573);function nO(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=(0,nT.useCompositeRootContext)(),{ref:o,index:i}=eB(e),s=n===i,l=a.useRef(null),u=(0,eN.useMergedRefs)(o,l);return{compositeProps:{tabIndex:s?0:-1,onFocus(){r(i)},onMouseMove(){let e=l.current;if(!t||!e)return;let n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;s||n||e.focus()}},compositeRef:u,index:i}}function nI(e){let{render:t,className:n,style:r,state:o=ec.EMPTY_OBJECT,props:a=ec.EMPTY_ARRAY,refs:i=ec.EMPTY_ARRAY,metadata:s,stateAttributesMapping:l,tag:u="div",...c}=e,{compositeProps:d,compositeRef:f}=nO({metadata:s});return(0,J.useRenderElement)(u,e,{state:o,ref:[...i,f],props:[d,...a,c],stateAttributesMapping:l})}e.s(["useCompositeItem",0,nO],54412);var nN=e.i(41652);let nA=(0,nr.fastComponentRef)(function(e,t){let n,r,i,s,{render:l,className:u,style:c,disabled:d=!1,nativeButton:f=!0,id:p,openOnHover:h,delay:m=100,closeDelay:g=0,handle:v,payload:b,...x}=e,y=eE(!0),E=v?.store??y?.store;if(!E)throw Error((0,ee.default)(85));let R=(0,eW.useBaseUiId)(p),S=E.useState("isTriggerActive",R),w=E.useState("floatingRootContext"),k=E.useState("isOpenedByTrigger",R),C=E.useState("triggerPopupId",R),M=a.useRef(null),T=(n=ek(!0),r=eE(!0),i=nd(!0),a.useMemo(()=>i?{type:"menubar",context:i}:n&&!r?{type:"context-menu",context:n}:{type:void 0},[n,r,i])),O=(0,nT.useCompositeRootContext)(!0),I=(0,th.useFloatingTree)(),N=a.useMemo(()=>I??new nm.FloatingTreeStore,[I]),A=(0,th.useFloatingNodeId)(N),P=(0,th.useFloatingParentNodeId)(),{registerTrigger:j,isMountedByThisTrigger:L}=(0,ny.useTriggerDataForwarding)(R,M,E,{payload:b,closeDelay:g,parent:T,floatingTreeRoot:N,floatingNodeId:A,floatingParentNodeId:P,keyboardEventRelay:O?.relayKeyboardEvent}),F="menubar"===T.type,D=E.useState("disabled"),_=d||D||F&&T.context.disabled,{getButtonProps:B,buttonRef:W}=(0,eA.useButton)({disabled:_,native:f});a.useEffect(()=>{k||void 0!==T.type||(E.context.allowMouseUpTriggerRef.current=!1)},[E,k,T.type]);let H=a.useRef(null),U=(0,ep.useTimeout)(),z=(0,ea.useStableCallback)(e=>{if(!H.current)return;U.clear(),E.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if((0,e6.contains)(H.current,t)||(0,e6.contains)(E.select("positionerElement"),t)||t===H.current||null!=t&&function e(t){return(0,eJ.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid")??void 0:(0,eJ.isLastTraversableNode)(t)?void 0:e((0,eJ.getParentNode)(t))}(t)===E.select("rootId"))return;let n=function(e){let t=e.getBoundingClientRect(),n=(0,e3.ownerWindow)(e);if(eP.platform.env.jsdom)return t;let r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if("none"===r.content&&"none"===o.content)return t;let a=parseFloat(r.width)||0,i=parseFloat(r.height)||0,s=parseFloat(o.width)||0,l=parseFloat(o.height)||0,u=Math.max(t.width,a,s),c=Math.max(t.height,i,l),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}(H.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||N.events.emit("close",{domEvent:e,reason:eC.REASONS.cancelOpen})});a.useEffect(()=>{k&&E.select("lastOpenChangeReason")===eC.REASONS.triggerHover&&(0,e2.ownerDocument)(H.current).addEventListener("mouseup",z,{once:!0})},[k,z,E]);let Y=F&&T.context.hasSubmenuOpen,V=h??Y,$=(0,nM.useHoverReferenceInteraction)(w,{enabled:V&&!_&&"context-menu"!==T.type&&(!F||Y&&!L),handleClose:(0,nw.safePolygon)({blockPointerEvents:!F}),mouseOnly:!0,move:!1,restMs:void 0===T.type?m:void 0,delay:{close:g},triggerElementRef:M,externalTree:N,isActiveTrigger:S,isClosing:()=>"ending"===E.select("transitionStatus")}),K=function(e,t){let n=(0,ep.useTimeout)(),[r,o]=a.useState(!1);return(0,ei.useIsoLayoutEffect)(()=>{e&&"trigger-hover"===t?(o(!0),n.start(tm.PATIENT_CLICK_THRESHOLD,()=>{o(!1)})):e||(n.clear(),o(!1))},[e,t,n]),r}(k,E.select("lastOpenChangeReason")),G=nk(w,{enabled:!_&&"context-menu"!==T.type,event:k&&F?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===T.type&&K}),q=(0,nC.useFocus)(w,{enabled:!_&&Y}),Z=function(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,o=a.useRef(!1);return a.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!r||"close"===n&&r)&&(o.current=!0,(0,e2.ownerDocument)(e.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:e=>{o.current&&(o.current=!1,e.preventBaseUIHandler())}}:ec.EMPTY_OBJECT,[t,n,r])}({open:k,enabled:F,mouseDownAction:"open"}),Q=a.useMemo(()=>(0,X.mergeProps)(q.reference,G.reference),[q.reference,G.reference]),et=E.useState("triggerProps",L),{preFocusGuardRef:en,handlePreFocusGuardFocus:er,handleFocusTargetFocus:eo}={preFocusGuardRef:s=a.useRef(null),handlePreFocusGuardFocus:function(e){nN.flushSync(()=>{E.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,e8.getTabbableBeforeElement)(s.current);t?.focus()},handleFocusTargetFocus:function(e){let t=E.select("positionerElement");if(t&&(0,e8.isOutsideEvent)(e,t))E.context.beforeContentFocusGuardRef.current?.focus();else{nN.flushSync(()=>{E.setOpen(!1,(0,ez.createChangeEventDetails)(eC.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,e8.getTabbableAfterElement)(E.context.triggerFocusTargetRef.current||M.current);for(;null!==n&&(0,e6.contains)(t,n);){let e=n;if((n=(0,e8.getNextTabbable)(n))===e)break}n?.focus()}}},es={disabled:_,open:k},el=[H,t,W,j,M],eu=[Q,$??ec.EMPTY_OBJECT,et,{"aria-haspopup":"menu","aria-controls":C,id:R,onMouseDown:e=>{E.select("open")||(U.start(200,()=>{E.context.allowMouseUpTriggerRef.current=!0}),(0,e2.ownerDocument)(e.currentTarget).addEventListener("mouseup",z,{once:!0}))}},F?{role:"menuitem"}:{},Z,x,B],ed=(0,J.useRenderElement)("button",e,{enabled:!F,stateAttributesMapping:eR.pressableTriggerOpenStateMapping,state:es,ref:el,props:eu});return F?(0,o.jsx)(nI,{tag:"button",render:l,className:u,style:c,state:es,refs:el,props:eu,stateAttributesMapping:eR.pressableTriggerOpenStateMapping}):k?(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(e4.FocusGuard,{ref:en,onFocus:er},`${R}-pre-focus-guard`),(0,o.jsx)(a.Fragment,{children:ed},R),(0,o.jsx)(e4.FocusGuard,{ref:E.context.triggerFocusTargetRef,onFocus:eo},`${R}-post-focus-guard`)]}):(0,o.jsx)(a.Fragment,{children:ed},R)});var nP=e.i(19442);let nj=((r={}).popupWidth="--popup-width",r.popupHeight="--popup-height",r),nL={activationDirection:e=>e?{"data-activation-direction":e}:null},nF=a.forwardRef(function(e,t){let{render:n,className:r,style:o,children:a,...i}=e,{store:s}=eE(),{side:l}=ex(),u=s.useState("instantType"),{children:c,state:d}=(0,nP.usePopupViewport)({store:s,side:l,cssVars:nj,children:a}),f={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:u};return(0,J.useRenderElement)("div",e,{state:f,ref:t,props:[i,{children:c}],stateAttributesMapping:nL})}),nD=a.forwardRef(function(e,t){let{className:n,render:r,orientation:o="horizontal",style:a,...i}=e;return(0,J.useRenderElement)("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});e.s(["Separator",0,nD],95992);let n_=a.forwardRef(function(e,t){let{render:n,className:r,style:o,label:i,id:s,nativeButton:l=!1,openOnHover:u=!0,delay:c=100,closeDelay:d=0,disabled:f=!1,...p}=e,h=eB({label:i}),m=ex(),{store:g}=eE(),v=(0,eW.useBaseUiId)(s),b=g.useState("open"),x=g.useState("floatingRootContext"),y=g.useState("floatingTreeRoot"),E=g.useState("triggerPopupId",v),R=(0,ny.useTriggerRegistration)(v,g),S=a.useCallback(e=>{let t=R(e);return null!==e&&g.select("open")&&null==g.select("activeTriggerId")&&g.update({activeTriggerId:v,activeTriggerElement:e,closeDelay:d}),t},[R,d,g,v]),w=a.useRef(null),k=a.useCallback(e=>{w.current=e,g.set("activeTriggerElement",e)},[g]),C=nR();if(!C?.parentMenu)throw Error((0,ee.default)(37));g.useSyncedValue("closeDelay",d);let M=C.parentMenu,T=g.useState("disabled"),O=M.useState("disabled"),I=f||T||O,N=M.useState("itemProps"),A=M.useState("isActive",h.index),P=a.useMemo(()=>({type:"submenu-trigger",setActive(){M.select("highlightItemOnHover")&&M.set("activeIndex",h.index)}}),[M,h.index]),{getItemProps:j,itemRef:L}=eF({closeOnClick:!1,disabled:I,highlighted:A,id:v,store:g,typingRef:M.context.typingRef,nativeButton:l,itemMetadata:P,nodeId:m?.context.nodeId}),F=g.useState("hoverEnabled"),D=(0,nM.useHoverReferenceInteraction)(x,{enabled:F&&u&&!I,handleClose:(0,nw.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:c,delay:{open:c,close:d},shouldOpen:c>0?()=>M.select("allowMouseEnter"):void 0,triggerElementRef:w,externalTree:y,isClosing:()=>"ending"===g.select("transitionStatus")}),_=nk(x,{enabled:!I,event:"mousedown",toggle:!u,ignoreMouse:u,stickIfOpen:!1}).reference??ec.EMPTY_OBJECT,B=g.useState("triggerProps",!0);return delete B.id,(0,J.useRenderElement)("div",e,{state:{disabled:I,highlighted:A,open:b},stateAttributesMapping:eR.triggerOpenStateMapping,props:[_,D,B,N,{"aria-controls":E,tabIndex:b||A?0:-1,onBlur(){A&&M.set("activeIndex",null)}},p,j],ref:[t,h.ref,L,S,k]})});class nB{constructor(){this.store=new nx}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,ee.default)(83,e));this.store.setOpen(!0,(0,ez.createChangeEventDetails)("imperative-action",void 0,t))}close(){this.store.setOpen(!1,(0,ez.createChangeEventDetails)("imperative-action",void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Arrow",0,eS,"Backdrop",0,eT,"CheckboxItem",0,eY,"CheckboxItemIndicator",0,eV,"Group",0,eK,"GroupLabel",0,eG,"Handle",0,nB,"Item",0,eq,"LinkItem",0,eX,"Popup",0,tH,"Portal",0,tz,"Positioner",0,t7,"RadioGroup",0,t8,"RadioItem",0,ne,"RadioItemIndicator",0,nt,"Root",0,nS,"Separator",0,nD,"SubmenuRoot",0,function(e){let t=eE().store,n=a.useMemo(()=>({parentMenu:t}),[t]);return(0,o.jsx)(nE.Provider,{value:n,children:(0,o.jsx)(nS,{...e})})},"SubmenuTrigger",0,n_,"Trigger",0,nA,"Viewport",0,nF,"createHandle",0,function(){return new nB}],76792);var nW=e.i(76792),nW=nW;function nH({...e}){return(0,o.jsx)(nW.Root,{"data-slot":"dropdown-menu",...e})}function nU({...e}){return(0,o.jsx)(nW.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function nz({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:a,...i}){return(0,o.jsx)(nW.Portal,{children:(0,o.jsx)(nW.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:(0,o.jsx)(nW.Popup,{"data-slot":"dropdown-menu-content",className:(0,W.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",a),...i})})})}function nY({className:e,inset:t,variant:n="default",...r}){return(0,o.jsx)(nW.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:(0,W.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function nV({className:e,...t}){return(0,o.jsx)(nW.Separator,{"data-slot":"dropdown-menu-separator",className:(0,W.cn)("-mx-1 my-1 h-px bg-border",e),...t})}let n$=[{id:"prod",name:"Production",env:"production"},{id:"staging",name:"Staging",env:"staging"},{id:"dev",name:"Development",env:"development"}],nK=[{id:"amos",name:"AMOS Systems AB"},{id:"nordic",name:"Nordic Industries"}],nG=[{id:1,title:"New deal closed",message:"Nordic Industries — 450K SEK",time:"2m ago",read:!1},{id:2,title:"Approval required",message:"Q4 budget review",time:"15m ago",read:!1},{id:3,title:"System alert",message:"API latency spike detected",time:"1h ago",read:!0}];function nq(){let[e,t]=(0,a.useState)(n$[0]),[n,r]=(0,a.useState)(nK[0]),[i,s]=(0,a.useState)(!1),u=nG.filter(e=>!e.read).length;return(0,o.jsxs)("header",{className:"h-16 bg-white border-b border-[#E5E7EB] flex items-center px-6 sticky top-0 z-30",children:[(0,o.jsx)("div",{className:"flex-1 flex justify-center",children:(0,o.jsxs)(l.motion.div,{animate:{width:i?480:400},transition:{duration:.2},className:"relative",children:[(0,o.jsx)(z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#6B7280]"}),(0,o.jsx)(q.Input,{placeholder:"Search anything...",className:"pl-10 pr-4 h-10 rounded-full bg-[#F3F4F6] border-0 text-sm focus:ring-2 focus:ring-[#2563EB]/20 focus:bg-white transition-all",onFocus:()=>s(!0),onBlur:()=>s(!1)})]})}),(0,o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,o.jsx)(Q,{variant:"outline",className:`${{production:"bg-emerald-50 text-emerald-700 border-emerald-200",staging:"bg-amber-50 text-amber-700 border-amber-200",development:"bg-blue-50 text-blue-700 border-blue-200"}[e.env]} text-xs font-medium px-2.5 py-0.5 rounded-full capitalize`,children:e.env}),(0,o.jsx)("button",{className:"w-9 h-9 rounded-xl bg-[#1E3A5F] text-white flex items-center justify-center hover:bg-[#1E3A5F]/90 transition-colors",children:(0,o.jsx)(V,{className:"w-4 h-4"})}),(0,o.jsxs)(nH,{children:[(0,o.jsx)(nU,{children:(0,o.jsxs)("button",{className:"relative w-9 h-9 rounded-xl hover:bg-[#F3F4F6] flex items-center justify-center transition-colors",children:[(0,o.jsx)(Y,{className:"w-[18px] h-[18px] text-[#6B7280]"}),u>0&&(0,o.jsx)("span",{className:"absolute top-1 right-1 w-4 h-4 bg-[#DC2626] text-white text-[10px] font-bold rounded-full flex items-center justify-center",children:u})]})}),(0,o.jsxs)(nz,{align:"end",className:"w-80 p-0",children:[(0,o.jsx)("div",{className:"px-4 py-3 border-b border-[#E5E7EB]",children:(0,o.jsx)("span",{className:"font-semibold text-sm text-[#111827]",children:"Notifications"})}),(0,o.jsx)("div",{className:"max-h-72 overflow-y-auto",children:nG.map(e=>(0,o.jsx)("div",{className:`px-4 py-3 hover:bg-[#F3F4F6] transition-colors cursor-pointer border-b border-[#E5E7EB]/50 ${!e.read?"bg-[#F7F9FC]":""}`,children:(0,o.jsxs)("div",{className:"flex items-start gap-2",children:[!e.read&&(0,o.jsx)("div",{className:"w-2 h-2 rounded-full bg-[#2563EB] mt-1.5 flex-shrink-0"}),(0,o.jsxs)("div",{className:e.read?"ml-4":"",children:[(0,o.jsx)("p",{className:"text-sm font-medium text-[#111827]",children:e.title}),(0,o.jsx)("p",{className:"text-xs text-[#6B7280] mt-0.5",children:e.message}),(0,o.jsx)("p",{className:"text-[11px] text-[#9CA3AF] mt-1",children:e.time})]})]})},e.id))})]})]}),(0,o.jsxs)(nH,{children:[(0,o.jsx)(nU,{children:(0,o.jsxs)("button",{className:"flex items-center gap-2 h-9 px-3 rounded-xl hover:bg-[#F3F4F6] transition-colors",children:[(0,o.jsx)(K,{className:"w-4 h-4 text-[#6B7280]"}),(0,o.jsx)("span",{className:"text-sm font-medium text-[#111827]",children:e.name}),(0,o.jsx)($,{className:"w-3.5 h-3.5 text-[#6B7280]"})]})}),(0,o.jsx)(nz,{align:"end",children:n$.map(n=>(0,o.jsxs)(nY,{onClick:()=>t(n),className:"flex items-center gap-2",children:[e.id===n.id&&(0,o.jsx)(G,{className:"w-4 h-4 text-[#2563EB]"}),(0,o.jsx)("span",{className:e.id===n.id?"font-medium":"",children:n.name})]},n.id))})]}),(0,o.jsxs)(nH,{children:[(0,o.jsx)(nU,{children:(0,o.jsxs)("button",{className:"flex items-center gap-2 h-9 px-3 rounded-xl hover:bg-[#F3F4F6] transition-colors",children:[(0,o.jsx)("span",{className:"text-sm font-medium text-[#111827]",children:n.name}),(0,o.jsx)($,{className:"w-3.5 h-3.5 text-[#6B7280]"})]})}),(0,o.jsx)(nz,{align:"end",children:nK.map(e=>(0,o.jsxs)(nY,{onClick:()=>r(e),className:"flex items-center gap-2",children:[n.id===e.id&&(0,o.jsx)(G,{className:"w-4 h-4 text-[#2563EB]"}),(0,o.jsx)("span",{className:n.id===e.id?"font-medium":"",children:e.name})]},e.id))})]}),(0,o.jsxs)(nH,{children:[(0,o.jsx)(nU,{children:(0,o.jsx)("button",{className:"flex items-center gap-2",children:(0,o.jsx)(eg,{className:"w-8 h-8 border-2 border-[#E5E7EB]",children:(0,o.jsx)(ev,{className:"bg-[#1E3A5F] text-white text-xs font-medium",children:"EA"})})})}),(0,o.jsxs)(nz,{align:"end",className:"w-56",children:[(0,o.jsxs)("div",{className:"px-3 py-2",children:[(0,o.jsx)("p",{className:"text-sm font-semibold text-[#111827]",children:"Erik Andersson"}),(0,o.jsx)("p",{className:"text-xs text-[#6B7280]",children:"erik@admin.amos.systems"})]}),(0,o.jsx)(nV,{}),(0,o.jsx)(nY,{children:"Profile"}),(0,o.jsx)(nY,{children:"Preferences"}),(0,o.jsx)(nV,{}),(0,o.jsx)(nY,{className:"text-[#DC2626]",children:"Sign out"})]})]})]})]})}e.s(["DashboardShell",0,function({children:e}){let[t,n]=(0,a.useState)(256);return(0,a.useEffect)(()=>{let e=()=>{let e=document.querySelector("aside");e&&n(e.getBoundingClientRect().width)};e(),window.addEventListener("resize",e);let t=new MutationObserver(e),r=document.querySelector("aside");return r&&t.observe(r,{attributes:!0,attributeFilter:["style"]}),()=>{window.removeEventListener("resize",e),t.disconnect()}},[]),(0,o.jsxs)("div",{className:"min-h-screen bg-[#F7F9FC]",children:[(0,o.jsx)(U,{}),(0,o.jsxs)("div",{className:"min-h-screen transition-all duration-200",style:{marginLeft:t+16},children:[(0,o.jsx)(nq,{}),(0,o.jsx)("main",{className:"p-6",children:e})]})]})}],34772)}]);