PageSourceSearch

https://volumesdirect.com/cdn/shop/t/2/assets/DynamicFeaturedColle…?v=156265769881205806391600193815

js volumesdirect.com collected 2026-10-02 11:12:19 UTC 60,976 bytes, 2 lines download raw bytes

1(window.wpJsonpPaskit=window.wpJsonpPaskit||[]).push([[1],{10:(function(module,__webpack_exports__,__webpack_require__){"use strict";var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__),eventHandlers=[],previousBreakpoint=null;function getBreakpoints(){return window.getComputedStyle(document.documentElement,":before").getPropertyValue("content").replace(/"/g,"").split(",")}function getBreakpoint(){return window.getComputedStyle(document.documentElement,":after").getPropertyValue("content").replace(/"/g,"")}jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("resize",function(event){var currentBreakpoint=getBreakpoint();previousBreakpoint!==currentBreakpoint&&eventHandlers.forEach(function(eventHandler){eventHandler(event,{previous:previousBreakpoint,current:currentBreakpoint})}),previousBreakpoint=currentBreakpoint});function isLessThanBreakpoint(breakpoint){var inclusive=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,breakpoints=getBreakpoints(),currentBreakpoint=getBreakpoint(),comparison=breakpoints.indexOf(currentBreakpoint)-breakpoints.indexOf(breakpoint);return inclusive?comparison<=0:comparison<0}function isGreaterThanBreakpoint(breakpoint){var inclusive=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,breakpoints=getBreakpoints(),currentBreakpoint=getBreakpoint(),comparison=breakpoints.indexOf(currentBreakpoint)-breakpoints.indexOf(breakpoint);return inclusive?comparison>=0:comparison>0}function isBreakpoint(){for(var currentBreakpoint=getBreakpoint(),_len=arguments.length,breakpoints=new Array(_len),_key=0;_key<_len;_key++)breakpoints[_key]=arguments[_key];return breakpoints.some(function(breakpoint){return breakpoint===currentBreakpoint})}function onBreakpointChange(eventHandler){eventHandlers.indexOf(eventHandler)===-1&&eventHandlers.push(eventHandler)}function offBreakpointChange(eventHandler){var index=eventHandlers.indexOf(eventHandler);index!==-1&&eventHandlers.splice(index,1)}__webpack_exports__.a={isLessThanBreakpoint:isLessThanBreakpoint,isGreaterThanBreakpoint:isGreaterThanBreakpoint,isBreakpoint:isBreakpoint,onBreakpointChange:onBreakpointChange,offBreakpointChange:offBreakpointChange}}),11:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return Forms_Forms});var jquery=__webpack_require__(0),jquery_default=__webpack_require__.n(jquery);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var Quantity=(function(){function Quantity2(el){_classCallCheck(this,Quantity2),this.$el=$(el),this.$inputParent=this.$el.find(".form-field--qty-input"),this.$input=this.$el.find("[data-quantity-input]"),this.$selectParent=this.$el.find(".form-field--qty-select"),this.$select=this.$el.find("[data-quantity-select]"),this._watchSelect=this._watchSelect.bind(this),this._watchInput=this._watchInput.bind(this),this.$select.on("change.quantity",this._watchSelect),this.$input.on("change.quantity",this._watchInput)}return _createClass(Quantity2,[{key:"unload",value:function(){this.$el.off(".quantity")}},{key:"_validateValue",value:function(event){var baseValue=parseInt(event.currentTarget.value,10);return isNaN(baseValue)?1:baseValue}}
1,{key:"_watchSelect",value:function(event){var value=this._validateValue(event);this.$input.val(value).trigger("change"),value>=10&&(this.$inputParent.removeClass("hidden").addClass("visible"),this.$input.focus().removeAttr("tabindex").select(),this.$selectParent.removeClass("visible").addClass("hidden"),this.$select.attr("tabindex","-1"))}},{key:"_watchInput",value:function(event){this.$input.val(this._validateValue(event))}}]),Quantity2})();function Forms_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Forms_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function Forms_createClass(Constructor,protoProps,staticProps){return protoProps&&Forms_defineProperties(Constructor.prototype,protoProps),staticProps&&Forms_defineProperties(Constructor,staticProps),Constructor}var Forms_Forms=(function(){function Forms(el){var _this=this,selector=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".form-field-input";Forms_classCallCheck(this,Forms),this.$el=jquery_default()(el),this.filledClass="form-field-filled",this.fieldSelector=selector,this.quantityItems=[],this.$quantityWrapper=this.$el.find("[data-quantity-wrapper]"),this._toggleFilled=this._toggleFilled.bind(this),this.$el.on("focus.forms",this.fieldSelector,this._toggleFilled),this.$el.on("blur.forms",this.fieldSelector,this._toggleFilled),this._checkFilled(),this.$quantityWrapper.length&&this.$quantityWrapper.each(function(i,el2){_this.quantityItems.push(new Quantity(el2))})}return Forms_createClass(Forms,[{key:"unload",value:function(){this.$el.off(".forms"),this.quantityItems.forEach(function(quantityItem){quantityItem.unload()})}},{key:"_checkFilled",value:function(){var _this2=this;this.$el.find(this.fieldSelector).each(function(i,el){jquery_default()(el).hasClass(_this2.filledClass)||_this2._toggleFilled(null,el)})}},{key:"_toggleFilled",value:function(){var event=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,el=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,target=event?event.currentTarget:el,$target=jquery_default()(target),value=target.value,isFilled=value.length>0;try{isFilled=isFilled||$target.is(":-webkit-autofill"),$target.toggleClass(this.filledClass,isFilled)}catch(e){$target.toggleClass(this.filledClass,isFilled)}}}]),Forms})()}),15:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return RichText});var fitvids__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(16),fitvids__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(fitvids__WEBPACK_IMPORTED_MODULE_0__),grouped_content__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(17),grouped_content__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(grouped_content__WEBPACK_IMPORTED_MODULE_1__);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var RichText=(function(){function RichText2($el){_classCallCheck(this,RichText2),this.$el=$el,this._initExternalLinks(),this.groupedContent=null,this.$el.length&&(this.groupedContent=new grouped_content__WEBPACK_IMPORTED_MODULE_1___default.a($el.get(0),{layout:"tabs",intelliparse:!1}),fitvids__WEBPACK_IMPORTED_MODULE_0___default()(".rte"))}return _createClass(RichText2,[{key:"unload",value:function(){this.groupedContent&&this.groupedContent.unload()}}
1,{key:"_initExternalLinks",value:function(){var anchors=this.$el.find('a[href^="http"]').filter(function(i,el){return el.href.indexOf(location.hostname)===-1});anchors.attr("target","_blank")}}]),RichText2})()}),34:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return Video_Video});var script=__webpack_require__(1),script_default=__webpack_require__.n(script);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var api="https://www.youtube.com/iframe_api",apiLoadedCallbacks=[],apiLoaded=!1;window.onYouTubeIframeAPIReady=function(){apiLoadedCallbacks.forEach(function(apiLoadedCallback){return apiLoadedCallback()}),apiLoadedCallbacks=[],apiLoaded=!0};var Youtube_Youtube=(function(){function Youtube(_ref){var el=_ref.el,videoUrl=_ref.videoUrl,loop=_ref.loop;_classCallCheck(this,Youtube);var regex=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i;this.el=el,this.id=videoUrl.match(regex)[1]||null,this.onApiLoaded=this._onApiLoaded.bind(this),this.isReady=!1,this.onReady=this._onReady.bind(this),this.onReadyCallback=null,this.loop=loop?1:0,this.onStateChange=this._onStateChange.bind(this),this.onPlayCallback=null,apiLoaded?this._onApiLoaded():(apiLoadedCallbacks.push(this.onApiLoaded),script_default()(api))}return _createClass(Youtube,[{key:"play",value:function(){var _this=this;return new Promise(function(resolve){_this.onPlayCallback=resolve,_this.isReady?_this.player.playVideo():_this.onReadyCallback=function(){_this.player.playVideo()}})}},{key:"pause",value:function(){var _this2=this;return new Promise(function(resolve){_this2.onPlayCallback=resolve,_this2.isReady?_this2.player.pauseVideo():_this2.onReadyCallback=function(){_this2.player.pauseVideo()}})}},{key:"autoplay",value:function(){var _this3=this;return new Promise(function(resolve){_this3.onPlayCallback=resolve,_this3.isReady?(_this3.player.playVideo(),_this3.player.mute()):_this3.onReadyCallback=function(){_this3.player.playVideo(),_this3.player.mute()}})}},{key:"unload",value:function(){this.player.destroy()}},{key:"_onApiLoaded",value:function(){var playerVars={modestbranding:!0,showinfo:!1,controls:!1,loop:this.loop,rel:0};this.loop&&(playerVars.playlist=this.id),this.player=new YT.Player(this.el,{videoId:this.id,playerVars:playerVars,events:{onReady:this.onReady,onStateChange:this.onStateChange}})}},{key:"_onReady",value:function(){this.isReady=!0,this.onReadyCallback&&this.onReadyCallback()}},{key:"_onStateChange",value:function(event){var state=event.data;this.onPlayCallback&&state===YT.PlayerState.BUFFERING&&(this.onPlayCallback(),this.onPlayCallback=null)}}]),Youtube})();function Vimeo_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Vimeo_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function Vimeo_createClass(Constructor,protoProps,staticProps){return protoProps&&Vimeo_defineProperties(Constructor.prototype,protoProps),staticProps&&Vimeo_defineProperties(Constructor,staticProps),Constructor}var Vimeo_api="https://player.vimeo.com/api/player.js",Vimeo_apiLoaded=!1,Vimeo_VimeoPlayer=(function(){function VimeoPlayer(_ref){var el=_ref.el,videoUrl=_ref.videoUrl;Vimeo_classCallCheck(this,VimeoPlayer),this.el=el;var urlParts=videoUrl.split("/");this.id=urlParts[urlParts.length-1],this.onReadyCallback=null,this.onApiLoaded=this._onApiLoaded.bind(this),this.onProgress=this._onProgress.bind(this),this.onProgressCallback=null,Vimeo_apiLoaded?this._onApiLoaded():script_default()(Vimeo_api,this.onApiLoaded)}return Vimeo_createClass(VimeoPlayer,[{key:"play",value:function(){var _this=this;return new Promise(function(resolve){_this.onProgressCallback=resolve,Vimeo_apiLoaded?(_this.player.on("play",_this.onProgress),_this.player.play()):_this.onReadyCallback=function(){_this.player.on("play",_this.onProgress),_this.player.play()}})}},{key:"pause",value:function(){var _this2=this;return new Promise(function(resolve){_this2.onProgressCallback=resolve,Vimeo_apiLoaded?(_this2.player.on("pause",_this2.onProgress),_this2.player.pause()):_this2.onReadyCallback=function(){_this2.player.on("pause",_this2.onProgress),_this2.player.pause()}})}},{key:"autoplay",value:function(){var _this3=this;return new Promise(function(resolve){_this3.onProgressCallback=resolve,Vimeo_apiLoaded?(_this3.player.on("play",_this3.onProgress),_this3.player.setVolume(0),_this3.player.play()):_this3.onReadyCallback=function(){_this3.player.on("play",_this3.onProgress),_this3.player.setVolume(0),_this3.player.play()}})}},{key:"unload",value:function(){this.player.unload().catch()}},{key:"_onApiLoaded",value:function(){this.player=new window.Vimeo.Player(this.el,{id:this.id}),this.player.ready().then().catch(),Vimeo_apiLoaded=!0,this.onReadyCallback&&this.onReadyCallback()}},{key:"_onProgress",value:function(){this.player.off("play",this.onProgress),this.player.off("pause",this.onProgress),this.onProgressCallback&&(this.onProgressCallback(),this.onProgressCallback=null)}}]),VimeoPlayer})();function Video_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Video_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function Video_createClass(Constructor,protoProps,staticProps){return protoProps&&Video_defineProperties(Constructor.prototype,protoProps),staticProps&&Video_defineProperties(Constructor,staticProps),Constructor}var Video_Video=(function(){function Video(el,options){switch(Video_classCallCheck(this,Video),this.el=el,this.options=options,this.platform=el.getAttribute("data-video").trim(),this.playButton=el.querySelector("[data-vi
1deo-play-button]"),this.videoEl=el.querySelector("[data-video-element]"),this.onPlayClick=this._onPlayClick.bind(this),this.onPauseClick=this._onPauseClick.bind(this),this.autoplay=this._autoplay.bind(this),this.video=null,this.videoData={el:this.videoEl.childNodes[0],videoUrl:this.videoEl.getAttribute("data-video-url"),loop:this.options&&this.options.loop},this.platform){case"youtube":this.video=new Youtube_Youtube(this.videoData);break;case"vimeo":this.video=new Vimeo_VimeoPlayer(this.videoData);break;default:this.video=null;break}this.el.addEventListener("click",this.onPlayClick),this.playButton&&(this.options&&this.options.autoplay&&this.autoplay(),this.playButton.addEventListener("click",this.onPlayClick))}return Video_createClass(Video,[{key:"_onPlayClick",value:function(){var _this=this;this.el.classList.add("video-loading"),this.video.play().then(function(){_this.el.classList.add("video-transitioning"),setTimeout(function(){_this.el.classList.remove("video-loading"),_this.el.classList.remove("video-transitioning"),_this.el.classList.add("video-playing")},200)})}},{key:"_onPauseClick",value:function(){this.video.pause()}},{key:"_autoplay",value:function(){var _this2=this;this.el.classList.add("video-loading"),this.video.autoplay().then(function(){_this2.el.classList.add("video-transitioning"),setTimeout(function(){_this2.el.classList.remove("video-loading"),_this2.el.classList.remove("video-transitioning"),_this2.el.classList.add("video-playing")},200)})}},{key:"play",value:function(){this._onPlayClick()}},{key:"pause",value:function(){this._onPauseClick()}},{key:"unload",value:function(){this.el.removeEventListener("click",this.onPlayClick),this.playButton&&this.playButton.removeEventListener("click",this.onPlayClick),this.video&&this.video.unload()}},{key:"destroy",value:function(){this.unload()}}]),Video})()}),35:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return ProductDetails_ProductDetails});var jquery=__webpack_require__(0),jquery_default=__webpack_require__.n(jquery),shopify_variants_es=__webpack_require__(43),Forms=__webpack_require__(11),AddToCartFlyout=__webpack_require__(39),Drift=__webpack_require__(58),js=__webpack_require__(18),js_default=__webpack_require__.n(js),EventHandler=__webpack_require__(14),EventHandler_default=__webpack_require__.n(EventHandler),index_es=__webpack_require__(2),Layout=__webpack_require__(10),Video=__webpack_require__(34),photoswipe=__webpack_require__(55),photoswipe_default=__webpack_require__.n(photoswipe),theme_a11y=__webpack_require__(21),photoswipe_ui_default=__webpack_require__(56),photoswipe_ui_default_default=__webpack_require__.n(photoswipe_ui_default);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var ProductClickToZoom_ProductClickToZoom=(function(){function ProductClickToZoom(_ref){var _this=this,settings=_ref.settings,slides=_ref.slides,originalThumbnails=_ref.originalThumbnails,startIndex=_ref.startIndex,selectGalleryIndex=_ref.selectGalleryIndex;_classCallCheck(this,ProductClickToZoom),this.settings=settings,this.photoswipeDialog=document.querySelector("[data-photoswipe]"),this.thumbContainer=this.photoswipeDialog.querySelector("[data-photoswipe-thumbs]"),this.thumbScroller=this.photoswipeDialog.querySelector("[data-photoswipe-thumb-scroller]"),this.thumbScrollerButtons=this.photoswipeDialog.querySelectorAll("[data-gallery-scroll-button]"),this.closeButton=this.photoswipeDialog.querySelector(".pswp__button--close"),this.selectedSlide=slides[startIndex],this.thumbScroller.innerHTML="",this.thumbnails=[];var selectedIndex=startIndex;
1originalThumbnails.forEach(function(thumb,thumbIndex){if(thumb.dataset.mediaType!=="image"){startIndex>thumbIndex&&selectedIndex--;return}var newThumb=thumb.cloneNode(!0);_this.thumbScroller.appendChild(newThumb),_this.thumbnails.push(newThumb)}),index_es.a.watch(this.thumbContainer),this.selectedThumb=this.thumbContainer.querySelector('[data-gallery-selected="true"]'),this.events=new EventHandler_default.a;var photoswipeSlides=[];slides.forEach(function(slide){["video","external_video","model"].indexOf(slide.dataset.mediaType)>-1||photoswipeSlides.push({src:slide.dataset.zoom,msrc:slide.dataset.zoom,h:slide.dataset.imageHeight,w:slide.dataset.imageWidth})});var bottomBarHeight=Layout.a.isGreaterThanBreakpoint("L",!0)?0:75,photoswipeOptions={index:selectedIndex,barsSize:{top:0,bottom:bottomBarHeight},fullscreenEl:!1,zoomEl:!1,shareEl:!1,counterEl:!1,arrowEl:!1,preloaderEl:!1,closeOnScroll:!1,showHideOpacity:!0,history:!1,loop:!0,clickToCloseNonZoomable:!1,timeToIdle:!1,timeToIdleOutside:!1};(this.settings.click_to_zoom==="always"||Layout.a.isGreaterThanBreakpoint("S",!0)&&this.settings.click_to_zoom==="desktop"||Layout.a.isLessThanBreakpoint("S")&&this.settings.click_to_zoom==="mobile")&&(photoswipeOptions.getThumbBoundsFn=function(){var pageYScroll=window.pageYOffset||document.documentElement.scrollTop,bounds=_this.selectedSlide.querySelector("[data-rimg]").getBoundingClientRect();return{x:bounds.left,y:bounds.top+pageYScroll,w:bounds.width}}),this.photoswipe=new photoswipe_default.a(this.photoswipeDialog,photoswipe_ui_default_default.a,photoswipeSlides,photoswipeOptions),this.events.register(this.closeButton,"click",function(){return _this.photoswipe.close()}),this.events.register(this.closeButton,"touchstart",function(){return _this.photoswipe.close()}),this.thumbnails.forEach(function(thumb,index){_this.events.register(thumb,"click",function(){_this.photoswipe.goTo(index)})}),this.events.register(this.thumbScroller,"scroll",function(){return _this._handleScrollButtonVisibility()}),this.events.register(this.thumbScrollerButtons[0],"click",function(){return _this._onScrollButtonClick(!0)}),this.events.register(this.thumbScrollerButtons[1],"click",function(){return _this._onScrollButtonClick(!1)}),this.photoswipe.options.mouseUsed?this.photoswipe.options.closeOnVerticalDrag=!1:this.photoswipe.listen("mouseUsed",function(){_this.photoswipe.options.closeOnVerticalDrag=!1}),this.photoswipe.listen("afterChange",function(){var index=_this.photoswipe.getCurrentIndex();_this.selectedThumb&&(_this.selectedThumb.dataset.gallerySelected=!1),_this.selectedThumb=_this.thumbnails[index],_this.selectedThumb.dataset.gallerySelected=!0;var slideIndex=_this.selectedThumb.getAttribute("data-gallery-index"),slide=slides[slideIndex];_this._adjustMobileThumbPosition(),_this._handleScrollButtonVisibility(),selectGalleryIndex(slideIndex),_this.selectedSlide=slide}),this.photoswipe.listen("close",function(){Object(theme_a11y.a)(_this.photoswipeDialog),_this.selectedSlide.focus(),_this.photoswipe=null}),this.photoswipe.listen("destroy",function(){_this.events.unregisterAll(),_this.photoswipe=null}),this.events.register(this.thumbContainer,"mouseenter",function(){Layout.a.isLessThanBreakpoint("S")&&(_this.photoswipe.options.closeOnScroll=!0)}),this.events.register(this.thumbContainer,"mouseleave",function(){Layout.a.isLessThanBreakpoint("S")&&(_this.photoswipe.options.closeOnScroll=!1)});var closeEsc=function(e){e.key==="Escape"&&slides[0].parentNode.querySelector("[data-gallery-expand]").focus()};this.events.register(window,"keydown",function(e){return closeEsc(e)}),this.photoswipe.init(),Object(theme_a11y.b)(this.photoswipeDialog)}return _createClass(ProductClickToZoom,[{key:"_adjustMobileThumbPosition",value:function(){if(Layout.a.isLessThanBreakpoint("S")){var thumbBounds=this.selectedThumb.getBoundingClientRect(),thumbWrapperBounds=this.thumbScroller.getBoundingClientRect();thumbBounds.left+thumbBounds.width+30>thumbWrapperBounds.width?this.thumbScroller.scrollLeft=this.selectedThumb.offsetLeft+thumbBounds.width-thumbWrapperBounds.width+35:this.selectedThumb.offsetLeft<this.thumbScroller.scrollLeft&&(this.thumbScroller.scrollLeft=this.selectedThumb.offsetLeft-35)}}},{key:"_handleScrollButtonVisibility",value:function(){Layout.a.isLessThanBreakpoint("S")?(this.thumbScroller.scrollLeft>4?this.thumbScrollerButtons[0].classList.add("visible"):this.thumbScrollerButtons[0].classList.remove("visible"),this.thumbScroller.scrollLeft<this.thumbScroller.scrollWidth-this.thumbScroller.clientWidth?this.thumbScrollerButtons[1].classList.add("visible"):this.thumbScrollerButtons[1].classList.remove("visible")):(this.thumbScrollerButtons[0].classList.remove("visible"),this.thumbScrollerButtons[1].classList.remove("visible"))}},{key:"_onScrollButtonClick",value:function(scrollRight){scrollRight?this.thumbScroller.scrollLeft=this.thumbScroller.scrollLeft-100:this.thumbScroller.scrollLeft=this.thumbScroller.scrollLeft+100}},{key:"unload",value:function(){this.photoswipe&&(this.photoswipe.destroy(),this.photoswipe=null)}}]),ProductClickToZoom})();function ProductGallery_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function ProductGallery_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function ProductGallery_createClass(Constructor,protoProps,staticProps){return protoProps&&ProductGallery_defineProperties(Constructor.prototype,protoProps),staticProps&&ProductGallery_defineProperties(Constructor,staticProps),Constructor}var ProductGallery_ProductGallery=(function(){function ProductGallery(_ref){var _this=this,el=_ref.el,settings=_ref.settings,isQuickshop=_ref.isQuickshop;ProductGallery_classCallCheck(this,ProductGallery),this.el=el,this.settings=settings,this.isQuickshop=isQuickshop||!1,this.events=new EventHandler_default.a,this.viewer=this.el.querySelector("[data-gallery-viewer]"),this.navigation=this.el.querySelector("[data-gallery-navigation]"),this.navScroller=this.el.querySelector("[data-gallery-scroller]"),this.navScrollerButtons=this.el.querySelectorAll("[data-gallery-scroll-button]"),this.figures=this.viewer.querySelectorAll("[data-gallery-figure]"),this.thumbnails=this.navigation.querySelectorAll("[data-gallery-thumbn
1ail]"),this.zoomButton=this.viewer.querySelector("[data-gallery-expand]"),this.selected={figure:this.viewer.querySelector('[data-gallery-selected="true"]'),thumbnail:this.navigation.querySelector('[data-gallery-selected="true"]')},this.models={},this.videos={},this.selectedVideo=null,this.selectedModel=null,this.showingInitialSlide=!0,this._setupSelectedVideo=this._setupSelectedVideo.bind(this);var features=[];if(this.el.querySelector('[data-media-type="video"]')&&features.push({name:"video-ui",version:"1.0",onLoad:function(){return _this._setupSelectedVideo()}}),this.el.querySelector('[data-media-type="model"]')&&(this.viewInYourSpaceEl=this.el.querySelector("[data-shopify-xr]"),this.events.register(this.viewInYourSpaceEl,"click",function(){return _this._onViewInYourSpaceClick()}),features.push({name:"model-viewer-ui",version:"1.0",onLoad:this._onModelLibraryLoad.bind(this)}),features.push({name:"shopify-xr",version:"1.0"})),features.length&&window.Shopify.loadFeatures(features),this.isQuickshop&&(index_es.a.watch(this.el),this.figures[0].dataset.mediaType==="video"&&setTimeout(function(){return _this._setSlideHeight()},800)),this.events.register(this.navScroller,"click",function(e){return _this._onThumbnailClick(e)}),this.events.register(this.navScroller,"scroll",function(){return _this._handleScrollButtonVisibility()}),this.events.register(this.navScrollerButtons[0],"click",function(){return _this._onScrollButtonClick(!0)}),this.events.register(this.navScrollerButtons[1],"click",function(){return _this._onScrollButtonClick(!1)}),this.settings.click_to_zoom!=="disabled"){var onZoomButtonClick=function(e){e.stopPropagation(),_this._openImageZoom()};this.events.register(this.zoomButton,"click",function(e){return onZoomButtonClick(e)}),this.events.register(this.viewer,"click",function(e){return onZoomButtonClick(e)})}this._onResize=this._onResize.bind(this),this.events.register(window,"resize",function(){return _this._onResize()}),Layout.a.isLessThanBreakpoint("S")&&(this._setupFlickity(),this._handleScrollButtonVisibility()),this._selectMediaByEl(this.selected.figure)}return ProductGallery_createClass(ProductGallery,[{key:"selectMediaByVariant",value:function(variant){if(variant.featured_media){var slide=this.viewer.querySelector('[data-media="'.concat(variant.featured_media.id,'"]'));this._selectMediaByEl(slide)}}},{key:"unload",value:function(){this.events.unregisterAll();for(var i;i<this.figures.length;i++)this.models[i]&&this.models[i].destroy(),this.videos[i]&&this.videos[i].destroy();this.isQuickshop&&index_es.a.unwatch(this.el),this._closeImageZoom(),this._disableHoverZoom(),this._disableFlickity()}},{key:"_onModelLibraryLoad",value:function(){var _this2=this,onPlayListener=function(){_this2.flickity&&_this2.flickity.unbindDrag()},onPauseListener=function(){_this2.flickity&&_this2.flickity.bindDrag()};this.el.querySelectorAll(".product-gallery--model").forEach(function(figureEl){var modelEl=figureEl.querySelector("model-viewer"),galleryIndex=figureEl.dataset.galleryIndex,controls=["zoom-in","zoom-out"];document.fullscreenEnabled&&controls.push("fullscreen"),_this2.models[galleryIndex]=new Shopify.ModelViewerUI(modelEl,{controls:controls}),_this2.events.register(modelEl,"shopify_model_viewer_ui_toggle_play",onPlayListener),_this2.events.register(modelEl,"shopify_model_viewer_ui_toggle_pause",onPauseListener)})}},{key:"_onResize",value:function(){document.fullscreenElement||(Layout.a.isGreaterThanBreakpoint("S",!0)?this._disableFlickity():this._setupFlickity(),Layout.a.isGreaterThanBreakpoint("L",!0)&&!this.drift?this._setupHoverZoom():Layout.a.isLessThanBreakpoint("L")&&this._disableHoverZoom(),this._adjustGalleryPositioning(),this._handleScrollButtonVisibility())}},{key:"_onThumbnailClick",value:function(e){var button;if(this.showingInitialSlide=!1,e.target.classList.contains("product-gallery--media-thumbn
1ail"))button=e.target;else if(e.target.parentNode.parentNode.classList.contains("product-gallery--media-thumbnail"))button=e.target.parentNode.parentNode;else return;var selectedIndex=parseInt(button.dataset.galleryIndex,10);this.flickity?this.flickity.select(selectedIndex):this._selectMediaByIndex(selectedIndex)}},{key:"_onViewInYourSpaceClick",value:function(e){var currentTarget=e.currentTarget,figure=this.viewer.querySelector('[data-media="'.concat(currentTarget.dataset.shopifyModel3dId,'"]'));this._selectMediaByEl(figure)}},{key:"_selectMediaByEl",value:function(el){this._selectMediaByIndex(parseInt(el.dataset.galleryIndex,10))}},{key:"_selectMediaByIndex",value:function(index){var figure=this.figures[index];this.selected.figure.dataset.gallerySelected=!1,this.selected.figure.setAttribute("aria-hidden",!0),this.selected.figure=figure,this.selected.figure.dataset.gallerySelected=!0,this.selected.figure.setAttribute("aria-hidden",!1);var figureIndex=parseInt(this.selected.figure.dataset.galleryIndex,10);this.selected.thumbnail.dataset.gallerySelected=!1,this.selected.thumbnail=this.thumbnails[figureIndex],this.selected.thumbnail.dataset.gallerySelected=!0;var _this$selected$figure=this.selected.figure.dataset,media=_this$selected$figure.media,mediaType=_this$selected$figure.mediaType;switch(this.viewer.dataset.selectedMediaType=mediaType,this._disableHoverZoom(),this.selectedModel&&this.selectedModel.pause(),this.models[figure.dataset.galleryIndex]&&(this.selectedModel=this.models[figure.dataset.galleryIndex],!document.documentElement.classList.contains("has-touch")&&!this.showingInitialSlide&&this.selectedModel.play()),this.selectedVideo&&this.selectedVideo.pause(),this.viewInYourSpaceEl&&(this.viewInYourSpaceEl.dataset.shopifyModel3dId=this.viewInYourSpaceEl.dataset.defaultModelId),mediaType){case"model":this.viewInYourSpaceEl.dataset.shopifyModel3dId=media;break;case"video":case"external_video":this._setupSelectedVideo();break;case"image":this._setupHoverZoom();break;default:break}this.flickity&&(this.flickity.bindDrag(),this.flickity.select(index)),this._adjustGalleryPositioning()}},{key:"_setupSelectedVideo",value:function(){this.selectedVideo&&this.selectedVideo.pause();var _this$selected$figure2=this.selected.figure.dataset,mediaType=_this$selected$figure2.mediaType,galleryIndex=_this$selected$figure2.galleryIndex,shouldAutoplay=Layout.a.isGreaterThanBreakpoint("L",!0)&&this.settings.gallery_video_autoplay&&!this.showingInitialSlide;if(mediaType==="video"||mediaType==="external_video"){var videoElement;if(this.videos[galleryIndex])this.selectedVideo=this.videos[galleryIndex],shouldAutoplay&&this.selectedVideo.play();else{if(mediaType==="video"){if(!Shopify.Plyr)return;videoElement=this.selected.figure.querySelector("video"),this.selectedVideo=new Shopify.Plyr(videoElement,{loop:{active:this.settings.gallery_video_looping}}),shouldAutoplay&&this.selectedVideo.play()}else videoElement=this.selected.figure.querySelector("[data-video]"),this.selectedVideo=new Video.a(videoElement,{loop:this.settings.gallery_video_looping}),shouldAutoplay&&this.selectedVideo.play();this.videos[galleryIndex]=this.selectedVideo}this.selected.figure.focus()}}},{key:"_setupHoverZoom",value:function(){var _this3=this;if(!(this.settings.hover_zoom==="disabled"||!Layout.a.isGreaterThanBreakpoint("L",!0)||this.selected.figure.dataset.mediaType!=="image"||document.documentElement.classList.contains("has-touch"))){var selectedImage=this.selected.figure.querySelector("[data-rimg]");selectedImage.setAttribute("data-zoom",this.selected.figure.getAttribute("data-zoom")),this.drift=new Drift.a(selectedImage,{paneContainer:this.settings.hover_zoom==="separate"?this.el.querySelector("[data-zoomed-image]"):this.selected.figure,inlinePane:!1,hoverBoundingBox:this.settings.hover_zoom==="separate",handleTouch:!1,onShow:function(){if(_this3.settings.hover_zoom==="separate"){var productMain=document.querySelector(".product-main"),productAlt=document.querySelector(".product-form--alt");productMain.classList.add("product-gallery--fade"),productAlt&&productAlt.classList.add("product-gallery--fade")}},onHide:function(){if(_this3.settings.hover_zoom==="separate"){var productMain=document.querySelector(".product-main"),productAlt=document.querySelector(".product-form--alt");productMain.classList.remove("product-gallery--fade"),productAlt&&productAlt.classList.remove("product-gallery--fade")}}})}}},{key:"_disableHoverZoom",value:function(){this.drift&&(this.drift.disable(),this.drift=null)}},{key:"_setupFlickity",value:function(){var _this4=this;this.flickity||!Layout.a.isLessThanBreakpoint("S")||(this.flickity=new js_default.a(this.viewer,{accessibility:!1,adaptiveHeight:!0,cellSelector:".product-gallery--media",contain:!0,friction:.5,freeScroll:!1,initialIndex:parseInt(this.selected.figure.dataset.galleryIndex,10),lazyLoad:!1,percentPosition:!1,prevNextButtons:!1,pageDots:!1,selectedAttraction:.1,setGallerySize:!1,wrapAround:!0}),this.flickityEvent=this.events.register(this.viewer,"rimg:load",function(){_this4._setSlideHeight()}),this.flickity.on("change",function(index){_this4.showingInitialSlide=!1,_this4._selectMediaByEl(_this4.figures[index])}),this.flickity.on("staticClick",function(event,pointer,cellElement){var figure=cellElement.querySelector(".product-gallery--model");if(figure&&_this4.models[figure.dataset.galleryIndex]){var model=_this4.models[figure.dataset.galleryIndex];model.play()}}),this.flickity.on("pointerDown",function(){_this4.viewer.blur()}),this.settings.click_to_zoom!=="disabled"&&document.documentElement.classList.contains("no-touch")&&this.flickity.on("dragEnd",function(){_this4.swiped=!0}),this._setSlideHeight())}},{key:"_disableFlickity",value:function(){this.flickity&&(this.flickity.destroy(),this.flickity=null,this.events.unregister(this.flickityEvent))}},{key:"_setSlideHeight",value:function(){this.navigation.classList.remove("loading");var containerHeight=this.storedImageHeight||this.selected.figure.getBoundingClientRect().height;this.storedImageHeight=null,this.viewer.style.height="".concat(containerHeight,"px")}},{key:"_adjustGalleryPositioning",value:function(){var _this5=this;if(this.settings.thumbnail_position==="left"){if(this.isQuickshop&&(Layout.a.isGreaterThanBreakpoint("L",!0)?this.el.dataset.productGalleryThumbs="left":(this.storedImageHeight=this.selected.figure.getBoundingClientRect().height,this.el.dataset.productGalleryThumbs="center")),Layout.a.isGreaterThanBreakpoint("L",!0)||Layout.a.isGreaterThanBreakpoint("S",!0)&&!this.isQuickshop){if(this.el.firstChild!==this.navigation){var activeButton=document.activeElement;this.el.insertBefore(this.navigation,this.viewer),activeButton.focus()}
1setTimeout(function(){var leftmostBounds=_this5.thumbnails[0].getBoundingClientRect(),thumbStyle=_this5.thumbnails[0].currentStyle||window.getComputedStyle(_this5.thumbnails[0]),thumbMargin=parseInt(thumbStyle.marginLeft,10)*2,wrapped=Array.prototype.some.call(_this5.thumbnails,function(thumb){return thumb.getBoundingClientRect().left>leftmostBounds.left});wrapped&&(_this5.navigation.style.width="".concat((leftmostBounds.width+thumbMargin)*2,"px"),_this5.navigation.style.maxWidth="".concat((leftmostBounds.width+thumbMargin)*2,"px")),_this5._setSlideHeight()},this.isQuickshop?500:100)}else this.el.firstElementChild===this.navigation&&this.el.appendChild(this.navigation),this.navigation.style.width="",this.navigation.style.maxWidth="",this._setSlideHeight();Layout.a.isLessThanBreakpoint("S")&&this._adjustMobileThumbnailPosition()}else this._setSlideHeight(),this._adjustMobileThumbnailPosition()}},{key:"_adjustMobileThumbnailPosition",value:function(){if(Layout.a.isLessThanBreakpoint("S")){var thumbBounds=this.selected.thumbnail.getBoundingClientRect(),thumbWrapperBounds=this.navScroller.getBoundingClientRect();this.selected.thumbnail.offsetLeft+thumbBounds.width+30-this.navScroller.scrollLeft>thumbWrapperBounds.width?this.navScroller.scrollLeft=this.selected.thumbnail.offsetLeft+thumbBounds.width-thumbWrapperBounds.width+35:this.selected.thumbnail.offsetLeft<this.navScroller.scrollLeft&&(this.navScroller.scrollLeft=this.selected.thumbnail.offsetLeft-35)}}},{key:"_handleScrollButtonVisibility",value:function(){Layout.a.isLessThanBreakpoint("S")?(this.navScroller.scrollLeft>4?this.navScrollerButtons[0].classList.add("visible"):this.navScrollerButtons[0].classList.remove("visible"),this.navScroller.scrollLeft<this.navScroller.scrollWidth-this.navScroller.clientWidth?this.navScrollerButtons[1].classList.add("visible"):this.navScrollerButtons[1].classList.remove("visible")):(this.navScrollerButtons[0].classList.remove("visible"),this.navScrollerButtons[1].classList.remove("visible"))}},{key:"_onScrollButtonClick",value:function(scrollRight){scrollRight?this.navScroller.scrollLeft=this.navScroller.scrollLeft-100:this.navScroller.scrollLeft=this.navScroller.scrollLeft+100}},{key:"_closeImageZoom",value:function(){this.imageZoom&&(this.imageZoom.unload(),this.imageZoom=null)}},{key:"_openImageZoom",value:function(){var _this6=this;if(!(this.selected.figure.dataset.mediaType!=="image"||Layout.a.isGreaterThanBreakpoint("L")&&this.settings.click_to_zoom==="mobile"||Layout.a.isLessThanBreakpoint("L")&&this.settings.click_to_zoom==="desktop")){if(this.swiped){this.swiped=!1;return}this._closeImageZoom(),this.imageZoom=new ProductClickToZoom_ProductClickToZoom({settings:this.settings,slides:this.figures,originalThumbnails:this.thumbnails,startIndex:parseInt(this.selected.figure.dataset.galleryIndex,10),selectGalleryIndex:function(index){return _this6._selectMediaByIndex(index)}})}}}]),ProductGallery})();function ProductDetails_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function ProductDetails_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function ProductDetails_createClass(Constructor,protoProps,staticProps){return protoProps&&ProductDetails_defineProperties(Constructor.prototype,protoProps),staticProps&&ProductDetails_defineProperties(Constructor,staticProps),Constructor}var ProductDetails_ProductDetails=(function(){function ProductDetails(options){ProductDetails_classCallCheck(this,ProductDetails),this.$window=jquery_default()(window),this.$formArea=options.$formArea,this.$details=options.$details,this.context=options.context,this.settings=options.settings,this.product=options.product,this.useHistory=options.useHistory,this.sectionId=options.sectionId,this.initialVariant=options.initialVariant||null,this.variantHelper=null,this.addToCartFlyout=null,this.atcCallbacks=options.atcCallbacks,this.$form=this.$formArea.find("[data-product-form]"),this.$productAtcButton=this.$formArea.find("[data-product-atc]"),this.$productVariants=this.$form.find("[data-variants]"),this.$productOptions=this.$form.find("[data-product-option]"),this.detailsLink=this.$formArea[0].querySelector("[data-product-details-link]"),this.detailsLink&&(this.detailsB
1aseHref=this.detailsLink.getAttribute("href")),this.variantFields={$price:this.$details.find("[data-price]"),$priceMoney:this.$details.find("[data-price] .money"),$compareAtPrice:this.$details.find("[data-price-compare-at]"),$compareAtPriceMoney:this.$details.find("[data-price-compare-at] .money"),$badge:this.$details.find("[data-badge-sales]"),$badgeMoneySaved:this.$details.find("[data-price-money-saved]"),$badgePercentSaved:this.$details.find("[data-price-percent-saved]"),$sku:this.$details.find("[data-product-sku]"),unitPrice:this.$details[0].querySelector("[data-unit-price]"),totalQuantity:this.$details[0].querySelector("[data-total-quantity]"),unitPriceAmount:this.$details[0].querySelector("[data-unit-price-amount]"),unitPriceMeasure:this.$details[0].querySelector("[data-unit-price-measure]"),taxLine:this.$details[0].querySelector("[data-tax-line]")},this.forms=new Forms.a(this.$form),this.product&&"media"in this.product&&(this.gallery=new ProductGallery_ProductGallery({el:options.gallery,settings:this.settings,isQuickshop:options.isQuickshop})),this._bindEvents(),this._initOptions()}return ProductDetails_createClass(ProductDetails,[{key:"unload",value:function(){this.$form.off(".product-details-".concat(this.sectionId)),this.$window.off(".product-details-".concat(this.sectionId)),this.forms.unload(),this.variantHelper&&this.variantHelper.unload(),this.gallery&&this.gallery.unload()}},{key:"_bindEvents",value:function(){var _this=this;this.$window.on("shopify-variants:switch-variant.product-details-".concat(this.sectionId),function(event,data){return _this._switchVariant(event,data)}),this.$form.on("submit.product-details-".concat(this.sectionId),function(event){return _this._addToCartFlyout(event)})}},{key:"_initOptions",value:function(){this.$productVariants.length&&(this.variantHelper=new shopify_variants_es.a(this.product,this.$productVariants,this.$productOptions,{mixedControls:!0}),this.variantHelper.selectVariant(this.initialVariant))}},{key:"_switchVariant",value:function(event,data){if(data.product===this.product){var variant=data.variant,firstLoad=data.firstLoad;if(!firstLoad&&(this.$productVariants.val(data.variant.id),this.gallery&&this.gallery.selectMediaByVariant(variant),this._updatePrice(variant),this._updateSKU(variant),this._updateBadge(variant),this._updateButton(variant),this._updateSwatchLabel(variant),this._updateFullDetailsLink(variant),this._updateUnitPrice(variant),this.useHistory)){var url="".concat(this.product.handle,"?").concat(jquery_default.a.param({variant:variant.id}));history.replaceState({},"variant",url)}}}},{key:"_updatePrice",value:function(variant){var hasComparePrice=!!variant.compare_at_price&&variant.compare_at_price>variant.price;this.variantFields.$compareAtPrice.toggleClass("visible",hasComparePrice),this.variantFields.$compareAtPriceMoney.text(Shopify.formatMoney(variant.compare_at_price,this.settings.money_format)),this.variantFields.$priceMoney.text(Shopify.formatMoney(variant.price,this.settings.money_format))}},{key:"_updateSKU",value:function(variant){variant.sku===""?this.variantFields.$sku.parent().addClass("product-sku--empty"):this.variantFields.$sku.parent().removeClass("product-sku--empty"),this.variantFields.$sku.text(variant.sku)}},{key:"_updateBadge",value:function(variant){var priceSaved=variant.compare_at_price?variant.compare_at_price-variant.price:0;if(this.variantFields.$badge.toggle(!!priceSaved),this.variantFields.$badgeMoneySaved.length&&this.variantFields.$badgeMoneySaved.text(Shopify.formatMoney(priceSaved,this.settings.money_format)),this.variantFields.$badgePercentSaved.length){var percentileSaved=Math.round(priceSaved*100/variant.compare_at_price);this.variantFields.$badgePercentSaved.text(percentileSaved)}}},{key:"_updateButton",value:function(variant){variant.available?(this.$productAtcButton.text(this.context.product_available),this.$productAtcButton.removeClass("disabled").prop("disabled",!1)):(this.$productAtcButton.text(this.context.product_unavailable),this.$productAtcButton.addClass("disabled").prop("disabled",!0))}},{key:"_updateSwatchLabel",value:function(variant){if(this.settings.swatches_enable){var swatchLabel=this.$form[0].querySelector("[data-option-swatch-value]");swatchLabel&&(swatchLabel.innerText=variant.options[parseInt(swatchLabel.dataset.optionSwatchValue,10)])}}},{key:"_updateFullDetailsLink",value:function(variant){this.detailsLink&&this.detailsLink.setAttribute("href","".concat(this.detailsB
1aseHref,"?variant=").concat(variant.id))}},{key:"_updateUnitPrice",value:function(variant){this.variantFields.unitPrice&&variant.unit_price_measurement?(this.variantFields.totalQuantity.innerHTML="".concat(variant.unit_price_measurement.quantity_value).concat(variant.unit_price_measurement.quantity_unit),this.variantFields.unitPriceAmount.innerHTML=Shopify.formatMoney(variant.unit_price,this.settings.money_format),variant.unit_price_measurement.reference_value===1?this.variantFields.unitPriceMeasure.innerHTML=variant.unit_price_measurement.reference_unit:this.variantFields.unitPriceMeasure.innerHTML="".concat(variant.unit_price_measurement.reference_value).concat(variant.unit_price_measurement.reference_unit),this.variantFields.unitPrice.classList.remove("hidden")):this.variantFields.unitPrice&&this.variantFields.unitPrice.classList.add("hidden"),this.variantFields.taxLine&&(variant.taxable?this.variantFields.taxLine.classList.remove("hidden"):this.variantFields.taxLine.classList.add("hidden"))}},{key:"_addToCartFlyout",value:function(event){event.preventDefault(),this.addToCartFlyout&&this.addToCartFlyout.unload();var formData=this.$form.serializeArray(),options={atcButton:this.$productAtcButton[0],settings:{moneyFormat:this.settings.money_format,cartRedirection:this.settings.cart_redirection}};this.addToCartFlyout=new AddToCartFlyout.a(formData,options,this.atcCallbacks)}}]),ProductDetails})()}),39:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return AddToCartFlyout_AddToCartFlyout});var jquery=__webpack_require__(0),jquery_default=__webpack_require__.n(jquery),theme_a11y=__webpack_require__(21),animations_es=__webpack_require__(12),EventHandler=__webpack_require__(14),EventHandler_default=__webpack_require__.n(EventHandler);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var MessageBanner_MessageBanner=(function(){function MessageBanner(message,type){var _this=this;_classCallCheck(this,MessageBanner);var bannerTemplate=document.querySelector("[data-templates] [data-message-banner]");this.banner=bannerTemplate.cloneNode(!0);var messageElement=this.banner.querySelector("[data-message-banner-content]");messageElement.innerHTML=message,this.banner.classList.add("message--".concat(type)),this.header=document.querySelector("[data-site-header]"),this.closeButton=this.banner.querySelector("[data-message-banner-close]"),this.header.appendChild(this.banner),this.bannerAnimation=Object(animations_es.a)({el:this.banner,state:"closed"}),this.bannerAnimation.animateTo("open"),this.events=new EventHandler_default.a,this.events.register(this.closeButton,"click",function(){return _this._close()}),this.events.register(document,"click",function(e){return _this._handleDocumentClick(e.target)}),this.events.register(document,"touchStart",function(e){return _this._handleDocumentClick(e.target)}),this.events.register(window,"keydown",function(e){return _this._closeEsc(e)})}return _createClass(MessageBanner,[{key:"unload",value:function(){this.banner&&this._close()}},{key:"_closeEsc",value:function(e){e.key==="Escape"&&this._close()}},{key:"_close",value:function(){var _this2=this;this.bannerAnimation.animateTo("closed").then(function(){_this2.banner.remove(),_this2.banner=null,_this2.events.unregisterAll(),_this2.bannerAnimation.unload()})}},{key:"_handleDocumentClick",value:function(target){var $parent=jquery_default()(target).parents("[data-message-banner]");$parent.length||this._close()}}]),MessageBanner})();function Images_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Images_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function Images_createClass(Constructor,protoProps,staticProps){return protoProps&&Images_defineProperties(Constructor.prototype,protoProps),staticProps&&Images_defineProperties(Constructor,staticProps),Constructor}var Images=(function(){function Images2(){Images_classCallCheck(this,Images2)}return Images_createClass(Images2,[{key:"preload",value:function(images,size){var imageArray=images;typeof images=="string"&&(imageArray=[images]);for(var i=0;i<imageArray.length;i++)this.loadImage(this.getSizedImageUrl(imageArray[i],size))}},{key:"loadImage",value:function(path){var image=new Image;return image.src=path,image}},{key:"getSizedImageUrl",value:function(){var src=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,size=arguments.length>1?arguments[1]:void 0;if(!size)return null;if(size==="master")return this.removeProtocol(src);var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(match){var prefix=src.split(match[0]),suffix=match[0];return this.removeProtocol("".concat(prefix[0],"_").concat(size).concat(suffix))}return console.warn("No ".concat(size," found for '").concat(src)),null}},{key:"removeProtocol",value:function(path){return path.replace(/http(s)?:/,"")}}]),Images2})(),Ripple=__webpack_require__(3);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);
1enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function AddToCartFlyout_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function AddToCartFlyout_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function AddToCartFlyout_createClass(Constructor,protoProps,staticProps){return protoProps&&AddToCartFlyout_defineProperties(Constructor.prototype,protoProps),staticProps&&AddToCartFlyout_defineProperties(Constructor,staticProps),Constructor}var AddToCartFlyout_AddToCartFlyout=(function(){function AddToCartFlyout(formData,options){var callbacks=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};AddToCartFlyout_classCallCheck(this,AddToCartFlyout),this.formData=formData,this.settings=_objectSpread({moneyFormat:null,cartRedirection:!1},options.settings),this.atcButton=options.atcButton,this.header=document.querySelector("[data-site-header]"),this.flyOutSelector="[data-atc-banner]",this.atcTemplate=document.querySelector("[data-templates] ".concat(this.flyOutSelector)),this.activeElement=document.activeElement,this.itemId=null,this.flyOut=null,this._onInit=this._onInit.bind(this),this._onError=this._onError.bind(this),this._onSuccess=this._onSuccess.bind(this),this._onCloseAll=this._onCloseAll.bind(this),this.callbacks=_objectSpread({onInit:this._onInit,onError:this._onError,onSuccess:this._onSuccess,onClose:this._onCloseAll},callbacks),this._handleDocumentClick=this._handleDocumentClick.bind(this),this._closeFlyOut=this._closeFlyOut.bind(this),this._closeEsc=this._closeEsc.bind(this),this.events=new EventHandler_default.a,this.Images=new Images,this.messageBanner=null,this.callbacks.onInit(),this._disableAtcButton(),this._updateCart()}return AddToCartFlyout_createClass(AddToCartFlyout,[{key:"unload",value:function(){this.messageBanner&&this.messageBanner.unload(),this._closeFlyOut()}},{key:"_updateCart",value:function(){var _this=this,flyOut=this.atcTemplate.cloneNode(!0),quantityField=this.formData.filter(function(data){return data.name==="quantity"}),quantity=quantityField[0].value;jquery_default.a.ajax({type:"POST",url:"".concat(window.Theme.routes.cart_add_url,".js"),data:jquery_default.a.param(this.formData),dataType:"json"}).done(function(response){if(_this.itemId=response.id,response.image){var imageUrl=_this.Images.getSizedImageUrl(response.image,"200x");_this.Images.loadImage(imageUrl);var productImage=flyOut.querySelector("[data-atc-banner-product-image]");productImage.innerHTML='<img src="'.concat(imageUrl,'" alt="').concat(response.product_title,'">')}var productTitle=flyOut.querySelector("[data-atc-banner-product-title]");if(productTitle.innerHTML=response.product_title,response.variant_options[0]!=="Title"&&response.variant_options[0]!=="Default Title"){var productOptions=flyOut.querySelector("[data-atc-banner-product-options]");productOptions.innerHTML=response.variant_options.join(", ")}var productPriceQuantity=flyOut.querySelector("[data-atc-banner-product-price-quantity]");productPriceQuantity.innerHTML="".concat(quantity," \xD7 "),jquery_default.a.ajax({type:"GET",url:"".concat(window.Theme.routes.cart_url,".js"),dataType:"json"}).done(function(secondResponse){if(_this.settings.cartRedirection){location.href=window.Theme.routes.cart_url;return}_this.callbacks.onSuccess(),_this.formData={};var lineItem=null;
1secondResponse.items.forEach(function(item){item.id===_this.itemId&&(lineItem?(lineItem.line_level_discount_allocations=lineItem.line_level_discount_allocations.concat(item.line_level_discount_allocations),lineItem.final_price=lineItem.final_price>item.final_price?lineItem.final_price:item.final_price,lineItem.quantity+=item.quantity):lineItem=item)});var productPriceValue=flyOut.querySelector("[data-atc-banner-product-price-value]");productPriceValue.innerHTML=Shopify.formatMoney(lineItem.original_price,_this.settings.moneyFormat);var productPriceDiscounted=flyOut.querySelector("[data-atc-banner-product-price-discounted]");lineItem.final_price<lineItem.original_price?(productPriceDiscounted.innerHTML=Shopify.formatMoney(lineItem.final_price,_this.settings.moneyFormat),productPriceDiscounted.classList.remove("hidden"),productPriceValue.classList.add("original-price")):(productPriceDiscounted.classList.add("hidden"),productPriceValue.classList.remove("original-price"));var productDiscounts=flyOut.querySelector("[data-atc-banner-product-discounts]"),unitPrice=flyOut.querySelector("[data-atc-banner-unit-price]"),unitPriceString=unitPrice.innerHTML;if(unitPrice&&lineItem.unit_price_measurement&&(unitPriceString=unitPriceString.replace("** total_quantity **","".concat(lineItem.unit_price_measurement.quantity_value).concat(lineItem.unit_price_measurement.quantity_unit)),unitPriceString=unitPriceString.replace("** unit_price **",Shopify.formatMoney(lineItem.unit_price,_this.settings.money_format)),lineItem.unit_price_measurement.reference_value===1?unitPriceString=unitPriceString.replace("** unit_measure **",lineItem.unit_price_measurement.reference_unit):unitPriceString=unitPriceString.replace("** unit_measure **","".concat(lineItem.unit_price_measurement.reference_value).concat(lineItem.unit_price_measurement.reference_unit)),unitPrice.innerHTML=unitPriceString,unitPrice.classList.remove("hidden")),lineItem.line_level_discount_allocations.length>0){var discountItemTemplate=productDiscounts.firstElementChild.cloneNode(!0);productDiscounts.innerHTML="",lineItem.line_level_discount_allocations.forEach(function(discount){var listItem=discountItemTemplate.cloneNode(!0),title=listItem.querySelector(".discount-title"),amount=listItem.querySelector(".discount-amount");title.innerHTML=discount.discount_application.title,amount.innerHTML=Shopify.formatMoney(discount.amount,_this.settings.moneyFormat),productDiscounts.appendChild(listItem)}),productDiscounts.classList.remove("hidden")}else productDiscounts.classList.add("hidden");var subTotal=flyOut.querySelector("[data-atc-banner-cart-subtotal]");subTotal.innerHTML=Shopify.formatMoney(secondResponse.total_price,_this.settings.moneyFormat);var itemCount=flyOut.querySelector("[data-atc-banner-cart-button] span");itemCount.innerHTML=secondResponse.item_count,_this.header.appendChild(flyOut),_this.flyOut=flyOut,Object(Ripple.a)(_this.flyOut),jquery_default()(window).trigger("cartcount:update",{response:secondResponse}),document.dispatchEvent(new Event("closeFlyouts"));var closeButton=flyOut.querySelector("[data-atc-banner-close]");_this.events.register(closeButton,"click",function(e){return _this._closeFlyOut(e)}),_this.events.register(document,"click",function(e){return _this._handleDocumentClick(e)}),_this.events.register(document,"touchstart",function(e){return _this._handleDocumentClick(e)}),_this.events.register(document,"closeFlyouts",function(e){return _this._closeFlyOut(e)}),_this.events.register(window,"keydown",function(e){return _this._closeEsc(e)}),_this._enableAtcButton(),_this.atcAnimation=Object(animations_es.a)({el:_this.flyOut,state:"closed"}),_this.atcAnimation.animateTo("open").then(function(){Object(theme_a11y.b)(_this.flyOut)})})}).fail(function(response){var errorText;try{var responseText=JSON.parse(response.responseText);errorText=responseText.description}catch(error){errorText="".concat(response.status," ").concat(response.statusText),response.status===401&&(errorText="".concat(errorText,". Try refreshing and logging in."))}_this._enableAtcButton(),_this.callbacks.onError(errorText)})}},{key:"_onError",value:function(error){this.messageBanner=new MessageBanner_MessageBanner(error,"error")}},{key:"_onInit",value:function(){this.messageBanner&&this.messageBanner.unload()}},{key:"_onSuccess",value:function(){}},{key:"_onCloseAll",value:function(){}},{key:"_closeEsc",value:function(e){e.key==="Escape"&&this._closeFlyOut(e)}},{key:"_closeFlyOut",value:function(){var _this2=this;this.flyOut&&(Object(theme_a11y.a)(this.flyOut),this.documentClickEventTarget&&"liveSearchInput"in this.documentClickEventTarget.dataset?this.documentClickEventTarget.focu
1s():this.activeElement&&this.activeElement.focus(),this.atcAnimation.animateTo("closed").then(function(){_this2.callbacks.onClose(),_this2.flyOut.remove(),_this2.flyOut=null,_this2.events.unregisterAll(),_this2.atcAnimation.unload(),delete _this2.Images}))}},{key:"_disableAtcButton",value:function(){this.atcButton.classList.add("processing"),this.atcButton.setAttribute("disabled","disabled")}},{key:"_enableAtcButton",value:function(){this.atcButton.removeAttribute("disabled"),this.atcButton.classList.remove("processing")}},{key:"_handleDocumentClick",value:function(e){var target=e.target,$parent=jquery_default()(target).parents("[data-atc-banner]");$parent.length||(this.documentClickEventTarget=target,this._closeFlyOut(e))}}]),AddToCartFlyout})()})}]);
2//# sourceMappingURL=/cdn/shop/t/2/assets/DynamicFeaturedCollection-DynamicProduct-StaticCollection-StaticProduct-StaticProductRecommendations-724f8050.bundle.js.map?v=156265769881205806391600193815

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.