1(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");i<s.length;i++)__sections__[s[i]]=!0})(),(function(){if(!(!__sections__["bp-article"]&&!Shopify.designMode))try{class BpArticle extends HTMLElement{connectedCallback(){this.buildToc(),this.bindShare(),this.bindShoppable()}bindShoppable(){this.querySelectorAll("[data-bp-article-shop-card]").forEach(card=>{const trigger=card.querySelector(".quick-add__button--choose"),btn=card.querySelector(".bp-article__shop-card-trigger");!btn||!trigger||btn.addEventListener("click",()=>{window.bpOpenProductDrawer?window.bpOpenProductDrawer(trigger):trigger.click()})})}bindShare(){const wrap=this.querySelector("[data-bp-share]");if(!wrap)return;const url=wrap.dataset.shareUrl||window.location.href,title=wrap.dataset.shareTitle||document.title,toast=wrap.querySelector("[data-bp-share-toast]"),showToast=msg=>{toast&&(toast.textContent=msg,toast.removeAttribute("hidden"),toast.offsetHeight,toast.classList.add("is-visible"),clearTimeout(toast._t),toast._t=setTimeout(()=>{toast.classList.remove("is-visible"),setTimeout(()=>toast.setAttribute("hidden",""),220)},2200))};wrap.querySelectorAll("[data-bp-share-window]").forEach(a=>{a.addEventListener("click",e=>{e.preventDefault(),window.open(a.href,"bp-share","width=600,height=560,noopener")})}),wrap.querySelectorAll("[data-bp-share-copy]").forEach(btn=>{btn.addEventListener("click",async()=>{const platform=btn.dataset.platform||"app";if(navigator.share)try{await navigator.share({title,url});return}catch{}try{await navigator.clipboard.writeText(url),showToast(`Link copied \u2014 paste into ${platform}`)}catch{const ta=document.createElement("textarea");ta.value=url,ta.setAttribute("readonly",""),ta.style.position="absolute",ta.style.left="-9999px",document.body.appendChild(ta),ta.select();try{document.execCommand("copy"),showToast(`Link copied \u2014 paste into ${platform}`)}catch{showToast("Copy failed \u2014 long-press the URL above")}document.body.removeChild(ta)}})})}buildToc(){const toc=this.querySelector("[data-toc]"),list=this.querySelector("[data-toc-list]"),body=this.querySelector("[data-body]");if(!toc||!list||!body)return;const headings=body.querySelectorAll("h2");if(!headings.length){toc.remove();return}const slugify=str=>str.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"");
1headings.forEach((h,i)=>{let id=h.id||slugify(h.textContent);id||(id=`section-${i+1}`),document.getElementById(id)&&document.getElementById(id)!==h&&(id=`${id}-${i+1}`),h.id=id;const li=document.createElement("li"),a=document.createElement("a");a.href=`#${id}`,a.textContent=h.textContent.trim(),li.appendChild(a),list.appendChild(li)}),toc.removeAttribute("hidden")}}customElements.get("bp-article")||customElements.define("bp-article",BpArticle)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-blog"]&&!Shopify.designMode))try{class BpBlog extends HTMLElement{connectedCallback(){this.initCardMetaWrap(),this.feature=this.querySelector("[data-feature]"),this.feature&&(this.track=this.feature.querySelector("[data-feature-track]"),this.slides=this.feature.querySelectorAll("[data-feature-slide]"),this.progress=this.feature.querySelector("[data-feature-progress]"),this.prev=this.feature.querySelector("[data-feature-prev]"),this.next=this.feature.querySelector("[data-feature-next]"),this.index=0,this.total=this.slides.length,!(this.total<2)&&(this.prev?.addEventListener("click",()=>this.go(this.index-1)),this.next?.addEventListener("click",()=>this.go(this.index+1)),this.bindSwipe(),this.syncSlideA11y(),this.feature.addEventListener("scroll",()=>{this.feature.scrollLeft!==0&&(this.feature.scrollLeft=0),this.feature.scrollTop!==0&&(this.feature.scrollTop=0)},{passive:!0}),this._onResize=()=>this.go(this.index),window.addEventListener("resize",this._onResize,{passive:!0})))}initCardMetaWrap(){this.metas=this.querySelectorAll(".bp-blog__card-meta"),this.metas.length&&(this.syncCardMetaWrap(),this._onMetaResize=()=>this.syncCardMetaWrap(),window.addEventListener("resize",this._onMetaResize,{passive:!0}),document.fonts&&document.fonts.ready&&document.fonts.ready.then(()=>this.syncCardMetaWrap()))}syncCardMetaWrap(){this.metas.forEach(meta=>{const author=meta.querySelector(".bp-blog__card-author"),time=meta.querySelector("time");!author||!time||meta.classList.toggle("is-wrapped",time.offsetTop>author.offsetTop)})}syncSlideA11y(){this.slides.forEach((s,idx)=>{idx===this.index?(s.removeAttribute("inert"),s.removeAttribute("aria-hidden")):(s.setAttribute("inert",""),s.setAttribute("aria-hidden","true"))})}bindSwipe(){let startX=0,startY=0,active=!1;this.track.addEventListener("touchstart",e=>{!e.touches||e.touches.length!==1||(startX=e.touches[0].clientX,startY=e.touches[0].clientY,active=!0)},{passive:!0}),this.track.addEventListener("touchend",e=>{if(!active)return;active=!1;const t=e.changedTouches&&e.changedTouches[0]||null;if(!t)return;const dx=t.clientX-startX,dy=t.clientY-startY;Math.abs(dx)<40||Math.abs(dx)<Math.abs(dy)||(dx<0?this.go(this.index+1):this.go(this.index-1))},{passive:!0}),this.track.addEventListener("touchcancel",()=>{active=!1},{passive:!0})}go(i){this.index=(i+this.total)%this.total;const step=this.feature.clientWidth;if(this.slides.forEach(s=>{s.style.width=step+"px"}),this.track.style.transform=`translateX(-${this.index*step}px)`,this.slides.forEach((s,idx)=>s.classList.toggle("is-active",idx===this.index)),this.progress){const pct=(this.index+1)/this.total*100;this.progress.style.setProperty("--progress",`${pct}%`)}this.syncSlideA11y(),this.feature.scrollLeft=0,this.feature.scrollTop=0}}customElements.get("bp-blog")||customElements.define("bp-blog",BpBlog)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-bundle-pdp"]&&!Shopify.designMode))try{class BpBundlePdp extends HTMLElement{connectedCallback(){this.requiredItemCount=parseInt(this.dataset.requiredItemCount,10)||0,this.amplienceBase=this.dataset.amplienceBase||"",this.amplienceBundleId=this.dataset.amplienceBundleId||"",this.cards=Array.from(this.querySelectorAll("[data-bp-bundle-card]")),this.addAllBtn=this.querySelector("[data-bp-bundle-add-all]"),this.addAllLabel=this.querySelector("[data-bp-bundle-add-all-label]"),this.clearBtn=this.querySelector("[data-bp-bundle-clear]"),this.priceEl=this.querySelector("[data-bp-bundle-pricing-price]"),this.compareEl=this.querySelector("[data-bp-bundle-pricing-compare]"),this.pricingEl=this.querySelector("[data-bp-bundle-pricing]"),this.galleryRail=this.querySelector("[data-bp-bundle-gallery-rail]"),this.selectedVariants=new Map,this.wireCards(),this.wireAddAll(),this.wireClear(),this.refresh(),this.amplienceBundleId&&this.fetchAmplienceHero().catch(()=>{})}wireCards(){this.cards.forEach(card=>{const select=card.querySelector("[data-bp-bundle-card-variant-select]");if(!select)return;const initialOpt=select.options[select.selectedIndex];initialOpt&&initialOpt.dataset.available==="true"&&this.selectedVariants.set(card.dataset.productId,{id:initialOpt.value,price:parseInt(initialOpt.dataset.price,10),available:!0,handle:card.dataset.productHandle}),card.querySelectorAll('.bp-bundle-card__option-value input[type="radio"]').forEach(r=>{r.addEventListener("change",()=>this.onOptionChange(card))}),card.querySelectorAll(".bp-bundle-card__option-value").forEach(label=>{label.addEventListener("click",e=>{const input=label.querySelector('input[type="radio"]');input&&!input.checked&&(input.checked=!0,input.dispatchEvent(new Event("change",{bubbles:!0})))})})})}onOptionChange(card){const picked=[null,null,null];card.querySelectorAll("fieldset[data-option-position]").forEach(fs=>{const pos=parseInt(fs.dataset.optionPosition,10),checked=fs.querySelector('input[type="radio"]:checked');checked&&(picked[pos-1]=checked.value)}),card.querySelectorAll(".bp-bundle-card__option-value").forEach(label=>{const input=label.querySelector('input[type="radio"]');label.classList.toggle("is-selected",!!(input&&input.checked))});const select=card.querySelector("[data-bp-bundle-card-variant-select]");let matched=null;
1if(Array.from(select.options).forEach(opt=>{const o1=opt.dataset.option1||null,o2=opt.dataset.option2||null,o3=opt.dataset.option3||null;(picked[0]===null||o1===picked[0])&&(picked[1]===null||o2===picked[1])&&(picked[2]===null||o3===picked[2])&&(matched||(matched=opt))}),matched){select.value=matched.value;const productId=card.dataset.productId,available=matched.dataset.available==="true",price=parseInt(matched.dataset.price,10);available?this.selectedVariants.set(productId,{id:matched.value,price,available,handle:card.dataset.productHandle}):this.selectedVariants.delete(productId);const priceEl=card.querySelector("[data-bp-bundle-card-price]");priceEl&&(priceEl.textContent=this.formatMoney(price)),card.querySelectorAll("[data-bp-bundle-card-option-value]").forEach(lbl=>{const pos=parseInt(lbl.dataset.bpBundleCardOptionValue,10)-1;picked[pos]!==null&&(lbl.textContent=picked[pos])})}this.refresh()}wireAddAll(){this.addAllBtn&&this.addAllBtn.addEventListener("click",e=>{e.preventDefault(),this.requiredMet()&&this.handleAddAllToBag()})}wireClear(){this.clearBtn&&this.clearBtn.addEventListener("click",e=>{e.preventDefault(),this.selectedVariants.clear(),this.cards.forEach(card=>{card.querySelectorAll('input[type="radio"]').forEach(r=>{r.checked=!1}),card.querySelectorAll(".bp-bundle-card__option-value").forEach(l=>l.classList.remove("is-selected"))}),this.refresh()})}refresh(){const count=this.selectedVariants.size,met=this.requiredMet();this.addAllBtn&&(this.addAllBtn.disabled=!met,this.addAllLabel&&(this.addAllLabel.textContent=met?"ADD ALL TO BAG":"SELECT SIZES & COLORS")),this.clearBtn&&(this.clearBtn.hidden=count===0),this.recomputePrice(met)}requiredMet(){const count=this.selectedVariants.size;return count>0&&count>=this.requiredItemCount}recomputePrice(met){if(!this.pricingEl||!this.priceEl)return;const discountType=this.pricingEl.dataset.discountType||"percentage",discountValue=parseFloat(this.pricingEl.dataset.discountValue)||0,baseTotal=parseFloat(this.pricingEl.dataset.baseTotal)||0,yourItemsTotal=Array.from(this.selectedVariants.values()).reduce((sum,v)=>sum+(v.price||0)/100,0),reference=met&&discountValue>0?yourItemsTotal:baseTotal;let discounted=reference;discountValue>0&&(discountType==="percentage"?discounted=reference-reference*(discountValue/100):discounted=reference-discountValue),this.priceEl.textContent="$"+this.stripTrailingZeros(discounted.toFixed(2)),this.compareEl&&(this.compareEl.textContent="$"+this.stripTrailingZeros(reference.toFixed(2)))}async handleAddAllToBag(){const entries=Array.from(this.selectedVariants.values());if(entries.length===0)return;const items=await Promise.all(entries.map(async v=>{const item={id:v.id,quantity:1};try{if(window.bpLips&&v.handle){const props=await window.bpLips.forVariant(v.handle,v.id);props&&Object.keys(props).length&&(item.properties=props)}}catch{}return item}));if(items.length!==0){this.addAllBtn.disabled=!0;try{const root=window.Shopify&&window.Shopify.routes&&window.Shopify.routes.root||"/",response=await fetch(root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items})});if(!response.ok)throw new Error("cart/add HTTP "+response.status);const data=await response.json();document.dispatchEvent(new CustomEvent("product:added",{detail:{items:data&&data.items&&data.items[0],triggerArea:"other"}})),window.bpOpenCartDrawer&&window.bpOpenCartDrawer()}catch(err){console.error("[bp-bundle-pdp] add-all failed",err),this.addAllBtn.disabled=!1}}}async fetchAmplienceHero(){const url=`${this.amplienceBase}/s/bostonproper/${encodeURIComponent(this.amplienceBundleId)}_SET.json?protocol=https`,res=await fetch(url,{cache:"force-cache"});if(!res.ok)throw new Error("amplience HTTP "+res.status);const data=await res.json(),items=data&&data.items||[];items.length===0||!this.galleryRail||(this.galleryRail.innerHTML=items.map(it=>{if(it.type==="video")return` 2 <div class="bp-bundle-pdp__gallery-slide"> 3 <video class="bp-bundle-pdp__gallery-img" controls autoplay muted loop playsinline preload="auto" poster="${it.src}"> 4 <source src="${it.src}/mp4_720p" type="video/mp4"> 5 <source src="${it.src}/webm_720p" type="video/webm"> 6 <source src="${it.src}/mp4_480p" type="video/mp4"> 7 </video> 8 </div>`;const srcset=[400,800,1200,1600,1920].map(w=>`${it.src}?w=${w}&fmt=auto ${w}w`).join(", ");return` 9 <div class="bp-bundle-pdp__gallery-slide"> 10 <img class="bp-bundle-pdp__gallery-img" 11 src="${it.src}?w=1200&fmt=auto" 12 srcset="${srcset}" 13 sizes="(min-width: 1024px) 60vw, 100vw" 14 alt="${this.dataset.bundleName}" 15 loading="lazy"> 16 </div>`}).join(""))}formatMoney(cents){return"$"+this.stripTrailingZeros((cents/100).toFixed(2))}stripTrailingZeros(s){return String(s).replace(/\.00$/,"")}}customElements.get("bp-bundle-pdp")||customElements.define("bp-bundle-pdp",BpBundlePdp)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-cart-page"]&&!Shopify.designMode))try{class BpCartPage extends HTMLElement{connectedCallback(){document.addEventListener("cart:updated",e=>{e.detail&&e.detail.cart?this.applyCart(e.detail.cart):this.refresh()}),document.addEventListener("cart:update",e=>{const detail=e.detail||{};detail.data&&detail.data.didError||(detail.resource?this.applyCart(detail.resource):this.refresh())}),document.addEventListener("discount_kit:cart_changed",()=>{this.refresh()});const track=this.querySelector("[data-bp-ctl-track]"),prev=this.querySelector("[data-bp-ctl-prev]"),next=this.querySelector("[data-bp-ctl-next]");if(track&&prev&&next){const step=()=>Math.max(160,track.clientWidth/4);prev.addEventListener("click",()=>track.scrollBy({left:-step(),behavior:"smooth"})),next.addEventListener("click",()=>track.scrollBy({left:step(),behavior:"smooth"}))}this.wireNarvarTotalMirror()}wireNarvarTotalMirror(){const PAGE_MOUNT="#narvar-cart-page-dp-buttons",DRAWER_MOUNT="#narvar-cart-drawer-dp-buttons",priceEl=mountSel=>
16{const m=document.querySelector(mountSel);return m?m.querySelector("#checkout-price"):null},mirror=()=>{const src=priceEl(DRAWER_MOUNT),dst=priceEl(PAGE_MOUNT);if(!src||!dst)return;const want=src.textContent;want&&dst.textContent!==want&&(dst.textContent=want)};let observing=!1;const attach=()=>{if(observing)return!0;const drawerMount=document.querySelector(DRAWER_MOUNT);if(!drawerMount)return!1;try{new MutationObserver(mirror).observe(drawerMount,{childList:!0,subtree:!0,characterData:!0}),observing=!0}catch{}return observing},onCart=()=>{mirror(),setTimeout(mirror,800)};document.addEventListener("cart:updated",onCart),document.addEventListener("cart:update",onCart);let tries=0;const MAX=50,tick=()=>{const ready=attach();mirror(),++tries<MAX&&!(ready&&priceEl(PAGE_MOUNT)&&priceEl(DRAWER_MOUNT))&&setTimeout(tick,300)};tick()}async refresh(){try{const cart=await(await fetch("/cart.js",{cache:"no-store",credentials:"same-origin"})).json();this.applyCart(cart)}catch(e){console.error("[bp-cart-page] refresh failed",e)}}applyCart(cart){const bpRealCount=cart.items.reduce((n,i)=>(i.sku||"").toLowerCase()==="narvardeliveryprotection"?n:n+i.quantity,0);if(bpRealCount===0&&cart.items.length>0&&!this._clearingCart){this._clearingCart=!0,fetch("/cart/clear.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},cache:"no-store",credentials:"same-origin"}).then(r=>r.json()).then(c=>document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:c}}))).catch(e=>console.error("[bp-cart-page] clear failed",e)).finally(()=>{this._clearingCart=!1});return}const bubble=this.querySelector("[data-bp-cart-bubble]");bubble&&(bubble.textContent=bpRealCount);const bpMerchSubtotal=cart.items.reduce((sum,i)=>(i.sku||"").toLowerCase()==="narvardeliveryprotection"?sum:sum+i.final_line_price,0),subtotal=this.querySelector("[data-bp-cart-subtotal]");subtotal&&(subtotal.textContent=this.formatMoney(bpMerchSubtotal));const items=cart.items.filter(i=>(i.sku||"").toLowerCase()!=="narvardeliveryprotection"),byKey=new Map(items.map(i=>[i.key,i])),claimed=new Set;this.querySelectorAll("[data-bp-cart-line]").forEach(line=>{const key=line.dataset.lineKey;let item=key&&!claimed.has(key)?byKey.get(key):null;if(!item){const vid=line.dataset.variant;vid&&(item=items.find(i=>!claimed.has(i.key)&&String(i.variant_id)===String(vid)))}if(!item){line.style.transition="opacity 0.2s ease, transform 0.2s ease",line.style.opacity="0",line.style.transform="translateX(8px)",setTimeout(()=>line.remove(),220);return}claimed.add(item.key),line.dataset.lineKey!==item.key&&(line.dataset.lineKey=item.key);const qty=line.querySelector("[data-bp-qty-input]");qty&&qty.value!==String(item.quantity)&&(qty.value=item.quantity);const price=line.querySelector("[data-bp-line-price]");price&&(price.textContent=this.formatMoney(item.final_line_price));const compare=line.querySelector("[data-bp-line-compare]");if(compare){const hasDiscount=item.original_line_price>item.final_line_price;compare.hidden=!hasDiscount,hasDiscount&&(compare.textContent=this.formatMoney(item.original_line_price))}}),items.some(i=>!claimed.has(i.key))&&this.syncItemsList();const itemsList=this.querySelector("[data-bp-cart-items]"),emptyState=this.querySelector("[data-bp-cart-empty]"),side=this.querySelector("[data-bp-cart-side]"),isEmpty=cart.item_count===0;itemsList&&itemsList.toggleAttribute("hidden",isEmpty),emptyState&&emptyState.toggleAttribute("hidden",!isEmpty),side&&side.toggleAttribute("hidden",isEmpty)}async syncItemsList(){try{let html="",sectionId="";const wrapper=this.closest('[id^="shopify-section-"]');if(wrapper&&(sectionId=wrapper.id.replace(/^shopify-section-/,"")),sectionId)try{const res=await fetch(`${window.location.pathname}?sections=${sectionId}`,{headers:{Accept:"application/json"},cache:"no-store",credentials:"same-origin"});if(res.ok){const candidate=(await res.json())[sectionId];candidate&&candidate.includes("data-bp-cart-items")&&(html=candidate)}}catch{}html||(html=await(await fetch(window.location.pathname,{cache:"no-store",credentials:"same-origin"})).text());const freshList=new DOMParser().parseFromString(html,"text/html").querySelector("[data-bp-cart-items]"),currentList=this.querySelector("[data-bp-cart-items]");freshList&¤tList&&(currentList.innerHTML=freshList.innerHTML,currentList.hidden=!1,document.dispatchEvent(new CustomEvent("bp:cart-lines:rendered")))}catch(e){console.error("[bp-cart-page] syncItemsList failed",e)}}formatMoney(cents){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(cents/100).replace(/\.00$/,"")}}customElements.get("bp-cart-page")||customElements.define("bp-cart-page",BpCartPage)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-catalog-request"]&&!Shopify.designMode))try{window.__bpCatalogKlaviyoBound||(window.__bpCatalogKlaviyoBound=!0,window.addEventListener("klaviyoForms",function(e){if(!(!e||!e.detail)){var embed=document.querySelector("[data-bp-catalog-form]");if(embed){var catalogFormId=embed.getAttribute("data-bp-klaviyo-form-id");if(!(e.detail.formId&&catalogFormId&&e.detail.formId!==catalogFormId)&&e.detail.type==="submit"){var f=e.detail.metaData||{},now=new Date,ts=now.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})+" "+now.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),kl=window.klaviyo||[];try{kl.push(["track","Catalog Request",{email:f.$email,firstName:f.$first_name,lastName:f.$last_name,address1:f.$address1,address2:f.$address2,city:f.$city,state:f.$region,zip:f.$zip,phone:f.$phone,requestDate:ts}])}catch{}var intro=document.querySelector("[data-bp-cr-intro]"),success=document.querySelector("[data-bp-cr-success]");intro&&success&&(intro.setAttribute("hidden",""),success.removeAttribute("hidden"))}}}}))}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-category-showcase"]&&!Shopify.designMode))try{class BpCategoryShowcase extends HTMLElement{connectedCallback(){this.cats=Array.from(this.querySelectorAll(".bp-cs__cat")),this.frames=Array.from(this.querySelectorAll(".bp-cs__media-frame")),this.mobileCta=this.querySelector("[data-mobile-cta]"),this.cats.length!==0&&(this.activeIndex=0,this.autoplayMs=parseInt(this.dataset.autoplayInterval,10)||4e3,this.mq=window.matchMedia("(max-width: 1023px)"),this.cats.forEac
16h((cat,i)=>{const enter=()=>this.setActive(i);cat.addEventListener("mouseenter",enter),cat.addEventListener("focusin",enter)}),this.handleMqChange=this.handleMqChange.bind(this),this.mq.addEventListener("change",this.handleMqChange),this.handleMqChange())}disconnectedCallback(){this.stopAutoplay(),this.mq?.removeEventListener("change",this.handleMqChange)}handleMqChange(){this.mq.matches?this.startAutoplay():this.stopAutoplay()}setActive(index){if(index!==this.activeIndex&&(this.cats[this.activeIndex]?.classList.remove("is-active"),this.frames[this.activeIndex]?.classList.remove("is-active"),this.cats[index]?.classList.add("is-active"),this.frames[index]?.classList.add("is-active"),this.activeIndex=index,this.mobileCta)){const link=this.cats[index]?.querySelector("a");link?.href&&(this.mobileCta.href=link.href)}}startAutoplay(){this.timer||window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this.timer=setInterval(()=>{const next=(this.activeIndex+1)%this.cats.length;this.setActive(next)},this.autoplayMs))}stopAutoplay(){this.timer&&(clearInterval(this.timer),this.timer=null)}}customElements.get("bp-category-showcase")||customElements.define("bp-category-showcase",BpCategoryShowcase)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-category-tiles"]&&!Shopify.designMode))try{class BpCategoryTiles extends HTMLElement{connectedCallback(){const rail=this.querySelector("[data-bp-ct-rail]"),indicator=this.querySelector("[data-bp-ct-indicator]");if(!rail||!indicator)return;const update=()=>{const visible=rail.clientWidth,total=rail.scrollWidth;if(total<=visible){indicator.style.display="none";return}indicator.style.display="";const overflow=total-visible,thumbW=visible/total*100,thumbX=overflow>0?rail.scrollLeft/overflow:0;indicator.style.setProperty("--bp-ct-thumb-w",thumbW+"%"),indicator.style.setProperty("--bp-ct-thumb-x",thumbX)};rail.addEventListener("scroll",update,{passive:!0}),window.addEventListener("resize",update),this._update=update,requestAnimationFrame(update)}disconnectedCallback(){this._update&&window.removeEventListener("resize",this._update)}}customElements.get("bp-category-tiles")||customElements.define("bp-category-tiles",BpCategoryTiles)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-collection-details"]&&!Shopify.designMode))try{class BpCollectionDetails extends HTMLElement{connectedCallback(){if(this._init)return;this._init=!0;const handle=(this.getAttribute("data-collection-handle")||"").trim();if(!handle){this.remove();return}const ns=this.getAttribute("data-namespace")||"custom",key=this.getAttribute("data-key")||"pdp_collection_story",maxCards=parseInt(this.getAttribute("data-max-cards"),10)||5,TOKEN=this.getAttribute("data-sf-token")||window.shop&&window.shop.br&&window.shop.br.token||"58fdfff8008a05ff5b33c7805423d6fd",apiUrl=(window.Shopify&&Shopify.routes&&Shopify.routes.root?Shopify.routes.root:"/")+"api/2024-07/graphql.json",query=` 17 query($handle:String!,$ns:String!,$key:String!){ 18 collection(handle:$handle){ 19 metafield(namespace:$ns,key:$key){ 20 reference{ 21 ... on Metaobject{ 22 headline: field(key:"headline"){ value } 23 subcopy: field(key:"subcopy"){ value } 24 cards: field(key:"cards"){ 25 references(first: ${maxCards}){ 26 nodes{ 27 ... on Metaobject{ 28 title: field(key:"title"){ value } 29 subtitle: field(key:"subtitle"){ value } 30 link: field(key:"link"){ value } 31 image: field(key:"image"){ 32 reference{ ... on MediaImage{ image{ url altText width height } } } 33 } 34 } 35 } 36 } 37 } 38 } 39 } 40 } 41 } 42 }`;fetch(apiUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-Shopify-Storefront-Access-Token":TOKEN},body:JSON.stringify({query,variables:{handle,ns,key}})}).then(r=>r.ok?r.json():null).then(j=>{const story=j&&j.data&&j.data.collection&&j.data.collection.metafield&&j.data.collection.metafield.reference;if(!story){this.remove();return}this.render(story,maxCards)}).catch(()=>this.remove())}render(story,maxCards){const headline=story.headline&&story.headline.value,subcopy=story.subcopy&&story.subcopy.value,
42nodes=story.cards&&story.cards.references&&story.cards.references.nodes||[],head=this.querySelector("[data-bp-cd-head]"),hEl=this.querySelector("[data-bp-cd-headline]"),sEl=this.querySelector("[data-bp-cd-subcopy]");headline?hEl.textContent=headline:hEl.hidden=!0,subcopy?sEl.textContent=subcopy:sEl.hidden=!0,(headline||subcopy)&&(head.hidden=!1);const grid=this.querySelector("[data-bp-cd-grid]"),cards=nodes.slice(0,maxCards).map(n=>{const img=n.image&&n.image.reference&&n.image.reference.image,title=n.title&&n.title.value||"",subtitle=n.subtitle&&n.subtitle.value||"",link=n.link&&n.link.value||"",inner=(img?`<span class="bp-cd__card-media"><img class="bp-cd__card-img" src="${this.esc(img.url)}" alt="${this.esc(img.altText||title)}" loading="lazy"${img.width?` width="${img.width}"`:""}${img.height?` height="${img.height}"`:""}></span>`:'<span class="bp-cd__card-media"></span>')+(title?`<h3 class="bp-cd__card-title">${this.esc(title)}</h3>`:"")+(subtitle?`<p class="bp-cd__card-subtitle">${this.esc(subtitle)}</p>`:"");return link?`<a class="bp-cd__card bp-cd__card--link" href="${this.esc(link)}">${inner}</a>`:`<div class="bp-cd__card">${inner}</div>`});if(!cards.length&&!headline&&!subcopy){this.remove();return}grid.style.setProperty("--bp-cd-count",String(cards.length||1)),grid.innerHTML=cards.join(""),this.hidden=!1}esc(v){return String(v??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}}customElements.get("bp-collection-details")||customElements.define("bp-collection-details",BpCollectionDetails)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-collection-seo"]&&!Shopify.designMode))try{class BpCollectionSeo extends HTMLElement{connectedCallback(){this.bodyEl=this.querySelector("[data-bp-seo-body]"),this.toggleEl=this.querySelector("[data-bp-seo-toggle]"),this.labelEl=this.querySelector("[data-bp-seo-toggle-label]"),this.iconEl=this.querySelector(".bp-collection-seo__toggle-icon"),!(!this.bodyEl||!this.toggleEl)&&(this.moreLabel=this.dataset.moreLabel||"Learn More",this.lessLabel=this.dataset.lessLabel||"Show Less",this._evaluate=this._evaluate.bind(this),this.toggleEl.addEventListener("click",()=>this._onToggle()),window.addEventListener("resize",this._evaluate,{passive:!0}),requestAnimationFrame(this._evaluate))}disconnectedCallback(){window.removeEventListener("resize",this._evaluate)}_evaluate(){if(this.classList.contains("is-expanded"))return;this.classList.add("is-truncatable");const overflowing=this.bodyEl.scrollHeight-this.bodyEl.clientHeight>4;this.classList.toggle("is-truncatable",overflowing),this.toggleEl.hidden=!overflowing}_onToggle(){const expanded=this.classList.toggle("is-expanded");this.labelEl&&(this.labelEl.textContent=expanded?this.lessLabel:this.moreLabel),this.iconEl&&(this.iconEl.textContent=expanded?"\u2212":"+"),this.toggleEl.setAttribute("aria-expanded",expanded?"true":"false")}}customElements.get("bp-collection-seo")||customElements.define("bp-collection-seo",BpCollectionSeo)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-collection"]&&!Shopify.designMode))try{class BpCollection extends HTMLElement{connectedCallback(){if(this.grid=this.querySelector("[data-grid]"),!this.grid)return;this.bindBagIcons(this.grid),this.bindSort(),this.bindLoadMore(),this.bindPerPage(),this.bindFilterDrawer(),this.bindBackToTop(),this.dataset.brEnabled==="1"&&this.initBloomreach(),this.dataset.brEnabled!=="1"&&this.fireViewItemList();const grid=this.querySelector("[data-grid]");if(grid){const obs=new MutationObserver(()=>{clearTimeout(this._fireVilTimer),this._fireVilTimer=setTimeout(()=>this.fireViewItemList(),250)});obs.observe(grid,{childList:!0}),this._vilObs=obs}const sortSel=this.querySelector("[data-sort-select]");sortSel&&sortSel.addEventListener("change",()=>{window.bpTrack&&window.bpTrack.sort_change&&window.bpTrack.sort_change(sortSel.value,"Site Browse")}),this.syncSortPlacement()}syncSortPlacement(){try{const sortEl=this.querySelector(".bp-coll__sort"),drawer=this.querySelector("dialog.bp-filter-drawer"),drawerBody=drawer&&drawer.querySelector(".bp-filter-drawer__body"),toolbar=this.querySelector(".bp-coll__toolbar"),desktopTarget=this.querySelector(".bp-coll__right-group")||toolbar;if(!sortEl||!drawer||!drawerBody||!toolbar)return;const mq=window.matchMedia("(max-width: 767px)"),place=()=>{mq.matches?(sortEl.parentElement!==drawer||sortEl.nextElementSibling!==drawerBody)&&(drawer.insertBefore(sortEl,drawerBody),sortEl.classList.add("bp-coll__sort--in-drawer")):sortEl.parentElement!==desktopTarget&&(desktopTarget.appendChild(sortEl),sortEl.classList.remove("bp-coll__sort--in-drawer"))};place(),mq.addEventListener?mq.addEventListener("change",place):mq.addListener&&mq.addListener(place)}catch(err){console.warn("[bp-collection] syncSortPlacement skipped",err)}}fireViewItemList(){if(!window.bpTrack||!window.bpTrack.view_item_list)return;let cards=Array.prototype.slice.call(this.querySelectorAll("[data-bp-track-product]"));if(!cards.length)return;const measured=cards.filter(c=>{const r=c.getBoundingClientRect();return r.width>0&&r.height>0});measured.length&&(cards=measured.sort((a,b)=>{const ra=a.getBoundingClientRect(),rb=b.getBoundingClientRect();return Math.abs(ra.top-rb.top)>8?ra.top-rb.top:ra.left-rb.left}));const parsed=[];if(cards.forEach(card=>{try{const p=JSON.parse(card.getAttribute("data-bp-track-product"));p&&p.id&&parsed.push({id:String(p.id),p})}catch{}}),!parsed.length)return;this._vilReported||(this._vilReported=new Set,this._vilNextIndex=0);const currentIds=new Set(parsed.map(x=>x.id));let replaced=!1;this._vilReported.forEach(id=>{currentIds.has(id)||(replaced=!0)}),replaced&&(this._vilReported=new Set,this._vilNextIndex=0);const fresh=parsed.filter(x=>!this._vilReported.has(x.id));if(!fresh.length)return;const items=fresh.map(({p})=>({id:p.id,title:p.title,vendor:p.vendor,handle:p.handle,url:p.url,sku:p.sku,product_type:p.product_type,metafields:{BP_ProductAttributes:{bp_department:p.category||""}},selected_variant:p.selected_variant}
42)),collHandle=this.dataset.collectionHandle||"";window.bpTrack.view_item_list(items,"Site Browse",collHandle,"Product Listing",this._vilNextIndex),fresh.forEach(x=>this._vilReported.add(x.id)),this._vilNextIndex+=fresh.length}initBloomreach(){const cfg={host:this.dataset.brHost,accountId:this.dataset.brAccountId,domainKey:this.dataset.brDomainKey,catId:this.dataset.brCatId,viewId:this.dataset.brViewId||"",perPage:this.dataset.brPerPage,siteUrl:this.dataset.brSiteUrl,collectionHandle:this.dataset.collectionHandle||"",refUrl:document.referrer||location.href,authKey:window.shop&&window.shop.br&&window.shop.br.authKey||"",brUid:(function(){var raw=(document.cookie.match(/(?:^|;\s*)_br_uid_2=([^;]+)/)||[])[1]||"";try{return decodeURIComponent(raw)}catch{return raw}})(),cardQbStyle:this.dataset.bpCardQbStyle||"button",cardQvDest:this.dataset.bpCardQvDest||"drawer",cardQvVisD:this.dataset.bpCardQvVisD||"hover",cardQvVisM:this.dataset.bpCardQvVisM||"shown",cardSecondaryHover:this.dataset.bpCardSecondaryHover!=="false",contentInjection:this.dataset.brContentInjection==="1",onRender:grid=>this.bindBagIcons(grid)},tryInit=deadline=>{if(window.BpBloomreach&&typeof window.BpBloomreach.init=="function"){window.BpBloomreach.init(this,cfg);return}if(deadline<=0){console.warn("[bp-collection] BR script never loaded; keeping Liquid grid.");return}setTimeout(()=>tryInit(deadline-100),100)};tryInit(3e3)}bindFilterDrawer(){const opener=this.querySelector("[data-bp-filter-open]"),drawer=this.querySelector("dialog.bp-filter-drawer");!opener||!drawer||(opener.addEventListener("click",e=>{e.preventDefault(),!drawer.open&&(typeof drawer.showModal=="function"?drawer.showModal():drawer.setAttribute("open",""))}),drawer.addEventListener("cancel",e=>{e.preventDefault(),this.closeFilterDrawer(drawer)}),drawer.addEventListener("click",e=>{const pill=e.target.closest("[data-bp-pill]");if(pill){if(pill.disabled||pill.getAttribute("aria-disabled")==="true")return;e.preventDefault(),e.stopPropagation(),this.togglePill(pill);return}if(e.target.closest("[data-bp-filter-apply]")){e.preventDefault(),e.stopPropagation(),this.applyFilters(drawer);return}if(e.target.closest("[data-bp-filter-clear]")){e.preventDefault(),e.stopPropagation(),this.clearFilters(drawer);return}if(e.target.closest("[data-bp-filter-close]")){e.preventDefault(),e.stopPropagation(),this.closeFilterDrawer(drawer);return}e.target===drawer&&(e.preventDefault(),e.stopPropagation(),this.closeFilterDrawer(drawer))}))}togglePill(pill){const next=!pill.classList.contains("is-active");pill.classList.toggle("is-active",next),next?pill.setAttribute("aria-current","true"):pill.removeAttribute("aria-current"),this.updateFilterCount(pill.closest("[data-bp-filter]"))}
42updateFilterCount(detailsEl){if(!detailsEl)return;const count=detailsEl.querySelectorAll("[data-bp-pill].is-active").length,summary=detailsEl.querySelector(".bp-filter__summary");if(!summary)return;let countEl=summary.querySelector(".bp-filter__count");if(count>0){if(!countEl){countEl=document.createElement("span"),countEl.className="bp-filter__count";const chev=summary.querySelector(".bp-filter__chevron");chev?summary.insertBefore(countEl,chev):summary.appendChild(countEl)}countEl.textContent=`${count} Selected`}else countEl&&countEl.remove()}applyFilters(drawer){const baseUrl=drawer.dataset.collectionUrl||window.location.pathname,params=new URLSearchParams;drawer.querySelectorAll("[data-bp-pill].is-active").forEach(pill=>{const key=pill.dataset.param,val=pill.dataset.value;key&&val&¶ms.append(key,val)});const priceForm=drawer.querySelector("[data-bp-price-form]");priceForm&&new FormData(priceForm).forEach((value,key)=>{value!==""&&value!=null&¶ms.append(key,value)});const current=new URLSearchParams(window.location.search);["sort_by","per_page"].forEach(k=>{const v=current.get(k);v&¶ms.set(k,v)});const qs=params.toString();window.location.href=baseUrl+(qs?`?${qs}`:"")}clearFilters(drawer){const baseUrl=drawer.dataset.collectionUrl||window.location.pathname,params=new URLSearchParams,current=new URLSearchParams(window.location.search);["sort_by","per_page"].forEach(k=>{const v=current.get(k);v&¶ms.set(k,v)});const qs=params.toString();window.location.href=baseUrl+(qs?`?${qs}`:"")}closeFilterDrawer(drawer){if(drawer.dataset.bpClosing==="1"||!drawer.open)return;drawer.dataset.bpClosing="1",drawer.classList.add("is-closing");const finish=()=>{drawer.classList.remove("is-closing"),delete drawer.dataset.bpClosing;try{drawer.close()}catch{drawer.removeAttribute("open")}};let done=!1;const onEnd=e=>{done||e&&e.target!==drawer||(done=!0,drawer.removeEventListener("animationend",onEnd),finish())};drawer.addEventListener("animationend",onEnd),setTimeout(()=>{done||onEnd()},350)}bindBackToTop(){const btn=this.querySelector("[data-bp-to-top]");if(!btn)return;btn.hidden=!1,btn.addEventListener("click",()=>{const reduce=window.matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:reduce?"auto":"smooth"})});let ticking=!1;const onScroll=()=>{ticking||(ticking=!0,requestAnimationFrame(()=>{btn.toggleAttribute("data-visible",window.scrollY>window.innerHeight*.8),ticking=!1}))};window.addEventListener("scroll",onScroll,{passive:!0}),onScroll()}bindPerPage(){const initial=new URLSearchParams(window.location.search).get("per_page")||"24";if(this.querySelectorAll("[data-perpage-value]").forEach(a=>{a.classList.toggle("is-active",a.dataset.perpageValue===initial),a.addEventListener("click",e=>{const target=a.dataset.perpageValue,targetCount=target==="1000"?1/0:parseInt(target,10);if(this.countProductCells()>targetCount)return;e.preventDefault();const url=new URL(window.location.href);url.searchParams.set("per_page",target),history.replaceState({},"",url.toString()),this.querySelectorAll("[data-perpage-value]").forEach(x=>x.classList.toggle("is-active",x===a)),this.cascadeUntil(targetCount)})}),this.dataset.brEnabled!=="1"){const initialTarget=initial==="1000"?1/0:parseInt(initial,10);initialTarget>this.countProductCells()&&this.cascadeUntil(initialTarget)}}async cascadeUntil(targetCount){let btn=this.querySelector("[data-loadmore]");for(;btn&&this.countProductCells()<targetCount;)await this.loadNextPage(btn),btn=this.querySelector("[data-loadmore]")}countProductCells(){return this.grid.querySelectorAll(":scope > li:not(.bp-tile)").length}bindBagIcons(scope){scope.querySelectorAll(".bp-card__quick").forEach(bag=>{if(bag.dataset.bpBound)return;bag.dataset.bpBound="1";let prefetched=!1;const prefetch=()=>{if(!prefetched){prefetched=!0;try{const card=bag.closest(".bp-card"),link=card?.querySelector(".bp-card__media-link")||card?.querySelector('a[href*="/products/"]');if(!link?.href)return;const u=new URL(link.href,window.location.origin);if(!u.searchParams.has("variant")){const pc=card.closest("product-card"),vid=pc&&typeof pc.getSelectedVariantId=="function"?pc.getSelectedVariantId():null;vid&&u.searchParams.set("variant",vid)}let mainId=window.__bpPdpMainSectionId;if(!mainId)try{mainId=sessionStorage.getItem("bpPdpMainSectionId")}catch{}mainId&&u.searchParams.set("section_id",mainId);const fetchUrl=u.toString(),cache=window.__bpDrawerCache=window.__bpDrawerCache||new Map;if(cache.get(fetchUrl))return;fetch(fetchUrl,{credentials:"same-origin",headers:{Accept:"text/html"}}).then(r=>r.ok?r.text():null).then(html=>
42{if(!html)return;const grid=new DOMParser().parseFromString(html,"text/html").querySelector("[data-product-grid-content]");grid&&cache.set(fetchUrl,grid.cloneNode(!0))}).catch(()=>{})}catch{}}};bag.addEventListener("mouseenter",prefetch),bag.addEventListener("focus",prefetch),bag.addEventListener("touchstart",prefetch,{passive:!0}),bag.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const card=bag.closest(".bp-card");if(!card)return;const open=()=>{const trigger=card.querySelector(".quick-add__button--choose");return trigger?(typeof window.bpOpenProductDrawer=="function"?window.bpOpenProductDrawer(trigger):trigger.click(),!0):!1};if(open())return;const handle=(card.dataset.productUrl||"").match(/\/products\/([^/?#]+)/);!handle||card.dataset.bpQaLoading==="1"||!window.BpCardHydrate||(card.dataset.bpQaLoading="1",window.BpCardHydrate.hydrateHandle(handle[1]).then(data=>{window.BpCardHydrate.applyHydration(card,data)}).then(()=>{card.dataset.bpQaLoading="0",open()}).catch(()=>{card.dataset.bpQaLoading="0"}))})})}bindSort(){const select=this.querySelector("[data-sort-select]");select&&this.dataset.brEnabled!=="1"&&select.addEventListener("change",()=>{const url=new URL(window.location.href);url.searchParams.set("sort_by",select.value),url.searchParams.delete("page"),window.location.href=url.toString()})}bindLoadMore(){const btn=this.querySelector("[data-loadmore]");btn&&btn.addEventListener("click",e=>{e.preventDefault(),this.loadNextPage(btn)})}async loadNextPage(btn){if(!btn||btn.classList.contains("is-loading"))return;btn.classList.add("is-loading");const originalText=btn.textContent;btn.textContent="Loading\u2026";try{const html=await(await fetch(btn.href,{credentials:"same-origin"})).text(),doc=new DOMParser().parseFromString(html,"text/html"),nextGrid=doc.querySelector("[data-grid]"),nextBtn=doc.querySelector("[data-loadmore]");nextGrid&&(nextGrid.querySelectorAll(":scope > li").forEach(li=>{this.grid.appendChild(li)}),this.bindBagIcons(this.grid),window.bpStlDrawer&&typeof window.bpStlDrawer.init=="function"&&window.bpStlDrawer.init(document)),nextBtn?(btn.href=nextBtn.href,btn.classList.remove("is-loading"),btn.textContent=originalText):btn.outerHTML='<span class="bp-coll__loadmore is-end">End of results</span>'}catch(err){console.error("[bp-collection] load-more failed:",err),btn.classList.remove("is-loading"),btn.textContent=originalText}}}customElements.get("bp-collection")||customElements.define("bp-collection",BpCollection)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-coupons"]&&!Shopify.designMode))try{class BpCoupons extends HTMLElement{connectedCallback(){this.addEventListener("click",e=>{const opener=e.target.closest("[data-bp-cpn-open]");if(opener){const dlg=this.querySelector('[data-bp-cpn-dialog="'+opener.getAttribute("data-bp-cpn-open")+'"]');dlg&&dlg.showModal?dlg.showModal():dlg&&dlg.setAttribute("open","");return}const closer=e.target.closest("[data-bp-cpn-close]");if(closer){const dlg=closer.closest("dialog");dlg&&dlg.close?dlg.close():dlg&&dlg.removeAttribute("open")}}),this.querySelectorAll("[data-bp-cpn-dialog]").forEach(dlg=>{dlg.addEventListener("click",e=>{if(e.target===dlg)try{dlg.close()}catch{dlg.removeAttribute("open")}})})}}customElements.get("bp-coupons")||customElements.define("bp-coupons",BpCoupons)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-digital-catalog"]&&!Shopify.designMode))try{class BpDigitalCatalog extends HTMLElement{connectedCallback(){this.tabs=Array.from(this.querySelectorAll("[data-bp-dc-tab]")),this.embeds=Array.from(this.querySelectorAll("[data-bp-dc-embed]")),this.tabs.forEac
42h(tab=>{tab.addEventListener("click",e=>this.handleClick(e))});const hash=(window.location.hash||"").replace("#","");if(hash){const matched=this.tabs.find(t=>t.dataset.id===hash);matched&&this.activate(matched.dataset.id)}BpDigitalCatalog._cartBridgeBound||(BpDigitalCatalog._cartBridgeBound=!0,window.addEventListener("message",e=>{if(e.origin!==window.location.origin)return;const d=e.data||{};if(!(!d||d.source!=="bp-quickview")){if(d.type==="saved-for-later"){window.bpSavedForLater&&window.bpSavedForLater.reloadFromStorage&&window.bpSavedForLater.reloadFromStorage(),document.dispatchEvent(new CustomEvent("bp:saved:updated",{detail:{item:d.item||null}}));return}if(d.type==="open-saved-drawer"){const drawer=document.querySelector("bp-saved-drawer");if(drawer&&typeof drawer.open=="function")drawer.open();else{const t=document.querySelector("[data-bp-saved-open]");t&&t.click()}return}d.type==="cart:updated"&&fetch("/cart.js",{headers:{Accept:"application/json"},cache:"no-store",credentials:"same-origin"}).then(r=>r.json()).then(cart=>{document.dispatchEvent(new CustomEvent("cart:update",{detail:{resource:cart,data:{source:"product-form-component"}}}))}).catch(()=>{})}}))}handleClick(e){e.preventDefault();const id=e.currentTarget.dataset.id;id&&(this.activate(id),history.replaceState?history.replaceState(null,"","#"+id):window.location.hash=id)}
42activate(id){this.tabs.forEach(tab=>{const on=tab.dataset.id===id;tab.classList.toggle("is-active",on),tab.setAttribute("aria-selected",on?"true":"false")}),this.embeds.forEach(embed=>{const on=embed.dataset.id===id;embed.classList.toggle("is-active",on),on?embed.removeAttribute("hidden"):embed.setAttribute("hidden","")})}}customElements.get("bp-digital-catalog")||customElements.define("bp-digital-catalog",BpDigitalCatalog)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-footer-main"]&&!Shopify.designMode))try{class BpFooter extends HTMLElement{connectedCallback(){this._mq=window.matchMedia("(max-width: 1023px)"),this._mq.addEventListener("change",()=>this._sync()),this._sync()}_sync(){this._mq.matches?this._initAccordions():this._destroyAccordions()}_initAccordions(){this.querySelectorAll(".bp-footer__col-heading").forEach(heading=>{heading._bpHandler||(heading._bpHandler=e=>{const link=heading.querySelector("a");link&&e.target===link&&e.preventDefault();const isOpen=heading.closest(".bp-footer__col").classList.toggle("bp-footer__col--open");heading.setAttribute("aria-expanded",String(isOpen))},heading._bpKeyHandler=e=>{(e.key==="Enter"||e.key===" "||e.key==="Spacebar")&&e.target===heading&&(e.preventDefault(),heading._bpHandler(e))},heading.setAttribute("role","button"),heading.setAttribute("tabindex","0"),heading.setAttribute("aria-expanded","false"),heading.addEventListener("click",heading._bpHandler),heading.addEventListener("keydown",heading._bpKeyHandler))})}_destroyAccordions(){this.querySelectorAll(".bp-footer__col-heading").forEach(heading=>{heading._bpHandler&&(heading.removeEventListener("click",heading._bpHandler),heading._bpKeyHandler&&(heading.removeEventListener("keydown",heading._bpKeyHandler),delete heading._bpKeyHandler),delete heading._bpHandler,heading.removeAttribute("role"),heading.removeAttribute("tabindex"),heading.removeAttribute("aria-expanded"),heading.closest(".bp-footer__col")?.classList.remove("bp-footer__col--open"))})}}customElements.get("bp-footer")||customElements.define("bp-footer",BpFooter),window.__bpFooterKlaviyoBound||(window.__bpFooterKlaviyoBound=!0,document.addEventListener("click",function(e){var btn=e.target.closest&&e.target.closest(".klaviyo_form_trigger_footer");if(btn){e.preventDefault();var formId=btn.getAttribute("data-bp-klaviyo-form-id")||"X8v8qM";window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",formId])}},!0))}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-grid-blocks"]&&!Shopify.designMode))try{(function(){function initGridIndicator(section){const rail=section.querySelector("[data-bp-grid-rail]"),indicator=section.querySelector(".bp-grid__indicator");if(!rail||!indicator||rail._bpGridIndicatorWired)return;rail._bpGridIndicatorWired=!0;function update(){const visible=rail.clientWidth,total=rail.scrollWidth;if(total<=visible){indicator.style.display="none";return}indicator.style.display="";const overflow=total-visible,thumbW=visible/total*100,thumbX=overflow>0?rail.scrollLeft/overflow:0;indicator.style.setProperty("--bp-grid-thumb-w",thumbW+"%"),indicator.style.setProperty("--bp-grid-thumb-x",thumbX)}rail.addEventListener("scroll",update,{passive:!0}),window.addEventListener("resize",update),requestAnimationFrame(update)}function initTileClick(tile){if(!tile._bpTileClickWired){tile._bpTileClickWired=!0;var cta=tile.querySelector('.bp-cta, .bp-cta-button, a.bp-cta-group__cta, a[href]:not([href=""])');cta&&(tile.style.cursor="pointer",tile.setAttribute("data-bp-tile-clickable",""),tile.addEventListener("click",function(e){e.target.closest('a, button, input, select, textarea, summary, [role="button"]')||cta.click()}))}}function initAll(scope){(scope||document).querySelectorAll('.bp-grid[data-bp-grid-mobile="carousel"]').forEach(initGridIndicator),(scope||document).querySelectorAll(".bp-grid__tile").forEach(initTileClick)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>initAll(),{once:!0}):initAll(),document.addEventListener("shopify:section:load",function(e){e.target&&e.target.classList&&e.target.classList.contains("bp-grid-blocks-section")&&initAll(e.target)})})()}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-hero-slider"]&&!Shopify.designMode))try{class BpHeroSlider extends HTMLElement{connectedCallback(){if(this.slides=Array.from(this.querySelectorAll(".bp-hero__slide")),this.dots=Array.from(this.querySelectorAll(".bp-hero__dot")),this.indicator=this.querySelector("[data-bp-hero-indicator]"),this.slideCount=this.slides.length,this.slideCount>0&&!this.slides.some(s=>s.classList.contains("is-active"))&&(this.slides[0].classList.add("is-active"),this.slides[0].setAttribute("aria-hidden","false"),this.dots[0]&&(this.dots[0].classList.add("is-active"),this.dots[0].setAttribute("aria-selected","true"))),this.slides.forEac
42h(s=>{s.toggleAttribute("inert",!s.classList.contains("is-active"))}),this.slideCount<=1){this.indicator&&(this.indicator.style.display="none");return}this.activeIndex=0,this.autoplay=this.dataset.autoplay==="1",this.autoplayInterval=parseInt(this.dataset.autoplayInterval,10)||6e3,this.querySelectorAll("[data-direction]").forEach(btn=>{btn.addEventListener("click",()=>{this.go(btn.dataset.direction==="next"?1:-1)})}),this.dots.forEach(dot=>{dot.addEventListener("click",()=>{const target=parseInt(dot.dataset.slideTarget,10);Number.isNaN(target)||this.set(target)})}),this.addEventListener("mouseenter",()=>this.stop()),this.addEventListener("mouseleave",()=>this.start()),this.addEventListener("focusin",()=>this.stop()),this.addEventListener("focusout",()=>this.start()),this.addEventListener("keydown",e=>{e.key==="ArrowRight"&&(e.preventDefault(),this.go(1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.go(-1))}),this._updateIndicator(),this.start()}disconnectedCallback(){this.stop()}_updateIndicator(){if(!this.indicator)return;const thumbW=1/this.slideCount*100,thumbX=this.slideCount>1?this.activeIndex/(this.slideCount-1):0;this.indicator.style.setProperty("--bp-hero-thumb-w",thumbW+"%"),this.indicator.style.setProperty("--bp-hero-thumb-x",thumbX)}set(index){const next=(index%this.slideCount+this.slideCount)%this.slideCount;next!==this.activeIndex&&(this.slides[this.activeIndex]?.classList.remove("is-active"),this.slides[this.activeIndex]?.setAttribute("aria-hidden","true"),this.slides[this.activeIndex]?.setAttribute("inert",""),this.dots[this.activeIndex]?.classList.remove("is-active"),this.dots[this.activeIndex]?.setAttribute("aria-selected","false"),this.slides[next]?.classList.add("is-active"),this.slides[next]?.setAttribute("aria-hidden","false"),this.slides[next]?.removeAttribute("inert"),this.dots[next]?.classList.add("is-active"),this.dots[next]?.setAttribute("aria-selected","true"),this.activeIndex=next,this._updateIndicator())}go(delta){this.set(this.activeIndex+delta)}start(){!this.autoplay||this.timer||window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this.timer=setInterval(()=>this.go(1),this.autoplayInterval))}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}}customElements.get("bp-hero-slider")||customElements.define("bp-hero-slider",BpHeroSlider)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-how-to-wear-it"]&&!Shopify.designMode))try{class BpHtwi extends HTMLElement{async connectedCallback(){this.style_=this.dataset.bpHtwiStyle||"",this.max=parseInt(this.dataset.bpHtwiMax,10)||6,this.target=this.querySelector("[data-bp-htwi-target]"),this.heading=this.querySelector("[data-bp-htwi-heading]"),this.subtitle=this.querySelector("[data-bp-htwi-subtitle]"),!(!this.style_||!this.target)&&(this.bindClicks(),this.initAtcTracking(),window.bpRegisterStyliticsTrigger&&window.bpRegisterStyliticsTrigger(this.style_,()=>this.initComposer()),this._onSwap=()=>{const g=document.querySelector("bp-pdp-gallery[data-bp-style]")||document.querySelector("[data-bp-style]"),newStyle=g?(g.getAttribute("data-bp-style")||"").trim():"";this.reInitFor(newStyle)},document.addEventListener("bp:pdp:swapped",this._onSwap),"IntersectionObserver"in window?new IntersectionObserver((entries,obs)=>{entries.some(e=>e.isIntersecting)&&(obs.disconnect(),this.initComposer())},{rootMargin:"600px 0px"}).observe(this):this.initComposer())}notifyVisibility(visible){document.dispatchEvent(new CustomEvent("bp:htwi:visibility",{detail:{visible}}))}notifyOnModelVisibility(){this.fetchOutfits().then(outfits=>{const hasOnModel=Array.isArray(outfits)&&outfits.some(o=>o&&(o["on-model-image"]===!0||o.onModelImage===!0));this.notifyVisibility(hasOnModel)}).catch(()=>this.notifyVisibility(!1))}hideWidget(){this.heading&&(this.heading.hidden=!0),this.subtitle&&(this.subtitle.hidden=!0),this.classList.add("bp-htwi--empty"),this.notifyVisibility(!1)}showWidget(){this.classList.remove("bp-htwi--empty")}reInitFor(newStyle){if(!newStyle){this.hideWidget();return}if(!(newStyle===this.style_&&this._composer)){if(this.style_=newStyle,this.showWidget(),this.notifyVisibility(!1),this.heading&&(this.heading.hidden=!0),this.subtitle&&(this.subtitle.hidden=!0),this._obs){try{this._obs.disconnect()}catch{}this._obs=null}if(this._lookObs){try{this._lookObs.disconnect()}catch{}this._lookObs=null,this._lookWatchNode=null}if(this._composer&&typeof this._composer.destroy=="function")try{this._composer.destroy()}catch{}this._composer=null,window.bpRegisterStyliticsTrigger&&window.bpRegisterStyliticsTrigger(newStyle,()=>this.initComposer()),this._initAttempted&&this.initComposer()}}async initComposer(){if(!(this._initing||this._composer)){this._initing=!0,this._initAttempted=!0;try{if(await this.waitForComposer(),typeof window.StyliticsComposer>"u"||typeof window.StyliticsComposer.initialize!="function"){this.hideWidget();return}this.target.innerHTML="";const composer=await window.StyliticsComposer.initialize({client:"bostonproper",target:this.target,config:{modules:[{type:"grid",params:{api:{item_number:this.style_,min:1,max:this.max},display:{typeScaledGrid:!0,maintainImageAspectRatio:!0,labelStyle:1,labelBorderColor:"#edc685",dynamicLabelBackgroun
42d:!0,showMobileArrows:!0},text:{counterHeading:"Outfit"}}}],sharedParams:{customer:{clientUserId:null},analytics:{placement:"pdp"}}}});await composer.start(),window.styliticsComposer=composer,window.__styliticsComposerRegistry=window.__styliticsComposerRegistry||{},window.__styliticsComposerRegistry.pdp=composer,this._composer=composer,setTimeout(()=>this.onRendered(),1500),this.observeContent()}catch(err){console.warn("[bp-htwi] Stylitics composer init failed",err),this.hideWidget()}finally{this._initing=!1}}}waitForComposer(){return new Promise(resolve=>{let attempts=0;const check=()=>{attempts+=1,typeof window.StyliticsComposer<"u"||attempts>=100?resolve():setTimeout(check,100)};check()})}hasContent(){return!!this.target.querySelector('a[href*="/products/"], [class*="stylitics-grid-item"]')}onRendered(){this.hasContent()?(this.showWidget(),this.heading&&(this.heading.hidden=!1),this.subtitle&&(this.subtitle.hidden=!1),this.notifyOnModelVisibility(),this.setupLookWatcher()):this.hideWidget(),this.bindClicks(),this.stripPriceZeros()}updateLookLabel(){if(!this.subtitle||!this.target)return;let n=1;try{const counter=this.target.querySelector(".stylitics-count-index");n=counter?parseInt(counter.textContent||"1",10):1}catch{}const idx=n;this.fetchOutfits().then(outfits=>{let cur=idx;try{const c=this.target.querySelector(".stylitics-count-index");cur=c?parseInt(c.textContent||"1",10):idx}catch{}if(cur!==idx)return;const outfit=Array.isArray(outfits)?outfits[idx-1]:null,text=!!(outfit&&(outfit["on-model-image"]||(outfit.tags||[]).some(t=>/^model_/i.test(String(t)))))?"On Model Look":"Look "+idx;this.subtitle.style.setProperty("--look-text",'"'+text+'"')})}setupLookWatcher(){if(!this.target)return;const counter=this.target.querySelector(".stylitics-count-index");if(!counter){this.updateLookLabel();return}if(this._lookWatchNode===counter&&this._lookObs){this.updateLookLabel();return}if(this._lookObs)try{this._lookObs.disconnect()}catch{}this._lookWatchNode=counter,this._lookObs=new MutationObserver(()=>this.updateLookLabel()),this._lookObs.observe(counter,{childList:!0,characterData:!0,subtree:!0}),this.updateLookLabel()}stripPriceZeros(){if(!this.target)return;this.target.querySelectorAll('[data-testid*="price"], [class*="stylitics"][class*="price"]').forEach(el=>{el.childNodes.forEach(n=>{n.nodeType===3&&n.nodeValue.indexOf(".00")!==-1&&(n.nodeValue=n.nodeValue.replace(/(\d)\.00\b/g,"$1"))})})}observeContent(){const obs=new MutationObserver(()=>{this.stripPriceZeros(),clearTimeout(this._reWire),this._reWire=setTimeout(()=>this.onRendered(),150)});obs.observe(this.target,{childList:!0,subtree:!0}),this._obs=obs}bindClicks(){this._clicksBound||(this._clicksBound=!0,this.addEventListener("click",e=>{const link=e.target.closest&&e.target.closest('a[href*="/products/"]');if(link&&link.href){e.preventDefault(),e.stopImmediatePropagation(),this.trackItemClick(link.href),this.setWidgetAddContext(link.href),this.openQuickAdd(link.href);return}const cell=e.target.closest&&e.target.closest("[data-stylitics-client-colorway-id]"),cwId=cell&&cell.getAttribute("data-stylitics-client-colorway-id");cwId&&(e.preventDefault(),e.stopImmediatePropagation(),this.fetchOutfits().then(outfits=>{let href="";(outfits||[]).some(o=>(o.items||[]).some(it=>[it&&it.remote_id].concat(it&&it.other_client_item_ids||[]).some(x=>String(x)===String(cwId))&&it.affiliate_link?(href=it.affiliate_link,!0):!1)),href&&(this.trackItemClick(href),this.setWidgetAddContext(href),this.openQuickAdd(href))}))},{capture:!0}))}async trackItemClick(href){try{const mod=window.styliticsComposer&&window.styliticsComposer.modules&&window.styliticsComposer.modules[0];if(!mod||typeof mod.trackClickItem!="function")return;const norm=u=>String(u||"").replace(/^https?:\/\/[^/]+/,"").replace(/^\/products\//,"").replace(/[/?#].*$/,"").trim(),handle=norm(href),outfits=await this.fetchOutfits();for(const outfit of outfits){const item=(outfit.items||[]).find(it=>norm(it&&it.affiliate_link)===handle);if(item){mod.trackClickItem(String(item.remote_id),{outfitId:outfit.id});return}}}catch{}}fetchOutfits(){return typeof window.bpStyliticsOutfits=="function"?window.bpStyliticsOutfits(this.style_):Promise.resolve([])}initAtcTracking(){this._mainProductId=this.dataset.bpHtwiProductId||"",fetch("/cart.js",{credentials:"same-origin"}).then(r=>r.json()).then(c=>{this._cartSnap=this.snapCart(c)}).catch(()=>{}),this._onAdd=e=>this.onCartMaybeAdded(e),document.addEventListener("product:added",this._onAdd),document.addEventListener("cart:update",this._onAdd)}snapCart(cart){const m={};
42return(cart&&cart.items||[]).forEach(it=>{m[it.key]={qty:it.quantity,product_id:it.product_id,handle:it.handle,price:it.price}}),m}setWidgetAddContext(productUrl){const norm=u=>String(u||"").replace(/^https?:\/\/[^/]+/,"").replace(/^\/products\//,"").replace(/[/?#].*$/,"").trim(),handle=norm(productUrl);handle&&(window.__bpStyliticsWidgetAdd={style:handle,handle,until:Date.now()+9e4},this.fetchOutfits().then(outfits=>{(outfits||[]).some(outfit=>{const item=(outfit&&outfit.items||[]).find(it=>norm(it&&it.affiliate_link)===handle);if(item){const ctx=window.__bpStyliticsWidgetAdd;return ctx&&ctx.handle===handle&&(ctx.style=String(item.remote_id||item.item_id||handle)),!0}return!1})}).catch(()=>{}))}async onCartMaybeAdded(e){let cart=e&&e.detail&&e.detail.cart;if(!cart||!cart.items)try{cart=await fetch("/cart.js",{credentials:"same-origin"}).then(r=>r.json())}catch{return}const next=this.snapCart(cart),prev=this._cartSnap;if(this._cartSnap=next,!prev)return;const added=[];if(Object.keys(next).forEach(k=>{(!prev[k]||next[k].qty>prev[k].qty)&&added.push(next[k])}),!added.length)return;const ctx=window.__bpStyliticsWidgetAdd,widgetFresh=ctx&&ctx.until>Date.now();added.forEach(line=>{const price=typeof line.price=="number"?(line.price/100).toFixed(2):"";widgetFresh&&ctx.handle&&String(line.handle)===String(ctx.handle)?(this.trackAddToCart(ctx.style,price,"widget"),window.__bpStyliticsWidgetAdd=null):this._mainProductId&&String(line.product_id)===String(this._mainProductId)&&this.trackAddToCart(this.style_,price,"main")})}trackAddToCart(itemId,price,placement){if(!itemId)return;const payload={currency:"USD",itemId:String(itemId),placement};price&&(payload.price=String(price));let tries=0;const attempt=()=>{const mod=window.styliticsComposer&&window.styliticsComposer.modules&&window.styliticsComposer.modules[0];if(mod&&typeof mod.trackAddItemToCart=="function"){try{mod.trackAddItemToCart(payload)}catch{}return}this._initAttempted||Promise.resolve().then(()=>this.initComposer()).catch(()=>{}),tries++<20&&setTimeout(attempt,300)};attempt()}openQuickAdd(productUrl){if(!productUrl)return;try{var u=new URL(productUrl,window.location.origin);productUrl=u.pathname+u.search}catch{var m=String(productUrl).match(/\/products\/[^\s"']+/);m&&(productUrl=m[0])}let host=this._qaHost;host||(host=document.createElement("div"),host.setAttribute("data-bp-htwi-qa-host",""),host.style.cssText="position:absolute;left:-9999px;top:0;width:1px;height:1px;overflow:hidden;",document.body.appendChild(host),this._qaHost=host),host.innerHTML='<product-card><a class="product-card__link" ref="productCardLink" href="'+productUrl+'"></a><quick-add-component ref="quickAdd"><button type="button" class="button quick-add__button quick-add__button--choose add-to-cart-button" on:click="quick-add-component/handleClick"></button></quick-add-component></product-card>';const choose=host.querySelector(".quick-add__button--choose");requestAnimationFrame(()=>{try{typeof window.bpOpenProductDrawer=="function"&&choose?window.bpOpenProductDrawer(choose):choose?choose.click():window.location.href=productUrl}catch(err){console.warn("[bp-htwi] quick-add open failed, navigating",err),window.location.href=productUrl}})}disconnectedCallback(){if(this._obs&&this._obs.disconnect(),this._lookObs&&this._lookObs.disconnect(),this._onSwap&&document.removeEventListener("bp:pdp:swapped",this._onSwap),this._onAdd&&(document.removeEventListener("product:added",this._onAdd),document.removeEventListener("cart:update",this._onAdd)),this._composer&&typeof this._composer.destroy=="function")try{this._composer.destroy()}catch{}this._qaHost&&this._qaHost.remove()}}customElements.get("bp-htwi")||customElements.define("bp-htwi",BpHtwi)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-image-row"]&&!Shopify.designMode))try{class BpImageRow extends HTMLElement{connectedCallback(){const rail=this.querySelector("[data-bp-imr-rail]"),indicator=this.querySelector("[data-bp-imr-indicator]");if(!rail||!indicator)return;const update=()=>{const visible=rail.clientWidth,total=rail.scrollWidth;if(total<=visible){indicator.style.display="none";return}indicator.style.display="";const overflow=total-visible,thumbW=visible/total*100,thumbX=overflow>0?rail.scrollLeft/overflow:0;indicator.style.setProperty("--bp-imr-thumb-w",thumbW+"%"),indicator.style.setProperty("--bp-imr-thumb-x",thumbX)};rail.addEventListener("scroll",update,{passive:!0}),window.addEventListener("resize",update),this._update=update,requestAnimationFrame(update)}disconnectedCallback(){this._update&&window.removeEventListener("resize",this._update)}}customElements.get("bp-image-row")||customElements.define("bp-image-row",BpImageRow)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-our-most-loved"]&&!Shopify.designMode))try{class BpOurMostLoved extends HTMLElement{connectedCallback(){if(this.track=this.querySelector(".bp-oml__track"),!this.track)return;this.indicator=this.querySelector("[data-bp-oml-indicator]"),this.prevBtn=this.querySelector('[data-direction="prev"]'),this.nextBtn=this.querySelector('[data-direction="next"]'),this.prevBtn&&this.prevBtn.addEventListener("click",()=>this.scrollByCard(-1)),this.nextBtn&&this.nextBtn.addEventListener("click",()=>this.scrollByCard(1));const openDrawer=card=>{const trigger=card.querySelector(".quick-add__button--choose");trigger&&(typeof window.bpOpenProductDrawer=="function"?window.bpOpenProductDrawer(trigger):trigger.click())},prefetchCard=card=>{if(card.__bpPrefetched)return;card.__bpPrefetched=!0;const link=card.querySelector(".bp-oml-card__media-link");link?.href&&fetch(link.href,{credentials:"same-origin"}).catch(()=>{})},handleQv=(card,e)=>{const dest=card.dataset.bpCardQvDest||"drawer",url=card.dataset.productUrl;if(dest==="pdp"){e.currentTarget.matches("[data-bp-card-qv-trigger]")&&url&&(e.preventDefault(),window.location.href=url);return}e.preventDefault(),e.stopPropagation(),openDrawer(card)};this.querySelectorAll(".bp-oml-card").forEach(card=>{const style=card.dataset.bpCardQbStyle||"button";if(style!=="disabled")if(style==="button"){const bag=card.querySelector("[data-bp-card-qv-trigger]");if(!bag)return;["mouseenter","focus","touchstart"].forEach(ev=>bag.addEventListener(ev,()=>prefetchCard(card),{passive:!0})),bag.addEventListener("click",e=>handleQv(card,e))}else style==="whole_product"&&(["mouseenter","focus","touchstart"].forEach(ev=>card.addEventListener(ev,()=>prefetchCard(card),{passive:!0})),card.addEventListener("click",e=>handleQv(card,e)))}),this.updateArrows=this.updateArrows.bind(this),this.track.addEventListener("scroll",this.updateArrows,{passive:!0}),window.addEventListener("resize",this.updateArrows),requestAnimationFrame(this.updateArrows)}disconnectedCallback(){window.removeEventListener("resize",this.updateArrows)}scrollByCard(direction){const slide=this.track.querySelector(".bp-oml__slide");if(!slide)return;const styles=getComputedStyle(this.track),gap=parseFloat(styles.columnGap||styles.gap)||0,step=slide.getBoundingClientRect().width+gap;this.track.scrollBy({left:step*direction,behavior:"smooth"})}updateArrows(){const{scrollLeft,scrollWidth,clientWidth}=this.track;if(this.prevBtn&&this.nextBtn&&(this.prevBtn.disabled=scrollLeft<=1,this.nextBtn.disabled=scrollLeft+clientWidth>=scrollWidth-1),this.indicator)if(scrollWidth<=clientWidth)this.indicator.style.display="none";else{this.indicator.style.display="";const thumbW=clientWidth/scrollWidth*100,overflow=scrollWidth-clientWidth,thumbX=overflow>0?scrollLeft/overflow:0;this.indicator.style.setProperty("--bp-oml-thumb-w",thumbW+"%"),this.indicator.style.setProperty("--bp-oml-thumb-x",thumbX)}}}customElements.get("bp-our-most-loved")||customElements.define("bp-our-most-loved",BpOurMostLoved)}catch(e){console.error(e)}}
42)(),(function(){if(!(!__sections__["bp-product-carousel"]&&!Shopify.designMode))try{class BpProductCarousel extends HTMLElement{connectedCallback(){if(this.track=this.querySelector(".bp-pc__track"),!this.track)return;this.indicator=this.querySelector("[data-bp-pc-indicator]"),this.prevBtn=this.querySelector('[data-direction="prev"]'),this.nextBtn=this.querySelector('[data-direction="next"]'),this.introSlide=this.track.querySelector(".bp-pc__slide--intro"),this.introSlide&&(this.introHolder=document.createElement("div"),this.introHolder.className="bp-pc__intro-mobile",this.introMq=window.matchMedia("(max-width: 1023px)"),this.syncIntroPlacement=()=>{!this.introSlide||!this.track||(this.introMq.matches?this.introSlide.parentNode!==this.introHolder&&(this.introHolder.appendChild(this.introSlide),this.track.parentNode.insertBefore(this.introHolder,this.track)):(this.introSlide.parentNode!==this.track&&this.track.insertBefore(this.introSlide,this.track.firstChild),this.introHolder.parentNode&&this.introHolder.parentNode.removeChild(this.introHolder)))},this.syncIntroPlacement(),this.introMq.addEventListener("change",this.syncIntroPlacement)),this.prevBtn&&this.prevBtn.addEventListener("click",()=>this.scrollByCard(-1)),this.nextBtn&&this.nextBtn.addEventListener("click",()=>this.scrollByCard(1));const openDrawer=card=>{const trigger=card.querySelector(".quick-add__button--choose");trigger&&(typeof window.bpOpenProductDrawer=="function"?window.bpOpenProductDrawer(trigger):trigger.click())},prefetchCard=card=>{if(!card.__bpPrefetched){card.__bpPrefetched=!0;try{const link=card.querySelector(".bp-card__media-link")||card.querySelector('a[href*="/products/"]');if(!link?.href)return;const u=new URL(link.href,window.location.origin);if(!u.searchParams.has("variant")){const pc=card.closest("product-card"),vid=pc&&typeof pc.getSelectedVariantId=="function"?pc.getSelectedVariantId():null;vid&&u.searchParams.set("variant",vid)}let mainId=window.__bpPdpMainSectionId;if(!mainId)try{mainId=sessionStorage.getItem("bpPdpMainSectionId")}catch{}mainId&&u.searchParams.set("section_id",mainId);const fetchUrl=u.toString(),cache=window.__bpDrawerCache=window.__bpDrawerCache||new Map;if(cache.get(fetchUrl))return;fetch(fetchUrl,{credentials:"same-origin",headers:{Accept:"text/html"}}).then(r=>r.ok?r.text():null).then(html=>{if(!html)return;const grid=new DOMParser().parseFromString(html,"text/html").querySelector("[data-product-grid-content]");grid&&cache.set(fetchUrl,grid.cloneNode(!0))}).catch(()=>{})}catch{}}},handleQv=(card,e)=>{const dest=card.dataset.bpCardQvDest||"drawer",url=card.dataset.productUrl;if(dest==="pdp"){e.currentTarget.matches("[data-bp-card-qv-trigger]")&&url&&(e.preventDefault(),window.location.href=url);return}e.preventDefault(),e.stopPropagation(),openDrawer(card)};this.querySelectorAll(".bp-card").forEach(card=>{const style=card.dataset.bpCardQbStyle||"button";if(style!=="disabled")if(style==="button"){const bag=card.querySelector("[data-bp-card-qv-trigger]");if(!bag)return;["mouseenter","focus","touchstart"].forEach(ev=>bag.addEventListener(ev,()=>prefetchCard(card),{passive:!0})),bag.addEventListener("click",e=>handleQv(card,e))}else style==="whole_product"&&(["mouseenter","focus","touchstart"].forEach(ev=>card.addEventListener(ev,()=>prefetchCard(card),{passive:!0})),card.addEventListener("click",e=>{e.target.closest(".bp-card__swatches")||handleQv(card,e)}))}),this.updateArrows=this.updateArrows.bind(this),this.track.addEventListener("scroll",this.updateArrows,{passive:!0}),window.addEventListener("resize",this.updateArrows),requestAnimationFrame(this.updateArrows)}disconnectedCallback(){window.removeEventListener("resize",this.updateArrows)}scrollByCard(direction){const slide=this.track.querySelector(".bp-pc__slide");if(!slide)return;const styles=getComputedStyle(this.track),gap=parseFloat(styles.columnGap||styles.gap)||0,step=slide.getBoundingClientRect().width+gap;this.track.scrollBy({left:step*direction,behavior:"smooth"})}updateArrows(){const{scrollLeft,scrollWidth,clientWidth}=this.track;if(this.prevBtn&&this.nextBtn&&(this.prevBtn.disabled=scrollLeft<=1,this.nextBtn.disabled=scrollLeft+clientWidth>=scrollWidth-1),this.indicator)if(scrollWidth<=clientWidth)this.indicator.style.display="none";else{this.indicator.style.display="";const thumbW=clientWidth/scrollWidth*100,overflow=scrollWidth-clientWidth,thumbX=overflow>0?scrollLeft/overflow:0;this.indicator.style.setProperty("--bp-pc-thumb-w",thumbW+"%"),this.indicator.style.setProperty("--bp-pc-thumb-x",thumbX)}}}
42customElements.get("bp-product-carousel")||customElements.define("bp-product-carousel",BpProductCarousel)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-product-featured-grid"]&&!Shopify.designMode))try{class BpProductFeaturedGrid extends HTMLElement{connectedCallback(){}}customElements.get("bp-product-featured-grid")||customElements.define("bp-product-featured-grid",BpProductFeaturedGrid)}catch(e){console.error(e)}})(),(function(){if(__sections__["bp-quick-drawer"])try{window._bpQuickDrawerInited||(window._bpQuickDrawerInited=!0,(function(){"use strict";var TAG="[bp-qd]";function log(){var args=Array.prototype.slice.call(arguments);args.unshift(TAG);try{console.log.apply(console,args)}catch{}}function getDialogEl(){return document.getElementById("quick-add-dialog")}function getDialog(){var el=getDialogEl();return el&&(el.refs&&el.refs.dialog||el.querySelector("dialog"))}function getModalContent(){return document.getElementById("quick-add-modal-content")}function getMediaSlot(){return document.querySelector("[data-bp-qd-media-slot]")}function getCtaSlot(){return document.querySelector("[data-bp-qd-cta-slot]")}function clearLoading(){document.body.classList.remove("bp-drawer-loading")}window._bpDrawerState=window._bpDrawerState||{latched:!1};var state=window._bpDrawerState;window.bpOpenProductDrawer=function(triggerEl){if(!triggerEl){log("called with no trigger");return}log("open requested \u2192 clearing latch"),state.latched=!1,document.body.classList.add("bp-drawer-loading");var mediaSlot=getMediaSlot();mediaSlot&&(mediaSlot.innerHTML="");var ctaSlot=getCtaSlot();ctaSlot&&ctaSlot.querySelectorAll("[data-bp-qd-placed]").forEach(function(el){el.remove()});var modalContent=getModalContent();modalContent&&(modalContent._bpFinalSaleScheduled=!1,modalContent._bpPreorderScheduled=!1,modalContent._bpListedBlocks=!1,modalContent._bpUserPicked=!1,modalContent.querySelectorAll(".tfc-fitrec-product[data-bp-tf-hydrated]").forEach(function(el){el.removeAttribute("data-bp-tf-hydrated")}));var dialogEl=getDialogEl();try{dialogEl&&typeof dialogEl.showDialog=="function"&&dialogEl.showDialog()}catch(e){log("showDialog threw",e)}requestAnimationFrame(function(){try{triggerEl.click()}catch(e){clearLoading(),log("triggerEl.click threw",e)}}),setTimeout(clearLoading,6e3)};function attachWatchers(){var dialog=getDialog();if(!dialog){log("no <dialog> yet \u2014 retrying"),setTimeout(attachWatchers,100);return}if(dialog._bpHooked){log("dialog already hooked");return}dialog._bpHooked=!0,log("hooked into dialog"),dialog.addEventListener("close",function(){state.latched=!0,clearLoading()});function tryWrapShowDialog(){var dialogEl=getDialogEl();if(!dialogEl)return!1;if(dialogEl._bpShowWrapped)return!0;if(typeof dialogEl.showDialog!="function")return!1;dialogEl._bpShowWrapped=!0;var orig=dialogEl.showDialog;return dialogEl.showDialog=function(){if(state.latched){log("showDialog blocked \u2014 latched");return}return orig.apply(dialogEl,arguments)},!0}!tryWrapShowDialog()&&window.customElements&&customElements.whenDefined&&customElements.whenDefined("quick-add-dialog").then(tryWrapShowDialog),new MutationObserver(function(){if(dialog.open&&state.latched)try{dialog.close()}catch{}}).observe(dialog,{attributes:!0,attributeFilter:["open"]});function requireDrawerSize(scope){var picker=scope.querySelector("variant-picker");if(!picker)return;function multiFieldsets(){return Array.prototype.filter.call(scope.querySelectorAll("variant-picker fieldset.variant-option"),function(fs){return fs.querySelectorAll('input[type="radio"]').length>1})}if(!multiFieldsets().length)return;var dialog2=scope.closest("quick-add-dialog")||document.getElementById("quick-add-dialog")||document;function evaluate(){scope._bpUserPicked||multiFieldsets().forEach(function(fs){fs.querySelectorAll('input[type="radio"]:checked').forEach(function(r){r.checked=!1,r.setAttribute("data-current-checked","false")})});var complete=scope._bpUserPicked&&multiFieldsets().every(function(fs){return fs.querySelector('input[type="radio"]:checked')}),checkedRadios=multiFieldsets().map(function(fs){return fs.querySelector('input[type="radio"]:checked')}
42).filter(Boolean),inStock=!complete||checkedRadios.every(function(r){return r.getAttribute("aria-disabled")!=="true"&&r.getAttribute("data-option-available")!=="false"}),addable=complete&&inStock;if(dialog2.querySelectorAll('add-to-cart-component button, button[name="add"], .add-to-cart-button').forEach(function(btn){btn.toggleAttribute("data-bp-size-block",!addable),addable?btn.removeAttribute("aria-disabled"):btn.setAttribute("aria-disabled","true"),complete&&!inStock?(btn.disabled=!0,scope._bpSizeDisabledByUs=!0):scope._bpSizeDisabledByUs&&(btn.disabled=!1,scope._bpSizeDisabledByUs=!1)}),dialog2.querySelectorAll("accelerated-checkout-component, .shopify-payment-button").forEach(function(el){el.style.display=addable?"":"none"}),!complete){var pol=scope.querySelector(".bp-preorder-line");pol&&(pol.hidden=!0)}}scope._bpSizeWired||(scope._bpSizeWired=!0,scope.addEventListener("change",function(e){var t=e.target;t&&t.type==="radio"&&t.closest&&t.closest("fieldset.variant-option")&&(scope._bpUserPicked=!0,syncPickedVariant()),evaluate()},{passive:!0}));function syncPickedVariant(){var picks=multiFieldsets().map(function(fs){return fs.querySelector('input[type="radio"]:checked')});if(!(!picks.length||!picks.every(Boolean))){var vid=null;picks.forEach(function(r){r.dataset.variantId&&(vid=r.dataset.variantId)}),vid&&dialog2.querySelectorAll('input[name="id"]').forEach(function(inp){inp.value=vid})}}evaluate()}var modalContent=getModalContent();if(modalContent){var ready="product-form-component, variant-picker, .product-details, [data-product-grid-content]";new MutationObserver(function(){if(modalContent.querySelector(ready)&&(clearLoading(),redistribute(modalContent),hydrateColorSiblings(modalContent),hydrateYotpoWidgets(modalContent),hydrateNotifyMe(modalContent),hydratePreorderLine(modalContent),hydrateFinalSale(modalContent),hydrateTrueFit(modalContent),requireDrawerSize(modalContent),!modalContent._bpListedBlocks)){modalContent._bpListedBlocks=!0;var bpEls=modalContent.querySelectorAll('[class*="bp-"]'),classes={};bpEls.forEach(function(el){Array.prototype.forEach.call(el.classList,function(c){c.indexOf("bp-")===0&&(classes[c]=(classes[c]||0)+1)})}),log("morphed bp-* classes:",Object.keys(classes).sort().join(", ")),log('contains "Final Sale" text:',modalContent.textContent.indexOf("Final Sale")!==-1)}}).observe(modalContent,{childList:!0,subtree:!0})}}function redistribute(scope){var mediaSlot=getMediaSlot(),ctaSlot=getCtaSlot();if(!(!mediaSlot||!ctaSlot)){var media=scope.querySelector(".product-information__media:not([data-bp-qd-placed])");if(media){media.setAttribute("data-bp-qd-placed",""),mediaSlot.appendChild(media);var eagerLoadGallery=function(){mediaSlot.querySelectorAll('.bp-pdp-gallery__img[loading="lazy"], .bp-pdp-gallery__slide img[loading="lazy"], .product-media__image[loading="lazy"]').forEach(function(img){img.loading="eager"})};eagerLoadGallery();var galEl=mediaSlot.querySelector("bp-pdp-gallery"),eagerMo=new MutationObserver(eagerLoadGallery);eagerMo.observe(galEl||mediaSlot,{childList:!0,subtree:!0}),setTimeout(function(){eagerMo.disconnect()},8e3);var galleryDefined=window.customElements&&customElements.get("bp-pdp-gallery");galEl&&!galleryDefined&&setTimeout(function(){if(!(galEl.getAttribute("data-bp-source")||!galEl.querySelector("[data-bp-amp-placeholder]"))){var rail2=galEl.querySelector("[data-bp-pdp-rail], .bp-pdp-gallery__rail"),tpl=galEl.querySelector("template[data-bp-shopify-fallback]");if(!(!rail2||!tpl)){rail2.querySelectorAll("[data-bp-amp-placeholder]").forEach(function(ph){ph.remove()});var frag=tpl.content.cloneNode(!0);frag.querySelectorAll(".bp-pdp-gallery__slide").forEach(function(s){s.getAttribute("data-index")!=="0"&&rail2.appendChild(s)}),galEl.setAttribute("data-bp-source","qd-fallback"),eagerLoadGallery()}}},500);var gallery=mediaSlot.querySelector("bp-pdp-gallery"),rail=mediaSlot.querySelector(".bp-pdp-gallery__rail");if(gallery&&rail&&!gallery.querySelector(".bp-qd-gallery-nav")){var chevronSvg='<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44" fill="none" aria-hidden="true">
42<path d="M18.1326 13.8674C18.0884 13.8244 18.0442 13.7814 18 13.7385C17.9128 13.8256 17.8256 13.9128 17.7385 14C17.7814 14.0442 17.8244 14.0884 17.8674 14.1326C18.1304 14.4029 18.3934 14.6733 18.6564 14.9436C21.0232 17.3768 23.3901 19.8099 25.7569 22.2431V21.7569C23.3238 24.1238 20.8906 26.4906 18.4575 28.8575C18.1871 29.1205 17.9168 29.3835 17.6464 29.6464C17.527 29.7627 17.4075 29.8789 17.288 29.9951C17.527 30.2341 17.7659 30.473 18.0049 30.712C18.1211 30.5925 18.2373 30.473 18.3536 30.3536C18.6165 30.0832 18.8795 29.8129 19.1425 29.5425C21.5094 27.1094 23.8762 24.6762 26.2431 22.2431L26.486 21.9933L26.2431 21.7569C23.8099 19.3901 21.3768 17.0232 18.9436 14.6564C18.6733 14.3934 18.4029 14.1304 18.1326 13.8674Z" fill="currentColor"/><path d="M18.3536 13.6464C18.2373 13.527 18.1211 13.4075 18.0049 13.288C17.7659 13.527 17.527 13.7659 17.288 14.0049C17.4075 14.1211 17.527 14.2373 17.6464 14.3536C17.9168 14.6165 18.1871 14.8795 18.4575 15.1425C20.8906 17.5094 23.3238 19.8762 25.7569 22.2431V21.7569C23.3901 24.1901 21.0232 26.6232 18.6564 29.0564C18.3934 29.3267 18.1304 29.5971 17.8674 29.8674C17.8244 29.9116 17.7814 29.9558 17.7385 30C17.8256 30.0872 17.9128 30.1744 18 30.2615C18.0442 30.2186 18.0884 30.1756 18.1326 30.1326C18.4029 29.8696 18.6733 29.6066 18.9436 29.3436C21.3768 26.9768 23.8099 24.6099 26.2431 22.2431L26.486 21.9933L26.2431 21.7569C23.8762 19.3238 21.5094 16.8906 19.1425 14.4575C18.8795 14.1871 18.6165 13.9168 18.3536 13.6464Z" fill="currentColor"/></svg>',prev=document.createElement("button");prev.type="button",prev.className="bp-qd-gallery-nav bp-qd-gallery-nav--prev",prev.setAttribute("aria-label","Previous image"),prev.innerHTML=chevronSvg;var next=document.createElement("button");next.type="button",next.className="bp-qd-gallery-nav bp-qd-gallery-nav--next",next.setAttribute("aria-label","Next image"),next.innerHTML=chevronSvg,gallery.appendChild(prev),gallery.appendChild(next);var scrollByOne=function(dir){var slide=rail.querySelector(".bp-pdp-gallery__slide");if(slide){var step=slide.getBoundingClientRect().width;rail.scrollBy({left:step*dir,behavior:"smooth"})}},updateDisabled=function(){var scrollLeft=rail.scrollLeft,maxScroll=rail.scrollWidth-rail.clientWidth;prev.disabled=scrollLeft<=1,next.disabled=scrollLeft>=maxScroll-1};prev.addEventListener("click",function(){scrollByOne(-1)}),next.addEventListener("click",function(){scrollByOne(1)}),rail.addEventListener("scroll",updateDisabled,{passive:!0}),requestAnimationFrame(updateDisabled)}}var titleHeading=scope.querySelector("h1:not([data-bp-qd-placed])"),titleFormEl=scope.querySelector("product-form-component[data-product-url]");if(titleHeading&&titleFormEl){titleHeading.setAttribute("data-bp-qd-placed","");var titleLink=document.createElement("a");for(titleLink.href=titleFormEl.getAttribute("data-product-url");titleHeading.firstChild;)titleLink.appendChild(titleHeading.firstChild);titleHeading.appendChild(titleLink)}var buyBlock=scope.querySelector(".buy-buttons-block:not([data-bp-qd-placed])")||scope.querySelector("product-form-component:not([data-bp-qd-placed])");if(buyBlock){buyBlock.setAttribute("data-bp-qd-placed","");var atcRow=document.createElement("div");atcRow.className="bp-qd__atc-row";var formButtons=buyBlock.querySelector(".product-form-buttons");if(formButtons){var atcWrap=document.createElement("div");atcWrap.style.flex="1 1 auto",atcWrap.style.minWidth="0";var atc=formButtons.querySelector('add-to-cart-component, button[name="add"]');if(atc){var atcParent=atc.closest("span")&&atc.closest("span")!==formButtons?atc.closest("span"):atc;atcWrap.appendChild(atcParent)}atcRow.appendChild(atcWrap),formButtons.insertBefore(atcRow,formButtons.firstChild)}ctaSlot.insertBefore(buyBlock,ctaSlot.firstChild)}var heart=scope.querySelector(".bp-pdp-save-later:not([data-bp-qd-placed])");if(heart&&(heart.setAttribute("data-bp-qd-placed",""),heart.classList.add("bp-pdp-save-later--placed")),!ctaSlot._bpBagObserver){var swapBagLabel=function(){ctaSlot.querySelectorAll(".add-to-cart-text__content span span").forEach(function(el){!el.children.length&&el.textContent.trim()==="Add to cart"&&(el.textContent="Add to bag")})};swapBagLabel(),ctaSlot._bpBagObserver=new MutationObserver(swapBagLabel),ctaSlot._bpBagObserver.observe(ctaSlot,{childList:!0,subtree:!0,characterData:!0}
42)}}}function hydrateYotpoWidgets(scope){var widgets=scope.querySelectorAll(".yotpo-widget-instance:not([data-bp-yotpo-rehydrated])");if(widgets.length){widgets.forEach(function(w){w.setAttribute("data-bp-yotpo-rehydrated",""),w.removeAttribute("data-yotpo-element-loaded"),w.removeAttribute("data-yotpo-widget-uuid"),w.innerHTML=""});var held=[];document.querySelectorAll(".yotpo-widget-instance").forEach(function(w){if(!(scope.contains(w)||!w.parentNode)){var ph=document.createComment("bp-yotpo-hold");w.parentNode.replaceChild(ph,w),held.push({node:w,ph})}});try{window.yotpoWidgetsContainer&&typeof window.yotpoWidgetsContainer.initWidgets=="function"?window.yotpoWidgetsContainer.initWidgets():window.YotpoApi&&typeof window.YotpoApi.refreshWidgets=="function"?window.YotpoApi.refreshWidgets():window.Yotpo&&window.Yotpo.API&&typeof window.Yotpo.API.refreshWidgets=="function"?window.Yotpo.API.refreshWidgets():window.yotpo&&typeof window.yotpo.refreshWidgets=="function"&&window.yotpo.refreshWidgets()}catch{}held.length&&requestAnimationFrame(function(){held.forEach(function(h){h.ph.parentNode&&h.ph.parentNode.replaceChild(h.node,h.ph)})})}}function hydrateNotifyMe(scope){var trigger=scope.querySelector("[data-bp-notify-trigger]");if(!trigger)return;var productId=trigger.dataset.sectionProduct,jsonEl=scope.querySelector("#bp-notify-variants-"+productId);if(!jsonEl)return;var table;try{table=JSON.parse(jsonEl.textContent||"{}")}catch{return}var ctaSelectors='.buy-buttons, button[name="add"], add-to-cart-component, accelerated-checkout-component, .accelerated-checkout-block, [data-shop-pay-button], .bp-qd__atc-row';function setVisible(vid){var entry=table[String(vid)]||{},available=entry.available!==!1,gates=entry.gates||{},currentInv=Number(gates.currentInv)||0,inboundInv=Number(gates.inboundInv)||0,restockEligible=!available&&!!entry.fullPrice&¤tInv<=0&&inboundInv<=0;trigger.style.display=restockEligible?"":"none",document.querySelectorAll(ctaSelectors).forEach(function(el){el.style.display=restockEligible?"none":""});var btn=trigger.querySelector("[data-bp-notify-open]");btn&&btn.setAttribute("data-bp-notify-variant-id",String(vid)),trigger.dataset.bpCurrentVariant=String(vid),window.bpCurrentVariantId=vid}function currentVid(){var r=scope.querySelector('variant-picker input[type="radio"]:checked[data-variant-id]');if(r&&r.dataset.variantId)return r.dataset.variantId;var idInput=scope.querySelector('input[name="id"]')||document.querySelector('#quick-add-modal-content input[name="id"], .bp-qd__cta-slot input[name="id"]');return idInput&&idInput.value?idInput.value:trigger.dataset.bpCurrentVariant||null}var initial=parseInt(trigger.dataset.bpCurrentVariant,10)||null;initial&&setVisible(initial);var onVariantChange=function(e){var vid=e&&e.detail&&(e.detail.resource&&e.detail.resource.id||e.detail.variant&&e.detail.variant.id||e.detail.id);vid&&setVisible(vid)};scope._bpNotifyOnChange&&(document.removeEventListener("variant:update",scope._bpNotifyOnChange),document.removeEventListener("variant:change",scope._bpNotifyOnChange)),scope._bpNotifyOnChange=onVariantChange,document.addEventListener("variant:update",onVariantChange),document.addEventListener("variant:change",onVariantChange),scope._bpNotifySetVisible=setVisible,scope._bpNotifyCurrentVid=currentVid,scope._bpNotifyChangeWired||(scope._bpNotifyChangeWired=!0,scope.addEventListener("change",function(e){var t=e.target;t&&t.type==="radio"&&t.closest&&t.closest("fieldset.variant-option")&&setTimeout(function(){if(!(!scope._bpNotifySetVisible||!scope._bpNotifyCurrentVid)){var vid=scope._bpNotifyCurrentVid();vid&&scope._bpNotifySetVisible(vid)}},0)},{passive:!0}))}function hydratePreorderLine(scope){if(!scope._bpPreorderScheduled){scope._bpPreorderScheduled=!0;var attempts=0,MAX=30;(function tryHydrate(){attempts++;var line=scope.querySelector(".bp-preorder-line"),row=line&&ensureVariantHeaderRow(scope),productId=line&&line.dataset.sectionProduct,jsonEl=productId&&scope.querySelector("#bp-preorder-variants-"+productId);if(!line||!row||!jsonEl){if(attempts<MAX)return setTimeout(tryHydrate,100);scope._bpPreorderScheduled=!1;return}var data;try{data=JSON.parse(jsonEl.textContent||"{}")}catch{scope._bpPreorderScheduled=!1;return}var variants=data.variants||{},originalOverride=data._originalOverride||"",dateEl=line.querySelector("[data-bp-preorder-date]");line.setAttribute("data-bp-preorder-hydrated",""),log("hydratePreorderLine: placed in variant-header row on attempt "+attempts);function place(){var r=ensureVariantHeaderRow(scope);r&&(r.querySelectorAll(".bp-preorder-line").forEach(function(el){el!==line&&el.remove()}),line.parentNode!==r&&r.appendChild(line))}place();var bp=window.bpPreorder;function localShouldShow(entry){return!(!entry||!entry.dcDate||entry.dcDate==="0"||!entry.isPreOrder||entry.inboundInv<=0||entry.currentInv>entry.inboundInv||entry.currentInv-1>entry.inboundInv)}function localFormatDate(raw){if(originalOverride)return originalOverride;if(!raw||raw==="0")return null;var d=new Date(raw);if(isNaN(d.getTime())||d<new Date)return null;var day=d.getDay();day===6?d.setDate(d.getDate()+2):day===0&&d.setDate(d.getDate()+1);try{return d.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"2-digit"})}catch{return d.toDateString()}}function shouldShow(entry){return bp&&bp.shouldShow?bp.shouldShow(entry):localShouldShow(entry)}function formatDate(raw){return bp&&bp.formatDate?bp.formatDate(raw,originalOverride):localFormatDate(raw)}function dlg(){return scope.closest("quick-add-dialog")||document.getElementById("quick-add-dialog")||document}var LIP_NAME="properties[_expected_ship_date]";function ensureLip(){var form=dlg().querySelector('form[action$="/cart/add"]');if(!form)return null;var input=form.querySelector('input[name="'+LIP_NAME+'"]');return input||(input=document.createElement("input"),input.type="hidden",input.name=LIP_NAME,input.setAttribute("data-bp-expected-ship-lip",""),input.disabled=!0,form.appendChild(input)),input}function syncLip(value){var input=ensureLip();input&&(value?(input.value=value,input.disabled=!1):(input.value="",input.disabled=!0))}function sizeSelected(){for(var fs=scope.querySelectorAll("variant-picker fieldset.variant-option"),i=0;i<fs.length;i++)if(!(fs[i].querySelectorAll('input[type="radio"]').length<=1)&&!fs[i].querySelector('input[type="radio"]:checked'))return!1;return!0}function currentVid(){var r=scope.querySelector('variant-picker input[type="radio"]:checked[data-variant-id]');if(r&&r.dataset.variantId)return r.dataset.variantId;var idInput=dlg().querySelector('form[action$="/cart/add"] input[name="id"]')||scope.querySelector('input[name="id"]');return idInput&&idInput.value?idInput.value:window.bpCurrentVariantId||null}function update(vid){if(place(),vid=vid||currentVid(),!vid||!sizeSelected()){line.hidden=!0,syncLip("");return}var entry=variants[String(vid)];if(!shouldShow(entry)){line.hidden=!0,syncLip("");return}var formatted=formatDate(entry.dcDate);if(!formatted){line.hidden=!0,syncLip("");return}dateEl&&(dateEl.textContent=formatted),line.hidden=!1,syncLip(formatted)}update();var onChange=function(e){var vid=e&&e.detail&&(e.detail.resource&&e.detail.resource.id||e.detail.variant&&e.detail.variant.id||e.detail.id);update(vid)};scope._bpPreorderOnChange&&(document.removeEventListener("variant:update",scope._bpPreorderOnChange),document.removeEventListener("variant:change",scope._bpPreorderOnChange)),scope._bpPreorderOnChange=onChange,document.addEventListener("variant:update",onCh
42ange),document.addEventListener("variant:change",onChange),scope._bpPreorderUpdate=update,scope._bpPreorderChangeWired||(scope._bpPreorderChangeWired=!0,scope.addEventListener("change",function(e){var t=e.target;t&&t.type==="radio"&&t.closest&&t.closest("fieldset.variant-option")&&setTimeout(function(){scope._bpPreorderUpdate&&scope._bpPreorderUpdate()},0)},{passive:!0})),scope._bpPreorderScheduled=!1})()}}function hydrateTrueFit(scope){var mount=scope.querySelector(".tfc-fitrec-product:not([data-bp-tf-hydrated])");if(mount){mount.setAttribute("data-bp-tf-hydrated","");var attempts=0;(function ping(){if(attempts++,typeof window.tfcapi=="function"){try{window.tfcapi("calculate")}catch{}log("TrueFit: calculate ping on attempt "+attempts);return}attempts<20?setTimeout(ping,250):log("TrueFit: tfcapi never appeared (loader blocked?)")})()}}function ensureVariantHeaderRow(scope){var fieldset=scope.querySelector("variant-picker fieldset.variant-option");if(!fieldset)return null;var legend=fieldset.querySelector(":scope > legend");if(!legend)return null;var row=fieldset.querySelector(":scope > .bp-qd__variant-header");return row||(row=document.createElement("div"),row.className="bp-qd__variant-header",fieldset.insertBefore(row,legend),row.appendChild(legend)),row}function hydrateFinalSale(scope){var fs=document.querySelector(".bp-qd__body .bp-final-sale, .bp-qd__cta-slot .bp-final-sale, dialog.bp-qd .bp-final-sale");fs&&fs.setAttribute("data-bp-final-sale-hydrated","")}function hydrateColorSiblings(scope){var roots=scope.querySelectorAll("[data-bp-colors]:not([data-bp-hydrated])");roots.forEach(function(root){root.setAttribute("data-bp-hydrated","");var isInv5=root.hasAttribute("data-bp-inv5-handle");if(isInv5){window.bpColorSiblings&&window.bpColorSiblings.hydrateRoot&&window.bpColorSiblings.hydrateRoot(root);return}var labelName=root.querySelector("[data-bp-active-color]"),initialName=labelName?labelName.textContent:"",items=Array.prototype.slice.call(root.querySelectorAll(".bp-colors__item:not(.is-active)"));items.forEach(function(item){item.addEventListener("mouseenter",function(){labelName&&item.dataset.bpColorName&&(labelName.textContent=item.dataset.bpColorName)}),item.addEventListener("mouseleave",function(){labelName&&(labelName.textContent=initialName)})})})}function captureDrawerSize(scope){try{var checked=scope.querySelector('variant-picker input[type="radio"]:checked');if(!checked)return null;var fs=checked.closest("fieldset"),pfx=fs&&fs.querySelector(".variant-option__swatch-prefix"),name=pfx?pfx.textContent.trim():checked.name||"",lc=name.toLowerCase();return lc==="color"||lc==="colour"?null:{option:name,value:checked.value}}catch{return null}}function restoreDrawerSize(scope,sel){if(sel)try{for(var fieldsets=scope.querySelectorAll("variant-picker fieldset.variant-option"),i=0;i<fieldsets.length;i++){var pfx=fieldsets[i].querySelector(".variant-option__swatch-prefix"),name=pfx?pfx.textContent.trim():"";if(!(!name||name.toLowerCase()!==sel.option.toLowerCase())){for(var radios=fieldsets[i].querySelectorAll('input[type="radio"]'),j=0;j<radios.length;j++)if(radios[j].value===sel.value){radios[j].checked||(radios[j].checked=!0,radios[j].dispatchEvent(new Event("input",{bubbles:!0})),radios[j].dispatchEvent(new Event("change",{bubbles:!0})));return}}}}catch{}}function loadSiblingIntoDrawer(url){var modalContent=getModalContent();if(!modalContent||!url)return;var keepSize=captureDrawerSize(modalContent);document.body.classList.add("bp-drawer-loading");var mediaSlot=getMediaSlot();mediaSlot&&(mediaSlot.innerHTML="");var ctaSlot=getCtaSlot();ctaSlot&&ctaSlot.querySelectorAll("[data-bp-qd-placed]").forEach(function(el){el.remove()}),modalContent._bpFinalSaleScheduled=!1,modalContent._bpPreorderScheduled=!1,modalContent._bpListedBlocks=!1,modalContent._bpUserPicked=!1;var clean=url.split("#")[0];function applyGrid(gridEl){var primary=gridEl.querySelector(".bp-pdp-gallery__img, .product-media__image, img"),url2=primary&&(primary.getAttribute("src")||(primary.getAttribute("srcset")||"").trim().split(" ")[0])||"",swap=function(){modalContent.style.transition="opacity 0.18s ease",modalContent.style.opacity="0",requestAnimationFrame(function(){modalContent.innerHTML=gridEl.innerHTML,requestAnimationFrame(function(){modalContent.style.opacity="1"}),keepSize&&requestAnimationFrame(function(){restoreDrawerSize(modalContent,keepSize)})})};if(url2){var done=!1,go=function(){done||(done=!0,swap())},im=new Image;im.onload=go,im.onerror=go,im.src=url2,setTimeout(go,400)}else swap()}var mainId=window.__bpPdpMainSectionId;if(!mainId)try{mainId=sessionStorage.getItem("bpPdpMainSectionId")}catch{}var fetchUrl=mainId?clean+(clean.indexOf("?")>-1?"&":"?")+"section_id="+encodeURIComponent(mainId):clean,cache=window.__bpDrawerCache,cachedGrid=cache&&cache.get?cache.get(fetchUrl):null;if(cachedGrid){applyGrid(cachedGrid.cloneNode(!0));return}function fetchGrid(u){return fetch(u,{credentials:"same-origin",headers:{Accept:"text/html"}}).then(function(r){if(!r.ok)throw new Error("HTTP "+r.status);return r.text()}).then(function(html){var doc=new DOMParser().parseFromString(html,"text/html"),fresh=doc.querySelector("[data-product-grid-content]");
42if(!fresh)throw new Error("no [data-product-grid-content] in "+u);return fresh})}fetchGrid(fetchUrl).then(function(fresh){cache&&cache.set&&cache.set(fetchUrl,fresh.cloneNode(!0)),applyGrid(fresh)}).catch(function(err){if(fetchUrl!==clean){window.__bpPdpMainSectionId=null;try{sessionStorage.removeItem("bpPdpMainSectionId")}catch{}fetchGrid(clean).then(applyGrid).catch(function(err2){clearLoading(),log("sibling load failed",err2)})}else clearLoading(),log("sibling load failed",err)}),setTimeout(clearLoading,6e3)}document.addEventListener("click",function(e){var anchor=e.target.closest&&e.target.closest("a[href]");if(anchor){var modalContent=getModalContent();if(!(!modalContent||!modalContent.contains(anchor))&&anchor.closest("[data-bp-colors]")){var href=anchor.getAttribute("href")||"";if(/\/products\//.test(href)){var dialog=getDialog();!dialog||!dialog.open||(e.preventDefault(),e.stopPropagation(),loadSiblingIntoDrawer(href))}}}},!0),document.addEventListener("click",function(e){var sc=e.target.closest("[data-bp-size-chart-open]");if(sc){e.preventDefault();var dialog=document.getElementById("bp-size-chart-drawer");if(!dialog){log("size chart: dialog not in DOM");return}try{typeof dialog.showModal=="function"?dialog.showModal():dialog.setAttribute("open","")}catch{dialog.setAttribute("open","")}document.body.classList.add("bp-size-chart-open");return}}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",attachWatchers):attachWatchers()})())}catch(e){console.error(e)}})(),(function(){if(__sections__["bp-search-results"])try{class BpSearchResults extends HTMLElement{connectedCallback(){if(this.grid=this.querySelector("[data-grid]"),!this.grid)return;if(this.query=(new URLSearchParams(location.search).get("q")||this.dataset.searchQuery||"").trim(),this.brEnabled=this.dataset.brEnabled==="1",this.bindFilterDrawer(),this.bindSort(),!this.brEnabled){this.bindLoadMore(),this.bindBagIcons(this.grid),this.trackSearch(),this.fireViewItemList();return}this.initBloomreach(),this.trackSearch();const grid=this.grid;if(grid){const obs=new MutationObserver(()=>{clearTimeout(this._fireVilTimer),this._fireVilTimer=setTimeout(()=>this.fireViewItemList(),250)});obs.observe(grid,{childList:!0}),this._vilObs=obs}}fireViewItemList(){if(!window.bpTrack||!window.bpTrack.view_item_list)return;let cards=Array.prototype.slice.call(this.querySelectorAll("[data-bp-track-product]"));if(!cards.length)return;const measured=cards.filter(c=>{const r=c.getBoundingClientRect();return r.width>0&&r.height>0});measured.length&&(cards=measured.sort((a,b)=>{const ra=a.getBoundingClientRect(),rb=b.getBoundingClientRect();return Math.abs(ra.top-rb.top)>8?ra.top-rb.top:ra.left-rb.left}));const parsed=[];if(cards.forEach(card=>{try{const p=JSON.parse(card.getAttribute("data-bp-track-product"));p&&p.id&&parsed.push({id:String(p.id),p})}catch{}}),!parsed.length)return;this._vilReported||(this._vilReported=new Set,this._vilNextIndex=0);const currentIds=new Set(parsed.map(x=>x.id));let replaced=!1;this._vilReported.forEach(id=>{currentIds.has(id)||(replaced=!0)}),replaced&&(this._vilReported=new Set,this._vilNextIndex=0);const fresh=parsed.filter(x=>!this._vilReported.has(x.id));if(!fresh.length)return;const items=fresh.map(({p})=>({id:p.id,title:p.title,vendor:p.vendor,handle:p.handle,url:p.url,sku:p.sku,product_type:p.product_type,metafields:{BP_ProductAttributes:{bp_department:p.category||""}},selected_variant:p.selected_variant}));window.bpTrack.view_item_list(items,"Search Results","Search Experience","Search Experience",this._vilNextIndex,"Search Experience",this.query),fresh.forEach(x=>this._vilReported.add(x.id)),this._vilNextIndex+=fresh.length}initBloomreach(){const br=window.shop&&window.shop.br||{},cfg={host:this.dataset.brHost||br.host,accountId:br.accountId,domainKey:br.domainKey,searchQuery:this.query,viewId:this.dataset.brViewId||"",perPage:this.dataset.brPerPage,siteUrl:this.dataset.brSiteUrl||window.shop&&window.shop.url||location.origin,refUrl:document.referrer||location.href,authKey:br.authKey||"",brUid:(function(){var raw=(document.cookie.match(/(?:^|;\s*)_br_uid_2=([^;
42]+)/)||[])[1]||"";try{return decodeURIComponent(raw)}catch{return raw}})(),cardQbStyle:this.dataset.bpCardQbStyle||"button",cardQvDest:this.dataset.bpCardQvDest||"drawer",cardQvVisD:this.dataset.bpCardQvVisD||"hover",cardQvVisM:this.dataset.bpCardQvVisM||"shown",cardSecondaryHover:!0,contentInjection:!1,onRender:grid=>this.bindBagIcons(grid)},tryInit=left=>{if(window.BpBloomreach&&typeof window.BpBloomreach.init=="function"){window.BpBloomreach.init(this,cfg);return}left<=0||setTimeout(()=>tryInit(left-100),100)};tryInit(3e3)}trackSearch(){if(!this.query)return;const countEl=this.querySelector(".bp-coll__count"),fire=n=>{window.bpTrack&&window.bpTrack.search&&window.bpTrack.search(this.query,n)};if(!this.brEnabled){const m=countEl&&(countEl.textContent||"").match(/\d[\d,]*/);fire(m?parseInt(m[0].replace(/,/g,""),10):void 0);return}if(!countEl){fire(void 0);return}const obs=new MutationObserver(()=>{const m=(countEl.textContent||"").match(/\d[\d,]*/);m&&(obs.disconnect(),fire(parseInt(m[0].replace(/,/g,""),10)))});obs.observe(countEl,{childList:!0,characterData:!0,subtree:!0}),setTimeout(()=>obs.disconnect(),8e3)}bindSort(){const select=this.querySelector("[data-sort-select]");!select||this.brEnabled||select.addEventListener("change",()=>{const url=new URL(window.location.href);url.searchParams.set("sort_by",select.value),url.searchParams.delete("page"),window.location.href=url.toString()})}bindLoadMore(){const btn=this.querySelector("[data-loadmore]");btn&&btn.addEventListener("click",e=>{e.preventDefault(),this.loadNextPage(btn)})}async loadNextPage(btn){if(!btn||btn.classList.contains("is-loading"))return;btn.classList.add("is-loading");const originalText=btn.textContent;btn.textContent="Loading\u2026";try{const html=await(await fetch(btn.href,{credentials:"same-origin"})).text(),doc=new DOMParser().parseFromString(html,"text/html"),nextGrid=doc.querySelector("[data-grid]"),nextBtn=doc.querySelector("[data-loadmore]");nextGrid&&(nextGrid.querySelectorAll(":scope > li").forEach(li=>{this.grid.appendChild(li)}),this.bindBagIcons(this.grid),this.fireViewItemList()),nextBtn?(btn.href=nextBtn.href,btn.classList.remove("is-loading"),btn.textContent=originalText):btn.outerHTML='<span class="bp-coll__loadmore is-end">End of results</span>'}catch(err){console.error("[bp-search-results] load-more failed:",err),btn.classList.remove("is-loading"),btn.textContent=originalText}}bindFilterDrawer(){const opener=this.querySelector("[data-bp-filter-open]"),drawer=this.querySelector("dialog.bp-filter-drawer");!opener||!drawer||(opener.addEventListener("click",e=>{e.preventDefault(),!drawer.open&&(typeof drawer.showModal=="function"?drawer.showModal():drawer.setAttribute("open",""))}),drawer.addEventListener("cancel",e=>{e.preventDefault(),this.closeFilterDrawer(drawer)}),drawer.addEventListener("click",e=>{const pill=e.target.closest("[data-bp-pill]");if(pill){if(pill.disabled||pill.getAttribute("aria-disabled")==="true")return;e.preventDefault(),e.stopPropagation(),this.togglePill(pill);return}if(e.target.closest("[data-bp-filter-apply]")){e.preventDefault(),e.stopPropagation(),this.applyFilters(drawer);return}if(e.target.closest("[data-bp-filter-clear]")){e.preventDefault(),e.stopPropagation(),this.clearFilters(drawer);return}if(e.target.closest("[data-bp-filter-close]")){e.preventDefault(),e.stopPropagation(),this.closeFilterDrawer(drawer);return}e.target===drawer&&(e.preventDefault(),e.stopPropagation(),this.closeFilterDrawer(drawer))}))}togglePill(pill){const next=!pill.classList.contains("is-active");pill.classList.toggle("is-active",next),next?pill.setAttribute("aria-current","true"):pill.removeAttribute("aria-current"),this.updateFilterCount(pill.closest("[data-bp-filter]"))}
42updateFilterCount(detailsEl){if(!detailsEl)return;const count=detailsEl.querySelectorAll("[data-bp-pill].is-active").length,summary=detailsEl.querySelector(".bp-filter__summary");if(!summary)return;let countEl=summary.querySelector(".bp-filter__count");if(count>0){if(!countEl){countEl=document.createElement("span"),countEl.className="bp-filter__count";const chev=summary.querySelector(".bp-filter__chevron");chev?summary.insertBefore(countEl,chev):summary.appendChild(countEl)}countEl.textContent=`${count} Selected`}else countEl&&countEl.remove()}#baseParams(){const params=new URLSearchParams;return this.query&¶ms.set("q",this.query),params}applyFilters(drawer){const baseUrl=(drawer.dataset.collectionUrl||location.pathname).split("?")[0],params=this.#baseParams();drawer.querySelectorAll("[data-bp-pill].is-active").forEach(pill=>{const key=pill.dataset.param,val=pill.dataset.value;key&&val&¶ms.append(key,val)});const priceForm=drawer.querySelector("[data-bp-price-form]");priceForm&&new FormData(priceForm).forEach((v,k)=>{v!==""&&v!=null&¶ms.append(k,v)});const current=new URLSearchParams(location.search);["sort_by","per_page"].forEach(k=>{const v=current.get(k);v&¶ms.set(k,v)}),location.href=baseUrl+"?"+params.toString()}clearFilters(drawer){const baseUrl=(drawer.dataset.collectionUrl||location.pathname).split("?")[0],params=this.#baseParams(),current=new URLSearchParams(location.search);["sort_by","per_page"].forEach(k=>{const v=current.get(k);v&¶ms.set(k,v)}),location.href=baseUrl+"?"+params.toString()}closeFilterDrawer(drawer){if(drawer.dataset.bpClosing==="1"||!drawer.open)return;drawer.dataset.bpClosing="1",drawer.classList.add("is-closing");const finish=()=>{drawer.classList.remove("is-closing"),delete drawer.dataset.bpClosing;try{drawer.close()}catch{drawer.removeAttribute("open")}};let done=!1;const onEnd=e=>{done||e&&e.target!==drawer||(done=!0,drawer.removeEventListener("animationend",onEnd),finish())};drawer.addEventListener("animationend",onEnd),setTimeout(()=>{done||onEnd()},350)}bindBagIcons(scope){scope.querySelectorAll(".bp-card__quick").forEach(bag=>{bag.dataset.bpBound||(bag.dataset.bpBound="1",bag.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const card=bag.closest(".bp-card");if(!card)return;const open=()=>{const trigger=card.querySelector(".quick-add__button--choose");return trigger?(typeof window.bpOpenProductDrawer=="function"?window.bpOpenProductDrawer(trigger):trigger.click(),!0):!1};if(open())return;const handle=(card.dataset.productUrl||"").match(/\/products\/([^/?#]+)/);!handle||card.dataset.bpQaLoading==="1"||!window.BpCardHydrate||(card.dataset.bpQaLoading="1",window.BpCardHydrate.hydrateHandle(handle[1]).then(data=>{window.BpCardHydrate.applyHydration(card,data)}).then(()=>{card.dataset.bpQaLoading="0",open()}).catch(()=>{card.dataset.bpQaLoading="0"}))}))})}}customElements.get("bp-search-results")||customElements.define("bp-search-results",BpSearchResults)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-shop-the-look"]&&!Shopify.designMode))try{class BpShopTheLook extends HTMLElement{connectedCallback(){this.initTriggers(),this.initCarousel()}initTriggers(){this.querySelectorAll("[data-stl-trigger]").forEach(btn=>{btn.addEventListener("click",e=>{e.preventDefault();const id=btn.dataset.drawerId;if(!id)return;const dialog=document.getElementById("bp-stl-drawer-"+id);dialog&&(typeof dialog.showModal=="function"?dialog.showModal():dialog.setAttribute("open",""))})})}initCarousel(){const inner=this.querySelector(".bp-stl__inner");if(!inner)return;const lookBlocks=Array.from(inner.querySelectorAll(":scope > .shopify-block")).filter(b=>b.querySelector(".bp-stl__look"));if(lookBlocks.length===0)return;const rail=document.createElement("div");rail.className="bp-stl__rail",inner.insertBefore(rail,lookBlocks[0]),lookBlocks.forEach(b=>rail.appendChild(b)),this.rail=rail;const nav=document.createElement("div");nav.className="bp-stl__nav";const chevronSvg='<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44" fill="none" aria-hidden="true">
42<path d="M18.1326 13.8674C18.0884 13.8244 18.0442 13.7814 18 13.7385C17.9128 13.8256 17.8256 13.9128 17.7385 14C17.7814 14.0442 17.8244 14.0884 17.8674 14.1326C18.1304 14.4029 18.3934 14.6733 18.6564 14.9436C21.0232 17.3768 23.3901 19.8099 25.7569 22.2431V21.7569C23.3238 24.1238 20.8906 26.4906 18.4575 28.8575C18.1871 29.1205 17.9168 29.3835 17.6464 29.6464C17.527 29.7627 17.4075 29.8789 17.288 29.9951C17.527 30.2341 17.7659 30.473 18.0049 30.712C18.1211 30.5925 18.2373 30.473 18.3536 30.3536C18.6165 30.0832 18.8795 29.8129 19.1425 29.5425C21.5094 27.1094 23.8762 24.6762 26.2431 22.2431L26.486 21.9933L26.2431 21.7569C23.8099 19.3901 21.3768 17.0232 18.9436 14.6564C18.6733 14.3934 18.4029 14.1304 18.1326 13.8674Z" fill="currentColor"/><path d="M18.3536 13.6464C18.2373 13.527 18.1211 13.4075 18.0049 13.288C17.7659 13.527 17.527 13.7659 17.288 14.0049C17.4075 14.1211 17.527 14.2373 17.6464 14.3536C17.9168 14.6165 18.1871 14.8795 18.4575 15.1425C20.8906 17.5094 23.3238 19.8762 25.7569 22.2431V21.7569C23.3901 24.1901 21.0232 26.6232 18.6564 29.0564C18.3934 29.3267 18.1304 29.5971 17.8674 29.8674C17.8244 29.9116 17.7814 29.9558 17.7385 30C17.8256 30.0872 17.9128 30.1744 18 30.2615C18.0442 30.2186 18.0884 30.1756 18.1326 30.1326C18.4029 29.8696 18.6733 29.6066 18.9436 29.3436C21.3768 26.9768 23.8099 24.6099 26.2431 22.2431L26.486 21.9933L26.2431 21.7569C23.8762 19.3238 21.5094 16.8906 19.1425 14.4575C18.8795 14.1871 18.6165 13.9168 18.3536 13.6464Z" fill="currentColor"/></svg>';nav.innerHTML='<button type="button" class="bp-stl__nav-btn bp-stl__nav-btn--prev" data-stl-nav="prev" aria-label="Previous look">'+chevronSvg+'</button><button type="button" class="bp-stl__nav-btn bp-stl__nav-btn--next" data-stl-nav="next" aria-label="Next look">'+chevronSvg+"</button>",this.insertBefore(nav,this.firstChild),this.nav=nav,this.scrollByTile=dir=>{if(!this.rail)return;const first=this.rail.querySelector(".shopify-block");if(!first)return;const step=first.getBoundingClientRect().width+(parseFloat(getComputedStyle(this.rail).columnGap)||parseFloat(getComputedStyle(this.rail).gap)||0);this.rail.scrollBy({left:step*dir,behavior:"smooth"})},nav.querySelector('[data-stl-nav="prev"]').addEventListener("click",()=>this.scrollByTile(-1)),nav.querySelector('[data-stl-nav="next"]').addEventListener("click",()=>this.scrollByTile(1));const indicator=document.createElement("div");indicator.className="bp-stl__indicator",indicator.setAttribute("aria-hidden","true"),this.appendChild(indicator),this.indicator=indicator,this.updateIndicator=this.updateIndicator.bind(this),this.updateNavState=this.updateNavState.bind(this),rail.addEventListener("scroll",this.updateIndicator,{passive:!0}),rail.addEventListener("scroll",this.updateNavState,{passive:!0}),window.addEventListener("resize",this.updateIndicator),window.addEventListener("resize",this.updateNavState),requestAnimationFrame(()=>{this.updateIndicator(),this.updateNavState()})}updateNavState(){if(!this.rail||!this.nav)return;const{scrollLeft,scrollWidth,clientWidth}=this.rail,prev=this.nav.querySelector('[data-stl-nav="prev"]'),next=this.nav.querySelector('[data-stl-nav="next"]');prev&&(prev.disabled=scrollLeft<=1),next&&(next.disabled=scrollLeft+clientWidth>=scrollWidth-1)}updateIndicator(){if(!this.rail||!this.indicator)return;const{scrollLeft,scrollWidth,clientWidth}=this.rail;if(scrollWidth<=clientWidth){this.indicator.style.display="none";return}this.indicator.style.display="";const thumbW=clientWidth/scrollWidth*100,overflow=scrollWidth-clientWidth,thumbX=overflow>0?scrollLeft/overflow:0;this.indicator.style.setProperty("--bp-stl-thumb-w",thumbW+"%"),this.indicator.style.setProperty("--bp-stl-thumb-x",thumbX)}disconnectedCallback(){this.updateIndicator&&window.removeEventListener("resize",this.updateIndicator)}}customElements.get("bp-shop-the-look")||customElements.define("bp-shop-the-look",BpShopTheLook)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-styled-for-you"]&&!Shopify.designMode))try{let sfyHandleFromUrl2=function(url){const m=String(url||"").match(/\/products\/([^/?#]+)/);return m?m[1]:null},sfyEsc2=function(s){return String(s??"").replace(/[&<>"']/g,c=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[c])},sfySizeImg2=function(url,w){return url?url+(url.indexOf("?")>=0?"&":"?")+"width="+w:""};var sfyHandleFromUrl=sfyHandleFromUrl2,sfyEsc=sfyEsc2,sfySizeImg=sfySizeImg2;const SFY_STL_ENDPOINT="https://widget-api.stylitics.com/api/outfits",SFY_STL_USERNAME="bostonproper";class BpStyledForYou extends HTMLElement{connectedCallback(){if(this.wrapLooksInTrack(),this.track=this.querySelector(".bp-sfy__track"),this.prevBtn=this.querySelector('[data-direction="prev"]'),this.nextBtn=this.querySelector('[data-direction="next"]'),this.querySelectorAll(".bp-sfy__card[data-product-id]").forEach(card=>this.wireCard(card)),this.hydrateStyliticsLooks(),this.track&&this.prevBtn&&this.prevBtn.addEventListener("click",()=>this.scrollByLook(-1)),this.track&&this.nextBtn&&this.nextBtn.addEventListener("click",()=>this.scrollByLook(1)),this.track){this.updateArrows=this.updateArrows.bind(this),this.updateIndicator=this.updateIndicator.bind(this);var tick=()=>{this.updateArrows(),this.updateIndicator()};this.track.addEventListener("scroll",tick,{passive:!0}),window.addEventListener("resize",tick),requestAnimationFrame(tick)}}disconnectedCallback(){window.removeEventListener("resize",this.updateArrows)}wireCard(card){if(card._bpSfyWired)return;card._bpSfyWired=!0;let prefetched=!1;const prefetch=()=>
42{if(prefetched)return;prefetched=!0;const link=card.closest(".bp-sfy__card-host")?.querySelector('a[ref="productCardLink"]');link?.href&&fetch(link.href,{credentials:"same-origin"}).catch(()=>{})};card.addEventListener("mouseenter",prefetch),card.addEventListener("focus",prefetch),card.addEventListener("touchstart",prefetch,{passive:!0}),card.addEventListener("click",e=>this.handleCardClick(e,card)),card.setAttribute("role","button"),card.setAttribute("tabindex","0"),card.addEventListener("keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleCardClick(e,card))})}handleCardClick(e,card){if(e&&e.target&&e.target.closest&&e.target.closest(".bp-sfy__card-quick"))return;const trigger=card.querySelector(".quick-add__button--choose");trigger&&(typeof window.bpOpenProductDrawer=="function"?window.bpOpenProductDrawer(trigger):trigger.click())}async hydrateStyliticsLooks(){const looks=this.querySelectorAll("[data-bp-sfy-look][data-bp-sfy-style]");looks.length&&await Promise.all(Array.from(looks).map(look=>this.hydrateLook(look)))}async hydrateLook(look){const style=look.getAttribute("data-bp-sfy-style");if(!style)return;let products=[];try{products=await this.fetchStyliticsOutfit(style)}catch(err){console.warn("[bp-sfy] Stylitics fetch threw for style",style,err);return}products.length<4||this.replaceGridCards(look,products)}async fetchStyliticsOutfit(style){const url=SFY_STL_ENDPOINT+"?username="+encodeURIComponent(SFY_STL_USERNAME)+"&item_number="+encodeURIComponent(style),res=await fetch(url,{cache:"force-cache"});if(!res.ok)return[];const outfits=await res.json();if(!Array.isArray(outfits)||!outfits.length)return[];const items=(outfits[0].items||[]).slice(0,8),seen=new Set,requests=[];for(const item of items){const handle=sfyHandleFromUrl2(item&&item.affiliate_link);!handle||seen.has(handle)||(seen.add(handle),requests.push(fetch("/products/"+handle+".js",{cache:"force-cache"}).then(r=>r.ok?r.json():null).catch(()=>null)))}return(await Promise.all(requests)).filter(p=>p&&p.available!==!1).slice(0,4)}replaceGridCards(look,products){const grid=look.querySelector("[data-bp-sfy-grid]");if(!grid)return;const sectionId=this.dataset.sectionId||"";let html="";for(let i=0;i<4;
42i+=1)html+=products[i]?this.buildCardHtml(products[i],sectionId):'<div class="bp-sfy__card bp-sfy__card--empty" aria-hidden="true"></div>';grid.innerHTML=html,grid.querySelectorAll(".bp-sfy__card[data-product-id]").forEach(card=>this.wireCard(card))}buildCardHtml(product,sectionId){const useGhost=this.dataset.bpSfyUseGhost!=="0",ghostFirstTypes=(this.dataset.bpSfyGhostFirstTypes||"").toLowerCase().split(",").map(t=>t.trim()).filter(Boolean),ptype=String(product.type||"").toLowerCase().trim(),ghostFirst=ptype&&ghostFirstTypes.some(t=>ptype.indexOf(t)!==-1);let featured=product.featured_image||"";if(useGhost&&!ghostFirst){if(Array.isArray(product.images)&&product.images.length>1)featured=product.images[1]||featured;else if(Array.isArray(product.media)&&product.media.length>1){const m1=product.media[1];featured=m1&&(m1.preview_image&&m1.preview_image.src||m1.src)||featured}}const url=product.url||"/products/"+product.handle,title=product.title||"",imgSrc=featured?sfySizeImg2(featured,540):"",imgSrcset=featured?sfySizeImg2(featured,360)+" 360w, "+sfySizeImg2(featured,540)+" 540w, "+sfySizeImg2(featured,720)+" 720w":"",imgHtml=imgSrc?'<img class="bp-sfy__card-image" src="'+sfyEsc2(imgSrc)+'" srcset="'+sfyEsc2(imgSrcset)+'" sizes="(min-width: 1024px) 16vw, 40vw" alt="'+sfyEsc2(title)+'" loading="lazy">':"";return'<product-card class="bp-sfy__card-host"><a href="'+sfyEsc2(url)+'" ref="productCardLink" class="visually-hidden" tabindex="-1" aria-hidden="true">'+sfyEsc2(title)+'</a><article class="bp-sfy__card" data-product-id="'+sfyEsc2(product.id)+'" data-product-handle="'+sfyEsc2(product.handle||"")+'" aria-label="View '+sfyEsc2(title)+'">'+imgHtml+'<span class="bp-sfy__card-bag" aria-hidden="true"><svg viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M4.18929 5.74434H16.5343H16.6292L16.6729 5.74549C16.9007 5.75099 17.1328 5.87803 17.2448 6.08089C17.3145 6.20157 17.3382 6.30372 17.3547 6.43048C17.6354 9.18806 17.9008 11.996 18.3051 14.7356C18.3771 15.2467 18.4466 15.758 18.5137 16.2697C18.5163 16.2917 18.5195 16.336 18.5207 16.3582C18.5378 16.6193 18.4156 16.9263 18.1508 17.0687C17.9651 17.1752 17.7807 17.1763 17.5845 17.1755C16.1978 17.1755 4.69428 17.1755 3.34023 17.1755C3.20422 17.1726 3.01496 17.1862 2.86505 17.1451C2.45036 17.0406 2.25213 16.656 2.31666 16.2445C2.41071 15.5271 2.58579 14.2489 2.68621 13.5185C2.95476 11.5399 3.15849 9.46674 3.35962 7.47459C3.37582 7.3571 3.44296 6.63739 3.45714 6.52887L3.46698 6.43424L3.46814 6.42237C3.46814 6.41948 3.46901 6.4134 3.47045 6.40559C3.5156 6.02417 3.79254 5.74028 4.18929 5.74434Z"/><path d="M6.08301 8.78064C6.1788 7.5189 6.20658 6.21405 6.58539 4.98907C7.15432 3.11007 8.4421 2.11631 10.414 2.12673C13.8001 2.13338 14.5031 4.87997 14.6721 7.71395C14.6964 8.07453 14.7158 8.43453 14.745 8.78035L13.5874 8.77485C13.6172 8.46057 13.6575 8.02649 13.6754 7.71858C13.801 5.83351 13.5976 3.34129 11.3988 2.81605C10.7575 2.6676 10.0702 2.6676 9.42892 2.81605C7.61503 3.24811 7.15143 5.0374 7.12683 6.6872C7.11121 7.36929 7.17545 8.09132 7.24056 8.77485L6.08301 8.78035V8.78064Z"/></svg></span>'+'<div class="bp-sfy__card-quick"><quick-add-component class="quick-add" ref="quickAdd" data-product-title="'+sfyEsc2(title)+'" data-quick-add-button="choose"><product-form-component data-section-id="'+sfyEsc2(sectionId)+'" data-product-id="'+sfyEsc2(product.id)+'" class="quick-add__product-form-component"><button class="button quick-add__button quick-add__button--choose add-to-cart-button" type="button" name="add" on:click="quick-add-component/handleClick"><span class="add-to-cart-text"><span class="add-to-cart-text__content"><span><span>Choose</span></span></span></span></button></product-form-component></quick-add-component></div></article></product-card>'}wrapLooksInTrack(){var inner=this.querySelector(".bp-sfy__inner");if(inner&&!inner.querySelector(":scope > .bp-sfy__track")){var looks=Array.from(inner.querySelectorAll(".bp-sfy__look"));if(looks.length!==0){var track=document.createElement("div");track.className="bp-sfy__track";for(var first=looks[0];first&&first.parentNode!==inner;)first=first.parentNode;first?inner.insertBefore(track,first):inner.appendChild(track),looks.forEach(function(look){track.appendChild(look)});var indicator=document.createElement("div");if(indicator.className="bp-sfy__indicator",indicator.setAttribute("data-bp-sfy-indicator",""),indicator.setAttribute("aria-hidden","true"),track.after(indicator),!inner.querySelector(":scope > .bp-sfy__header")){for(var headingHost=inner.firstElementChild;headingHost&&(headingHost===track||headingHost===indicator);)headingHost=headingHost.nextElementSibling;var header=document.createElement("div");header.className="bp-sfy__header",headingHost&&headingHost!==track&&headingHost!==indicator?(inner.insertBefore(header,headingHost),header.appendChild(headingHost)):inner.insertBefore(header,inner.firstChild);var chevronSvg='<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44" fill="none" aria-hidden="true">
42<path d="M18.1326 13.8674C18.0884 13.8244 18.0442 13.7814 18 13.7385C17.9128 13.8256 17.8256 13.9128 17.7385 14C17.7814 14.0442 17.8244 14.0884 17.8674 14.1326C18.1304 14.4029 18.3934 14.6733 18.6564 14.9436C21.0232 17.3768 23.3901 19.8099 25.7569 22.2431V21.7569C23.3238 24.1238 20.8906 26.4906 18.4575 28.8575C18.1871 29.1205 17.9168 29.3835 17.6464 29.6464C17.527 29.7627 17.4075 29.8789 17.288 29.9951C17.527 30.2341 17.7659 30.473 18.0049 30.712C18.1211 30.5925 18.2373 30.473 18.3536 30.3536C18.6165 30.0832 18.8795 29.8129 19.1425 29.5425C21.5094 27.1094 23.8762 24.6762 26.2431 22.2431L26.486 21.9933L26.2431 21.7569C23.8099 19.3901 21.3768 17.0232 18.9436 14.6564C18.6733 14.3934 18.4029 14.1304 18.1326 13.8674Z" fill="currentColor"/><path d="M18.3536 13.6464C18.2373 13.527 18.1211 13.4075 18.0049 13.288C17.7659 13.527 17.527 13.7659 17.288 14.0049C17.4075 14.1211 17.527 14.2373 17.6464 14.3536C17.9168 14.6165 18.1871 14.8795 18.4575 15.1425C20.8906 17.5094 23.3238 19.8762 25.7569 22.2431V21.7569C23.3901 24.1901 21.0232 26.6232 18.6564 29.0564C18.3934 29.3267 18.1304 29.5971 17.8674 29.8674C17.8244 29.9116 17.7814 29.9558 17.7385 30C17.8256 30.0872 17.9128 30.1744 18 30.2615C18.0442 30.2186 18.0884 30.1756 18.1326 30.1326C18.4029 29.8696 18.6733 29.6066 18.9436 29.3436C21.3768 26.9768 23.8099 24.6099 26.2431 22.2431L26.486 21.9933L26.2431 21.7569C23.8762 19.3238 21.5094 16.8906 19.1425 14.4575C18.8795 14.1871 18.6165 13.9168 18.3536 13.6464Z" fill="currentColor"/></svg>';header.insertAdjacentHTML("beforeend",'<div class="bp-sfy__nav"><button type="button" class="bp-sfy__arrow bp-sfy__arrow--prev" data-direction="prev" aria-label="Previous look">'+chevronSvg+'</button><button type="button" class="bp-sfy__arrow bp-sfy__arrow--next" data-direction="next" aria-label="Next look">'+chevronSvg+"</button></div>")}}}}updateIndicator(){if(this.track){var indicator=this.querySelector("[data-bp-sfy-indicator]");if(indicator){var visible=this.track.clientWidth,total=this.track.scrollWidth;if(total<=visible+1){indicator.style.display="none";return}indicator.style.display="";var overflow=total-visible,thumbW=visible/total*100,thumbX=overflow>0?this.track.scrollLeft/overflow:0;indicator.style.setProperty("--bp-sfy-thumb-w",thumbW+"%"),indicator.style.setProperty("--bp-sfy-thumb-x",thumbX)}}}scrollByLook(direction){const look=this.track.querySelector(".bp-sfy__look");if(!look)return;const styles=getComputedStyle(this.track),gap=parseFloat(styles.columnGap||styles.gap)||0,step=look.getBoundingClientRect().width+gap;this.track.scrollBy({left:step*direction,behavior:"smooth"})}updateArrows(){if(!this.prevBtn||!this.nextBtn||!this.track)return;const{scrollLeft,scrollWidth,clientWidth}=this.track;this.prevBtn.disabled=scrollLeft<=1,this.nextBtn.disabled=scrollLeft+clientWidth>=scrollWidth-1}}customElements.get("bp-styled-for-you")||customElements.define("bp-styled-for-you",BpStyledForYou)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-tabbed-gallery"]&&!Shopify.designMode))try{class BpTabbedGallery extends HTMLElement{connectedCallback(){this.distributeBlocks();const tabs=Array.from(this.querySelectorAll(".bp-tg__tab")),panels=Array.from(this.querySelectorAll(".bp-tg__panel"));tabs.forEach(tab=>{tab.addEventListener("click",()=>{const target=tab.dataset.tab;
42tabs.forEach(t=>{const active=t===tab;t.classList.toggle("is-active",active),t.setAttribute("aria-selected",active?"true":"false")}),panels.forEach(p=>{const show=p.dataset.panel===target;p.classList.toggle("is-active",show),show?p.removeAttribute("hidden"):p.setAttribute("hidden","")}),requestAnimationFrame(this._updateAllRails)})}),this._rails=[],this.querySelectorAll("[data-bp-tg-rail]").forEach(rail=>{const id=rail.classList.contains("bp-tg__colors-list")?"colors":rail.closest(".bp-tg__panel")?.dataset.panel||null;if(!id)return;const indicator=this.querySelector(`[data-bp-tg-indicator-for="${id}"]`);if(!indicator)return;const update=()=>{const visible=rail.clientWidth,total=rail.scrollWidth;if(total<=visible){indicator.style.display="none";return}indicator.style.display="";const overflow=total-visible,thumbW=visible/total*100,thumbX=overflow>0?rail.scrollLeft/overflow:0;indicator.style.setProperty("--bp-tg-thumb-w",thumbW+"%"),indicator.style.setProperty("--bp-tg-thumb-x",thumbX)};rail.addEventListener("scroll",update,{passive:!0}),this._rails.push({rail,update})}),this._updateAllRails=()=>this._rails.forEach(r=>r.update()),window.addEventListener("resize",this._updateAllRails),requestAnimationFrame(this._updateAllRails)}distributeBlocks(){const source=this.querySelector("[data-bp-tg-source]");if(!source)return;const wrappers=Array.from(source.children),counts={tab1:0,tab2:0,color:0};wrappers.forEach(wrapper=>{const node=wrapper.matches("[data-bp-tg-block]")?wrapper:wrapper.querySelector("[data-bp-tg-block]");if(!node)return;const kind=node.dataset.bpTgBlock;if(kind==="card"){const tab=node.dataset.tab||"tab1",grid=this.querySelector(`[data-bp-tg-grid="${tab}"]`);grid&&(grid.appendChild(node),counts[tab]+=1)}else if(kind==="color"){const list=this.querySelector("[data-bp-tg-colors-list]");list&&(list.appendChild(node),counts.color+=1)}}),source.remove(),["tab1","tab2"].forEach(id=>{const empty=this.querySelector(`[data-bp-tg-empty="${id}"]`),grid=this.querySelector(`[data-bp-tg-grid="${id}"]`);empty&&(empty.hidden=counts[id]>0),grid&&(grid.hidden=counts[id]===0)});const colorsWrapper=this.querySelector("[data-bp-tg-colors-wrapper]");colorsWrapper&&(colorsWrapper.hidden=counts.color===0)}disconnectedCallback(){window.removeEventListener("resize",this._updateAllRails)}}customElements.get("bp-tabbed-gallery")||customElements.define("bp-tabbed-gallery",BpTabbedGallery)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-true-fit-landing"]&&!Shopify.designMode))try{class BpTrueFit extends HTMLElement{connectedCallback(){let tries=0;const nudge=()=>{if(window.tfcapi)try{window.tfcapi("calculate")}catch{}};nudge();const iv=setInterval(()=>{nudge(),++tries>=10&&clearInterval(iv)},500);window.addEventListener("load",nudge,{once:!0})}}customElements.get("bp-true-fit")||customElements.define("bp-true-fit",BpTrueFit)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-yotpo-loyalty"]&&!Shopify.designMode))try{class BpYotpoLoyalty extends HTMLElement{connectedCallback(){const widget=this.querySelector(".yotpo-widget-instance");if(!widget)return;const check=()=>{const empty=widget.offsetHeight<40;this.toggleAttribute("data-bp-empty",empty)};new MutationObserver(check).observe(widget,{childList:!0,subtree:!0}),check(),[1500,4e3,8e3].forEach(t=>setTimeout(check,t))}}customElements.get("bp-yotpo-loyalty")||customElements.define("bp-yotpo-loyalty",BpYotpoLoyalty)}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["bp-yotpo-reviews"]&&!Shopify.designMode))try{(function(){var ROOT_SEL=".yotpo-filters-container",MIRROR_CLASS="bp-yfm",rendered=!1;function init(){var native=document.querySelector(ROOT_SEL);return!native||native.dataset.bpYfmMounted||!native.querySelector(".yotpo-score-option")?!1:(native.dataset.bpYfmMounted="1",mount(native),!0)}function txt(el){return(el&&el.textContent||"").trim()}function esc(s){return String(s??"").replace(/[&<>"']/g,function(c){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[c]})}function readScoreOptions(native){var opts=Array.from(native.querySelectorAll(".yotpo-score-filter .yotpo-score-option"));return opts.map(function(o){var n=parseInt(o.getAttribute("title")||"0",10),label=n===0?"All ratings":n+" star"+(n===1?"":"s");return{value:String(n),label,native:o}})}function readCustomFilters(native){var chips=Array.from(native.querySelectorAll(".yotpo-custom-questions-filter"));return chips.map(function(chip){var label=txt(chip.querySelector(".yotpo-selected-value"))||(chip.querySelector(".yotpo-selected-value")||{}).getAttribute&&chip.querySelector(".yotpo-selected-value").getAttribute("title")||"",opts=Array.from(chip.querySelectorAll(".yotpo-dropdown-option")).map(function(o){return{value:(o.getAttribute("title")||txt(o)).trim(),label:(o.getAttribute("title")||txt(o)).trim(),native:o}});return{label,options:opts,native:chip}})}function readSortOptions(native){var chip=native.querySelector(".yotpo-sorting-filter-container");if(!chip)return[];var opts=Array.from(chip.querySelectorAll(".yotpo-dropdown-option"));return opts.map(function(o){return{value:txt(o),label:txt(o),native:o}})}function mount(native){var score=readScoreOptions(native),custom=readCustomFilters(native),sort=readSortOptions(native),nativeSearch=native.querySelector(".yotpo-search-input"),nativeMedia=native.querySelector(".yotpo-media-select"),mirror=document.createElement("div");mirror.className=MIRROR_CLASS,mirror.setAttribute("role","group"),mirror.setAttribute("aria-label","Review filters");var row1=document.createElement("div");row1.className=MIRROR_CLASS+"__row";var labelMap={"Usual Size":"Usual Fit"},skipLabels={Occasion:!0};custom.forEach(function(cf){if(!(!cf||!cf.label||skipLabels[cf.label])){var displayLabel=labelMap[cf.label]||cf.label;row1.appendChild(buildSelect({label:displayLabel,options:[{value:"",label:"All"}].concat(cf.options.filter(function(o){return o.value&&o.value.toLowerCase()!=="all"})),onPick:function(val){var target=val?cf.options.find(function(o){return o.value===val}):cf.options.find(function(o){return(o.value||"").toLowerCase()==="all"});target&&target.native&&clickNative(target.native)}}))}}),mirror.appendChild(row1);
42var row2=document.createElement("div");row2.className=MIRROR_CLASS+"__row";var searchEl=document.createElement("label");searchEl.className=MIRROR_CLASS+"__search",searchEl.innerHTML='<svg class="'+MIRROR_CLASS+'__search-icon" width="44" height="44" viewBox="0 0 44 44" fill="none" aria-hidden="true"><path d="M30.6967 19.7055C30.7183 23.8405 27.932 27.3926 24.0949 28.7508C17.6703 31.1232 10.0267 26.8687 10 19.7055C10.0272 12.5414 17.6703 8.28779 24.0953 10.6602C27.932 12.0184 30.7187 15.5704 30.6967 19.7055ZM28.5408 19.7055C28.5477 16.9739 27.3344 14.2088 25.1509 12.5164C22.4003 10.326 18.2959 10.3256 15.5454 12.5164C13.3619 14.2088 12.1486 16.9735 12.1555 19.7055C12.1486 22.437 13.3619 25.2022 15.5454 26.8946C18.2959 29.085 22.4003 29.0854 25.1509 26.8946C27.3344 25.2022 28.5477 22.4374 28.5408 19.7055Z" fill="currentColor"/><path d="M33.1722 33.9996C31.5949 32.7677 30.2259 31.2982 28.913 29.7964C28.4818 29.2932 28.0609 28.7814 27.6703 28.2437L28.9798 27.1214C29.4515 27.5896 29.893 28.0838 30.3242 28.587C31.3974 29.8538 32.421 31.1658 33.3136 32.5693C33.4921 32.8526 33.6663 33.1394 33.8267 33.4386L33.1717 34L33.1722 33.9996Z" fill="currentColor"/></svg><input type="search" placeholder="Search reviews">';var searchInput=searchEl.querySelector("input"),sTimer;searchInput.addEventListener("input",function(){nativeSearch&&(clearTimeout(sTimer),sTimer=setTimeout(function(){var setter=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;setter.call(nativeSearch,searchInput.value),nativeSearch.dispatchEvent(new Event("input",{bubbles:!0})),nativeSearch.dispatchEvent(new Event("change",{bubbles:!0}))},250))}),row2.appendChild(searchEl),row2.appendChild(buildSelect({label:"Rating",options:score,onPick:function(val){var target=score.find(function(o){return o.value===val});target&&target.native&&clickNative(target.native)}}));var mediaEl=document.createElement("button");mediaEl.type="button",mediaEl.className=MIRROR_CLASS+"__media",mediaEl.setAttribute("aria-pressed",nativeMedia&&nativeMedia.getAttribute("aria-pressed")||"false"),mediaEl.innerHTML='<span class="'+MIRROR_CLASS+'__media-label">With media</span><svg class="'+MIRROR_CLASS+'__media-icon" width="44" height="44" viewBox="0 0 44 44" fill="none" aria-hidden="true"><circle cx="22" cy="22" r="9.25" stroke="currentColor" stroke-width="1.5"/></svg>',mediaEl.addEventListener("click",function(){nativeMedia&&(clickNative(nativeMedia),setTimeout(function(){mediaEl.setAttribute("aria-pressed",nativeMedia.getAttribute("aria-pressed")||"false")},16))}),row2.appendChild(mediaEl),row2.appendChild(buildSelect({label:"Sort by:",labelInline:!0,placeholder:"Most recent",options:sort,onPick:function(val){var target=sort.find(function(o){return o.value===val});target&&target.native&&clickNative(target.native)}})),mirror.appendChild(row2),native.style.display="none",native.parentNode.insertBefore(mirror,native),reflectSelected(mirror,native);var obs=new MutationObserver(function(){reflectSelected(mirror,native)});obs.observe(native,{subtree:!0,attributes:!0,attributeFilter:["title","aria-pressed","style","class"]})}function buildSelect(cfg){var wrap=document.createElement("div");wrap.className=MIRROR_CLASS+"__chip",wrap.dataset.bpChipLabel=cfg.label,wrap.innerHTML='<button type="button" class="'+MIRROR_CLASS+'__btn" aria-haspopup="listbox" aria-expanded="false">'+(cfg.labelInline?'<span class="'+MIRROR_CLASS+'__btn-prefix">'+esc(cfg.label)+"</span>":"")+'<span class="'+MIRROR_CLASS+'__btn-value">'+esc(cfg.labelInline?cfg.placeholder||"":cfg.label)+'</span><svg class="'+MIRROR_CLASS+'__chev" width="44" height="44" viewBox="0 0 44 44" fill="none" aria-hidden="true"><path d="M30.0986 18.2534C30.1784 18.1615 30.2582 18.0696 30.338 17.9777C30.1586 17.8132 29.9791 17.6487 29.7997 17.4842C29.715 17.5717 29.6304 17.6591 29.5457 17.7466C29.2773 18.024 29.0089 18.3014 28.7405 18.5788C26.3247 21.0755 23.9089 23.5721 21.4932 26.0688H22.5068C20.2292 23.4454 17.9516 20.8221 15.6741 18.1987C15.421 17.9072 15.1679 17.6158 14.9149 17.3243C14.6963 17.0725 14.4777 16.8207 14.2591 16.5689C13.7544 17.0315 13.2497 17.4942 12.745 17.9568C12.9768 18.1964 13.2087 18.4361 13.4406 18.6757C13.709 18.9531 13.9774 19.2305 14.2458 19.5079C16.6616 22.0046 19.0774 24.5012 21.4932 26.9979L22.0274 27.55L22.5068 26.9979C24.7843 24.3745 27.0619 21.7512 29.3394 19.1278C29.5925 18.8364 29.8455 18.5449 30.0986 18.2534Z" fill="currentColor"/><path d="M30.5593 18.6757C30.7912 18.4361 31.0231 18.1964 31.255 17.9568C30.7503 17.4942 30.2456 17.0315 29.7408 16.5689C29.5222 16.8207 29.3036 17.0725 29.085 17.3243C28.832 17.6158 28.5789 17.9072 28.3258 18.1987C26.0483 20.8221 23.7707 23.4454 21.4932 26.0688H22.5068C20.091 23.5721 17.6752 21.0755 15.2594 18.5788C14.991 18.3014 14.7226 18.024 14.4542 17.7466C14.3695 17.6591 14.2849 17.5717 14.2003 17.4842C14.0208 17.6487 13.8414 17.8132 13.6619 17.9777C13.7417 18.0696 13.8215 18.1615 13.9013 18.2534C14.1544 18.5449 14.4074 18.8364 14.6605 19.1278C16.938 21.7512 19.2156 24.3745 21.4932 26.9979L22.0274 27.55L22.5068 26.9979C24.9225 24.5012 27.3383 22.0046 29.7541 19.5079C30.0225 19.2305 30.2909 18.9531 30.5593 18.6757Z" fill="currentColor"/></svg></button><ul class="'+MIRROR_CLASS+'__menu" role="listbox" hidden>'+cfg.options.map(function(o){return'<li class="'+MIRROR_CLASS+'__opt" role="option" data-value="'+esc(o.value)+'"><span>'+esc(o.label)+'</span><svg class="'+MIRROR_CLASS+'__check" width="12" height="9" viewBox="0 0 12 9" fill="none" aria-hidden="true"><path d="M4.67 7.12 10.79.99l.95.94L4.67 9 .42 4.76l.94-.95 3.3 3.3Z" fill="currentColor"/></svg></li>'}).join("")+"</ul>";var btn=wrap.querySelector("."+MIRROR_CLASS+"__btn"),valSpan=wrap.querySelector("."+MIRROR_CLASS+"__btn-value"),menu=wrap.querySelector("."+MIRROR_CLASS+"__menu");return btn.addEventListener("click",function(e){e.stopPropagation();var open=menu.hidden===!1;document.querySelectorAll("."+MIRROR_CLASS+"__menu").forEach(function(m){m.hidden=!0}),document.querySelectorAll("."+MIRROR_CLASS+"__btn").forEach(function(b){b.setAttribute("aria-expanded","fal
42se")}),open||(menu.hidden=!1,btn.setAttribute("aria-expanded","true"))}),menu.addEventListener("click",function(e){var li=e.target.closest("."+MIRROR_CLASS+"__opt");if(li){var v=li.dataset.value,label=(cfg.options.find(function(o){return o.value===v})||{}).label;menu.querySelectorAll("."+MIRROR_CLASS+"__opt").forEach(function(li2){li2.classList.toggle("is-selected",li2.dataset.value===v)});var nonDefault=v!==""&&(label||"").toLowerCase()!=="all"&&(label||"").toLowerCase()!=="all ratings";valSpan.textContent=label||(cfg.labelInline?cfg.placeholder||"":cfg.label),wrap.classList.toggle("is-active",nonDefault),menu.hidden=!0,btn.setAttribute("aria-expanded","false"),typeof cfg.onPick=="function"&&cfg.onPick(v)}}),wrap}function clickNative(el){if(el){try{el.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0}))}catch{}try{el.click()}catch{}try{el.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}catch{}}}function reflectSelected(mirror,native){var chips=mirror.querySelectorAll("."+MIRROR_CLASS+"__chip");chips.forEach(function(chip){var menu=chip.querySelector("."+MIRROR_CLASS+"__menu")});var mediaBtn=mirror.querySelector("."+MIRROR_CLASS+"__media"),nativeMedia=native.querySelector(".yotpo-media-select");mediaBtn&&nativeMedia&&mediaBtn.setAttribute("aria-pressed",nativeMedia.getAttribute("aria-pressed")||"false")}document.addEventListener("click",function(e){e.target.closest("."+MIRROR_CLASS)||(document.querySelectorAll("."+MIRROR_CLASS+"__menu").forEach(function(m){m.hidden=!0}),document.querySelectorAll("."+MIRROR_CLASS+"__btn").forEach(function(b){b.setAttribute("aria-expanded","false")}))});function tryMount(attempts){init()||attempts>50||setTimeout(function(){tryMount(attempts+1)},250)}function armObserver(){var section=document.getElementById("bp-pdp-reviews");if("IntersectionObserver"in window&§ion&§ion.parentNode){var sentinel=document.createElement("div");sentinel.setAttribute("aria-hidden","true"),sentinel.style.cssText="width:1px;height:1px;",section.parentNode.insertBefore(sentinel,section);var io=new IntersectionObserver(function(entries,obs){entries.some(function(e){return e.isIntersecting})&&(obs.disconnect(),sentinel.remove(),tryMount(0))},{rootMargin:"600px 0px"});io.observe(sentinel)}else tryMount(0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",armObserver):armObserver(),document.addEventListener("bp:pdp:swapped",function(){document.querySelectorAll("."+MIRROR_CLASS+", ."+MIRROR_CLASS+"__menu").forEach(function(m){m.remove()}),document.querySelectorAll(ROOT_SEL+"[data-bp-yfm-mounted]").forEach(function(c){delete c.dataset.bpYfmMounted}),rendered=!1,setTimeout(function(){tryMount(0)},400)})})()}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["customer-care-links"]&&!Shopify.designMode))try{(function(){const section=document.querySelector("[data-section-id]");if(!section)return;const track=section.querySelector("[data-cc-track]"),progress=section.querySelector("[data-cc-progress]"),btnPrev=section.querySelector("[data-cc-prev]"),btnNext=section.querySelector("[data-cc-next]");if(!track)return;function updateProgress(){if(!progress)return;const max=track.scrollWidth-track.clientWidth;if(max<=0){progress.style.width="100%";return}progress.style.width=track.scrollLeft/max*100+"%"}track.addEventListener("scroll",updateProgress,{passive:!0}),updateProgress(),btnPrev&&btnPrev.addEventListener("click",()=>{track.scrollBy({left:-(track.clientWidth*.8),behavior:"smooth"})}),btnNext&&btnNext.addEventListener("click",()=>{track.scrollBy({left:track.clientWidth*.8,behavior:"smooth"})})})()}catch(e){console.error(e)}})(),(function(){if(!(!__sections__["customer-service-layout"]&&!Shopify.designMode))try{window.__bpLegacyAccordionWired||(window.__bpLegacyAccordionWired=!0,document.addEventListener("click",e=>{const btn=e.target.closest(".js-accordion-toggler");if(!btn)return;const item=btn.closest(".js-accordion");if(!item)return;e.preventDefault();const isOpen=item.classList.toggle("is-open");btn.setAttribute("aria-expanded",String(isOpen));const pm=btn.querySelector(".plusminus");pm&&(pm.textContent=isOpen?"\u2212":"+")}))}catch(e){console.error(e)}})(),(function(){if(__sections__["main-collection"])try{const url=new URL(window.location.href);url.hash&&document.addEventListener("DOMContentLoaded",()=>{const card=document.getElementById(url.hash.slice(1));card&&card.scrollIntoView({behavior:"instant"})},{once:!0})}catch(e){console.error(e)}})()})(); 43//# sourceMappingURL=/cdn/shop/t/1521/compiled_assets/scripts.js.map?v=99640834855126272041790719705
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.