1(()=>{var O=/jpe?g|png|webp|avif|gif/;var M=/_\d+x\d*(?=\.[a-z0-9]+$)/i,C=/@[23]x(?=\.[a-z0-9]+$)/i;function I(e){return e<.1}function T(e){let f=e.indexOf("#");return f===-1?e:e.slice(0,f)}function P(e,f){if(!e)return;let n=e.trim();if(n)try{return new URL(n,f).href}catch{return}}function E(e,f){let n=P(e,f);if(n)try{let u=new URL(n),c=u.pathname.replace(C,"").replace(M,"");return`${u.origin}${c}`}catch{return}}function b(e){if(!e)return[];let f=[],n=0;for(;n<e.length;){for(;n<e.length&&/[\s,]/.test(e.charAt(n));)n++;if(n>=e.length)break;let u=n;for(;n<e.length&&!/\s/.test(e.charAt(n));)n++;let c=e.slice(u,n);if(c.charAt(c.length-1)===",")c=c.replace(/,+$/,"");else{let p=e.indexOf(",",n);n=p===-1?e.length:p+1}c&&f.push(c)}return f}function N(e,f,n){let u=T(e),c=E(e,n),p;for(let w of f){let A=T(w.url)===u;if(A&&!w.variantOnly)return{status:"used",match:w};if(p)continue;let R=E(w.url,n);(A||!!c&&R===c)&&(p=w)}return p?{status:"variant",match:p}:{status:"unused"}}function x(e){let f=(e.currentSrc||"").trim(),n=(e.src||"").trim(),u=f||n;if(!u)return[];let c=[{rawUrl:u,usedRawUrl:u,variantOnly:!1}];n&&n!==u&&c.push({rawUrl:n,usedRawUrl:u,variantOnly:!0});for(let p of b(e.srcset))p!==u&&c.push({rawUrl:p,usedRawUrl:u,variantOnly:!0});return c}(function(){if(typeof window=="undefined"||typeof document=="undefined")return;let e=(...d)=>{var a;return(a=window.location.href)!=null&&a.includes("debug")?console.log("[RB]",...d):null};if(!("PerformanceObserver"in window)||!window.performance){e("Preload image checker script not loaded, PerformanceObserver not supported");return}function f(d){let a=window.getComputedStyle(d),s=a.backgroundImage||a.background;if(!s||s.indexOf("url")===-1)return[];let h=[],r=/url\((['"]?)(.*?)\1\)/gi,t=r.exec(s);for(;t;)h.push(t[2]),t=r.exec(s);return h}let n;async function u(){return n=n||new Promise(d=>{new PerformanceObserver(a=>{let s=a.getEntries(),h=s[s.length-1];d(h)}).observe({type:"largest-contentful-paint",buffered:!0})}),n}async function c(){return new Promise(d=>{new PerformanceObserver(a=>{let[s]=a.getEntriesByType("navigation");d(s.responseStart)}).observe({type:"navigation",buffered:!0})})}function p(d){var h;let a=[],s=(r,t,l,m=!1)=>{let y=P(r,d);!y||!O.test(y)||a.push({url:y,usedUrl:P(t,d)||y,imageElement:l instanceof HTMLImageElement?l:void 0,variantOnly:m})};for(let r of Array.from(document.querySelectorAll("img"))){let t=r,l={src:t.src,currentSrc:t.currentSrc,srcset:t.getAttribute("srcset")};for(let m of x(l))s(m.rawUrl,m.usedRawUrl,t,m.variantOnly)}for(let r of Array.from(document.querySelectorAll("picture source[srcset]"))){let t=((h=r.parentElement)==null?void 0:h.querySelector("img"))||void 0,l=(t==null?void 0:t.currentSrc)||(t==null?void 0:t.src);for(let m of b(r.getAttribute("srcset")))s(m,l,t,!0)}for(let r of Array.from(document.querySelectorAll("[data-bgset]")))for(let t of(r.getAttribute("data-bgset")||"").split("|"))for(let l of b(t))s(l,void 0,r);for(let r of Array.from(document.querySelectorAll("[data-src]")))s(r.getAttribute("data-src"),void 0,r,!0);for(let r of Array.from(document.querySelectorAll("[data-srcset]")))for(let t of b(r.getAttribute("data-srcset")))s(t,void 0,r,!0);for(let r of Array.from(document.querySelectorAll("div")))for(let t of f(r))s(t);return a}function w(d,a){let s=T(d);return Array.from(document.querySelectorAll('link[rel~="preload"][as="image"]')).find(r=>{if(r.href&&T(r.href)===s)return!0;let t=r.getAttribute("imagesrcset");return t?t.indexOf(s)!==-1?!0:b(t).some(l=>P(l,a)===s):!1})}async function A(d,a){var h,r;let s=window.location.href.includes("rb_stage")||document.cookie.includes("rb-stage=")?"?rb_stage":"";await fetch(`/rb-analytics/${d}${s}`,{method:"POST",headers:{"Content-Type":"application/json","x-rb-trace-id":((r=(h=window.renderbetter)==null?void 0:h.analyticsProperties)==null?void 0:r.traceId)||""},body:JSON.stringify(a)})}e("Preload image checker script loaded");async function R(){var t;let d=await c(),a=performance.getEntriesByType("resource").filter(l=>l.initiatorType==="link"&&O.test(l.name)&&l.fetchStart<d+250);if(!a.length){e("No preloaded images found");return}let s=document.baseURI||window.location.href,h=p(s),r=I(Math.random());for(let l of a){let m=l.name,y=N(m,h,s);if(y.status==="used"){e(`LCP image successfully preloaded: ${m}`);continue}let o=await u(),i=w(m,s),S={preloadedSrc:m,pathname:window.location.pathname,windowWidth:window.innerWidth,windowHeight:window.innerHeight,dpr:window.devicePixelRatio,queryParams:window.location.search,isRbPreload:!!(i!=null&&i.hasAttribute("data-rb-rum-lcp-preload")),lcp:{loadTime:(o==null?void 0:o.renderTime)||(o==null?void 0:o.loadTime),url:o==null?void 0:o.url,html:(t=o==null?void 0:o.element)==null?void 0:t.outerHTML}};if(y.status==="variant"&&y.match){let g=y.match.imageElement,L=E(m,s),U=o!=null&&o.url?E(o.url,s):void 0,_={type:"preload-variant-mismatch",...S,usedSrc:y.match.usedUrl,imgSrcset:(g==null?void 0:g.getAttribute("srcset"))||void 0,imgSizes:(g==null?void 0:g.getAttribute("sizes"))||void 0,imgLoading:(g==null?void 0:g.getAttribute("loading"))||void 0,imgFetchpriority:(g==null?void 0:g.getAttribute("fetchpriority"))||void 0,imgCrossorigin:(g==null?void 0:g.getAttribute("crossorigin"))||void 0,linkHref:(i==null?void 0:i.getAttribute("href"))||void 0,linkImagesrcset:(i==null?void 0:i.getAttribute("imagesrcset"))||void 0,linkImagesizes:(i==null?void 0:i.getAttribute("imagesizes"))||void 0,linkMedia:(i==null?void 0:i.getAttribute("media"))||void 0,linkCrossorigin:(i==null?void 0:i.getAttribute("crossorigin"))||void 0,linkRank:(i==null?void 0:i.getAttribute("data-rb-rum-lcp-rank"))||void 0,isLcpImage:!!L&&!!U&&L===U,sampleRate:.1};e(`Preloaded ${m} but the page used ${y.match.usedUrl}, a different variant of the same asset.`,_),r?await A("preload-variant-mismatch",_):e("Variant mismatch not reported, this page load is outside the sample.");continue}let v={type:"preload-mismatch",...S};e(`No matching image found for ${m}. The URL ${o==null?void 0:o.url} was identified as the LCP image.`,v),await A("preload-mismatch",v)}}window.addEventListener("load",function(){setTimeout(R,5e3)})})();})();
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.