(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[164],{7401:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(2115);let o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=function(){for(var e=arguments.length,t=Array(e),n=0;n!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:u,className:c="",children:s,iconNode:d,...f}=e;return(0,r.createElement)("svg",{ref:t,...a,width:o,height:o,stroke:n,strokeWidth:u?24*Number(l)/Number(o):l,className:i("lucide",c),...f},[...d.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(s)?s:[s]])}),u=(e,t)=>{let n=(0,r.forwardRef)((n,a)=>{let{className:u,...c}=n;return(0,r.createElement)(l,{ref:a,iconNode:t,className:i("lucide-".concat(o(e)),u),...c})});return n.displayName="".concat(e),n}},6967:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(7401).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},3565:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(7401).A)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},4505:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(7401).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},2104:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(7401).A)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]])},853:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(7401).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},7725:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(7401).A)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},1791:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_fcbcbf"}},8385:(e,t,n)=>{"use strict";n.d(t,{H_:()=>rF,UC:()=>rj,YJ:()=>rN,q7:()=>rI,VF:()=>rW,JU:()=>rO,ZL:()=>rP,z6:()=>r_,hN:()=>rK,bL:()=>rL,wv:()=>rB,Pb:()=>rG,G5:()=>rV,ZP:()=>rH,l9:()=>rD});var r,o,i,a=n(2115),l=n(3610),u=n(8068),c=n(8166),s=n(1488),d=n(9997),f=n(1295),p=n(4256),m=n(1524),h=n(5155),v="dismissableLayer.update",g=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y=a.forwardRef((e,t)=>{var n,r;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f,onInteractOutside:p,onDismiss:y,...x}=e,E=a.useContext(g),[C,R]=a.useState(null),S=null!==(r=null==C?void 0:C.ownerDocument)&&void 0!==r?r:null===(n=globalThis)||void 0===n?void 0:n.document,[,k]=a.useState({}),A=(0,u.s)(t,e=>R(e)),M=Array.from(E.layers),[T]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),L=M.indexOf(T),D=C?M.indexOf(C):-1,P=E.layersWithOutsidePointerEventsDisabled.size>0,j=D>=L,N=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,m.c)(e),o=a.useRef(!1),i=a.useRef(()=>{});return a.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){b("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...E.branches].some(e=>e.contains(t));!j||n||(null==s||s(e),null==p||p(e),e.defaultPrevented||null==y||y())},S),O=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=(0,m.c)(e),o=a.useRef(!1);return a.useEffect(()=>{let e=e=>{e.target&&!o.current&&b("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;[...E.branches].some(e=>e.contains(t))||(null==f||f(e),null==p||p(e),e.defaultPrevented||null==y||y())},S);return!function(e,t=globalThis?.document){let n=(0,m.c)(e);a.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{D!==E.layers.size-1||(null==c||c(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},S),a.useEffect(()=>{if(C)return i&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(o=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(C)),E.layers.add(C),w(),()=>{i&&1===E.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=o)}},[C,S,i,E]),a.useEffect(()=>()=>{C&&(E.layers.delete(C),E.layersWithOutsidePointerEventsDisabled.delete(C),w())},[C,E]),a.useEffect(()=>{let e=()=>k({});return document.addEventListener(v,e),()=>document.removeEventListener(v,e)},[]),(0,h.jsx)(d.sG.div,{...x,ref:A,style:{pointerEvents:P?j?"auto":"none":void 0,...e.style},onFocusCapture:(0,l.mK)(e.onFocusCapture,O.onFocusCapture),onBlurCapture:(0,l.mK)(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:(0,l.mK)(e.onPointerDownCapture,N.onPointerDownCapture)})});function w(){let e=new CustomEvent(v);document.dispatchEvent(e)}function b(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?(0,d.hO)(i,a):i.dispatchEvent(a)}y.displayName="DismissableLayer",a.forwardRef((e,t)=>{let n=a.useContext(g),r=a.useRef(null),o=(0,u.s)(t,r);return a.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,h.jsx)(d.sG.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var x=0;function E(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var C="focusScope.autoFocusOnMount",R="focusScope.autoFocusOnUnmount",S={bubbles:!1,cancelable:!0},k=a.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[c,s]=a.useState(null),f=(0,m.c)(o),p=(0,m.c)(i),v=a.useRef(null),g=(0,u.s)(t,e=>s(e)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let e=function(e){if(y.paused||!c)return;let t=e.target;c.contains(t)?v.current=t:T(v.current,{select:!0})},t=function(e){if(y.paused||!c)return;let t=e.relatedTarget;null===t||c.contains(t)||T(v.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&T(c)});return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,c,y.paused]),a.useEffect(()=>{if(c){L.add(y);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(C,S);c.addEventListener(C,f),c.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(T(r,{select:t}),document.activeElement!==n)return}(A(c).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&T(c))}return()=>{c.removeEventListener(C,f),setTimeout(()=>{let t=new CustomEvent(R,S);c.addEventListener(R,p),c.dispatchEvent(t),t.defaultPrevented||T(null!=e?e:document.body,{select:!0}),c.removeEventListener(R,p),L.remove(y)},0)}}},[c,f,p,y]);let w=a.useCallback(e=>{if(!n&&!r||y.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=A(e);return[M(t,e),M(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&T(i,{select:!0})):(e.preventDefault(),n&&T(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,y.paused]);return(0,h.jsx)(d.sG.div,{tabIndex:-1,...l,ref:g,onKeyDown:w})});function A(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function M(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function T(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}k.displayName="FocusScope";var L=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=D(e,t)).unshift(t)},remove(t){var n;null===(n=(e=D(e,t))[0])||void 0===n||n.resume()}}}();function D(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var P=n(7668);let j=["top","right","bottom","left"],N=Math.min,O=Math.max,I=Math.round,F=Math.floor,_=e=>({x:e,y:e}),K={left:"right",right:"left",bottom:"top",top:"bottom"},W={start:"end",end:"start"};function B(e,t){return"function"==typeof e?e(t):e}function G(e){return e.split("-")[0]}function H(e){return e.split("-")[1]}function V(e){return"x"===e?"y":"x"}function z(e){return"y"===e?"height":"width"}let X=new Set(["top","bottom"]);function U(e){return X.has(G(e))?"y":"x"}function Y(e){return e.replace(/start|end/g,e=>W[e])}let q=["left","right"],Z=["right","left"],$=["top","bottom"],J=["bottom","top"];function Q(e){return e.replace(/left|right|bottom|top/g,e=>K[e])}function ee(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function et(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function en(e,t,n){let r,{reference:o,floating:i}=e,a=U(t),l=V(U(t)),u=z(l),c=G(t),s="y"===a,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(c){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(H(t)){case"start":r[l]-=p*(n&&s?-1:1);break;case"end":r[l]+=p*(n&&s?-1:1)}return r}async function er(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=B(t,e),m=ee(p),h=l[f?"floating"===d?"reference":"floating":d],v=et(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:s,strategy:u})),g="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=et(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-b.top+m.top)/w.y,bottom:(b.bottom-v.bottom+m.bottom)/w.y,left:(v.left-b.left+m.left)/w.x,right:(b.right-v.right+m.right)/w.x}}let eo=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await (null==a.isRTL?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:d}=en(c,r,u),f=r,p={},m=0;for(let n=0;ne[t]>=0)}let el=new Set(["left","top"]);async function eu(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),a=G(n),l=H(n),u="y"===U(n),c=el.has(a)?-1:1,s=i&&u?-1:1,d=B(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*s,y:f*c}:{x:f*c,y:p*s}}function ec(){return"undefined"!=typeof window}function es(e){return ep(e)?(e.nodeName||"").toLowerCase():"#document"}function ed(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ef(e){var t;return null==(t=(ep(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ep(e){return!!ec()&&(e instanceof Node||e instanceof ed(e).Node)}function em(e){return!!ec()&&(e instanceof Element||e instanceof ed(e).Element)}function eh(e){return!!ec()&&(e instanceof HTMLElement||e instanceof ed(e).HTMLElement)}function ev(e){return!!ec()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ed(e).ShadowRoot)}let eg=new Set(["inline","contents"]);function ey(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=eT(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!eg.has(o)}let ew=new Set(["table","td","th"]),eb=[":popover-open",":modal"];function ex(e){return eb.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let eE=["transform","translate","scale","rotate","perspective"],eC=["transform","translate","scale","rotate","perspective","filter"],eR=["paint","layout","strict","content"];function eS(e){let t=ek(),n=em(e)?eT(e):e;return eE.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||eC.some(e=>(n.willChange||"").includes(e))||eR.some(e=>(n.contain||"").includes(e))}function ek(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let eA=new Set(["html","body","#document"]);function eM(e){return eA.has(es(e))}function eT(e){return ed(e).getComputedStyle(e)}function eL(e){return em(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eD(e){if("html"===es(e))return e;let t=e.assignedSlot||e.parentNode||ev(e)&&e.host||ef(e);return ev(t)?t.host:t}function eP(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=eD(t);return eM(n)?t.ownerDocument?t.ownerDocument.body:t.body:eh(n)&&ey(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=ed(o);if(i){let e=ej(a);return t.concat(a,a.visualViewport||[],ey(o)?o:[],e&&n?eP(e):[])}return t.concat(o,eP(o,[],n))}function ej(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eN(e){let t=eT(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=eh(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=I(n)!==i||I(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function eO(e){return em(e)?e:e.contextElement}function eI(e){let t=eO(e);if(!eh(t))return _(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=eN(t),a=(i?I(n.width):n.width)/r,l=(i?I(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let eF=_(0);function e_(e){let t=ed(e);return ek()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eF}function eK(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),a=eO(e),l=_(1);t&&(r?em(r)&&(l=eI(r)):l=eI(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===ed(a))&&o)?e_(a):_(0),c=(i.left+u.x)/l.x,s=(i.top+u.y)/l.y,d=i.width/l.x,f=i.height/l.y;if(a){let e=ed(a),t=r&&em(r)?ed(r):r,n=e,o=ej(n);for(;o&&r&&t!==n;){let e=eI(o),t=o.getBoundingClientRect(),r=eT(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,f*=e.y,c+=i,s+=a,o=ej(n=ed(o))}}return et({width:d,height:f,x:c,y:s})}function eW(e,t){let n=eL(e).scrollLeft;return t?t.left+n:eK(ef(e)).left+n}function eB(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eW(e,n),y:n.top+t.scrollTop}}let eG=new Set(["absolute","fixed"]);function eH(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=ed(e),r=ef(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;let e=ek();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}let c=eW(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:u}}(e,n);else if("document"===t)r=function(e){let t=ef(e),n=eL(e),r=e.ownerDocument.body,o=O(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=O(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+eW(e),l=-n.scrollTop;return"rtl"===eT(r).direction&&(a+=O(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(ef(e));else if(em(t))r=function(e,t){let n=eK(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=eh(e)?eI(e):_(1),a=e.clientWidth*i.x;return{width:a,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=e_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return et(r)}function eV(e){return"static"===eT(e).position}function ez(e,t){if(!eh(e)||"fixed"===eT(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ef(e)===n&&(n=n.ownerDocument.body),n}function eX(e,t){var n;let r=ed(e);if(ex(e))return r;if(!eh(e)){let t=eD(e);for(;t&&!eM(t);){if(em(t)&&!eV(t))return t;t=eD(t)}return r}let o=ez(e,t);for(;o&&(n=o,ew.has(es(n)))&&eV(o);)o=ez(o,t);return o&&eM(o)&&eV(o)&&!eS(o)?r:o||function(e){let t=eD(e);for(;eh(t)&&!eM(t);){if(eS(t))return t;if(ex(t))break;t=eD(t)}return null}(e)||r}let eU=async function(e){let t=this.getOffsetParent||eX,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=eh(t),o=ef(t),i="fixed"===n,a=eK(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=_(0);if(r||!r&&!i){if(("body"!==es(t)||ey(o))&&(l=eL(t)),r){let e=eK(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=eW(o))}i&&!r&&o&&(u.x=eW(o));let c=!o||r||i?_(0):eB(o,l);return{x:a.left+l.scrollLeft-u.x-c.x,y:a.top+l.scrollTop-u.y-c.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eY={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,a=ef(r),l=!!t&&ex(t.floating);if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},c=_(1),s=_(0),d=eh(r);if((d||!d&&!i)&&(("body"!==es(r)||ey(a))&&(u=eL(r)),eh(r))){let e=eK(r);c=eI(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let f=!a||d||i?_(0):eB(a,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x+f.x,y:n.y*c.y-u.scrollTop*c.y+s.y+f.y}},getDocumentElement:ef,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?ex(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eP(e,[],!1).filter(e=>em(e)&&"body"!==es(e)),o=null,i="fixed"===eT(e).position,a=i?eD(e):e;for(;em(a)&&!eM(a);){let t=eT(a),n=eS(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&eG.has(o.position)||ey(a)&&!n&&function e(t,n){let r=eD(t);return!(r===n||!em(r)||eM(r))&&("fixed"===eT(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):o=t,a=eD(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((e,n)=>{let r=eH(t,n,o);return e.top=O(r.top,e.top),e.right=N(r.right,e.right),e.bottom=N(r.bottom,e.bottom),e.left=O(r.left,e.left),e},eH(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:eX,getElementRects:eU,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eN(e);return{width:t,height:n}},getScale:eI,isElement:em,isRTL:function(e){return"rtl"===eT(e).direction}};function eq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eZ=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:c,padding:s=0}=B(e,t)||{};if(null==c)return{};let d=ee(s),f={x:n,y:r},p=V(U(o)),m=z(p),h=await a.getDimensions(c),v="y"===p,g=v?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[p]-f[p]-i.floating[m],w=f[p]-i.reference[p],b=await (null==a.getOffsetParent?void 0:a.getOffsetParent(c)),x=b?b[g]:0;x&&await (null==a.isElement?void 0:a.isElement(b))||(x=l.floating[g]||i.floating[m]);let E=x/2-h[m]/2-1,C=N(d[v?"top":"left"],E),R=N(d[v?"bottom":"right"],E),S=x-h[m]-R,k=x/2-h[m]/2+(y/2-w/2),A=O(C,N(k,S)),M=!u.arrow&&null!=H(o)&&k!==A&&i.reference[m]/2-(k{let r=new Map,o={platform:eY,...n},i={...o.platform,_c:r};return eo(e,t,{...o,platform:i})};var eJ=n(7650),eQ="undefined"!=typeof document?a.useLayoutEffect:function(){};function e0(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!e0(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!e0(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function e1(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e2(e,t){let n=e1(e);return Math.round(t*n)/n}function e5(e){let t=a.useRef(e);return eQ(()=>{t.current=e}),t}let e6=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eZ({element:n.current,padding:r}).fn(t):{}:n?eZ({element:n,padding:r}).fn(t):{}}}),e4=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:a,middlewareData:l}=t,u=await eu(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}}(e),options:[e,t]}),e7=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=B(e,t),s={x:n,y:r},d=await i.detectOverflow(t,c),f=U(G(o)),p=V(f),m=s[p],h=s[f];if(a){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=m+d[e],r=m-d[t];m=O(n,N(m,r))}if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=h+d[e],r=h-d[t];h=O(n,N(h,r))}let v=u.fn({...t,[p]:m,[f]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[f]:l}}}}}}(e),options:[e,t]}),e9=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=B(e,t),s={x:n,y:r},d=U(o),f=V(d),p=s[f],m=s[d],h=B(l,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;pn&&(p=n)}if(c){var g,y;let e="y"===f?"width":"height",t=el.has(G(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}}(e),options:[e,t]}),e8=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,a;let{placement:l,middlewareData:u,rects:c,initialPlacement:s,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=B(e,t);if(null!=(n=u.arrow)&&n.alignmentOffset)return{};let b=G(l),x=U(s),E=G(s)===s,C=await (null==d.isRTL?void 0:d.isRTL(f.floating)),R=h||(E||!y?[Q(s)]:function(e){let t=Q(e);return[Y(e),t,Y(t)]}(s)),S="none"!==g;!h&&S&&R.push(...function(e,t,n,r){let o=H(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?Z:q;return t?q:Z;case"left":case"right":return t?$:J;default:return[]}}(G(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Y)))),i}(s,y,g,C));let k=[s,...R],A=await d.detectOverflow(t,w),M=[],T=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&M.push(A[b]),m){let e=function(e,t,n){void 0===n&&(n=!1);let r=H(e),o=V(U(e)),i=z(o),a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Q(a)),[a,Q(a)]}(l,c,C);M.push(A[e[0]],A[e[1]])}if(T=[...T,{placement:l,overflows:M}],!M.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=k[e];if(t&&(!("alignment"===m&&x!==U(t))||T.every(e=>U(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=null==(i=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(v){case"bestFit":{let e=null==(a=T.filter(e=>{if(S){let t=U(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=s}if(l!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}),e3=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,i;let{placement:a,rects:l,platform:u,elements:c}=t,{apply:s=()=>{},...d}=B(e,t),f=await u.detectOverflow(t,d),p=G(a),m=H(a),h="y"===U(a),{width:v,height:g}=l.floating;"top"===p||"bottom"===p?(o=p,i=m===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(i=p,o="end"===m?"top":"bottom");let y=g-f.top-f.bottom,w=v-f.left-f.right,b=N(g-f[o],y),x=N(v-f[i],w),E=!t.middlewareData.shift,C=b,R=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(R=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=y),E&&!m){let e=O(f.left,0),t=O(f.right,0),n=O(f.top,0),r=O(f.bottom,0);h?R=v-2*(0!==e||0!==t?e+t:O(f.left,f.right)):C=g-2*(0!==n||0!==r?n+r:O(f.top,f.bottom))}await s({...t,availableWidth:R,availableHeight:C});let S=await u.getDimensions(c.floating);return v!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),te=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=B(e,t);switch(o){case"referenceHidden":{let e=ei(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ea(e)}}}case"escaped":{let e=ei(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ea(e)}}}default:return{}}}}}(e),options:[e,t]}),tt=(e,t)=>({...e6(e),options:[e,t]});var tn=a.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,h.jsx)(d.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,h.jsx)("polygon",{points:"0,0 30,0 15,10"})})});tn.displayName="Arrow";var tr=n(6611),to=n(7510),ti="Popper",[ta,tl]=(0,c.A)(ti),[tu,tc]=ta(ti),ts=e=>{let{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return(0,h.jsx)(tu,{scope:t,anchor:r,onAnchorChange:o,children:n})};ts.displayName=ti;var td="PopperAnchor",tf=a.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,i=tc(td,n),l=a.useRef(null),c=(0,u.s)(t,l),s=a.useRef(null);return a.useEffect(()=>{let e=s.current;s.current=(null==r?void 0:r.current)||l.current,e!==s.current&&i.onAnchorChange(s.current)}),r?null:(0,h.jsx)(d.sG.div,{...o,ref:c})});tf.displayName=td;var tp="PopperContent",[tm,th]=ta(tp),tv=a.forwardRef((e,t)=>{var n,r,o,i,l,c,s,f;let{__scopePopper:p,side:v="bottom",sideOffset:g=0,align:y="center",alignOffset:w=0,arrowPadding:b=0,avoidCollisions:x=!0,collisionBoundary:E=[],collisionPadding:C=0,sticky:R="partial",hideWhenDetached:S=!1,updatePositionStrategy:k="optimized",onPlaced:A,...M}=e,T=tc(tp,p),[L,D]=a.useState(null),P=(0,u.s)(t,e=>D(e)),[j,I]=a.useState(null),_=(0,to.X)(j),K=null!==(s=null==_?void 0:_.width)&&void 0!==s?s:0,W=null!==(f=null==_?void 0:_.height)&&void 0!==f?f:0,B="number"==typeof C?C:{top:0,right:0,bottom:0,left:0,...C},G=Array.isArray(E)?E:[E],H=G.length>0,V={padding:B,boundary:G.filter(tb),altBoundary:H},{refs:z,floatingStyles:X,placement:U,isPositioned:Y,middlewareData:q}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:u=!0,whileElementsMounted:c,open:s}=e,[d,f]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=a.useState(r);e0(p,r)||m(r);let[h,v]=a.useState(null),[g,y]=a.useState(null),w=a.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),b=a.useCallback(e=>{e!==R.current&&(R.current=e,y(e))},[]),x=i||h,E=l||g,C=a.useRef(null),R=a.useRef(null),S=a.useRef(d),k=null!=c,A=e5(c),M=e5(o),T=e5(s),L=a.useCallback(()=>{if(!C.current||!R.current)return;let e={placement:t,strategy:n,middleware:p};M.current&&(e.platform=M.current),e$(C.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==T.current};D.current&&!e0(S.current,t)&&(S.current=t,eJ.flushSync(()=>{f(t)}))})},[p,t,n,M,T]);eQ(()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[s]);let D=a.useRef(!1);eQ(()=>(D.current=!0,()=>{D.current=!1}),[]),eQ(()=>{if(x&&(C.current=x),E&&(R.current=E),x&&E){if(A.current)return A.current(x,E,L);L()}},[x,E,L,A,k]);let P=a.useMemo(()=>({reference:C,floating:R,setReference:w,setFloating:b}),[w,b]),j=a.useMemo(()=>({reference:x,floating:E}),[x,E]),N=a.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=e2(j.floating,d.x),r=e2(j.floating,d.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...e1(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,j.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:L,refs:P,elements:j,floatingStyles:N}),[d,L,P,j,N])}({strategy:"fixed",placement:v+("center"!==y?"-"+y:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n{i&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let f=s&&u?function(e,t){let n,r=null,o=ef(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(l,u){void 0===l&&(l=!1),void 0===u&&(u=1),i();let c=e.getBoundingClientRect(),{left:s,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;let m=F(d),h=F(o.clientWidth-(s+f)),v={rootMargin:-m+"px "+-h+"px "+-F(o.clientHeight-(d+p))+"px "+-F(s)+"px",threshold:O(0,N(1,u))||1},g=!0;function y(t){let r=t[0].intersectionRatio;if(r!==u){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||eq(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(y,{...v,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,v)}r.observe(e)}(!0),i}(s,n):null,p=-1,m=null;l&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),s&&!c&&m.observe(s),m.observe(t));let h=c?eK(e):null;return c&&function t(){let r=eK(e);h&&!eq(h,r)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===k})},elements:{reference:T.anchor},middleware:[e4({mainAxis:g+W,alignmentAxis:w}),x&&e7({mainAxis:!0,crossAxis:!1,limiter:"partial"===R?e9():void 0,...V}),x&&e8({...V}),e3({...V,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:a}=n.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width","".concat(r,"px")),l.setProperty("--radix-popper-available-height","".concat(o,"px")),l.setProperty("--radix-popper-anchor-width","".concat(i,"px")),l.setProperty("--radix-popper-anchor-height","".concat(a,"px"))}}),j&&tt({element:j,padding:b}),tx({arrowWidth:K,arrowHeight:W}),S&&te({strategy:"referenceHidden",...V})]}),[Z,$]=tE(U),J=(0,m.c)(A);(0,tr.N)(()=>{Y&&(null==J||J())},[Y,J]);let Q=null===(n=q.arrow)||void 0===n?void 0:n.x,ee=null===(r=q.arrow)||void 0===r?void 0:r.y,et=(null===(o=q.arrow)||void 0===o?void 0:o.centerOffset)!==0,[en,er]=a.useState();return(0,tr.N)(()=>{L&&er(window.getComputedStyle(L).zIndex)},[L]),(0,h.jsx)("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Y?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:en,"--radix-popper-transform-origin":[null===(i=q.transformOrigin)||void 0===i?void 0:i.x,null===(l=q.transformOrigin)||void 0===l?void 0:l.y].join(" "),...(null===(c=q.hide)||void 0===c?void 0:c.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,h.jsx)(tm,{scope:p,placedSide:Z,onArrowChange:I,arrowX:Q,arrowY:ee,shouldHideArrow:et,children:(0,h.jsx)(d.sG.div,{"data-side":Z,"data-align":$,...M,ref:P,style:{...M.style,animation:Y?void 0:"none"}})})})});tv.displayName=tp;var tg="PopperArrow",ty={top:"bottom",right:"left",bottom:"top",left:"right"},tw=a.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=th(tg,n),i=ty[o.placedSide];return(0,h.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,h.jsx)(tn,{...r,ref:t,style:{...r.style,display:"block"}})})});function tb(e){return null!==e}tw.displayName=tg;var tx=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;let{placement:l,rects:u,middlewareData:c}=t,s=(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[p,m]=tE(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(i=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+d/2,g=(null!==(a=null===(o=c.arrow)||void 0===o?void 0:o.y)&&void 0!==a?a:0)+f/2,y="",w="";return"bottom"===p?(y=s?h:"".concat(v,"px"),w="".concat(-f,"px")):"top"===p?(y=s?h:"".concat(v,"px"),w="".concat(u.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=s?h:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+f,"px"),w=s?h:"".concat(g,"px")),{data:{x:y,y:w}}}});function tE(e){let[t,n="center"]=e.split("-");return[t,n]}var tC=a.forwardRef((e,t)=>{var n,r;let{container:o,...i}=e,[l,u]=a.useState(!1);(0,tr.N)(()=>u(!0),[]);let c=o||l&&(null===(r=globalThis)||void 0===r?void 0:null===(n=r.document)||void 0===n?void 0:n.body);return c?eJ.createPortal((0,h.jsx)(d.sG.div,{...i,ref:t}),c):null});tC.displayName="Portal";var tR=n(7028),tS=n(7357),tk=Symbol("radix.slottable");function tA(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tk}var tM=new WeakMap,tT=new WeakMap,tL={},tD=0,tP=function(e){return e&&(e.host||tP(e.parentNode))},tj=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=tP(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tL[n]||(tL[n]=new WeakMap);var i=tL[n],a=[],l=new Set,u=new Set(o),c=function(e){!e||l.has(e)||(l.add(e),c(e.parentNode))};o.forEach(c);var s=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))s(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(tM.get(e)||0)+1,c=(i.get(e)||0)+1;tM.set(e,u),i.set(e,c),a.push(e),1===u&&o&&tT.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return s(t),l.clear(),tD++,function(){a.forEach(function(e){var t=tM.get(e)-1,o=i.get(e)-1;tM.set(e,t),i.set(e,o),t||(tT.has(e)||e.removeAttribute(r),tT.delete(e)),o||e.removeAttribute(n)}),--tD||(tM=new WeakMap,tM=new WeakMap,tT=new WeakMap,tL={})}},tN=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r,o=Array.from(Array.isArray(e)?e:[e]),i=t||(r=e,"undefined"==typeof document?null:(Array.isArray(r)?r[0]:r).ownerDocument.body);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),tj(o,i,n,"aria-hidden")):function(){return null}},tO=n(6476),tI="right-scroll-bar-position",tF="width-before-scroll-bar";function t_(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tK="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,tW=new WeakMap;function tB(e){return e}var tG=function(e){void 0===e&&(e={});var t,n,r,o=(void 0===t&&(t=tB),n=[],r=!1,{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}});return o.options=(0,tO.Cl)({async:!0,ssr:!1},e),o}(),tH=function(){},tV=a.forwardRef(function(e,t){var n,r,o,i,l=a.useRef(null),u=a.useState({onScrollCapture:tH,onWheelCapture:tH,onTouchMoveCapture:tH}),c=u[0],s=u[1],d=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,v=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,x=e.allowPinchZoom,E=e.as,C=e.gapMode,R=(0,tO.Tt)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=(n=[l,t],r=function(e){return n.forEach(function(t){return t_(t,e)})},(o=(0,a.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,i=o.facade,tK(function(){var e=tW.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||t_(e,null)}),r.forEach(function(e){t.has(e)||t_(e,o)})}tW.set(i,n)},[n]),i),k=(0,tO.Cl)((0,tO.Cl)({},R),c);return a.createElement(a.Fragment,null,h&&a.createElement(g,{sideCar:tG,removeScrollBar:m,shards:v,noRelative:y,noIsolation:w,inert:b,setCallbacks:s,allowPinchZoom:!!x,lockRef:l,gapMode:C}),d?a.cloneElement(a.Children.only(f),(0,tO.Cl)((0,tO.Cl)({},k),{ref:S})):a.createElement(void 0===E?"div":E,(0,tO.Cl)({},k,{className:p,ref:S}),f))});tV.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tV.classNames={fullWidth:tF,zeroRight:tI};var tz=function(e){var t=e.sideCar,n=(0,tO.Tt)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return a.createElement(r,(0,tO.Cl)({},n))};tz.isSideCarExport=!0;var tX=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,a;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tU=function(){var e=tX();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tY=function(){var e=tU();return function(t){return e(t.styles,t.dynamic),null}},tq={left:0,top:0,right:0,gap:0},tZ=function(e){return parseInt(e||"",10)||0},t$=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[tZ(n),tZ(r),tZ(o)]},tJ=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return tq;var t=t$(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tQ=tY(),t0="data-scroll-locked",t1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(t0,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tI," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(tF," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(tI," .").concat(tI," {\n right: 0 ").concat(r,";\n }\n \n .").concat(tF," .").concat(tF," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(t0,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},t2=function(){var e=parseInt(document.body.getAttribute(t0)||"0",10);return isFinite(e)?e:0},t5=function(){a.useEffect(function(){return document.body.setAttribute(t0,(t2()+1).toString()),function(){var e=t2()-1;e<=0?document.body.removeAttribute(t0):document.body.setAttribute(t0,e.toString())}},[])},t6=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;t5();var i=a.useMemo(function(){return tJ(o)},[o]);return a.createElement(tQ,{styles:t1(i,!t,o,n?"":"!important")})},t4=!1;if("undefined"!=typeof window)try{var t7=Object.defineProperty({},"passive",{get:function(){return t4=!0,!0}});window.addEventListener("test",t7,t7),window.removeEventListener("test",t7,t7)}catch(e){t4=!1}var t9=!!t4&&{passive:!1},t8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},t3=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),ne(e,r)){var o=nt(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ne=function(e,t){return"v"===e?t8(t,"overflowY"):t8(t,"overflowX")},nt=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},nn=function(e,t,n,r,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),l=a*r,u=n.target,c=t.contains(u),s=!1,d=l>0,f=0,p=0;do{if(!u)break;var m=nt(e,u),h=m[0],v=m[1]-m[2]-a*h;(h||v)&&ne(e,u)&&(f+=v,p+=h);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&l>f)?s=!0:!d&&(o&&1>Math.abs(p)||!o&&-l>p)&&(s=!0),s},nr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},no=function(e){return[e.deltaX,e.deltaY]},ni=function(e){return e&&"current"in e?e.current:e},na=0,nl=[];let nu=(r=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(na++)[0],i=a.useState(tY)[0],l=a.useRef(e);a.useEffect(function(){l.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,tO.fX)([e.lockRef.current],(e.shards||[]).map(ni),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var o,i=nr(e),a=n.current,u="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],s=e.target,d=Math.abs(u)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===s||p.contains(s)))return!1;var m=t3(d,s);if(!m)return!0;if(m?o=d:(o="v"===d?"h":"v",m=t3(d,s)),!m)return!1;if(!r.current&&"changedTouches"in e&&(u||c)&&(r.current=o),!o)return!0;var h=r.current||o;return nn(h,t,e,"h"===h?u:c,!0)},[]),c=a.useCallback(function(e){if(nl.length&&nl[nl.length-1]===i){var n="deltaY"in e?no(e):nr(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(ni).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?u(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=a.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=a.useCallback(function(e){n.current=nr(e),r.current=void 0},[]),f=a.useCallback(function(t){s(t.type,no(t),t.target,u(t,e.lockRef.current))},[]),p=a.useCallback(function(t){s(t.type,nr(t),t.target,u(t,e.lockRef.current))},[]);a.useEffect(function(){return nl.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,t9),document.addEventListener("touchmove",c,t9),document.addEventListener("touchstart",d,t9),function(){nl=nl.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,t9),document.removeEventListener("touchmove",c,t9),document.removeEventListener("touchstart",d,t9)}},[]);var m=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?a.createElement(t6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},tG.useMedium(r),tz);var nc=a.forwardRef(function(e,t){return a.createElement(tV,(0,tO.Cl)({},e,{ref:t,sideCar:nu}))});nc.classNames=tV.classNames;var ns=["Enter"," "],nd=["ArrowUp","PageDown","End"],nf=["ArrowDown","PageUp","Home",...nd],np={ltr:[...ns,"ArrowRight"],rtl:[...ns,"ArrowLeft"]},nm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nh="Menu",[nv,ng,ny]=(0,f.N)(nh),[nw,nb]=(0,c.A)(nh,[ny,tl,tS.RG]),nx=tl(),nE=(0,tS.RG)(),[nC,nR]=nw(nh),[nS,nk]=nw(nh),nA=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:l=!0}=e,u=nx(t),[c,s]=a.useState(null),d=a.useRef(!1),f=(0,m.c)(i),v=(0,p.jH)(o);return a.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,h.jsx)(ts,{...u,children:(0,h.jsx)(nC,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:s,children:(0,h.jsx)(nS,{scope:t,onClose:a.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:v,modal:l,children:r})})})};nA.displayName=nh;var nM=a.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,o=nx(n);return(0,h.jsx)(tf,{...o,...r,ref:t})});nM.displayName="MenuAnchor";var nT="MenuPortal",[nL,nD]=nw(nT,{forceMount:void 0}),nP=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=nR(nT,t);return(0,h.jsx)(nL,{scope:t,forceMount:n,children:(0,h.jsx)(tR.C,{present:n||i.open,children:(0,h.jsx)(tC,{asChild:!0,container:o,children:r})})})};nP.displayName=nT;var nj="MenuContent",[nN,nO]=nw(nj),nI=a.forwardRef((e,t)=>{let n=nD(nj,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=nR(nj,e.__scopeMenu),a=nk(nj,e.__scopeMenu);return(0,h.jsx)(nv.Provider,{scope:e.__scopeMenu,children:(0,h.jsx)(tR.C,{present:r||i.open,children:(0,h.jsx)(nv.Slot,{scope:e.__scopeMenu,children:a.modal?(0,h.jsx)(nF,{...o,ref:t}):(0,h.jsx)(n_,{...o,ref:t})})})})}),nF=a.forwardRef((e,t)=>{let n=nR(nj,e.__scopeMenu),r=a.useRef(null),o=(0,u.s)(t,r);return a.useEffect(()=>{let e=r.current;if(e)return tN(e)},[]),(0,h.jsx)(nW,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,l.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),n_=a.forwardRef((e,t)=>{let n=nR(nj,e.__scopeMenu);return(0,h.jsx)(nW,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),nK=function(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){let e,o;let i=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref,l=function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(l.ref=t?(0,u.t)(t,i):i),a.cloneElement(n,l)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,i=a.Children.toArray(r),l=i.find(tA);if(l){let e=l.props.children,r=i.map(t=>t!==l?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,h.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,h.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}("MenuContent.ScrollLock"),nW=a.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:s,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:g,disableOutsideScroll:w,...b}=e,C=nR(nj,n),R=nk(nj,n),S=nx(n),A=nE(n),M=ng(n),[T,L]=a.useState(null),D=a.useRef(null),P=(0,u.s)(t,D,C.onContentChange),j=a.useRef(0),N=a.useRef(""),O=a.useRef(0),I=a.useRef(null),F=a.useRef("right"),_=a.useRef(0),K=w?nc:a.Fragment,W=e=>{var t,n;let r=N.current+e,o=M().filter(e=>!e.disabled),i=document.activeElement,a=null===(t=o.find(e=>e.ref.current===i))||void 0===t?void 0:t.textValue,l=function(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(i=i.filter(e=>e!==n));let a=i.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}(o.map(e=>e.textValue),r,a),u=null===(n=o.find(e=>e.textValue===l))||void 0===n?void 0:n.ref.current;!function e(t){N.current=t,window.clearTimeout(j.current),""!==t&&(j.current=window.setTimeout(()=>e(""),1e3))}(r),u&&setTimeout(()=>u.focus())};a.useEffect(()=>()=>window.clearTimeout(j.current),[]),a.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:E()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:E()),x++,()=>{1===x&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),x--}},[]);let B=a.useCallback(e=>{var t,n;return F.current===(null===(t=I.current)||void 0===t?void 0:t.side)&&function(e,t){return!!t&&function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;er!=d>r&&n<(s-u)*(r-c)/(d-c)+u&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,null===(n=I.current)||void 0===n?void 0:n.area)},[]);return(0,h.jsx)(nN,{scope:n,searchRef:N,onItemEnter:a.useCallback(e=>{B(e)&&e.preventDefault()},[B]),onItemLeave:a.useCallback(e=>{var t;B(e)||(null===(t=D.current)||void 0===t||t.focus(),L(null))},[B]),onTriggerLeave:a.useCallback(e=>{B(e)&&e.preventDefault()},[B]),pointerGraceTimerRef:O,onPointerGraceIntentChange:a.useCallback(e=>{I.current=e},[]),children:(0,h.jsx)(K,{...w?{as:nK,allowPinchZoom:!0}:void 0,children:(0,h.jsx)(k,{asChild:!0,trapped:o,onMountAutoFocus:(0,l.mK)(i,e=>{var t;e.preventDefault(),null===(t=D.current)||void 0===t||t.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,h.jsx)(y,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:g,children:(0,h.jsx)(tS.bL,{asChild:!0,...A,dir:R.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:L,onEntryFocus:(0,l.mK)(d,e=>{R.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,h.jsx)(tv,{role:"menu","aria-orientation":"vertical","data-state":ro(C.open),"data-radix-menu-content":"",dir:R.dir,...S,...b,ref:P,style:{outline:"none",...b.style},onKeyDown:(0,l.mK)(b.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&W(e.key));let o=D.current;if(e.target!==o||!nf.includes(e.key))return;e.preventDefault();let i=M().filter(e=>!e.disabled).map(e=>e.ref.current);nd.includes(e.key)&&i.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(i)}),onBlur:(0,l.mK)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),N.current="")}),onPointerMove:(0,l.mK)(e.onPointerMove,rl(e=>{let t=e.target,n=_.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>_.current?"right":"left";F.current=t,_.current=e.clientX}}))})})})})})})});nI.displayName=nj;var nB=a.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,h.jsx)(d.sG.div,{role:"group",...r,ref:t})});nB.displayName="MenuGroup";var nG=a.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,h.jsx)(d.sG.div,{...r,ref:t})});nG.displayName="MenuLabel";var nH="MenuItem",nV="menu.itemSelect",nz=a.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...o}=e,i=a.useRef(null),c=nk(nH,e.__scopeMenu),s=nO(nH,e.__scopeMenu),f=(0,u.s)(t,i),p=a.useRef(!1);return(0,h.jsx)(nX,{...o,ref:f,disabled:n,onClick:(0,l.mK)(e.onClick,()=>{let e=i.current;if(!n&&e){let t=new CustomEvent(nV,{bubbles:!0,cancelable:!0});e.addEventListener(nV,e=>null==r?void 0:r(e),{once:!0}),(0,d.hO)(e,t),t.defaultPrevented?p.current=!1:c.onClose()}}),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),p.current=!0},onPointerUp:(0,l.mK)(e.onPointerUp,e=>{var t;p.current||null===(t=e.currentTarget)||void 0===t||t.click()}),onKeyDown:(0,l.mK)(e.onKeyDown,e=>{let t=""!==s.searchRef.current;!n&&(!t||" "!==e.key)&&ns.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});nz.displayName=nH;var nX=a.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,c=nO(nH,n),s=nE(n),f=a.useRef(null),p=(0,u.s)(t,f),[m,v]=a.useState(!1),[g,y]=a.useState("");return a.useEffect(()=>{let e=f.current;if(e){var t;y((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}},[i.children]),(0,h.jsx)(nv.ItemSlot,{scope:n,disabled:r,textValue:null!=o?o:g,children:(0,h.jsx)(tS.q7,{asChild:!0,...s,focusable:!r,children:(0,h.jsx)(d.sG.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:p,onPointerMove:(0,l.mK)(e.onPointerMove,rl(e=>{r?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,l.mK)(e.onPointerLeave,rl(e=>c.onItemLeave(e))),onFocus:(0,l.mK)(e.onFocus,()=>v(!0)),onBlur:(0,l.mK)(e.onBlur,()=>v(!1))})})})}),nU=a.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...o}=e;return(0,h.jsx)(n1,{scope:e.__scopeMenu,checked:n,children:(0,h.jsx)(nz,{role:"menuitemcheckbox","aria-checked":ri(n)?"mixed":n,...o,ref:t,"data-state":ra(n),onSelect:(0,l.mK)(o.onSelect,()=>null==r?void 0:r(!!ri(n)||!n),{checkForDefaultPrevented:!1})})})});nU.displayName="MenuCheckboxItem";var nY="MenuRadioGroup",[nq,nZ]=nw(nY,{value:void 0,onValueChange:()=>{}}),n$=a.forwardRef((e,t)=>{let{value:n,onValueChange:r,...o}=e,i=(0,m.c)(r);return(0,h.jsx)(nq,{scope:e.__scopeMenu,value:n,onValueChange:i,children:(0,h.jsx)(nB,{...o,ref:t})})});n$.displayName=nY;var nJ="MenuRadioItem",nQ=a.forwardRef((e,t)=>{let{value:n,...r}=e,o=nZ(nJ,e.__scopeMenu),i=n===o.value;return(0,h.jsx)(n1,{scope:e.__scopeMenu,checked:i,children:(0,h.jsx)(nz,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":ra(i),onSelect:(0,l.mK)(r.onSelect,()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)},{checkForDefaultPrevented:!1})})})});nQ.displayName=nJ;var n0="MenuItemIndicator",[n1,n2]=nw(n0,{checked:!1}),n5=a.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...o}=e,i=n2(n0,n);return(0,h.jsx)(tR.C,{present:r||ri(i.checked)||!0===i.checked,children:(0,h.jsx)(d.sG.span,{...o,ref:t,"data-state":ra(i.checked)})})});n5.displayName=n0;var n6=a.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,h.jsx)(d.sG.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});n6.displayName="MenuSeparator";var n4=a.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,o=nx(n);return(0,h.jsx)(tw,{...o,...r,ref:t})});n4.displayName="MenuArrow";var n7="MenuSub",[n9,n8]=nw(n7),n3=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=nR(n7,t),l=nx(t),[u,c]=a.useState(null),[s,d]=a.useState(null),f=(0,m.c)(o);return a.useEffect(()=>(!1===i.open&&f(!1),()=>f(!1)),[i.open,f]),(0,h.jsx)(ts,{...l,children:(0,h.jsx)(nC,{scope:t,open:r,onOpenChange:f,content:s,onContentChange:d,children:(0,h.jsx)(n9,{scope:t,contentId:(0,P.B)(),triggerId:(0,P.B)(),trigger:u,onTriggerChange:c,children:n})})})};n3.displayName=n7;var re="MenuSubTrigger",rt=a.forwardRef((e,t)=>{let n=nR(re,e.__scopeMenu),r=nk(re,e.__scopeMenu),o=n8(re,e.__scopeMenu),i=nO(re,e.__scopeMenu),c=a.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},p=a.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return a.useEffect(()=>p,[p]),a.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),d(null)}},[s,d]),(0,h.jsx)(nM,{asChild:!0,...f,children:(0,h.jsx)(nX,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ro(n.open),...e,ref:(0,u.t)(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:(0,l.mK)(e.onPointerMove,rl(t=>{i.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||c.current||(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:(0,l.mK)(e.onPointerLeave,rl(e=>{var t,r;p();let o=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(o){let t=null===(r=n.content)||void 0===r?void 0:r.dataset.side,a="right"===t,l=o[a?"left":"right"],u=o[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:l,y:o.top},{x:u,y:o.top},{x:u,y:o.bottom},{x:l,y:o.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:(0,l.mK)(e.onKeyDown,t=>{let o=""!==i.searchRef.current;if(!e.disabled&&(!o||" "!==t.key)&&np[r.dir].includes(t.key)){var a;n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault()}})})})});rt.displayName=re;var rn="MenuSubContent",rr=a.forwardRef((e,t)=>{let n=nD(nj,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=nR(nj,e.__scopeMenu),c=nk(nj,e.__scopeMenu),s=n8(rn,e.__scopeMenu),d=a.useRef(null),f=(0,u.s)(t,d);return(0,h.jsx)(nv.Provider,{scope:e.__scopeMenu,children:(0,h.jsx)(tR.C,{present:r||i.open,children:(0,h.jsx)(nv.Slot,{scope:e.__scopeMenu,children:(0,h.jsx)(nW,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:f,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&(null===(t=d.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,l.mK)(e.onFocusOutside,e=>{e.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:(0,l.mK)(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:(0,l.mK)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=nm[c.dir].includes(e.key);if(t&&n){var r;i.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault()}})})})})})});function ro(e){return e?"open":"closed"}function ri(e){return"indeterminate"===e}function ra(e){return ri(e)?"indeterminate":e?"checked":"unchecked"}function rl(e){return t=>"mouse"===t.pointerType?e(t):void 0}rr.displayName=rn;var ru="DropdownMenu",[rc,rs]=(0,c.A)(ru,[nb]),rd=nb(),[rf,rp]=rc(ru),rm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:l,modal:u=!0}=e,c=rd(t),d=a.useRef(null),[f,p]=(0,s.i)({prop:o,defaultProp:null!=i&&i,onChange:l,caller:ru});return(0,h.jsx)(rf,{scope:t,triggerId:(0,P.B)(),triggerRef:d,contentId:(0,P.B)(),open:f,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(e=>!e),[p]),modal:u,children:(0,h.jsx)(nA,{...c,open:f,onOpenChange:p,dir:r,modal:u,children:n})})};rm.displayName=ru;var rh="DropdownMenuTrigger",rv=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=rp(rh,n),a=rd(n);return(0,h.jsx)(nM,{asChild:!0,...a,children:(0,h.jsx)(d.sG.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:(0,u.t)(t,i.triggerRef),onPointerDown:(0,l.mK)(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:(0,l.mK)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});rv.displayName=rh;var rg=e=>{let{__scopeDropdownMenu:t,...n}=e,r=rd(t);return(0,h.jsx)(nP,{...r,...n})};rg.displayName="DropdownMenuPortal";var ry="DropdownMenuContent",rw=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rp(ry,n),i=rd(n),u=a.useRef(!1);return(0,h.jsx)(nI,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:(0,l.mK)(e.onCloseAutoFocus,e=>{var t;u.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),u.current=!1,e.preventDefault()}),onInteractOutside:(0,l.mK)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rw.displayName=ry;var rb=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(nB,{...o,...r,ref:t})});rb.displayName="DropdownMenuGroup";var rx=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(nG,{...o,...r,ref:t})});rx.displayName="DropdownMenuLabel";var rE=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(nz,{...o,...r,ref:t})});rE.displayName="DropdownMenuItem";var rC=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(nU,{...o,...r,ref:t})});rC.displayName="DropdownMenuCheckboxItem";var rR=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(n$,{...o,...r,ref:t})});rR.displayName="DropdownMenuRadioGroup";var rS=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(nQ,{...o,...r,ref:t})});rS.displayName="DropdownMenuRadioItem";var rk=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(n5,{...o,...r,ref:t})});rk.displayName="DropdownMenuItemIndicator";var rA=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(n6,{...o,...r,ref:t})});rA.displayName="DropdownMenuSeparator",a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(n4,{...o,...r,ref:t})}).displayName="DropdownMenuArrow";var rM=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(rt,{...o,...r,ref:t})});rM.displayName="DropdownMenuSubTrigger";var rT=a.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,o=rd(n);return(0,h.jsx)(rr,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rT.displayName="DropdownMenuSubContent";var rL=rm,rD=rv,rP=rg,rj=rw,rN=rb,rO=rx,rI=rE,rF=rC,r_=rR,rK=rS,rW=rk,rB=rA,rG=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=rd(t),[l,u]=(0,s.i)({prop:r,defaultProp:null!=i&&i,onChange:o,caller:"DropdownMenuSub"});return(0,h.jsx)(n3,{...a,open:l,onOpenChange:u,children:n})},rH=rM,rV=rT},7668:(e,t,n)=>{"use strict";n.d(t,{B:()=>u});var r,o=n(2115),i=n(6611),a=(r||(r=n.t(o,2)))[" useId ".trim().toString()]||(()=>void 0),l=0;function u(e){let[t,n]=o.useState(a());return(0,i.N)(()=>{e||n(e=>e??String(l++))},[e]),e||(t?`radix-${t}`:"")}},7357:(e,t,n)=>{"use strict";n.d(t,{RG:()=>x,bL:()=>L,q7:()=>D});var r=n(2115),o=n(3610),i=n(1295),a=n(8068),l=n(8166),u=n(7668),c=n(9997),s=n(1524),d=n(1488),f=n(4256),p=n(5155),m="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},v="RovingFocusGroup",[g,y,w]=(0,i.N)(v),[b,x]=(0,l.A)(v,[w]),[E,C]=b(v),R=r.forwardRef((e,t)=>(0,p.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(S,{...e,ref:t})})}));R.displayName=v;var S=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:i,loop:l=!1,dir:u,currentTabStopId:g,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:b,onEntryFocus:x,preventScrollOnEntryFocus:C=!1,...R}=e,S=r.useRef(null),k=(0,a.s)(t,S),A=(0,f.jH)(u),[M,L]=(0,d.i)({prop:g,defaultProp:null!=w?w:null,onChange:b,caller:v}),[D,P]=r.useState(!1),j=(0,s.c)(x),N=y(n),O=r.useRef(!1),[I,F]=r.useState(0);return r.useEffect(()=>{let e=S.current;if(e)return e.addEventListener(m,j),()=>e.removeEventListener(m,j)},[j]),(0,p.jsx)(E,{scope:n,orientation:i,dir:A,loop:l,currentTabStopId:M,onItemFocus:r.useCallback(e=>L(e),[L]),onItemShiftTab:r.useCallback(()=>P(!0),[]),onFocusableItemAdd:r.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>F(e=>e-1),[]),children:(0,p.jsx)(c.sG.div,{tabIndex:D||0===I?-1:0,"data-orientation":i,...R,ref:k,style:{outline:"none",...e.style},onMouseDown:(0,o.mK)(e.onMouseDown,()=>{O.current=!0}),onFocus:(0,o.mK)(e.onFocus,e=>{let t=!O.current;if(e.target===e.currentTarget&&t&&!D){let t=new CustomEvent(m,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),C)}}O.current=!1}),onBlur:(0,o.mK)(e.onBlur,()=>P(!1))})})}),k="RovingFocusGroupItem",A=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:l,children:s,...d}=e,f=(0,u.B)(),m=l||f,h=C(k,n),v=h.currentTabStopId===m,w=y(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:E}=h;return r.useEffect(()=>{if(i)return b(),()=>x()},[i,b,x]),(0,p.jsx)(g.ItemSlot,{scope:n,id:m,focusable:i,active:a,children:(0,p.jsx)(c.sG.span,{tabIndex:v?0:-1,"data-orientation":h.orientation,...d,ref:t,onMouseDown:(0,o.mK)(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:(0,o.mK)(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:(0,o.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let o=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return M[o]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=w().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();let r=n.indexOf(e.currentTarget);n=h.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>T(n))}}),children:"function"==typeof s?s({isCurrentTabStop:v,hasTabStop:null!=E}):s})})});A.displayName=k;var M={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var L=R,D=A},1524:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r=n(2115);function o(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},7113:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,N:()=>d});var r=n(2115),o=(e,t,n,r,o,i,a,l)=>{let u=document.documentElement,c=["light","dark"];function s(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&i?o.map(e=>i[e]||e):o;n?(u.classList.remove(...r),u.classList.add(i&&i[t]?i[t]:t)):u.setAttribute(e,t)}),l&&c.includes(t)&&(u.style.colorScheme=t)}if(r)s(r);else try{let e=localStorage.getItem(t)||n,r=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;s(r)}catch(e){}},i=["light","dark"],a="(prefers-color-scheme: dark)",l="undefined"==typeof window,u=r.createContext(void 0),c={setTheme:e=>{},themes:[]},s=()=>{var e;return null!=(e=r.useContext(u))?e:c},d=e=>r.useContext(u)?r.createElement(r.Fragment,null,e.children):r.createElement(p,{...e}),f=["light","dark"],p=e=>{let{forcedTheme:t,disableTransitionOnChange:n=!1,enableSystem:o=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:s=f,defaultTheme:d=o?"system":"light",attribute:p="data-theme",value:y,children:w,nonce:b,scriptProps:x}=e,[E,C]=r.useState(()=>h(c,d)),[R,S]=r.useState(()=>"system"===E?g():E),k=y?Object.values(y):s,A=r.useCallback(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=g());let r=y?y[t]:t,a=n?v(b):null,u=document.documentElement,c=e=>{"class"===e?(u.classList.remove(...k),r&&u.classList.add(r)):e.startsWith("data-")&&(r?u.setAttribute(e,r):u.removeAttribute(e))};if(Array.isArray(p)?p.forEach(c):c(p),l){let e=i.includes(d)?d:null,n=i.includes(t)?t:e;u.style.colorScheme=n}null==a||a()},[b]),M=r.useCallback(e=>{let t="function"==typeof e?e(E):e;C(t);try{localStorage.setItem(c,t)}catch(e){}},[E]),T=r.useCallback(e=>{S(g(e)),"system"===E&&o&&!t&&A("system")},[E,t]);r.useEffect(()=>{let e=window.matchMedia(a);return e.addListener(T),T(e),()=>e.removeListener(T)},[T]),r.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?C(e.newValue):M(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[M]),r.useEffect(()=>{A(null!=t?t:E)},[t,E]);let L=r.useMemo(()=>({theme:E,setTheme:M,forcedTheme:t,resolvedTheme:"system"===E?R:E,themes:o?[...s,"system"]:s,systemTheme:o?R:void 0}),[E,M,t,R,o,s]);return r.createElement(u.Provider,{value:L},r.createElement(m,{forcedTheme:t,storageKey:c,attribute:p,enableSystem:o,enableColorScheme:l,defaultTheme:d,value:y,themes:s,nonce:b,scriptProps:x}),w)},m=r.memo(e=>{let{forcedTheme:t,storageKey:n,attribute:i,enableSystem:a,enableColorScheme:l,defaultTheme:u,value:c,themes:s,nonce:d,scriptProps:f}=e,p=JSON.stringify([i,n,u,t,s,c,a,l]).slice(1,-1);return r.createElement("script",{...f,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(o.toString(),")(").concat(p,")")}})}),h=(e,t)=>{let n;if(!l){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},v=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},g=e=>(e||(e=window.matchMedia(a)),e.matches?"dark":"light")}}]);