PageSourceSearch

https://www.caffeprima.co.uk/cdn/shop/t/29/assets/product-quick-view.js?v=14476801133208767491770130850

js caffeprima.co.uk collected 2026-10-08 18:33:24 UTC 3,027 bytes, 2 lines download raw bytes

1const productQuickViewEvents={triggerProductQuickViewChange:"action:productQuickView:update"};class ProductQuickView extends HTMLElement{constructor(){super(),this.elementToTargetInsideResponseData="[product-quick-view]",document.addEventListener(productQuickViewEvents.triggerProductQuickViewChange,e=>{this._renderProductQuickViewElement(e.detail)}),document.addEventListener(_EVENT_HELPER.hideDrawer,e=>{e.detail.drawerType=="options"&&this._clearDrawerInnerBody()})}_clearDrawerInnerBody(){try{setTimeout(()=>{this.innerHTML=""},400)}catch(err){throw new Error(err)}}_updateQuickViewData(responseData,drawerHeadingName){const getQuickViewSection=new DOMParser().parseFromString(responseData,"text/html").querySelector(this.elementToTargetInsideResponseData);if(!getQuickViewSection)throw{sectionError:"Section not found"};const div=document.createElement("div");div.append(getQuickViewSection),div.querySelector(".drawer__head").innerHTML=drawerHeadingName,this.innerHTML=div.innerHTML}_triggerCartDrawer(){HELPER_UTIL.dispatchCustomEvent(_EVENT_HELPER.showDrawer,document,{drawerType:"options"})}_initShopifyPaymentButtons(){Shopify?.PaymentButton?.init&&Shopify.PaymentButton.init()}_renderProductQuickViewElement(eventCustomDetails){const{productHandle,submitButton,drawerHeadingName}=eventCustomDetails;HELPER_UTIL.submitButtonState(submitButton).loadingState(),HELPER_UTIL.fetchData({method:"GET",url:`${Shopify.routes.root}products/${productHandle}?view=product-quick-view`,responseType:"text",onsuccess:data=>{if(!data)throw new Error("No product data found! Check if you sending right product handle");this._updateQuickViewData(data,drawerHeadingName),this._initShopifyPaymentButtons(),HELPER_UTIL.submitButtonState(submitButton).completeState(),this._triggerCartDrawer()},onerror:error=>{console.log(error),HELPER_UTIL.dispatchCustomEvent(_EVENT_HELPER.triggerToastMessage,document,{toastType:"common-errors",messageType:"error",message:"Something went went wrong! Please try again"})},defaultCb:()=>{setTimeout(()=>{HELPER_UTIL.submitButtonState(submitButton).resetState(1e3),HELPER_UTIL.submitButtonState(submitButton).disableState(!1)},1e3)}})}connectedCallback(){}}customElements.get("product-quick-view-component")||customElements.define("product-quick-view-component",ProductQuickView);class BuyButtonMutationObserver extends MutationObserverComponent{constructor(){super()}_updateDrawerHeight(){const currentButtonContainerHeight=this.querySelector(".product-form__buttons")?.offsetHeight;currentButtonContainerHeight&&(this.buttonContainerHeight=currentButtonContainerHeight,this.closest("drawer-component")?.style.setProperty("--set-container-height",`${currentButtonContainerHeight}px`))}_mutationCallback(mutations){mutations.forEach(()=>{this._updateDrawerHeight()})}}customElements.get("buy-button-mutation-observer")||customElements.define("buy-button-mutation-observer",BuyButtonMutationObserver);
2//# sourceMappingURL=/cdn/shop/t/29/assets/product-quick-view.js.map?v=14476801133208767491770130850

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.