1function LiquidErrorCheck(e,t){var n=t.toLowerCase().toString();e.forEach(function(e,t,i){var o=0<e.textContent.toLowerCase().toString().indexOf(n),s=0<e.outerText.toLowerCase().toString().indexOf(n),a=0<e.outerHTML.toLowerCase().toString().indexOf(n),r=0<e.innerText.toLowerCase().toString().indexOf(n),e=0<e.innerHTML.toLowerCase().toString().indexOf(n);(o||s||a||r||e)&&(i.length=t+1)})}function getFocusableElements(e){return Array.from(e.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}document.querySelectorAll('[id^="Details-"] summary').forEach(e=>{e.setAttribute("role","button"),e.setAttribute("aria-expanded",e.parentNode.hasAttribute("open")),e.nextElementSibling.getAttribute("id")&&e.setAttribute("aria-controls",e.nextElementSibling.id),e.addEventListener("click",e=>{e.currentTarget.setAttribute("aria-expanded",!e.currentTarget.closest("details").hasAttribute("open"))}),e.closest("header-drawer")||e.parentElement.addEventListener("keyup",onKeyUpEscape)});let trapFocusHandlers={};function trapFocus(t,e=t){var i=getFocusableElements(t),o=i[0],s=i[i.length-1];removeTrapFocus(),trapFocusHandlers.focusin=e=>{e.target!==t&&e.target!==s&&e.target!==o||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(e){"TAB"===e.code.toUpperCase()&&(e.target!==s||e.shiftKey||(e.preventDefault(),o.focus()),e.target===t||e.target===o)&&e.shiftKey&&(e.preventDefault(),s.focus())},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),e.focus()}try{document.querySelector(":focus-visible")}catch(e){focusVisiblePolyfill()}function focusVisiblePolyfill(){let t=["ARROWUP","ARROWDOWN","ARROWLEFT","ARROWRIGHT","TAB","ENTER","SPACE","ESCAPE","HOME","END","PAGEUP","PAGEDOWN"],e=null,i=null;window.addEventListener("keydown",e=>{t.includes(e.code.toUpperCase())&&(i=!1)}),window.addEventListener("mousedown",e=>{i=!0}),window.addEventListener("focus",()=>{e&&e.classList.remove("focused"),i||(e=document.activeElement).classList.add("focused")},!0)}function pauseAllMedia(){document.querySelectorAll(".js-youtube").forEach(e=>{e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(e=>{e.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(e=>e.pause()),document.querySelectorAll("product-model").forEach(e=>{e.modelViewerUI&&e.modelViewerUI.pause()})}function removeTrapFocus(e=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),e&&e.focus()}function onKeyUpEscape(e){var t;"ESCAPE"===e.code.toUpperCase()&&(e=e.target.closest("details[open]"))&&(t=e.querySelector("summary"),e.removeAttribute("open"),t.setAttribute("aria-expanded",!1),t.focus())}class QuantityInput extends HTMLElement{constructor(){super(),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.input=this.querySelector("input"),this.querySelectorAll("button").forEach(e=>e.addEventListener("click",this.onButtonClick.bind(this)))}onButtonClick(e){e.preventDefault();var t=this.input.value;"plus"===e.target.name?this.input.stepUp():this.input.stepDown(),t!==this.input.value&&this.input.dispatchEvent(this.changeEvent)}}function debounce(t,i){let o;return(...e)=>{clearTimeout(o),o=setTimeout(()=>t.apply(this,e),i)}}function fetchConfig(e="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/"+e}}}customElements.define("quantity-input",QuantityInput),void 0===window.Shopify&&(window.Shopify={}),Shopify.bind=function(e,t){return function(){return e.apply(t,arguments)}},Shopify.setSelectorByValue=function(e,t){for(var i=0,o=e.options.length;i<o;i++){var s=e.options[i];if(t==s.value||t==s.innerHTML)return e.selectedIndex=i}},Shopify.addListener=function(e,t,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent("on"+t,i)},Shopify.postLink=function(e,t){var i,o=(t=t||{}).method||"post",s=t.parameters||{},a=document.createElement("form");for(i in a.setAttribute("method",o),a.setAttribute("action",e),s){var r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name",i),r.setAttribute("value",s[i]),a.appendChild(r)}document.body.appendChild(a),a.submit(),document.body.removeChild(a)},Shopify.CountryProvinceSelector=function(e,t,i){this.countryEl=document.getElementById(e),this.provinceEl=document.getElementById(t),this.provinceContainer=document.getElementById(i.hideElement||t),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var e=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,e),this.countryHandler()},initProvince:function(){var e=this.provinceEl.getAttribute("data-default");e&&0<this.provinceEl.options.length&&Shopify.setSelectorByValue(this.provinceEl,e)},countryHandler:function(e){var t=(o=this.countryEl.options[this.countryEl.selectedIndex]).getAttribute("data-provinces"),i=JSON.parse(t);if(this.clearOptions(this.provinceEl),i&&0==i.length)this.provinceContainer.style.display="none";else{for(var o,s=0;s<i.length;s++)(o=document.createElement("option")).value=i[s][0],o.innerHTML=i[s][1],this.provinceEl.appendChild(o);this.provinceContainer.style.display=""}},clearOptions:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},setOptions:function(e,t){var i=0;for(t.length;i<t.length;i++){var o=document.createElement("option");o.value=t[i],o.innerHTML=t[i],e.appendChild(o)}}};class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),"iPhone"===navigator.platform&&document.documentElement.style.setProperty("--viewport-height",window.innerHeight+"px"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}bindEvents(){this.querySelectorAll("summary").forEach(e=>e.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll("button").forEach(e=>e.addEventListener("click",this.onCloseButtonClick.bind(this)))}onKeyUp(e){var t;"ESCAPE"===e.code.toUpperCase()&&(t=e.target.closest("details[open]"))&&(t===this.mainDetailsToggle?this.closeMenuDrawer(e,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(t))}onSummaryClick(e){let t=e.currentTarget,i=t.parentNode,o=i.closest(".has-submenu");var s=i.hasAttribute("open");let a=window.matchMedia("(prefers-reduced-motion: reduce)");function r(){trapFocus(t.nextElementSibling,i.querySelector("button")),t.nextElementSibling.removeEventListener("transitionend",r)}i===this.mainDetailsToggle?(s&&e.preventDefault(),s?this.closeMenuDrawer(e,t):this.openMenuDrawer(t)):setTimeout(()=>{i.classList.add("menu-opening"),t.setAttribute("aria-expanded",!0),o&&o.classList.add("submenu-open"),!a||a.matches?r():t.nextElementSibling.addEventListener("transitionend",r)},100)}openMenuDrawer(e){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),e.setAttribute("aria-expanded",!0),this.lockBody(),trapFocus(this.mainDetailsToggle,e),document.body.classList.add("overflow-hidden-"+this.dataset.breakpoint)}closeMenuDrawer(e,t=!1){void 0!==e&&(this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach(e
1=>{e.removeAttribute("open"),e.classList.remove("menu-opening")}),this.mainDetailsToggle.querySelectorAll(".submenu-open").forEach(e=>{e.classList.remove("submenu-open")}),document.body.classList.remove("overflow-hidden-"+this.dataset.breakpoint),this.unlockBody(),removeTrapFocus(t),this.closeAnimation(this.mainDetailsToggle))}onFocusOut(e){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(e){e=e.currentTarget.closest("details");this.closeSubmenu(e)}closeSubmenu(e){var t=e.closest(".submenu-open");t&&t.classList.remove("submenu-open"),e.classList.remove("menu-opening"),e.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(e.querySelector("summary")),this.closeAnimation(e)}closeAnimation(t){let i,o=e=>{e-(i=void 0===i?e:i)<400?window.requestAnimationFrame(o):(t.removeAttribute("open"),t.closest("details[open]")&&trapFocus(t.closest("details[open]"),t.querySelector("summary")))};window.requestAnimationFrame(o)}
1lockBody(){waitForJavascript(function(){var e=$(window).scrollTop(),t=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;$("body").addClass("locked").css({top:-e}),t&&(e=window.innerHeight-1,$("body").css({height:e}))})}unlockBody(e){waitForJavascript(function(){var e=Math.abs(parseInt($("body").css("top"))),t=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;$("body").css({top:0}).removeClass("locked"),window.scrollTo(0,e),t&&$("body")[0].style.removeProperty("height")})}}customElements.define("menu-drawer",MenuDrawer);class HeaderDrawer extends MenuDrawer{constructor(){super()}openMenuDrawer(e){this.header=this.header||document.getElementById("shopify-section-header"),this.borderOffset=this.borderOffset||this.closest(".header-wrapper").classList.contains("header-wrapper--border-bottom")?1:0,document.documentElement.style.setProperty("--header-bottom-position",parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)+"px"),this.header.classList.add("menu-open"),setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),e.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,e),this.lockBody(),document.body.classList.add("overflow-hidden-"+this.dataset.breakpoint)}closeMenuDrawer(e,t){this.unlockBody(),super.closeMenuDrawer(e,t),this.header.classList.remove("menu-open")}
1lockBody(){var e=$(window).scrollTop(),t=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;$("body").addClass("locked").css({top:-e}),t&&(e=window.innerHeight-1,$("body").css({height:e}))}unlockBody(e){var t=Math.abs(parseInt($("body").css("top"))),i=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;$("body").css({top:0}).removeClass("locked"),window.scrollTo(0,t),i&&$("body")[0].style.removeProperty("height")}}customElements.define("header-drawer",HeaderDrawer);class ModalDialog extends HTMLElement{constructor(){super(),this.querySelector('[id^="ModalClose-"]').addEventListener("click",this.hide.bind(this,!1)),this.addEventListener("keyup",e=>{"ESCAPE"===e.code.toUpperCase()&&this.hide()}),this.classList.contains("media-modal")?this.addEventListener("pointerup",e=>{"mouse"!==e.pointerType||e.target.closest("deferred-media, product-model")||this.hide()}):this.addEventListener("click",e=>{e.target===this&&this.hide()})}connectedCallback(){this.moved||(this.moved=!0,document.body.appendChild(this))}show(e){this.openedBy=e,this.lockBody();e=this.querySelector(".template-popup");document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),e&&e.loadContent(),trapFocus(this,this.querySelector('[role="dialog"]')),window.pauseAllMedia()}hide(){this.unlockBody(),document.body.classList.remove("overflow-hidden"),document.body.dispatchEvent(new CustomEvent("modalClosed")),this.removeAttribute("open"),removeTrapFocus(this.openedBy),window.pauseAllMedia()}
1lockBody(){var e=$(window).scrollTop(),t=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;$("body").addClass("locked").css({top:-e}),t&&(e=window.innerHeight-1,$("body").css({height:e}))}unlockBody(e){var t=Math.abs(parseInt($("body").css("top"))),i=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;$("body").css({top:0}).removeClass("locked"),window.scrollTo(0,t),i&&$("body")[0].style.removeProperty("height")}}customElements.define("modal-dialog",ModalDialog);class ModalOpener extends HTMLElement{constructor(){super();let t=this.querySelector("button");t&&t.addEventListener("click",()=>{var e=document.querySelector(this.getAttribute("data-modal"));e&&e.show(t)})}}customElements.define("modal-opener",ModalOpener);class DeferredMedia extends HTMLElement{constructor(){super();var e=this.querySelector('[id^="Deferred-Poster-"]');e&&e.addEventListener("click",this.loadContent.bind(this))}loadContent(e=!0){var t;window.pauseAllMedia(),this.getAttribute("loaded")||((t=document.createElement("div")).appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0),t=this.appendChild(t.querySelector("video, model-viewer, iframe")),e&&t.focus())}}customElements.define("deferred-media",DeferredMedia);class SliderComponent extends HTMLElement{constructor(){super(),this.slider=this.querySelector('[id^="Slider-"]'),this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.enableSliderLooping=!1,this.currentPageElement=this.querySelector(".slider-counter--current"),this.pageTotalElement=this.querySelector(".slider-counter--total"),this.prevButton=this.querySelector('button[name="previous"]'),this.nextButton=this.querySelector('button[name="next"]'),this.slider&&this.nextButton&&(this.initPages(),new ResizeObserver(e=>this.initPages()).observe(this.slider),this.slider.addEventListener("scroll",this.update.bind(this)),this.prevButton.addEventListener("click",this.onButtonClick.bind(this)),this.nextButton.addEventListener("click",this.onButtonClick.bind(this)))}initPages(){this.sliderItemsToShow=Array.from(this.sliderItems).filter(e=>0<e.clientWidth),this.sliderItemsToShow.length<2||(this.sliderItemOffset=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft,this.slidesPerPage=Math.floor((this.slider.clientWidth-this.sliderItemsToShow[0].offsetLeft)/this.sliderItemOffset),this.totalPages=this.sliderItemsToShow.length-this.slidesPerPage,this.update())}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}update(){var e=this.currentPage;this.currentPage=Math.round(this.slider.scrollLeft/this.sliderItemOffset)+1,this.currentPageElement&&this.pageTotalElement&&(this.currentPageElement.textContent=this.currentPage,this.pageTotalElement.textContent=this.totalPages),this.currentPage!=e&&this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:this.sliderItemsToShow[this.currentPage-1]}})),this.enableSliderLooping||(this.isSlideVisible(this.sliderItemsToShow[0])&&0===this.slider.scrollLeft?this.prevButton.setAttribute("disabled","disabled"):this.prevButton.removeAttribute("disabled"),this.isSlideVisible(this.sliderItemsToShow[this.sliderItemsToShow.length-1])?this.nextButton.setAttribute("disabled","disabled"):this.nextButton.removeAttribute("disabled"))}isSlideVisible(e,t=0){return!(!this.slider||!e)&&(t=this.slider.clientWidth+this.slider.scrollLeft-t,e.offsetLeft+e.clientWidth<=t)&&e.offsetLeft>=this.slider.scrollLeft}onButtonClick(e){e.preventDefault();var t=e.currentTarget.dataset.step||1;this.slideScrollPosition="next"===e.currentTarget.name?this.slider.scrollLeft+t*this.sliderItemOffset:this.slider.scrollLeft-t*this.sliderItemOffset,this.slider.scrollTo({left:this.slideScrollPosition})}}customElements.define("slider-component",SliderComponent);class SlideshowComponent extends SliderComponent{constructor(){super(),this.sliderControlWrapper=this.querySelector(".slider-buttons"),this.enableSliderLooping=!0,this.sliderControlWrapper&&(this.sliderFirstItemNode=this.slider.querySelector(".slideshow__slide"),0<this.sliderItemsToShow.length&&(this.currentPage=1),this.sliderControlLinksArray=Array.from(this.sliderControlWrapper.querySelectorAll(".slider-counter__link")),this.sliderControlLinksArray.forEach(e
1=>e.addEventListener("click",this.linkToSlide.bind(this))),this.slider.addEventListener("scroll",this.setSlideVisibility.bind(this)),this.setSlideVisibility(),"true"===this.slider.getAttribute("data-autoplay"))&&this.setAutoPlay()}setAutoPlay(){this.sliderAutoplayButton=this.querySelector(".slideshow__autoplay"),this.autoplaySpeed=1e3*this.slider.dataset.speed,this.sliderAutoplayButton.addEventListener("click",this.autoPlayToggle.bind(this)),this.addEventListener("mouseover",this.focusInHandling.bind(this)),this.addEventListener("mouseleave",this.focusOutHandling.bind(this)),this.addEventListener("focusin",this.focusInHandling.bind(this)),this.addEventListener("focusout",this.focusOutHandling.bind(this)),this.play(),this.autoplayButtonIsSetToPlay=!0}onButtonClick(e){super.onButtonClick(e);var t=1===this.currentPage,i=this.currentPage===this.sliderItemsToShow.length;(t||i)&&(t&&"previous"===e.currentTarget.name?this.slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*this.sliderItemsToShow.length:i&&"next"===e.currentTarget.name&&(this.slideScrollPosition=0),this.slider.scrollTo({left:this.slideScrollPosition}))}update(){super.update(),this.sliderControlButtons=this.querySelectorAll(".slider-counter__link"),this.prevButton.removeAttribute("disabled"),this.sliderControlButtons.length&&(this.sliderControlButtons.forEach(e=>{e.classList.remove("slider-counter__link--active"),e.removeAttribute("aria-current")}),this.sliderControlButtons[this.currentPage-1].classList.add("slider-counter__link--active"),this.sliderControlButtons[this.currentPage-1].setAttribute("aria-current",!0))}autoPlayToggle(){this.togglePlayButtonState(this.autoplayButtonIsSetToPlay),this.autoplayButtonIsSetToPlay?this.pause():this.play(),this.autoplayButtonIsSetToPlay=!this.autoplayButtonIsSetToPlay}focusOutHandling(e){e=e.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(e.target);this.autoplayButtonIsSetToPlay&&!e&&this.play()}focusInHandling(e){(e.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(e.target))&&this.autoplayButtonIsSetToPlay?this.play():this.autoplayButtonIsSetToPlay&&this.pause()}play(){this.slider.setAttribute("aria-live","off"),clearInterval(this.autoplay),this.autoplay=setInterval(this.autoRotateSlides.bind(this),this.autoplaySpeed)}pause(){this.slider.setAttribute("aria-live","polite"),clearInterval(this.autoplay)}togglePlayButtonState(e){e?(this.sliderAutoplayButton.classList.add("slideshow__autoplay--paused"),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.playSlideshow)):(this.sliderAutoplayButton.classList.remove("slideshow__autoplay--paused"),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.pauseSlideshow))}autoRotateSlides(){var e=this.currentPage===this.sliderItems.length?0:this.slider.scrollLeft+this.slider.querySelector(".slideshow__slide").clientWidth;this.slider.scrollTo({left:e})}setSlideVisibility(){this.sliderItemsToShow.forEach((e,t)=>{var i=e.querySelector("a");t===this.currentPage-1?(i&&i.removeAttribute("tabindex"),e.setAttribute("aria-hidden","false"),e.removeAttribute("tabindex")):(i&&i.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1"))})}linkToSlide(e){e.preventDefault();e=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*(this.sliderControlLinksArray.indexOf(e.currentTarget)+1-this.currentPage);this.slider.scrollTo({left:e})}}customElements.define("slideshow-component",SlideshowComponent);class VariantSelects extends HTMLElement{constructor(){super(),this.variantMetafields=JSON.parse(this.querySelector("#mainProductMetafieldsJson")?.textContent??null),this.addEventListener("change",this.onVariantChange),this.createMonogramLabels()}connectedCallback(){this.updateAvailability()}onVariantChange(){this.updateOptions(),this.updateMasterId(),this.toggleAddButton(!0,"",!1),this.updatePickupAvailability(),this.removeErrorMessage(),this.createMonogramLabels(),this.currentVariant&&void 0!==window.gwpGiftVariantId&&this.currentVariant.id==window.gwpGiftVariantId&&(this.currentVariant.available=!1),this.currentVariant&&(this.currentVariant,void 0===window.gwpGiftVariantId||this.currentVariant.id!=window.gwpGiftVariantId)?(this.updateMedia(),this.filterMedia(),this.updateV
1ariantInput(),this.updateURL(),this.renderProductInfo(),this.updateShareUrl(),this.updateMonogramCustomizationVisibility(),this.syncMonogramVariant()):(this.toggleAddButton(!0,"",!0),this.setUnavailable(),this.hideMonogram(),this.showHideFinalSale(!1)),this.updateAvailability()}filterMedia(){var e,t=this.currentVariant.option1,i=this.currentVariant.option2,o=this.currentVariant.option3;for(e of document.querySelectorAll(".thumbnail-list__item")){var s=e.getAttribute("thumbnail-color");e.classList.add("hide"),(""!=t&&s.includes(t)||""!=i&&s.includes(i)||""!=o&&s.includes(o))&&e.classList.remove("hide")}}isMonogramEligible(t){return!!t&&"Split King"!==t.option1&&"Wash"!==t.option1&&!0===t.available&&!0===(this.variantMetafields?.find(e=>String(e.variant_id)===String(t.id)))?.monogram_enable}hideMonogram(){var e=document.querySelector(".monogram-container");e&&(e.style.display="none",this.teardownMonogramLoad())}teardownMonogramLoad(){var e,t,i,o=document.querySelector("monogram-modal");o&&(e=this.currentVariant?String(this.currentVariant.id):String(o.dataset.variantId||""),window.__monogramLoadSeq=(window.__monogramLoadSeq||0)+1,t=window.__monogramLoadSeq+`:${e}:teardown`,o.dataset.variantId=e,o.dataset.loadToken=t,o.expectedVariantId=e,o.dispatchEvent(new CustomEvent("monogram:jtb-reloading",{detail:{variantId:e,loadToken:t,teardownOnly:!0}})),this.resetJtbcRuntime(),o=document.getElementById("jtbconfigurator"))&&((i=document.createElement("div")).id="jtbconfigurator",e&&(i.dataset.variantId=e),t&&(i.dataset.loadToken=t),o.replaceWith(i))}createMonogramLabels(){var e=()=>{document.querySelectorAll('[data-embroidery-step="embroidery_style"] .jtbc-attribute-item[data-element-value],[data-embroidery-step="embroidery_color"] .jtbc-attribute-item[data-element-value]').forEach(e=>{var t=e.dataset.tooltip?JSON.parse(e.dataset.tooltip):null,t=t&&t.title?t.title:"";e.classList.add("span-title");let i=e.querySelector(".monogram-label");i||((i=document.createElement("span")).classList.add("monogram-label"),e.appendChild(i)),i.textContent=t})};e(),setTimeout(e,300),requestAnimationFrame(e)}showHideFinalSale(e){var t=document.querySelector(".product__info-container .final-sale-text");t&&t.classList.toggle("show",e)}updateOptions(){this.options=Array.from(this.querySelectorAll("select"),e=>e.value)}updateMasterId(){this.currentVariant=this.getVariantData().find(e=>!e.options.map((e,t)=>this.options[t]===e).includes(!1))}updateMedia(){var e,t;this.currentVariant&&this.currentVariant.featured_media&&(document.getElementById("MediaGallery-"+this.dataset.section).setActiveMedia(this.dataset.section+"-"+this.currentVariant.featured_media.id,!0),e=document.querySelector(`#ProductModal-${this.dataset.section} .product-media-modal__content`))&&(t=e.querySelector(`[data-media-id="${this.currentVariant.featured_media.id}"]`),e.prepend(t))}resetJtbcRuntime(){document.querySelectorAll('script[src*="silhouette.jtbcustom.com"]').forEach(e=>e.remove()),document.querySelectorAll('link[href*="silhouette.jtbcustom.com"]').forEach(e=>e.remove());try{delete window.jtbCustomizer}catch(e){window.jtbCustomizer=void 0}}updateMonogramCustomizationVisibility(){var e=document.querySelector(".monogram-container");
1e&&(this.isMonogramEligible(this.currentVariant)?e.style.display="flex":(e.style.display="none",this.teardownMonogramLoad()))}syncMonogramVariant(){var e=document.querySelector("monogram-modal");if(e&&this.currentVariant)if(this.isMonogramEligible(this.currentVariant)){var t=String(this.currentVariant.id),i=(e.dataset.selectedVariantId=t,e.dataset.variantId||(e.dataset.variantId=t),!!document.getElementById("monogram-script"));if(i&&!e.classList.contains("is-monogram-unavailable")&&(!0===e.widgetLoaded||e.classList.contains("is-monogram-ready"))&&"function"==typeof e.applyChangeVariant){i="function"==typeof e.getLoadedVariantId?e.getLoadedVariantId():"";if(i&&i===t)return;if(i&&i!==t&&e.applyChangeVariant(t))return}this.reloadMonogramLoad()}else this.teardownMonogramLoad()}reloadMonogramLoad(){var e,t,i,o=document.querySelector('[data-modal="monogram-modal"]');o&&(o=o.closest("monogram-modal"))&&(e=String(this.currentVariant.id),t=document.getElementById("monogram-script"),!(String(o.dataset.variantId||"")===e&&String(t?.dataset.variantId||"")===e&&(o.classList.contains("is-monogram-loading")||o.classList.contains("is-monogram-ready"))))&&(window.__monogramLoadSeq=(window.__monogramLoadSeq||0)+1,t=window.__monogramLoadSeq+":"+e,this.resetJtbcRuntime(),o.dataset.selectedVariantId=e,o.dataset.variantId=e,o.dataset.loadToken=t,o.expectedVariantId=e,o.dispatchEvent(new CustomEvent("monogram:jtb-reloading",{detail:{variantId:e,loadToken:t}})),(o=document.getElementById("jtbconfigurator"))&&((i=document.createElement("div")).id="jtbconfigurator",i.dataset.variantId=e,i.dataset.loadToken=t,o.replaceWith(i)),window.__monogramBooted||document.getElementById("monogram-js"))&&((o=document.createElement("script")).id="monogram-script",o.src=`https://silhouette.jtbcustom.com/js/loader/${e}.js`,o.dataset.variantId=e,o.dataset.loadToken=t,o.dataset.noOpt="",o.async=!1,document.querySelector("head").appendChild(o))}updateURL(){this.currentVariant&&"false"!==this.dataset.updateUrl&&window.history.replaceState({},"",this.dataset.url+"?variant="+this.currentVariant.id)}updateShareUrl(){var e=document.getElementById("Share-"+this.dataset.section);e&&e.updateUrl&&e.updateUrl(""+window.shopUrl+this.dataset.url+"?variant="+this.currentVariant.id)}updateVariantInput(){document.querySelectorAll(`#product-form-${this.dataset.section}, #product-form-installment-`+this.dataset.section).forEach(e=>{e=e.querySelector('input[name="id"]');e.value=this.currentVariant.id,e.dispatchEvent(new Event("change",{bubbles:!0}))})}updatePickupAvailability(){var e=document.querySelector("pickup-availability");e&&(this.currentVariant&&this.currentVariant.available?e.fetchAvailability(this.currentVariant.id):(e.removeAttribute("available"),e.innerHTML=""))}removeErrorMessage(){var e=this.closest("section");e&&(e=e.querySelector("product-form"))&&e.handleErrorMessage&&e.handleErrorMessage()}renderProductInfo(){fetch(`${this.dataset.url}?variant=${this.currentVariant.id}§ion_id=`+(this.dataset.originalSection||this.dataset.section)).then(e=>e.text()).then(e=>{var t,i=(new DOMParser).parseFromString(e,"text/html"),e=(i.querySelector(".final-sale-text")?.classList.contains("show")?this.showHideFinalSale(!0):this.showHideFinalSale(!1),document.querySelectorAll(".product .price-item"));for(t of e){var o=i.getElementById("price-"+(this.dataset.originalSection||this.dataset.section)),o=(o&&t&&(t.innerHTML=o.innerHTML),t);o&&o.classList.remove("visibility-hidden")}"true"==this.variantMetafields.find(e=>e.variant_id==this.currentVariant.id)?.allow_pre_order?this.toggleAddButton(!1,"Preorder"):this.currentVariant.available?this.toggleAddButton(!1,""):this.toggleAddButton(!0,window.variantStrings.soldOut);var e=i.querySelector(".delivery-message"),s=document.querySelector(".delivery-message"),e=(s&&(s.innerHTML=e.innerHTML),i.querySelector(".product-form__input.is-color")),a=document.querySelector(".product-form__input.is-color");s&&(a.innerHTML=e.innerHTML),this.updateAvailability()})}toggleAddButton(e=!0,t,i){var o,s=document.getElementById("product-form-"+this.dataset.section);s&&(o=s.querySelector('[name="add"]'),s=s.querySelector('[name="add"] > span'),o)&&(e?(o.setAttribute("disabled","disabled"),t&&(s.textContent=t)):(o.removeAttribute("disabled"),s.textContent=t||window.variantStrings.addToCart))}setUnavailable(){var e=document.getElementById("product-form-"+this.dataset.section),t=e.querySelector('[name="add"]'),e=e.querySelector('[name="add"] > span'),i=document.getElementById("price-"+this.dataset.section);t&&(e.textContent=window.variantStrings.unavailable,i)&&i.classList.add("visibility-hidden")}getVariantData(){return this.variantData=this.variantData||JSON.parse(this.querySelector('[type="application/json"]').textContent),this.variantData}}customElements.define("variant-selects",VariantSelects);class VariantRadios extends VariantSelects{constructor(){super(),this.variantMetafields=JSON.parse(this.querySelector("#mainProductMetafieldsJson")?.textContent??null)}updateAvailability(){let r=this.getVariantData();if(r){var e=Array.from(this.querySelectorAll("fieldset[data-option-pos]"));if(e.length){let a={};
1e.forEach(e=>{var t=parseInt(e.dataset.optionPos,10)-1,i=e.querySelector("input:checked");i?a[t]=i.value:(console.warn("No option selected for fieldset position "+(1+t)),e.querySelector('input[type="radio"]'))}),e.forEach(i=>{let s=parseInt(i.dataset.optionPos,10)-1;i.querySelectorAll('input[type="radio"]').forEach(e=>{let o=e.value;var t=i.querySelector(`label[for="${e.id}"]`);t?r.some(e=>{if(!e.available)return!1;if(void 0!==window.gwpGiftVariantId&&e.id==window.gwpGiftVariantId)return!1;if(!(e.options[s]===o))return!1;let t=!0;for(var i in a)if(parseInt(i,10)!==s&&e.options[i]!==a[i]){t=!1;break}return t})?t.classList.remove("variant--unavailable"):t.classList.add("variant--unavailable"):console.warn("Label not found for input ID: "+e.id)})});e=document.querySelector(".product-form__quantity");this.currentVariant&&(!1===this.currentVariant.available?e?.classList.add("hidden"):e?.classList.remove("hidden"))}}else console.error("Variant data not found for availability check.")}updateOptions(){var e,t=Array.from(this.querySelectorAll("fieldset")),i=event.target;i.classList.contains("faux-select")?(e=i.selectedOptions[0].getAttribute("data-id"),(e=document.getElementById(e))&&(e.checked=!0)):(e=i.id,i.closest(".form__options").querySelector("select").querySelector('[data-id="'+e+'"]').selected=!0),this.options=t.map(e=>Array.from(e.querySelectorAll("input")).find(e=>e.checked).value),t.forEach(e=>{var t=e.classList.contains("is-color"),i=e.classList.contains("select-option--size"),a=Array.from(e.querySelectorAll("input")).find(e=>e.checked).value;if(e.querySelectorAll(".color-name")[0].innerText=a,e.querySelectorAll(".color-name")[0].setAttribute("data-color",a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")),i&&document.querySelector(".current-size"),this.updateMasterId(),t&&this.variantMetafields&&this.currentVariant){a=Array.from(e.querySelectorAll("form__option")),i=this.getVariantData();let o=e.getAttribute("data-option-pos"),t=t=>{if(this.variantMetafields.find(e=>e.variant_id==t.id).show_on_sale)switch(o){case"1":return t.option2==this.currentVariant.option2&&t.option3==this.currentVariant.option3;case"2":return t.option1==this.currentVariant.option1&&t.option3==this.currentVariant.option3;case"3":return t.option1==this.currentVariant.option1&&t.option2==this.currentVariant.option2;default:return!1}},s=i.filter(e=>t(e));a.forEach(e=>{let t=e.querySelector("input").getAttribute("value");var i=s.some(e=>e["object"+o]==t);e.querySelector(".sale-tag").classList.toggle("visibility-hidden",!i)})}e.addEventListener("change",e=>{e.target.closest(".sticky-add-to-cart")?.classList.contains("sticky")&&e.target.blur()})})}}customElements.define("variant-radios",VariantRadios);class ProductRecommendations extends HTMLElement{constructor(){super();new IntersectionObserver(((e,t)=>{e[0].isIntersecting&&(t.unobserve(this),fetch(this.dataset.url).then(e=>e.text()).then(e=>{var t=document.createElement("div"),e=(t.innerHTML=e,t.querySelector("product-recommendations"));e&&e.innerHTML.trim().length&&(this.innerHTML=e.innerHTML),t.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")}).catch(e=>{console.error(e)}))}).bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}function watchForElement(e,t){chkDelay="200";var i=setInterval(function(){"undefined"!=typeof(chkClass=document.querySelectorAll(e)[0])&&(clearInterval(i),t(chkClass))},chkDelay)}function Modal(e){act="active",actMod="modal-active";function t(e){var t=Math.abs(parseInt($("body").css("top"))),e=$(e);$("body").css({top:0}).removeClass(actMod),window.scrollTo(0,t),e.removeClass(act)}function i(e){var i="",o=/^data\-(.+)$/;return $.each(e.get(0).attributes,function(e,t){o.test(t.nodeName)&&(i=t.nodeName.match(o)[1])}),i}winWidth=$(window).width(),thisEl=e,type=i($(thisEl)).length?i($(thisEl)):"modal",thisMdl=i($(thisEl)).length?$('[data-modal="'+$(thisEl).data(type)+'"]'):$(thisEl),"open"!=type&&"modal"!=type||(thisMdl.is("."+act)?t:e=>{var t=$(window).scrollTop(),e=$(e),i=0;$("body").addClass(actMod).css({top:-t}),e.is("[style*=display]")&&(e[0].removeAttribute("style"),i=100),setTimeout(function(){e.addClass(act),e.find(":focusable").first().focus()},i)})(thisMdl),"close"==type&&t(thisMdl)}function positionChange(i,o,s,a,r,n){i=document.querySelector(i),o=document.querySelector(o);if(!i&&!o)return!1;var s=i.closest(s),n=void 0===n?750:n,a=void 0===a?"append":a,r=void 0===r?"append":r,l="desk",d=l;function e(){var e=window.innerWidth,t=e<n&&"mob"!=d;n<=e&&d!=l&&(move(i,s,r),d=l),t&&(move(i,o,a),d="mob")}e(),window.addEventListener("resize",e)}function move(e,t,i){"before"==i?t.parentNode.insertBefore(e,t):"after"==i?t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e):"prepend"==i?t.insertBefore(e,t.firstChild):t.appendChild(e)}function updateProductCardImage(e){var e=e.currentTarget,t=e.getAttribute("data-varimg"),i=e.getAttribute("data-color"),o=e.getAttribute("data-prodI
1d"),s=e.getAttribute("data-varid"),a=e.closest(".card--media"),r=e.closest(".card-wrapper"),e=(a.querySelectorAll(".swatch-element").forEach(function(e,t){e.classList.remove("active")}),e.classList.add("active"),a.querySelectorAll(".image-content__image")[0]),e=(e.src=t,e.srcset=t,r.querySelector("#color-"+o)&&r.querySelector("#size-"+o)&&(a=r.querySelector("#size-"+o).value,r.querySelector("#color-"+o).value=i,setVariantCard(r,o,i,a)),r.querySelector(".overlay-link"));e&&(t=e.getAttribute("href").split("?")[0],r.querySelector(".overlay-link").setAttribute("href",t+"?variant="+s))}function setVariantCard(e,t,i,o){var s=JSON.parse(e.querySelector("#setJson-"+t).innerHTML).filter(function(e){return e.option1==o&&e.option2==i});0<s.length&&(t=e.querySelector("#setForm-"+t),e.querySelector(".card-price").textContent="$"+s[0].price/100,t.getElementsByClassName("product-select")[0].value=s[0].id)}customElements.define("product-recommendations",ProductRecommendations),waitForJavascript(function(){jQuery.extend(jQuery.expr[":"],{focusable:function(e,t,i){return $(e).is("a, button, :input, label, [tabindex]")}}
1),$("#tabs-select").on("change",function(){var e=$(this).val();return e&&$('a[href="'+e+'"]').trigger("click"),!1}),$(".accordion-section .sidebar-link").on("click touch",function(){$(".accordion-section .sidebar-link").removeClass("active"),$(this).addClass("active")}),$(document).on("touch click",".acc-btn",function(){var e=".acc-btn",t=$(this),i=300,o="selected",s=".acc-content",a="h3",r=".img",n=t.closest(".acc-container"),l=0==t.closest(".site-footer").length?n.find(e).index(t):0,d=t.next(s).children().outerHeight(),t=n.find(a).eq(l),c=n.find(r).eq(l),u=t.hasClass(o),h=($(window).width(),$("#shopify-section-header")),m=$(a+"."+o);m||(m[0].getBoundingClientRect().top,window.scrollY);function p(){n.find(e+" "+a).removeClass(o),n.find(e+" "+r).removeClass(o)}function f(){n.find(s).stop().animate({height:0},i)}function y(){n.find(s).eq(l).stop().animate({height:d},i)}function v(e){("open"==e||1==e?(f(),y):(y(),f))()}h&&m&&h.outerHeight(!0),u?(p(),v()):(p(),t.addClass(o),c.addClass(o),v(!0)),setTimeout(function(){},500)}),thisHash=window.location.hash,clearThis=$("#shopify-section-header").height()+$("#shopify-section-announcement-bar").height()+25,0<thisHash.length&&setTimeout(function(){$("html, body").animate({scrollTop:$(thisHash).offset().top-clearThis},1e3)},200),$('a[href*="#"]').not('[href="#"]').not('[href="#recover"]').not('[href="#login"]').not('[href="#0"]').click(function(e){var t;location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname&&(t=(t=$(this.hash)).length?t:$("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),$("html, body").animate({scrollTop:t.offset().top-clearThis}
1,1e3,function(){var e=$(t);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))});var e,t,i="active";function o(){var s=$(window).width();e.length&&e.each(function(){var e,t=$(this);void 0!==t.data("video-ratio")&&(e=t.data("video-ratio"));var i=t.closest("div").outerHeight(!0),o=i,i=i/e;i<s&&(o=(i=s)*e),t.attr("style","width: "+i+"px !important;height: "+o+"px !important;")})}0<thisHash.length&&"#recover"==thisHash&&($("."+i).removeClass(i),$(thisHash).addClass(i)),$('[href="#recover"],[href="#login"]').click(function(e){e.preventDefault();e=$(this).attr("href");$("."+i).removeClass(i),$(e).addClass(i)}),$("a").not("#boldmetrics-ssc-activator").not(".img-tab-link-2").not('[href*="tel:"]').not('[href*="mailto:"]').not(".product-single__thumbnail").not('[href="#recover"]').not('[href="#login"]').not('[href="javascript:void(0);"]').each(function(){new RegExp("/"+window.location.host+"/").test(this.href)||$(this).click(function(e){$(this).is("#boldmetrics-ssc-activator")||(e.preventDefault(),e.stopPropagation(),window.open(this.href,"_blank"))})}),$(".js-filters-toggle").click(function(e){$("html").toggleClass("filters-is-open"),e.preventDefault()}),$(document).ready(function(){$(".modal-action").on("click touch",function(e){e.preventDefault(),Modal($(this));var t,e=$(this).closest(".video-modal").find("iframe");0<e.length&&($(this).is(".close-modal")||$(this).is(".bg_close"))&&(t=e.attr("src"),e.attr("src",t))}),$(".btn-modal").on("click touch",function(){var e,t=$(this).attr("href"),t=(Modal($(t)),$(t).find("iframe"));0<t.length&&($(this).is(".close-modal")||$(this).is(".bg_close"))&&(e=t.attr("src"),t.attr("src",e))})}),e=$(".video-ratio:not(.for-modal) iframe, .video-ratio:not(.for-modal) video"),o(),$(window).resize(function(){o()}),$(document).ready(function(){$(window).width();var e=document.documentElement.scrollTop,a="header.header",u=($(a).height(),".nav-item"),h=".dropdown-link",i=".dropdown-list",m='a[href="#"]',o=".mega-pane",r="megamenu",p="active",n="locked",l="nav-item",d="inner-"+l,c=".mobile-nav",f=".use-dropdown",y=".menu-btn,.close-nav",v="mobile-nav-open",g="mobile-nav--open",b="mobile-nav--close",w=".mobile-nav-background-close",S=".move-aside",L=".menu-toggle",E=".reverse",k="level-one",C="level-two";function t(){var e=$(window).width(),t=$(a).height(),c=1200<=e;$(u+","+h+","+o+","+i+","+L+","+u+" "+m+","+h+" "+m+","+y+","+w).off(),1==c?($(u+","+h).off().on("mouseover mouseleave focusin focusout",function(e){var t,i,o,s;c&&("mouseover"!=e.type&&"focusin"!=e.type||(t=$(this),i=(t=$(t)).is("."+p),o=t.data(l),s=t.data(d),(o||s)&&T(t),!i&&(t.addClass(p),s=$("[data-"+r+'="'+o+'"]'))&&(void 0!==s[0]&&0<s[0].querySelectorAll(".lazyload.defer").length&&(s[0].querySelectorAll(".lazyload.defer").forEach(function(e,t){e.classList.remove("defer")}),LazyImages()),$(a).height(),s.addClass(p))),"mouseleave"==e.type&&T($(this)),"focusout"==e.type)&&A($(this))}),$(o+","+i).off().on("mouseleave focusout",function(e){c&&("mouseleave"==e.type&&$(this).is(o)&&s($(this)),"focusout"==e.type&&$(this).is(o)&&A($(this)),"mouseleave"==e.type)&&$(this).is(i)&&T($(this))})):($(L+","+u+" "+m+","+h+" "+m).off().on("touch click",function(e){function t(e){(e=e).removeClass(p)}function i(){setTimeout(function(){r.parent().children().removeClass(p)},200)}function o(){setTimeout(function(){r.addClass(p)},200)}function s(e,t){setTimeout(function(){$(e).is("."+t)?$(e).removeClass(t):$(e).addClass(t)},200)}var a,r,n,l,d;c||($(this).is(L)&&(ths=$(this)),$(this).is(m)&&(e.preventDefault(),ths=$(this).parent().children(L)),e=ths,(e=$(e)).is(L),a=e.is(E),r=e.parent(),e=0<e.closest(f).length,n=r.is("."+p),l=$(S).is("."+k),d=$(S).is("."+C),l||!r.is(u)||e||(i(),o(),s(S,k)),d||!r.is(h)||e||(i(),o(),s(S,C)),d&&l&&a&&!e?(s(S,C),i()):l&&a&&!e&&(s(S,k),i()),e&&(n?t:(r.is(u)&&$(u+","+h).each(function(){t($(this))}),r.is(h)&&$(h).each(function(){t($(this))}),e=>{e.addClass(p)}))(r))}),$(y+","+w).off().on("touch click",function(e){e.preventDefault(),c||q()}))}function T(e){var e=$(e),t=e.data(l),e=e.is("."+p);$("[data-"+r+'="'+t+'"]').is("."+p)||e||$(i+","+o+","+u+","+h).removeClass(p)}function s(){$(i+","+o).removeClass(p),$(u).removeClass(p)}function q(e){e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation());e=document.querySelector(a);let t=document.querySelector(c);var i=document.querySelector(w);if(e&&t&&i){if(!t.hasAttribute("data-transitioning")){var o=t.classList.contains(p);if(t.setAttribute("data-transitioning","true"),o){o=Math.abs(parseInt($("body").css("top"))),s=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints,$("body").css({top:0}).removeClass(n),window.scrollTo(0,o),s&&$("body")[0].style.removeProperty("height");var o=document.querySelector(y),s=(o&&(o.classList.remove(b),o.classList.add(g)),t.classList.remove(p),i.classList.remove(p),t.querySelectorAll("."+p).forEac
1h(e=>{e.classList.remove(p)}),document.querySelector(S));s&&(s.classList.remove(k),s.classList.remove(C)),e.classList.remove(v),t.setAttribute("data-nav-state","closed")}else{o=$(window).scrollTop(),s=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints,$("body").addClass(n).css({top:-o}),s&&(o=window.innerHeight-1,$("body").css({height:o}));document.documentElement.scrollTop;t.offsetWidth,t.classList.add(p),i.classList.add(p);o=document.querySelector(y);o&&(o.classList.add(b),o.classList.remove(g)),e.classList.add(v),t.setAttribute("data-nav-state","open")}setTimeout(()=>{t.removeAttribute("data-transitioning")},100)}}else console.warn("Required elements not found")}function A(e){var t=$(e);checker=setTimeout(function(){t.find(":focus").length||T(t)},0),clearTimeout(checker)}t(),setTimeout(function(){t()},1e3),$(window).resize(function(){t()}),$(window).scroll(function(){t(),s()}),document.addEventListener("DOMContentLoaded",()=>{var e=document.querySelector(y);if(e){var t=e.cloneNode(!0);e.parentNode.replaceChild(t,e);let i=0;t.addEventListener("click",e=>{var t=Date.now();if(!(t-i<200))return i=t,e.preventDefault(),e.stopPropagation(),q(e),!1},{passive:!1})}e=document.querySelector(w);e&&e.addEventListener("click",e=>{var t=document.querySelector(c);t&&t.classList.contains(p)&&q(e)})})}),$("body").hasClass("template--product")&&(t=$(".template--product .product__info-wrapper .product-form__buttons").offset().top,$(window).scroll(function(){$(window).scrollTop()>t?$(".template--product .product__info-wrapper .product-form__buttons").addClass("sticky"):$(".template--product .product__info-wrapper .product-form__buttons").removeClass("sticky")}));var s="*:not(.quick-add-modal__content-info) .product__media",a="img.zoom-image",r="zoomed",n="zoom-in",l=a+"."+r;function d(e){element={width:e.width(),height:e.height()},scale=2,ratio=.35*scale,mouse={x:event.pageX,y:event.pageY},offset=e.offset(),origin={x:offset.left+element.width*ratio,y:offset.top+element.height*ratio},trans={left:(origin.x-mouse.x)*ratio,down:(origin.y-mouse.y)*ratio},transform="scale("+scale+","+scale+") translateX("+trans.left+"px) translateY("+trans.down+"px)"}
1$(document).on("click touch",s,function(){var e=$(this);e.children(a).is("."+r)?e.css("cursor",n).children(a).removeClass(r).css("transform","none").css("left","0").css("top","0"):(d(e),$(this).css("cursor","zoom-out").children(a).addClass(r).css("transform",transform).css("left",-trans.left).css("top",-trans.down))}).on("mousemove",s,function(){var e=$(this);d(e),e.children(l).css("transform",transform).css("left",-trans.left).css("top",-trans.down)}).on("mouseleave",s,function(){$(this).css("cursor",n).children(l).css("transform","none").css("left","0").css("top","0").removeClass(r)})}),window.addEventListener("scroll",function(){var e,t,i,o,s=document.querySelector(".template--product .product .sticky-add-to-cart");null!=s&&(window.innerWidth,e=s.offsetHeight,i=window.scrollY>s.offsetTop+e+100,o=s.classList.contains(t="sticky"),i&&!o&&(s.style.minHeight=e+"px",s.classList.add(t)),!i)&&o&&(s.style.removeProperty("min-height"),s.classList.remove(t))}),document.querySelectorAll(".card__content .size").forEach(o=>{o.addEventListener("change",function(){var e=o.closest(".card-wrapper"),t=o.getAttribute("data-prodId"),i=e.querySelector("#color-"+t).value;setVariantCard(e,t,i,this.value)})});var addAll=document.getElementById("addAll"),registerFormsubmitted=(addAll&&addAll.addEventListener("click",function(){var t=[];document.querySelectorAll(".product-form form").forEach(e=>{t.push({quantity:1,id:e.getElementsByClassName("product-select")[0].value})}),jQuery.post("/cart/add.js",{items:t}).then(function(){window.location="/cart"})}),!1),yotpoRatingText=(null!=document.querySelector("#create_customer #submit-button")&&(document.querySelector("#create_customer #submit-button").onclick=function(t){if(0==registerFormsubmitted){t.preventDefault();t=!1,t={api_key:"pk_600d842669e8f2a1035e49f4615546326e",profiles:[{phone_number:"+12345678900",sms_consent:t=document.querySelector("#accepts_sms_marketing").checked?!0:t}]},t=JSON.stringify(t);let e=new XMLHttpRequest;e.open("POST","https://jsonplaceholder.typicode.com/posts",!0),e.setRequestHeader("Content-type","application/json; charset=UTF-8"),e.setRequestHeader("Cache-Control","no-cache; charset=UTF-8"),e.send(t),e.onload=function(){201===e.status&&(registerFormsubmitted=!0)}}}),".rating-replace .sr-only"),wrapWords=" star rating";watchForElement(yotpoRatingText,function(e){$(yotpoRatingText+":contains('"+wrapWords+"')").html(function(e,t){var i=new RegExp(wrapWords,"g");return t.replace(i,'<span class="visually-hidden">'+wrapWords+"</span>")})});let searchField=document.getElementById("header-search--3");searchField?.addEventListener("keyup",function(e){"Enter"===e.key&&(e.preventDefault(),e.target.closest("form").submit())});class HeartButton extends HTMLElement{constructor(){super(),this.initializeElements(),this.setupListeners()}async getProjectsList(){this.loaderId.style.display="block",this.outputDiv.textContent="";var e=this.customerId.value;try{var t=await fetch(wishAppURL+"/ext-api/project/getProjectsList?customerId="+e);if(!t.ok)throw Error("Network response was not ok");var i=await t.json();0<i.items?.length?(window.finalData=i.items,this.addToList.classList.replace("d-none","d-block"),this.createNewListButton1a.classList.replace("d-block","d-none"),i.items.forEach(e=>{let i="";e.categories&&e.categories.forEach((e,t)=>{t=0===t?"checked":"";i+=` 2 <li> 3 <label class="radio-container testing"> 4 <input 5 data-category-title="${e.title}" 6 type="radio" 7 name="catItem" 8 value="${e.id}" 9 ${t}> 10 <span class="checkmark"></span> 11 ${"null"==e.title?"General":e.title} 12 </label> 13 </li> 14 `});e=`<li> 15 <label class="radio-container"> 16 <input 17 type="radio" 18 checked="checked" 19 id="input-field-${e.id}" 20 name="listItem" 21 value="${e.id}"> 22 <span class="checkmark"></span> 23 ${e.title} 24 <p class="items-count">(${e.items} items)</p> 25 <ul class="inner-rooms-list chk"> 26 <li> 27 <label class="radio-container"> 28 <input 29 type="radio" 30 name="catItem" 31 value="null" 32 class = "default-checked" 33 >
34 <span class="checkmark"></span> 35 None 36 </label> 37 </li> 38 ${i} 39 </ul> 40 41 </label> 42 <div class="divider"></div> 43 </li>`;this.outputDiv.innerHTML+=e}),this.defaultChecked&&(this.defaultChecked.checked=!0),this.loaderId.style.display="none"):(this.addToList.classList.replace("d-block","d-none"),this.createNewListButton1a.classList.replace("d-none","d-block"))}catch(e){console.error("Fetch error:",e)}finally{this.loaderId.style.display="none",this.modal.style.display="block",this.backdrop.style.display="block",this.createListModal.style.display="none"}}initializeElements(){this.backdrop=document.querySelector("#backdrop"),this.modal=document.querySelector("#exampleModalCenter1"),this.createListModal=document.querySelector("#exampleModalCenter"),this.closeButton=document.querySelector(".close"),this.closeButton1=document.querySelector(".close1"),this.createButtonListItem=document.querySelector("#createButtonListItem"),this.openFavModel=document.querySelector("#openFavModel"),this.loaderId=document.querySelector("#loaderId"),this.outputDiv=document.querySelector("#parentUL"),this.customerId=document.querySelector("#customerId"),this.addToList=document.querySelector("#add-to-list"),this.createNewListButton1a=document.querySelector("#createNewListButton1a"),this.defaultChecked=document.querySelector(".default-checked")}setupListeners(){this.addEventListener("click",e=>{e.preventDefault(),this.displayLists()}),window.addEventListener("newListCreated",()=>{this.displayLists()})}displayLists(){this.getProjectsList(),document.querySelector("modal-container").setTarget(this.closest(".product-container")??this.closest(".product")),this.modal.style.display="block",this.createListModal.style.display="none"}}try{document.addEventListener("DOMContentLoaded",initializeListeners)}catch(e){console.log(e)}customElements.get("heart-button")||customElements.define("heart-button",HeartButton);class ModalContainer extends HTMLElement{constructor(){super(),this.initializeElements(),this.setupListeners()}initializeElements(){this.addToList=this.querySelector("#add-to-list"),this.showNewListInput=this.querySelector("#showNewListInput"),this.newListName=this.querySelector("#newListName"),this.categoryList=this.querySelector("#categoryList"),this.hideNewListInput=this.querySelector("#hideNewListInput"),this.addCategoryInput=this.querySelector("#addCategoryInput"),this.loader=this.querySelector("#loaderId"),this.scrollToTop=this.querySelector("#scrollToTop"),this.saveCategoryButton=this.querySelector("#saveCategoryButton"),this.exampleModalCenter1=this.querySelector("#exampleModalCenter1"),this.backdrop=this.querySelector("#backdrop"),this.modalFooterButton=this.querySelector(".modal-footer button"),this.saveCategoryButton=this.querySelector("#saveCategoryButton"),this.newListNameChild=this.querySelector("#newListNameChild"),this.customerId=this.querySelector("#customerId"),this.parentUL=this.querySelector("#parentUL"),this.productEl=void 0}setTarget(e){this.productEl=e}async _createNewProjectAddCategories(e,t,i=null){var o,s=Array.isArray(i)?i:[];if(!i)for(o of Array.from(document.getElementsByClassName("list-category-input"))){var a=o.value.trim();a&&s.push(a)}return s.length&&(i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:t,projectId:e,categories:s}),redirect:"follow"},(t=await fetch(wishAppURL+"/ext-api/category/create",i)).ok)?t.json():null}async _getProjectsListUpdated(e,t){this.loader.style.display="block",this.parentUL.textContent="";var i=this.customerId.value;try{var o=await fetch(wishAppURL+"/ext-api/project/getProjectsList?customerId="+i);if(!o.ok)throw new Error("Network response was not ok");var s=await o.json(),a=(s.categories,0<s.items?.length?(this.addToList.classList.replace("d-none","d-block"),this.createNewListButton1a.classList.replace("d-block","d-none"),s.items.forEach(e=>{let o="";e.categories&&e.categories.forEach((e,t)=>{var t=0===t?"checked":"",i=["","null","none"].includes(e.title.toLowerCase())?"General":e.title;o+=` 44 <li> 45 <label class="radio-container testing"> 46 <input 47 data-category-title="${i}" 48 type="radio" 49 name="catItem" 50 value="${e.id}" 51 ${t}>
52 <span class="checkmark"></span> 53 ${i} 54 </label> 55 </li> 56 `});e=`<li> 57 <label class="radio-container"> 58 <input 59 type="radio" 60 checked="checked" 61 id="input-field-${e.id}" 62 name="listItem" 63 value="${e.id}"> 64 <span class="checkmark"></span> 65 ${e.title} 66 <p class="items-count">(${e.items} items)</p> 67 <ul class="inner-rooms-list chk"> 68 <li> 69 <label class="radio-container"> 70 <input 71 type="radio" 72 name="catItem" 73 value="null" 74 class = "default-checked" 75 > 76 <span class="checkmark"></span> 77 None 78 </label> 79 </li> 80 ${o} 81 </ul> 82 83 </label> 84 <div class="divider"></div> 85 </li>`;this.parentUL.innerHTML+=e}),this.defaultChecked&&(this.defaultChecked.checked=!0),this.loader.style.display="none"):(this.addToList.classList.replace("d-block","d-none"),this.createNewListButton1a.classList.replace("d-none","d-block")),this.querySelector(".default-checked"));a&&(a.checked=!0),this.loader.classList.add("d-none"),this.querySelector("#input-field-"+e).checked=!0,null!=t&&(this.querySelector("'data-category-parent-' + "+t).checked=!0),this.hideNewListInput.click()}catch(e){this.loader.style.display="block",console.log(e)}finally{this.exampleModalCenter1.style.display="block",this.backdrop.style.display="block"}}async createNewList(e){e.preventDefault(),this.loader.classList.add("d-block");var t,i,e=this.newListNameChild.value?.trim();e?(t=wishAppURL+"/ext-api/project/create",i={title:e,customerId:this.customerId.value},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)},(t=await fetch(t,i)).ok?(t=(i=await t.json())?.id||Array.isArray(i)&&i[0]?.id,i=Array.from(document.getElementsByClassName("list-category-input")).map(e=>e.value.trim()).filter(Boolean),t&&i.length&&(e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,projectId:t,categories:i})},(await fetch(wishAppURL+"/ext-api/category/create",e)).ok||showToast("List created, but failed to add categories")),this.loader.classList.remove("d-block"),window.dispatchEvent(new CustomEvent("newListCreated"))):(this.loader.classList.replace("d-block","d-none"),showToast("Failed to create list"))):(showToast("List Name is required"),this.loader.classList.replace("d-block","d-none"))}setupListeners(){this.saveCategoryButton.addEventListener("click",this.createNewList.bind(this)),this.showNewListInput.addEventListener("click",e=>{e.preventDefault(),this.addToList.classList.add("d-none"),this.showNewListInput.classList.add("d-none"),this.newListName.classList.remove("d-none"),this.hideNewListInput.classList.remove("d-none"),this.scrollToTop.scrollTo({top:this.scrollToTop.scrollHeight,behavior:"smooth"})}),this.hideNewListInput.addEventListener("click",e=>{e.preventDefault(),this.addToList.classList.remove("d-none"),this.showNewListInput.classList.remove("d-none"),this.newListName.classList.add("d-none"),this.hideNewListInput.classList.add("d-none")}),this.addCategoryInput.addEventListener("click",e=>{e.preventDefault();e=document.createElement("input");e.type="text",e.placeholder="Ex : Bedroom",e.classList.add("custom-input","mt-1","list-category-input","remove-all-li"),this.categoryList.appendChild(e),this.saveCategoryButton.classList.replace("d-none","d-block")}),this.addToList.addEventListener("click",async i=>{i.preventDefault();i=wishAppURL+"/ext-api/item/create";let o=this.querySelector('input[name="listItem"]:checked');var s=o.closest("ul"),s="null"==s.querySelector('input[name="catItem"]:checked').value?null:s.querySelector('input[name="catItem"]:checked').value;let a=null;var r=this.customerId.value;try{let t=await fetch(wishAppURL+"/ext-api/project/getProjects?customerId="+r);if(t.ok){let e=await t.json();a=(e.items||e).find(e=>e.id==o.value)}}catch(e){}let t=this.productEl.querySelector('input[name="id"]').value,e=!1;if(e=a&&Array.isArray(a.items)?a.items.some(e=>e.variantId==t||e.id==t):e)showToast("This item is already in the list!");else{let e={productHandle:this.productEl.querySelector('input[name="productHandle"]').value,productId:this.productEl.querySelector('input[name="productId"]').value,variantId:this.productEl.querySelector('input[name="id"]').value,project_id:o.value,imgSrc:this.productEl.querySelector('input[name="imageSource"]').value,categoryId:s};r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)};let t=await fetch(i,r);if(!t.ok)throw Error("Network response was not ok");this.loader.style.display="none",this.newListName.classList.add("d-none"),this.exampleModalCenter1.style.display="none",this.backdrop.style.display="none",showToast("Successfully Added!")}})}}customElements.get("modal-container")||customElements.define("modal-container",ModalContainer);var yotpoTabWidget=".yotpo-layout-header-wrapper",themeJSisLoaded=(watchForElement(yotpoTabWidget,function(e){move(document.querySelector(".yotpo-header-container"),document.querySelector(".yotpo-main-widget-tabs"),"before")}),!0); 86//# sourceMappingURL=global.min.js.map
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.