import{a as e,c as t,i as n,n as r,o as i}from"./dist-aE7UmubC.js";import{n as a,r as o}from"./button-BHVKhtQ6.js";var s=i((t=>{var n=e();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};l.node;var u=r(l),d=t(e(),1),f=t(c(),1),p=n(),m=Object.defineProperty,h=(e,t)=>m(e,`name`,{value:t,configurable:!0}),g=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=a(`Primitive.${t}`),r=d.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,p.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}h(_,`dispatchDiscreteCustomEvent`);var v=Object.defineProperty,y=(e,t)=>v(e,`name`,{value:t,configurable:!0});function b(e,t){let n=d.createContext(t);n.displayName=e+`Context`;let r=y(e=>{let{children:t,...r}=e,i=d.useMemo(()=>r,Object.values(r));return(0,p.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=d.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return y(i,`useContext`),[r,i]}y(b,`createContext`);function x(e,t=[]){let n=[];function r(t,r){let i=d.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=y(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=d.useMemo(()=>o,Object.values(o));return(0,p.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=d.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return y(s,`useContext`),[o,s]}y(r,`createContext`);let i=y(()=>{let t=n.map(e=>d.createContext(e));return y(function(n){let r=n?.[e]||t;return d.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,S(i,...t)]}y(x,`createContextScope`);function S(...e){let t=e[0];if(e.length===1)return t;let n=y(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return y(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}y(S,`composeContextScopes`);var C=Object.defineProperty,w=(e,t)=>C(e,`name`,{value:t,configurable:!0}),T=!!(typeof window<`u`&&window.document&&window.document.createElement);function E(e,t,{checkForDefaultPrevented:n=!0}={}){return w(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}w(E,`composeEventHandlers`);function ee(e){if(!T)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}w(ee,`getOwnerWindow`);function D(e){if(!T)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}w(D,`getOwnerDocument`);function O(e,t=!1){let{activeElement:n}=D(e);if(!n?.nodeName)return null;if(te(n)&&n.contentDocument)return O(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=D(n).getElementById(e);if(t)return t}}return n}w(O,`getActiveElement`);function te(e){return e.tagName===`IFRAME`}w(te,`isFrame`);var k=globalThis?.document?d.useLayoutEffect:()=>{},ne=Object.defineProperty,re=(e,t)=>ne(e,`name`,{value:t,configurable:!0}),ie=d.useEffectEvent,ae=d.useInsertionEffect;function oe(e){if(typeof ie==`function`)return ie(e);let t=d.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ae==`function`?ae(()=>{t.current=e}):k(()=>{t.current=e}),d.useMemo(()=>((...e)=>t.current?.(...e)),[])}re(oe,`useEffectEvent`);var se=Object.defineProperty,A=(e,t)=>se(e,`name`,{value:t,configurable:!0}),ce=d.useInsertionEffect||k;function le({prop:e,defaultProp:t,onChange:n=A(()=>{},`onChange`),caller:r}){let[i,a,o]=ue({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,d.useCallback(t=>{if(s){let n=de(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}A(le,`useControllableState`);function ue({defaultProp:e,onChange:t}){let[n,r]=d.useState(e),i=d.useRef(n),a=d.useRef(t);return ce(()=>{a.current=t},[t]),d.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}A(ue,`useUncontrolledState`);function de(e){return typeof e==`function`}A(de,`isFunction`);var fe=Symbol(`RADIX:SYNC_STATE`);function pe(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=oe(o),u=[{...n,state:a}];r&&u.push(r);let[f,p]=d.useReducer((t,n)=>{if(n.type===fe)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=f.state,h=d.useRef(m);d.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=d.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return d.useEffect(()=>{c&&!Object.is(i,f.state)&&p({type:fe,state:i})},[i,f.state,c]),[g,p]}A(pe,`useControllableStateReducer`);var me=Object.defineProperty,j=(e,t)=>me(e,`name`,{value:t,configurable:!0});function he(e,t){return d.useReducer((e,n)=>t[e][n]??e,e)}j(he,`useStateMachine`);var ge=j(e=>{let{present:t,children:n}=e,r=_e(t),i=typeof n==`function`?n({present:r.isPresent}):d.Children.only(n),a=ye(r.ref,be(i));return typeof n==`function`||r.isPresent?d.cloneElement(i,{ref:a}):null},`Presence`);function _e(e){let[t,n]=d.useState(),r=d.useRef(null),i=d.useRef(e),a=d.useRef(`none`),o=d.useRef(void 0),[s,c]=he(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return d.useEffect(()=>{s===`mounted`?(a.current=o.current??M(r.current),o.current=void 0):a.current=`none`},[s]),k(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=M(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),k(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=j(a=>{let o=M(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=j(e=>{e.target===t&&(a.current=M(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:d.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=M(t)}else r.current=null;n(e)},[])}}j(_e,`usePresence`);function ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}j(ve,`setRef`);function ye(...e){let t=d.useRef(e);return t.current=e,d.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=ve(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;exe(e,`name`,{value:t,configurable:!0}),Ce=d.useId||(()=>void 0),we=0;function N(e){let[t,n]=d.useState(Ce());return k(()=>{e||n(e=>e??String(we++))},[e]),e||(t?`radix-${t}`:``)}Se(N,`useId`);var Te=Object.defineProperty,Ee=(e,t)=>Te(e,`name`,{value:t,configurable:!0});function P(e){let t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ee(P,`useCallbackRef`);var De=Object.defineProperty,F=(e,t)=>De(e,`name`,{value:t,configurable:!0}),Oe=`dismissableLayer.update`,ke=`dismissableLayer.pointerDownOutside`,Ae=`dismissableLayer.focusOutside`,je,Me=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ne=d.forwardRef(F(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,f=d.useContext(Me),[m,h]=d.useState(null),_=m?.ownerDocument??globalThis?.document,[,v]=d.useState({}),y=o(t,h),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=x?b.indexOf(x):-1,C=m?b.indexOf(m):-1,w=f.layersWithOutsidePointerEventsDisabled.size>0,T=C>=S,ee=d.useRef(!1),D=Ie(e=>{a?.(e),c?.(e),e.defaultPrevented||l?.()},{ownerDocument:_,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:ee,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:d.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return T&&!t},[f.branches,T])}),O=Le(e=>{if(r&&ee.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||l?.())},_),te=m?C===b.length-1:!1,k=P(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return d.useEffect(()=>{if(te)return _.addEventListener(`keydown`,k,{capture:!0}),()=>_.removeEventListener(`keydown`,k,{capture:!0})},[_,te,k]),d.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(je=_.body.style.pointerEvents,_.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),Re(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(m),f.layersWithOutsidePointerEventsDisabled.size===0&&(_.body.style.pointerEvents=je))}},[m,_,n,f]),d.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),Re())},[m,f]),d.useEffect(()=>{let e=F(()=>v({}),`handleUpdate`);return document.addEventListener(Oe,e),()=>document.removeEventListener(Oe,e)},[]),(0,p.jsx)(g.div,{...u,ref:y,style:{pointerEvents:w?T?`auto`:`none`:void 0,...e.style},onFocusCapture:E(e.onFocusCapture,O.onFocusCapture),onBlurCapture:E(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:E(e.onPointerDownCapture,D.onPointerDownCapture)})},`DismissableLayer`));function Pe(){let e=d.useContext(Me),[t,n]=d.useState(null);return d.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}F(Pe,`useDismissableLayerSurface`);var Fe=F(()=>!0,`IS_TRUE`);function Ie(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Fe}=t,s=P(e),c=d.useRef(!1),l=d.useRef(!1),u=d.useRef(new Map),f=d.useRef(()=>{});return d.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}F(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}F(t,`isOutsideInteractionIntercepted`);function d(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&f.current()},0)}F(d,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}F(p,`handleInteractionBubble`);let m=F(a=>{if(a.target&&!c.current){let d=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||ze(ke,s,p,{discrete:!0})};if(F(d,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?d():(n.removeEventListener(`click`,f.current),f.current=d,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,d,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,d,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:F(()=>c.current=!0,`onPointerDownCapture`)}}F(Ie,`usePointerDownOutside`);function Le(e,t=globalThis?.document){let n=P(e),r=d.useRef(!1);return d.useEffect(()=>{let e=F(e=>{e.target&&!r.current&&ze(Ae,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:F(()=>r.current=!0,`onFocusCapture`),onBlurCapture:F(()=>r.current=!1,`onBlurCapture`)}}F(Le,`useFocusOutside`);function Re(){let e=new CustomEvent(Oe);document.dispatchEvent(e)}F(Re,`dispatchUpdate`);function ze(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_(i,a):i.dispatchEvent(a)}F(ze,`handleAndDispatchCustomEvent`);var Be=Object.defineProperty,I=(e,t)=>Be(e,`name`,{value:t,configurable:!0}),Ve=`focusScope.autoFocusOnMount`,He=`focusScope.autoFocusOnUnmount`,Ue={bubbles:!1,cancelable:!0},We=d.forwardRef(I(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[c,l]=d.useState(null),u=P(i),f=P(a),m=d.useRef(null),h=o(t,l),_=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let e=function(e){if(_.paused||!c)return;let t=e.target;c.contains(t)?m.current=t:L(m.current,{select:!0})},t=function(e){if(_.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||L(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&L(c)};I(e,`handleFocusIn`),I(t,`handleFocusOut`),I(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,_.paused]),d.useEffect(()=>{if(c){Ze.add(_);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Ve,Ue);c.addEventListener(Ve,u),c.dispatchEvent(t),t.defaultPrevented||(Ge(et(qe(c)),{select:!0}),document.activeElement===e&&L(c))}return()=>{c.removeEventListener(Ve,u),setTimeout(()=>{let t=new CustomEvent(He,Ue);c.addEventListener(He,f),c.dispatchEvent(t),t.defaultPrevented||L(e??document.body,{select:!0}),c.removeEventListener(He,f),Ze.remove(_)},0)}}},[c,u,f,_]);let v=d.useCallback(e=>{if(!n&&!r||_.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ke(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&L(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&L(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,_.paused]);return(0,p.jsx)(g.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})},`FocusScope`));function Ge(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(L(r,{select:t}),document.activeElement!==n)return}I(Ge,`focusFirst`);function Ke(e){let t=qe(e);return[Je(t,e),Je(t.reverse(),e)]}I(Ke,`getTabbableEdges`);function qe(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:I(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}I(qe,`getTabbableCandidates`);function Je(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ye(r,{upTo:t})))return r}I(Je,`findVisible`);function Ye(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}I(Ye,`isHidden`);function Xe(e){return e instanceof HTMLInputElement&&`select`in e}I(Xe,`isSelectableInput`);function L(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xe(e)&&t&&e.select()}}I(L,`focus`);var Ze=Qe();function Qe(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=$e(e,t),e.unshift(t)},remove(t){e=$e(e,t),e[0]?.resume()}}}I(Qe,`createFocusScopesStack`);function $e(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}I($e,`arrayRemove`);function et(e){return e.filter(e=>e.tagName!==`A`)}I(et,`removeLinks`);var tt=Object.defineProperty,nt=d.forwardRef(((e,t)=>tt(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=d.useState(!1);k(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.createPortal((0,p.jsx)(g.div,{...r,ref:t}),o):null},`Portal`)),rt=Object.defineProperty,it=(e,t)=>rt(e,`name`,{value:t,configurable:!0}),R=0,z=null;function at(e){return ot(),e.children}it(at,`FocusGuards`);function ot(){d.useEffect(()=>{z||={start:st(),end:st()};let{start:e,end:t}=z;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),R++,()=>{R===1&&(z?.start.remove(),z?.end.remove(),z=null),R=Math.max(0,R-1)}},[])}it(ot,`useFocusGuards`);function st(){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}it(st,`createFocusGuard`);var B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`u`)return jt;var t=Nt(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])}},Ft=At(),W=`data-scroll-locked`,It=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` .${ut} { overflow: hidden ${r}; padding-right: ${s}px ${r}; } body[${W}] { overflow: hidden ${r}; overscroll-behavior: contain; ${[t&&`position: relative ${r};`,n===`margin`&&` padding-left: ${i}px; padding-top: ${a}px; padding-right: ${o}px; margin-left:0; margin-top:0; margin-right: ${s}px ${r}; `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} } .${V} { right: ${s}px ${r}; } .${H} { margin-right: ${s}px ${r}; } .${V} .${V} { right: 0 ${r}; } .${H} .${H} { margin-right: 0 ${r}; } body[${W}] { ${dt}: ${s}px; } `},Lt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Rt=function(){d.useEffect(function(){return document.body.setAttribute(W,(Lt()+1).toString()),function(){var e=Lt()-1;e<=0?document.body.removeAttribute(W):document.body.setAttribute(W,e.toString())}},[])},zt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Rt();var a=d.useMemo(function(){return Pt(i)},[i]);return d.createElement(Ft,{styles:It(a,!t,i,n?``:`!important`)})},Bt=!1;if(typeof window<`u`)try{var G=Object.defineProperty({},"passive",{get:function(){return Bt=!0,!0}});window.addEventListener(`test`,G,G),window.removeEventListener(`test`,G,G)}catch{Bt=!1}var K=Bt?{passive:!1}:!1,Vt=function(e){return e.tagName===`TEXTAREA`},Ht=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Vt(e)&&n[t]===`visible`)},Ut=function(e){return Ht(e,`overflowY`)},Wt=function(e){return Ht(e,`overflowX`)},Gt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Jt(e,r)){var i=Yt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Kt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},qt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Jt=function(e,t){return e===`v`?Ut(t):Wt(t)},Yt=function(e,t){return e===`v`?Kt(t):qt(t)},Xt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Zt=function(e,t,n,r,i){var a=Xt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Yt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Jt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},q=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Qt=function(e){return[e.deltaX,e.deltaY]},$t=function(e){return e&&`current`in e?e.current:e},en=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tn=function(e){return` .block-interactivity-${e} {pointer-events: none;} .allow-interactivity-${e} {pointer-events: all;} `},nn=0,J=[];function rn(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(nn++)[0],a=d.useState(At)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=lt([e.lockRef.current],(e.shards||[]).map($t),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=q(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Gt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Gt(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Zt(h,t,e,h===`h`?s:c,!0)},[]),c=d.useCallback(function(e){var n=e;if(J.length&&J[J.length-1]===a){var r=`deltaY`in n?Qt(n):q(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&en(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map($t).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=d.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:an(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=d.useCallback(function(e){n.current=q(e),r.current=void 0},[]),f=d.useCallback(function(t){l(t.type,Qt(t),t.target,s(t,e.lockRef.current))},[]),p=d.useCallback(function(t){l(t.type,q(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return J.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,K),document.addEventListener(`touchmove`,c,K),document.addEventListener(`touchstart`,u,K),function(){J=J.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,K),document.removeEventListener(`touchmove`,c,K),document.removeEventListener(`touchstart`,u,K)}},[]);var m=e.removeScrollBar,h=e.inert;return d.createElement(d.Fragment,null,h?d.createElement(a,{styles:tn(i)}):null,m?d.createElement(zt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function an(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var on=xt(St,rn),sn=d.forwardRef(function(e,t){return d.createElement(U,B({},e,{ref:t,sideCar:on}))});sn.classNames=U.classNames;var cn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Y=new WeakMap,X=new WeakMap,ln={},un=0,dn=function(e){return e&&(e.host||dn(e.parentNode))},fn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=dn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},pn=function(e,t,n,r){var i=fn(t,Array.isArray(e)?e:[e]);ln[n]||(ln[n]=new WeakMap);var a=ln[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Y.get(e)||0)+1,l=(a.get(e)||0)+1;Y.set(e,c),a.set(e,l),o.push(e),c===1&&i&&X.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),un++,function(){o.forEach(function(e){var t=Y.get(e)-1,i=a.get(e)-1;Y.set(e,t),a.set(e,i),t||(X.has(e)||e.removeAttribute(r),X.delete(e)),i||e.removeAttribute(n)}),un--,un||(Y=new WeakMap,Y=new WeakMap,X=new WeakMap,ln={})}},mn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||cn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),pn(r,i,n,`aria-hidden`)):function(){return null}},hn=Object.defineProperty,Z=(e,t)=>hn(e,`name`,{value:t,configurable:!0}),gn=`Dialog`,[_n,vn]=x(gn),[yn,Q]=_n(gn),bn=Z(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=d.useRef(null),c=d.useRef(null),[l,u]=le({prop:r,defaultProp:i??!1,onChange:a,caller:gn}),[f,m]=d.useState(0),[h,g]=d.useState(0);return(0,p.jsx)(yn,{scope:t,triggerRef:s,contentRef:c,contentId:N(),titleId:N(),descriptionId:N(),titlePresent:f>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:l,onOpenChange:u,onOpenToggle:d.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),xn=`DialogPortal`,[Sn,Cn]=_n(xn,{forceMount:void 0}),wn=Z(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Q(xn,t);return(0,p.jsx)(Sn,{scope:t,forceMount:n,children:d.Children.map(r,e=>(0,p.jsx)(ge,{present:n||a.open,children:(0,p.jsx)(nt,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Tn=`DialogOverlay`,En=d.forwardRef(Z(function(e,t){let n=Cn(Tn,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Q(Tn,e.__scopeDialog);return a.modal?(0,p.jsx)(ge,{present:r||a.open,children:(0,p.jsx)(On,{...i,ref:t})}):null},`DialogOverlay`)),Dn=a(`DialogOverlay.RemoveScroll`),On=d.forwardRef(Z(function(e,t){let{__scopeDialog:n,...r}=e,i=Q(Tn,n),a=Pe(),s=o(t,a);return(0,p.jsx)(sn,{as:Dn,allowPinchZoom:!0,shards:[i.contentRef],children:(0,p.jsx)(g.div,{"data-state":zn(i.open),...r,ref:s,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),$=`DialogContent`,kn=d.forwardRef(Z(function(e,t){let n=Cn($,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Q($,e.__scopeDialog);return(0,p.jsx)(ge,{present:r||a.open,children:a.modal?(0,p.jsx)(An,{...i,ref:t}):(0,p.jsx)(jn,{...i,ref:t})})},`DialogContent`)),An=d.forwardRef(Z(function(e,t){let n=Q($,e.__scopeDialog),r=d.useRef(null),i=o(t,n.contentRef,r);return d.useEffect(()=>{let e=r.current;if(e)return mn(e)},[]),(0,p.jsx)(Mn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:E(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:E(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),jn=d.forwardRef(Z(function(e,t){let n=Q($,e.__scopeDialog),r=d.useRef(!1),i=d.useRef(!1);return(0,p.jsx)(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Mn=d.forwardRef(Z(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Q($,n);return ot(),(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(We,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,p.jsx)(Ne,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":zn(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Nn=`DialogTitle`,Pn=d.forwardRef(Z(function(e,t){let{__scopeDialog:n,...r}=e,i=Q(Nn,n),{setTitleCount:a}=i;return k(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,p.jsx)(g.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Fn=`DialogDescription`,In=d.forwardRef(Z(function(e,t){let{__scopeDialog:n,...r}=e,i=Q(Fn,n),{setDescriptionCount:a}=i;return k(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,p.jsx)(g.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Ln=`DialogClose`,Rn=d.forwardRef(Z(function(e,t){let{__scopeDialog:n,...r}=e,i=Q(Ln,n);return(0,p.jsx)(g.button,{type:`button`,...r,ref:t,onClick:E(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function zn(e){return e?`open`:`closed`}Z(zn,`getState`);export{En as a,u as c,In as i,c as l,Rn as n,wn as o,kn as r,Pn as s,bn as t};