1import{r as t,j as u}from"./jsx-runtime-cLmjXj0T.js";import{r as w}from"./index-CWmZxwWW.js";function y({label:f,children:p,side:r="bottom"}){const a=t.useRef(null),[n,s]=t.useState(!1),[l,d]=t.useState({top:0,left:0}),[m,x]=t.useState(!1);t.useEffect(()=>x(!0),[]);function i(){const e=a.current;if(e){const o=e.getBoundingClientRect();d({left:o.left+o.width/2,top:r==="top"?o.top-8:o.bottom+8})}s(!0)}function c(){s(!1)}return t.useEffect(()=>{if(!n)return;const e=()=>s(!1);return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[n]),u.jsxs("span",{ref:a,className:"inline-flex",onMouseEnter:i,onMouseLeave:c,onFocus:i,onBlur:c,children:[p,m?w.createPortal(u.jsx("span",{role:"tooltip",style:{top:l.top,left:l.left},className:`pointer-events-none fixed z-[999] -translate-x-1/2 whitespace-nowrap bg-dark px-2.5 py-1.5 font-data text-[10px] font-semibold uppercase tracking-[0.04em] text-ink-on-dark transition-[opacity,transform] duration-150 ${r==="top"?"-translate-y-full":""} ${n?"scale-100 opacity-100":"scale-95 opacity-0"}`,children:f}),document.body):null]})}export{y 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.