1var module_222597296904=void document.querySelectorAll(".nsh").forEach(function(root){var video=root.querySelector(".nsh__video"),soundBtn=root.querySelector(".nsh__sound"),icon=soundBtn.querySelector(".nsh__icon"),dots=Array.prototype.slice.call(root.querySelectorAll(".nsh__dot")),chips=Array.prototype.slice.call(root.querySelectorAll(".nsh__chip")),cta=root.querySelector(".nsh__cta"),el=function(s){return root.querySelector(s)},reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches,autoCycle="true"===root.dataset.autoCycle&&!reduced,cur=0,userPicked=!1,lang=dots[0]?dots[0].dataset.lang:"",code=(chips.find(function(c){return c.dataset.lang===lang})||{}).dataset;function track(name,props){window._hsq=window._hsq||[],window._hsq.push(["trackCustomBehavioralEvent",{name:name,properties:props||{}}]),window.dataLayer&&window.dataLayer.push(Object.assign({event:name},props))}function setChip(l){chips.forEach(function(c){c.classList.toggle("is-active",c.dataset.lang===l)})}function show(i){var d=dots[i];if(d){cur=i,dots.forEach(function(x,j){x.classList.toggle("is-active",j===i)}),video.src=d.dataset.video,d.dataset.poster&&(video.poster=d.dataset.poster),video.play().catch(function(){}),el(".nsh__phrase").textContent=d.dataset.phrase,el(".nsh__gloss").textContent=d.dataset.gloss,el(".nsh__tag").textContent=d.dataset.tag,lang=d.dataset.lang;var chip=chips.find(function(c){return c.dataset.lang===lang});code=chip?chip.dataset.code:code,setChip(lang)}}code=code?code.code:"",video.addEventListener("ended",function(){autoCycle&&!userPicked&&dots.length>1?show((cur+1)%dots.length):(video.currentTime=0,video.play().catch(function(){}))}),soundBtn.addEventListener("click",function(){var turnOn=video.muted;turnOn&&(video.currentTime=0),video.muted=!turnOn,soundBtn.setAttribute("aria-pressed",String(turnOn)),soundBtn.setAttribute("aria-label",turnOn?"Mute":"Turn sound on"),icon.className="nsh__icon "+(turnOn?"nsh__icon--sound":"nsh__icon--play"),turnOn&&track("hero_sound_on",{language:lang})}),dots.forEach(function(d,i){d.addEventListener("click",function(){userPicked=!0,show(i),track("hero_speaker_switch",{language:d.dataset.lang})})}),chips.forEach(function(c){c.addEventListener("click",function(){userPicked=!0;var idx=dots.findIndex(function(d){return d.dataset.lang===c.dataset.lang});idx>=0?show(idx):(lang=c.dataset.lang,code=c.dataset.code,setChip(lang)),track("hero_language_chip_click",{language:c.dataset.lang})})}),cta.addEventListener("click",function(){track("hero_cta_click",{language:lang})})}); 2//# sourceURL=https://6968579.fs1.hubspotusercontent-na1.net/hubfs/6968579/hub_generated/module_assets/1/222597296904/1790347233375/module_immersive-video-hero.js
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.