1import{r as c}from"./react-vendor-n58YcWca.js";import{c as g}from"./useMixpanelEvent-DAJ4K_rU.js";function S(n,o){const s=`com.Genius.useLocalStorage.${n}`,a=c.useCallback(()=>{if(typeof window>"u")return o instanceof Function?o():o;try{const t=window.localStorage.getItem(s);return t===null?o instanceof Function?o():o:JSON.parse(t)}catch{return o instanceof Function?o():o}},[o,s]),[u,r]=c.useState(a),l=c.useCallback(t=>{try{r(e=>{const p=t instanceof Function?t(e):t;return typeof window<"u"&&window.localStorage.setItem(s,JSON.stringify(p)),p})}catch{}},[s]);return[u,l]}function y(n,o="collapsible",s=!0){const a=g(`${o}:section_closed`,{sectionId:n}),u=g(`${o}:section_opened`,{sectionId:n}),[r,l]=S(`collapsible-${n}`,s),t=`collapsible-${n}-content`,e=c.useCallback(b=>{l(d=>{const f=b??!d;return f===d?d:(f?u():a(),f)})},[l,u,a]),p=c.useCallback(()=>e(),[e]),i=c.useCallback(()=>e(!0),[e]);return{isOpen:r,toggleButtonProps:{onClick:p,"aria-expanded":r,"aria-controls":t},contentProps:{role:"region",id:t,"aria-hidden":!r},open:i}}export{S as a,y as u}; 2//# sourceMappingURL=useCollapsible-CeWih5TW.js.map
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.