PageSourceSearch

https://www.pvolve.com/cdn/shop/t/761/assets/js-optional-quick-add…?v=138989421828248162351790193271

js pvolve.com collected 2026-10-02 13:20:23 UTC 3,809 bytes, 2 lines download raw bytes

1var p=Object.defineProperty;var u=(s,n,t)=>n in s?p(s,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[n]=t;var l=(s,n,t)=>u(s,typeof n!="symbol"?n+"":n,t);import{M as h}from"./modal-dialog-BMeSzVwS.js";import{A as d,S as c,r as f}from"./global-DKACZ5tZ.js";import{T as i}from"./TsDOM-8_vCKBIR.js";import{P as E}from"./product-form-B81zQU4y.js";import"./UcoastEl-D7GAdsnm.js";import"./animations-CRuxAqmK.js";import"./helpers-DvhljvoO.js";import"./cart-functions-DkgeuNN_.js";import"./purchase-checks-C0tMMzGP.js";import"./optimistic-debug-B2MGIkla.js";class m extends h{constructor(){super();l(this,"productElement");l(this,"modalContent");this.modalContent=i.rs('[id^="QuickAddInfo-"]',this)}hide(t){const e=i.os("cart-notification")||i.rs("cart-drawer");e&&this.openedBy&&e.setActiveElement(this.openedBy),this.modalContent.innerHTML="",super.hide(t)}show(t){t.setAttribute("aria-disabled","true"),t.setAttribute(d.loading,""),i.rs(c.loadingOverlaySpinner,t).classList.remove("hidden"),fetch(i.ra(t,"data-product-url")).then(e=>e.text()).then(e=>{const r=new DOMParser().parseFromString(e,"text/html");this.productElement=i.rs('section[id^="MainProduct-"]',r.documentElement),this.preventDuplicatedIDs(),this.removeDOMElements(),this.setInnerHTML(this.modalContent,this.productElement.innerHTML),window.Ucoast.mediaManager.playAllInContainer(this.modalContent),window.Shopify&&window.Shopify.PaymentButton&&window.Shopify.PaymentButton.init(),window.ProductModel&&window.ProductModel.loadShopifyXR(),this.removeGalleryListSemantic(),this.updateImageSizes(),this.preventVariantURLSwitching(),super.show(t)}).finally(()=>{t.removeAttribute("aria-disabled"),t.removeAttribute(d.loading),i.rs(c.loadingOverlaySpinner,t).classList.add("hidden")})}setInnerHTML(t,e){t.innerHTML=e,t.querySelectorAll("script").forEach(r=>{if(!r.parentNode)throw new Error("oldScriptTag.parentNode is null, cannot replace script");const o=document.createElement("script");Array.from(r.attributes).forEach(a=>{o.setAttribute(a.name,a.value)}),o.appendChild(document.createTextNode(r.innerHTML)),r.parentNode.replaceChild(o,r)})}preventVariantURLSwitching(){const t=this.modalContent.querySelector("variant-radios,variant-selects");t&&t.setAttribute("data-update-url","false")}removeDOMElements(){var e,r;if(!this.productElement)throw new Error("this.removeDOMElements called without this.productElement");(e=i.os("pickup-availability",this.productElement))==null||e.remove(),(r=i.os("product-modal",this.productElement))==null||r.remove();const t=i.ol("modal-dialog",this.productElement);t&&t.forEach(o=>o.remove())}preventDuplicatedIDs(){if(!this.productElement)throw new Error("this.preventDuplicatedIDs called without this.productElement");const t=i.ra(this.productElement,"data-section");this.productElement.innerHTML=f(this.productElement.innerHTML,t,`quickadd-${t}`);const e=i.ol("variant-selects, variant-radios, product-info",this.productElement);e==null||e.forEach(r=>{r.dataset.originalSection=t})}removeGalleryListSemantic(){const t=this.modalContent.querySelector('[id^="Slider-Gallery"]');t&&(t.setAttribute("role","presentation"),t.querySelectorAll('[id^="Slide-"]').forEach(e=>e.setAttribute("role","presentation")))}updateImageSizes(){const t=i.rs(".product",this.modalContent);if(!t.classList.contains("product--columns"))return;const r=i.ol(".product__media img",t);if(!r)return;let o="(min-width: 1000px) 715px, (min-width: 750px) calc((100vw - 11.5rem) / 2), calc(100vw - 4rem)";t.classList.contains("product--medium")?o=o.replace("715px","605px"):t.classList.contains("product--small")&&(o=o.replace("715px","495px")),r.forEach(a=>a.setAttribute("sizes",o))}}l(m,"htmlSelector","quick-add-modal");i.safeDefineElement(m);i.safeDefineElement(E);
2//# sourceMappingURL=js-optional-quick-add-CArmZ6KP.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.