https://www.clawhammersupply.com/cdn/shop/t/54/assets/section-prod…?v=160018530367503608351784829867
1!function(t){"function"==typeof define&&define.amd?define("productAddons",t):t()}((function(){"use strict";class t extends HTMLElement{constructor(){super(),this.data={index:this.dataset.index},this.selectors={option:".js-addon-option",price:".js-addon-price",image:".js-addon-image",checkbox:"[name='addon']",id:"[name$='][id]']",requiredInputs:`[name^="items[${this.data.index}]"]`,variantsJSON:".js-variants-json"},this.content={price:this.querySelector(this.selectors.price),image:this.querySelector(this.selectors.image),idInput:this.querySelector(this.selectors.id)}}t(){const t=this.querySelector(this.selectors.variantsJSON).textContent;return((t,i,n=".js-product-option")=>{const s={option1:null,option2:null,option3:null};for(const i of t.querySelectorAll(n)){if("INPUT"===i.tagName&&!i.checked)continue;const t=i.getAttribute("name").split("]").pop();s[t]=i.value}return i.find((({option1:t,option2:i,option3:n})=>t===s.option1&&i===s.option2&&n===s.option3))||!1})(this,JSON.parse(t),this.selectors.option)}i(t){const i="data-subtotal-disabled";this.querySelectorAll(this.selectors.requiredInputs).forEach((i=>i.disabled=!t)),t?this.content.price.removeAttribute(i):this.content.price.setAttribute(i,"true")}o(t){const i=t.featured_image;this.content.idInput.value=t.id,this.content.price.textContent=((t,i=Shopify.currency.active,n=Shopify.locale)=>{let s=!1;"JPY"===i&&(s=!1);let e=.01*t;return s&&e%1==0?e.toLocaleString(n,{style:"currency",currency:i}).slice(0,-3):e.toLocaleString(n,{style:"currency",currency:i})})(t.price),this.content.price.dataset.price=t.price,i&&((t,i,n)=>{const s=t.closest("picture"),e=t.getBoundingClientRect(),o=`${i}&width=${Math.round(2*e.width)}&height=${Math.round(2*e.height)}&crop=center`;s&&s.querySelectorAll("source").forEach((t=>t.srcset!=o?t.srcset=o:""));t.src!=o&&(t.src=o),n&&(t.alt=n)})(this.content.image,i.src,i.alt)}h(){const t=this.t(),i=t&&t.available,n=this.querySelector(this.selectors.checkbox);t&&this.o(t),this.i(i),n.disabled=!i,n.checked=i}u(t){const i=t.target.closest(this.selectors.checkbox),n=t.target.closest(this.selectors.option);i&&this.i(i.checked),n&&this.h()}connectedCallback(){this.addEventListener("change",this.u.bind(this))}}var i,n;i="product-addon",n=t,void 0===customElements.get(i)&&customElements.define(i,n)}));
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.