1(function(){var localeSearchPrefixPattern=/^\/[a-z]{2}(?:-[A-Za-z]{2})?\/search(?:\/suggest)?/;function toRootSearchUrl(url){if(typeof url!="string"||url.indexOf("/search")===-1)return url;try{var parsed=new URL(url,window.location.origin);if(localeSearchPrefixPattern.test(parsed.pathname))return parsed.pathname=parsed.pathname.replace(/^\/[a-z]{2}(?:-[A-Za-z]{2})?/,""),parsed.pathname+parsed.search+parsed.hash}catch{if(localeSearchPrefixPattern.test(url))return url.replace(/^\/[a-z]{2}(?:-[A-Za-z]{2})?/,"")}return url}var nativeFetch=window.fetch.bind(window);window.fetch=function(input,init){if(typeof input=="string")input=toRootSearchUrl(input);else if(input&&typeof input.url=="string"){var fixedUrl=toRootSearchUrl(input.url);fixedUrl!==input.url&&(input=new Request(fixedUrl,input))}return nativeFetch(input,init)}})();function buildPredictiveSearchSectionUrl(query,useSuggestApi){var path=useSuggestApi!==!1?"/search/suggest":"/search";return path+"?section_id=predictive-search&q="+encodeURIComponent(query)+"&resources[limit]=3&resources[limit_scope]=each&resources[options][fields]=title,product_type,variants.title,variants.sku,vendor"}const Animation=window.Animation,Accessibility=window.Accessibility;window.themeGetCartMaxLineItems=function(){return window.theme&&window.theme.cartMaxLineItems||100};function themeFetchCartItemCountFromApi(){return new Promise(function(resolve){if(!window.routes||!window.routes.cartUrl){resolve(0);return}fetch(window.routes.cartUrl+".js",{credentials:"same-origin",method:"GET",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){return response.ok?response.json():{item_count:0}}).then(function(cart){resolve(cart.item_count||0)}).catch(function(){resolve(0)})})}window.themeGetCartItemCount=function(options){return options=options||{},options.fresh?themeFetchCartItemCountFromApi():new Promise(function(resolve){const cartCountEl=document.querySelector(".custom-header__cart-count, .header__cart-count");if(cartCountEl){if(cartCountEl.hasAttribute("data-actual-count")){const actual=parseInt(cartCountEl.getAttribute("data-actual-count"),10);if(!isNaN(actual)){resolve(actual);return}}const text=cartCountEl.textContent?cartCountEl.textContent.trim():"";if(text&&text!=="99+"){const n=parseInt(text,10);if(!isNaN(n)){resolve(n);return}}}const miniCartEl=document.getElementById("mini-cart");if(miniCartEl&&miniCartEl.getAttribute("data-item-count")){resolve(parseInt(miniCartEl.getAttribute("data-item-count"),10)||0);return}if(typeof window.theme<"u"&&typeof window.theme.cartCount=="number"){resolve(window.theme.cartCount);return}themeFetchCartItemCountFromApi().then(resolve)})},window.themeAssertCartHasRoom=function(quantityToAdd){const qty=Math.max(1,parseInt(quantityToAdd,10)||1),max=window.themeGetCartMaxLineItems();function finish(count){return{allowed:count+qty<=max,count}}return window.__themeCartRoomCheckInflight?window.__themeCartRoomCheckInflight.then(finish):(window.__themeCartRoomCheckInflight=window.themeGetCartItemCount({fresh:!0}).then(function(count){return finish(count)}).finally(function(){window.__themeCartRoomCheckInflight=null}),window.__themeCartRoomCheckInflight)},window.themeShowCartFullPopup=function(){const popup=document.getElementById("cart-full-popup");if(!popup)return;const now=Date.now();if(popup.getAttribute("aria-hidden")==="false"||window.__themeCartFullPopupAt&&now-window.__themeCartFullPopupAt<2e3)return;window.__themeCartFullPopupAt=now,popup.setAttribute("aria-hidden","false");const closeButton=popup.querySelector(".custom-cart-full-popup__close");closeButton&&closeButton.focus()},window.themeUpdateCartCountCache=function(itemCount){if(typeof itemCount!="number"||isNaN(itemCount))return;window.theme&&(window.theme.cartCount=itemCount);const cartCountEl=document.querySelector(".custom-header__cart-count, .header__cart-count");cartCountEl&&(cartCountEl.setAttribute("data-actual-count",String(itemCount)),itemCount>=100?(cartCountEl.textContent="99+",cartCountEl.classList.add("custom-header__cart-count--over")):(cartCountEl.textContent=String(itemCount),cartCountEl.classList.remove("custom-header__cart-count--over")));const miniCartEl=document.getElementById("mini-cart");miniCartEl&&miniCartEl.setAttribute("data-item-count",String(itemCount))};function themeSetAvailabilityAddButtonBusy(addButton,busy){addButton&&(busy?(addButton.dataset.themeAdding="true",addButton.disabled=!0,addButton.setAttribute("aria-busy","true")):(delete addButton.dataset.themeAdding,addButton.removeAttribute("aria-busy"),addButton.classList.contains("button--disabled")||(addButton.disabled=!1)))}function themeReleaseAvailabilityAddButtons(){document.querySelectorAll(".product-availability-info__add-button[data-theme-ad
1ding]").forEach(function(btn){themeSetAvailabilityAddButtonBusy(btn,!1)})}function themeGetAvailabilityQuantityMax(variant,availabilityInfo){const limitAttr=availabilityInfo?availabilityInfo.getAttribute("data-quantity-limit"):null,parsedLimit=limitAttr?parseInt(limitAttr,10):NaN;let max=!isNaN(parsedLimit)&&parsedLimit>0?parsedLimit:100;return variant&&variant.quantity_rule&&variant.quantity_rule.max!=null&&(max=Math.min(max,variant.quantity_rule.max)),max}function themeResolveAvailabilityInfo(availabilityInfo,mainForm){return availabilityInfo||(mainForm&&mainForm.closest?mainForm.closest(".product-availability-info"):document.querySelector(".product-availability-info"))}function themeGetProductQuantityLimit(availabilityInfo,mainForm){const el=themeResolveAvailabilityInfo(availabilityInfo,mainForm),limitAttr=el?el.getAttribute("data-quantity-limit"):null,parsedLimit=limitAttr?parseInt(limitAttr,10):NaN;return!isNaN(parsedLimit)&&parsedLimit>0?parsedLimit:100}function themeGetBuyButtonQuantityLimit(buyRoot,form){if(buyRoot){const limitAttr=buyRoot.getAttribute("data-quantity-limit"),parsedLimit=limitAttr?parseInt(limitAttr,10):NaN;if(!isNaN(parsedLimit)&&parsedLimit>0)return parsedLimit}const availabilityInfo=themeResolveAvailabilityInfo(buyRoot&&buyRoot.closest?buyRoot.closest(".product-availability-info"):null,form);return themeGetProductQuantityLimit(availabilityInfo,form)}function themeResolveQuantityLimitForCartAdd(variantId,sourceElement){if(sourceElement){const limitAttr=sourceElement.getAttribute("data-quantity-limit"),parsedLimit=limitAttr?parseInt(limitAttr,10):NaN;if(!isNaN(parsedLimit)&&parsedLimit>0)return parsedLimit}if(variantId!=null){const variantInputs=document.querySelectorAll('form[action*="/cart/add"] input[name="id"]');for(let i=0;i<variantInputs.length;i++){const input=variantInputs[i];if(String(input.value)===String(variantId)){const form=input.closest("form"),buyRoot=form?form.querySelector("buy-button"):null;return themeGetBuyButtonQuantityLimit(buyRoot,form)}}}return themeGetProductQuantityLimit(document.querySelector(".product-availability-info"),null)}function themeValidateListingCartAdd(variantId,requestedQty,quantityLimit,giftWrapRequested){return themeFetchCartState().then(function(cart){return themeValidateCartAddQuantity(cart,variantId,requestedQty,quantityLimit,window.themeGetCartMaxLineItems(),giftWrapRequested)})}function themeApplyListingCartAddValidationFailure(validation,quantityLimit,requestedQty){validation.reason==="cart_max_exceed"?window.themeShowCartFullPopup():validation.reason==="product_limit_full"&&themeAlertProductQuantityLimitExceeded(validation.quantityLimit||quantityLimit,validation.inCart||0,validation.requested||requestedQty)}function themeSyncBuyButtonFormQuantity(form,quantity){form.querySelectorAll('[name="quantity"]').forEach(function(input){input.value=String(quantity),input.setAttribute("value",String(quantity))}),form.elements&&form.elements.namedItem("quantity")&&(form.elements.namedItem("quantity").value=String(quantity))}function themeGetAvailabilityVariantFromPicker(){const variantJsonEl=document.querySelector("variant-picker script[data-variant]");if(variantJsonEl)try{return JSON.parse(variantJsonEl.textContent||"{}")}catch{}return null}function themeResolveProductVariant(variantId){const candidates=[],fromPicker=themeGetAvailabilityVariantFromPicker();fromPicker&&candidates.push(fromPicker),window.__themeCurrentProductVariant&&candidates.push(window.__themeCurrentProductVariant);for(let i=0;i<candidates.length;i++){const candidate=candidates[i];if(candidate&&String(candidate.id)===String(variantId))return candidate}const availabilityInfo=document.querySelector(".product-availability-info");return availabilityInfo&&availabilityInfo.dataset.inventoryManagement==="shopify"&&availabilityInfo.dataset.inventoryPolicy==="deny"?{id:variantId,inventory_management:"shopify",inventory_policy:"deny",inventory_quantity:parseInt(availabilityInfo.dataset.inventoryQuantity,10)||0}:fromPicker||window.__themeCurrentProductVariant||null}function themeUpdateAvailabilityInventoryData(variant){const availabilityInfo=document.querySelector(".product-availability-info");!availabilityInfo||!variant||(availabilityInfo.dataset.inventoryQuantity=String(variant.inventory_quantity!=null?variant.inventory_quantity:""),availabilityInfo.dataset.inventoryManagement=variant.inventory_management||"",availabilityInfo.dataset.inventoryPolicy=variant.inventory_policy||"",window.__theme
1CurrentProductVariant=variant)}function themeGetInventoryRemaining(cart,variantId,variant){if(!variant||variant.inventory_management!=="shopify"||variant.inventory_policy!=="deny")return null;const inventoryQty=typeof variant.inventory_quantity=="number"?variant.inventory_quantity:0,inCart=themeGetVariantQtyInCart(cart,variantId);return Math.max(0,inventoryQty-inCart)}function themeGetInventoryAddableQuantity(cart,variantId,variant,requestedQty){const requested=parseInt(requestedQty,10)||0,remaining=themeGetInventoryRemaining(cart,variantId,variant);return remaining===null?{addQty:requested,limited:!1,remaining:null,requested}:{addQty:Math.min(requested,remaining),limited:requested>remaining,remaining,requested}}function themeGetCartAvailabilityLimitedMessage(quantity){const qty=quantity!=null&&!isNaN(parseInt(quantity,10))?parseInt(quantity,10):1,template=window.languages&&window.languages.productCartAvailabilityLimited||"Only [[quantity]] quantity was added to your cart due to availability.";return String(template).replace(/\[\[quantity\]\]/g,String(qty))}function themeGetCartQuantityLimitLimitedMessage(quantity,limit,skipped){const qty=quantity!=null&&!isNaN(parseInt(quantity,10))?parseInt(quantity,10):1,limitVal=limit!=null&&!isNaN(parseInt(limit,10))?parseInt(limit,10):100,skippedVal=skipped!=null&&!isNaN(parseInt(skipped,10))?parseInt(skipped,10):0,template=window.languages&&window.languages.productCartQuantityLimitLimited||"This item is limited to [[limit]] units per order. [[quantity]] unit(s) were added to your cart. [[skipped]] unit(s) could not be added due to this limit.";return String(template).replace(/\[\[limit\]\]/g,String(limitVal)).replace(/\[\[quantity\]\]/g,String(qty)).replace(/\[\[skipped\]\]/g,String(skippedVal))}function themeGetCartInventoryMaxInCartMessage(){return window.languages&&window.languages.productCartInventoryMaxInCart||"The maximum quantity of this item is already in your cart."}function themeShowProductCartNotice(message){message&&document.querySelectorAll(".product-block-list__item--info .product-cart-notice").forEach(function(notice){notice.textContent=message,notice.classList.remove("hidden")})}function themeHideProductCartNotice(){document.querySelectorAll(".product-block-list__item--info .product-cart-notice").forEach(function(notice){notice.textContent="",notice.classList.add("hidden")})}function themeIsMaxQuantityInCartDescription(desc){const s=String(desc||"").trim();return s?[/^The maximum quantity of this item is already in your cart\.?$/i,/^All \d+ .+ (is|are) in your cart/i,/^You can't add more of this item to your cart/i,/^You cannot add more of this item to your cart/i].some(function(pattern){return pattern.test(s)}):!1}function themeNormalizeAvailabilityQuantityInput(input){if(!input)return 0;const minVal=0,maxAttr=input.getAttribute("max"),max=maxAttr!==null&&maxAttr!==""&&!isNaN(parseInt(maxAttr,10))?parseInt(maxAttr,10):null,raw=String(input.value).trim();if(raw==="")return input.value=0,input.setAttribute("value","0"),0;let quantity=parseInt(raw,10);return isNaN(quantity)?(input.value=0,input.setAttribute("value","0"),0):(quantity<minVal&&(quantity=minVal),max!==null&&quantity>max&&(quantity=max),input.value=quantity,input.setAttribute("value",String(quantity)),quantity)}function themeApplyAvailabilityVariantQuantityLimits(variant,availabilityInfo){if(!availabilityInfo)return;const input=availabilityInfo.querySelector('input[name="quantity"]');if(!input)return;const baseMax=themeGetAvailabilityQuantityMax(variant,availabilityInfo);input.setAttribute("data-base-max",String(baseMax)),input.setAttribute("max",String(baseMax)),themeNormalizeAvailabilityQuantityInput(input)}function themeGetAvailabilityVariantIdFromForm(mainForm){if(!mainForm)return null;const variantIdInput=mainForm.querySelector('[name="id"]');return variantIdInput?variantIdInput.value||variantIdInput.options&&variantIdInput.options[variantIdInput.selectedIndex]&&variantIdInput.options[variantIdInput.selectedIndex].value:null}function themeGetAvailabilityForm(availabilityInfo){if(!availabilityInfo)return null;const form=availabilityInfo.querySelector('form[action*="/cart/add"]');if(form)return form;const addButton=availabilityInfo.querySelector(".product-availability-info__add-button[data-form-id]"),formId=addButton?addButton.getAttribute("data-form-id"):null;if(formId){const formById=document.getElementById(formId);if(formById)return formById}return null}function themeApplyQuantityToForm(mainForm,quantity){if(mainForm){mainForm.querySelectorAll('input[name="quantity"]').forEach(function(input){input.value=quantity,input.setAttribute("value",String(quantity))}),mainForm.elements&&mainForm.elements.namedItem("quantity")&&(mainForm.elements.namedItem("quantity").value=quantity);for(let i=0;i<mainForm.elements.length;
1i++)mainForm.elements[i].name==="quantity"&&(mainForm.elements[i].value=quantity)}}function themeSyncAvailabilityQuantityToForm(mainForm,availabilityInfo){if(!mainForm||!availabilityInfo)return 0;const availabilityQuantityInput=availabilityInfo.querySelector('input[name="quantity"]');let quantity=availabilityQuantityInput?themeNormalizeAvailabilityQuantityInput(availabilityQuantityInput):0;availabilityQuantityInput&&(availabilityQuantityInput.value=quantity,availabilityQuantityInput.setAttribute("value",String(quantity))),mainForm.querySelectorAll('input[name="quantity"]').forEach(function(input){input.value=quantity,input.setAttribute("value",quantity)}),mainForm.elements&&mainForm.elements.namedItem("quantity")&&(mainForm.elements.namedItem("quantity").value=quantity);for(let i=0;i<mainForm.elements.length;i++)mainForm.elements[i].name==="quantity"&&(mainForm.elements[i].value=quantity);return quantity}function themeSumCartQuantity(cart){return cart?typeof cart.item_count=="number"&&!isNaN(cart.item_count)?cart.item_count:!cart.items||!cart.items.length?0:cart.items.reduce(function(sum,item){return sum+(parseInt(item.quantity,10)||0)},0):0}function themeGetVariantQtyInCart(cart,variantId){if(!cart||!cart.items||!variantId)return 0;var total=0;return cart.items.forEach(function(item){String(item.variant_id)===String(variantId)&&(total+=parseInt(item.quantity,10)||0)}),total}function themeAlertProductQuantityLimitExceeded(quantityLimit,inCart,requestedQty){var remaining=Math.max(0,quantityLimit-inCart),tpl=window.languages&&window.languages.productQuantityLimitCartFull;if(inCart>0&&requestedQty>remaining){var exceedTpl=window.languages&&window.languages.productQuantityLimitWouldExceed||"This item is limited to [[limit]] units per order. You have [[inCart]] in your cart and can add at most [[remaining]] more.";alert(String(exceedTpl).replace(/\[\[limit\]\]/g,String(quantityLimit)).replace(/\[\[inCart\]\]/g,String(inCart)).replace(/\[\[remaining\]\]/g,String(remaining)));return}var limitMsg=tpl?String(tpl).replace(/\[\[limit\]\]/g,String(quantityLimit)):"This item is limited to "+quantityLimit+" units per order.";alert(limitMsg)}function themeIsPtwGiftWrapRequested(){const checkbox=document.getElementById("ptw-gift-needed");return!!(checkbox&&checkbox.checked)}function themeCapturePtwGiftWrapState(){if(!themeIsPtwGiftWrapRequested())return null;const variantInput=document.getElementById("ptw-variant-id"),variantId=variantInput?String(variantInput.value||"").trim():"";if(!variantId)return null;const noteEl=document.getElementById("ptw-text-message"),nameEl=document.getElementById("ptw-productname");return{variantId,giftNote:noteEl?noteEl.value:"",prodName:nameEl?nameEl.value:""}}function themeUncheckPtwGiftWrap(){const checkbox=document.getElementById("ptw-gift-needed");checkbox&&(checkbox.checked=!1)}function themeBuildProductLineItemFromForm(mainForm,quantity,FormClass){const serialized=FormClass.serialize(mainForm),item={id:serialized.id,quantity};return serialized.properties&&typeof serialized.properties=="object"&&(item.properties=serialized.properties),serialized.selling_plan!=null&&serialized.selling_plan!==""&&(item.selling_plan=serialized.selling_plan),item}function themeBuildAvailabilityCartAddBody(mainForm,quantity,giftWrapState,FormClass){if(!giftWrapState||!giftWrapState.variantId)return FormClass.serialize(mainForm);const productItem=themeBuildProductLineItemFromForm(mainForm,quantity,FormClass),giftVariantId=parseInt(giftWrapState.variantId,10)||giftWrapState.variantId;return{items:[productItem,{id:giftVariantId,quantity,properties:{"Gift Note":giftWrapState.giftNote||"","Product Name":giftWrapState.prodName||""}}]}}function themeFinalizeAvailabilityAddSuccess(triggerButton,mainForm,result,options){const quantity=options.quantity,giftWrapState=options.giftWrapState,giftQty=giftWrapState?quantity:0,validation=options.validation,quantityLimit=options.quantityLimit,inventoryLimited=options.inventoryLimited,skippedFromLimit=options.skippedFromLimit,skippedFromCart=options.skippedFromCart;return giftWrapState&&themeUncheckPtwGiftWrap(),themeFetchCartState().then(function(cart){return window.themeUpdateCartCountCache(cart.item_count||0),themeDispatchProductAdded(triggerButton,mainForm,!0,quantity+giftQty),inventoryLimited?themeShowProductCartNotice(themeGetCartAvailabilityLimitedMessage(quantity)):vali
1dation.productLimitLimited?themeShowProductCartNotice(themeGetCartQuantityLimitLimitedMessage(quantity,validation.quantityLimit||quantityLimit,skippedFromLimit)):validation.cartLimitLimited&&skippedFromCart>0&&themeShowProductCartNotice(themeGetCartQuantityLimitLimitedMessage(quantity,window.themeGetCartMaxLineItems(),skippedFromCart)),window.theme&&(window.theme.pageType==="cart"||window.theme.cartType==="page")?(window.location.href=window.routes.cartUrl,result):(window.theme&&window.theme.cartType==="drawer"&&document.dispatchEvent(new CustomEvent("modal:close")),result)})}function themeValidateCartAddQuantity(cart,variantId,requestedQty,quantityLimit,cartMaxItems,giftWrapRequested){var requested=parseInt(requestedQty,10);if(isNaN(requested)||requested<1)return{ok:!1,reason:"zero"};var inCartVariant=themeGetVariantQtyInCart(cart,variantId),totalInCart=themeSumCartQuantity(cart),perProductMax=quantityLimit!=null&&!isNaN(parseInt(quantityLimit,10))&&parseInt(quantityLimit,10)>0?parseInt(quantityLimit,10):null,cartMax=cartMaxItems!=null&&!isNaN(parseInt(cartMaxItems,10))?parseInt(cartMaxItems,10):window.themeGetCartMaxLineItems(),qty=requested,productLimitLimited=!1,cartLimitLimited=!1;if(perProductMax!=null){if(inCartVariant>=perProductMax)return{ok:!1,reason:"product_limit_full",quantityLimit:perProductMax,inCart:inCartVariant,requested};var productRemaining=perProductMax-inCartVariant;qty>productRemaining&&(qty=productRemaining,productLimitLimited=!0)}var giftReservedQty=giftWrapRequested?qty:0;if(totalInCart+qty+giftReservedQty>cartMax){var cartRemaining=Math.max(0,cartMax-totalInCart-giftReservedQty);if(cartRemaining<=0)return{ok:!1,reason:"cart_max_exceed",cartMax,totalInCart,requested,allowed:0};qty>cartRemaining&&(qty=cartRemaining,cartLimitLimited=!0)}return qty<1?{ok:!1,reason:"zero"}:{ok:!0,quantity:qty,requested,productLimitLimited,cartLimitLimited,quantityLimit:perProductMax,inCart:inCartVariant}}function themeFetchCartState(){return!window.routes||!window.routes.cartUrl?Promise.resolve({item_count:0,items:[]}):fetch(window.routes.cartUrl+".js",{credentials:"same-origin",method:"GET",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){return response.ok?response.json():{item_count:0,items:[]}}).catch(function(){return{item_count:0,items:[]}})}function themeDispatchProductAdded(button,form,responseOk,quantityAdded){const quantity=quantityAdded!=null&&!isNaN(parseInt(quantityAdded,10))?parseInt(quantityAdded,10):parseInt(form.querySelector('[name="quantity"]')?.value,10)||1,variantInput=form.querySelector('[name="id"]'),variantId=variantInput?variantInput.value:null,event=new CustomEvent("product:added",{bubbles:!0,detail:{button,variant:variantId,quantity,productAdded:responseOk}});document.documentElement.dispatchEvent(event)}function themeAddProductFormToCart(mainForm,triggerButton,options){const FormClass=typeof window.Form<"u"?window.Form:typeof Form<"u"?Form:null;if(!FormClass||!FormClass.serialize)return Promise.reject(new Error("Form.serialize is not available"));const giftWrapState=options&&options.giftWrapState?options.giftWrapState:null,giftWrapRequested=!!giftWrapState,availabilityInfo=themeResolveAvailabilityInfo(triggerButton&&triggerButton.closest?triggerButton.closest(".product-availability-info"):null,mainForm),variantIdInput=mainForm.querySelector('[name="id"]'),variantId=variantIdInput?variantIdInput.value||variantIdInput.options&&variantIdInput.options[variantIdInput.selectedIndex]&&variantIdInput.options[variantIdInput.selectedIndex].value:null,quantityLimit=themeGetProductQuantityLimit(availabilityInfo,mainForm);return themeFetchCartState().then(function(cart){const requestedQuantity=themeSyncAvailabilityQuantityToForm(mainForm,availabilityInfo);if(requestedQuantity<1)return Promise.resolve(null);const validation=themeValidateCartAddQuantity(cart,variantId,requestedQuantity,quantityLimit,window.themeGetCartMaxLineItems(),giftWrapRequested);if(!validation.ok)return validation.reason==="cart_max_exceed"?window.themeShowCartFullPopup():validation.reason==="product_limit_full"&&themeAlertProductQuantityLimitExceeded(validation.quantityLimit||quantityLimit,validation.inCart||0,validation.requested||requestedQuantity),Promise.resolve(null);const variant=themeResolveProductVariant(variantId),inventoryResult=themeGetInventoryAddableQuantity(cart,variantId,variant,validation.quantity);if(inventoryResult.remaining!==null&&inventoryResult.remaining<=0)return themeShowProductCartNotice(themeGetCartInventoryMaxInCartMessage()),Promise.resolve(null);const quantity=inventoryResult.addQty,inventoryLimited=inventoryResult.limited,requestedQty=validation.requested||requestedQuantity,skippedFromLimit=validation.productLimitLimited?Math.max(0,requestedQty-quantity):0,skippedFromCart=validation.cartLimitLimited?Math.max(0,requestedQty-quantity):0;themeApplyQuantityToForm(mainForm,quantity),!inventoryLimited&&!validation.productLimitLimited&&!validation.cartLimitLimited&&themeHideProductCartNotice(),document.dispatchEvent(new CustomEvent("theme:loading:start")),window.__themeSkipCartAddFetchGuard=!0;const addBody=themeBuildAvailabilityCartAddBody(mainForm,quantity,giftWrapState,FormClass);return fetch(`${window.routes.cartAddUrl}.js`,{body:JSON.stringify(addBody),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){return response.json().catch(function(){return{}}).then(function(content){return{response,content}})}).then(function(result){if(result.response.ok)return themeFinalizeAvailabilityAddSuccess(triggerButton,mainForm,result,{quantity,giftWrapState,validation,quantityLimit,inventoryLimited,skippedFromLimit,skippedFromCart});document.dispatchEvent(new CustomEvent("theme:loading:end")),themeDispatchProductAdded(triggerButton,mainForm,!1);const rawDescription=result.content&&result.content.description;
1let errorMessage=window.themeGetSafeCartDescription(rawDescription);return themeIsMaxQuantityInCartDescription(rawDescription)&&(errorMessage=themeGetCartInventoryMaxInCartMessage()),themeShowProductCartNotice(errorMessage),result}).catch(function(error){document.dispatchEvent(new CustomEvent("theme:loading:end")),console.error("[product-availability-info__add-button]",error);const retryMessage=window.languages&&window.languages.productCartAddErrorRetry||"Something went wrong. Please try again.";throw themeShowProductCartNotice(retryMessage),error})})}(function(){function themeEscapeHtml(str){return String(str).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}window.themeEscapeHtml=themeEscapeHtml;function themeStripHtmlTags(str){return String(str).replace(/<[^>]*>/g,"")}function themePatchInnerHtmlForUntrustedStrings(){var descriptor=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML");if(!(!descriptor||typeof descriptor.set!="function")&&!Element.prototype.__themeInnerHtmlPatched){var nativeSet=descriptor.set,nativeGet=descriptor.get;Object.defineProperty(Element.prototype,"innerHTML",{configurable:!0,enumerable:descriptor.enumerable,get:nativeGet,set:function(html){if(this.classList&&this.classList.contains("cart__status-message")){var htmlStr=html==null?"":String(html),isSuccess=/alert--success/.test(htmlStr),hasContainer=/class=["']container["']/.test(htmlStr),msgMatch=htmlStr.match(/<p[^>]*>([\s\S]*?)<\/p>/i),rawMsg=themeStripHtmlTags(msgMatch?msgMatch[1]:htmlStr),safeMsg=window.themeGetSafeCartDescription(rawMsg),alertEl=document.createElement("div");alertEl.className="alert "+(isSuccess?"alert--success":"alert--error");var paragraph=document.createElement("p");hasContainer&&(paragraph.className="container"),paragraph.textContent=safeMsg,alertEl.appendChild(paragraph),this.replaceChildren(alertEl);return}if(this.classList&&this.classList.contains("expandable-content__toggle-text")){this.textContent=html==null?"":String(html);return}nativeSet.call(this,html)}}),Element.prototype.__themeInnerHtmlPatched=!0}}function themeGetCartAddFailedMessage(){return window.languages&&window.languages.productCartAddFailed||"Could not add this product to your cart."}function themeLooksLikeUnsafeCartDescription(str){return/<|>|javascript:|on\w+\s*=/i.test(str)}function themeIsAvailabilityLimitedCartDescription(desc){const s=String(desc).trim();return!s||themeLooksLikeUnsafeCartDescription(s)?!1:[/^You can only add \d+/i,/^You can't add more/i,/^You cannot add more/i,/^Only available quantity items were added to your cart\.?$/i,/^Only \d+ (quantity|quantities|item|items) (was|were) added to your cart due to availability\.?$/i,/^The maximum quantity of this item is already in your cart\.?$/i,/^All \d+ .+ (is|are) in your cart/i].some(function(pattern){return pattern.test(s)})}function themeIsAllowedCartDescription(desc){const s=String(desc).trim();return!s||themeLooksLikeUnsafeCartDescription(s)?!1:s===themeGetCartAddFailedMessage()||s===themeGetCartInventoryMaxInCartMessage()||themeIsAvailabilityLimitedCartDescription(s)?!0:[/^Cart is full$/i,/^The product .+ is already sold out/i,/^This product is already sold out/i,/^Variant .+ is already sold out/i,/^The product '.+' is already sold out/i,/^Insufficient stock/i,/^You must purchase at least \d+/i,/^Cannot find variant/i,/^ã«ã¼ãã«è¿½å /,/^ååãã«ã¼ãã«è¿½å ã§ãã¾ãã/,/^売ãåã/,/^å¨åº«ãä¸è¶³/,/^ãã®ååã¯/,/^ãæ³¨æå¯è½ãªæ°é/].some(function(pattern){return pattern.test(s)})}window.themeGetSafeCartDescription=function(desc){const raw=desc==null?"":String(desc).trim();if(!raw)return themeGetCartAddFailedMessage();if(themeIsAvailabilityLimitedCartDescription(raw)){const qtyMatch=raw.match(/\d+/);return themeGetCartAvailabilityLimitedMessage(qtyMatch?parseInt(qtyMatch[0],10):1)}return themeIsAllowedCartDescription(raw)?raw:themeGetCartAddFailedMessage()},window.themeGetSafeCartDescriptionHtml=function(desc){return themeEscapeHtml(window.themeGetSafeCartDescription(desc))};function themeSanitizeCartJsonBody(data){return!data||typeof data!="object"||typeof data.description!="string"?data:Object.assign({}
1,data,{description:window.themeGetSafeCartDescriptionHtml(data.description)})}function themeSanitizeShippingRatesErrorBody(data){if(data&&Array.isArray(data.shipping_rates))return data;if(!data||typeof data!="object")return themeBuildGenericShippingErrorBody();const labels={zip:window.languages&&window.languages.shippingEstimatorFieldZip||"Zip code",country:window.languages&&window.languages.shippingEstimatorFieldCountry||"Country",province:window.languages&&window.languages.shippingEstimatorFieldProvince||"Province"},out={};return["zip","country","province"].forEach(function(key){if(data[key]==null)return;let val=data[key];Array.isArray(val)?val=val.filter(Boolean).join(" "):val=String(val),val=val.trim(),!(!val||themeLooksLikeUnsafeCartDescription(val))&&(out[labels[key]]=themeEscapeHtml(val))}),Object.keys(out).length===0?themeBuildGenericShippingErrorBody():out}function themeBuildGenericShippingErrorBody(){const label=window.languages&&window.languages.shippingEstimatorFieldZip||"Zip code",msg=window.languages&&window.languages.shippingEstimatorFieldError||"Please check your entry and try again.",out={};return out[label]=themeEscapeHtml(msg),out}function themeGetFetchUrl(input){return typeof input=="string"?input:input&&input.url||""}function themeGetFetchMethod(input,init){return(init&&init.method||input&&input.method||"GET").toUpperCase()}function themeShouldSanitizeCartJsonResponse(url,method,response){if(!response||response.ok)return!1;const u=url.toLowerCase();return method==="POST"&&(u.indexOf("/cart/add")!==-1||u.indexOf("/cart/change")!==-1)}function themeIsShippingRatesJsonRequest(url,method){return method==="GET"&&url.toLowerCase().indexOf("shipping_rates.json")!==-1}function themeShouldSanitizeShippingRatesResponse(url,method,response){return!(!response||response.ok||!themeIsShippingRatesJsonRequest(url,method))}function themeShouldSanitizeShippingRatesOkResponse(url,method,response){return!(!response||!response.ok||!themeIsShippingRatesJsonRequest(url,method))}function themeSanitizeShippingRatesSuccessBody(data){return!data||!Array.isArray(data.shipping_rates)?data:Object.assign({},data,{shipping_rates:data.shipping_rates.map(function(item){if(!item||typeof item!="object")return item;var safe=Object.assign({},item);return item.name!=null&&(safe.name=themeEscapeHtml(String(item.name))),safe})})}function themeCloneResponseWithJson(response,data){return new Response(JSON.stringify(data),{status:response.status,statusText:response.statusText,headers:response.headers})}function themeApplyFetchResponseSanitization(nativePromise,url,method){return nativePromise.then(function(response){return themeShouldSanitizeCartJsonResponse(url,method,response)?response.clone().json().catch(function(){return null}).then(function(data){return data?themeCloneResponseWithJson(response,themeSanitizeCartJsonBody(data)):response}):themeShouldSanitizeShippingRatesResponse(url,method,response)?response.clone().json().catch(function(){return null}).then(function(data){return data?themeCloneResponseWithJson(response,themeSanitizeShippingRatesErrorBody(data)):response}):themeShouldSanitizeShippingRatesOkResponse(url,method,response)?response.clone().json().catch(function(){return null}).then(function(data){return data?themeCloneResponseWithJson(response,themeSanitizeShippingRatesSuccessBody(data)):response}):response})}function themeSanitizeCartStatusMessageNode(root){if(!root||!root.querySelector)return;const paragraph=root.querySelector(".alert p, .alert--error p, .alert--success p");if(!paragraph)return;const safeText=window.themeGetSafeCartDescription(paragraph.textContent||"");paragraph.textContent!==safeText&&(paragraph.textContent=safeText)}function themeSanitizeShippingEstimatorResults(root){!root||!root.querySelectorAll||root.querySelectorAll(".shipping-estimator__results li").forEach(function(item){const safeText=item.textContent||"";themeLooksLikeUnsafeCartDescription(safeText)&&(item.textContent=window.languages&&window.languages.shippingEstimatorFieldError||"Please check your entry and try again.")})}function themeInitApiErrorDomObservers(){new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.addedNodes.forEac
1h(function(node){node.nodeType===1&&(node.matches&&node.matches(".cart__status-message")&&themeSanitizeCartStatusMessageNode(node),node.querySelectorAll&&node.querySelectorAll(".cart__status-message").forEach(themeSanitizeCartStatusMessageNode),node.matches&&node.matches(".shipping-estimator__results")&&themeSanitizeShippingEstimatorResults(node),node.querySelectorAll&&node.querySelectorAll(".shipping-estimator__results").forEach(themeSanitizeShippingEstimatorResults))})})}).observe(document.documentElement,{childList:!0,subtree:!0})}themePatchInnerHtmlForUntrustedStrings(),document.documentElement&&themeInitApiErrorDomObservers();function parseCartAddPayload(init){if(!init||!init.body||typeof init.body!="string")return null;try{return JSON.parse(init.body)}catch{return null}}function parseCartAddQuantity(init){const parsed=parseCartAddPayload(init);return parsed&&parseInt(parsed.quantity,10)||1}function isCartAddPostRequest(input,init){const url=typeof input=="string"?input:input&&input.url,method=(init&&init.method||input&&input.method||"GET").toUpperCase();return!!(url&&url.indexOf("/cart/add")!==-1&&method==="POST")}if(document.addEventListener("click",function(e){if(window.__themeSkipProductCartLineLimit){window.__themeSkipProductCartLineLimit=!1,window.__themeSkipCartAddFetchGuard=!0;return}const buyRoot=e.target.closest("buy-button");if(!buyRoot)return;const form=buyRoot.closest('form[action*="/cart/add"]');if(!form)return;if(window.__themeBuyButtonLimitBusy){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();return}const qtyInput=form.querySelector('[name="quantity"]');let qty=qtyInput&&parseInt(qtyInput.value,10)||1;qty<1&&(qty=1),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),window.__themeBuyButtonLimitBusy=!0;const variantIdInput=form.querySelector('[name="id"]'),variantId=variantIdInput?variantIdInput.value:null,quantityLimit=themeGetBuyButtonQuantityLimit(buyRoot,form);themeValidateListingCartAdd(variantId,qty,quantityLimit,!1).then(function(validation){if(!validation.ok){themeApplyListingCartAddValidationFailure(validation,quantityLimit,qty);return}validation.quantity!==qty&&themeSyncBuyButtonFormQuantity(form,validation.quantity),window.__themeSkipProductCartLineLimit=!0,window.__themeSkipCartAddFetchGuard=!0;const submitBtn=buyRoot.querySelector('button[type="submit"]');submitBtn&&submitBtn.click()}).finally(function(){window.__themeBuyButtonLimitBusy=!1})},!0),window.__themeCartAddFetchGuard)return;window.__themeCartAddFetchGuard=!0;const nativeFetch=window.fetch.bind(window);window.fetch=function(input,init){const url=themeGetFetchUrl(input),method=themeGetFetchMethod(input,init);if(window.__themeSkipCartAddFetchGuard)return window.__themeSkipCartAddFetchGuard=!1,themeApplyFetchResponseSanitization(nativeFetch(input,init),url,method);if(!isCartAddPostRequest(input,init))return themeApplyFetchResponseSanitization(nativeFetch(input,init),url,method);const payload=parseCartAddPayload(init),qty=payload&&parseInt(payload.quantity,10)||1,variantId=payload&&payload.id!=null?payload.id:null;if(payload&&(payload.properties||Array.isArray(payload.items)))return themeApplyFetchResponseSanitization(nativeFetch(input,init),url,method);const availabilityInfo=themeResolveAvailabilityInfo(document.querySelector(".product-availability-info"),null),quantityLimit=themeResolveQuantityLimitForCartAdd(variantId,availabilityInfo);return themeFetchCartState().then(function(cart){const validation=themeValidateCartAddQuantity(cart,variantId,qty,quantityLimit,window.themeGetCartMaxLineItems(),themeIsPtwGiftWrapRequested());return validation.ok?(payload&&validation.quantity!==qty&&(payload.quantity=validation.quantity,init=Object.assign({},init,{body:JSON.stringify(payload)})),themeApplyFetchResponseSanitization(nativeFetch(input,init),url,method)):(document.dispatchEvent(new CustomEvent("theme:loading:end")),validation.reason==="cart_max_exceed"?window.themeShowCartFullPopup():validation.reason==="product_limit_full"&&themeAlertProductQuantityLimitExceeded(validation.quantityLimit||quantityLimit,validation.inCart||0,validation.requested||qty),Promise.resolve(new Response(JSON.stringify({description:window.themeGet
1SafeCartDescriptionHtml("Cart is full"),status:422}),{status:422,headers:{"Content-Type":"application/json"}})))})}})(),(function(){function runAvailabilityAdd(addButton,availabilityInfo){const mainForm=themeGetAvailabilityForm(availabilityInfo);if(!mainForm){console.error("[product-availability-info__add-button] Form not found");return}if(window.__themeAvailabilityAddInflight)return;const giftWrapState=themeCapturePtwGiftWrapState();window.__themeAvailabilityAddBusy=!0,themeSetAvailabilityAddButtonBusy(addButton,!0),window.__themeAvailabilityAddInflight=themeAddProductFormToCart(mainForm,addButton,{giftWrapState}).then(function(result){return(!result||!result.response||!result.response.ok)&&themeSetAvailabilityAddButtonBusy(addButton,!1),result}).catch(function(){themeSetAvailabilityAddButtonBusy(addButton,!1)}).finally(function(){window.__themeAvailabilityAddInflight=null,window.__themeAvailabilityAddBusy=!1})}document.addEventListener("submit",function(e){const form=e.target;if(!form||!form.matches(".product-form--availability"))return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();const availabilityInfo=form.closest(".product-availability-info"),addButton=form.querySelector(".product-availability-info__add-button");!addButton||addButton.disabled||addButton.dataset.themeAdding==="true"||window.__themeAvailabilityAddBusy||window.__themeAvailabilityAddInflight||runAvailabilityAdd(addButton,availabilityInfo)},!0),document.addEventListener("click",function(e){const addButton=e.target.closest(".product-availability-info__add-button");if(!addButton)return;if(addButton.type==="submit"){e.stopPropagation();return}if(addButton.disabled||addButton.dataset.themeAdding==="true"||window.__themeAvailabilityAddBusy||window.__themeAvailabilityAddInflight)return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();const availabilityInfo=addButton.closest(".product-availability-info");runAvailabilityAdd(addButton,availabilityInfo)},!0),document.addEventListener("product:added",function(){themeReleaseAvailabilityAddButtons()})})(),Animation&&Accessibility&&document.addEventListener("click",function(event){const toggleButton=event.target.closest('[data-action="toggle-announcement-bar"]');if(toggleButton){const announcementBar=toggleButton.closest(".announcement-bar.custom-announcement-bar");announcementBar&&Animation.slideUp(announcementBar,()=>{Accessibility.removeTrapFocus(announcementBar,"announcement-bar")})}}),document.addEventListener("click",function(event){const toggleButton=event.target.closest('[data-action="toggle-menu"], [data-action="toggle-search"]');if(toggleButton&&(document.querySelectorAll(".custom-js-menu-hidden").forEach(function(mobileMenu){mobileMenu.classList.toggle("custom-hidden")}),toggleButton.getAttribute("data-action")==="toggle-search")){const originalMenuToggleButton=document.querySelector('.header__mobile-nav-toggle[data-action="toggle-search"], .header__desktop-nav-toggle[data-action="toggle-search"]');if(originalMenuToggleButton)originalMenuToggleButton.setAttribute("data-action","toggle-menu"),originalMenuToggleButton.setAttribute("aria-expanded","false");else{const menuToggleButton=document.querySelector('[data-action="toggle-menu"]');menuToggleButton&&(menuToggleButton.setAttribute("data-action","toggle-search"),menuToggleButton.setAttribute("aria-expanded","true"))}}}),document.addEventListener("keydown",function(event){if(!(event.key!=="Escape"&&event.key!=="Esc")){var active=document.activeElement,isTooltipTrigger=active&&(active.hasAttribute&&active.hasAttribute("data-tooltip")||active.classList&&active.classList.contains("custom-product-item__label"));if(isTooltipTrigger){active.blur(),event.preventDefault();return}var openTrigger=document.querySelector('.price-list__member-price-tooltip-trigger[aria-expanded="true"]');if(openTrigger){var tooltipId=openTrigger.getAttribute("aria-controls"),tooltip=tooltipId?document.getElementById(tooltipId):null;tooltip&&(tooltip.setAttribute("hidden",""),openTrigger.setAttribute("aria-expanded","false")),event.preventDefault()}}}),document.addEventListener("click",function(event){var closeBtn=event.target.closest("[data-member-price-tooltip-close]");if(closeBtn){var tooltip=closeBtn.closest(".price-list__member-price-tooltip");if(tooltip&&tooltip.id){var trigger=document.querySelector('[aria-controls="'+tooltip.id+'"]');trigger&&(tooltip.setAttribute("hidden",""),trigger.setAttribute("aria-expanded","fal
1se"))}event.preventDefault(),event.stopPropagation();return}var trigger=event.target.closest("[data-member-price-tooltip-trigger]"),tooltipId=trigger?trigger.getAttribute("aria-controls"):null,tooltip=tooltipId?document.getElementById(tooltipId):null;if(trigger&&tooltip){var isOpen=trigger.getAttribute("aria-expanded")==="true";isOpen?(tooltip.setAttribute("hidden",""),trigger.setAttribute("aria-expanded","false")):(document.querySelectorAll('.price-list__member-price-tooltip-trigger[aria-expanded="true"]').forEach(function(t){var id2=t.getAttribute("aria-controls"),tip=id2?document.getElementById(id2):null;tip&&(tip.setAttribute("hidden",""),t.setAttribute("aria-expanded","false"))}),tooltip.removeAttribute("hidden"),trigger.setAttribute("aria-expanded","true")),event.preventDefault(),event.stopPropagation();return}var openTrigger=document.querySelector('.price-list__member-price-tooltip-trigger[aria-expanded="true"]');if(openTrigger&&!event.target.closest(".price-list__member-price-tooltip-wrapper")){var id=openTrigger.getAttribute("aria-controls"),openTooltip=id?document.getElementById(id):null;openTooltip&&(openTooltip.setAttribute("hidden",""),openTrigger.setAttribute("aria-expanded","false"))}});function closeAllCustomNavMenus(){var navBar=document.querySelector(".custom-nav-bar");if(!navBar)return!1;var openMenus=navBar.querySelectorAll('.mega-menu[aria-hidden="false"], .nav-dropdown[aria-hidden="false"]'),openLinks=navBar.querySelectorAll('.custom-nav-bar__link[aria-expanded="true"], .nav-dropdown__link[aria-expanded="true"], [data-type="menuitem"][aria-expanded="true"]');return openMenus.length===0&&openLinks.length===0?!1:(openLinks.forEach(function(link){link.setAttribute("aria-expanded","false");var parentItem=link.closest(".custom-nav-bar__item, .nav-dropdown__item");parentItem&&parentItem.classList.remove("is-dropdown-open")}),openMenus.forEach(function(menu){menu.setAttribute("aria-hidden","true");var parentMenu=menu.closest('[data-type="menu"]');parentMenu&&parentMenu.classList.remove("nav-dropdown--glued")}),navBar.querySelectorAll(".is-dropdown-open").forEach(function(dropdown){dropdown.classList.remove("is-dropdown-open"),dropdown.querySelectorAll('[aria-hidden="false"]').forEach(function(nestedMenu){nestedMenu.setAttribute("aria-hidden","true")}),dropdown.querySelectorAll('[aria-expanded="true"]').forEach(function(nestedLink){nestedLink.setAttribute("aria-expanded","false")})}),!0)}document.addEventListener("keydown",function(event){event.key!=="Escape"&&event.key!=="Esc"||closeAllCustomNavMenus()}),document.addEventListener("click",function(event){var navBar=document.querySelector(".custom-nav-bar");!navBar||navBar.contains(event.target)||closeAllCustomNavMenus()}),document.addEventListener("click",function(event){var navBar=document.querySelector(".custom-nav-bar");if(!(!navBar||!navBar.contains(event.target))){var link=event.target.closest("a.custom-nav-bar__link[aria-haspopup]");if(link){var linklist=navBar.querySelector(".nav-bar__linklist"),currentItem=link.closest(".custom-nav-bar__item");!linklist||!currentItem||currentItem.parentElement!==linklist||navBar.querySelectorAll(".custom-nav-bar__item").forEach(function(item){item!==currentItem&&closeCustomNavTopLevelBranch(item)})}}},!0);function closeCustomNavTopLevelBranch(rootItem){rootItem.classList.remove("is-dropdown-open"),rootItem.querySelectorAll(".is-dropdown-open").forEach(function(el){el.classList.remove("is-dropdown-open")}),rootItem.querySelectorAll('[data-type="menuitem"][aria-expanded="true"]').forEach(function(linkEl){linkEl.setAttribute("aria-expanded","false")}),rootItem.querySelectorAll('.mega-menu[aria-hidden="false"], .nav-dropdown[aria-hidden="false"]').forEach(function(menu){menu.setAttribute("aria-hidden","true")}),rootItem.querySelectorAll('[data-type="menu"]').forEach(function(menu){menu.classList.remove("nav-dropdown--glued")})}(function(){var navBar=document.querySelector(".custom-nav-bar");if(!navBar||!("MutationObserver"in window))return;var NESTED_GAP=4,VIEWPORT_EDGE=8,VIEWPORT_BOTTOM=20;function isRootDropdown(dropdown){return dropdown.parentElement&&dropdown.parentElement.classList.contains("custom-nav-bar__item")}function isNestedFlyout(dropdown){return dropdown.getAttribute("data-type")==="menu"&&!isRootDropdown(dropdown)&&!!dropdown.closest(".custom-nav-dropdown")}function getAnchorMenu(dropdown){var parentItem=dropdown.parentElement;
1if(!parentItem)return null;var parentMenu=parentItem.closest('[data-type="menu"].nav-dropdown');return!parentMenu||parentMenu===dropdown?null:parentMenu}function clearNestedPin(dropdown){dropdown.classList.remove("custom-nav-dropdown--pinned","nav-dropdown--inverse","custom-nav-dropdown--scrollable"),dropdown.style.removeProperty("position"),dropdown.style.removeProperty("top"),dropdown.style.removeProperty("left"),dropdown.style.removeProperty("right"),dropdown.style.removeProperty("max-height"),dropdown.style.removeProperty("overflow-y")}function getDropdownContentHeight(dropdown){var style=getComputedStyle(dropdown),height=parseFloat(style.paddingTop)+parseFloat(style.paddingBottom)+(parseFloat(style.borderTopWidth)||0)+(parseFloat(style.borderBottomWidth)||0);return Array.prototype.forEach.call(dropdown.children,function(child){(child.classList.contains("nav-dropdown__item")||child.classList.contains("custom-nav-dropdown__item"))&&(height+=child.offsetHeight)}),height}function getDropdownMaxHeight(dropdown){var maxHeight=parseFloat(getComputedStyle(dropdown).maxHeight);return isFinite(maxHeight)?maxHeight:null}function syncDropdownOverflow(dropdown){if(!(!dropdown||dropdown.getAttribute("aria-hidden")==="true")){dropdown.classList.remove("custom-nav-dropdown--scrollable");var maxHeight=getDropdownMaxHeight(dropdown);maxHeight!==null&&getDropdownContentHeight(dropdown)>maxHeight+1&&dropdown.classList.add("custom-nav-dropdown--scrollable")}}function scheduleSyncDropdownOverflow(dropdown){requestAnimationFrame(function(){syncDropdownOverflow(dropdown)})}function updateParentDropdownOverflow(dropdown){var parentMenu=getAnchorMenu(dropdown);
1if(!(!parentMenu||parentMenu.getAttribute("aria-hidden")==="true")){if(isRootDropdown(parentMenu)){scheduleSyncDropdownOverflow(parentMenu);return}isNestedFlyout(parentMenu)&&scheduleSyncDropdownOverflow(parentMenu)}}function pinNestedDropdown(dropdown){var anchorMenu=getAnchorMenu(dropdown);if(anchorMenu){dropdown.classList.add("custom-nav-dropdown--pinned"),dropdown.classList.remove("nav-dropdown--inverse","custom-nav-dropdown--scrollable");var anchorRect=anchorMenu.getBoundingClientRect(),top=anchorRect.top,maxHeight=window.innerHeight-top-VIEWPORT_BOTTOM,openLeft=anchorRect.right+NESTED_GAP;dropdown.style.position="fixed",dropdown.style.top=top+"px",dropdown.style.left=openLeft+"px",dropdown.style.right="",dropdown.style.maxHeight=Math.max(maxHeight,120)+"px",dropdown.style.setProperty("--distance-to-top",top+"px");var dropdownWidth=dropdown.offsetWidth;openLeft+dropdownWidth>window.innerWidth-VIEWPORT_EDGE&&(dropdown.classList.add("nav-dropdown--inverse"),dropdown.style.left=Math.max(VIEWPORT_EDGE,anchorRect.left-NESTED_GAP-dropdownWidth)+"px"),isRootDropdown(anchorMenu)&&(anchorMenu.scrollLeft=0),scheduleSyncDropdownOverflow(dropdown),updateParentDropdownOverflow(dropdown)}}function updateRootDropdown(dropdown){dropdown.style.setProperty("--distance-to-top",dropdown.getBoundingClientRect().top+"px"),scheduleSyncDropdownOverflow(dropdown)}function handleDropdownChange(dropdown){if(dropdown.getAttribute("aria-hidden")!=="false"){if(isNestedFlyout(dropdown)){var parentMenu=getAnchorMenu(dropdown);clearNestedPin(dropdown),parentMenu&&(isRootDropdown(parentMenu)||isNestedFlyout(parentMenu))&&scheduleSyncDropdownOverflow(parentMenu)}return}if(isNestedFlyout(dropdown)){pinNestedDropdown(dropdown);return}isRootDropdown(dropdown)&&updateRootDropdown(dropdown)}function updateOnResize(){navBar.querySelectorAll('.nav-dropdown[aria-hidden="false"]').forEach(function(dropdown){isRootDropdown(dropdown)?updateRootDropdown(dropdown):isNestedFlyout(dropdown)&&pinNestedDropdown(dropdown)})}var dropdownMenuObserver=new MutationObserver(function(mutationList){mutationList.forEach(function(mutation){mutation.attributeName==="aria-hidden"&&handleDropdownChange(mutation.target)})});navBar.querySelectorAll(".nav-dropdown").forEach(function(dropdown){dropdownMenuObserver.observe(dropdown,{attributes:!0,attributeFilter:["aria-hidden"]})}),window.addEventListener("resize",updateOnResize)})();function initSplideLayoutRefresh(splide,sliderElement){if(!splide||!sliderElement)return;let refreshScheduled=!1;function scheduleRefresh(){refreshScheduled||(refreshScheduled=!0,requestAnimationFrame(function(){refreshScheduled=!1,typeof splide.refresh=="function"&&splide.refresh()}))}window.addEventListener("load",scheduleRefresh,{once:!0}),sliderElement.querySelectorAll("img").forEach(function(img){img.complete||(img.addEventListener("load",scheduleRefresh,{once:!0}),img.addEventListener("error",scheduleRefresh,{once:!0}))}),scheduleRefresh()}function initSplideScrollbar(splide,containerElement){const scrollbar=containerElement.querySelector(".custom-splide__scrollbar"),handle=containerElement.querySelector(".custom-splide__scrollbar__handle");if(!scrollbar||!handle)return;const dragState={isDragging:!1,startX:0,startLeft:0};function updateScrollbar(){const totalSlides=splide.length,visibleSlides=splide.options.perPage;if(splide.options.type==="loop"){const handleWidth2=visibleSlides/totalSlides*100;handle.style.width=`${handleWidth2}%`;const normalizedIndex=splide.index%totalSlides,end2=totalSlides-visibleSlides,maxScrollableDistance2=100-handleWidth2;if(end2>0){const rate2=normalizedIndex/end2;handle.style.left=`${Math.min(rate2*maxScrollableDistance2,maxScrollableDistance2)}%`}else handle.style.left="0%";return}const end=totalSlides-visibleSlides;if(end<=0){handle.style.width="100%",handle.style.left="0%";return}const handleWidth=visibleSlides/totalSlides*100,rate=splide.index/end,maxScrollableDistance=100-handleWidth;handle.style.width=`${handleWidth}%`,handle.style.left=`${Math.min(rate*maxScrollableDistance,maxScrollableDistance)}%`}handle.addEventListener("mousedown",event=>{event.preventDefault(),dragState.isDragging=!0,dragState.startX=event.clientX,dragState.startLeft=parseFloat(handle.style.left||"0"),document.body.style.userSelect="none"});const handleMouseMove=event=>{if(!dragState.isDragging)return;const scrollbarWidth=scrollbar.offsetWidth,handleWidth=handle.offsetWidth,deltaX=event.clientX-dragState.startX,maxScrollableDistance=100-handleWidth/scrollbarWidth*100;
1let newLeft=dragState.startLeft+deltaX/scrollbarWidth*100;newLeft=Math.max(0,Math.min(newLeft,maxScrollableDistance)),handle.style.left=`${newLeft}%`;const totalSlides=splide.length,visibleSlides=splide.options.perPage;if(splide.options.type==="loop"){const end=totalSlides-visibleSlides;if(end>0&&maxScrollableDistance>0){const rate=newLeft/maxScrollableDistance,newIndex=Math.round(rate*end)%totalSlides;splide.go(newIndex)}}else{const end=totalSlides-visibleSlides;if(end>0&&maxScrollableDistance>0){const rate=newLeft/maxScrollableDistance,newIndex=Math.round(rate*end);splide.go(Math.min(newIndex,end))}}},handleMouseUp=()=>{dragState.isDragging&&(dragState.isDragging=!1,document.body.style.userSelect="",updateScrollbar())};return document.addEventListener("mousemove",handleMouseMove),document.addEventListener("mouseup",handleMouseUp),splide.on("destroy",()=>{document.removeEventListener("mousemove",handleMouseMove),document.removeEventListener("mouseup",handleMouseUp)}),splide.on("mounted move resize",updateScrollbar),updateScrollbar}window.initSplideScrollbar=initSplideScrollbar;function initSplideWheelScroll(splide,sliderElement,options={}){const element=sliderElement||splide.root;if(!element)return;const throttleTime=options.throttleTime||600,scrollThreshold=options.scrollThreshold||150;let isScrolling=!1,accumulatedScroll=0,resetTimer=null;const wheelHandler=e=>{if(isScrolling){e.preventDefault();return}const deltaX=e.deltaX,deltaY=e.deltaY;Math.abs(deltaX)<=Math.abs(deltaY)||deltaX!==0&&(e.preventDefault(),e.stopPropagation(),accumulatedScroll+=Math.abs(deltaX),accumulatedScroll>=scrollThreshold?(isScrolling=!0,deltaX>0?splide.go(">"):deltaX<0&&splide.go("<"),accumulatedScroll=0,resetTimer&&(clearTimeout(resetTimer),resetTimer=null),setTimeout(()=>{isScrolling=!1},throttleTime)):(resetTimer&&clearTimeout(resetTimer),resetTimer=setTimeout(()=>{accumulatedScroll=0,resetTimer=null},200)))};element.addEventListener("wheel",wheelHandler,{passive:!1}),splide.on("destroy",()=>{element.removeEventListener("wheel",wheelHandler),resetTimer&&(clearTimeout(resetTimer),resetTimer=null)})}document.addEventListener("DOMContentLoaded",function(){const sliderElement=document.querySelector(".custom-section-slide__slider");if(!sliderElement)return;const splide=new Splide(".custom-section-slide__slider",{type:"loop",perPage:1,perMove:1,gap:24,padding:{right:"36.7%"},autoplay:!0,pagination:!1,rewind:!0,interval:3e3,pauseOnHover:!1,pauseOnFocus:!1,pauseOnScroll:!1,pauseOnMouseEnter:!1,pauseOnMouseLeave:!1,pauseOnTouch:!1,pauseOnTouchMove:!1,pauseOnTouchEnd:!1,pauseOnTouchStart:!1,breakpoints:{1023:{padding:"15%",gap:12}}}).mount();initSplideWheelScroll(splide,sliderElement),initSplideScrollbar(splide,sliderElement.closest("section")||document),splide.on("active",function(){slideIndex()});function slideIndex(){document.getElementById("slide-current").textContent=splide.index+1,document.getElementById("slide-length").textContent=splide.length}slideIndex(),autoplayToggle();function autoplayToggle(){const toggle=splide.root.querySelector(".custom-section-slide__slider-autoplay-toggle"),autoplay=splide.Components.Autoplay,labelPlay=toggle.getAttribute("data-label-play"),labelPause=toggle.getAttribute("data-label-pause");function updateAriaLabel(isPlaying){toggle.setAttribute("aria-label",isPlaying?labelPause:labelPlay)}splide.on("autoplay:play",function(){toggle.classList.remove("pause"),toggle.classList.add("play"),updateAriaLabel(!0)}),splide.on("autoplay:pause",function(){toggle.classList.remove("play"),toggle.classList.add("pause"),updateAriaLabel(!1)}),toggle.classList.contains("play")?updateAriaLabel(!0):updateAriaLabel(!1),toggle.addEventListener("click",function(){toggle.classList.contains("play")?autoplay.pause():autoplay.play()})}});const setVw=function(){const vw=document.documentElement.clientWidth/100;document.documentElement.style.setProperty("--vw",`${vw}px`)};window.addEventListener("DOMContentLoaded",setVw),window.addEventListener("resize",setVw),document.addEventListener("DOMContentLoaded",function(){const sectionElement=document.querySelector(".custom-section-best-sellers");if(!sectionElement)return;const tagButtons=sectionElement.querySelectorAll(".custom-section-best-sellers__tag"),productC
1ontainers=sectionElement.querySelectorAll(".custom-section-best-sellers__product"),splideInstances=new Map,splideOptions={perPage:4,perMove:1,gap:12,padding:{right:"15%"},pagination:!1,breakpoints:{1023:{perPage:2},767:{perPage:1,padding:"16%",gap:16}}};productContainers.forEach(function(productContainer){const sliderElement=productContainer.querySelector(".custom-section-best-sellers__product-list");if(!sliderElement)return;const collectionId=productContainer.getAttribute("data-collection-id"),isActive=productContainer.classList.contains("is-active"),splide=new Splide(sliderElement,splideOptions);let updateScrollbar=null;isActive&&(splide.mount(),initSplideLayoutRefresh(splide,sliderElement),updateScrollbar=initSplideScrollbar(splide,sliderElement),initSplideWheelScroll(splide,sliderElement)),splideInstances.set(collectionId,{splide,container:productContainer,sliderElement,updateScrollbar})});function switchCollection(clickedCollectionId,clickedButton){tagButtons.forEach(function(btn){btn.classList.remove("is-active"),btn.setAttribute("aria-selected","false"),btn.setAttribute("tabindex","-1")});let activeButton=null;if(clickedButton&&clickedButton.classList.contains("custom-section-best-sellers__tag"))clickedButton.classList.add("is-active"),clickedButton.setAttribute("aria-selected","true"),clickedButton.setAttribute("tabindex","0"),activeButton=clickedButton;else{const correspondingTag=sectionElement.querySelector(`.custom-section-best-sellers__tag[data-collection-id="${clickedCollectionId}"]`);correspondingTag&&(correspondingTag.classList.add("is-active"),correspondingTag.setAttribute("aria-selected","true"),correspondingTag.setAttribute("tabindex","0"),activeButton=correspondingTag)}const seeMoreButton=sectionElement.querySelector(".custom-section-best-sellers__head .custom-button");if(seeMoreButton&&activeButton){const collectionUrl=activeButton.getAttribute("data-collection-url");collectionUrl&&seeMoreButton.setAttribute("href",collectionUrl)}else{const valuePickerItem=sectionElement.querySelector(`.value-picker__choice-item[data-collection-id="${clickedCollectionId}"]`);if(valuePickerItem&&seeMoreButton){const collectionUrl=valuePickerItem.getAttribute("data-collection-url");collectionUrl&&seeMoreButton.setAttribute("href",collectionUrl)}}sectionElement.querySelectorAll(".value-picker__choice-item").forEach(function(item){item.classList.remove("is-selected")});const selectedItem=sectionElement.querySelector(`.value-picker__choice-item[data-collection-id="${clickedCollectionId}"]`);if(selectedItem){selectedItem.classList.add("is-selected");const valuePickerButton=sectionElement.querySelector(".custom-section-best-sellers__value-picker-button");if(valuePickerButton){const buttonText=valuePickerButton.querySelector("span");if(buttonText&&selectedItem){const itemText=selectedItem.cloneNode(!0),checkIcon=itemText.querySelector("svg");checkIcon&&checkIcon.remove(),buttonText.textContent=itemText.textContent.trim()}}}productContainers.forEach(function(container){container.classList.remove("is-active"),container.setAttribute("aria-hidden","true");const instance=splideInstances.get(container.getAttribute("data-collection-id"));instance&&instance.splide&&instance.splide.destroy()});const targetContainer=sectionElement.querySelector(`.custom-section-best-sellers__product[data-collection-id="${clickedCollectionId}"]`);if(targetContainer){targetContainer.classList.add("is-active"),targetContainer.setAttribute("aria-hidden","false");const instance=splideInstances.get(clickedCollectionId);if(instance){const newSplide=new Splide(instance.sliderElement,splideOptions);newSplide.mount(),initSplideLayoutRefresh(newSplide,instance.sliderElement);const updateScrollbar=initSplideScrollbar(newSplide,instance.sliderElement);initSplideWheelScroll(newSplide,instance.sliderElement),splideInstances.set(clickedCollectionId,{splide:newSplide,container:targetContainer,sliderElement:instance.sliderElement,updateScrollbar}),updateScrollbar&&setTimeout(function(){updateScrollbar()},0)}}}tagButtons.forEach(function(tagButton){tagButton.addEventListener("click",function(){const clickedCollectionId=tagButton.getAttribute("data-collection-id");switchCollection(clickedCollectionId,tagButton),tagButton.focus()}),tagButton.addEventListener("keydown",function(event){if(event.key!=="ArrowRight"&&event.key!=="ArrowLeft")return;event.preventDefault();const currentIndex=Array.prototype.indexOf.call(tagButtons,tagButton);let nextIndex=currentIndex;event.key==="ArrowRight"?nextIndex=(currentIndex+1)%tagButtons.length:event.key==="ArrowLeft"&&(nextIndex=(currentIndex-1+tagButtons.length)%tagButtons.length);const nextButton=tagButtons[nextIndex];if(nextButton){const nextCollectionId=nextButton.getAttribute("data-collection-id");switchCollection(nextCollectionId,nextButton),nextButton.focus()}})});function initValuePicker(){if(typeof ValuePicker<"u"){const bestSellersValuePicker=new ValuePicker("best-sellers-selector",{onValueSelect:function(collectionId){const selectedItem=sectionElement.querySelector(`.value-picker__choice-item[data-value="${collectionId}"]`);selectedItem&&switchCollection(collectionId,selectedItem)}})}else setTimeout(initValuePicker,100)}initValuePicker()}),document.addEventListener("DOMContentLoaded",function(){const sectionElement=document.querySelector(".custom-section-pickup__slider");if(!sectionElement)return;const splide=new Splide(sectionElement,{type:"loop",perPage:2,perMove:1,gap:24,pagination:!1,padding:"21%",breakpoints:{1023:{padding:"15%",perPage:1}}}).mount();initSplideWheelScroll(splide,sectionElement)}),document.addEventListener("DOMContentLoaded",function(){const sliderElements=document.querySelectorAll(".custom-section-promotions__slider");if(!sliderElements.length)return;const splideOptions={perPage:4,perMove:1,gap:16,padding:{right:"5%"},breakpoints:{1023:{perPage:3},767:{perPage:1,padding:{right:"22%"}}}};
1sliderElements.forEach(function(sectionElement){if(sectionElement.classList.contains("splide-initialized"))return;const splide=new Splide(sectionElement,splideOptions).mount();initSplideWheelScroll(splide,sectionElement),sectionElement.classList.add("splide-initialized")})}),document.addEventListener("DOMContentLoaded",function(){const sectionElement=document.querySelector(".custom-section-link-list__slider");if(!sectionElement)return;let splideInstance=null;function initSplide(){window.innerWidth>=768&&!splideInstance?(splideInstance=new Splide(sectionElement,{perPage:8,perMove:1,gap:24,padding:"80px",pagination:!1,breakpoints:{2300:{perPage:7,padding:"70px"},1920:{perPage:5,padding:"60px"},1440:{perPage:3},1023:{perPage:2}}}).mount(),initSplideWheelScroll(splideInstance,sectionElement)):window.innerWidth<768&&splideInstance&&(splideInstance.destroy(),splideInstance=null)}initSplide();let resizeTimer2;window.addEventListener("resize",function(){clearTimeout(resizeTimer2),resizeTimer2=setTimeout(function(){initSplide()},100)})}),document.addEventListener("DOMContentLoaded",function(){let FormClass=null;if(typeof window.Form<"u"?FormClass=window.Form:typeof Form<"u"&&(FormClass=Form),FormClass&&FormClass.serialize){const originalSerialize=FormClass.serialize;FormClass.serialize=function(form){if(form&&form.action&&form.action.includes("/cart/add")&&form.id){const availabilityInfo2=document.querySelector(".product-availability-info");if(availabilityInfo2){const availabilityInput=availabilityInfo2.querySelector('input[name="quantity"]'),quantityInputs=form.querySelectorAll('input[name="quantity"]');if(availabilityInput&&quantityInputs.length>0){const quantity=themeNormalizeAvailabilityQuantityInput(availabilityInput);quantityInputs.forEach(function(input){input.value=quantity,input.setAttribute("value",quantity)}),form.elements&&form.elements.namedItem("quantity")&&(form.elements.namedItem("quantity").value=quantity);for(let i=0;i<form.elements.length;i++)form.elements[i].name==="quantity"&&(form.elements[i].value=quantity)}}}return originalSerialize.call(this,form)}}const availabilityInfo=document.querySelector(".product-availability-info"),quantitySyncMap=new Map;if(availabilityInfo){const availabilityInput=availabilityInfo.querySelector('input[name="quantity"]');if(availabilityInput){let syncQuantityToMain2=function(){const quantity=themeNormalizeAvailabilityQuantityInput(availabilityInput);mainQuantityInput.value=quantity,mainQuantityInput.setAttribute("value",String(quantity)),mainForm.elements&&mainForm.elements.namedItem("quantity")&&(mainForm.elements.namedItem("quantity").value=quantity)};var syncQuantityToMain=syncQuantityToMain2;const mainForm=document.querySelector('form[action*="/cart/add"]');if(!mainForm||!mainForm.id)return;const formId=mainForm.id,mainQuantityInput=mainForm.querySelector('input[name="quantity"]');if(!mainQuantityInput)return;quantitySyncMap.set(formId,{availabilityInput,mainQuantityInput}),availabilityInput.addEventListener("input",function(){themeHideProductCartNotice();const raw=String(availabilityInput.value).trim();if(raw===""||raw==="-"){availabilityInput.value="",mainQuantityInput.value=0,mainQuantityInput.setAttribute("value","0");return}syncQuantityToMain2()}),availabilityInput.addEventListener("change",function(){themeHideProductCartNotice(),syncQuantityToMain2(),mainQuantityInput.dispatchEvent(new Event("change",{bubbles:!0})),mainQuantityInput.dispatchEvent(new Event("input",{bubbles:!0}))}),availabilityInput.addEventListener("blur",function(){syncQuantityToMain2()});const quantityPicker=availabilityInput.closest("quantity-picker");quantityPicker&&quantityPicker.addEventListener("click",function(e){e.target.closest('[data-action="decrease-picker-quantity"], [data-action="increase-picker-quantity"]')&&(themeHideProductCartNotice(),setTimeout(syncQuantityToMain2,0))});const variantJsonEl=document.querySelector("variant-picker script[data-variant]");if(variantJsonEl)try{const initialVariant=JSON.parse(variantJsonEl.textContent||"{}");themeUpdateAvailabilityInventoryData(initialVariant),themeApplyAvailabilityVariantQuantityLimits(initialVariant,availabilityInfo)}catch{}else if(availabilityInfo&&availabilityInfo.dataset.inventoryManagement==="shopify"){const availabilityForm=themeGetAvailabilityForm(availabilityInfo),variantId=themeGetAvailabilityVariantIdFromForm(availabilityForm);variantId&&themeUpdateAvailabilityInventoryData({id:variantId,inventory_management:availabilityInfo.dataset.inventoryManagement,inventory_policy:availabilityInfo.dataset.inventoryPolicy,inventory_quantity:parseInt(availabilityInfo.dataset.inventoryQuantity,10)||0})}mainQuantityInput.addEventListener("change",function(){availabilityInput.value=this.value,availabilityInput.setAttribute("value",this.value),availabilityInput.dispatchEvent(new Event("change",{bubbles:!0}))})}}document.addEventListener("click",function(e){let buyButton=e.target.closest("buy-button"),form=null;if(buyButton)form=buyButton.closest('form[action*="/cart/add"]');else{const clickedButton=e.target.closest('button[type="submit"]');clickedButton&&(buyButton=clickedButton.closest("buy-button"),buyButton&&(form=buyButton.closest('form[action*="/cart/add"]')))}if(!form||!form.id)return;const availabilityInfo2=document.querySelector(".product-availability-info");if(availabilityInfo2){const availabilityInput=availabilityInfo2.querySelector('input[name="quantity"]');if(availabilityInput){const quantity=themeNormalizeAvailabilityQuantityInput(availabilityInput);form.querySelectorAll('input[name="quantity"]').forEach(function(input){input.value=quantity,input.setAttribute("value",quantity)}),form.elements&&form.elements.namedItem("quantity")&&(form.elements.namedItem("quantity").value=quantity);for(let i=0;i<form.elements.length;i++)form.elements[i].name==="quantity"&&(form.elements[i].value=quantity)}}},!0),document.addEventListener("submit",function(e){const form=e.target;if(!form||form.tagName!=="FORM"||!form.action||!form.action.includes("/cart/add"))return;const formId=form.id;if(!formId)return;const syncData=quantitySyncMap.get(formId);if(syncData&&syncData.availabilityInput){const quantity=themeNormalizeAvailabilityQuantityInput(syncData.availabilityInput),quantityInput=form.querySelector('input[name="quantity"]');quantityInput&&(quantityInput.value=quantity,quantityInput.setAttribute("value",quantity))}},!0),document.addEventListener("variant:change",function(e){const availabilityInfo2=document.querySelector(".product-availability-info");!availabilityInfo2||!e.detail||!e.detail.variant||(themeHideProductCartNotice(),themeUpdateAvailabilityInventoryData(e.detail.variant),themeApplyAvailabilityVariantQuantityLimits(e.detail.variant,availabilityInfo2))})}),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".product-description-tabs").forEach(function(container){const tabs=container.querySelectorAll(".product-description-tabs__tab"),panels=container.querySelectorAll(".product-description-tabs__panel");
1if(!tabs.length||!panels.length)return;tabs.forEach(function(tab,index){const tabId=tab.id||`product-description-tab-${index}`;tab.id=tabId,tab.setAttribute("role","tab");const target=tab.getAttribute("data-tab"),panel=target?container.querySelector(`.product-description-tabs__panel[data-panel="${target}"]`):null;if(panel){const panelId=panel.id||`product-description-panel-${index}`;panel.id=panelId,panel.setAttribute("role","tabpanel"),panel.setAttribute("aria-labelledby",tabId)}});function switchTab(targetTab){tabs.forEach(function(t){const isTarget=t.getAttribute("data-tab")===targetTab;t.classList.toggle("product-description-tabs__tab--active",isTarget),t.setAttribute("aria-selected",isTarget?"true":"false"),t.setAttribute("tabindex",isTarget?"0":"-1")}),panels.forEach(function(panel){const isTarget=panel.getAttribute("data-panel")===targetTab;panel.classList.toggle("product-description-tabs__panel--active",isTarget),panel.setAttribute("aria-hidden",isTarget?"false":"true")})}tabs.forEach(function(tab){tab.addEventListener("click",function(){const targetTab=this.getAttribute("data-tab");switchTab(targetTab)}),tab.addEventListener("keydown",function(event){if(event.key!=="ArrowRight"&&event.key!=="ArrowLeft")return;event.preventDefault();const currentIndex=Array.prototype.indexOf.call(tabs,tab);let nextIndex=currentIndex;event.key==="ArrowRight"?nextIndex=(currentIndex+1)%tabs.length:event.key==="ArrowLeft"&&(nextIndex=(currentIndex-1+tabs.length)%tabs.length);const nextTab=tabs[nextIndex];if(nextTab){const targetTab=nextTab.getAttribute("data-tab");switchTab(targetTab),nextTab.focus()}})});const mobileHeader=container.querySelector("[data-mobile-tab-trigger]"),mobileModal=container.querySelector("[data-mobile-tab-modal]"),mobileOptions=container.querySelectorAll("[data-mobile-tab-option]"),mobileClose=container.querySelector("[data-mobile-tab-close]");if(mobileHeader&&mobileModal){let updateHeaderText2=function(targetTab){const headerText=mobileHeader.querySelector(".product-description-tabs__mobile-header-text");if(headerText){let text="Product Details : ";targetTab==="description"?text+="Description":targetTab==="details"?text+="Details":targetTab==="store-stock"&&(text+="Store Stock Status"),headerText.textContent=text}},updateActiveOption2=function(targetTab){mobileOptions.forEach(function(opt){opt.getAttribute("data-mobile-tab-option")===targetTab?opt.setAttribute("data-active","true"):opt.setAttribute("data-active","false")})},closeModal2=function(){mobileModal.setAttribute("aria-hidden","true"),mobileHeader.setAttribute("aria-expanded","false"),document.body.style.overflow=""};var updateHeaderText=updateHeaderText2,updateActiveOption=updateActiveOption2,closeModal=closeModal2;mobileHeader.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),mobileModal.setAttribute("aria-hidden","false"),mobileHeader.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden"}),mobileClose&&mobileClose.addEventListener("click",closeModal2),mobileOptions.forEach(function(option){option.addEventListener("click",function(){const targetTab=this.getAttribute("data-mobile-tab-option");switchTab(targetTab),updateActiveOption2(targetTab),updateHeaderText2(targetTab),closeModal2()})});const activeTab=container.querySelector(".product-description-tabs__tab--active");if(activeTab){const activeTabValue=activeTab.getAttribute("data-tab");updateActiveOption2(activeTabValue),updateHeaderText2(activeTabValue)}tabs.forEach(function(tab){tab.addEventListener("click",function(){const targetTab=this.getAttribute("data-tab");updateActiveOption2(targetTab),updateHeaderText2(targetTab)})})}})}),(function(){"use strict";function initExpandableDescription(){document.querySelectorAll("[data-expandable-description]").forEach(function(expandable){if(expandable.hasAttribute("data-initialized"))return;const content=expandable.querySelector("[data-expandable-content]"),readmore=expandable.querySelector("[data-expandable-readmore]");if(!content)return;const lineHeight=parseFloat(window.getComputedStyle(content).lineHeight)||24,contentHeight=content.scrollHeight;Math.ceil(contentHeight/lineHeight)>20?(expandable.setAttribute("data-collapsed","true"),readmore&&readmore.addEventListener("click",function(){expandable.setAttribute("data-collapsed","fal
1se")})):expandable.setAttribute("data-collapsed","false"),expandable.setAttribute("data-initialized","true")})}document.addEventListener("DOMContentLoaded",initExpandableDescription),document.addEventListener("click",function(event){const tabButton=event.target.closest("[data-tab]");tabButton&&tabButton.getAttribute("data-tab")==="description"&&setTimeout(initExpandableDescription,100)})})(),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("[data-rich-embed-fix]").forEach(function(container){const walker=document.createTreeWalker(container,NodeFilter.SHOW_TEXT,null,!1),textNodes=[];for(;walker.nextNode();){const node=walker.currentNode;node.nodeValue&&(node.nodeValue.includes("<iframe")||node.nodeValue.includes("<iframe"))&&textNodes.push(node)}textNodes.forEach(function(node){let text=node.nodeValue.trim();text=text.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&");const srcMatch=text.match(/src=["']([^"']+)["']/i);if(!srcMatch||!srcMatch[1])return;const src=srcMatch[1];let embedElement;if(src.match(/\.(mp4|webm|ogg)(\?.*)?$/i)){embedElement=document.createElement("video"),embedElement.controls=!0,embedElement.playsInline=!0,embedElement.preload="metadata",embedElement.style.width="100%",embedElement.style.maxWidth="100%";const source=document.createElement("source");source.src=src,src.match(/\.mp4(\?.*)?$/i)?source.type="video/mp4":src.match(/\.webm(\?.*)?$/i)?source.type="video/webm":src.match(/\.ogg(\?.*)?$/i)&&(source.type="video/ogg"),embedElement.appendChild(source)}else embedElement=document.createElement("iframe"),embedElement.src=src,embedElement.width="100%",embedElement.height="420",embedElement.loading="lazy",embedElement.allowFullscreen=!0,embedElement.setAttribute("frameborder","0"),embedElement.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share");const wrapper=document.createElement("div");wrapper.className="rich-embed-wrapper",wrapper.appendChild(embedElement),node.parentNode.replaceWith(wrapper)})})});function initCustomProductSlider(sliderElement){if(!sliderElement||sliderElement.classList.contains("splide-initialized"))return;const splideOptions={perPage:5,perMove:1,gap:16,pagination:!1,padding:{right:"8%"},breakpoints:{1300:{perPage:4},1023:{perPage:3},767:{perPage:1,padding:"16%",gap:16}}},splide=new Splide(sliderElement,splideOptions);splide.mount(),initSplideLayoutRefresh(splide,sliderElement),initSplideScrollbar(splide,sliderElement),initSplideWheelScroll(splide,sliderElement),sliderElement.classList.add("splide-initialized")}function initRecentlyViewedSlider(){document.querySelectorAll(".recently-viewed-products-slider").forEach(initCustomProductSlider)}function initProductRecommendationsSlider(){document.querySelectorAll(".product-recommendations-slider").forEach(initCustomProductSlider)}function initCustomProductSliders(){initRecentlyViewedSlider(),initProductRecommendationsSlider()}function observeCustomProductSliderSection(sectionElement){if(!sectionElement||sectionElement.hasAttribute("data-custom-product-slider-observed"))return;sectionElement.setAttribute("data-custom-product-slider-observed","true"),new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.addedNodes.forEach(function(node){if(node.nodeType===1){if(node.classList&&(node.classList.contains("recently-viewed-products-slider")||node.classList.contains("product-recommendations-slider"))){initCustomProductSlider(node);return}node.querySelector&&node.querySelectorAll(".recently-viewed-products-slider, .product-recommendations-slider").forEach(initCustomProductSlider)}})})}).observe(sectionElement,{childList:!0,subtree:!0})}document.addEventListener("DOMContentLoaded",function(){initCustomProductSliders(),document.querySelectorAll('[data-section-type="recently-viewed-products"], [data-section-type="product-recommendations"]').forEach(observeCustomProductSliderSection)});function themeHandleRecentlyViewedCartAdd(button){const variantId=button.getAttribute("data-variant-id");if(!variantId||button.disabled)return;button.disabled=!0,document.dispatchEvent(new CustomEvent("theme:loading:start"));const quantityLimit=themeResolveQuantityLimitForCartAdd(variantId,button);themeValidateListingCartAdd(variantId,1,quantityLimit,!1).then(function(vali
1dation){return validation.ok?fetch(`${window.routes.cartAddUrl}.js`,{body:JSON.stringify({id:variantId,quantity:validation.quantity}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){return{response,quantity:validation.quantity}}):(themeApplyListingCartAddValidationFailure(validation,quantityLimit,1),null)}).then(function(result){if(button.disabled=!1,!result||!result.response){document.dispatchEvent(new CustomEvent("theme:loading:end"));return}const response=result.response,quantity=result.quantity;if(response.ok){const event=new CustomEvent("product:added",{bubbles:!0,detail:{button,variant:variantId,quantity,productAdded:!0}});document.documentElement.dispatchEvent(event),window.theme&&window.theme.cartType==="page"?window.location.href=window.routes.cartUrl:setTimeout(function(){document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))},100)}else response.json().then(function(content){alert(window.themeGetSafeCartDescription(content&&content.description)),document.dispatchEvent(new CustomEvent("theme:loading:end"))})}).catch(function(error){button.disabled=!1,document.dispatchEvent(new CustomEvent("theme:loading:end")),console.error("Error adding to cart:",error),alert("\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002")})}function themeAttachRecentlyViewedCartAddListener(button){!button||button.hasAttribute("data-listener-attached")||(button.setAttribute("data-listener-attached","true"),button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),themeHandleRecentlyViewedCartAdd(button)}))}document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".recently-viewed-products__buy-button").forEach(themeAttachRecentlyViewedCartAddListener);const observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.addedNodes.forEach(function(node){if(node.nodeType!==1)return;(node.querySelectorAll?node.querySelectorAll(".recently-viewed-products__buy-button"):[]).forEach(themeAttachRecentlyViewedCartAddListener)})})}),sectionElement=document.querySelector('[data-section-type="recently-viewed-products"]');sectionElement&&observer.observe(sectionElement,{childList:!0,subtree:!0})}),document.addEventListener("DOMContentLoaded",function(){const cartSection=document.querySelector('[data-section-type="cart"]');function updateCartFormItemCount(){const cartForm2=document.getElementById("cart-recap-form"),currentCartSection=document.querySelector('[data-section-type="cart"]');if(cartForm2&¤tCartSection){const itemCount=currentCartSection.getAttribute("data-item-count");itemCount&&cartForm2.setAttribute("data-item-count",itemCount)}}function showCartFullPopup(){window.themeShowCartFullPopup()}function hideCartFullPopup(){const popup2=document.getElementById("cart-full-popup");popup2&&popup2.setAttribute("aria-hidden","true")}function validateCheckout(event){const checkoutButton=event.submitter;if(checkoutButton&&checkoutButton.name==="checkout"){const cartForm2=document.getElementById("cart-recap-form");if(!cartForm2)return;const currentCartSection=document.querySelector('[data-section-type="cart"]');if(parseInt(currentCartSection&¤tCartSection.getAttribute("data-item-count")||cartForm2.getAttribute("data-item-count")||"0",10)>window.themeGetCartMaxLineItems())return event.preventDefault(),event.stopPropagation(),showCartFullPopup(),!1}}const cartForm=document.getElementById("cart-recap-form");cartForm&&cartForm.addEventListener("submit",validateCheckout);const popup=document.getElementById("cart-full-popup");if(popup){const closeButton=popup.querySelector(".custom-cart-full-popup__close");closeButton&&closeButton.addEventListener("click",hideCartFullPopup),popup.addEventListener("click",function(event){event.target===popup&&hideCartFullPopup()});const popupInner=popup.querySelector(".custom-cart-full-popup__inner");popupInner&&popupInner.addEventListener("click",function(event){event.stopPropagation()}),document.addEventListener("keydown",function(event){event.key==="Escape"&&popup.getAttribute("aria-hidden")==="false"&&hideCartFullPopup()})}document.addEventListener("cart:rerendered",function(){updateCartFormItemCount();const newCartForm=document.getElementById("cart-recap-form");newCartForm&&newCartForm!==cartForm&&newCartForm.addEventListener("submit",validateCheckout);const newPopup=document.getElementById("cart-full-popup");if(newPopup&&newPopup!==popup){const newCloseButton=newPopup.querySelector(".custom-cart-full-popup__close");newCloseButton&&newCloseButton.addEventListener("click",hideCartFullPopup),newPopup.addEventListener("click",function(event){event.target===newPopup&&hideCartFullPopup()});const newPopupInner=newPopup.querySelector(".custom-cart-full-popup__inner");newPopupInner&&newPopupInner.addEventListener("click",function(event){event.stopPropagation()})}}),updateCartFormItemCount();function getTotalCartQuantity(){const quantityInputs=document.querySelectorAll(".custom-quantity-selector__value");let totalQuantity=0;
1return quantityInputs.forEach(function(input){const quantity=parseInt(input.value)||0;totalQuantity+=quantity}),totalQuantity}function validateQuantityIncrease(event){const button=event.target.closest('[data-action="increase-quantity"]');if(!button)return;const newQuantity=parseInt(button.getAttribute("data-quantity"))||0,lineIndex=button.getAttribute("data-line"),currentLineInput=document.querySelector(`.custom-quantity-selector__value[data-line="${lineIndex}"]`),currentLineQuantity=currentLineInput&&parseInt(currentLineInput.value)||0,maxAttr=currentLineInput?currentLineInput.getAttribute("max"):null,maxQuantity=maxAttr?parseInt(maxAttr,10):null;if(maxQuantity!==null&&newQuantity>maxQuantity)return event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation(),window.themeShowCartFullPopup(),!1;const quantityIncrease=newQuantity-currentLineQuantity;if(quantityIncrease>0){const currentTotalQuantity=getTotalCartQuantity();var maxCartItemsInCart=window.themeGetCartMaxLineItems();if(currentTotalQuantity+quantityIncrease>maxCartItemsInCart)return event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation(),window.themeShowCartFullPopup(),!1}}document.addEventListener("click",validateQuantityIncrease,!0);function validateQuantityInput(event){const input=event.target;if(!input.classList.contains("custom-quantity-selector__value"))return;const newValue=parseInt(input.value)||0,lineIndex=input.getAttribute("data-line"),currentValue=parseInt(input.getAttribute("data-current-value"))||0,maxAttr=input.getAttribute("max"),maxQuantity=maxAttr?parseInt(maxAttr,10):null;let effectiveNewValue=newValue;if(maxQuantity!==null&&newValue>maxQuantity&&(input.value=maxQuantity,input.setAttribute("data-current-value",maxQuantity),effectiveNewValue=maxQuantity),effectiveNewValue-currentValue>0){const quantityInputs=document.querySelectorAll(".custom-quantity-selector__value");let totalQuantityWithoutCurrent=0;quantityInputs.forEach(function(qtyInput){if(qtyInput!==input){const quantity=parseInt(qtyInput.value)||0;totalQuantityWithoutCurrent+=quantity}}),totalQuantityWithoutCurrent+=currentValue;const newTotalQuantity=totalQuantityWithoutCurrent-currentValue+effectiveNewValue;var maxCartItemsInput=window.themeGetCartMaxLineItems();if(newTotalQuantity>maxCartItemsInput)return event.preventDefault(),event.stopPropagation(),input.value=currentValue,input.setAttribute("data-current-value",currentValue),window.themeShowCartFullPopup(),!1}}document.addEventListener("change",validateQuantityInput,!0),(function(){const commitTimers=new WeakMap,allowCommit=new WeakSet,COMMIT_DEBOUNCE_MS=350;function isCartQuantityInput(el){if(!el||typeof el.closest!="function"||!el.classList||!el.classList.contains("quantity-selector__value"))return!1;const selector=el.closest(".quantity-selector");return!!selector&&!selector.classList.contains("quantity-selector--product")}function committedValue(input){return input.getAttribute("data-current-value")}function clearTimer(input){const timer=commitTimers.get(input);timer&&(clearTimeout(timer),commitTimers.delete(input))}function commitNow(input){clearTimer(input),String(input.value)!==String(committedValue(input))&&(allowCommit.add(input),input.dispatchEvent(new Event("change",{bubbles:!0})))}document.addEventListener("change",function(event){const input=event.target;if(isCartQuantityInput(input)){if(allowCommit.has(input)){allowCommit.delete(input);return}event.stopImmediatePropagation(),clearTimer(input),String(input.value)!==String(committedValue(input))&&commitTimers.set(input,setTimeout(function(){commitNow(input)},COMMIT_DEBOUNCE_MS))}},!0),document.addEventListener("keydown",function(event){if(event.key!=="Enter")return;const input=event.target;isCartQuantityInput(input)&&(event.preventDefault(),commitNow(input))},!0)})(),document.addEventListener("cart:rerendered",function(){document.querySelectorAll(".custom-quantity-selector__value").forEach(function(input){input.setAttribute("data-current-value",input.value)})})}),document.addEventListener("DOMContentLoaded",function(){function initCartScrollWatcher(){const cartInner=document.querySelector(".custom-cart-wrapper__inner"),cartLayer=document.querySelector(".custom-cart-wrapper__layer");if(!cartInner||!cartLayer)return;function checkScrollPosition(){const scrollTop=cartInner.scrollTop,scrollHeight=cartInner.scrollHeight,clientHeight=cartInner.clientHeight;scrollTop+clientHeight>
1=scrollHeight-1?cartLayer.classList.add("custom-cart-wrapper__layer--no-before"):cartLayer.classList.remove("custom-cart-wrapper__layer--no-before")}checkScrollPosition(),cartInner.addEventListener("scroll",checkScrollPosition),window.addEventListener("resize",checkScrollPosition)}initCartScrollWatcher(),document.addEventListener("cart:rerendered",function(){initCartScrollWatcher()})}),document.addEventListener("DOMContentLoaded",function(){const sectionElement=document.querySelector(".custom-about__content-inner");if(!sectionElement)return;const tabButtons=sectionElement.querySelectorAll(".custom-about__tab-button"),tabBlocks=sectionElement.querySelectorAll(".custom-about__block");tabButtons.forEach(function(tabButton,index){tabButton.addEventListener("click",function(){tabButtons.forEach(function(btn){btn.classList.remove("active")}),tabButton.classList.add("active"),tabBlocks.forEach(function(block){block.classList.remove("active")}),tabBlocks[index]&&tabBlocks[index].classList.add("active")})})}),document.addEventListener("click",function(event){const toggleButton=event.target.closest('[data-action="toggle-tag-pulldown"]');if(toggleButton){event.preventDefault();const pulldown2=toggleButton.closest(".custom-page__tag-pulldown"),tagList=pulldown2.querySelector(".custom-page__tag-list"),isExpanded=toggleButton.getAttribute("aria-expanded")==="true";toggleButton.setAttribute("aria-expanded",!isExpanded),tagList.setAttribute("aria-hidden",isExpanded),pulldown2.classList.toggle("is-open");return}event.target.closest(".custom-page__tag-pulldown")||document.querySelectorAll(".custom-page__tag-pulldown").forEach(function(pd){const btn=pd.querySelector('[data-action="toggle-tag-pulldown"]'),list=pd.querySelector(".custom-page__tag-list");btn&&list&&(btn.setAttribute("aria-expanded","false"),list.setAttribute("aria-hidden","true"),pd.classList.remove("is-open"))})}),document.addEventListener("DOMContentLoaded",function(){function splitTextByLines(text,maxLines,lineHeightPx,fontSize,containerElement){const sentences=text.split(/([ãï¼.!?ï¼ï¼]\s*)/),reconstructedSentences=[];for(let i=0;i<sentences.length;i+=2)sentences[i]&&reconstructedSentences.push(sentences[i]+(sentences[i+1]||""));const containerWidth=containerElement.offsetWidth||containerElement.clientWidth||800,measureEl=document.createElement("span");measureEl.style.position="absolute",measureEl.style.visibility="hidden",measureEl.style.whiteSpace="pre-wrap",measureEl.style.wordWrap="break-word",measureEl.style.fontSize=fontSize+"px",measureEl.style.lineHeight=lineHeightPx+"px",measureEl.style.width=containerWidth+"px",measureEl.style.fontFamily=window.getComputedStyle(containerElement).fontFamily,document.body.appendChild(measureEl);let excerpt="";const maxHeight=lineHeightPx*maxLines;for(let i=0;i<reconstructedSentences.length;i++){const testText=excerpt+reconstructedSentences[i];if(measureEl.textContent=testText,measureEl.offsetHeight<=maxHeight)excerpt=testText;else break}document.body.removeChild(measureEl);const needsTruncation=excerpt.length<text.length,fullText=text;return{excerpt:excerpt.trim(),fullText:fullText.trim(),needsTruncation}}function initTextAccordion(){const contentElement=document.querySelector(".custom-template__content.hide-text-on");if(!contentElement)return;contentElement.querySelectorAll("p:not([data-accordion-processed])").forEach(function(paragraph){paragraph.setAttribute("data-accordion-processed","true");const hasImage=paragraph.querySelector("img"),hasIframe=paragraph.querySelector("iframe");if(hasImage||hasIframe)return;const originalHeight=paragraph.scrollHeight,computedStyle=window.getComputedStyle(paragraph),fontSize=parseFloat(computedStyle.fontSize)||16,lineHeightValue=computedStyle.lineHeight,lineHeightPx=lineHeightValue==="normal"?fontSize*1.2:parseFloat(lineHeightValue)||fontSize*1.2,linesCount=window.innerWidth<=767?20:10,thresholdHeight=lineHeightPx*linesCount;if(originalHeight>thresholdHeight){const originalText=paragraph.textContent,textSplit=splitTextByLines(originalText,linesCount,lineHeightPx,fontSize,paragraph);if(!textSplit.needsTruncation)return;paragraph.classList.add("hide-text"),paragraph.textContent="";const uniqueId="text-accordion-"+Date.now()+"-"+Math.random().toString(36).substr(2,9),excerptId=uniqueId+"-excerpt",fullTextId=uniqueId+"-full",excerptSpan=document.createElement("span");
1excerptSpan.id=excerptId,excerptSpan.className="custom-template__text-excerpt",excerptSpan.setAttribute("aria-hidden","false"),excerptSpan.textContent=textSplit.excerpt;const fullTextSpan=document.createElement("span");fullTextSpan.id=fullTextId,fullTextSpan.className="custom-template__text-full",fullTextSpan.setAttribute("aria-hidden","true"),fullTextSpan.textContent=textSplit.fullText,fullTextSpan.style.display="none",paragraph.appendChild(excerptSpan),paragraph.appendChild(fullTextSpan);const toggleBtnArea=document.createElement("div");toggleBtnArea.className="custom-template__toggle-btn-area",paragraph.hasAttribute("style")&&toggleBtnArea.setAttribute("style",paragraph.getAttribute("style"));const toggleBtn=document.createElement("button");toggleBtn.className="custom-template__toggle-btn",toggleBtn.setAttribute("type","button"),toggleBtn.setAttribute("aria-expanded","false"),toggleBtn.setAttribute("aria-controls",excerptId+" "+fullTextId);const btnText=document.createElement("span");btnText.className="custom-template__toggle-btn-text",btnText.textContent="Read Full Text";const btnIcon=document.createElement("span");btnIcon.className="custom-template__toggle-btn-icon";const iconInner=document.createElement("span");btnIcon.appendChild(iconInner),toggleBtn.appendChild(btnText),toggleBtn.appendChild(btnIcon),toggleBtnArea.appendChild(toggleBtn),paragraph.insertAdjacentElement("afterend",toggleBtnArea),toggleBtn.addEventListener("click",function(){const isExpanded=paragraph.classList.toggle("is-expanded");toggleBtn.classList.toggle("is-expanded",isExpanded),toggleBtn.setAttribute("aria-expanded",isExpanded),isExpanded?(excerptSpan.setAttribute("aria-hidden","true"),excerptSpan.style.display="none",fullTextSpan.setAttribute("aria-hidden","false"),fullTextSpan.style.display="",btnText.textContent="Hide Full Text"):(excerptSpan.setAttribute("aria-hidden","false"),excerptSpan.style.display="",fullTextSpan.setAttribute("aria-hidden","true"),fullTextSpan.style.display="none",btnText.textContent="Read Full Text")})}})}initTextAccordion(),window.addEventListener("load",function(){initTextAccordion()})}),document.addEventListener("DOMContentLoaded",function(){function initSitemapAccordion(){if(window.innerWidth>767)return;document.querySelectorAll(".custom-sitemap__link-menu:not([data-accordion-processed])").forEach(function(linkMenu){linkMenu.setAttribute("data-accordion-processed","true");const menuItems=linkMenu.querySelectorAll(".custom-sitemap__link-menu-item");if(menuItems.length<=20)return;menuItems.forEach(function(item,index){index>=10&&item.classList.add("custom-sitemap__link-menu-item--hidden")}),linkMenu.classList.add("custom-sitemap__link-menu--hide-items");const toggleBtnArea=document.createElement("div");toggleBtnArea.className="custom-sitemap__toggle-btn-area";const toggleBtn=document.createElement("button");toggleBtn.className="custom-sitemap__toggle-btn",toggleBtn.setAttribute("type","button"),toggleBtn.setAttribute("aria-expanded","false");const btnText=document.createElement("span");btnText.className="custom-sitemap__toggle-btn-text",btnText.textContent="Read Full Text";const btnIcon=document.createElement("span");btnIcon.className="custom-sitemap__toggle-btn-icon";const iconInner=document.createElement("span");btnIcon.appendChild(iconInner),toggleBtn.appendChild(btnText),toggleBtn.appendChild(btnIcon),toggleBtnArea.appendChild(toggleBtn),linkMenu.insertAdjacentElement("afterend",toggleBtnArea),toggleBtn.addEventListener("click",function(){const isExpanded=linkMenu.classList.toggle("is-expanded");toggleBtn.classList.toggle("is-expanded",isExpanded),toggleBtn.setAttribute("aria-expanded",isExpanded),isExpanded?btnText.textContent="Hide Full Text":btnText.textContent="Read Full Text"})})}initSitemapAccordion();let resizeTimer2;window.addEventListener("resize",function(){clearTimeout(resizeTimer2),resizeTimer2=setTimeout(function(){window.innerWidth<=767&&(document.querySelectorAll(".custom-sitemap__link-menu[data-accordion-processed]").forEach(function(linkMenu){linkMenu.removeAttribute("data-accordion-processed"),linkMenu.classList.remove("custom-sitemap__link-menu--hide-items","is-expanded"),linkMenu.querySelectorAll(".custom-sitemap__link-menu-item--hidden").forEach(function(item){item.classList.remove("custom-sitemap__link-menu-item--hidden")});const btnArea=linkMenu.nextElementSibling;btnArea&&btnArea.classList.contains("custom-sitemap__toggle-btn-area")&&btnArea.remove()}),initSitemapAccordion())},250)})}),document.addEventListener("DOMContentLoaded",function(){const customDropdowns=document.querySelectorAll(".custom-dropdown");customDropdowns.forEach(function(dropdown){const select=dropdown.querySelector(".custom-dropdown__select"),trigger=dropdown.querySelector(".custom-dropdown__trigger"),triggerText=dropdown.querySelector(".custom-dropdown__trigger-text"),options=dropdown.querySelectorAll(".custom-dropdown__option");if(!select||!trigger||!triggerText||options.length===0)return;trigger.addEventListener("click",function(e){e.stopPropagation();const isOpen=dropdown.classList.contains("is-open");customDropdowns.forEach(function(otherDropdown){otherDropdown!==dropdown&&otherDropdown.classList.remove("is-open")}),isOpen?dropdown.classList.remove("is-open"):dropdown.classList.add("is-open")}),options.forEach(function(option){option.addEventListener("click",function(e){e.stopPropagation();const value=option.getAttribute("data-value");if(value){select.value=value,select.dispatchEvent(new Event("change",{bubbles:!0}));const optionText=option.querySelector(".custom-dropdown__option-text");optionText&&(triggerText.textContent=optionText.textContent,dropdown.classList.add("has-selection")),options.forEach(function(opt){opt.classList.remove("is-selected")}),option.classList.add("is-selected"),dropdown.classList.remove("is-open")}})}),select.addEventListener("change",function(){const selectedValue2=select.value,selectedOption=dropdown.querySelector('.custom-dropdown__option[data-value="'+selectedValue2+'"]');if(selectedOption){const optionText=selectedOption.querySelector(".custom-dropdown__option-text");optionText&&(triggerText.textContent=optionText.textContent,dropdown.classList.add("has-selection")),options.forEach(function(opt){opt.classList.remove("is-selected")}),selectedOption.classList.add("is-selected")}else selectedValue2===""&&(triggerText.textContent=triggerText.getAttribute("data-placeholder")||"Select a reason...",dropdown.classList.remove("has-selection"),options.forEach(function(opt){opt.classList.remove("is-selected")}))});const selectedValue=select.value;if(selectedValue){const selectedOption=dropdown.querySelector('.custom-dropdown__option[data-value="'+selectedValue+'"]');
1if(selectedOption){const optionText=selectedOption.querySelector(".custom-dropdown__option-text");optionText&&(triggerText.textContent=optionText.textContent,dropdown.classList.add("has-selection")),selectedOption.classList.add("is-selected")}}else triggerText.setAttribute("data-placeholder",triggerText.textContent)})}),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".custom-faq__content-block-text.js-tooltip-strip-html").forEach(function(el){el.title=(el.textContent||"").trim()}),document.querySelectorAll(".custom-faq__details.js-details").forEach(function(details){const summary=details.querySelector("summary"),content=details.querySelector(".custom-faq__details-content"),icon=details.querySelector(".custom-faq__group-link-icon");if(!summary||!content)return;details.hasAttribute("open")?(content.style.maxHeight=content.scrollHeight+"px",icon&&(icon.style.transform="rotate(180deg)")):(content.style.maxHeight="0",icon&&(icon.style.transform="rotate(0deg)")),summary.addEventListener("click",function(e){if(e.preventDefault(),details.hasAttribute("open")){const currentHeight=content.scrollHeight;content.style.maxHeight=currentHeight+"px",requestAnimationFrame(function(){requestAnimationFrame(function(){content.style.maxHeight="0",icon&&(icon.style.transform="rotate(0deg)")})}),setTimeout(function(){details.removeAttribute("open"),content.style.maxHeight="0"},250)}else details.setAttribute("open",""),content.style.maxHeight="0",requestAnimationFrame(function(){requestAnimationFrame(function(){content.style.maxHeight=content.scrollHeight+"px",icon&&(icon.style.transform="rotate(180deg)")})}),setTimeout(function(){content.style.maxHeight=content.scrollHeight+"px"},250)});let resizeTimer2;window.addEventListener("resize",function(){clearTimeout(resizeTimer2),resizeTimer2=setTimeout(function(){details.hasAttribute("open")&&(content.style.maxHeight=content.scrollHeight+"px")},100)})}),document.querySelectorAll(".custom-faq__content-block-details").forEach(function(details){const summary=details.querySelector("summary"),content=details.querySelector(".custom-faq__content-block-answer");if(!summary||!content)return;details.hasAttribute("open")?content.style.maxHeight=content.scrollHeight+"px":content.style.maxHeight="0",summary.addEventListener("click",function(e){if(e.preventDefault(),details.hasAttribute("open")){const currentHeight=content.scrollHeight;content.style.maxHeight=currentHeight+"px",requestAnimationFrame(function(){requestAnimationFrame(function(){content.style.maxHeight="0"})}),setTimeout(function(){details.removeAttribute("open"),content.style.maxHeight="0"},300)}else details.setAttribute("open",""),content.style.maxHeight="0",requestAnimationFrame(function(){requestAnimationFrame(function(){content.style.maxHeight=content.scrollHeight+"px"})}),setTimeout(function(){content.style.maxHeight=content.scrollHeight+"px"},300)});let resizeTimer2;window.addEventListener("resize",function(){clearTimeout(resizeTimer2),resizeTimer2=setTimeout(function(){details.hasAttribute("open")&&(content.style.maxHeight=content.scrollHeight+"px")},100)})})}),document.addEventListener("DOMContentLoaded",function(){const anchorLinks=document.querySelectorAll(".custom-faq__details-item");anchorLinks.forEach(function(link){link.addEventListener("click",function(e){anchorLinks.forEach(function(item){item.classList.remove("focus")}),this.classList.add("focus")})})}),document.addEventListener("DOMContentLoaded",function(){function getHeaderHeight(){const headerHeightVar=getComputedStyle(document.documentElement).getPropertyValue("--header-height");if(headerHeightVar){const height=parseFloat(headerHeightVar);if(!isNaN(height)&&height>0)return height}const headerSection=document.querySelector('[data-section-type="header"]');if(headerSection)return headerSection.offsetHeight;const header=document.querySelector(".header");return header?header.offsetHeight:0}document.addEventListener("click",function(event){const anchorLink=event.target.closest('a[href^="#"]');if(!anchorLink)return;const href=anchorLink.getAttribute("href");if(!href||href==="#"||href.startsWith("#javascript:"))return;const targetId=href.substring(1),targetElement=document.getElementById(targetId);if(!targetElement)return;event.preventDefault();const headerHeight=getHeaderHeight(),targetPosition=targetElement.getBoundingClientRect().top+window.pageYOffset-headerHeight;window.scrollTo({top:Math.max(0,targetPosition),behavior:"smooth"}),history.pushState?history.pushState(null,null,href):window.location.hash=href});function handleInitialHash(){if(window.location.hash){const targetId=window.location.hash.substring(1),targetElement=document.getElementById(targetId);targetElement&&setTimeout(function(){const headerHeight=getHeaderHeight(),targetPosition=targetElement.getBoundingClientRect().top+window.pageYOffset-headerHeight;window.scrollTo({top:Math.max(0,targetPosition),behavior:"smooth"})},100)}}handleInitialHash(),window.addEventListener("load",handleInitialHash)}),document.addEventListener("DOMContentLoaded",function(){function closeMiniCart(){const miniCartElement=document.getElementById("mini-cart"),miniCartToggleElement=document.querySelector('[aria-controls="mini-cart"]');!miniCartElement||!miniCartToggleElement||miniCartElement.getAttribute("aria-hidden")==="false"&&miniCartToggleElement.click()}document.addEventListener("click",function(event){event.target.closest(".custom-mini-cart__overlay")&&closeMiniCart()}),document.addEventListener("click",function(event){event.target.closest(".custom-mini-cart__close-button")&&(event.preventDefault(),closeMiniCart())}),document.addEventListener("click",function(event){event.target.closest(".custom-mini-cart__continue-shopping-link")&&(event.preventDefault(),event.stopPropagation(),closeMiniCart())})}),document.addEventListener("DOMContentLoaded",function(){const togglePasswordButton=document.querySelector(".custom-form__field-toggle-password"),passwordInput=document.getElementById("customer[password]");if(togglePasswordButton&&passwordInput){const eyeIcon='<svg class="icon" width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.71979 9.23083C9.6641 9.23083 10.4661 8.90035 11.1258 8.23938C11.7856 7.5784 12.1154 6.77576 12.1154 5.83146C12.1154 4.88715 11.7849 4.08514 11.124 3.42542C10.463 2.76569 9.66035 2.43583 8.71604 2.43583C7.77174 2.43583 6.96972 2.76632 6.31 3.42729C5.65028 4.08826 5.32042 4.8909 5.32042 5.83521C5.32042 6.77951 5.6509 7.58153 6.31188 8.24125C6.97285 8.90097 7.77549 9.23083 8.71979 9.23083ZM8.71792 8.08333C8.09292 8.08333 7.56167 7.86458 7.12417 7.42708C6.68667 6.98958
16.46792 6.45833 6.46792 5.83333C6.46792 5.20833 6.68667 4.67708 7.12417 4.23958C7.56167 3.80208 8.09292 3.58333 8.71792 3.58333C9.34292 3.58333 9.87417 3.80208 10.3117 4.23958C10.7492 4.67708 10.9679 5.20833 10.9679 5.83333C10.9679 6.45833 10.7492 6.98958 10.3117 7.42708C9.87417 7.86458 9.34292 8.08333 8.71792 8.08333ZM8.71896 11.6667C6.80271 11.6667 5.05667 11.1381 3.48083 10.0808C1.905 9.02375 0.744722 7.60792 0 5.83333C0.744722 4.05875 1.90458 2.64292 3.47958 1.58583C5.05472 0.528611 6.80049 0 8.71688 0C10.6331 0 12.3792 0.528611 13.955 1.58583C15.5308 2.64292 16.6911 4.05875 17.4358 5.83333C16.6911 7.60792 15.5313 9.02375 13.9563 10.0808C12.3811 11.1381 10.6353 11.6667 8.71896 11.6667ZM8.71792 10.4167C10.2874 10.4167 11.7283 10.0035 13.0408 9.17708C14.3533 8.35069 15.3568 7.23611 16.0513 5.83333C15.3568 4.43056 14.3533 3.31597 13.0408 2.48958C11.7283 1.66319 10.2874 1.25 8.71792 1.25C7.14847 1.25 5.7075 1.66319 4.395 2.48958C3.0825 3.31597 2.07903 4.43056 1.38458 5.83333C2.07903 7.23611 3.0825 8.35069 4.395 9.17708C5.7075 10.0035 7.14847 10.4167 8.71792 10.4167Z" fill="currentColor"/></svg>',eyeOffIcon='<svg class="icon" width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.8621 8.15687L10.9263 7.22104C11.0513 6.5309 10.8544 5.91042 10.3356 5.35958C9.81702 4.80889 9.18056 4.59604 8.42625 4.72104L7.49042 3.78521C7.67847 3.70076 7.87132 3.63743 8.06896 3.59521C8.2666 3.55299 8.48292 3.53187 8.71792 3.53187C9.66347 3.53187 10.4661 3.86174 11.1258 4.52146C11.7856 5.18118 12.1154 5.98382 12.1154 6.92937C12.1154 7.16437 12.0943 7.3834 12.0521 7.58646C12.0099 7.78938 11.9465 7.97951 11.8621 8.15687ZM14.5127 10.7498L13.5929 9.88771C14.1207 9.48493 14.5894 9.04396 14.9992 8.56479C15.4089 8.08562 15.7596 7.54049 16.0513 6.92937C15.3568 5.5266 14.3603 4.41201 13.0617 3.58562C11.7631 2.75924 10.3151 2.34604 8.71792 2.34604C8.31514 2.34604 7.91931 2.37382 7.53042 2.42937C7.14153 2.48493 6.75958 2.56826 6.38458 2.67937L5.41354 1.70833C5.94021 1.49889 6.47813 1.34451 7.02729 1.24521C7.57646 1.14576 8.14 1.09604 8.71792 1.09604C10.6708 1.09604 12.432 1.63451 14.0015 2.71146C15.5709 3.7884 16.7157 5.19437 17.4358 6.92937C17.1271 7.67396 16.7283 8.36896 16.2396 9.01437C15.7507 9.65965 15.1751 10.2381 14.5127 10.7498ZM15.1858 15.5704L11.8142 12.2242C11.3868 12.3824 10.9132 12.5117 10.3933 12.6121C9.87361 12.7125 9.31514 12.7627 8.71792 12.7627C6.75958 12.7627 4.9984 12.2242 3.43438 11.1473C1.87021 10.0703 0.725417 8.66437 0 6.92937C0.307639 6.19326 0.705069 5.5066 1.19229 4.86937C1.67951 4.23201 2.21583 3.67937 2.80125 3.21146L0.493542 0.878124L1.37188 0L16.064 14.6921L15.1858 15.5704ZM3.67958 4.08958C3.23931 4.44 2.81111 4.86125 2.395 5.35333C1.97889 5.84528 1.64208 6.37062 1.38458 6.92937C2.07903 8.33215 3.07556 9.44674 4.37417 10.2731C5.67278 11.0995 7.1207 11.5127 8.71792 11.5127C9.09722 11.5127 9.47493 11.4806 9.85104 11.4165C10.227 11.3524 10.5459 11.2862 10.8077 11.2179L9.75313 10.1377C9.61104 10.1953 9.44653 10.2412 9.25958 10.2754C9.07264 10.3097 8.89208 10.3269 8.71792 10.3269C7.77236 10.3269 6.96972 9.99701 6.31 9.33729C5.65028 8.67757 5.32042 7.87493 5.32042 6.92937C5.32042 6.76062 5.33757 6.5841 5.37188 6.39979C5.40604 6.21549 5.45194 6.04694 5.50958 5.89417L3.67958 4.08958Z" fill="currentColor"/></svg>';togglePasswordButton.addEventListener("click",function(){passwordInput.type==="password"?(passwordInput.type="text",togglePasswordButton.setAttribute("aria-label","\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u975E\u8868\u793A"),togglePasswordButton.innerHTML=eyeOffIcon):(passwordInput.type="password",togglePasswordButton.setAttribute("aria-label","\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u8868\u793A"),togglePasswordButton.innerHTML=eyeIcon)})}}),document.addEventListener("DOMContentLoaded",function(){const searchInput=document.querySelector(".search-bar__input.custom-search-bar__input");searchInput&&(searchInput.addEventListener("focus",function(){setTimeout(function(){document.documentElement.classList.remove("is-locked")},0)}),searchInput.addEventListener("blur",function(){setTimeout(function(){document.documentElement.classList.remove("is-locked")},0)}))}),document.addEventListener("DOMContentLoaded",function(){const form=document.querySelector(".custom-section-sli
1de .custom-section-slide__search-form");if(!form)return;const input=form.querySelector('[name="q"]'),searchResults=form.querySelector(".search-bar__results"),resultsInner=form.querySelector(".search-bar__results-inner"),menuWrapper=form.querySelector(".search-bar__menu-wrapper");if(!input||!searchResults||!resultsInner)return;function supportsPredictiveApi(){try{var el=document.getElementById("shopify-features");return el&&JSON.parse(el.innerHTML).predictiveSearch}catch{return!1}}function closePanel(){form.classList.remove("is-expanded","is-loading"),searchResults&&searchResults.setAttribute("aria-hidden","true"),menuWrapper&&menuWrapper.setAttribute("aria-hidden","true"),input.classList.remove("is-filled")}function onInputFocus(){form.classList.add("is-expanded");var value=(input.value||"").trim();value===""?(menuWrapper&&menuWrapper.setAttribute("aria-hidden","false"),searchResults.setAttribute("aria-hidden","true")):(menuWrapper&&menuWrapper.setAttribute("aria-hidden","true"),searchResults.setAttribute("aria-hidden","false"),input.classList.add("is-filled"))}function doSearch(){var currentValue=(input.value||"").trim();if(currentValue===""){menuWrapper&&menuWrapper.setAttribute("aria-hidden","false"),searchResults.setAttribute("aria-hidden","true"),input.classList.remove("is-filled");return}menuWrapper&&menuWrapper.setAttribute("aria-hidden","true"),searchResults.setAttribute("aria-hidden","false"),input.classList.add("is-filled"),form.classList.add("is-loading");var url=buildPredictiveSearchSectionUrl(currentValue,supportsPredictiveApi());fetch(url,{method:"GET",credentials:"same-origin"}).then(function(res){return res.text()}).then(function(html){if((input.value||"").trim()===currentValue){var doc=new DOMParser().parseFromString(html,"text/html"),searchAjax=doc.querySelector(".search-ajax");if(searchAjax){resultsInner.replaceChildren();var viewAll=searchAjax.querySelector(".search-bar__view-all");Array.prototype.forEach.call(searchAjax.childNodes,function(node){node!==viewAll&&resultsInner.appendChild(document.importNode(node,!0))}),viewAll&&resultsInner.appendChild(document.importNode(viewAll,!0))}}}).catch(function(){}).then(function(){form.classList.remove("is-loading")})}function debounce(fn,delay){var timer=null;return function(){clearTimeout(timer);var self=this,args=arguments;timer=setTimeout(function(){fn.apply(self,args)},delay)}}input.addEventListener("focus",onInputFocus),input.addEventListener("input",debounce(doSearch,250)),document.addEventListener("click",function(e){form.contains(e.target)||closePanel()})}),document.addEventListener("DOMContentLoaded",function(){const noteLabelIcon=document.querySelector(".custom-cart-recap__note-label-icon"),fukidashi=document.querySelector(".custom-cart-recap__note-label-icon-fukidashi"),closeButton=document.querySelector(".custom-cart-recap__note-label-icon-fukidashi-close");if(!noteLabelIcon||!fukidashi)return;function openFukidashi(){fukidashi.classList.add("is-open"),noteLabelIcon.classList.add("is-open")}function closeFukidashi(){fukidashi.classList.remove("is-open"),noteLabelIcon.classList.remove("is-open")}noteLabelIcon.addEventListener("click",function(e){e.stopPropagation(),fukidashi.classList.contains("is-open")?closeFukidashi():openFukidashi()}),closeButton&&closeButton.addEventListener("click",function(e){e.stopPropagation(),closeFukidashi()}),fukidashi.addEventListener("click",function(e){e.stopPropagation()}),document.addEventListener("click",function(e){if(!fukidashi.classList.contains("is-open"))return;const clickedInsideFukidashi=fukidashi.contains(e.target),clickedOnIcon=noteLabelIcon.contains(e.target);!clickedInsideFukidashi&&!clickedOnIcon&&closeFukidashi()})}),document.addEventListener("DOMContentLoaded",function(){const orderNote=document.getElementById("order-note");if(!orderNote)return;function getFocusables(){return orderNote.querySelectorAll('.custom-cart-recap__note-label-icon, .custom-cart-recap__note-label-icon-fukidashi-close, textarea[name="note"]')}function syncOrderNoteFocusable(){const hidden=orderNote.getAttribute("aria-hidden")==="true";
1getFocusables().forEach(function(el){hidden?el.setAttribute("tabindex","-1"):el.removeAttribute("tabindex")})}syncOrderNoteFocusable(),new MutationObserver(function(){syncOrderNoteFocusable()}).observe(orderNote,{attributes:!0,attributeFilter:["aria-hidden"]})}),(function(){var CART_NOTE_RESIZE_KEY="_cartNoteResizeInit";function initCartNoteResize(){var wrapper=document.querySelector(".custom-cart-recap__note-textarea-wrapper");if(!wrapper||wrapper[CART_NOTE_RESIZE_KEY])return;wrapper[CART_NOTE_RESIZE_KEY]=!0;var textarea=wrapper.querySelector('textarea[name="note"]');if(!textarea)return;var MIN_HEIGHT=87,RESIZE_STEP=40,RESIZE_STRIP_PX=8;function clientYInResizeStrip(targetEl,clientY){var rect=targetEl.getBoundingClientRect();return clientY>=rect.bottom-RESIZE_STRIP_PX&&clientY<=rect.bottom}function resizeTextarea(delta){var currentHeight=textarea.style.height?parseInt(textarea.style.height,10):textarea.offsetHeight,newHeight=Math.max(MIN_HEIGHT,currentHeight+delta);textarea.style.height=newHeight+"px"}function setTextareaHeight(height){var newHeight=Math.max(MIN_HEIGHT,height);textarea.style.height=newHeight+"px"}textarea.addEventListener("keydown",function(event){event.altKey&&(event.key==="ArrowDown"?(event.preventDefault(),resizeTextarea(RESIZE_STEP)):event.key==="ArrowUp"&&(event.preventDefault(),resizeTextarea(-RESIZE_STEP)))});var isDragging=!1,activePointerId=null,startY=0,startHeight=0;function endDrag(){isDragging&&(isDragging=!1,activePointerId=null,document.body.style.cursor="",document.body.style.userSelect="")}function applyPointerMove(e){if(!(!isDragging||e.pointerId!==activePointerId)){var deltaY=e.clientY-startY,newHeight=startHeight+deltaY;setTextareaHeight(newHeight)}}wrapper.addEventListener("pointerdown",function(e){if(!(e.pointerType==="mouse"&&e.button!==0)&&clientYInResizeStrip(wrapper,e.clientY)){e.preventDefault(),isDragging=!0,activePointerId=e.pointerId,startY=e.clientY,startHeight=textarea.style.height?parseInt(textarea.style.height,10):textarea.offsetHeight,document.body.style.cursor="ns-resize",document.body.style.userSelect="none";try{wrapper.setPointerCapture(e.pointerId)}catch{}}},!0),wrapper.addEventListener("pointermove",function(e){applyPointerMove(e)});function finishPointerDrag(e){if(!(!isDragging||e.pointerId!==activePointerId)){try{wrapper.releasePointerCapture(e.pointerId)}catch{}endDrag()}}wrapper.addEventListener("pointerup",finishPointerDrag),wrapper.addEventListener("pointercancel",finishPointerDrag),wrapper.addEventListener("lostpointercapture",endDrag)}function reinitCartNoteResize(){var wrapper=document.querySelector(".custom-cart-recap__note-textarea-wrapper");wrapper&&(wrapper[CART_NOTE_RESIZE_KEY]=!1),initCartNoteResize()}document.addEventListener("DOMContentLoaded",initCartNoteResize),window.addEventListener("pageshow",function(e){e.persisted&&reinitCartNoteResize()}),document.addEventListener("cart:rerendered",reinitCartNoteResize)})(),document.addEventListener("DOMContentLoaded",function(){const textareaWrappers=document.querySelectorAll(".custom-contact__textarea-wrapper");if(textareaWrappers.length===0)return;const MIN_HEIGHT=80,RESIZE_STEP=40;textareaWrappers.forEach(function(wrapper){const textarea=wrapper.querySelector("[data-textarea]");if(!textarea)return;const resizeHandle=wrapper.querySelector("[data-resize-handle]"),resizeTextarea=function(delta){const currentHeight=wrapper.style.height?parseInt(wrapper.style.height):wrapper.offsetHeight,newHeight=Math.max(MIN_HEIGHT,currentHeight+delta);wrapper.style.height=newHeight+"px"},setTextareaHeight=function(height){const newHeight=Math.max(MIN_HEIGHT,height);wrapper.style.height=newHeight+"px"};if(textarea.addEventListener("keydown",function(event){event.altKey&&(event.key==="ArrowDown"?(event.preventDefault(),resizeTextarea(RESIZE_STEP)):event.key==="ArrowUp"&&(event.preventDefault(),resizeTextarea(-RESIZE_STEP)))}),resizeHandle){let isDragging=!1,startY=0,startHeight=0;resizeHandle.addEventListener("mousedown",function(e){isDragging=!0,startY=e.clientY,startHeight=wrapper.style.height?parseInt(wrapper.style.height):wrapper.offsetHeight,e.preventDefault(),document.body.style.cursor="ns-resize",document.body.style.userSelect="none"}),document.addEventListener("mousemove",function(e){if(!isDragging)return;const deltaY=e.clientY-startY,newHeight=startHeight+deltaY;setTextareaHeight(newHeight)}),document.addEventListener("mouseup",function(){isDragging&&(isDragging=!1,document.body.style.cursor="",document.body.style.userSelect="")}),resizeHandle.addEventListener("touchstart",function(e){isDragging=!0,startY=e.touches[0].clientY,startHeight=wrapper.style.height?parseInt(wrapper.style.height):wrapper.offsetHeight,e.preventDefault()}),document.addEventListener("touchmove",function(e){if(!isDragging)return;const deltaY=e.touches[0].clientY-startY,newHeight=startHeight+deltaY;setTextareaHeight(newHeight),e.preventDefault()}),document.addEventListener("touchend",function(){isDragging&&(isDragging=!1)})}})}),document.addEventListener("DOMContentLoaded",function(){function clientYInPtwResizeStrip(wrapper,clientY){var rect=wrapper.getBoundingClientRect();return clientY>=rect.bottom-8&&clientY<=rect.bottom}function initPtwMessageNoteResize(wrapper){if(wrapper.dataset.ptw
1MessageNoteResizeInit)return;var textarea=wrapper.querySelector("#ptw-text-message");if(!textarea)return;wrapper.dataset.ptwMessageNoteResizeInit="1";var resizeTextarea=function(delta){var currentHeight=wrapper.style.height?parseInt(wrapper.style.height,10):wrapper.offsetHeight,newHeight=Math.max(88,currentHeight+delta);wrapper.style.height=newHeight+"px"},setTextareaHeight=function(height){var newHeight=Math.max(88,height);wrapper.style.height=newHeight+"px"};textarea.addEventListener("keydown",function(event){event.altKey&&(event.key==="ArrowDown"?(event.preventDefault(),resizeTextarea(40)):event.key==="ArrowUp"&&(event.preventDefault(),resizeTextarea(-40)))});var isDragging=!1,activePointerId=null,startY=0,startHeight=0;function endDrag(){isDragging&&(isDragging=!1,activePointerId=null,document.body.style.cursor="",document.body.style.userSelect="")}function applyPointerMove(e){if(!(!isDragging||e.pointerId!==activePointerId)){var deltaY=e.clientY-startY,newHeight=startHeight+deltaY;setTextareaHeight(newHeight)}}wrapper.addEventListener("pointerdown",function(e){if(!(e.pointerType==="mouse"&&e.button!==0)&&clientYInPtwResizeStrip(wrapper,e.clientY)){e.preventDefault(),isDragging=!0,activePointerId=e.pointerId,startY=e.clientY,startHeight=wrapper.style.height?parseInt(wrapper.style.height,10):wrapper.offsetHeight,document.body.style.cursor="ns-resize",document.body.style.userSelect="none";try{wrapper.setPointerCapture(e.pointerId)}catch{}}},!0),wrapper.addEventListener("pointermove",function(e){applyPointerMove(e)});function finishPointerDrag(e){if(!(!isDragging||e.pointerId!==activePointerId)){try{wrapper.releasePointerCapture(e.pointerId)}catch{}endDrag()}}wrapper.addEventListener("pointerup",finishPointerDrag),wrapper.addEventListener("pointercancel",finishPointerDrag),wrapper.addEventListener("lostpointercapture",endDrag)}function scanPtwMessageNotes(root){root.querySelectorAll(".ptw-message-note").forEach(function(el){initPtwMessageNoteResize(el)})}var giftWrapRoot=document.querySelector("#gift-wrap");if(giftWrapRoot){scanPtwMessageNotes(giftWrapRoot);var mo=new MutationObserver(function(){scanPtwMessageNotes(giftWrapRoot)});mo.observe(giftWrapRoot,{childList:!0,subtree:!0})}}),document.addEventListener("click",function(e){if(e.target.closest(".custom-back-page__link"))return e.preventDefault(),e.stopImmediatePropagation(),window.history.length>1?window.history.back():window.location.href="/",!1},!0);function clampByLines(element,lines){element.dataset.originalText||(element.dataset.originalText=element.textContent,element.setAttribute("aria-label",element.textContent));const originalText=element.dataset.originalText;element.textContent=originalText,element.setAttribute("aria-label",originalText);const style=window.getComputedStyle(element);let lineHeight;if(element.dataset.lineHeight){const customLineHeight=parseFloat(element.dataset.lineHeight);!isNaN(customLineHeight)&&customLineHeight>0&&(lineHeight=customLineHeight)}lineHeight||(lineHeight=parseFloat(style.lineHeight)),(isNaN(lineHeight)||lineHeight===0)&&(lineHeight=parseFloat(style.fontSize)*1.1);const testText="A";element.textContent=testText;const singleLineHeight=element.scrollHeight,paddingTop=parseFloat(style.paddingTop)||0,paddingBottom=parseFloat(style.paddingBottom)||0,maxHeight=(singleLineHeight-paddingTop-paddingBottom)*lines+paddingTop+paddingBottom;if(element.textContent=originalText,element.scrollHeight<=maxHeight){element.textContent=originalText,element.setAttribute("aria-label",originalText);return}let low=0,high=originalText.length,truncated=originalText;for(;low<=high;){const mid=Math.floor((low+high)/2);element.textContent=originalText.slice(0,mid)+'\u2026"',element.scrollHeight>maxHeight?high=mid-1:(truncated=element.textContent,low=mid+1)}element.textContent=truncated,element.setAttribute("aria-label",originalText)}function applyLineClamp(){document.querySelectorAll(".js-line-clamp").forEach(el=>{const lines=window.innerWidth>=768?2:3;el.dataset.originalText&&(el.textContent=el.dataset.originalText,el.setAttribute("aria-label",el.dataset.originalText)),clampByLines(el,lines)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",applyLineClamp):applyLineClamp();let resizeTimer;window.addEventListener("resize",()=>{clearTimeout(resizeTimer),resizeTimer=setTimeout(()=>{applyLineClamp()},100)}),document.addEventListener("DOMContentLoaded",function(){const giftWrapCheckbox=document.getElementById("gift-wrap-checkbox"),giftWrapHidden=document.getElementById("gift-wrap-hidden");if(giftWrapCheckbox&&giftWrapHidden){giftWrapCheckbox.addEventListener("change",function(){giftWrapHidden.value=this.checked?"true":""});const cartForm=document.getElementById("cart-recap-form");cartForm&&cartForm.addEventListener("submit",function(){giftWrapHidden.value=giftWrapCheckbox.checked?"true":""})}}),document.addEventListener("DOMContentLoaded",function(){const headerSearchInput=document.querySelector(".header__search-bar-wrapper .search-bar__input.custom-search-bar__input");headerSearchInput&&headerSearchInput.addEventListener("keydown",function(event){event.key==="Tab"&&event.stopPropagation()})}),document.addEventListener("DOMContentLoaded",function(){function updateCartAriaLabel(){const cartLink=document.querySelector(".custom-header__cart-toggle, .header__cart-toggle"),cartCountElement2=document.querySelector(".custom-header__cart-count, .header__cart-count");if(!cartLink||!cartCountElement2)return;let itemCount=0;
1if(cartCountElement2.hasAttribute("data-actual-count"))itemCount=parseInt(cartCountElement2.getAttribute("data-actual-count"))||0;else{const text=cartCountElement2.textContent.trim(),parsedCount=parseInt(text);if(!isNaN(parsedCount))itemCount=parsedCount;else if(text==="99+"){const miniCart=document.getElementById("mini-cart");if(miniCart&&miniCart.getAttribute("data-item-count"))itemCount=parseInt(miniCart.getAttribute("data-item-count"))||0;else{const cartSection=document.querySelector('[data-section-type="cart"]');cartSection&&cartSection.getAttribute("data-item-count")&&(itemCount=parseInt(cartSection.getAttribute("data-item-count"))||0)}}}const cartLabel=cartLink.getAttribute("data-cart-label")||"\u30AB\u30FC\u30C8",cartEmpty=cartLink.getAttribute("data-cart-empty")||"\u30AB\u30FC\u30C8\u306F\u7A7A\u3067\u3059",itemsCount=cartLink.getAttribute("data-cart-items-count")||"\u500B\u306E\u5546\u54C1";itemCount===0?cartLink.setAttribute("aria-label",cartLabel+" ("+cartEmpty+")"):cartLink.setAttribute("aria-label",cartLabel+" "+itemCount+" "+itemsCount)}document.addEventListener("cart:rerendered",function(){updateCartAriaLabel()});const cartCountElement=document.querySelector(".custom-header__cart-count, .header__cart-count");cartCountElement&&(new MutationObserver(function(mutations){mutations.forEach(function(mutation){(mutation.type==="childList"||mutation.type==="characterData")&&updateCartAriaLabel()})}).observe(cartCountElement,{childList:!0,characterData:!0,subtree:!0}),updateCartAriaLabel());function formatCartCount(element){if(!element)return;const text=element.textContent.trim(),count=parseInt(text);!isNaN(count)&&count>=100?(element.textContent="99+",element.classList.add("custom-header__cart-count--over"),element.setAttribute("data-actual-count",count)):text==="99+"?(element.classList.add("custom-header__cart-count--over"),element.hasAttribute("data-actual-count")||element.setAttribute("data-actual-count","100")):!isNaN(count)&&count<100?(element.classList.remove("custom-header__cart-count--over"),element.setAttribute("data-actual-count",count)):(element.classList.remove("custom-header__cart-count--over"),element.removeAttribute("data-actual-count"))}function formatCartCountElement(){const cartCountElement2=document.querySelector(".header__cart-count.custom-header__cart-count, .custom-header__cart-count, .header__cart-count");cartCountElement2&&formatCartCount(cartCountElement2)}let cartCountObserver=null;function initCartCountFormatter(){const cartCountElement2=document.querySelector(".header__cart-count.custom-header__cart-count, .custom-header__cart-count, .header__cart-count");cartCountElement2&&(cartCountObserver&&cartCountObserver.disconnect(),formatCartCount(cartCountElement2),cartCountObserver=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(mutation.type==="childList"||mutation.type==="characterData"){const newText=cartCountElement2.textContent.trim(),newCount=parseInt(newText);isNaN(newCount)||cartCountElement2.setAttribute("data-actual-count",newCount),formatCartCount(cartCountElement2)}})}),cartCountObserver.observe(cartCountElement2,{childList:!0,characterData:!0,subtree:!0}))}initCartCountFormatter(),document.addEventListener("cart:rerendered",function(){formatCartCountElement(),setTimeout(initCartCountFormatter,50)})}),document.addEventListener("DOMContentLoaded",function(){const skipLink=document.querySelector('.skip-to-content[href="#main"]'),main=document.getElementById("main");!skipLink||!main||(main.hasAttribute("tabindex")||main.setAttribute("tabindex","-1"),skipLink.addEventListener("click",function(event){event.preventDefault(),main.focus()}))}),document.addEventListener("DOMContentLoaded",function(){const miniCart=document.getElementById("mini-cart"),toggle=d
1ocument.querySelector('.header__cart-toggle[aria-controls="mini-cart"]'),main=document.getElementById("main");if(!miniCart||!toggle)return;let lastFocused=null;function isOpenMiniCart(){return miniCart.getAttribute("aria-hidden")==="false"}function openMiniCartA11y(){lastFocused=document.activeElement,main&&main.setAttribute("aria-hidden","true"),miniCart.hasAttribute("tabindex")||miniCart.setAttribute("tabindex","-1"),miniCart.focus()}function closeMiniCartA11y(){main&&main.removeAttribute("aria-hidden");const fallback=toggle,target=lastFocused&&document.contains(lastFocused)?lastFocused:fallback;target&&target.focus()}new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.type!=="attributes"||mutation.attributeName!=="aria-hidden"||(isOpenMiniCart()?openMiniCartA11y():closeMiniCartA11y())})}).observe(miniCart,{attributes:!0,attributeFilter:["aria-hidden"]}),document.addEventListener("keydown",function(event){event.key==="Escape"&&isOpenMiniCart()&&(event.preventDefault(),toggle.click())})});function removeAriaExpandedFromCartIcon(){const cartIcon=document.querySelector(".header__cart-icon");if(!cartIcon)return;cartIcon.removeAttribute("aria-expanded"),new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.attributeName==="aria-expanded"&&cartIcon.removeAttribute("aria-expanded")})}).observe(cartIcon,{attributes:!0,attributeFilter:["aria-expanded"]})}document.addEventListener("DOMContentLoaded",removeAriaExpandedFromCartIcon),document.addEventListener("cart:rerendered",function(){setTimeout(removeAriaExpandedFromCartIcon,100)});function isVisuallyAvailable(element){if(!element||!element.isConnected)return!1;const style=window.getComputedStyle(element);return!(style.display==="none"||style.visibility==="hidden"||element.getClientRects().length===0)}function updateSplideControlsA11y(){const splides=document.querySelectorAll(".splide");splides.length&&splides.forEach(function(splide){const arrows=splide.querySelectorAll(".splide__arrow"),pages=splide.querySelectorAll(".splide__pagination__page");arrows.forEach(function(btn){isVisuallyAvailable(btn)&&!btn.disabled&&btn.getAttribute("aria-disabled")!=="true"?(btn.removeAttribute("aria-hidden"),btn.removeAttribute("tabindex")):(btn.setAttribute("aria-hidden","true"),btn.setAttribute("tabindex","-1"))}),pages.forEach(function(btn){isVisuallyAvailable(btn)&&!btn.disabled&&btn.getAttribute("aria-disabled")!=="true"?(btn.removeAttribute("aria-hidden"),btn.removeAttribute("tabindex")):(btn.setAttribute("aria-hidden","true"),btn.setAttribute("tabindex","-1"))})})}function initSplideControlsA11y(){let timer=null;function schedule(){timer||(timer=window.setTimeout(function(){timer=null,updateSplideControlsA11y()},0))}schedule(),window.setTimeout(schedule,50),window.setTimeout(schedule,250),window.addEventListener("resize",schedule),document.addEventListener("click",function(event){const target=event.target;target&&target.closest(".splide")&&schedule()}),new MutationObserver(function(){schedule()}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","aria-hidden","aria-disabled","disabled"]})}document.addEventListener("DOMContentLoaded",initSplideControlsA11y),document.addEventListener("DOMContentLoaded",function(){document.addEventListener("click",function(event){const btn=event.target.closest('[data-action="change-layout"]');if(!btn)return;const container=btn.closest(".collection__toolbar-item--layout");container&&setTimeout(function(){container.querySelectorAll(".collection__layout-button").forEach(function(b){b.setAttribute("aria-pressed",b.classList.contains("is-selected")?"true":"false")})},0)})}),(function(){function setCookie(name,value,days){var expires="";if(days){var date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3),expires="; expires="+date.toUTCString()}document.cookie=name+"="+(value||"")+expires+"; path=/; SameSite=Lax"}function getCookie(name){for(var nameEQ=name+"=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){for(var c=ca[i];c.charAt(0)===" ";)c=c.substring(1,c.length);if(c.indexOf(nameEQ)===0)return c.substring(nameEQ.length,c.length)}return null}function getFocusableElements(container){var focusableSelectors=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not
1([tabindex="-1"])'];return Array.from(container.querySelectorAll(focusableSelectors.join(", ")))}function trapFocus(container,event){var focusableElements=getFocusableElements(container);if(focusableElements.length!==0){var firstElement=focusableElements[0],lastElement=focusableElements[focusableElements.length-1];event.key==="Tab"&&(event.shiftKey?document.activeElement===firstElement&&(event.preventDefault(),lastElement.focus()):document.activeElement===lastElement&&(event.preventDefault(),firstElement.focus()))}}function initAdultVerificationModal(){var modal=document.getElementById("custom-adult-verification-modal");if(!modal)return;var dialog=modal.querySelector('[role="dialog"]');if(!dialog)return;if(getCookie("adult_verified")==="true"){modal.style.display="none",modal.setAttribute("aria-hidden","true");var ageConfirmWrap=document.querySelector(".custom-form__age-confirm-tooltip-wrap");ageConfirmWrap&&(ageConfirmWrap.style.display="none");var ageConfirmCheckbox=document.getElementById("AgeConfirm");ageConfirmCheckbox&&(ageConfirmCheckbox.checked=!0);return}var trapFocusHandler=null,escapeKeyHandler=null,previousActiveElement=null,titleElement=null;function openDialog(){previousActiveElement=document.activeElement,modal.style.display="grid",modal.setAttribute("aria-hidden","false"),setTimeout(function(){var focusableElements=getFocusableElements(dialog);focusableElements.length>0?focusableElements[0].focus():(titleElement=dialog.querySelector("#custom-adult-verification-modal__title"),titleElement&&(titleElement.setAttribute("tabindex","-1"),titleElement.focus()))},0),trapFocusHandler=function(event){trapFocus(dialog,event)},dialog.addEventListener("keydown",trapFocusHandler)}function closeDialog(){setCookie("adult_verified","true",14),trapFocusHandler&&(dialog.removeEventListener("keydown",trapFocusHandler),trapFocusHandler=null),escapeKeyHandler&&(document.removeEventListener("keydown",escapeKeyHandler),escapeKeyHandler=null),titleElement&&titleElement.hasAttribute("tabindex")&&titleElement.removeAttribute("tabindex"),modal.style.display="none",modal.setAttribute("aria-hidden","true"),previousActiveElement&&previousActiveElement!==document.body&&document.body.contains(previousActiveElement)?previousActiveElement.focus():document.body.focus()}escapeKeyHandler=function(event){event.key==="Escape"&&modal.getAttribute("aria-hidden")==="false"&&window.history.back()};var continueBtn=modal.querySelector('[data-action="continue"]'),exitBtn=modal.querySelector('[data-action="exit"]');continueBtn&&continueBtn.addEventListener("click",function(){closeDialog()}),exitBtn&&exitBtn.addEventListener("click",function(){window.history.back()}),document.addEventListener("keydown",escapeKeyHandler),openDialog()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initAdultVerificationModal):initAdultVerificationModal()})(),(function(){function applyCollectionProductsCount(section){if(section){var scriptEl=section.querySelector("[data-collection-products-count]");if(scriptEl){var data;try{data=JSON.parse(scriptEl.textContent.trim())}catch{return}var totalEl=section.querySelector(".collection__products-count-total");totalEl&&data.productsCount!=null&&(totalEl.textContent=data.productsCount);var showingEl=section.querySelector(".collection__products-count-showing");showingEl&&data.showingCount!=null&&(showingEl.textContent=data.showingCount)}}}function syncAllCollectionProductsCounts(){document.querySelectorAll('[data-section-type="collection"]').forEach(applyCollectionProductsCount)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",syncAllCollectionProductsCounts):syncAllCollectionProductsCounts(),document.addEventListener("theme:loading:end",syncAllCollectionProductsCounts)})(),(function(){var PART_SELECTOR=".custom-collection__dynamic-part",LIST_ITEM_SELECTOR=".product-item.product-item--list",LAYOUT_BUTTON_SELECTOR='[data-action="change-layout"]',WIDTH_VAR="--custom-product-item-list-width",HEIGHT_VAR="--custom-product-item-list-height",boundParts=new WeakSet,resizeObserver=null,mutationObservers=[];function setListItemSizeVars(item){item.style.setProperty(WIDTH_VAR,item.offsetWidth+"px"),item.style.setProperty(HEIGHT_VAR,item.offsetHeight+"px")}function observeListItems(part){window.ResizeObserver&&(resizeObserver||(resizeObserver=new ResizeObserver(function(entries){entries.forEac
1h(function(entry){setListItemSizeVars(entry.target)})})),part.querySelectorAll(LIST_ITEM_SELECTOR).forEach(function(item){resizeObserver.observe(item),setListItemSizeVars(item)}))}function syncPart(part){part.querySelectorAll(LIST_ITEM_SELECTOR).forEach(setListItemSizeVars)}function scheduleResyncAfterLayoutChange(part){requestAnimationFrame(function(){requestAnimationFrame(function(){observeListItems(part),syncPart(part)})})}function bindPart(part){if(boundParts.has(part)){syncPart(part),observeListItems(part);return}boundParts.add(part),syncPart(part),observeListItems(part);var mutationObserver=new MutationObserver(function(){observeListItems(part),syncPart(part)});mutationObserver.observe(part,{childList:!0,subtree:!0}),mutationObservers.push(mutationObserver),part.addEventListener("click",function(event){var trigger=event.target&&event.target.closest?event.target.closest(LAYOUT_BUTTON_SELECTOR):null;!trigger||!part.contains(trigger)||scheduleResyncAfterLayoutChange(part)})}function init(){document.querySelectorAll(PART_SELECTOR).forEach(bindPart)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init(),document.addEventListener("theme:loading:end",init),window.addEventListener("resize",init)})(),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".js-google-preview").forEach(block=>{const setAttributes=()=>{block.querySelectorAll('a[href*="books.google.com"]').forEach(link=>{link.setAttribute("target","_blank"),link.setAttribute("rel","noopener")})};setAttributes(),new MutationObserver(setAttributes).observe(block,{childList:!0,subtree:!0})})}),(function(){function getCartForm(){return document.getElementById("cart-recap-form")}function getNoteTextarea(form){return form?form.querySelector('textarea[name="note"]'):null}function persistCartNote(form){const textarea=getNoteTextarea(form);return!textarea||!window.routes||!window.routes.cartUrl?Promise.resolve():fetch(window.routes.cartUrl+"/update.js",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({note:textarea.value})})}function bindCartNotePersistence(){const form=getCartForm();if(!form||form.dataset.orderNotePersistBound==="true"||!getNoteTextarea(form))return;form.dataset.orderNotePersistBound="true";const textarea=getNoteTextarea(form);let saveTimer=null;const saveSoon=function(){clearTimeout(saveTimer),saveTimer=setTimeout(function(){persistCartNote(form).catch(function(){})},400)};textarea.addEventListener("input",saveSoon),textarea.addEventListener("blur",function(){clearTimeout(saveTimer),persistCartNote(form).catch(function(){})}),form.addEventListener("submit",function(event){if(form.dataset.orderNoteReady==="true"){form.dataset.orderNoteReady="false";return}const submitter=event.submitter;!submitter||submitter.name!=="checkout"||(event.preventDefault(),event.stopPropagation(),clearTimeout(saveTimer),persistCartNote(form).catch(function(){}).finally(function(){form.dataset.orderNoteReady="true",typeof form.requestSubmit=="function"?form.requestSubmit(submitter):form.submit()}))},!0)}function initCartNotePersistence(){bindCartNotePersistence()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initCartNotePersistence):initCartNotePersistence(),document.addEventListener("cart:rerendered",initCartNotePersistence)})(); 2//# sourceMappingURL=/cdn/shop/t/2/assets/custom.js.map?v=92256431178820491641784290112
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.