1import{r as u}from"./chunk-KNED5TY2-6IudgIT3.js";import{u as d}from"./keyboard-BJfB_sNV.js";import{p as m,o as p}from"./use-sync-refs-CBs_dnGH.js";function g(t){let e=t.width/2,r=t.height/2;return{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function b(t,e){return!(!t||!e||t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)}function E({disabled:t=!1}={}){let e=u.useRef(null),[r,n]=u.useState(!1),o=m(),i=p(()=>{e.current=null,n(!1),o.dispose()}),f=p(s=>{if(o.dispose(),e.current===null){e.current=s.currentTarget,n(!0);{let l=d(s.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",a=>{if(e.current){let c=g(a);n(b(c,e.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:t?{}:{onPointerDown:f,onPointerUp:i,onClick:i}}}function w(t,e){return u.useMemo(()=>{var r;if(t.type)return t.type;let n=(r=t.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||e?.tagName==="BUTTON"&&!e.hasAttribute("type"))return"button"},[t.type,t.as,e])}export{w as e,E as w};
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.