1import{l as e,m as s,u as t}from"./2c1ab0fe.GMbxnz74.js";import{bT as n}from"./164ad2e3.B4L1MRYB.js";function r(e){return null!=e?.assets?.main?.url}function i(e,s){const t=new WebSocket(e),n=({data:t})=>{try{const{event:e,data:n}=JSON.parse(t);if("update"!==e)return;s(n)}catch(n){console.log(`error parsing update message from ${e} : ${n}`)}};return t.addEventListener("message",n),()=>{t.removeEventListener("message",n),t.close()}}function a(e,s){const t=new Map,n=new Map;return e.extensions.forEach(({uuid:e,assets:{main:{lastUpdated:s}},localization:r})=>{t.set(e,s),r&&n.set(e,r.lastUpdated)}),i(e.socket.url,({extensions:e})=>{e.forEach(({uuid:e,assets:{main:{lastUpdated:r}},localization:i})=>{const a=t.get(e),o=n.get(e),u=r&&a!==r,c=i?.lastUpdated&&o!==i.lastUpdated;let d;u&&(t.set(e,r),d=()=>s(e)),c&&(n.set(e,i.lastUpdated),d=()=>s(e,i)),d&&d()})})}function o(e,s){const{uuid:t,socketUrl:n}=e,r=i(n,({extensions:e})=>{e.find(({uuid:e})=>e===t)&&(r(),s())})}function u({impressionType:r,impressionFeatures:i,enabled:a,children:o}){const u=function({impressionType:t,impressionFeatures:r,enabled:i=!0}){const a=n(),o=e(null),u=e(!1),c=e({impressionType:t,impressionFeatures:r});return c.current={impressionType:t,impressionFeatures:r},s(()=>{if(!i||u.current||!window.IntersectionObserver)return;const e=new IntersectionObserver(t=>{const n=t.some(({isIntersecting:e})=>e);s&&n&&(e.unobserve(s),u.current=!0,a("impression",{...c.current,timestamp:new Date}))},{threshold:1}),s=o.current;return s&&e.observe(s),()=>{s&&e.unobserve(s)}},[a,i]),o}({impressionType:r,impressionFeatures:i,enabled:a});return t("div",{ref:u,children:o})}export{u as I,o as a,r as i,a as s};
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.