PageSourceSearch

https://untuckit.co.uk/cdn/shop/t/493/assets/layout.theme.js?v=84686788821816379501791210892

js untuckit.co.uk collected 2026-10-07 13:57:18 UTC 124,302 bytes, 2 lines download raw bytes

1!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"fab4f8a8d9d1b60190690495a8ee19c997d71654"}}catch(e){}}(),(globalThis.webpackChunk||=[]).push([[380],{646(e,t,n){n.r(t),n.d(t,{getDeviceType:()=>c,isBelowDesktop:()=>r,isDesktop:()=>a,isIOS:()=>l,isMobile:()=>s,isTablet:()=>i});const o=1024;function s(){return window.innerWidth<768}function i(){return window.innerWidth>=768&&window.innerWidth<o}function r(){return window.innerWidth<o}function a(){return!r()}function c(){return s()?"mobile":i()?"tablet":"desktop"}function l(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}n.d(t,["DESKTOP_WIDTH",0,o,"TABLET_WIDTH",0,768])},7978(e,t,n){n.r(t),n.d(t,["INLINE_CART_CLOSE",0,"inlineCart:close","INLINE_CART_SHOW",0,"inlineCart:show","QUICKSHOP_CLOSE",0,"quickshop:close","QUICKSHOP_REFRESH",0,"quickshop:refresh","SEARCH_CLOSE",0,"search:close"])},7803(e,t,n){n.r(t);const o="X-Small",s="Small",i="Medium",r="Large",a="X-Large",c="XX-Large",l="XXX-Large",d=[o,s,i,r,a,c,l],u="Slim Fit",h="Regular Fit",p="Relaxed Fit",m="Tall Slim Fit",g="Tall Regular Fit",f="manual",v="fitFinder",b="associate",w=new Map([[f,"Manual"],[v,"Fit Finder"],[b,"Store Associate"]]),_=new Map([[o,[u]],[s,[u,h]],[i,[u,h,p,m]],[r,[u,h,p,m,g]],[a,[u,h,p,m,g]],[c,[u,h,p,m,g]],[l,[h,p,g]]]),y=new Map([["x-small",o],["small",s],["medium",i],["large",r],["x-large",a],["xx-large",c],["xxx-large",l]]),C=new Map([["slim-fit",u],["regular-fit",h],["relaxed-fit",p],["tall-slim-fit",m],["tall-regular-fit",g]]);n.d(t,["ASSOCIATE_METHOD",0,b,"FIT_FINDER_METHOD",0,v,"FIT_FINDER_TO_FIT",0,C,"FIT_FINDER_TO_SIZE",0,y,"LARGE",0,r,"MANUAL_METHOD",0,f,"MEDIUM",0,i,"METHOD_MAP",0,w,"REGULAR",0,h,"RELAXED",0,p,"SIZE_LIST",0,d,"SIZE_TO_FIT",0,_,"SLIM",0,u,"SMALL",0,s,"TALL_REGULAR",0,g,"TALL_SLIM",0,m,"XXX_LARGE",0,l,"XX_LARGE",0,c,"X_LARGE",0,a,"X_SMALL",0,o])},2301(e,t,n){n.r(t),n.d(t,["STANDARD_SHIPPING_ONLY_PRODUCT_TAGS",0,["dc:ca","shipping:standard-only"]])},6440(e,t,n){n.r(t),n.d(t,["MY_STORE_BUTTON_LABEL",0,"My Store","NEAREST_STORE_STORAGE_KEY",0,"utk_nearest_store","SET_STORE_BUTTON_CLASS",0,"store-locator__set-store-btn","SET_STORE_BUTTON_LABEL",0,"Set as My Store","STORE_MANUALLY_SELECTED_EVENT",0,"untuckit:store_manually_selected","STORE_SELECTION_SOURCES",0,{MANUAL:"manual",AUTO:"auto"},"STORE_STORAGE_KEY",0,"utk_selected_store"])},4726(e,t,n){var o=n(2137),s=n(1854),i=n(1906);(0,n(4027).logInstanceId)("consent.service");const r="PieEyeConsent",a="_pieeye_cookie_consent";let c=!1;const l=(0,s.createState)(void 0),d=(0,s.createState)(void 0),u=(0,s.createState)(void 0),h={"pieeye-category-necessary":l,"pieeye-category-functional":d,"pieeye-category-performance":u,"pieeye-category-preferences":void 0,"pieeye-category-targeting-analytics":void 0,"pieeye-category-unclassified":void 0},p={"Strictly Necessary":"pieeye-category-necessary",Functionality:"pieeye-category-functional",Performance:"pieeye-category-performance",Preferences:"pieeye-category-preferences","Targeting/Advertising":"pieeye-category-targeting-analytics"},m=(0,s.asDistinctDefinedSubscribable)(l),g=(0,s.asDistinctDefinedSubscribable)(d),f=(0,s.asDistinctDefinedSubscribable)(u);function v(e,t){return{subscribe(n){let o=!1;return e.subscribe(e=>{!o&&e&&(o=!0,console.log(t),n())})}}}v(m,"strictly necessary consent allowed once");const b=v(g,"functional consent allowed once"),w=v(f,"performance consent allowed once");function _(){let e={};if(null!==(t=window.PieEyeConsent)&&"object"==typeof t&&0!==Object.keys(t).length)e=window.PieEyeConsent;else if(o.default.get(r))e=JSON.parse(decodeURIComponent(o.default.get(r)));else{const t=window.localStorage.getItem("pieeye-consent")||window.localStorage.getItem("pieeye-categories-consent");t&&(e=t.split(",").map(e=>e.trim()).reduce((e,t)=>{const n=p[t];return n&&(e[n]=1),e},{}))}var t;return e}if(y(),window.cookieStore)window.cookieStore.addEventListener("change",e=>{const t=e.changed?.find(e=>e.name===r);t&&(console.log("pieeye cookie consent changed (cs)",t.value),y())});else{let e=o.default.get(r);setInterval(()=>{const t=o.default.get(r);e!==t&&(e=t,console.log("pieeye cookie consent changed (i)",t),y())},500)}function y(){const e=_();Object.entries(e).forEach(([e,t])=>{const n=h[e];n&&n.set(1===t)}),C()}function C(){const e=window.localStorage.getItem("pieeye-consent")||"unknown",t=i.cartState.get();if(!t){if(!c){c=!0;const e=i.onCartUpdate.subscribe(()=>{e(),c=!1,C()})}return}const n=t.attributes?.[a];n!==e&&(0,i.updateCart)({attributes:{[a]:e}})}var S=n(6085),E=n(9233),L=n(1354),k=n(7587);const A="logged_in",T="utk_sentry_sid",I=T;let $=null;const M=[],x=[/elevar/i,/getelevar/i,/visually/i,/vsly\//i,/swym/i,/bazaarvoice/i,/cdn\.shopify\.com\/wpm/i,/packs\/js\/shop_now/i,/widget/i,/uxa\//i,/shop_events_listener/i,/consent-tracking-api/i,/monorail-edge\.shopifysvc\.com/i,/boost-pfs-filter/i,/awin-shopify-integration/i,/webmcp/i,/shopping-behaviour/i,/shopifycloud\/shop-js/i,/shopifycloud\/storefront\/assets\/storefront\/load_feature/i,/web-pixels@/i,/\/web-pixels\//i,/\/cdn\/wpm\//i],q=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications","Load failed","AbortError","HTTP Client Error","Importing a module script failed","Failed to fetch dynamically imported module","error loading dynamically imported module","NetworkError when attempting to fetch resource","Non-Error promise rejection captured",/webkit\.messageHandlers/,/sendDataToNative/,/Java object is gone/,/Elevar:/,/^swym:/,/registerTool.*ModelContext/,/could not load https:\/\/apps\.bazaarvoice\.com/,/Failed to load https:\/\/assets\.visually\.
1io/,"Failed to fetch (otlp-http-production.shopifysvc.com)",/load error: https:\/\/cdn\.shopify\.com\/shopifycloud\/consent-tracking-api\//,/load error: https:\/\/[^/]+\/cdn\/shopifycloud\/consent-tracking-api\//,/load error: https:\/\/cdn\.shopify\.com\/shopifycloud\/shop-js\//,/importScripts on 'WorkerGlobalScope'.*\/web-pixels/i,/importScripts on 'WorkerGlobalScope'.*\/cdn\/wpm\//i,/extractFilteredSchemaValuesFromJSONLD/,/script_src_app_theme_embed/],P=["error"];function O(e){const t=e.exception?.values?.[0]?.stacktrace?.frames;return t?.length?t.some(e=>!0===e.in_app)?e:null:e}function D(){(0,E.isEnabled)()||((0,k.init)(function(){const e=window.UNTUCKitConfig?.sentry;return{dsn:e?.dsn,environment:e?.environment,ignoreErrors:q,denyUrls:x,beforeSend:O,debug:new URLSearchParams(window.location.search).has("sentry_debug"),integrations:[(0,S.consoleLoggingIntegration)({levels:(t=e?.consoleLoggingLevels,t?.trim()?t.split(",").map(e=>e.trim()).filter(Boolean):P)})],enableLogs:!0};var t}()),function(){const e=window.UNTUCKitConfig?.sentry,t=(0,L.getIsolationScope)(),n=e?.customerId,o=function(){try{const e=sessionStorage.getItem(T);if(e)return $=e,e;const t=crypto.randomUUID();return sessionStorage.setItem(T,t),$=t,t}catch{return $||($=crypto.randomUUID()),$}}();t.setTag(I,o),null!=n?(t.setUser({id:String(n)}),t.setTag(A,"true")):(t.setUser({id:`anon:${o}`}),t.setTag(A,"false")),window.UNTUCKitConfig?.thirdPartyToggles?.isApp&&t.setTag("is_app","true")}(),M.splice(0).forEach(e=>{e()}))}var U=n(4019),N=n(2882);const H="contentsquareReplayLinkUrl",B="sentrySessionIdStr";var R=n(8367),j=n(6624);const F="kustomerLoaded";function K(e,t,n){window.Kustomer?.describeConversation?.({conversationId:e,customAttributes:t},(e,t)=>{t&&console.error(n,t)})}async function W(e,t){if(t)return void console.error("Kustomer onConversationCreate error",t);if(!e?.conversationId)return;(0,R.csqTrackPageEvent)("kustomer_chat_started"),(0,R.csqTrackDynamicVariable)("kustomer_conversation_id",e.conversationId);const n=window.UNTUCKitConfig.kustomerLiveChat?.orgSlug;var o,s;n&&(0,R.csqTrackDynamicVariable)("kustomer_conversation_url",function(e,t){return`https://${e}.kustomerapp.com/app/conversations/${t}`}(n,e.conversationId)),o=e.conversationId,s=()=>{const e=(0,E.isEnabled)()?$:null;e&&K(o,{[B]:e},"Failed to attach Sentry session id to Kustomer conversation")},(0,E.isEnabled)()?s():M.push(s);try{const t=await(0,R.generateCSQReplayLink)(!0);if(!t)return void console.warn("Contentsquare replay link unavailable for Kustomer conversation");K(e.conversationId,{[H]:t},"Failed to attach Contentsquare replay link to Kustomer conversation")}catch(e){console.error("Failed to integrate Kustomer with Contentsquare",e)}}const V=(()=>{console.log("UNTUCKit : Module : Accordion : loaded");const e=new WeakMap,t=e=>{e.style.height="",e.style.overflow="",e.style.paddingTop="",e.style.paddingBottom="",e.style.marginTop="",e.style.marginBottom=""},n=t=>{const n=e.get(t);if(n){try{n.commitStyles()}catch{}n.cancel(),e.delete(t)}},o=e=>{const t=getComputedStyle(e),n=parseFloat(t.paddingTop)||0,o=parseFloat(t.paddingBottom)||0,s=parseFloat(t.borderTopWidth)||0,i=parseFloat(t.borderBottomWidth)||0,r="border-box"===t.boxSizing?e.offsetHeight:e.offsetHeight-n-o-s-i;return{height:`${Math.max(r,0)}px`,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,marginTop:t.marginTop,marginBottom:t.marginBottom}},s={height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px"},i=(n,o,s)=>{const i=n.animate(o,{duration:400,easing:"ease-in-out",fill:"forwards"});e.set(n,i),i.onfinish=()=>{e.get(n)===i&&(e.delete(n),t(n),n.style.display=s,i.cancel())}},r=e=>{if(!(e.currentTarget instanceof HTMLElement))return;const r=e.currentTarget,a=(e=>{const t=e.parentElement;return t?Array.from(t.children).filter(t=>t!==e&&t instanceof HTMLElement&&t.classList.contains("js-accordion-content")):[]})(r),c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;a.forEach(e=>{const r="none"===getComputedStyle(e).display;if(c)return n(e),t(e),void(e.style.display=r?"block":"none");r?(e=>{n(e),t(e),e.style.display="block",e.style.height="auto";const r=o(e);e.style.overflow="hidden",e.style.height="0px",e.style.paddingTop="0px",e.style.paddingBottom="0px",e.style.marginTop="0px",e.style.marginBottom="0px",i(e,[s,r],"block")})(e):(e=>{if(n(e),"none"===getComputedStyle(e).display)return t(e),void(e.style.display="none");const r=o(e);e.style.overflow="hidden",e.style.height=r.height,e.style.paddingTop=r.paddingTop,e.style.paddingBottom=r.paddingBottom,e.style.marginTop=r.marginTop,e.style.marginBottom=r.marginBottom,i(e,[r,s],"none")})(e)}),r.classList.toggle("active")};return{init:()=>{console.log("UNTUCKit : Module : Accordion : init"),document.querySelectorAll(".js-accordion-toggle").forEach(e
1=>{e.addEventListener("click",r)})}}})();var z=n(2313);const X=null,Y=document.getElementById("js-overlay"),Q=(0,s.createState)(X);function G(e){return(0,s.asFilteredSubscribable)(Q,t=>t!==e)}function Z(){Q.get()!==X&&Q.set(X)}function J(e){Q.set(e)}(0,s.asNonNullSubscribable)(Q),Y&&(Y.addEventListener("click",()=>{Z()}),Q.subscribe(e=>{console.log("overlay state",e),e===X?(Y.classList.remove("is-active"),z.default.unlock()):(Y.classList.add("is-active"),z.default.lock())}));const ee=(()=>{console.log("UNTUCKit : Module : VideoModal : loaded");const e=()=>document.querySelector("[data-video-modal]"),t=()=>document.querySelector("[data-video-modal-iframe]"),n=()=>{const n=e();n?.classList.contains("is-active")&&(Z(),n.classList.remove("is-active"),t()?.setAttribute("src",""))},o=o=>{o.target instanceof Element&&(o.target.closest("[data-video-id]")?(n=>{const o=n.target instanceof Element?n.target.closest("[data-video-id]"):null,s=e(),i=t();if(!(o instanceof HTMLElement&&s&&i))return;const r=`https://www.youtube.com/embed/${o.getAttribute("data-video-id")}/?rel=0;&autoplay=1`;s.classList.add("is-active"),i.setAttribute("src",r),J("video")})(o):o.target.closest(".js-close-modal")&&n())};return{init:()=>{console.log("UNTUCKit : Module : VideoModal : init"),document.addEventListener("click",o),G("video").subscribe(()=>n())}}})();var te=n(7978),ne=n(8839),oe=n(646);function se(){const e=(0,oe.isMobile)()?".global-banner--mobile":".global-banner--desktop",t=document.querySelector(e),n=t?.classList.contains("global-banner--has-initial-banners")?t.offsetHeight:0;document.documentElement.style.setProperty("--side-panel-banner-height",`${n}px`)}const ie=(()=>{console.log("UNTUCKit : Module : InlineCart : loaded");const e=()=>document.querySelector(".js-inline-cart"),t=(e,t)=>{document.querySelectorAll(e).forEach(e=>{e.style.display=t?"":"none"})},n=(e,t)=>{e.setAttribute("aria-hidden",t?"true":"false"),e.tabIndex=t?-1:0};function o(){console.log("UNTUCKit : Module : InlineCart : show");const t=e();document.documentElement.classList.add("cart-opened"),se(),t?.classList.add("is-active"),J("inline-cart"),function(){console.log("UNTUCKit : Module : InlineCart : adaShow");const t=e();t&&(n(t,!1),t.querySelectorAll(j.TABBABLE_ELEMENT_SELECTOR).forEach(e=>{n(e,!1)}),t.focus())}();const o=i.cartState.get();o&&(0,R.emitShopifyEvent)("view_cart",o),R.dialogStack.push("inline-cart")}function s(){console.log("UNTUCKit : Module : InlineCart : hide"),h()&&(document.documentElement.classList.remove("cart-opened"),e()?.classList.remove("is-active"),Z(),u(),R.dialogStack.pop("inline-cart"))}function r(e){console.log("UNTUCKit : Module : InlineCart : .js-open-cart click"),e.preventDefault(),e.stopPropagation(),h()?s():o()}function a(e){console.log("UNTUCKit : Module : InlineCart : .js-close-cart click"),e.preventDefault(),e.stopPropagation(),s()}function c(){document.querySelectorAll(".js-tooltip").forEach(e=>{e.nextElementSibling?.classList.remove("is-active")})}function l(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.nextElementSibling?.classList.toggle("is-active")}function d(){console.log("UNTUCKit : Module : InlineCart : bindUIActions"),document.querySelectorAll(".js-open-cart").forEach(e=>{e.addEventListener("click",r)}),document.querySelector(".js-close-cart")?.addEventListener("click",a),i.onCartUpdate.subscribe(e=>async function(e){console.log("UNTUCKit : Module : InlineCart : updateCart"),await(0,ne.renderCartContents)(e),h()||u(),(e=>{console.log("UNTUCKit : Module : InlineCart : renderCart");const n=document.querySelector(".js-cart-contents"),o=document.querySelector(".js-checkout"),s=window.UNTUCKitConfig.cartCurrencySymbol;e.items.length?(t(".js-cart-bottom, .js-cart-subtotal",!0),o&&(o.disabled=!1)):(n&&(n.innerHTML='<div class="cart-empty">Your Cart is Currently Empty.</div>'),t(".js-cart-bottom, .js-cart-subtotal",!1),o&&(o.disabled=!0));const i=`${e.item_count}`;document.querySelectorAll(".js-cart-qty").forEach(e=>{e.innerHTML=i});const r=document.querySelector(".js-side-cart-qty");r&&(r.innerHTML=e.item_count?`(${e.item_count} item${e.item_count>1?"s":""})`:"");const a=e.total_price?s+(e.total_price/100).toFixed(2):"";
1document.querySelectorAll(".js-cart-total-price").forEach(e=>{e.innerHTML=a})})(e)}(e)),window.addEventListener(te.INLINE_CART_SHOW,()=>o()),window.addEventListener(te.INLINE_CART_CLOSE,()=>s()),document.body.addEventListener("click",c),document.querySelectorAll(".js-tooltip").forEach(e=>{e.addEventListener("click",l),e.parentElement?.addEventListener("click",e=>{e.stopPropagation()})}),u(),G("inline-cart").subscribe(()=>s());let e=0;window.addEventListener("resize",()=>{h()&&(cancelAnimationFrame(e),e=requestAnimationFrame(se))})}function u(){console.log("UNTUCKit : Module : InlineCart : adaHide");const t=e();t&&(n(t,!0),t.querySelectorAll(j.TABBABLE_ELEMENT_SELECTOR).forEach(e=>{n(e,!0)}))}function h(){return e()?.classList.contains("is-active")??!1}return{init:function(){console.log("UNTUCKit : Module : InlineCart : init"),d(),u()}}})();var re=n(7319);class ae{constructor(e,t,n){this.container=e,this.config=t,this.device=n}config;container;device;slides;buttons;rotationIntervalId=null;selectedSlideStore=(0,s.createState)(void 0);setupAc=new AbortController;swipeListenersAdded=!1;setup(){this.setupAc.abort(),this.setupAc=new AbortController,this.swipeListenersAdded=!1;const{signal:e}=this.setupAc;if(this.slides=Array.from(this.container.querySelectorAll(this.config.slideSelector||".js-utk-carousel-slide")),this.buttons=Array.from(this.container.querySelectorAll(this.config.buttonSelector||".js-utk-carousel-selection")),this.slides.length>1){console.log(`${this.constructor.name}: setting up carousel for ${this.device}`);const t=this.selectedSlideStore.subscribe(e=>{this.slides.forEach(t=>{t.dataset.id===e?t.classList.add("selected"):t.classList.remove("selected")}),this.buttons.forEach(t=>{t.dataset.id===e?t.classList.add("selected"):t.classList.remove("selected")})});e.addEventListener("abort",()=>t()),this.selectedSlideStore.set(this.slides[0].dataset.id),this.buttons.forEach(t=>{t.addEventListener("click",e=>{const t=e.currentTarget;t.classList.contains("selected")||(this.selectedSlideStore.set(t.dataset.id),this.resetRotation())},{signal:e})}),this.startRotation(),this.container.addEventListener("mouseenter",()=>this.stopRotation(),{signal:e}),this.container.addEventListener("mouseleave",()=>this.startRotation(),{signal:e});const n=(0,j.accessibilityEnabledListener)().subscribe(()=>this.stopRotation());e.addEventListener("abort",()=>n()),"mobile"!==this.device||this.swipeListenersAdded||this.addSwipeListeners(this.container,e)}else 1===this.slides.length&&(console.log(`GlobalBanner: setting up for one global banner for ${this.device}`),this.slides[0].classList.add("global-banner__banner--selected"))}reset(){this.debug("refreshing setup"),this.stopRotation(),this.setup()}getNextSlideId(e){const t=this.slides.findIndex(e=>e.classList.contains("selected"))+1*e,n=t===this.slides.length?0:-1===t?this.slides.length-1:t;return this.slides[n].dataset.id}stopRotation(){this.debug("stopping rotation"),null!==this.rotationIntervalId&&(clearInterval(this.rotationIntervalId),this.rotationIntervalId=null)}startRotation(){const e=this.config.rotation;if(!(0,j.preventAnimation)()&&null===this.rotationIntervalId&&(this.debug("starting rotation"),e)){const t=1e3*+e;this.rotationIntervalId=setInterval(()=>{this.selectedSlideStore.set(this.getNextSlideId(1))},t)}}resetRotation(){this.debug("resetting rotation"),this.stopRotation(),this.startRotation()}addSwipeListeners(e,t){this.debug("adding swipe listeners");let n=0,o=0;e.addEventListener("touchstart",e=>{this.debug("touchstart"),n=e.changedTouches[0].screenX},{passive:!0,signal:t}),e.addEventListener("touchend",e=>{if(this.debug("touchend"),o=e.changedTouches[0].screenX,Math.abs(n-o)<3)return;let t=1;o>n&&(t=-1),this.selectedSlideStore.set(this.getNextSlideId(t)),this.resetRotation()},{signal:t}),this.swipeListenersAdded=!0}debug(e){console.debug(`${this.constructor.name} ${this.device||""}: ${e}`)}}const ce=(()=>{console.log("UNTUCKit : Module : Nav : loaded");let e=!1;const t=()=>[document.documentElement,document.body];function n(){e&&(document.querySelector(".js-nav")?.classList.remove("is-active"),t().forEac
1h(e=>e.classList.remove("nav-opened")),document.querySelectorAll(".m-menu__checkbox").forEach(e=>{e.checked=!1}),e=!1)}function o(){e&&(n(),Z())}return{init:function(){console.log("UNTUCKit : Module : Nav : init"),function(){console.log("bindUIActions"),document.querySelector(".js-nav")?.addEventListener("touchmove",e=>{e.stopPropagation()}),document.querySelector(".js-show-nav")?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),document.querySelector(".nav-opened")?o():e||(t().forEach(e=>e.classList.add("nav-opened")),se(),document.querySelector(".js-nav")?.classList.add("is-active"),e=!0,J("mobile-nav"))}),document.addEventListener("click",function(e){const t=e.target;(0,U.getElementOrParentByClassName)(t,"js-hide-nav")&&o()}),(0,U.waitForElements)(".mobile-nav .js-utk-carousel").then(e=>function(e){Array.from(e).forEach(e=>{new ae(e,{rotation:e.dataset.rotation},"mobile").setup()})}(e)).catch(()=>{});const s=document.querySelector(".header__bottom-bar");U.headerTransition.subscribe(e=>{if(e){if(s){const e=s.offsetHeight;(0,U.updateBodyPaddingTop)(e),s.classList.add("header__bottom-bar--hidden")}}else s&&s.classList.remove("header__bottom-bar--hidden")}),G("mobile-nav").subscribe(()=>n());let i=0;window.addEventListener("resize",()=>{e&&((0,oe.isDesktop)()?o():(cancelAnimationFrame(i),i=requestAnimationFrame(se)))}),document.addEventListener("click",e=>{const t=e.target;(0,U.getElementOrParentByClassName)(t,"open_chat")&&t.closest(".mobile-nav")&&(e.preventDefault(),o());const n=(0,U.getElementOrParentByClassName)(t,"js-open-wishlist");n&&n.closest(".mobile-nav")&&(e.preventDefault(),(0,re.openWishlist)(),o())})}(),(0,re.renderWishlistCounter)()}}})();document.addEventListener("click",function(e){const t=(0,U.getElementOrParentByClassName)(e.target,"m-menu__toggle");if(t){const e=t.dataset.inputId;if(e){const t=document.getElementById(e);t&&(t.checked=!1)}}}),document.addEventListener("change",function(e){const t=e.target;t instanceof HTMLInputElement&&t.classList.contains("m-menu__checkbox--top-level")&&t.closest(".mobile-nav")&&t.checked&&document.querySelectorAll(".mobile-nav .m-menu__checkbox--top-level").forEach(e=>{e!==t&&(e.checked=!1)})}),document.addEventListener("click",function(e){const t=e.target,n=(0,U.getElementOrParentByClassName)(t,"header-actions__search-button-mobile");if(n){const e=document.querySelector(".header__mobile-search-form-container");if(e)if(n.classList.toggle("header-actions__search-button-mobile--active"),e.classList.toggle("header__mobile-search-form-container--open"),e.classList.contains("header__mobile-search-form-container--open")){e.removeAttribute("inert");const t=e.querySelector("input");t&&t.focus()}else e.setAttribute("inert","")}}),document.addEventListener("click",function(e){const t=e.target,n=(0,U.getElementOrParentByClassName)(t,"header-actions__search-button-desktop");if(n){const e=n.parentElement,t=e.querySelector(".header-actions__search-form-container");if(t)if(n.classList.toggle("header-actions__search-button-desktop--active"),t.classList.contains("header-actions__search-form-container--hidden")){t.classList.remove("header-actions__search-form-container--hidden"),t.removeAttribute("inert");const n=e.querySelector("search-form");if(n)n.setFocus();else{const t=e.querySelector("input");t&&t.focus()}}else document.dispatchEvent(new CustomEvent(te.SEARCH_CLOSE))}}),document.addEventListener(te.SEARCH_CLOSE,function(){const e=document.querySelector(".header-actions__search-form-container");e&&(e.classList.add("header-actions__search-form-container--hidden"),e.setAttribute("inert",""));const t=document.querySelector(".header-actions__search-button-desktop");t&&t.focus()});var le=n(1072);const de=(()=>{console.log("UNTUCKit : Module : CustomCheckbox : loaded");const e=e=>{if(!(e.currentTarget instanceof HTMLElement))return;if("keydown"===e.type){const t=e;if("Enter"!==t.code||13!==t.keyCode)return}const t=e.currentTarget.dataset.checkbox;if(!t)return;const n=document.getElementById(t);n instanceof HTMLInputElement&&(n.checked=!n.checked,e.currentTarget.classList.toggle("checkbox-placeholder--checked"))};return{init:()=>{console.log("UNTUCKit : Module : CustomCheckbox : init"),document.querySelectorAll(".js-checkbox-placeholder").forEach(t=>{t.parentElement?.addEventListener("click",e=>{e.preventDefault()}),t.addEventListener("click",e),t.addEventListener("keydown",e)})}}})();
1class ue extends HTMLElement{constructor(){super(),this.onclose=this.onClose.bind(this),this.closeButtonClick=this.onCloseButtonClick.bind(this)}dialog;onclose;closeButtonClick;contentObserver;contentReadyTimer;isClosing=!1;connectedCallback(){console.debug("dialog-wrapper connected");const e=document.getElementById("utk-main-dialog-template");e?(this.dialog=e.content.firstElementChild.cloneNode(!0),this.append(this.dialog),this.dialog.addEventListener("close",this.onclose),this.dialog.addEventListener("click",this.closeButtonClick),this.setupContentTransition()):console.error(`dialog template (${e}) not defined; unable to generate dialog`)}disconnectedCallback(){console.debug("dialog-wrapper disconnected"),this.dialog&&(this.dialog.removeEventListener("close",this.onclose),this.dialog.removeEventListener("click",this.closeButtonClick)),this.contentObserver?.disconnect(),window.clearTimeout(this.contentReadyTimer)}onClose(){this.remove()}onCloseButtonClick(e){const t=e.target;(0,U.getElementOrParentByClassName)(t,"main-dialog__close-button")&&(e.stopPropagation(),this.close())}setContent(...e){const t=this.getContentEl();t.classList.remove("is-content-ready"),t.append(...e)}showDialog(){this.openDialog(!1)}showModal(){this.openDialog(!0)}close(){if(this.isClosing)return;if((0,j.preventAnimation)())return void this.finishClose();this.isClosing=!0,this.dialog.classList.add("is-closing");const e=n=>{n.target===this.dialog&&("opacity"!==n.propertyName&&"transform"!==n.propertyName||(this.dialog.removeEventListener("transitionend",e),window.clearTimeout(t),this.finishClose()))};this.dialog.addEventListener("transitionend",e);const t=window.setTimeout(()=>{this.dialog.removeEventListener("transitionend",e),this.isClosing&&this.finishClose()},350)}getDialogEl(){return this.dialog}isOpen(){return this.dialog?.open}openDialog(e){e?(z.default.lock(),this.dialog.showModal()):this.dialog.show(),this.markContentReadyWhenVisible()}finishClose(){this.isClosing=!1,this.dialog.classList.remove("is-closing"),this.dialog.close(),document.querySelector("dialog[open]")||Q.get()!==X||z.default.unlock()}getContentEl(){return this.dialog.querySelector(".main-dialog__content")}setupContentTransition(){const e=this.getContentEl();this.contentObserver=new MutationObserver(()=>{!e.classList.contains("is-content-ready")&&e.childElementCount>0&&this.dialog.open&&this.markContentReadyWhenVisible()}),this.contentObserver.observe(e,{childList:!0})}markContentReadyWhenVisible(){const e=this.getContentEl();if(0===e.childElementCount)return;window.clearTimeout(this.contentReadyTimer);const t=(0,j.preventAnimation)()?0:75;this.contentReadyTimer=window.setTimeout(()=>{e.childElementCount>0&&e.classList.add("is-content-ready")},t)}}function he(e,t={}){return me("showModal",e,t)}function pe(e){const t=document.createElement("p");t.innerHTML=e,he(t,{classes:"simple-message"})}function me(e,t,n={}){const o=Array.isArray(t)?t:[t],s=document.createElement("dialog-wrapper");if((n.appendTo||document.body).append(s),n.classes){const e=Array.isArray(n.classes)?n.classes:[n.classes];s.getDialogEl().classList.add(...e)}return s.setContent(...o),s[e](),s}window.customElements.get("dialog-wrapper")||customElements.define("dialog-wrapper",ue);const ge="boost-pfs-filter-product-item-flip-image";class fe extends HTMLElement{constructor(){super(),this.addEventListener("click",async e=>{const t=e.target,n=(0,U.getElementOrParentByClassName)(t,"js-trigger-bis");if(n){const e=document.createElement("waitlist-form");e.setAttribute("variantId",n.dataset.variantId),e.setAttribute("productId",n.dataset.productId),e.setAttribute("title","We’ll notify you as soon as this item is available."),he([e])}})}connectedCallback(){this.isBoostFilterManaged()||(this.hydrateLazyImages(),this.initImageSwap())}isBoostFilterManaged(){return"function"==typeof window.boostSwapImage}hydrateLazyImages(){this.querySelectorAll("img[data-src]").forEach(e=>{e.dataset.src&&(e.src=e.dataset.src),e.dataset.srcset&&(e.srcset=e.dataset.srcset),e.removeAttribute("data-srcset"),e.removeAttribute("data-src")})}initImageSwap(){if(!(0,oe.isDesktop)()||!this.querySelector(".has-bc-swap-image"))return;const e=this.querySelector(".boost-pfs-filter-product-item-main-image[data-img-flip-src]");if(!e)return;const t=e.closest(".boost-pfs-filter-product-item-image-link");if(!t||t.querySelector(`.${ge}`))return;const n=e.dataset.imgFlipSrc;if(!n)return;const o=document.createElement("img");o.className=`${ge} lazyload Image--lazyLoad`,o.alt=e.alt,o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.dataset.sizes=e.dataset.sizes||"auto",e.dataset.widths&&(o.dataset.widths=e.dataset.widths);const s=e.dataset.imgFlipSrcset;s&&(o.srcset=s),o.src=n,t.appendChild(o)}}window.customElements.get("product-card")||customElements.define("product-card",fe);class ve extends HTMLElement{constructor(){super(),this.formSubmit=this.onSubmit.bind(this)}formEl;formSubmit;getFormEl(){return this.querySelector("form")}connectedCallback(){this.title=this.getAttribute("title")||"Your selected size & fit is currently unavailable. <br /> We'll notify you once it's back in stock",this.render(),this.getFormEl().addEventListener("submit",this.formSubmit)}disconnectedCallback(){this.getFormEl().removeEventListener("submit",this.formSubmit)}async onSubmit(e){e.preventDefault();const t=this.querySelector("#waitlist-form-email"),n=t?.value,o=this.querySelector("#waitlist-form-marketing-consent"),s={accepts_marketing:o?.checked||!1};n&&await function(e,t,n,o={}){return new Promise((s,i)=>{window.BIS?window.BIS.create(e,t,n,o).then(e=>
1{e.errors?(Object.values(e.errors).forEach(e=>{console.error(`BIS error: ${e}`)}),i(e.errors)):s()}):(console.warn("window.BIS not defined; unable to create email notification"),i())})}(n,+this.getAttribute("variantId"),+this.getAttribute("productId"),s).then(()=>{this.getFormEl().style.display="none",this.updateStatus("success")}).catch(e=>{let t="There was an error processing your request. Please try again later.";const n=e?.base||e?.email;n&&(t=n),this.updateStatus("error",t)})}updateStatus(e,t){const n=this.querySelector(".waitlist-form__status");n.dataset.status=e,n.textContent="success"===e?"Thank you! We’ll notify you as soon as this item is available.":"error"===e?t:""}render(){this.innerHTML=`\n    <div class="waitlist-form__container">\n      <p class="waitlist-form__title">${this.title}</p>\n      <form class="waitlist-form__form">\n        <div class="waitlist-form__email-container">\n          <label class="waitlist-form__label" for="waitlist-form-email">* Email Address</label>\n          <input class="waitlist-form__email-input" type="email" id="waitlist-form-email" required/>\n        </div>\n        <div class="waitlist-form__consent-container">\n          <input class="waitlist-form__checkbox" type="checkbox" id="waitlist-form-marketing-consent" checked>\n          <label class="waitlist-form__marketing-label" for="waitlist-form-marketing-consent">\n              Keep me updated on exclusive news and offers from UNTUCKit\n          </label>\n        </div>\n        <button class="button-v2 primary waitlist-form__submit" type="submit">Notify Me</button>\n      </form>\n      <p class="waitlist-form__status"></p>\n    </div>\n  `}}window.customElements.get("waitlist-form")||customElements.define("waitlist-form",ve);var be=n(1754);const we="debugRecSkeleton",_e="recommendations-carousel__slider--loading",ye="recommendations-carousel__slider--fading-out",Ce="recommendations-carousel__slider--pre-fade-in",Se={mediaQuery:"min",gap:"12px",perPage:2,arrows:!0,pagination:!1,padding:{right:"15%"},breakpoints:{[oe.TABLET_WIDTH]:{perPage:3},[oe.DESKTOP_WIDTH]:{destroy:!0}}},Ee=`\n  <h2 class="recommendations-carousel__title">${window.UNTUCKitConfig.inStockRecommendationTitle}</h2>\n  <section class="recommendations-carousel__slider ${_e}" aria-label="In-Stock Recommendations" aria-busy="true"></section>\n`;function Le(){return'\n    <div class="recommendations-carousel__skeleton-slide">\n      <div class="recommendations-carousel__skeleton">\n        <div class="recommendations-carousel__skeleton-image"></div>\n        <div class="recommendations-carousel__skeleton-info">\n          <div class="recommendations-carousel__skeleton-line recommendations-carousel__skeleton-line--name"></div>\n          <div class="recommendations-carousel__skeleton-line recommendations-carousel__skeleton-line--name-secondary"></div>\n          <div class="recommendations-carousel__skeleton-line recommendations-carousel__skeleton-line--price"></div>\n          <div class="recommendations-carousel__skeleton-line recommendations-carousel__skeleton-line--in-stock"></div>\n        </div>\n      </div>\n    </div>\n  '}function ke(){return new URLSearchParams(window.location.search).has(we)||"1"===sessionStorage.getItem(we)}function Ae(e,t){if(!ke()||!t)return;const n=t.querySelector(".recommendations-carousel__skeleton-slide, .splide__slide"),o=n?.getBoundingClientRect();console.info(`[recommendations-carousel:${e}]`,{sliderWidth:t.getBoundingClientRect().width,slideWidth:o?.width,slideHeight:o?.height,isLoading:t.classList.contains(_e)})}class Te extends HTMLElement{carousel;constructor(){super()}async connectedCallback(){this.innerHTML=Ee;const e=this.getSliderEl();var t;e.innerHTML=(t=(0,oe.isBelowDesktop)()?3:6,`<div class="recommendations-carousel__skeleton-track" aria-hidden="true">${Array.from({length:t},Le).join("")}</div>`),await function(e,t=100){return e.getBoundingClientRect().width>=t?Promise.resolve():new Promise(n=>{let o;const s=new ResizeObserver(e=>{(e[0]?.contentRect.width??0)>=t&&(s.disconnect(),window.clearTimeout(o),n())});s.observe(e),o=window.setTimeout(()=>{s.disconnect(),n()},1e3)})}(e),Ae("skeleton-ready",e),ke()&&(console.info(`[recommendations-carousel] Debug mode: skeleton held for 60s. Use ?${we}=1 or sessionStorage.setItem("${we}", "1")`),await new Promise(e=>window.setTimeout(e,6e4)));const n=this.getAttribute("size"),o=this.getAttribute("fit"),s=this.getAttribute("gender");try{let e=[];const t=this.getAttribute("productId"),i=await async function(e,t,n){const o=await async function(e,t){let n=`${window.Shopify.routes.root}recommendations/products.json?product_id=${[e]}`;t?.limit&&(n+=`&limit=${t.limit}`),t?.intent&&(n+=`&intent=${t.intent}`);const o=await fetch(n);if(!o.ok)throw new Error(`Failed to fetch Shopify recommendations: ${o.statusText}`);return(await o.json()).products}(e,{limit:10}),s=[];
1return t&&s.push({field:"size",value:t.toLowerCase()}),n&&s.push({field:"fit",value:n.toLowerCase()}),o.map(e=>{const t=s.reduce((t,n)=>({...t,[n.field]:e.options.find(e=>e.name.toLowerCase()===n.field)?.position||0}),{});if(!s.some(e=>t[e.field]>0))return e;const n=e.variants.find(e=>e.available&&s.every(n=>{const o=t[n.field];return 0===o||e.options[o-1]?.toLowerCase()===n.value}));return n?{...e,matched_variant_sku:n.sku}:e}).sort((e,t)=>(e.matched_variant_sku?-1:1)-(t.matched_variant_sku?-1:1))}(t,n,o);if(e=i?.slice(0,6).filter(e=>e.tags.includes(`department:${s}`)).map(e=>({url:e.url,image_url:e.featured_image,name:e.title,sku:e.matched_variant_sku,sale:e.compare_at_price?(0,U.withoutTrailingZeros)(e.price/100):"",original_price:(0,U.withoutTrailingZeros)((e.compare_at_price||e.price)/100),product_id:e.id,show_in_stock_message:!!e.matched_variant_sku})),!e?.length)return void this.displayError();const r=window.UNTUCKitConfig.cartCurrencySymbol,a=e.reduce((e,t)=>{let n=t.url;t.sku&&(n=`${t.url}${t.url.includes("?")?"&":"?"}sku=${t.sku}`);const o=`${r}${t.sale}`,s=`${r}${t.original_price}`,i=`${t.image_url}${t.image_url.includes("?")?"&":"?"}width=280`,a=(0,U.createSrcset)(t.image_url,[280,400,600]);return e+`\n            <li class="splide__slide recommendations-carousel__slide">\n              <a href="${n}">\n                <img class="recommendations-carousel__image" width="140" height="167" alt="${t.name}" src="${i}" srcset="${a}" sizes="(min-width: 1024px) 140px, (min-width: 768px) calc(28vw - 8px), calc(42.5vw - 6px)"/>\n                <div class="recommendations-carousel__info">\n                  <p class="recommendations-carousel__name">${t.name}</p>\n                  <p class="recommendations-carousel__price" data-product-id="${t.product_id}">\n                    <span class="recommendations-carousel__regular-price ${t.sale?"recommendations-carousel__regular-price--sale":""}" aria-label="regular price ${s}">${s}</span>\n                    <span class="recommendations-carousel__sale-price ${t.sale?"":"ADA__visually-hidden"}" aria-label="sale price ${o}">${o}</span>\n                    ${t.show_in_stock_message?'<p class="recommendations-carousel__in-stock-message"><span class="inventory-level__indicator inventory-level__indicator--inStock" aria-hidden="true"></span>In Your Size</p>':""}\n                  </p>\n                </div>\n              </a>\n            </li>\n          `},"");await this.revealRecommendations(a)}catch(e){console.error(e),this.displayError()}}disconnectedCallback(){this.destroyCarousel()}displayError(e="Sorry, we're unable to provide recommendations at the moment."){this.destroyCarousel();const t=this.getSliderEl();t&&(t.classList.remove(_e,ye,Ce),t.innerHTML=`<p class="recommendations-carousel__error-message">${e}</p>`,t.removeAttribute("aria-busy"))}getSliderEl(){return this.querySelector(".recommendations-carousel__slider")}async revealRecommendations(e){const t=this.getSliderEl();var n;(0,j.preventAnimation)()||(t.classList.add(ye),await(n=t,new Promise(e=>{const t=()=>{n.removeEventListener("transitionend",o),window.clearTimeout(s),e()},o=e=>{e.target===n&&"opacity"===e.propertyName&&t()};n.addEventListener("transitionend",o);const s=window.setTimeout(t,300)}))),t.classList.remove(_e),t.classList.add("splide"),t.innerHTML=`\n      <div class="splide__track">\n        <ul class="splide__list">${e}</ul>\n      </div>\n    `,this.mountCarousel(),await new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>e())})}),this.carousel?.refresh(),t.removeAttribute("aria-busy"),Ae("loaded",t),(0,j.preventAnimation)()||(t.classList.add(Ce),t.classList.remove(ye),t.offsetHeight,t.classList.remove(Ce))}mountCarousel(){const e=this.querySelector(".splide");this.carousel=new be.default(e,Se).mount()}destroyCarousel(){this.carousel&&(this.carousel.destroy(),this.carousel=void 0)}}window.customElements.get("recommendations-carousel")||customElements.define("recommendations-carousel",Te);const Ie="added",$e="not-added";class Me extends HTMLElement{constructor(){super()}productId;button;connectedCallback(){this.innerHTML='\n  <button type="button" class="product__add-wishlist-button js-add-wishlist-product" data-status="not-added">\n    <span class="product__add-wishlist-icon" aria-hidden="true"></span>\n    <span class="ADA__visually-hidden">Add to Wishlist</span>\n  </button>\n',this.productId=+this.getAttribute("product-id"),this.button=this.querySelector(".js-add-wishlist-product"),this.button.addEventListener("click",()=>this.handleClick()),(0,re.whenWishlistLoaded)().then(()=>(0,re.isProductInWishlist)(this.productId)).then(e=>{this.setWishlistStatus(e)})}handleClick(){if(this.button.dataset.status===$e){const e={epi:+this.getAttribute("variant-id"),empi:this.productId,du:this.getAttribute("product-url")};(0,re.addProductToWishlist)(e).then(()=>this.setWishlistStatus(!0))}else this.button.dataset.status===Ie&&(0,re.removeProductFromWishlist)(this.productId).then(()=>this.setWishlistStatus(!1))}setWishlistStatus(e){const t=e?Ie:$e;this.button.dataset.status=t,this.button.setAttribute("aria-pressed",e?"true":"false")}}window.customElements.get("wishlist-button")||customElements.define("wishlist-button",Me);const xe=new RegExp("{inventory}".replace(/[{}]/g,"\\$&"),"g");class qe extends HTMLElement{static get observedAttributes(){return["display","level","inventory-quantity","is-final-sale"]}constructor(){super()}el;connectedCallback(){this.innerHTML='\n  <div class="inventory-level__container hidden"></div>\n',this.el=this.querySelector(".inventory-level__container")}attributeChangedCallback(e,t,n){if(this.el&&t!==n)switch(e){case"display":this.updateDisplay(n);break;case"level":this.updateLevel(n);break;case"inventory-quantity":case"is-final-sale":this.getAttribute("level")&&this.updateLevel(this.getAttribute("level"))}}updateDisplay(e){"show"===e?this.el.classList.remove("hidden"):this.el.classList.add("hidden")}updateLevel(e){if(e){const t=["inventory-level__text","lowStock"===e&&"true"===this.getAttribute("is-final-sale")?"inventory-level__text--final-sale-low-stock":""].filter(
1Boolean).join(" ");this.el.innerHTML=`<span class="inventory-level__indicator inventory-level__indicator--${e}" aria-hidden="true"></span><span class="${t}">${this.getInventoryLevelText(e)}</span>`}else this.el.innerHTML=""}getInventoryLevelText(e){const t=window.productUi?.inventoryLevels?.[e]??"",n=this.getAttribute("inventory-quantity"),o=null===n||""===n?void 0:Number(n),s=Number.isNaN(o)?void 0:o,i=void 0===s?"":String(s);return t.replace(xe,i)}}function Pe(e){const t=e.querySelector("img");if(!t)return()=>{};const n=t.getAttribute("data-src")||t.currentSrc||t.src;if(!n)return()=>{};const o=document.createElement("img");o.setAttribute("role","presentation"),o.alt="",o.className="zoomImg";const s=e.style.position,i=e.style.overflow;let r=()=>{};return o.onload=()=>{const t=getComputedStyle(e).position;let n,s,i,a,c,l;function d(){n=e.offsetWidth,s=e.offsetHeight,i=(o.naturalWidth-n)/n,a=(o.naturalHeight-s)/s;const t=e.getBoundingClientRect();c=t.left+window.scrollX,l=t.top+window.scrollY}function u(e,t){const r=Math.max(Math.min(e-c,n),0),d=Math.max(Math.min(t-l,s),0);o.style.left=r*-i+"px",o.style.top=d*-a+"px"}function h(e,t){d(),u(e,t),o.style.opacity="1"}function p(){o.style.opacity="0"}e.style.position=/(absolute|fixed)/.test(t)?t:"relative",e.style.overflow="hidden",Object.assign(o.style,{position:"absolute",top:"0",left:"0",opacity:"0",width:`${o.naturalWidth}px`,height:`${o.naturalHeight}px`,border:"none",maxWidth:"none",maxHeight:"none",transition:"opacity 120ms",pointerEvents:"none"}),e.appendChild(o);let m=!1;const g=e=>h(e.pageX,e.pageY),f=()=>p(),v=e=>u(e.pageX,e.pageY),b=e=>{e.preventDefault();const t=e.touches[0]??e.changedTouches[0];m?(m=!1,p()):(m=!0,h(t.pageX,t.pageY))},w=e=>{e.preventDefault();const t=e.touches[0]??e.changedTouches[0];u(t.pageX,t.pageY)},_=e=>{e.preventDefault(),m&&(m=!1,p())};e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",f),e.addEventListener("mousemove",v),e.addEventListener("touchstart",b,{passive:!1}),e.addEventListener("touchmove",w,{passive:!1}),e.addEventListener("touchend",_,{passive:!1}),r=()=>{e.removeEventListener("mouseenter",g),e.removeEventListener("mouseleave",f),e.removeEventListener("mousemove",v),e.removeEventListener("touchstart",b),e.removeEventListener("touchmove",w),e.removeEventListener("touchend",_)},d()},o.src=n,()=>{o.onload=null,r(),o.remove(),e.style.position=s,e.style.overflow=i}}window.customElements.get("inventory-level")||customElements.define("inventory-level",qe);const Oe={pagination:!1,mediaQuery:"min",arrows:!1},De={[oe.DESKTOP_WIDTH]:{destroy:!0}};class Ue extends HTMLElement{constructor(){super(),this.addEventListener("click",e=>{e.target.classList.contains("product__media--nav")&&(0,R.emitShopifyEvent)("untuckit:product_image_interaction",{interactionType:"thumbnail_click"})}),this.addEventListener("mouseover",e=>{const t=e.target;t.closest(".product__media-slider--main")&&"IMG"===t.nodeName&&(0,R.emitShopifyEvent)("untuckit:product_image_interaction",{interactionType:"main_image_hover"})})}main;nav;onShowVideos=this.handleShowVideos.bind(this);zoomCleanups=[];connectedCallback(){console.log("product-main-images connected");const e=this.getAttribute("mode"),t=this.getImageConfigByMode(e);this.main=new be.default("#product-media-main",t.main),this.nav=new be.default("#product-media-nav",t.nav),this.main.sync(this.nav),this.main.mount(),this.nav.mount();const n=document.querySelector(".product__media-container");n&&n.classList.contains("product__media-container--one-image")&&(this.main.destroy(),this.nav.destroy());const o=document.querySelectorAll("#product-media-main .splide__slide--image");(0,oe.isDesktop)()&&o.length>1&&(this.zoomCleanups=Array.from(o).map(Pe)),window.addEventListener("product:showVideos",this.onShowVideos)}disconnectedCallback(){console.log("product-main-images disconnected"),this.main&&this.main.destroy(),this.nav&&this.nav.destroy(),this.zoomCleanups.forEach(e=>e()),this.zoomCleanups=[],window.removeEventListener("product:showVideos",this.onShowVideos)}handleShowVideos(){console.log("showing videos"),this.querySelectorAll(".splide__slide--video").forEach(e
1=>{e.classList.remove("hidden"),e.classList.add("splide__slide")}),this.main.add(".splide__slide--video"),this.nav.add(".splide__slide--video")}getImageConfigByMode(e){switch(e){case"pdp":return{main:{...Oe,gap:"12px",type:"loop",padding:"10vw",breakpoints:{...De,[oe.TABLET_WIDTH]:{type:"slide",padding:"0",autoWidth:!0,gap:"24px"}}},nav:{...Oe,autoWidth:!0,perPage:6,isNavigation:!0,breakpoints:De}};case"quickshop":return{main:{...Oe},nav:{...Oe,gap:"6px",autoWidth:!0,perPage:6,isNavigation:!0}};default:console.error(`unknown mode ${e}; unable to determine main image config`)}}}window.customElements.get("product-main-images")||customElements.define("product-main-images",Ue);class Ne extends HTMLElement{static get observedAttributes(){return["cart-line-item-data","recommendation-parameters"]}async renderCartLineItemData(e){const t=JSON.parse(e),n=(await(0,ne.fetchAdditionalProductVariantInfo)([t.variant_id],{badgePrefix:"badge-cart:"}))[t.variant_id],o=n?{...t,...n}:t,s=(0,ne.createCartLineItem)(o,{showQuantity:!1,actionsType:"add-to-cart-overlay",styleClass:"atc-overlay__cart-line-item"});this.querySelector(".atc-overlay__cart-line-item-skeleton").replaceWith(s)}constructor(){super(),this.addEventListener("click",e=>{e.target.classList.contains("view-cart")&&window.UNTUCKitConfig.postAddToCartViewCartToInlineCartToggle&&(e.preventDefault(),(0,U.showInlineCart)(),this.closest(".main-dialog").querySelector(".main-dialog__close-button").click())})}connectedCallback(){R.dialogStack.push("post-add-to-cart")}disconnectedCallback(){R.dialogStack.pop("post-add-to-cart")}async attributeChangedCallback(e,t,n){if(t!==n)switch(e){case"cart-line-item-data":{this.render();const e=document.getElementById("utk-checkout-cta-template");if(!e)return void console.error("No existing checkout button template found; cannot render");this.querySelector("form").append(e.content.firstElementChild.cloneNode(!0)),await this.renderCartLineItemData(n);break}case"recommendation-parameters":{const e=JSON.parse(n),t=document.createElement("recommendations-carousel");t.classList.add("atc-overlay__recommendations"),Object.entries(e).forEach(e=>{const[n,o]=e;t.setAttribute(n,o)}),this.querySelector(".atc-overlay__additional-content").append(t);break}}}render(){this.innerHTML=`\n      <div>\n        <h2 class="atc-overlay__header">\n          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true">\n            <g clip-path="url(#clip0_405_3941)">\n              <path d="M12 0C5.376 0 0 5.376 0 12C0 18.624 5.376 24 12 24C18.624 24 24 18.624 24 12C24 5.376 18.624 0 12 0ZM9.6 18L3.6 12L5.292 10.308L9.6 14.604L18.708 5.496L20.4 7.2L9.6 18Z" fill="#24882D"/>\n            </g>\n            <defs>\n              <clipPath id="clip0_405_3941">\n                <rect width="24" height="24" fill="white"/>\n              </clipPath>\n            </defs>\n          </svg>\n          Item Added to the Cart\n        </h2>\n        <div class="atc-overlay__content">\n          <div class="atc-overlay__main-container">\n            <div class="atc-overlay__cart-line-item-skeleton"></div>\n            <div class="atc-overlay__action-container">\n              <form action="/checkout" method="post"></form>\n              <a href="/cart" class="button cart-ctas__view-cart view-cart">View Cart</a>\n              ${document.getElementById("tiered-progress-data")?"<cart-progress-tiers></cart-progress-tiers>":'<cart-progress class="cart-progress--center"></cart-progress>'}\n            </div>\n          </div>\n          <div class="atc-overlay__additional-content"></div>\n        </div>\n      </div>`}}window.customElements.get("add-to-cart-overlay")||customElements.define("add-to-cart-overlay",Ne);class He extends HTMLElement{constructor(){super(),this.addEventListener("change",this.handleOptionChanged),this.windowClick=this.onWindowClick.bind(this)}windowClick;id;connectedCallback(){this.id=this.querySelector(".product-option-dropdown__select")?.id,window.addEventListener("click",this.windowClick),this.querySelector(".product-option-dropdown__select-button").addEventListener("click",e=>{const t=e.target;this.querySelector(".product-option-dropdown__select")?.classList.toggle("active"),t.setAttribute("aria-expanded","true"===t.getAttribute("aria-expanded")?"false":"true")})}disconnectedCallback(){window.removeEventListener("click",this.windowClick)}handleOptionChanged(e){console.debug("ProductOptionDropdown handleOptionChanged",e.target);const t=e.target;this.querySelector(".product-option-dropdown__select")?.classList.remove("active");const n=new CustomEvent("dropdown:valueChanged",{detail:{[t.name]:t.value},bubbles:!0});this.dispatchEvent(n)}onWindowClick(e){const t=e.target;t.id===this.firstElementChild.id||t.closest(`#${this.firstElementChild.id}`)||(this.querySelector(".product-option-dropdown__select")?.classList.remove("active"),this.querySelector(".product-option-dropdown__select-button")?.setAttribute("aria-expanded","fal
1se"))}}window.customElements.get("product-option-dropdown")||customElements.define("product-option-dropdown",He);var Be=n(7803);const Re=void 0,je={fit:Be.FIT_FINDER_TO_FIT,size:Be.FIT_FINDER_TO_SIZE};function Fe(e){return Object.entries(e).map(e=>{const[t,n]=e,o=je[t];if(n){if(!o)return{[t]:n};{const e=o.get(n)||n.charAt(0).toUpperCase()+n.replace(/-/g," ").slice(1);if(e)return{[t]:e}}}}).reduce((e,t)=>({...e,...t}),{})}function Ke(e){return Object.values(e).reduce((e,t)=>e&&!!t,!0)}function We(e){return"true"!==e.hideVariant}function Ve(e,t,n,o){const s=(0,U.removeFalsy)({...o,[t]:n});return Object.entries(s).reduce((t,n)=>{const[o,s]=n;return t&&e.optionsMap[o]===s},!0)}class ze extends HTMLElement{constructor(){super()}productId;selectedVariantStore;selectedOptionsStore;teardown;connectedCallback(){this.productId=this.getAttribute("product-id");const e=window[`initialDefaultSelections${this.productId}`];this.selectedOptionsStore=(0,s.createState)(e),this.selectedVariantStore=(0,s.createState)(void 0);const t=[];t.push(this.selectedOptionsStore.subscribe(e=>{if(e)if(console.log(`selected options for ${this.productId}`,e),this.updateProductOptionsDisplay(e),Ke(e)){const t=this.getProductVariantsFromOptions(e)[0]||null;this.selectedVariantStore.set(t)}else this.selectedVariantStore.set(Re)})),t.push(this.selectedVariantStore.subscribe(e=>{console.log(`selected variant for ${this.productId}`,e);const t=this.querySelector(".product__cta");t&&(e?.available?(t.removeAttribute("disabled"),t.textContent=window.productUi.ctas.addCart):(t.setAttribute("disabled","true"),e&&!e.available?t.textContent=window.productUi.ctas.outOfStock:t.textContent=null===e?window.productUi.ctas.unavailable:window.productUi.ctas.addCart))}));const n=e=>{const t=e.detail;this.selectedOptionsStore.set({...this.selectedOptionsStore.get()||{},...t})};this.addEventListener("dropdown:valueChanged",n);const o=this.querySelector("form"),r=e=>{const t=e.target;if(e.preventDefault(),t.checkValidity()){const e=this.selectedVariantStore.get();(0,i.addToCart)({items:[{id:e.variantID,quantity:1}]}).then(e=>this.handleAddToCart(e)).catch(e=>{console.error(e)})}};o&&o.addEventListener("submit",r),this.teardown=()=>{t.forEach(e=>e()),this.removeEventListener("dropdown:valueChanged",n),o&&o.removeEventListener("submit",r)}}disconnectedCallback(){this.teardown?.(),this.teardown=void 0}getProductVariantsFromOptions(e){return this.getVariants().filter(t=>Object.entries(e).filter(e=>!!e[1]).reduce((e,n)=>{const[o,s]=n;return e&&t.optionsMap[o]===s},!0))}updateProductOptionsDisplay(e){this.querySelectorAll(".product-option-dropdown__item-input").forEach(t=>{const n=t.nextElementSibling;n.classList.remove("product-option-dropdown__item-label--out-of-stock","product-option-dropdown__item-label--unavailable");const o=t.id.split("-")[1],s=t.value;let i=null;e[o]===s&&(i=t.closest("product-option-dropdown").querySelector(".product-option-dropdown__selected-value"),i.classList.remove("product-option-dropdown__selected-value--out-of-stock","product-option-dropdown__selected-value--unavailable"),i.textContent=n.querySelector(".product-option-dropdown__label-value").textContent);const r=this.getAssociatedVariants(o,s,e);r.length?r.find(e=>e.available)||(n.classList.add("product-option-dropdown__item-label--out-of-stock"),i&&i.classList.add("product-option-dropdown__selected-value--out-of-stock")):(n.classList.add("product-option-dropdown__item-label--unavailable"),i&&i.classList.add("product-option-dropdown__selected-value--unavailable"))})}getAssociatedVariants(e,t,n){return this.getVariants().filter(o=>Ve(o,e,t,n))}getVariants(){return window[`variantsArray${this.productId}`].filter(We)}handleAddToCart(e){if(window.UNTUCKitConfig.showAddToCartOverlay)if(e?.items?.length){const t=document.createElement("add-to-cart-overlay");t.setAttribute("cart-line-item-data",JSON.stringify(e.items[0]));const n=this.selectedVariantStore.get(),o=n.originalOptionsMap??n.optionsMap,s=Fe({fit:o.fit,size:o.size,gender:window.productDepartment,sku:n.sku,productId:`${this.productId}`});t.setAttribute("recommendation-parameters",JSON.stringify(s)),he([t],{classes:"add-to-cart-overlay"})}else console.error("item added to cart successfully but no data returned");else(0,U.showInlineCart)()}}window.customElements.get("product-secondary")||customElements.define("product-secondary",ze);class Xe extends HTMLElement{dialogWrapper;constructor(){super(),this.addEventListener("click",e=>{const t=e.target;(0,U.getElementOrParentByClassName)(t,"tooltip__button")&&(this.dialogWrapper&&this.dialogWrapper.isOpen()?this.closePopover():this.showPopover())})}connectedCallback(){this.render()}showPopover(){const e=["popup-header","popup-body"].map(e=>{const t=this.getAttribute(e);
1if(t){const n=e.split("-")[1],o=document.createElement("p");return o.classList.add(`tooltip__popup-${n}`),o.textContent=t,o}}).filter(e=>!!e);this.dialogWrapper=function(e,t={}){return me("showDialog",e,t)}(e,{classes:["tooltip__dialog"],appendTo:this})}closePopover(){this.dialogWrapper&&this.dialogWrapper.close()}render(){const e=this.getAttribute("tooltip-color");this.innerHTML=`\n      <button type="button" class="tooltip__button" style="${e?`background-color: ${e}`:""}">\n        <span class="tooltip__icon" aria-hidden="true">i</span>\n        <span class="ADA__visually-hidden">More information</span>\n      </button>\n    `}}window.customElements.get("tooltip-popup")||customElements.define("tooltip-popup",Xe);const Ye=/\d*\.?\d+/gm;class Qe extends HTMLElement{static get observedAttributes(){return["selected-id","measurement-system"]}constructor(){super(),this.addEventListener("click",e=>{const t=e.target;(0,U.getElementOrParentByClassName)(t,"size-guide__size-button")&&this.setAttribute("selected-id",t.dataset.id)}),this.addEventListener("change",e=>{const t=e.target;this.setAttribute("measurement-system",t.value)}),this.querySelectorAll("td").forEach(e=>{const t=e.textContent.trim();e.setAttribute("imperial-value",t);const n=function(e,t){return t?e:e.replace(Ye,e=>(2.54*+e).toFixed(1))}(t,e.hasAttribute("data-prevent-toggle"));e.setAttribute("metric-value",n)})}connectedCallback(){const e=this.querySelector(`input[value=${this.getAttribute("measurement-system")}]`);e&&(e.checked=!0),R.dialogStack.push("size-guide")}disconnectedCallback(){R.dialogStack.pop("size-guide")}attributeChangedCallback(e,t,n){if(t!==n)switch(e){case"selected-id":this.updateTableDisplay(n);break;case"measurement-system":this.handleMeasurementChange(n)}}updateTableDisplay(e){this.querySelectorAll(".size-guide__size-button").forEach(t=>{t.dataset.id===e?t.classList.add("size-guide__size-button--selected"):t.classList.remove("size-guide__size-button--selected")}),this.querySelectorAll(".size-guide__table").forEach(t=>{t.dataset.id===e?t.classList.remove("hidden"):t.classList.add("hidden")})}handleMeasurementChange(e){console.log("size guide: handle measurement change",e),this.querySelectorAll("td").forEach(t=>t.textContent=t.getAttribute(`${e}-value`))}}window.customElements.get("size-guide")||customElements.define("size-guide",Qe);var Ge,Ze=n(2404);!function(e){e.CTA_ADD_CART="addCart",e.CTA_SHOP_SIMILAR="shopSimilar",e.CTA_NOTIFY_ME="notifyMe",e.CTA_NOTIFY_ME_BACK_IN_STOCK_POPUP="notifyMeBackInStockPopup"}(Ge||(Ge={}));const Je="color";var et;!function(e){e.ALL="all",e.EXPEDITED="expedited"}(et||(et={}));class tt extends HTMLElement{constructor(){super()}selectedProductIdStore;teardownProductMain;connectedCallback(){console.log("product-main connected");const e=new AbortController,{signal:t}=e,n=(0,s.createState)(void 0);this.selectedProductIdStore=(0,s.createState)(window.productId);const o=this.getAttribute("mode"),r=this.getAttribute("type"),a=new URLSearchParams(window.location.search),c=a.get("sku"),l=+a.get("variant");let d=null;c?d=nt().find(e=>e.sku===c):l&&(d=nt().find(e=>e.variantID===l));const u=function(e){const t=new URLSearchParams(e),n={};return Object.keys(window.initialDefaultSelections).forEach(e=>{t.has(e)&&(n[e]=t.get(e))}),n}(window.location.search),h={...window.initialDefaultSelections,...u};let p=window.initialDefaultSelections;d?p=d.optionsMap:it(st(h,this.selectedProductIdStore.get()),this.selectedProductIdStore.get()).length&&(p=h),p=st(p,this.selectedProductIdStore.get());const m=(0,s.createState)(p),g=this.querySelector(".product__expedited-options-toggle"),f=g?.querySelector(".js-expedited-options-switch"),v=this.shouldShowExpeditedOptionsToggle(this.selectedProductIdStore.get());let b=et.ALL;v&&(b=f?.checked?et.EXPEDITED:et.ALL);const w=()=>v?b:et.ALL;g&&v&&g.classList.remove("hidden");const _=[];if(_.push(m.subscribe(e=>{if(!e)return;console.log("selected options",e);const t=st(e,this.selectedProductIdStore.get());if(this.updateProductOptionsDisplay(e,r),this.applyExpeditedOptionsFilter(w(),t,this.selectedProductIdStore.get()),Ke(t)){const e=it(t,this.selectedProductIdStore.get())[0];n.set(e)}else n.set(Re);ct()})),_.push(n.subscribe(e=>{let t;console.log("selected variant",e),e?this.setAttribute("selected-variant",JSON.stringify(e)):this.removeAttribute("selected-variant");const n=this.querySelector("inventory-level");n&&(n.setAttribute("level",""),n.removeAttribute("inventory-quantity"),n.removeAttribute("is-final-sale")),e?(e.available?t=[Ge.CTA_ADD_CART]:(t=[Ge.CTA_SHOP_SIMILAR],e.isFinalSale||t.push(Ge.CTA_NOTIFY_ME)),n&&(n.setAttribute("display","show"),n.setAttribute("inventory-quantity",String(e.inventoryQuantity)),n.setAttribute("level",e.inventoryLevel),e.isFinalSale?n.setAttribute("is-final-sale","true"):n.removeAttribute("is-final-sale"))):"true"===this.getAttribute("is-coming-soon")?t=[Ge.CTA_NOTIFY_ME_BACK_IN_STOCK_POPUP]:(t=[Ge.CTA_ADD_CART],n&&n.setAttribute("display","hide"));const o=this.querySelector(".product__standard-shipping-only-message");if(e?.standardShippingOnly?o?.classList.remove("hidden"):o?.classList.add("hidden"),this.updateProductCtas(t),window.storeAvailability){const t=this.querySelector(".product__store-availability-message");if(t){const n=t.dataset.storeName||"the store",o=t.dataset.storePhone||null,s=(0,Ze.toRawPhoneNumber)(o)||null,i=(0,Ze.transformStorePhone)(o)||null;let r=window.productUi.storeInventory.noVariantSelected,a=!1;if(e){r=window.productUi.storeInventory.productOutOfStock;const t=window.storeAvailability.atp[e.sku];t>0&&t<=window.productUi.storeInventory.inStoreLowInventoryThreshold?(r=window.productUi.storeInventory.productLowStock,a=!0):t>window.productUi.storeInventory.inStoreLowInventoryThreshold&&(r=window.productUi.storeInventory.productInStock)}let c=r.replace("{storeName}",n);a&&(c=s&&i?`${c} <span class="product__store-availability-call-to-confirm product__store-availability-call-to-confirm--mobile">${window.productUi.storeInventory.callToConfirmMobile.replace("{rawPhone}",s)}</span><span class="product__store-availability-call-to-confirm product__store-availability-call-to-confirm--desktop">${window.productUi.storeInventory.callToConfirmDesktop.replace("{rawPhone}",s).replace("{displayPhone}",i)}</span>`:`${c} ${window.productUi.storeInventory.callToConfirmNoPhone}`);const l=!0===window.UNTUCKitConfig?.nearbyToggle?.selectMyStoreFunctionalityToggle&&"true"!==this.getAttribute("under_store_collection");t.innerHTML=l?`${c} <a href="/pages/store-locator" class="product__store-availability-change-store-link">Change your store</a>`:c}}})),w()===et.EXPEDITED){const e=m.get(),t=this.clearExpeditedFilteredSelections(w(),e,this.selectedProductIdStore.get());t!==e&&m.set(t)}const y=()=>{const e=document.createElement("recommendations-carousel"),t=n.get(),o=t.originalOptionsMap??t.optionsMap,s=Fe({fit:o.fit,size:o.size,gender:window.productDepartment,sku:t.sku,productId:`${this.selectedProductIdStore.get()}`});
1return Object.entries(s).forEach(t=>{const[n,o]=t;e.setAttribute(n,o)}),e},C=e=>{if(window.UNTUCKitConfig.showAddToCartOverlay)if(e?.items?.length){const t=document.createElement("add-to-cart-overlay");t.setAttribute("cart-line-item-data",JSON.stringify(e.items[0]));const o=n.get(),s=o.originalOptionsMap??o.optionsMap,i=Fe({fit:s.fit,size:s.size,gender:window.productDepartment,sku:o.sku,productId:`${this.selectedProductIdStore.get()}`});t.setAttribute("recommendation-parameters",JSON.stringify(i)),he([t],{classes:"add-to-cart-overlay"})}else console.error("item added to cart successfully but no data returned");else(0,U.showInlineCart)();S()},S=()=>{if("quickshop"===o){const e=new CustomEvent(te.QUICKSHOP_CLOSE);window.dispatchEvent(e)}};this.addEventListener("click",e=>{const t=e.target,s=t.dataset.productUrl;if(s&&this.selectedProductIdStore.get()!==+t.dataset.productId)if("quickshop"===o){const e=new CustomEvent(te.QUICKSHOP_REFRESH,{detail:{handle:t.dataset.productUrl.split("/").slice(-1)[0]}});window.dispatchEvent(e)}else{const e=(a=m.get(),Object.entries(a).filter(e=>{const[t,n]=e;return t!==Je&&!!n}).reduce((e,t)=>{const[n,o]=t;return`${e}${e?"&":""}${n}=${o}`},""));location.href=`${s}?${e}`}else{var a;if(t.matches(".js-product-option:not([data-product-url])")){const{optionName:e,optionValue:n}=t.dataset,o=function(e,t,n){return!e.dataset.productUrl&&t===n}(t,m.get()[e],n)?void 0:n;return o&&(0,R.emitShopifyEvent)("untuckit:product_option_selected",{optionName:e,optionValue:o}),void m.set({...m.get()||{},[e]:o})}if((0,U.getElementOrParentByClassName)(t,"product__open-size-guide")){const e=document.getElementById("product-size-guide");return void(e&&he([e.content.cloneNode(!0).firstElementChild],{classes:"size-guide"}))}if(t.classList.contains("js-product-cta")){const e=t.dataset.action;switch(e){case Ge.CTA_ADD_CART:{const e=n.get();if(e)if("bundle"===r){const t=Object.values(window.bundleVariantGroups).map(t=>t.find(t=>Object.keys(e.optionsMap).every(n=>t.optionsMap[n]===e.optionsMap[n]))).map(e=>({id:e.variantID,quantity:1}));(0,i.addToCart)({items:t}).then(e=>{console.log("addItemsToCart",e),(0,U.showInlineCart)(),S()})}else{const t={},n=document.getElementById("gift-card-recipient-email");if(n){const e=n.value;if(!n.checkValidity())return void lt(e?"Please enter a valid email address.":"Please enter an email address.");t["Recipient email address"]=e,t["_gct-id"]=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ct()}(0,i.addToCart)({items:[{id:e.variantID,quantity:1,properties:t}]}).then(C).catch(e=>{console.error(e)})}else lt(function(e){const t=Object.entries(e).filter(e=>!e[1]);let n="Please select all options.";if(t.length&&t.length<=2){const e=t.reduce((e,t)=>{const[n]=t;return e+`${e?" and ":""}${n.replace("-"," ")}`},"");n=`Please select ${e.indexOf("and")>-1?"both":["a","e","i","o","u"].indexOf(e[0])>-1?"an":"a"} ${e}.`}return n}(st(m.get(),this.selectedProductIdStore.get())));break}case Ge.CTA_NOTIFY_ME:{const e=document.createElement("waitlist-form"),t=n.get();e.setAttribute("variantId",`${t.variantID}`),e.setAttribute("productId",`${t.productId}`);const o="true"===this.getAttribute("is-coming-soon")?window.productUi.waitlist.comingSoon:window.productUi.waitlist.default;e.setAttribute("title",o);const s=[e];(0,oe.isMobile)()||s.push(y()),he(s);break}case Ge.CTA_NOTIFY_ME_BACK_IN_STOCK_POPUP:ot(n.get());break;case Ge.CTA_SHOP_SIMILAR:he([y()]);break;default:console.error(`unable to determine action for cta click: ${e}`)}return}(0,U.getElementOrParentByClassName)(t,"js-back-in-stock-popup")?ot(n.get()):(0,U.getElementOrParentByClassName)(t,"single-tab__button")&&(0,R.emitShopifyEvent)("untuckit:product_detail_tab_clicked",{tabName:t.textContent.trim()})}},{signal:t}),f?.addEventListener("change",()=>{b=f.checked?et.EXPEDITED:et.ALL;const e=w();this.updateExpeditedToggleDisplay(e);const t=m.get(),n=this.clearExpeditedFilteredSelections(e,t,this.selectedProductIdStore.get());n!==t?m.set(n):this.applyExpeditedOptionsFilter(e,st(t,this.selectedProductIdStore.get()),this.selectedProductIdStore.get())},{signal:t});const E=this.querySelector(".product__full-details-link");E&&window.collectionHandle&&window.productHandle&&(E.href=`/collections/${window.collectionHandle}/products/${window.productHandle}`),this.teardownProductMain=()=>
1{_.forEach(e=>e()),e.abort()}}disconnectedCallback(){console.log("product-main disconnected"),this.teardownProductMain?.(),this.teardownProductMain=void 0}updateProductCtas(e){console.log("updating product ctas",e);const t=this.querySelector(".product__cta-container"),n=document.getElementById("product-cta-template");if(t&&n){t.innerHTML="";const o=e.map((e,t)=>{const o=n.content.cloneNode(!0).firstElementChild;var s;return o.dataset.action=e,o.textContent=(s=e,window.productUi.ctas[s]),0===t?o.classList.add("primary"):o.classList.add("secondary"),e===Ge.CTA_NOTIFY_ME_BACK_IN_STOCK_POPUP&&o.classList.add("js-back-in-stock-popup"),o});t.append(...o)}}updateProductOptionsDisplay(e,t){Object.entries(e).forEach(e=>{const[t,n]=e,o=this.querySelector(`.product-option__container--${t} .product-option__current-value`);if(o){const e=window.optionHandleToValue[n];o.textContent=n&&e?`: ${e}`:""}}),this.querySelectorAll(".js-product-option:not(.product-option__value-button--custom)").forEach(n=>{n.classList.remove("product-option--selected","product-option--out-of-stock","product-option--unavailable","product-option--expedited-shipping-allowed","product-option--expedited-filtered");const{optionName:o,optionValue:s,productId:i}=n.dataset,r=i?+i:null,a=e[o]===s,c=!r||+r===this.selectedProductIdStore.get();if((o===Je||a)&&c&&n.classList.add("product-option--selected"),"bundle"===t){const t=function(e,t,n){const o=Object.keys(window.bundleVariantGroups).length,s=function(e,t){return e.reduce((e,n)=>{const o=t(n);return e[o]?e[o].push(n):e[o]=[n],e},{})}(Object.values(window.bundleVariantGroups).flat().filter(We),e=>Object.entries(e.optionsMap).filter(e=>e[0]!==Je).map(e=>e[1]).reduce((e,t)=>e+t,""));return Object.values(s).filter(e=>e.length&&e.length===o).filter(o=>Ve(o[0],e,t,n))}(o,s,e);t.length&&t.some(e=>e.reduce((e,t)=>e&&t.available,!0))||n.classList.add("product-option--unavailable")}else{const t=at(o,s,r,st(e,this.selectedProductIdStore.get()),this.selectedProductIdStore.get());if(t.length){if("true"===this.getAttribute("under_store_collection"))return;t.some(e=>e.available)?t.some(e=>!e.standardShippingOnly)&&n.classList.add("product-option--expedited-shipping-allowed"):n.classList.add("product-option--out-of-stock")}else n.classList.add("product-option--unavailable")}})}updateExpeditedToggleDisplay(e){const t=this.querySelector(".js-expedited-options-switch");if(!t)return;const n=e===et.EXPEDITED;t.checked=n,t.setAttribute("aria-checked",`${n}`)}shouldShowExpeditedOptionsToggle(e){return function(e){const t=nt().filter(t=>t.productId===e);if(!t.length)return!1;const n=t.some(e=>!e.standardShippingOnly),o=t.some(e=>e.standardShippingOnly);return n&&o}(e)}applyExpeditedOptionsFilter(e,t,n){const o=e===et.EXPEDITED;this.querySelectorAll(".js-product-option:not(.product-option__value-button--custom)").forEach(e=>{const{optionName:s,optionValue:i,productId:r}=e.dataset,a=o&&!rt(s,i,r?+r:null,t,n);e.classList.toggle("product-option--expedited-filtered",a)}),this.querySelectorAll(".product-option__container").forEach(e=>{if(!o)return void e.classList.remove("product-option__container--expedited-filtered-empty");const t=Array.from(e.querySelectorAll(".js-product-option:not(.product-option__value-button--custom)")).some(e=>!e.classList.contains("product-option--expedited-filtered")&&!e.classList.contains("product-option--unavailable"));e.classList.toggle("product-option__container--expedited-filtered-empty",!t)})}clearExpeditedFilteredSelections(e,t,n){if(e!==et.EXPEDITED)return t;const o=function(e){const t={};return nt().filter(t=>t.productId===e).forEach(e=>{Object.entries(e.optionsMap).forEach(([e,n])=>{n&&(t[e]||(t[e]=new Set),t[e].add(n))})}),new Set(Object.entries(t).filter(([,e])=>e.size<=1).map(([e])=>e))}(n);let s=!1;const i={...t};return Object.entries(t).forEach(([e,r])=>{if(!r||e===Je||o.has(e))return;const a=this.querySelector(`.js-product-option[data-option-name="${e}"][data-option-value="${r}"]:not(.product-option__value-button--custom)`);rt(e,r,a?.dataset.productId?+a.dataset.productId:null,st(t,n),n)||(i[e]=void 0,s=!0)}),s?i:t}}function nt(){return window.variantsArray.filter(We)}function ot(e){e?window.BIS?.popup?.show({variantId:e.variantID}):window.BIS?.popup?.show()}function st(e,t){const n={...e};if(!n[Je]){const e=function(e){const t=nt().find(t=>t.productId===e);return t?.optionsMap[Je]}(t);e&&(n[Je]=e)}return n}function it(e,t){return nt().filter(e=>e.productId===t).filter(t=>Object.entries(e).filter(e=>!!e[1]).reduce((e,n)=>{const[o,s]=n;return e&&t.optionsMap[o]===s},!0))}function rt(e,t,n,o,s){return at(e,t,n,o,s).some(e=>!e.standardShippingOnly&&e.available)}function at(e,t,n,o,s){let i=nt().filter(n=>Ve(n,e,t,o));return i=e!==Je?i.filter(e=>e.productId===s):i.filter(e=>e.productId===n),i}function ct(){const e=document.querySelector(".product__error-message");e&&(e.textContent="",e.classList.add("hidden"))}function lt(e){const t=document.querySelector(".product__error-message");t&&(t.textContent=e,t.classList.remove("hidden"))}window.customElements.get("product-main")||customElements.define("product-main",tt);class dt extends HTMLElement{static get observedAttributes(){return["show"]}constructor(){super()}timeoutId;connectedCallback(){this.render(),"false"!==this.getAttribute("show")&&this.setAttribute("show","true")}attributeChangedCallback(e,t,n){t!==n&&"show"===e&&this.updateDisplay(n)}disconnectedCallback(){this.timeoutId&&clearTimeout(this.timeoutId)}updateDisplay(e){const t=this.querySelector(".loading-spinner__container");t&&("true"===e?(t.style.display="flex",this.timeoutId=window.setTimeout(()=>{this.setAttribute("show","false")},+this.getAttribute("timeout")||1e4)):(t.style.display="none",this.timeoutId&&clearTimeout(this.timeoutId)))}render(){const e=["loading-spinner__container","true"===this.getAttribute("blocking")?"loading-spinner__container--block":"","true"===this.getAttribute("compact")?"loading-spinner__container--compact":""].filter(
1Boolean).join(" ");this.innerHTML=`\n      <div class="${e}" style="display: none;">\n        <div class="loading-spinner__spinner"></div>\n      </div>\n    `}}window.customElements.get("loading-spinner")||customElements.define("loading-spinner",dt);class ut extends HTMLElement{cartStateSub;constructor(){super()}connectedCallback(){this.cartStateSub=i.onCartUpdate.subscribe(e=>{this.onCartUpdate(e)})}disconnectedCallback(){this.cartStateSub?.()}render(e){const t=(e.percentDiff||0)>=100,n=Math.min(e.percentDiff||0,100);this.innerHTML=`\n      <div class="cart-progress">\n        <div class="cart-progress__threshold-message">${e.message}</div>\n        <div class="cart-progress__threshold-container">\n          <div\n            class="cart-progress__threshold-bar ${t?"cart-progress__threshold-bar--reached":""}"\n            style="width:${n}%"\n          ></div>\n        </div>\n      </div>\n    `}onCartUpdate(e){const t=function(e,t){let n="",o=null;const s=t.currentCurrency,i=e/100,r=t.cartMessagingEndPunctuation;if(t.hasFreeShippingThreshold){if(i<t.freeShippingThresholdAmount){const r=t.freeShippingThresholdAmount-i;o=e/t.freeShippingThresholdAmount,n=function(e,t,n){return e.replace("{money}",`${t+n.toFixed(2)}`)}(t.freeShippingPromoLabel,s,r)}else n=t.freeShippingPromoQualifiedLabel,o=100;n+=r,t.shipAfterLabel&&(n+=`<span>(${t.shipAfterLabel})</span>`)}return{message:n,percentDiff:o}}(e.total_price,{currentCurrency:window.UNTUCKitConfig.cartCurrencySymbol,...window.UNTUCKitConfig.thresholds});this.render(t)}}window.customElements.get("cart-progress")||customElements.define("cart-progress",ut);const ht="tiered-progress-data",pt={truck:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="10" cy="10" r="9.5" fill="#C5C5C5" stroke="#142D51"/>\n<g clip-path="url(#clip0_385_1200)">\n<path d="M7.69031 8.4353V11.2066H10.3331L7.69031 8.4353Z" fill="#8E2231"/>\n<path d="M13.6001 8.77549C14.4727 8.77549 15.0149 9.42241 15.0149 10.4754V12.8827H14.4576C14.3226 12.4918 13.9457 12.2056 13.4942 12.2056C13.0579 12.2056 12.6821 12.4918 12.546 12.8827H12.1993V8.77549H13.6001ZM13.4942 13.7402C13.2231 13.7402 12.9974 13.5145 12.9974 13.2434C12.9974 12.9724 13.2231 12.7466 13.4942 12.7466C13.7653 12.7466 13.991 12.9724 13.991 13.2434C13.991 13.5145 13.7653 13.7402 13.4942 13.7402ZM11.6593 8.51953V12.8978H8.57484C8.5446 12.8978 8.51436 12.8978 8.49924 12.913C8.36424 12.5069 7.98732 12.2207 7.53588 12.2207C7.08444 12.2207 6.7086 12.522 6.57252 12.913C6.54228 12.8978 6.49692 12.8827 6.46776 12.8827H5.77549V7.72141H11.6733V8.51845H11.6593V8.51953ZM7.53588 13.7402C7.2648 13.7402 7.03908 13.5145 7.03908 13.2434C7.03908 12.9724 7.2648 12.7466 7.53588 12.7466C7.80696 12.7466 8.03268 12.9724 8.03268 13.2434C8.03268 13.5145 7.80696 13.7402 7.53588 13.7402ZM6.96456 6.38222H8.40852V7.22462H6.12217L6.96456 6.38222ZM8.93556 6.38222H10.4702L11.3126 7.22462H8.93556V6.38222ZM12.1853 7.42118V7.40606C12.1853 7.39094 12.1853 7.39094 12.1701 7.37582C12.1701 7.3607 12.155 7.3607 12.155 7.34558C12.155 7.34558 12.155 7.33046 12.1399 7.33046C12.1248 7.31534 12.1248 7.30022 12.1097 7.30022L10.7564 5.9459C10.7111 5.90054 10.6366 5.8703 10.5761 5.8703H8.6796H6.87384C6.79824 5.8703 6.73884 5.90054 6.69348 5.9459L5.33917 7.30022C5.32405 7.31534 5.32405 7.33046 5.30893 7.33046L5.29489 7.34558C5.29489 7.3607 5.27977 7.3607 5.27977 7.37582C5.27977 7.39094 5.27977 7.39094 5.26465 7.40606V7.42118V7.46654V13.1387C5.26465 13.2737 5.38561 13.3946 5.52061 13.3946H6.48396C6.5142 13.3946 6.52932 13.3946 6.55956 13.3795C6.63516 13.8612 7.05636 14.237 7.5672 14.237C8.064 14.237 8.4852 13.8763 8.55972 13.3946H8.60508H11.9606H12.5319C12.6227 13.8763 13.0287 14.237 13.5245 14.237C14.0213 14.237 14.4425 13.8763 14.5181 13.3946H15.2849C15.4199 13.3946 15.5408 13.2748 15.5408 13.1387V10.4754C15.5408 9.79825 15.3453 9.22693 14.9846 8.83489C14.6379 8.45905 14.1573 8.26357 13.6152 8.26357H12.2004V7.46654C12.1853 7.45142 12.1853 7.4363 12.1853 7.42118Z" fill="#142D51"/>\n</g>\n<defs>\n<clipPath id="clip0_385_1200">\n<rect width="16.2" height="16.2" fill="white" transform="translate(2.80005 1.60004)"/>\n</clipPath>\n</defs>\n</svg>\n',"product-tag":'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="10" cy="10" r="9.5" fill="#C5C5C5" stroke="#142D51"/>\n<path d="M14.7409 11.5125L11.5194 14.73C11.4293 14.82 11.3279 14.8875 11.2153 14.9325C11.1026 14.9775 10.99 15 10.8773 15C10.7647 15 10.6521 14.9775 10.5394 14.9325C10.4268 14.8875 10.3254 14.82 10.2353 14.73L6.25907 10.7587C6.17647 10.6762 6.11264 10.5806 6.06758 10.4719C6.02253 10.3631 6 10.2488 6 10.
11288V6.9C6 6.6525 6.08824 6.44063 6.26471 6.26438C6.44118 6.08812 6.65332 6 6.90113 6H10.1339C10.2541 6 10.3705 6.02438 10.4831 6.07313C10.5957 6.12188 10.6934 6.1875 10.776 6.27L14.7409 10.2413C14.831 10.3313 14.8967 10.4325 14.938 10.545C14.9793 10.6575 15 10.77 15 10.8825C15 10.995 14.9793 11.1056 14.938 11.2144C14.8967 11.3231 14.831 11.4225 14.7409 11.5125ZM8.02753 8.7C8.21527 8.7 8.37484 8.63438 8.50626 8.50313C8.63767 8.37188 8.70338 8.2125 8.70338 8.025C8.70338 7.8375 8.63767 7.67813 8.50626 7.54688C8.37484 7.41563 8.21527 7.35 8.02753 7.35C7.8398 7.35 7.68023 7.41563 7.54881 7.54688C7.4174 7.67813 7.35169 7.8375 7.35169 8.025C7.35169 8.2125 7.4174 8.37188 7.54881 8.50313C7.68023 8.63438 7.8398 8.7 8.02753 8.7Z" fill="#142D51"/>\n</svg>\n',check:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="10" cy="10" r="9.5" fill="#2F71D4" stroke="#142D51"/>\n<path d="M8.86364 12.0373L6.71591 9.84328L6 10.5746L8.86364 13.5L15 7.23134L14.2841 6.5L8.86364 12.0373Z" fill="#142D51"/>\n</svg>\n'};class mt extends HTMLElement{cartStateSub;connectedCallback(){this.cartStateSub=i.onCartUpdate.subscribe(e=>{this.onCartUpdate(e)})}disconnectedCallback(){this.cartStateSub?.()}parseSectionHtml(e){const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector(`#${ht}`);if(n?.textContent)try{return JSON.parse(n.textContent)}catch{return null}return null}readDomSectionData(){const e=document.getElementById(ht);if(e?.textContent)try{return JSON.parse(e.textContent)}catch{return null}return null}getSectionData(e){const t=e.sections?.[ht];if(t){const e=this.parseSectionHtml(t);if(e){const t=document.getElementById(ht);return t&&(t.textContent=JSON.stringify(e)),e}}return this.readDomSectionData()}onCartUpdate(e){const t=this.getSectionData(e);t?.tiers.length&&this.render(t)}render(e){const{tiers:t,type:n,currency:o}=e,s=t=>{const o=t.ignoreCollection?"price"===n?e.cartSubtotal:e.cartQuantity:"price"===n?e.eligibleSubtotal:e.eligibleQuantity;return"price"===n?o/100:o},i=1/(t.length+1),r=t.find(e=>s(e)<e.threshold),a=r?t.indexOf(r):-1;let c;if(r){const e=s(r);if(0===a){const n=t[0].threshold>0?Math.min(e/t[0].threshold,1):0;c=n*i*100}else{const n=t[a-1].threshold,o=r.threshold-n,s=o>0?Math.min(Math.max((e-n)/o,0),1):0;c=(a+s)*i*100}}else c=100;const l=r?t.map(e=>s(e)>=e.threshold?e.qualifiedLabel:e.promoLabel.replace("{value}",function(e,t,n){if("price"===e)return`${t}${n.toFixed(2)}`;const o=Math.ceil(n);return`${o} item${1!==o?"s":""}`}(n,o,e.threshold-s(e)))).join(" "):e.allQualifiedLabel||t[t.length-1].qualifiedLabel,d=this.querySelector(".cart-progress-tiers__fill"),u=this.querySelectorAll(".cart-progress-tiers__marker");if(d&&u.length===t.length){d.style.width=`${c}%`;const e=this.querySelector(".cart-progress-tiers__message");return e&&(e.innerHTML=l),void t.forEach((e,t)=>{const n=u[t],o=s(e)>=e.threshold;n.classList.toggle("cart-progress-tiers__marker--reached",o);const i=n.querySelector(".cart-progress-tiers__marker-icon");i&&(i.innerHTML=pt[o?"check":e.icon])})}const h=e.promoBanner?`<div class="cart-progress-tiers__promo-banner">${e.promoBanner}</div>`:"",p=e.disclaimer?`<div class="cart-progress-tiers__disclaimer">${e.disclaimer}</div>`:"",m=t.map((e,t)=>{const n=(t+1)*i*100,o=s(e)>=e.threshold,r=o?"check":e.icon;return`\n        <div\n          class="cart-progress-tiers__marker${o?" cart-progress-tiers__marker--reached":""}"\n          style="left:${n}%"\n        >\n          <div class="cart-progress-tiers__marker-icon">${pt[r]}</div>\n          <div class="cart-progress-tiers__marker-label">${e.label}</div>\n        </div>\n      `}).join("");this.innerHTML=`\n      <div class="cart-progress-tiers">\n        ${h}\n        <div class="cart-progress-tiers__message">${l}</div>\n        <div class="cart-progress-tiers__track-container" aria-hidden="true">\n          <div class="cart-progress-tiers__fill" style="width:0"></div>\n          ${m}\n        </div>\n        ${p}\n      </div>\n    `,requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=this.querySelector(".cart-progress-tiers__fill");e&&(e.style.width=`${c}%`)})})}}window.customElements.get("cart-progress-tiers")||customElements.define("cart-progress-tiers",mt);var gt=n(2971);class ft extends HTMLElement{static get observedAttributes(){return["cart-line-item-data","line-number","is-available"]}lineItemData;lineNumber;isAvailable=!0;constructor(){super(),this.addEventListener("click",async e=>{const t=e.target;if(t.classList.contains("js-qty-adjust")){const e=t.classList.contains("icon-plus")?1:-1;this.updateQuantity(this.lineItemData.quantity+e)}else if(t.classList.contains("js-remove-from-cart"))this.showSpinner(),this.removeLineItem();else if(t.classList.contains("js-save-for-later")){this.showSpinner();const e=[{epi:this.lineItemData.variant_id,empi:this.lineItemData.product_id,du:location.origin+this.lineItemData.url}];(0,re.saveProductsForLater)(e).then(()=>{this.removeLineItem()}).catch(()=>{pe("There was an error saving this product for later. Please try again later.")})}else if(t.classList.contains("js-remove-from-sfl"))this.showSpinner(),(0,re.removeSaveForLaterProducts)([{epi:this.lineItemData.variant_id,empi:this.lineItemData.product_id,du:this.lineItemData.url}]);else if(t.classList.contains("js-move-to-cart")){this.showSpinner();try{await(0,i.addToCart)({items:[{id:this.lineItemData.variant_id,quantity:1}]}),(0,re.removeSaveForLaterProducts)([{epi:this.lineItemData.variant_id,empi:this.lineItemData.product_id,du:this.lineItemData.url}])}catch(e){}}}),this.addEventListener("change",e=>{const t=e.target;if(t.classList.contains("js-qty")&&t.validity.valid){const e=parseInt(t.value)||0;this.updateQuantity(e)}})}connectedCallback(){this.append(this.generateHtml(this.lineItemData))}attributeChangedCallback(e,t,n){if(t!==n)switch(e){case"cart-line-item-data":this.lineItemData=JSON.parse(n);break;case"line-number":this.lineNumber=parseInt(n);break;case"is-available":this.isAvailable="true"===n}}updateQuantity(e){this.showSpinner(),e<1?this.removeLineItem():(0,i.changeLineItem)({id:this.lineItemData.key,quantity:e}).catch(e=>{let t=window.cartUI.errors.update.generic.replace("#{product}",this.lineItemData.product_title);e instanceof i.ChangeLineItemError&&("SOLD_OUT"===e.payload?.reason&&(t=window.cartUI.errors.update.soldOut.replace("#{product}",this.lineItemData.product_title)),e.payload?.passedthroughServerMessage&&(t=e.payload.passedthroughServerMessage)),pe(t)})}removeLineItem(){(0,i.changeLineItem)({id:this.lineItemData.key,quantity:0}).then(()=>{(0,R.emitShopifyEvent)("remove_from_cart",JSON.parse(JSON.stringify(this.lineItemData)));const e=this.querySelector(".cart-line-item__container");e.addEventListener("animationend",()=>{this.remove()},{once:!0}),e.classList.add("fade-out")}).catch(()=>{pe(window.cartUI.errors.remove.generic.replace("#{product}",this.lineItemData.product_title))})}generateHtml(e){const t=document.createElement("template");t.innerHTML=`\n      <div class="cart-line-item__container">\n        <a class="cart-line-item__image-container" href="${e.url}" title="${e.product_title}">\n          <img class="cart-line-item__image" src="${e.featured_image.url}&width=300" alt="${e.featured_image.alt||e.product_title}" loading="lazy" height="136" width="115">\n        </a>\n        <div class="cart-line-item__info-container">\n          <a class="cart-line-item__product-title" href="${e.url}" title="${e.variant_title}">${e.product_title}</a>\n          <ul class="cart-line-item__product-details">\n            ${this.getProductDetails(e).map(e=>`<li>${e}</li>`).join("")}\n          </ul>\n          ${"false"!==this.getAttribute("show-quantity")&&this.isAvailable?`\n            <div class="cart-line-item__quantity-container">\n              <button type="button" class="js-qty-adjust icon-minus" aria-label="Remove 1 ${e.product_title}"></button>\n              <label>
1\n                <span class="ADA__visually-hidden">Quantity For ${e.product_title} ${e.variant_title}</span>\n                <input type="number" class="js-qty" value="${e.quantity}" pattern="\\d*" max="99" min="0" />\n              </label>\n              <button type="button" class="js-qty-adjust icon-plus" aria-label="Add 1 ${e.product_title}"></button>\n            </div>\n          `:""}\n          <div class="cart-line-item__price"></div>\n          ${"inline-cart"===this.getAttribute("actions-type")?`<div class="cart-line-item__actions">\n              <button type="button" class="cart-line-item__action js-remove-from-cart">Remove</button>\n              ${window.UNTUCKitConfig.thirdPartyToggles.swym&&window.UNTUCKitConfig.thirdPartyToggles.swymSaveForLater&&this.isAvailable?'<button type="button" class="cart-line-item__action js-save-for-later">Save For Later</button>':""}\n            </div>`:""}\n          ${"sfl"===this.getAttribute("actions-type")&&window.UNTUCKitConfig.thirdPartyToggles.swym&&window.UNTUCKitConfig.thirdPartyToggles.swymSaveForLater?`<div class="cart-line-item__actions">\n              <button type="button" class="cart-line-item__action js-remove-from-sfl">Remove</button>\n              ${this.isAvailable?'\n                <button type="button" class="cart-line-item__action js-move-to-cart">Move To Cart</button>\n              ':""}\n            </div>`:""}\n          ${"true"===this.getAttribute("standard-shipping-only")?`<p class="cart-line-item__standard-shipping-only">${window.cartUI.standardShippingOnly.lineItemMessage}</p>`:""}\n        </div>\n        <loading-spinner show="false" blocking="true"></loading-spinner>\n      </div>`;const n=function(e,t,n,o,s,i){const r=n||t;return s||(o="Out of Stock"),(0,gt.renderProductPriceCompact)({regularPrice:r,salePrice:e,subMessage:o,productId:i})}(e.final_price,e.original_price,+this.getAttribute("compare-at-price"),this.getAttribute("badge-text"),this.isAvailable,["inline-cart","add-to-cart-overlay"].includes(this.getAttribute("actions-type"))?null:e.product_id);return t.content.querySelector(".cart-line-item__price").appendChild(n),t.content.firstElementChild}getProductDetails(e){const t=Object.entries(e.properties||{}).filter(e=>!e[0].startsWith("_")).map(e=>`${e[0]}: ${e[1]}`);return t.length?t:(e.options_with_values??[]).map(e=>{const{name:t,value:n}=e;return"color"===t.toLowerCase()&&this.getAttribute("color-display-value")||n})}showSpinner(){this.querySelector("loading-spinner").setAttribute("show","true")}}window.customElements.get("cart-line-item")||customElements.define("cart-line-item",ft);var vt=n(3752);const bt="global-banner:updateBanners";class wt extends HTMLElement{device;container;banners;arrows;rotationIntervalId=null;selectedBannerIdStore;setupAc=new AbortController;swipeListenersAdded=!1;focusTrap;headerTransitionUnsub;updateBannersFunc=()=>{console.debug(bt),this.reset()};constructor(){super(),this.addEventListener("click",e=>{const t=e.target,n=(0,U.getElementOrParentByClassName)(t,"js-global-banner-code-button");if(n)return void this.copyCode(n);const o=(0,U.getElementOrParentByClassName)(t,"js-global-banner-detail-toggle");if(o)return void this.toggleDetails(o.closest(".global-banner__banner"));const s=(0,U.getElementOrParentByClassName)(t,"js-global-banner-detail-close");s&&this.toggleDetails(s.closest(".global-banner__banner"),!0)})}connectedCallback(){this.device=this.getAttribute("display");const e=window.UTK_themeConfig&&window.UTK_themeConfig[`${this.device}GlobalBanners`];this.container=this.querySelector(".global-banner"),this.selectedBannerIdStore=(0,s.createState)(void 0),window.addEventListener(bt,this.updateBannersFunc),this.headerTransitionUnsub=U.headerTransition.subscribe(e=>{this.display(e)}),e?.banners?.length&&this.setup()}disconnectedCallback(){window.removeEventListener(bt,this.updateBannersFunc),this.headerTransitionUnsub?.(),this.headerTransitionUnsub=void 0,this.stopRotation(),this.setupAc.abort(),this.setupAc=new AbortController}setup(){this.setupAc.abort(),this.setupAc=new AbortController,this.swipeListenersAdded=!1;const{signal:e}=this.setupAc;if(this.banners=Array.from(this.container.querySelectorAll(".js-global-banner:not(.js-global-banner-dynamic)")),this.arrows=Array.from(this.container.querySelectorAll(".js-global-banner-arrow-button")),this.banners.length&&!this.container.classList.contains("global-banner--has-initial-banners")&&this.container.classList.add("global-banner--has-initial-banners"),this.banners.length>1){console.log(`GlobalBanner: setting up for multiple global banners for ${this.device}`);const t=this.selectedBannerIdStore.subscribe(e=>
1{this.banners.forEach(t=>{t.dataset.id===e?t.classList.add("global-banner__banner--selected"):t.classList.remove("global-banner__banner--selected"),this.toggleDetails(t,!0)})});e.addEventListener("abort",()=>t()),this.selectedBannerIdStore.set(this.banners[0].dataset.id),this.arrows.forEach(t=>{t.addEventListener("click",e=>{const t=e.currentTarget;this.selectedBannerIdStore.set(this.getNextBannerId("prev"===t.dataset.direction?-1:1)),this.resetRotation()},{signal:e})}),this.startRotation(),this.container.addEventListener("mouseenter",()=>this.stopRotation(),{signal:e}),this.container.addEventListener("mouseleave",()=>this.startRotation(),{signal:e});const n=(0,j.accessibilityEnabledListener)().subscribe(()=>this.stopRotation());e.addEventListener("abort",()=>n()),"mobile"!==this.device||this.swipeListenersAdded||this.addSwipeListeners(this.container,e),this.container.classList.remove("global-banner--hide-controls")}else 1===this.banners.length&&(console.log(`GlobalBanner: setting up for one global banner for ${this.device}`),this.banners[0].classList.add("global-banner__banner--selected"))}reset(){this.debug("refreshing setup"),this.stopRotation(),this.setup()}getNextBannerId(e){const t=this.banners.findIndex(e=>e.classList.contains("global-banner__banner--selected"))+1*e,n=t===this.banners.length?0:-1===t?this.banners.length-1:t;return this.banners[n].dataset.id}stopRotation(){this.debug("stopping rotation"),null!==this.rotationIntervalId&&(clearInterval(this.rotationIntervalId),this.rotationIntervalId=null)}startRotation(){const e=+this.getAttribute("rotation");if(!(0,j.preventAnimation)()&&null===this.rotationIntervalId&&(this.debug("starting rotation"),e)){const t=1e3*e;this.rotationIntervalId=setInterval(()=>{this.selectedBannerIdStore.set(this.getNextBannerId(1))},t)}}resetRotation(){this.debug("resetting rotation"),this.stopRotation(),this.startRotation()}addSwipeListeners(e,t){this.debug("adding swipe listeners");let n=0,o=0;e.addEventListener("touchstart",e=>{this.debug("touchstart"),this.isBanner(e.target)&&(n=e.changedTouches[0].screenX)},{passive:!0,signal:t}),e.addEventListener("touchend",e=>{if(this.debug("touchend"),this.isBanner(e.target)){if(o=e.changedTouches[0].screenX,Math.abs(n-o)<3)return;let t=1;o>n&&(t=-1),this.selectedBannerIdStore.set(this.getNextBannerId(t)),this.resetRotation()}},{signal:t}),this.swipeListenersAdded=!0}async copyCode(e){const t=getComputedStyle(e).width;e.style.width=t;const n=Array.from(e.children);n.forEach(e=>e.classList.toggle("hidden"));const o=e.dataset.code;try{await navigator.clipboard.writeText(o)}catch(e){console.error(e)}setTimeout(()=>{n.forEach(e=>e.classList.toggle("hidden"))},2e3)}toggleDetails(e,t=!1){this.debug("toggling details");const n=e.querySelector(".global-banner__details");if(n){const e=t||n.classList.contains("global-banner__details--open");e&&n.classList.contains("global-banner__details--open")?(n.style.top="0",this.focusTrap&&this.focusTrap.deactivate(),n.classList.remove("global-banner__details--open")):e||n.classList.contains("global-banner__details--open")||(n.style.top=`${this.getBoundingClientRect().height}px`,this.focusTrap=(0,vt.createFocusTrap)(n),this.focusTrap.activate(),n.classList.add("global-banner__details--open"))}}display(e){if(e){const e=this.container.offsetHeight;this.container.classList.add("global-banner--hidden"),((0,oe.isMobile)()&&"mobile"===this.device||!(0,oe.isMobile)()&&"desktop"===this.device)&&(0,U.updateBodyPaddingTop)(e)}else this.container.classList.remove("global-banner--hidden")}debug(e){console.debug(`global-banner ${this.device}: ${e}`)}isBanner(e){return!(!e.classList.contains("js-global-banner")&&!e.closest(".js-global-banner"))}}window.customElements.get("global-banner")||customElements.define("global-banner",wt);class _t extends HTMLElement{config=null;categoryEl=null;constructor(){super(),this.addEventListener("focusin",this.handleNavChange),this.addEventListener("mouseover",this.handleNavChange)}connectedCallback(){console.log("MainNavDesktop : connectedCallback"),this.config=window.UTK_themeConfig?.mainNavigationDesktop??null,this.categoryEl=this.querySelector(".header__desktop-menu-list-sub-nav-container"),this.setInitialActiveMenuItem()}handleNavChange=e=>{const t=e.target,n=t.classList.contains("menu-link-outer")?t:t.closest(".menu-link-outer");if(n){const e=n.getAttribute("data-key"),t=this.config?.sections.find(t=>(0,U.handleize)(t.title)===e),o=Boolean(t?.categories?.length&&t?.title);this.populateCategoryEl(t?.categories,t?.title),this.setActiveMenuItem(o?e:null)}};setInitialActiveMenuItem(){if(!this.categoryEl||this.categoryEl.classList.contains("hidden"))return;const e=this.categoryEl.querySelector(".header__desktop-menu-list-sub-nav")?.id,t=e?.startsWith("main-nav-desktop-subnav_")?e.replace("main-nav-desktop-subnav_",""):null;this.setActiveMenuItem(t)}setActiveMenuItem(e){this.querySelectorAll(".menu-link-outer").forEach(t=>{t.classList.toggle("is-active",null!==e&&t.getAttribute("data-key")===e)})}populateCategoryEl(e,t){this.categoryEl&&(e?.length&&t?(this.categoryEl.classList.remove("hidden"),this.categoryEl.innerHTML=`\n        <ul class="header__desktop-menu-list-sub-nav" id="main-nav-desktop-subnav_${(0,U.handleize)(t)}">\n          ${e.map(e=>`\n              <li>\n                <a id="main-nav-desktop-subnav-link_${(0,U.handleize)(t)}_${(0,U.handleize)(e.title)}" class="header__desktop-menu-list-sub-nav-link" style="${e.color?`color: ${e.color.value};`:""}" href="${e.url}">${e.title}</a>\n              </li>\n            `).join("")}\n        </ul>\n      `):(this.categoryEl.classList.add("hidden"),this.categoryEl.innerHTML=""))}}window.customElements.get("main-nav-desktop")||customElements.define("main-nav-desktop",_t);var yt=n(4757);class Ct extends HTMLElement{dropdown;selectedStoreUnsub;constructor(){super(),this.addEventListener("mouseover",()=>this.showInfoDropdown()),this.addEventListener("focusin",()=>this.showInfoDropdown()),this.addEventListener("focusout",()=>this.hideInfoDropdown()),this.addEventListener("mouseleave",()=>this.hideInfoDropdown())}connectedCallback(){this.dropdown=this.querySelector(".selected-store__dropdown"),this.selectedStoreUnsub=yt.selectedStoreState.subscribe(e=>{e&&this.populateStoreInfo(e)})}disconnectedCallback(){this.selectedStoreUnsub?.()}populateStoreInfo(e){const t=this.querySelector(".selected-store__main-link");t&&(t.href="#",t.role="button");const n=this.querySelector(".selected-store__store-name");n&&(n.textContent=e.SHOPIFY_DISPLAY_NAME);const{address:o,city:s,storeHref:i}=(0,yt.sharedStoreDataMapping)(e);this.renderDropdown(e,o,s,i)}showInfoDropdown(){this.dropdown&&!this.isDropdownShown()&&(this.dropdown.style.display="block")}hideInfoDropdown(){this.dropdown&&this.isDropdownShown()&&(this.dropdown.style.display="none")}isDropdownShown(){return this.dropdown&&"none"!==this.dropdown.style.display}renderDropdown(e,t,n,o){this.dropdown&&(this.dropdown.innerHTML=`\n        <div class="selected-store-dropdown__store-info">\n          <p class="selected-store-dropdown__store-name">${e.SHOPIFY_DISPLAY_NAME}</p>
1\n          <p class="selected-store-dropdown__store-address">\n            <span>${t}</span>\n            <span>${n}</span>\n          </p>\n          <a class="selected-store-dropdown__store-phone" href="tel:${(0,Ze.toRawPhoneNumber)(e.PHONE)}">${(0,Ze.transformStorePhone)(e.PHONE)}</a>\n          <p class="selected-store-dropdown__store-hours">${function(e){return e.STORE_HOURS?e.STORE_HOURS.split(/,|\||\/|\s{3}/gm).map(e=>`${e.trim()}<br/>`).join(""):""}(e)}</p>\n        </div>\n        <a class="selected-store-dropdown__store-link" href="${o}">Shop This Store</a>\n        <a class="selected-store-dropdown__store-link" href="/blogs/store-locations">Find a Different Store</a>\n      `)}}window.customElements.get("selected-store")||customElements.define("selected-store",Ct);class St extends HTMLElement{constructor(){super()}form;searchInput;resetButton;async connectedCallback(){this.form=this.querySelector("form"),this.searchInput=this.querySelector("input"),this.resetButton=this.querySelector(".search-form__reset"),this.form.addEventListener("submit",()=>this.handleSubmit()),this.resetButton.addEventListener("click",()=>this.handleReset())}handleSubmit(){const e=this.searchInput.value;e&&(0,R.emitShopifyEvent)("updated_search_submitted",{search_term:e})}handleReset(){this.searchInput.value="",this.setFocus()}handleClose(){this.dispatchEvent(new CustomEvent(te.SEARCH_CLOSE,{bubbles:!0}))}setFocus(){this.searchInput.focus()}}window.customElements.get("search-form")||customElements.define("search-form",St);class Et extends HTMLElement{list=[];total;sflUnsub;constructor(){super(),this.addEventListener("click",e=>{const t=e.target;"/cart"===location.pathname&&t.classList.contains("js-show-all")&&(window.dispatchEvent(new CustomEvent(te.INLINE_CART_CLOSE)),this.querySelector("a").focus())})}async connectedCallback(){this.showLoading(),this.sflUnsub=re.sflData.subscribe(async e=>{if(e&&e.items.length){const t=+this.getAttribute("limit")||null;this.list=t?e.items.slice(0,t):e.items,this.total=e.pagination.totalcount,this.renderList()}else this.hide()})}disconnectedCallback(){this.sflUnsub?.(),this.sflUnsub=void 0}renderList(){this.innerHTML=`\n    <div class="save-for-later-list__container">\n      <div class="save-for-later-list__top-container">\n        <div class="save-for-later-list__title">Saved For Later\n          ${this.getAttribute("limit")?"":`<span>(${this.total})</span>`}\n        </div>\n        ${this.getAttribute("limit")?'<a class="save-for-later-list__show-all js-show-all" href="/cart#cart-save-for-later">See All</a>':""}\n        \x3c!-- <button class="save-for-later-list__expand-button">Expand The List</button> --\x3e\n      </div>\n      <div class="save-for-later-list__list"></div>\n    </div>\n    `;const e=this.list.map(e=>{const t={url:(n=e).du,product_title:n.dt,featured_image:{url:n.iu,alt:null,aspect_ratio:null,height:null,width:null},options_with_values:n.selectedOptions,final_price:100*n.pr,original_price:100*n.pr,product_id:n.empi,variant_id:n.epi,availableForSale:n.availableForSale,badgingText:n.badgingText,compareAtPrice:n.compareAtPrice,colorDisplayValue:n.colorDisplayValue};var n;return(0,ne.createCartLineItem)(t,{actionsType:"sfl",showQuantity:!1,styleClass:"cart-line-item--listed"})});this.querySelector(".save-for-later-list__list").append(...e)}hide(){this.innerHTML=""}showLoading(){this.innerHTML="<loading-spinner></loading-spinner>"}}function Lt(e,t=".boost-pfs-filter-product-item-image"){const n=e.root.querySelectorAll(".splide__arrow"),o=e.Components.Elements.slides[0];if(o){const e=o.querySelector(t);if(e){const t=e.offsetHeight;if(0===t)return;n.forEach(e=>{e.style.top=t/2+"px"})}}}window.customElements.get("save-for-later-list")||customElements.define("save-for-later-list",Et);const kt={mediaQuery:"min",gap:"8px",type:"slide",perPage:2,arrows:!0,pagination:!1,breakpoints:{[oe.TABLET_WIDTH]:{perPage:3},[oe.DESKTOP_WIDTH]:{gap:"24px"}}};class At extends HTMLElement{static get observedAttributes(){return["selected-cta-index"]}carousel=null;loadingSpinner=null;headerCopy=this.getAttribute("header-copy");subheaderCopy=this.getAttribute("subheader-copy");promoTitle=this.getAttribute("promo-title");promoOffer=this.getAttribute("promo-offer");promoCode=this.getAttribute("promo-code");numProducts=+this.getAttribute("num-products")||6;toCollectionText=this.getAttribute("to-collection-text")||"Shop the Collection";constructor(){super(),this.addEventListener("click",async e=>{const t=e.target;t.matches(".carousel-selector__cta:not(.carousel-selector__cta--selected)")&&(this.updateHeader(t),this.setAttribute("selected-cta-index",t.dataset.ctaIndex))}),window.addEventListener("resize",()=>{Lt(this.carousel)})}connectedCallback(){this.render(),this.loadingSpinner=this.querySelector("loading-spinner"),this.carousel=new be.default(this.querySelector(".splide"),kt),this.carousel.mount();const e=this.querySelector(".carousel-selector__cta");e&&(this.updateHeader(e),this.fetchAndRenderCollection(e.dataset.ctaIndex))}attributeChangedCallback(e,t,n){this.carousel&&t!==n&&"selected-cta-index"===e&&this.fetchAndRenderCollection(n)}render(){this.innerHTML=`\n    <div class="carousel-selector__container">\n      <div class="carousel-selector__left-container">\n        <div class="carousel-selector__header-container"></div>\n        <div class="carousel-selector__cta-container">\n          ${this.renderCTAs()}\n        </div>\n      </div>\n      <div class="carousel-selector__right-container js-collection-render-test-result">\n        <loading-spinner show="false"></loading-spinner>\n        <section class="splide">\n          <div class="splide__track">\n            <ul class="splide__list"></ul>\n          </div>\n        </section>\n      </div>\n      </div>`}renderCTAs(){return[1,2,3,4,5].map(e=>{const t=this.getAttribute(`cta-copy-${e}`),n=this.getAttribute(`cta-handle-${e}`);return t&&n?`\n          <button\n            class="carousel-selector__cta"\n            data-cta-index="${e}"\n            data-collection-handle="${n}"\n            data-collection-filters="${this.getAttribute(`cta-collection-filters-${e}`)||""}"\n            data-cta-header="${this.getAttribute(`cta-header-copy-${e}`)||""}"\n            data-cta-subheader="${this.getAttribute(`cta-subheader-copy-${e}`)||""}"\n            data-cta-promo-title="${this.getAttribute(`cta-promo-title-${e}`)||""}"\n            data-cta-promo-offer="${this.getAttribute(`cta-promo-offer-${e}`)||""}"\n            data-cta-promo-code="${this.getAttribute(`cta-promo-code-${e}`)||""}"\n          >\n            ${t}\n          </button>`:""}).join("")}async fetchAndRenderCollection(e){console.log("CTA Index:",e);let t=null;this.querySelectorAll(".carousel-selector__cta").forEach(n=>
1{n.dataset.ctaIndex===e?(n.classList.add("carousel-selector__cta--selected"),t=n):n.classList.remove("carousel-selector__cta--selected")});const n=t.dataset.collectionHandle,o=t.dataset.collectionFilters,s=await fetch(`/collections/${n}?sections=collection-product-cards&${o}`),i=await s.json(),r=(new DOMParser).parseFromString(i["collection-product-cards"],"text/html");new Set(r.querySelectorAll('link[rel="stylesheet"]')).forEach(e=>{document.head.querySelector(`link[href="${e.href.replace("https:","")}"]`)||document.head.appendChild(e)});const a=Array.from(r.querySelectorAll("product-card")).slice(0,this.numProducts).map(e=>{const t=document.createElement("li");return t.className="splide__slide",t.appendChild(e),t});if("true"===this.getAttribute("randomize-products")&&a.sort(()=>Math.random()-.5),"true"!==this.getAttribute("hide-to-collection-card")){const e=document.createElement("li");e.className="splide__slide";const t=`/collections/${n}${function(e){const t=e.split("&").map(e=>{const[t,n]=e.split("=");return t.startsWith("filter.v.option.fit")||t.startsWith("filter.v.option.size")?`pf_opt_${t.replace("filter.v.option.","")}=${n}`:t.startsWith("filter.v.option.color")?`pf_t_color=color%3A${n.toLowerCase()}`:null}).filter(e=>null!==e).join("&");return t?`?${t}`:""}(o)}`;e.innerHTML=`\n        <a href="${t}" class="carousel-selector__to-collection-card">\n          <span>${this.toCollectionText}</span>\n        </a>\n      `,a.push(e)}const c=this.querySelector(".js-collection-render-test-result ul");c.replaceChildren(...a),c.dataset.collectionHandle=n;const l=c.querySelector("img");l?.addEventListener("load",()=>{Lt(this.carousel)},{once:!0}),this.carousel?.refresh().go(0),(0,re.refreshWishlistIcons)("carousel-selector .splide")}updateHeader(e){e.dataset.ctaHeader&&(this.headerCopy=e.dataset.ctaHeader),e.dataset.ctaSubheader&&(this.subheaderCopy=e.dataset.ctaSubheader),e.dataset.ctaPromoTitle&&(this.promoTitle=e.dataset.ctaPromoTitle),e.dataset.ctaPromoOffer&&(this.promoOffer=e.dataset.ctaPromoOffer),e.dataset.ctaPromoCode&&(this.promoCode=e.dataset.ctaPromoCode);const t=this.querySelector(".carousel-selector__header-container");t&&(console.log("Updating header to:",this.headerCopy,this.subheaderCopy),t.innerHTML=`\n        ${this.headerCopy?`<h2 class="carousel-selector__header">${this.headerCopy}</h2>`:""}\n        ${this.subheaderCopy?`<p class="carousel-selector__subheader">${this.subheaderCopy}</p>`:""}\n        ${this.promoTitle?`<h2 class="carousel-selector__promo-title">${this.promoTitle}</h2>`:""}\n        ${this.promoOffer?`<p class="carousel-selector__promo-offer">${this.promoOffer}</p>`:""}\n        ${this.promoCode?`<p class="carousel-selector__promo-code">${this.promoCode}</p>`:""}`)}}window.customElements.get("carousel-selector")||customElements.define("carousel-selector",At);const Tt={mediaQuery:"min",gap:"8px",type:"slide",perPage:2,arrows:!1,pagination:!1,padding:{right:"5%"},breakpoints:{[oe.TABLET_WIDTH]:{perPage:3},[oe.DESKTOP_WIDTH]:{perPage:4,gap:"24px",arrows:!0,padding:{right:"0"}}}};class It extends HTMLElement{static get observedAttributes(){return["selected-cta-index"]}carousel=null;loadingSpinner=null;numProducts=+this.getAttribute("num-products")||6;constructor(){super(),this.addEventListener("click",async e=>{const t=e.target;t.matches(".toggle-module__navigation-item:not(.toggle-module__navigation-item--selected)")&&this.setAttribute("selected-cta-index",t.dataset.ctaIndex)}),window.addEventListener("resize",()=>{Lt(this.carousel)})}connectedCallback(){this.loadingSpinner=this.querySelector("loading-spinner"),this.carousel=new be.default(this.querySelector(".splide"),Tt),this.carousel.mount();const e=this.querySelector(".toggle-module__navigation-item");e&&this.fetchAndRenderCollection(e.dataset.ctaIndex)}attributeChangedCallback(e,t,n){this.carousel&&t!==n&&"selected-cta-index"===e&&this.fetchAndRenderCollection(n)}async fetchAndRenderCollection(e){console.log("CTA Index:",e);const t=this.querySelector(".toggle-module__content");t?.classList.add("toggle-module__content--loading"),this.loadingSpinner?.setAttribute("show","true");try{let t=null;if(this.querySelectorAll(".toggle-module__navigation-item").forEach(n=>
1{n.dataset.ctaIndex===e?(n.classList.add("toggle-module__navigation-item--selected"),t=n):n.classList.remove("toggle-module__navigation-item--selected")}),!t)return;const n=t.dataset.collectionHandle,o=await fetch(`/collections/${n}?sections=collection-product-cards`),s=await o.json(),i=(new DOMParser).parseFromString(s["collection-product-cards"],"text/html");new Set(i.querySelectorAll('link[rel="stylesheet"]')).forEach(e=>{document.head.querySelector(`link[href="${e.href.replace("https:","")}"]`)||document.head.appendChild(e)});const r=Array.from(i.querySelectorAll("product-card")).slice(0,this.numProducts).map(e=>{const t=document.createElement("li");return t.className="splide__slide",t.appendChild(e),t}),a=this.querySelector(".splide ul");a.replaceChildren(...r),a.dataset.collectionHandle=n;const c=a.querySelector("img");c?.addEventListener("load",()=>{Lt(this.carousel)},{once:!0}),this.carousel?.refresh().go(0),(0,re.refreshWishlistIcons)("toggle-module .splide")}finally{t?.classList.remove("toggle-module__content--loading"),this.loadingSpinner?.setAttribute("show","false")}}}window.customElements.get("toggle-module")||customElements.define("toggle-module",It);const $t={mediaQuery:"min",perPage:1,arrows:!1,gap:"24px",autoplay:!0,type:"loop",classes:{pagination:"splide__pagination review-carousel__pagination"},breakpoints:{[oe.DESKTOP_WIDTH]:{arrows:!0}}};class Mt extends HTMLElement{constructor(){super()}connectedCallback(){let e;const t=this.getAttribute("reviews");e=t?JSON.parse(t):[1,2,3,4,5].map(e=>{const t=this.getAttribute(`review-${e}-quote`),n=this.getAttribute(`review-${e}-author`);return t&&n?{quote:t,author:n}:null}).filter(Boolean),0!==e.length?this.render(e):console.error("No reviews found")}render(e){const t=e.map(e=>`\n        <li class="splide__slide review-carousel__slide">\n          <div class="review-carousel-card__star-rating">\n            ${[1,2,3,4,5].map(()=>'\n<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n<g>\n<path d="M12.4188 8.73535L9.991 0.735352L7.56319 8.73535H0L6.17444 13.1454L3.82655 20.7354L9.991 16.0454L16.1654 20.7354L13.8176 13.1454L19.982 8.73535H12.4188Z" fill="#EEBF18"/>\n</g>\n</svg>\n').join("")}\n          </div>\n          <p class="review-carousel-card__quote">“${e.quote}”</p>\n          <p class="review-carousel-card__author">– ${e.author}</p>\n        </li>\n      `).join("");this.innerHTML=`\n      <div class="review-carousel__container">\n        <div class="splide review-carousel__slider">\n          <div class="splide__track">\n            <ul class="splide__list">${t}</ul>\n          </div>\n        </div>\n      </div>\n    `,new be.default(this.querySelector(".splide"),$t).mount()}}async function xt(e,t,n){let o="";n&&(o=Object.entries(n).reduce((e,t)=>e+`&${t[0]}=${t[1]}`,""));const s=`${e}/?view=${t}${o}`;console.log("fetching alternate template",s);const i=await fetch(s);if(i.ok){const e=await i.text();if(i.redirected&&e.trim().startsWith("<!doctype html>"))throw console.error(`Template request redirected, but served entire page html: ${s}`),new Error;return e}throw console.error(`Unable to fetch alternate template: ${i.status} ${i.statusText} ${i.redirected?"redirected":""}`),new Error}window.customElements.get("review-carousel")||customElements.define("review-carousel",Mt);class qt extends HTMLElement{static get observedAttributes(){return["handle"]}constructor(){super()}setupAc=new AbortController;funcSub$;async connectedCallback(){console.debug("quickshop-modal connected"),window.addEventListener(te.QUICKSHOP_REFRESH,e=>{this.setAttribute("handle",e.detail.handle)},{signal:this.setupAc.signal}),R.dialogStack.push("quickshop")}async attributeChangedCallback(e,t,n){console.debug("quickshop-modal attribute changed"),t!==n&&"handle"===e&&(this.cleanupScripts(),this.render(n))}disconnectedCallback(){console.debug("quickshop-modal disconnected"),this.setupAc.abort(),this.funcSub$?.(),this.funcSub$=void 0,this.cleanupScripts(),R.dialogStack.pop("quickshop")}cleanupScripts(){document.querySelectorAll(".quickshop-added").forEach(e
1=>e.remove())}async render(e){const t=await xt(`/products/${e}`,"quickshop"),n=(new DOMParser).parseFromString(t,"text/html"),o=[...Array.from(n.head.childNodes),...Array.from(n.body.childNodes)].sort(Ot).map(e=>{if("SCRIPT"===e.nodeName){const t=document.createElement("script");t.classList.add("quickshop-added");const n=e.src;return n?t.src=n:t.textContent=e.textContent,t}return e});this.innerHTML="",this.append(...o),this.funcSub$?.(),this.funcSub$=b.subscribe(()=>{window.UNTUCKitConfig?.thirdPartyToggles?.yotpo&&(window.yotpoWidgetsContainer?window.yotpoWidgetsContainer?.initWidgets?window.yotpoWidgetsContainer.initWidgets():console.warn("Unable to update yotpo widgets; global Yotpo variables not defined"):function(e,t={}){return new Promise(function(n,o){let s=!1,i=document.querySelector('script[src="'+e+'"]');if(i){if(i.hasAttribute("data-loaded"))return void n(i)}else if(i=document.createElement("script"),i.type=t.type||"text/javascript",i.defer=!0,i.src=e,s=!0,t.dataAttributes)for(const[e,n]of Object.entries(t.dataAttributes))i.setAttribute("data-"+e,n);i.addEventListener("error",o),i.addEventListener("abort",o),i.addEventListener("load",function(){i.setAttribute("data-loaded","true"),n(i)}),s&&document.head.appendChild(i)})}(window.UNTUCKitConfig.yotpoReviewsLoaderUrl).then(()=>{console.log("starting yotpo widget")}).catch(e=>{console.error(e)}))})}}window.customElements.get("quickshop-modal")||customElements.define("quickshop-modal",qt);class Pt extends HTMLElement{constructor(){super(),this.addEventListener("click",e=>{e.preventDefault();const t=document.createElement("quickshop-modal");t.setAttribute("handle",this.dataset.handle||"");const n=he(t,{classes:"quickshop"});window.addEventListener(te.QUICKSHOP_CLOSE,()=>{n.close()},{once:!0})})}connectedCallback(){this.innerHTML='<button class="quickshop-v2">Quick Shop</button>'}}function Ot(e,t){return"SCRIPT"===e.nodeName?-1:"SCRIPT"===t.nodeName?1:0}window.customElements.get("quickshop-cta")||customElements.define("quickshop-cta",Pt);class Dt extends HTMLElement{_onSwatchClick;observer;productHandle;constructor(){super(),this._onSwatchClick=this.onSwatchClick.bind(this),this.addEventListener("click",this._onSwatchClick)}connectedCallback(){this.productHandle=this.dataset.productHandle,this.children.length?this.updateColorSwatchCount():(this.observer=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.length&&this.updateColorSwatchCount()})}),this.observer.observe(this,{childList:!0}))}disconnectedCallback(){this.removeEventListener("click",this._onSwatchClick),this.observer&&this.observer.disconnect()}async onSwatchClick(e){const t=e.target;if(t.classList.contains("js-product-option")&&!t.classList.contains("product-option--selected")){e.stopPropagation();const n=t.closest(".product-grid-item-v2__product-swatch-container");if(n){n.querySelectorAll(".js-product-option").forEach(e=>e.classList.remove("product-option--selected")),t.classList.add("product-option--selected");const e=t.dataset.productHandle,o=await xt(`/collections/${window.collectionHandle}/products/${e}`,"plp-card"),s=t.closest("product-card"),i=(new DOMParser).parseFromString(o,"text/html").body.firstElementChild;i.dataset.page=s.dataset.page,i.dataset.id=t.dataset.productId,s.replaceWith(i),i.querySelector(".product-grid-item-v2__product-swatch-container").replaceWith(n),"function"==typeof window.boostSwapImage&&window.boostSwapImage(),(0,re.refreshWishlistIcons)(".boost-pfs-filter-products")}}}renderAdditionalColorSwatches(e,t){const n=document.createElement("a");return n.classList.add("color-swatch-list__additional-color-swatches",`color-swatch-list__additional-color-swatches--${t}`),n.href=window.collectionHandle?`/collections/${window.collectionHandle}/products/${this.productHandle}`:`/products/${this.productHandle}`,n.textContent=`+ ${e}`,n}updateColorSwatchCount(){const e=this.querySelectorAll(".product-option__value-listitem"),t=e.length,n=this.firstElementChild,o=t>5,s=t>10,i=t>6;o&&n?.appendChild(this.renderAdditionalColorSwatches(t-4,"mobile")),s&&n?.appendChild(this.renderAdditionalColorSwatches(t-9,"tablet")),i&&n?.appendChild(this.renderAdditionalColorSwatches(t-5,"desktop")),e.forEach((e,t)=>{const n=t+1;o&&n>=5&&e.classList.add("color-swatch-list__listitem--hidden-mobile"),s&&n>=10&&e.classList.add("color-swatch-list__listitem--hidden-tablet"),i&&n>=6&&e.classList.add("color-swatch-list__listitem--hidden-desktop")})}}window.customElements.get("color-swatch-list")||customElements.define("color-swatch-list",Dt);class Ut extends HTMLElement{trigger=null;closeBtn=null;productFetched=!1;isFetching=!1;connectedCallback(){this.trigger=this.querySelector(".split-layout__hotspot-trigger"),this.closeBtn=this.querySelector(".split-layout__hotspot-popup-close"),this.trigger?.addEventListener("click",this.handleTriggerClick),this.closeBtn?.addEventListener("click",this.handleCloseClick),document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){this.trigger?.removeEventListener("click",this.handleTriggerClick),this.closeBtn?.removeEventListener("click",this.handleCloseClick),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleKeydown)}handleTriggerClick=async e=>{if(e.stopPropagation(),this.isFetching)return;if(this.hasAttribute("open"))return void this.close();
1document.querySelectorAll("hotspot-button[open]").forEach(e=>e.close());const t=this.getAttribute("product-handle");t&&!this.productFetched&&await this.fetchAndRenderPopup(t),this.querySelector(".split-layout__hotspot-popup")&&this.open()};handleCloseClick=e=>{e.stopPropagation(),this.close()};handleDocumentClick=()=>{this.hasAttribute("open")&&this.close()};handleKeydown=e=>{"Escape"===e.key&&this.hasAttribute("open")&&this.close()};async fetchAndRenderPopup(e){this.isFetching=!0;try{const t=await xt(`/products/${e}`,"hotspot-popup-api");this.insertAdjacentHTML("beforeend",t),this.productFetched=!0,this.closeBtn=this.querySelector(".split-layout__hotspot-popup-close"),this.closeBtn?.addEventListener("click",this.handleCloseClick)}catch{}finally{this.isFetching=!1}}open(){this.setAttribute("open",""),this.trigger?.setAttribute("aria-expanded","true")}close(){this.removeAttribute("open"),this.trigger?.setAttribute("aria-expanded","false")}}function Nt(){console.log("UNTUCKit : Layout : Theme : ready"),V.init(),de.init(),ee.init(),ce.init(),z.default.init(),le.default.update(),ie.init(),document.addEventListener("submit",Ht),b.subscribe(()=>{(0,R.attachSessionIdsToCart)(),(0,re.initWishlistEventListeners)(),async function(){const e=window.UNTUCKitConfig.kustomerLiveChat;if(e?.toggle){try{await function(e,t){const n=document.querySelector(`script[src="${e}"]`);return"true"===n?.dataset.kustomerStarted?Promise.resolve():new Promise((o,s)=>{let i=n;const r=()=>{window.removeEventListener(F,r),i?.setAttribute("data-kustomer-started","true"),o()};window.addEventListener(F,r),n?window.Kustomer&&r():(i=document.createElement("script"),i.src=e,i.setAttribute("data-kustomer-api-key",t),i.addEventListener("error",()=>{window.removeEventListener(F,r),s(new Error("Failed to load Kustomer widget script"))}),document.body.appendChild(i))})}(e.scriptUrl,e.apiKey)}catch(e){return void console.error("Failed to load Kustomer live chat script",e)}window.Kustomer?(console.log("starting Kustomer live chat..."),window.Kustomer.start({brandId:e.brandId,chatIconSize:e.chatIconSize,chatIconPosition:{alignment:"right",verticalPadding:10,horizontalPadding:10},preferredView:e.preferredView},()=>{(0,U.syncFloatingIconsPosition)(),window.Kustomer?.addListener?.("onOpen",()=>(0,j.toggleAccessibleIcon)("hide")),window.Kustomer?.addListener?.("onClose",()=>(0,j.toggleAccessibleIcon)("show")),window.Kustomer?.addListener?.("onConversationCreate",W),window.Kustomer?.isChatAvailable?.(e=>{console.log("Kustomer chat availability:",e?.availability),"hidden"!==e?.availability&&"disabled"!==e?.availability||console.warn("Kustomer chat icon is not shown — check Chat Management settings (business hours, URL overrides, or brand availability).")})})):console.error("Kustomer not found on window object")}}(),document.addEventListener("click",e=>{const t=e.target;(0,U.getElementOrParentByClassName)(t,"js-marketing-opt-in")&&(e.preventDefault(),window.__attentive&&(window.innerWidth>=760?window.__attentive.trigger(null,null,null,window.UNTUCKitConfig.thirdPartyToggles.attentiveManualPopupDesktopId):window.__attentive.trigger(null,null,null,window.UNTUCKitConfig.thirdPartyToggles.attentiveManualPopupMobileId)))}),window.UNTUCKitConfig.nearbyToggle.enable&&(0,yt.initSelectedStore)(),yt.selectedStoreState.subscribe(e=>{if(e){const t=i.cartState.get();t&&e.COLLECTION_HANDLE&&t?.attributes?._selected_store_handle!==e.COLLECTION_HANDLE&&(0,i.updateCart)({attributes:{_selected_store_handle:e.COLLECTION_HANDLE}})}}),window.addEventListener("nobi-close-drawer",()=>{R.dialogStack.pop("nobi-search")}),window.addEventListener("nobi-chatbot-viewed",()=>{R.dialogStack.push("nobi-search")})}),new URLSearchParams(window.location.search).get("highstreet")&&Array.from(document.querySelectorAll("a[href^='/'], a[href*='untuckit.']:not([href^='mailto'])")).forEach(e=>{e.href&&(e.href+=(e.href.includes("?")?"&":"?")+"highstreet=true&hlt=1")});const e=new URLSearchParams(location.search).get("section");e&&(0,U.waitForElements)(`#${e}`).then(e=>{(0,N.scrollTo)(e[0])})}async function Ht(e){const t=e.target;if(t.action?.includes("/checkout")){const n=t.querySelector(".js-checkout-spinner");n&&n.classList.remove("hidden");const o=t.querySelector(".js-checkout-text");if(o&&(o.textContent=window.UNTUCKitConfig.checkoutLoadingText),"function"==typeof window.nv_shopnow?.hasSession&&window.nv_shopnow.hasSession()&&"function"==typeof window.nv_shopnow.checkout)try{e.preventDefault();const t=await window.nv_shopnow.checkout();location.replace(t.weburl)}catch(e){console.error("narvar shop now error",e.message||e)}}}window.customElements.get("hotspot-button")||customElements.define("hotspot-button",Ut),function(){const e=window.UNTUCKitConfig?.sentry;e?.enable&&!function(){const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&(function(){const e=1===_()?.["pieeye-category-performance"];return console.log("consents to performance",e),e}()?D():w.subscribe(()=>{D()}))}(),(0,i.getCart)(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Nt,{once:!0}):Nt(),window.addEventListener("pageshow",e=>{e.persisted&&window.location.reload()});const Bt=window.segmentLayer?.customer;if(Bt){(0,R.emitShopifyEvent)("utk_identify_customer",window.segmentLayer.customer);const e=!!Bt?.id;(0,R.csqTrackDynamicVariable)("login_state",e?"logged_in":"guest"),Bt.email&&((0,R.getCSQGlobal)().push(["trackPageEvent",`@user-identifier@${Bt.email}`]),(0,R.csqTrackDynamicVariable)("customer_type",(Bt.order_count??0)>1?"returning":"new"),(0,R.csqTrackDynamicVariable)("customer_order_count",Bt.order_count??0),(0,R.csqTrackDynamicVariable)("customer_lifetime_value",Math.round(Bt.lifetime_value??0)))}window.UNTUCKitConfig.thirdPartyToggles.swym&&window.UNTUCKitConfig.thirdPartyToggles.swymSaveForLater&&(0,re.initSaveForLater)()},1072(e,t,n){n.r(t);var o=n(5580),s=n.n(o);const i=(()=>{console.log("UNTUCKit : Module : LazyImages : loaded");const e=window.lazyImg=new(s())({elements_selector:"img:not(.shogun-image):not(.boost-pfs-filter-product-item-main-image):not(.boost-pfs-filter-product-item-flip-image), picture, .lazy-background, .lazy-video"});return{update:(t=0)=>{console.log("UNTUCKit : LazyImages : update",t),setTimeout(()=>
1{e.update()},t)}}})();n.d(t,["default",0,i])},2313(e,t,n){n.r(t);var o=n(4019);const s=(()=>{console.log("UNTUCKit : Module : Scroll : loaded");const e=()=>document.querySelector(".js-top");let t=!1,n=0;const s=()=>null!==document.querySelector(".no-scroll"),i=e=>e.getBoundingClientRect().top+window.scrollY,r=()=>{const n=e();if(!n)return;const s=document.querySelector("footer"),r=window.innerHeight,a=s?i(s):0,c=i(n)+n.offsetHeight;t?(c>=a||c<=r)&&(n.classList.remove("is-active"),(0,o.updateFloatingIconsPosition)(-1*n.offsetHeight),t=!1):c<a&&c>r&&(n.classList.add("is-active"),(0,o.updateFloatingIconsPosition)(n.offsetHeight),t=!0)},a=e=>{if(!(e.currentTarget instanceof HTMLAnchorElement))return;e.preventDefault();const t=e.currentTarget.getAttribute("href")?.split("#")[1];t&&l(t)},c=e=>{e.preventDefault(),l(0)};function l(e){const t=document.querySelector("header")?.offsetHeight??0;let n;if("number"==typeof e)n=e;else{const t=document.getElementById(e);if(!t)return;n=i(t)}window.scrollTo({top:n-t,left:0,behavior:"smooth"})}return{animate:l,init:()=>{console.log("UNTUCKit : Module : Scroll : init"),window.addEventListener("scroll",r),document.querySelectorAll(".js-faq").forEach(e=>{e.addEventListener("click",a)}),e()?.addEventListener("click",c)},lock:function(){s()||(n=window.scrollY,document.body.style.top=-n+"px",document.body.classList.add("no-scroll"),document.documentElement.style.overflow="hidden")},unlock:function(){s()&&(document.body.style.top="",document.body.classList.remove("no-scroll"),document.documentElement.style.overflow="",window.scrollTo(0,n))}}})();n.d(t,["default",0,s])}},e=>{e.O(0,[96,804,386,481],()=>e(4726)),e.O()}]);
2//# sourceMappingURL=layout.theme.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.