1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[74068],{4068(t,e,s){s.r(e),s.d(e,{default:()=>i});class i extends window.PluginBaseClass{static #t=this.options={parentContainerSelector:".product-detail-buy, .quickview-minimal-product",quantitySelectSelector:".product-detail-form-container .js-quantity-selector",blockPricesRowSelector:".product-block-prices-row",blockPricesQuantitySelector:".product-block-prices-quantity",activeClass:"js-highlighted"};init(){let t=this.options,e=this.el.closest(t.parentContainerSelector);this._quantitySelect=e?.querySelector(t.quantitySelectSelector),this._blockPricesRows=this.el.querySelectorAll(t.blockPricesRowSelector),this._quantitySelect&&this._blockPricesRows&&(this._onChangeQuantity(),this._registerEvents())}_registerEvents(){this._quantitySelect.addEventListener("change",this._onChangeQuantity.bind(this))}_onChangeQuantity(){let t=this.options,e=parseFloat(this._quantitySelect.value),s=null;this._blockPricesRows.forEach(e=>{e.classList.remove(t.activeClass)}),this._blockPricesRows.forEach((i,c)=>{let l=i.querySelector(t.blockPricesQuantitySelector),o=l?parseFloat(l.textContent):0,r=c===this._blockPricesRows.length-1;r||!(e<=o)||s||(s=i),r&&e>=o&&!s&&(s=i)}),s&&s.classList.add(t.activeClass)}}}}]);
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.