{
  "version": 3,
  "sources": ["/cdn/shop/t/24/assets/quick-view.js?cv=20260824a"],
  "sourcesContent": ["if (!customElements.get(\"quick-view-modal\")) {\n  customElements.define(\n    \"quick-view-modal\",\n    class QuickViewModal extends DrawerComponent {\n      constructor() {\n        super();\n\n        this.classesToRemoveOnLoad = \"drawer--loading\";\n        this.drawerBody = this.querySelector(this.selector);\n      }\n\n      get selector() {\n        return \".quick-view__content\";\n      }\n\n      get sourceSelector() {\n        return \"#MainProduct-quick-view__content\";\n      }\n\n      get requiresBodyAppended() {\n        return !(\n          Shopify.designMode &&\n          this.closest(\".section-group-overlay-quick-view\")\n        );\n      }\n\n      shouleBeShow() {\n        const sectionId = this.getProductQuickViewSectionId();\n        return typeof sectionId === \"string\";\n      }\n\n      prepareToShow() {\n        super.prepareToShow();\n        this.quickview();\n      }\n\n      handleAfterShow() {\n        super.handleAfterShow();\n        document.dispatchEvent(\n          new CustomEvent(\"quick-view:opened\", {\n            detail: { productUrl: this.dataset.productUrl },\n          })\n        );\n\n        document.dispatchEvent(new CustomEvent(\"quick-view:opened\"));\n      }\n\n      handleAfterHide() {\n        super.handleAfterHide();\n        const drawerContent = this.querySelector(this.selector);\n        drawerContent.innerHTML = \"\";\n        this.classList.add(this.classesToRemoveOnLoad);\n\n        document.dispatchEvent(new CustomEvent(\"quick-view:closed\"));\n      }\n\n      getProductQuickViewSectionId() {\n        let sectionId = FoxTheme.QuickViewSectionId || false;\n\n        if (!sectionId) {\n          // Get section id from overlay groups.\n          const productQuickView = document.querySelector(\n            \".section-group-overlay-quick-view\"\n          );\n          if (productQuickView) {\n            sectionId = FoxTheme.utils.getSectionId(productQuickView);\n          }\n\n          // Cache for better performance.\n          FoxTheme.QuickViewSectionId = sectionId;\n        }\n\n        return sectionId;\n      }\n\n      quickview() {\n        const drawerContent = this.querySelector(this.selector);\n        const sectionId = this.getProductQuickViewSectionId();\n        const sectionUrl = `${\n          this.dataset.productUrl.split(\"?\")[0]\n        }?section_id=${sectionId}`;\n        fetch(sectionUrl)\n          .then((response) => response.text())\n          .then((responseText) => {\n            const productElement = new DOMParser()\n              .parseFromString(responseText, \"text/html\")\n              .querySelector(this.sourceSelector);\n\n            this.setInnerHTML(\n              drawerContent,\n              productElement.content.cloneNode(true)\n            );\n            FoxTheme.a11y.trapFocus(this, this.focusElement);\n\n            if (window.Shopify && Shopify.PaymentButton) {\n              Shopify.PaymentButton.init();\n            }\n\n            setTimeout(() => {\n              this.classList.remove(this.classesToRemoveOnLoad);\n            }, 300);\n\n            document.dispatchEvent(\n              new CustomEvent(\"quick-view:loaded\", {\n                detail: { productUrl: this.dataset.productUrl },\n              })\n            );\n          })\n          .catch((e) => {\n            console.error(e);\n          });\n      }\n\n      setInnerHTML(element, innerHTML) {\n        element.innerHTML = \"\";\n        element.appendChild(innerHTML);\n        element.querySelectorAll(\"script\").forEach((oldScriptTag) => {\n          const newScriptTag = document.createElement(\"script\");\n          Array.from(oldScriptTag.attributes).forEach((attribute) => {\n            newScriptTag.setAttribute(attribute.name, attribute.value);\n          });\n          newScriptTag.appendChild(\n            document.createTextNode(oldScriptTag.innerHTML)\n          );\n          oldScriptTag.parentNode.replaceChild(newScriptTag, oldScriptTag);\n        });\n      }\n\n      disconnectedCallback() {\n        super.disconnectedCallback();\n        this.handleAfterHide();\n      }\n    }\n  );\n}\n"],
  "mappings": "AAAK,eAAe,IAAI,kBAAkB,GACxC,eAAe,OACb,mBACA,cAA6B,eAAgB,CAC3C,aAAc,CACZ,MAAM,EAEN,KAAK,sBAAwB,kBAC7B,KAAK,WAAa,KAAK,cAAc,KAAK,QAAQ,CACpD,CAEA,IAAI,UAAW,CACb,MAAO,sBACT,CAEA,IAAI,gBAAiB,CACnB,MAAO,kCACT,CAEA,IAAI,sBAAuB,CACzB,MAAO,EACL,QAAQ,YACR,KAAK,QAAQ,mCAAmC,EAEpD,CAEA,cAAe,CAEb,OAAO,OADW,KAAK,6BAA6B,GACxB,QAC9B,CAEA,eAAgB,CACd,MAAM,cAAc,E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