1const KL_RATING_SELECTOR="[data-kl-rating]",KL_RATING_STEP_ATTRIBUTE="data-kl-rating-step",KL_RATING_MAX_STEPS=10;function getRatingStep(ratingValue,ratingMax){const value=Number.parseFloat(ratingValue),max=Number.parseFloat(ratingMax);if(!Number.isFinite(value)||!Number.isFinite(max)||max<=0)return 0;const normalised=Math.min(Math.max(value/max,0),1);return Math.round(normalised*10)}function applyRatingStep(element){if(element)try{const step=getRatingStep(element.dataset.klRatingValue,element.dataset.klRatingMax);element.setAttribute(KL_RATING_STEP_ATTRIBUTE,String(step))}catch(error){console.debug("kl-rating: could not apply a rating step",{ratingValue:element.dataset.klRatingValue,ratingMax:element.dataset.klRatingMax,error})}}function initRatings(root){root&&root.querySelectorAll(KL_RATING_SELECTOR).forEach(applyRatingStep)}initRatings(document),document.addEventListener("shopify:section:load",event=>{initRatings(event.target)}); 2//# sourceMappingURL=/cdn/shop/t/430/assets/kl-rating.js.map?v=56473232186247640881789073417
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.