1!function(){"use strict";const t="[data-image-id]",e="product-images",s="[data-section-type]",i="[data-thumb-item]",o="[data-thumb-link]",r="[data-thumbs-slider]",n="[data-thumbs-control]",l="[data-thumbs-up]",a="[data-thumbs-down]",h="data-active-media",c="data-media-id",d="is-active",u="hidden";customElements.get("product-thumbs")||customElements.define("product-thumbs",class extends HTMLElement{constructor(){super(),this.container=this.closest(s),this.productImages=this.container.querySelectorAll(t),this.productImagesContainer=this.container.querySelector(e),this.productThumbs=this.container.querySelectorAll(i),this.thumbSlider=this.querySelector(r),this.thumbLinks=this.querySelectorAll(o),this.thumbControls=this.querySelectorAll(n),this.thumbControlUp=this.querySelector(l),this.thumbControlDown=this.querySelector(a)}connectedCallback(){this.toggleSliderArrows(this.thumbSlider),this.handleEvents(),this.preloadImagesOnHover(),this.activeMediaObserver()}disconnectedCallback(){this.observer&&this.observer.disconnect()}activeMediaObserver(){this.observer=new MutationObserver((t=>{for(const e of t)"attributes"===e.type&&e.attributeName==h&&this.setActiveThumb()})),this.observer.observe(this.productImagesContainer,{attributes:!0,childList:!1,subtree:!1})}handleEvents(){this.thumbLinks.forEach((t=>{t.addEventListener("click",(e=>{e.preventDefault();const s=t.closest(i),o=t.getAttribute(c);s.classList.contains(d)||this.dispatchEvent(new CustomEvent("theme:media:select",{bubbles:!0,detail:{id:o}}))})),t.addEventListener("keyup",(e=>{if("Enter"===e.code){const e=t.getAttribute(c),s=this.productImagesContainer.querySelector(`[${c}="${e}"]`)?.querySelectorAll('model-viewer, video, iframe, button, [href], input, [tabindex]:not([tabindex="-1"])')[0];s&&(s.dispatchEvent(new Event("focus")),s.dispatchEvent(new Event("select")))}}))})),this.thumbSlider.addEventListener("scroll",(t=>{window.theme.isMobile()||this.toggleSliderArrows(t.target)})),this.thumbControls.forEach((t=>{t.addEventListener("click",(e=>{const s=t.dataset?.scrollValue;s&&(this.thumbSlider.scrollBy({top:s,behavior:"smooth"}),this.toggleSliderArrows(this.thumbSlider))}))}))}toggleSliderArrows(t){if(!t)return;const e=t.offsetHeight,s=t.scrollHeight,i=t.scrollTop,o=i+e>=s-1,r=0===i;this.thumbControlDown?.classList.toggle(u,o),this.thumbControlUp?.classList.toggle(u,r)}preloadImagesOnHover(){this.thumbLinks.forEach((t=>{t.addEventListener("mouseover",(()=>{const e=t.getAttribute(c);this.productImagesContainer.querySelector(`[${c}="${e}"] img`)?.setAttribute("loading","eager")}))}))}setActiveThumb(){const t=this.productImagesContainer.getAttribute(h),e=this.querySelector(`[${c}="${t}"]`);this.querySelector(`${i}.${d}`)?.classList.remove(d),e?.parentNode.classList.add(d),requestAnimationFrame((()=>{this.scrollToThumb()}))}scrollToThumb(){const t=this.thumbSlider;if(t){const e=t.querySelector(`.${d}`);if(!e)return;const s=t.scrollTop,i=t.scrollLeft,o=t.offsetWidth,r=t.offsetHeight,n=s+r,l=i+o,a=e.offsetTop,h=e.offsetLeft,c=e.offsetWidth,u=e.offsetHeight,m=s>a,b=i>h,g=h+c>l,p=a+u>n||m,v=g||b,f=window.theme.isMobile();if(p||v){let e=a-r+u,s=h-o+c;m&&(e=a),g&&f&&(s+=parseInt(window.getComputedStyle(t).paddingRight)),b&&(s=h,f&&(s-=parseInt(window.getComputedStyle(t).paddingLeft))),t.scrollTo({top:e,left:s,behavior:"smooth"})}}}})}();
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.