1!function(){"use strict";window.theme.variables={productPageSticky:!1},customElements.get("product-sticky")||customElements.define("product-sticky",class extends HTMLElement{constructor(){super(),this.stickyScrollTop=0,this.scrollLastPosition=0,this.stickyDefaultTop=0,this.currentPoint=0,this.defaultTopBottomSpacings=30,this.scrollTopPosition=window.scrollY,this.scrollDirectionDown=!0,this.requestAnimationSticky=null,this.stickyFormLoad=!0,this.stickyFormLastHeight=null,this.onChangeCounter=0,this.scrollEvent=t=>this.scrollEvents(t),this.resizeEvent=t=>this.resizeEvents(t)}connectedCallback(){this.stickyScrollCheck(),document.addEventListener("theme:resize",this.resizeEvent),this.initSticky()}initSticky(){theme.variables.productPageSticky&&(this.requestAnimationSticky=requestAnimationFrame((()=>this.calculateStickyPosition())),this.addEventListener("theme:form:sticky",(t=>{this.removeAnimationFrame(),this.requestAnimationSticky=requestAnimationFrame((()=>this.calculateStickyPosition(t)))})),document.addEventListener("theme:scroll",this.scrollEvent))}scrollEvents(t){null!==t.detail&&(this.scrollTopPosition=t.detail.position,this.scrollDirectionDown=t.detail.down),this.requestAnimationSticky||(this.requestAnimationSticky=requestAnimationFrame((()=>this.calculateStickyPosition())))}resizeEvents(){this.stickyScrollCheck(),document.removeEventListener("theme:scroll",this.scrollEvent),this.initSticky()}stickyScrollCheck(){if((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>=window.theme.sizes.large){const t=this.closest("product-info"),i=t?.querySelector("[data-product-single-media-slider]");if(!i)return;this.offsetHeight<i.offsetHeight?(theme.variables.productPageSticky=!0,this.classList.add("is-sticky")):(theme.variables.productPageSticky=!1,this.classList.remove("is-sticky"))}else theme.variables.productPageSticky=!1,this.classList.remove("is-sticky")}calculateStickyPosition(t=null){const i=Boolean(t&&t.detail),e=Boolean(i&&t.detail.element&&"accordion"===t.detail.element),s=this.offsetHeight,o=window.innerHeight-s-this.defaultTopBottomSpacings,n=Math.abs(this.scrollTopPosition-this.scrollLastPosition);this.scrollDirectionDown?this.stickyScrollTop-=n:this.stickyScrollTop+=n,this.stickyFormLoad&&(document.querySelector("[data-header-sticky]")&&document.querySelector("[data-header-height]")?this.stickyDefaultTop=parseInt(document.querySelector("[data-header-height]").getBoundingClientRect().height):this.stickyDefaultTop=this.defaultTopBottomSpacings,this.stickyScrollTop=this.stickyDefaultTop),this.stickyScrollTop=Math.min(Math.max(this.stickyScrollTop,o),this.stickyDefaultTop);const c=this.stickyScrollTop-this.currentPoint;this.currentPoint=this.stickyFormLoad?this.stickyScrollTop:this.currentPoint+.5*c,this.style.setProperty("--sticky-top",`${this.currentPoint}px`),this.scrollLastPosition=this.scrollTopPosition,this.stickyFormLoad=!1,e&&this.onChangeCounter<=10||e&&this.stickyFormLastHeight!==s||this.stickyScrollTop!==this.currentPoint&&this.requestAnimationSticky?(e&&(this.onChangeCounter+=1),e&&this.stickyFormLastHeight!==s&&(this.onChangeCounter=11),this.requestAnimationSticky=requestAnimationFrame((()=>this.calculateStickyPosition(t)))):this.requestAnimationSticky&&this.removeAnimationFrame(),this.stickyFormLastHeight=s}removeAnimationFrame(){this.requestAnimationSticky&&(cancelAnimationFrame(this.requestAnimationSticky),this.requestAnimationSticky=null,this.onChangeCounter=0)}disconnectedCallback(){document.removeEventListener("theme:resize",this.resizeEvent),theme.variables.productPageSticky&&document.removeEventListener("theme:scroll",this.scrollEvent)}})}();
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.