1(function(){function init(root){var slides=Array.prototype.slice.call(root.querySelectorAll("[data-lm-slide]")),thumbs=Array.prototype.slice.call(root.querySelectorAll("[data-lm-thumb]")),stage=root.querySelector("[data-lm-stage]"),prevBtn=root.querySelector("[data-lm-prev]"),nextBtn=root.querySelector("[data-lm-next]"),thumbList=root.querySelector("[data-lm-thumb-list]"),thumbPrev=root.querySelector("[data-lm-thumb-prev]"),thumbNext=root.querySelector("[data-lm-thumb-next]");if(!slides.length)return;var index=0;function isMobile(){return window.matchMedia("(max-width: 767px)").matches}function updateMainNav(){prevBtn&&(prevBtn.disabled=index<=0),nextBtn&&(nextBtn.disabled=index>=slides.length-1)}function updateThumbNav(){if(!(!thumbList||!(thumbPrev||thumbNext))){var atStart,atEnd;isMobile()?(atStart=thumbList.scrollLeft<=1,atEnd=thumbList.scrollLeft+thumbList.clientWidth>=thumbList.scrollWidth-1):(atStart=thumbList.scrollTop<=1,atEnd=thumbList.scrollTop+thumbList.clientHeight>=thumbList.scrollHeight-1),thumbPrev&&(thumbPrev.disabled=atStart),thumbNext&&(thumbNext.disabled=atEnd)}}function hydrateSlide(slide){if(slide){var img=slide.querySelector("img[data-lm-defer]");if(img){var src=img.getAttribute("data-src"),srcset=img.getAttribute("data-srcset");src&&(img.setAttribute("src",src),img.removeAttribute("data-src")),srcset&&(img.setAttribute("srcset",srcset),img.removeAttribute("data-srcset")),img.removeAttribute("data-lm-defer")}}}function setIndex(next){next<0&&(next=0),next>slides.length-1&&(next=slides.length-1),index=next,slides.forEach(function(slide,i){i===index?slide.setAttribute("data-active","true"):slide.removeAttribute("data-active")}),thumbs.forEach(function(thumb,i){i===index?thumb.setAttribute("aria-current","true"):thumb.removeAttribute("aria-current")}),hydrateSlide(slides[index]),slides[index+1]&&hydrateSlide(slides[index+1]),slides[index-1]&&hydrateSlide(slides[index-1]);var activeThumb=thumbs[index];activeThumb&&activeThumb.scrollIntoView&&activeThumb.scrollIntoView({block:(isMobile(),"nearest"),inline:(isMobile(),"nearest"),behavior:"smooth"}),updateMainNav(),window.setTimeout(updateThumbNav,350)}if(prevBtn&&prevBtn.addEventListener("click",function(){setIndex(index-1)}),nextBtn&&nextBtn.addEventListener("click",function(){setIndex(index+1)}),thumbs.forEach(function(thumb,i){thumb.addEventListener("click",function(){setIndex(i)})}),thumbPrev&&thumbList&&thumbPrev.addEventListener("click",function(){isMobile()?thumbList.scrollBy({left:-120,behavior:"smooth"}):thumbList.scrollBy({top:-120,behavior:"smooth"}),window.setTimeout(updateThumbNav,350)}),thumbNext&&thumbList&&thumbNext.addEventListener("click",function(){isMobile()?thumbList.scrollBy({left:120,behavior:"smooth"}):thumbList.scrollBy({top:120,behavior:"smooth"}),window.setTimeout(updateThumbNav,350)}),stage&&"ontouchstart"in window){var touchStartX=0,touchStartY=0;stage.addEventListener("touchstart",function(e){touchStartX=e.touches[0].clientX,touchStartY=e.touches[0].clientY},{passive:!0}),stage.addEventListener("touchend",function(e){var dx=e.changedTouches[0].clientX-touchStartX,dy=e.changedTouches[0].clientY-touchStartY;Math.abs(dx)>50&&Math.abs(dx)>Math.abs(dy)&&(dx<0?setIndex(index+1):setIndex(index-1))},{passive:!0})}root.addEventListener("keydown",function(e){e.key==="ArrowLeft"&&(setIndex(index-1),e.preventDefault()),e.key==="ArrowRight"&&(setIndex(index+1),e.preventDefault())}),thumbList&&thumbList.addEventListener("scroll",updateThumbNav,{passive:!0});var resizeRaf;window.addEventListener("resize",function(){resizeRaf&&cancelAnimationFrame(resizeRaf),resizeRaf=requestAnimationFrame(updateThumbNav)}),setIndex(0)}function boot(){var galleries=document.querySelectorAll("[data-lm-gallery]");Array.prototype.forEach.call(galleries,init)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",boot):boot()})(); 2//# sourceMappingURL=/cdn/shop/t/342/assets/lm-gallery.js.map?v=96250518785159260921785238570
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.