1(function(){document.addEventListener("DOMContentLoaded",()=>{const r={queryParams:{},init:()=>{r.hasCookie()||r.set()},set:()=>{r.ajaxRequest()},hasCookie:()=>document.cookie.split(";").some(e=>e.trim().startsWith("ge_suggest_country=")),async ajaxRequest(){let e=document.body.dataset.geolocationApi;const o=document.body.dataset.geolocationApiQueryPid;o&&(e+=`/for-page/${o}`);const n=new URL(e);r.queryParams=r.getQueryParams(document.location.search);try{const a=await fetch(n,{method:"GET"});a.status===200&&a.json().then(c=>{r.handleData(c)})}catch{}},getQueryParams:e=>{const o=t=>decodeURIComponent(t);return e.replace(/\+/g," ").slice(1).split("&").filter(t=>t).reduce((t,s)=>{const[i,l]=s.split("=").map(o);return t[i]=l,t},{})},handleData(e){return e!==void 0&&(r.insertData(e),r.assignListeners()),!0},constructModal:(e,o)=>{const n=document.createElement("div");n.setAttribute("data-nosnippet",""),n.className="geo-location",n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby","geo-location-label"),n.setAttribute("aria-describedby","geo-location-content");const a=document.createElement("div");a.className="geo-location-inner";const c=document.createElement("p");c.className="headline-h3 geo-location-heading",c.id="geo-location-label",c.textContent=e.text.headline;const t=document.createElement("p");if(t.id="geo-location-content",t.appendChild(document.createTextNode(e.text.countryDiscovery)),typeof e.text.countryDiscoveryResult=="object")if(e.text.countryDiscoveryResult.emphasis){const l=document.createElement("strong");l.textContent=e.text.countryDiscoveryResult.text,t.appendChild(l)}else t.appendChild(document.createTextNode(e.text.countryDiscoveryResult.text));else t.appendChild(document.createTextNode(e.text.countryDiscoveryResult));t.appendChild(document.createTextNode(".")),t.appendChild(document.createElement("br")),t.appendChild(document.createElement("br")),t.appendChild(document.createTextNode(e.text.info)),t.appendChild(document.createElement("br")),t.appendChild(document.createElement("br")),t.appendChild(document.createTextNode(e.text.legal));const s=document.createElement("a");s.href=r.sanitizeURL(o),s.rel="nofollow",s.className="button type-1",s.textContent=e.cta.label;const i=document.createElement("button");return i.setAttribute("aria-label",e.closeButton.label),i.className="button type-2 geo-location-close",a.appendChild(c),a.appendChild(t),a.appendChild(s),a.appendChild(i),n.appendChild(a),n},sanitizeURL:e=>{try{const o=new URL(e);return o.protocol!=="http:"&&o.protocol!=="https:"?"#":o.href}catch{return"#"}},insertData:e=>{const o=r.addUTMParamsToURL(e.cta.url,r.queryParams),n=r.constructModal(e,o);document.querySelector("body").appendChild(n)},addUTMParamsToURL:(e,o)=>{const n=new URL(e);return Object.entries(o).forEach(([a,c])=>{a.startsWith("utm")&&n.searchParams.append(a,c)}),n.href},assignListeners:()=>{const o=document.querySelector(".geo-location").querySelector(".geo-location-close");o&&o.addEventListener("click",()=>{r.closeOverlay()}),document.addEventListener("keydown",n=>{n.key==="Escape"&&r.closeOverlay()})},closeOverlay:()=>{const e=document.querySelector(".geo-location");e&&e.remove()}};r.init()})})();
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.