PageSourceSearch

https://us.bryanferry.com/cdn/shop/t/5/assets/app.js?v=77767426121647741861773410185

js bryanferry.com collected 2026-10-02 06:14:44 UTC 22,824 bytes, 2 lines download raw bytes

1function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}var dispatchCustomEvent=function(eventName){var data=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},detail={detail:data},event=new CustomEvent(eventName,data?detail:null);document.dispatchEvent(event)};window.recentlyViewedIds=[];const FETCH_CONFIG={method:"POST",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/javascript"}},OverlayManager={stack:[],beforeCloseHandlers:new Map,cc:null,getCC(){return this.cc||(this.cc=document.querySelector(".click-capture")),this.cc},updateCCZIndex(){let cc=this.getCC();if(cc)if(this.stack.length>1){let topPanel=this.stack[this.stack.length-1],topZ=parseInt(getComputedStyle(topPanel).zIndex,10)||90;cc.style.zIndex=topZ-1}else cc.style.zIndex=""},open(panel){if(!panel)return;const index=this.stack.indexOf(panel);index>-1&&this.stack.splice(index,1),this.stack.push(panel),panel.classList.add("active"),panel.inert=!1,document.body.classList.add("open-cc"),this.updateCCZIndex(),panel.querySelector(".side-panel-close")?.focus(),dispatchCustomEvent("panel:open",{panel})},close(panel){if(!panel)return;const index=this.stack.indexOf(panel);index>-1&&this.stack.splice(index,1),this.stack.length||document.body.classList.remove("open-cc"),this.updateCCZIndex(),panel.classList.remove("active"),panel.inert=!0,dispatchCustomEvent("panel:closed",{panel});const handler=this.beforeCloseHandlers.get(panel);handler&&handler()},closeLast(){const panel=this.stack[this.stack.length-1];panel&&this.close(panel)},registerBeforeClose(panel,handler){this.beforeCloseHandlers.set(panel,handler)},closeAll(){for(;this.stack.length;)this.closeLast()},isOpen(panel){return this.stack.includes(panel)},hasOpen(){return this.stack.length>0}};if(!customElements.get("quantity-selector")){class QuantityInput extends HTMLElement{constructor(){super()}connectedCallback(){this.input=this.querySelector(".qty"),this.step=this.input.getAttribute("step"),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.subtract=this.querySelector(".minus"),this.add=this.querySelector(".plus"),this.subtract.addEventListener("click",()=>this.change_quantity(-1*this.step)),this.add.addEventListener("click",()=>this.change_quantity(1*this.step)),this.validateQtyRules(),this.classList.add("buttons_added")}change_quantity(change){let quantity=Number(this.input.value);isNaN(quantity)&&(quantity=1),!(this.input.getAttribute("min")>quantity+change)&&(this.input.getAttribute("max")&&this.input.getAttribute("max")<quantity+change||(quantity+=change,quantity=Math.max(quantity,1),this.input.value=quantity,this.input.dispatchEvent(this.changeEvent),this.validateQtyRules()))}validateQtyRules(){const value=parseInt(this.input.value);if(this.input.min){const min=parseInt(this.input.min);this.subtract.classList.toggle("disabled",value<=min)}if(this.input.max){const max=parseInt(this.input.max);this.add.classList.toggle("disabled",value>=max)}}}customElements.define("quantity-selector",QuantityInput)}if(!customElements.get("product-card")){class ProductCard extends HTMLElement{constructor(){super()}connectedCallback(){this.swatches=this.querySelector(".product-card-swatches"),this.image=this.querySelector(".product-featured-image-link .product-primary-image"),this.additional_images=this.querySelectorAll(".product-secondary-image"),this.additional_images_nav=this.querySelectorAll(".product-secondary-images-nav li"),this.quick_add=this.querySelector(".product-card--add-to-cart-button-simple"),this.swatches&&this.enableSwatches(this.swatches,this.image),this.additional_images&&this.enableAdditionalImages(),this.quick_add&&this.enableQuickAdd()}enableAdditionalImages(){let image_length=this.additional_images.length,images=this.additional_images,nav=this.additional_images_nav,image_container=this.querySelector(".product-featured-image"),cachedWidth=0,currentIndex=-1,rafId=null;const updateHover=e=>{let prc=e.offsetX/cachedWidth,sel=Math.floor(prc*image_length);sel===currentIndex||sel<0||sel>=image_length||(currentIndex>=0&&(images[currentIndex].classList.remove("hover"),nav.length&&nav[currentIndex].classList.remove("active")),currentIndex=sel,images[sel].classList.add("hover"),nav.length&&nav[sel].classList.add("active"))},mousemove=e=>{rafId||(rafId=requestAnimationFrame(()=>{rafId=null,updateHover(e)}))},mouseenter=e=>{cachedWidth=image_container.getBoundingClientRect().width,updateHover(e)},mouseleave=()=>{rafId&&(cancelAnimationFrame(rafId),rafId=null),currentIndex>=0&&(images[currentIndex].classList.remove("hover"),nav.length&&nav[currentIndex].classList.remove("active"),currentIndex=-1)};image_container&&(image_container.addEventListener("touchstart",mouseenter,{passive:!0}),image_container.addEventListener("touchmove",mousemove,{passive:!0}),image_container.addEventListener("touchend",mouseleave,{passive:!0}),image_container.addEventListener("mouseenter",mouseenter,{passive:!0}),image_container.addEventListener("mousemove",mousemove,{passive:!0}),image_container.addEventListener("mouseleave",mouseleave,{passive:!0})),document.readyState==="complete"?images.forEach(function(image){lazySizes.loader.unveil(image)}):window.addEventListener("load",()=>{images.forEach(function(image){lazySizes.loader.unveil(image)})},{once:!0})}enableSwatches(swatches,image){let swatch_list=swatches.querySelectorAll(".product-card-swatch"),org_srcset=image?image.dataset.srcset:"";const unveilSwatches=()=>{swatch_list.forEach(swatch=>{let img=new Image;img.srcset=swatch.dataset.srcset,lazySizes.loader.unveil(img)})};document.readyState==="complete"?unveilSwatches():window.addEventListener("load",unveilSwatches,{once:!0}),swatches.addEventListener("mouseover",e=>{let swatch=e.target.closest(".product-card-swatch");if(!swatch)return;let active=swatches.querySelector(".product-card-swatch.active");active&&active.classList.remove("active"),swatch.classList.add("active"),image&&image.setAttribute("srcset",swatch.dataset.srcset||org_srcset)}),swatches.addEventListener("click",e=>{let swatch=e.target.closest(".product-card-swatch");swatch&&(e.preventDefault(),window.location.href=swatch.dataset.href)})}enableQuickAdd(){this.quick_add.addEventListener("click",this.quickAdd.bind(this))}quickAdd(evt){if(evt.preventDefault(),this.quick_add.disabled)return;this.quick_add.classList.add("loading"),this.quick_add.setAttribute("aria-disabled",!0);let formData=new FormData(this.form);return formData.append("id",this.quick_add.dataset.productId),formData.append("quantity",1),formData.append("sections",this.get
1SectionsToRender().map(section=>section.section)),formData.append("sections_url",window.location.pathname),fetch(`${theme.routes.cart_add_url}`,{...FETCH_CONFIG,body:formData}).then(response=>response.json()).then(response=>{response.status||(this.renderContents(response),dispatchCustomEvent("cart:item-added",{product:response.hasOwnProperty("items")?response.items[0]:response}))}).catch(e=>{console.error(e)}).finally(()=>{this.quick_add.classList.remove("loading"),this.quick_add.removeAttribute("aria-disabled")}),!1}getSectionsToRender(){return[{id:"Cart",section:"main-cart",selector:".thb-cart-form"},{id:"Cart-Drawer",section:"cart-drawer",selector:".cart-drawer"},{id:"cart-drawer-toggle",section:"cart-bubble",selector:".thb-item-count"}]}renderContents(parsedState){this.getSectionsToRender().forEach((section=>{const el=document.getElementById(section.id);if(!el)return;const elementToReplace=el.querySelector(section.selector)||el;elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector),typeof Cart<"u"&&new Cart().renderContents(parsedState)}));let cartDrawer=document.getElementById("Cart-Drawer");if(cartDrawer){let productDrawer=document.getElementById("Product-Drawer");productDrawer&&OverlayManager.isOpen(productDrawer)&&OverlayManager.close(productDrawer),cartDrawer.open()}}getSectionInnerHTML(html,selector=".shopify-section"){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}}customElements.define("product-card",ProductCard)}if(!customElements.get("product-card-small")){class ProductCardSmall extends HTMLElement{constructor(){super(),this.quick_add_enabled=this.classList.contains("quick-add-to-card--true"),this.button=this.querySelector("button"),this.id=this.dataset.id,this.url=this.dataset.url}connectedCallback(){this.quick_add_enabled&&this.setEventListeners()}setEventListeners(){this.button.addEventListener("click",this.addToCart.bind(this))}getSectionsToRender(){return[{id:"Cart",section:"main-cart",selector:".thb-cart-form"},{id:"Cart-Drawer",section:"cart-drawer",selector:".cart-drawer"},{id:"cart-drawer-toggle",section:"cart-bubble",selector:".thb-item-count"}]}addToCart(){this.button.classList.add("loading"),this.quick_add_enabled,this.button.setAttribute("aria-disabled",!0);let formData=new FormData(this.form);formData.append("id",this.id),formData.append("quantity",1),formData.append("sections",this.getSectionsToRender().map(section=>section.section)),formData.append("sections_url",window.location.pathname),fetch(`${theme.routes.cart_add_url}`,{...FETCH_CONFIG,body:formData}).then(response=>response.json()).then(response=>{response.status||(this.renderContents(response),dispatchCustomEvent("cart:item-added",{product:response.hasOwnProperty("items")?response.items[0]:response}))}).catch(e=>{console.error(e)}).finally(()=>{this.button.classList.remove("loading"),this.button.removeAttribute("aria-disabled")})}renderContents(parsedState){this.getSectionsToRender().forEach((section=>{const el=document.getElementById(section.id);if(!el)return;const elementToReplace=el.querySelector(section.selector)||el;elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector),typeof Cart<"u"&&new Cart().renderContents(parsedState)}));let cartDrawer=document.getElementById("Cart-Drawer");if(cartDrawer){let productDrawer=document.getElementById("Product-Drawer");productDrawer&&OverlayManager.isOpen(productDrawer)&&OverlayManager.close(productDrawer),cartDrawer.open()}}getSectionInnerHTML(html,selector=".shopify-section"){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}}customElements.define("product-card-small",ProductCardSmall)}if(!customElements.get("side-panel-close")){class PanelClose extends HTMLElement{connectedCallback(){if(this.addEventListener("click",e=>this.close_panel(e)),!PanelClose._initialized){PanelClose._initialized=!0,document.addEventListener("keyup",e=>{e.code&&e.code.toUpperCase()==="ESCAPE"&&OverlayManager.closeAll()});let cc=document.querySelector(".click-capture");cc&&cc.addEventListener("click",()=>{OverlayManager.closeLast()})}}close_panel(e){e.preventDefault();let panel=e.target.closest(".side-panel");panel&&OverlayManager.close(panel)}}PanelClose._initialized=!1,customElements.define("side-panel-close",PanelClose)}if(!customElements.get("cart-drawer")){class CartDrawer extends HTMLElement{constructor(){super()}connectedCallback(){document.getElementById("cart-drawer-toggle")?.addEventListener("click",e=>{e.preventDefault(),this.open()}),this.debouncedOnChange=debounce(event=>{this.onChange(event)},300),document.addEventListener("cart:refresh",event=>{this.refresh()}),this.addEventListener("change",this.debouncedOnChange.bind(this))}onChange(event){event.target.classList.contains("qty")&&this.updateQuantity(event.target.dataset.index,event.target.value)}getSectionsToRender(){return[{id:"Cart-Drawer",section:"cart-drawer",selector:".cart-drawer"},{id:"cart-drawer-toggle",section:"cart-bubble",selector:".thb-item-count"}]}getSectionInnerHTML(html,selector){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}updateQuantity(line,quantity){this.querySelector(`#CartDrawerItem-${line}`).classList.add("thb-loading");const body=JSON.stringify({line,quantity,sections:this.getSectionsToRender().map(section=>section.section),sections_url:window.location.pathname});dispatchCustomEvent("line-item:change:start",{quantity}
1),fetch(`${theme.routes.cart_change_url}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body}).then(response=>response.text()).then(state=>{const parsedState=JSON.parse(state);this.getSectionsToRender().forEach((section=>{const el=document.getElementById(section.id);if(!el)return;const elementToReplace=el.querySelector(section.selector)||el;parsedState.sections&&(elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector))})),dispatchCustomEvent("line-item:change:end",{quantity,cart:parsedState}),this.querySelector(`#CartDrawerItem-${line}`)?.classList.remove("thb-loading")})}open(){OverlayManager.open(this),dispatchCustomEvent("cart-drawer:open")}refresh(){fetch(`${window.location.pathname}?sections=cart-drawer,cart-bubble`).then(response=>response.text()).then(state=>{const parsedState=JSON.parse(state);this.getSectionsToRender().forEach((section=>{const el=document.getElementById(section.id);if(!el)return;const elementToReplace=el.querySelector(section.selector)||el;elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState[section.section],section.selector)}))})}}customElements.define("cart-drawer",CartDrawer)}if(!customElements.get("custom-select")){class CustomSelect extends HTMLElement{constructor(){super()}connectedCallback(){this.detailsements={form:this.closest("form"),input:this.querySelector("input"),button:this.querySelector(".custom-select--button"),panel:this.querySelector(".custom-select--list")},this.autoClose=this.dataset.autoClose,this.detailsements.button.addEventListener("click",this.toggleSelector.bind(this)),this.detailsements.button.addEventListener("focusout",this.closeSelector.bind(this)),this.addEventListener("keyup",this.onContainerKeyUp.bind(this)),this.detailsements.panel.querySelectorAll("button").forEach(item=>item.addEventListener("click",this.onItemClick.bind(this)))}hidePanel(){this.detailsements.button.setAttribute("aria-expanded","false"),this.classList.remove("custom-select--active")}onContainerKeyUp(event){event.code.toUpperCase()==="ESCAPE"&&(this.hidePanel(),this.detailsements.button.focus())}onItemClick(event){event.preventDefault(),this.detailsements.input.value=event.currentTarget.dataset.value,this.detailsements.input.dispatchEvent(new Event("change")),this.detailsements.button.querySelector(".custom-select--text").textContent=event.currentTarget.textContent,this.detailsements.form&&this.detailsements.form.dispatchEvent(new Event("input")),this.autoClose&&this.classList.remove("custom-select--active")}toggleSelector(event){event.preventDefault(),this.classList.toggle("custom-select--active"),this.classList.contains("custom-select--active")?(this.detailsements.button.focus(),this.detailsements.button.setAttribute("aria-expanded",(this.detailsements.button.getAttribute("aria-expanded")==="false").toString())):this.hidePanel()}closeSelector(event){const shouldClose=event.relatedTarget&&event.relatedTarget.classList.contains("custom-select--button");(event.relatedTarget===null||shouldClose)&&this.hidePanel()}}customElements.define("custom-select",CustomSelect)}if(!customElements.get("localization-form")){class LocalizationForm extends HTMLElement{constructor(){super(),this.form=this.querySelector("form"),this.inputs=this.form.querySelectorAll('input[name="locale_code"], input[name="country_code"]'),this.debouncedOnSubmit=debounce(event=>{this.onSubmitHandler(event)},200),this.inputs.forEach(item=>item.addEventListener("change",this.debouncedOnSubmit.bind(this)))}onSubmitHandler(event){this.form&&this.form.submit()}}customElements.define("localization-form",LocalizationForm)}if(!customElements.get("side-panel-content-tabs")){class SidePanelContentTabs extends HTMLElement{constructor(){super(),this.buttons=this.querySelectorAll("button"),this.panels=this.parentElement.querySelectorAll(".side-panel-content--tab-panel")}connectedCallback(){this.setupButtonObservers()}disconnectedCallback(){}setupButtonObservers(){this.buttons.forEach((item,i)=>{item.addEventListener("click",e=>{this.toggleActiveClass(i),e.preventDefault()})})}toggleActiveClass(i){this.buttons.forEach(button=>{button.classList.remove("tab-active")}),this.buttons[i].classList.add("tab-active"),this.panels.forEac
1h(panel=>{panel.classList.remove("tab-active")}),this.panels[i].classList.add("tab-active")}}customElements.define("side-panel-content-tabs",SidePanelContentTabs)}if(!customElements.get("collapsible-row")){class CollapsibleRow extends HTMLElement{constructor(){super(),this.animation=null,this.isClosing=!1,this.isExpanding=!1}connectedCallback(){this.details=this.querySelector("details"),this.summary=this.querySelector("summary"),this.content=this.querySelector(".collapsible__content"),this.setListeners()}setListeners(){this.querySelector("summary").addEventListener("click",e=>this.onClick(e))}instantClose(){this.tl.timeScale(10).reverse()}animateClose(){this.tl.timeScale(3).reverse()}animateOpen(){this.tl.timeScale(1).play()}onClick(e){e.preventDefault(),this.details.style.overflow="hidden",this.isClosing||!this.details.open?this.open():(this.isExpanding||this.details.open)&&this.shrink()}shrink(){this.isClosing=!0;const startHeight=`${this.details.offsetHeight}px`,endHeight=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.details.animate({height:[startHeight,endHeight]},{duration:250,easing:"ease"}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.details.style.height=`${this.details.offsetHeight}px`,this.details.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const startHeight=`${this.details.offsetHeight}px`,endHeight=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.details.animate({height:[startHeight,endHeight]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(open){this.details.open=open,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.details.style.height=this.details.style.overflow=""}}customElements.define("collapsible-row",CollapsibleRow)}class ProductRecommendations extends HTMLElement{constructor(){super()}fetchProducts(){fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),this.classList.add("product-recommendations--loaded")}).catch(e=>{console.error(e)})}connectedCallback(){this.fetchProducts()}}if(customElements.define("product-recommendations",ProductRecommendations),!customElements.get("quick-view")){const _cache=new Map;class QuickView extends HTMLElement{constructor(){super()}connectedCallback(){this.drawer=document.getElementById("Product-Drawer"),this.drawerContent=this.drawer.querySelector("#Product-Drawer-Content"),this._onClick=this._onClick.bind(this),this.addEventListener("click",this._onClick),OverlayManager.registerBeforeClose(this.drawer,()=>{document.body.classList.remove("open-cc--product"),setTimeout(()=>{this.drawer.classList.contains("active")||(this.drawerContent.innerHTML="")},260)})}disconnectedCallback(){this.removeEventListener("click",this._onClick)}_onClick(e){e.preventDefault();let productHandle=this.dataset.productHandle;if(!productHandle||this.classList.contains("loading"))return;let href=`${theme.routes.root_url}/products/${productHandle}?view=quick-view`;if(href=href.replace("//","/"),_cache.has(productHandle)){this.renderQuickview(_cache.get(productHandle),href,productHandle);return}this.classList.add("loading"),fetch(href).then(response=>response.text()).then(text=>{this.classList.remove("loading");const sectionInnerHTML=new DOMParser().parseFromString(text,"text/html").querySelector("#Product-Drawer-Content").innerHTML;_cache.set(productHandle,sectionInnerHTML),this.renderQuickview(sectionInnerHTML,href,productHandle)}).catch(()=>{this.classList.remove("loading")})}_reloadScripts(container){let scripts=container.querySelectorAll("script"),head=document.head;scripts.forEach(oldScript=>{let newScript=document.createElement("script");
1if(Array.from(oldScript.attributes).forEach(attr=>{newScript.setAttribute(attr.name,attr.value)}),oldScript.src){if(document.querySelector(`script[src="${oldScript.src}"]`))return}else newScript.textContent=oldScript.textContent;oldScript.parentNode?oldScript.parentNode.replaceChild(newScript,oldScript):head.appendChild(newScript)})}renderQuickview(sectionInnerHTML,href,productHandle){if(!sectionInnerHTML)return;let drawerContent=this.drawer.querySelector("#Product-Drawer-Content");drawerContent.innerHTML=sectionInnerHTML,this._reloadScripts(drawerContent),OverlayManager.open(this.drawer),document.body.classList.add("open-cc--product"),requestAnimationFrame(()=>{Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.ProductModel&&window.ProductModel.loadShopifyXR();let slider=this.drawer.querySelector("#Product-Slider");slider&&slider.reInit(),window.dispatchEvent(new Event("resize"))}),dispatchCustomEvent("quick-view:open",{productUrl:href,productHandle}),addIdToRecentlyViewed(productHandle)}}customElements.define("quick-view",QuickView)}class AnimatedMarkers{constructor(){this.markers=document.querySelectorAll(".svg-marker path"),this.animations_enabled=document.body.classList.contains("animations-true")&&typeof gsap<"u",this.animations_enabled&&this.markers.length&&this.setupEventListeners()}setupEventListeners(){this.markers.forEach((marker,i)=>{gsap.from(marker,{duration:1,ease:"power4.inOut",drawSVG:"0%",scrollTrigger:{trigger:marker,start:"top 70%",end:"bottom 80%"}})})}}function addIdToRecentlyViewed(handle){if(!handle){let product=document.querySelector(".thb-product-detail");product&&(handle=product.dataset.handle)}if(handle){if(window.localStorage){let recentIds=window.localStorage.getItem("recently-viewed");recentIds!="undefined"&&recentIds!=null&&(window.recentlyViewedIds=JSON.parse(recentIds))}var i=window.recentlyViewedIds.indexOf(handle);i>-1&&window.recentlyViewedIds.splice(i,1),window.recentlyViewedIds.unshift(handle),window.localStorage&&window.localStorage.setItem("recently-viewed",JSON.stringify(window.recentlyViewedIds))}}document.addEventListener("DOMContentLoaded",()=>{typeof AnimatedMarkers<"u"&&new AnimatedMarkers});
2//# sourceMappingURL=/cdn/shop/t/5/assets/app.js.map?v=77767426121647741861773410185

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.