1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`v5.20260930.1216-production.7e7ada9`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`41c95968-d8d4-4970-ad3d-07d7bd1d2ef4`,e._sentryDebugIdIdentifier=`sentry-dbid-41c95968-d8d4-4970-ad3d-07d7bd1d2ef4`)}catch{}})();import{a as e}from"./rolldown-runtime-B9z5rJDh.js";import{t}from"./react-DuuDrPmI.js";import{h as n,n as r,t as i}from"./useIsoLayoutEffect-BxtQW3kb.js";import{c as a,l as o,u as s}from"./useRenderElement-Cg6E-wWo.js";var c=e(t(),1),l=c.createContext(void 0);function u(e=!1){let t=c.useContext(l);if(t===void 0&&!e)throw Error(a(16));return t}function d(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:c.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function f(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:l=!0,composite:f}=e,h=c.useRef(null),g=u(!0),_=f??g!==void 0,{props:v}=d({focusableWhenDisabled:n,disabled:t,composite:_,tabIndex:a,isNativeButton:l}),y=c.useCallback(()=>{let e=h.current;p(e)&&_&&t&&v.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,v.disabled,_]);return i(y,[y]),{getButtonProps:c.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:a,onPointerDown:c,...u}=e;return s({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(o(e),a?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=p(i),c=!l&&m(i),u=r&&(l?s:!c),d=e.key===`Enter`,f=e.key===` `,h=i.getAttribute(`role`),g=h?.startsWith(`menuitem`)||h===`option`||h===`gridcell`;if(r&&_&&f){if(e.defaultPrevented&&g)return;e.preventDefault(),c||l&&s?(i.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!l&&(f||d)&&e.preventDefault(),!l&&d&&n?.(e))},onKeyUp(e){if(!t){if(o(e),i?.(e),e.target===e.currentTarget&&l&&_&&p(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!l&&!_&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}c?.(e)}},l?{type:`button`}:{role:`button`},v,u)},[t,v,_,l]),buttonRef:r(e=>{h.current=e,y()})}}function p(e){return n(e)&&e.tagName===`BUTTON`}function m(e){return!!(e?.tagName===`A`&&e?.href)}export{l as n,u as r,f as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.