1import{r}from"./vendor-react-Js-mchSQ.js";function u(){const n=r.useCallback(async a=>{var e;if(a.status===429)try{const t=await a.json();if(t.error==="LIMIT_REACHED"&&((e=t.details)!=null&&e.feature)){const i=new CustomEvent("limitReached",{detail:{feature:t.details.feature,limit:t.details.limit,remaining:t.details.remaining||0,...t.quota?{quota:t.quota}:{}}});return window.dispatchEvent(i),!0}}catch(t){console.warn("Failed to parse limit error response:",t)}return!1},[]),s=r.useCallback(a=>{var e;if(a&&typeof a=="object"&&"status"in a&&a.status===429&&"data"in a&&a.data&&typeof a.data=="object"){const t=a.data;if(t.error==="LIMIT_REACHED"&&((e=t.details)!=null&&e.feature)){const i=new CustomEvent("limitReached",{detail:{feature:t.details.feature,limit:t.details.limit,remaining:t.details.remaining||0,...t.quota?{quota:t.quota}:{}}});return window.dispatchEvent(i),!0}}return!1},[]);return{checkForLimitError:n,checkForLimitErrorFromError:s}}export{u};
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.