PageSourceSearch

https://www.brownells.com/dist/Brownells/js/components/variants-se…6KgIfGNZyjonArMvs4mxH5tDlGFsWmNVXNcjNXAYsFA

js brownells.com collected 2026-09-24 09:17:34 UTC 23,031 bytes, 1 lines download raw bytes

1var _window$currentProduc,_window$currentProduc2;function ownKeys(t,e){var o,a=Object.keys(t);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(t),e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,o)),a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(o),!0).forEach(function(e){_defineProperty(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_toPropertyKey(a.key),a)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,a=Array(t);o<t;o++)a[o]=e[o];return a}function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a,r,n,i,l=[],c=!0,s=!1;try{if(n=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;c=!1}else for(;!(c=(a=n.call(o)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}BN.SetVueData("variant",null!=(_window$currentProduc=null==(_window$currentProduc2=window.currentProduct)?void 0:_window$currentProduc2.viewModel)?_window$currentProduc:{}),BN.SetVueData("selections",[]),BN.SetVueData("variantState",{errorMessage:"",email:"",refresh:0}
1),BN.SetVueData("dialogAddCart",{productCode:null,variantCode:null,isReload:!1,onlyNotifyMe:!1,variant:{},refresh:0,productPosition:"",productList:"",variantState:{errorMessage:"",email:""},allVariantOutOfStock:!1,pid:"",volumeDiscount:{data:[]}}),BN.formatPdpShipDate=function(e){var t;return e?(t=(e=_slicedToArray(e.split("-").map(Number),3))[0],new Date(t,e[1]-1,e[2]).toLocaleDateString("en-US",{month:"short",day:"numeric"})):""};var VariantsSelection=(()=>_createClass(function e(t,o){_classCallCheck(this,e),this.form=t,(this.form.variantsSelection=this).options=o||{enableHistory:!0,type:"product"},this.isErrorNoVariant=!1,this.currency=document.documentElement.getAttribute("currency-code"),this.init()},[{key:"generateVariable",value:function(){var e=this;this.inDialog=this.form.hasAttribute("dialog-form"),this.variant=Vue.computed(function(){return(e.inDialog?BNApp.dialogAddCart:BNApp).variant}),this.variantState=Vue.computed(function(){return(e.inDialog?BNApp.dialogAddCart:BNApp).variantState})}},{key:"init",value:function(){var e=this,t=(this.generateVariable(),this.inputCode=this.form.querySelector('input[name="Code"]'),this.enumCoupon=null==(t=document.querySelector(".pdp-info__price-cpn"))||null==(t=t.dataset)?void 0:t.numCoupon,this.variant.value.showCoupon=this.variant.value.coupon&&this.variant.value.coupon.couponcode,this.addEventForm(),this.isPackageBundlePage=document.querySelector(".package-bundle-page"),window.currentProduct&&this.setStateSelection(window.currentProduct.specificationSelectionModel),this.form.querySelector(".errorMessage"));t&&(this.errorMessage=t.value),this.variantState.value._isNotifyMeButton=Vue.computed(function(){return e.variant.value.isOutOfStock&&!e.variant.value.isBackOrder&&!e.variant.value.isPreOrder}),this.isOnPDP=document.querySelector(".main-content.pdp-page"),this.miniCartLoader=document.querySelector(".precart-loader"),document.querySelectorAll(".bn-select-list-variant").forEach(function(e){e.select||(e.select=new SelectBox(e))}),BNApp.dialogAddCart.volumeDiscount="undefined"!=typeof volumeDiscountConfig?volumeDiscountConfig:{}}},{key:"setErrorMessage",value:function(e){this.variantState.value.errorMessage=e}},{key:"selectionLength",value:function(){return this.form.querySelectorAll(".product-variants__selection").length}},{key:"addClassNameByStatusId",value:function(t,e){var o=Object.values(BN.AttributeStatusToClassName),a=null!=(e=BN.AttributeStatusToClassName[e.attributeStatus])?e:"";t&&(o.filter(function(e){return e!=a}).forEach(function(e){t.classList.remove(e)}),a)&&t.classList.add(a)}},{key:"setStateSelection",value:function(e){var s=this;e.forEach(function(e){var e=e.attributes,r=s.form.querySelector("[name='bnSelect[".concat(BN.encodeHtml(e.length&&e[0].attributeDisplayName),"]']")),n=s.form.querySelector("[name='listbox[".concat(BN.encodeHtml(e.length&&e[0].attributeDisplayName),"]']")),i=!1,l={},c=!0;e.forEach(function(e){var t=BN.encodeHtml(e.attributeValue),o=s.form.querySelector(".product-variants__selection[data-selection='".concat(BN.encodeHtml(e.attributeDisplayName),"'] input[data-value='").concat(t,"']")),a=(o&&(a=o.closest(".radio-button"),s.addClassNameByStatusId(a,e),e.disable?(o.setAttribute("fake-disabled",""),a&&a.setAttribute("title","")):(o.removeAttribute("fake-disabled"),a&&(a.setAttribute("title","".concat(t)),e.selected?(o.setAttribute("data-checked","true"),o.checked=!0):(o.removeAttribute("data-checked"),o.checked=!1)))),n&&n.querySelector("[data-value='".concat(t,"']"))),o=r&&r.select.selectElement.querySelector("option[value='".concat(t,"']"));a&&o&&(s.addClassNameByStatusId(a,e),e.disable?(a.classList.add("disabled","content","tooltip","tooltip-dark"),o.classList.add("disabled")):(a.classList.remove("disabled","content","tooltip","tooltip-dark"),o.classList.remove("disabled"),c=!1)),r&&(!e.disable&&e.selected&&r.select&&a?(r.select.selectOption(a.innerText,null!=(o=a.dataset.index)?o:0,null,!1),l=e,i=!0):null!=(o=r.select)&&null!=(o=o.selectElement)&&o.value||!a?e.disable||r.select.selectElement.value!=t||(l=e,i=!0):(a.setAttribute("aria-current",!1),a.setAttribute("aria-selected",!1)))}),r&&(e=r.select.selectCursor,s.addClassNameByStatusId(e,l),i?e.classList.remove("empty-value"):(e.innerHTML=e.dataset.placeholder,e.classList.add("empty-value"),e.title=""),c?r.classList.add("disabled","content","tooltip","tooltip-dark"):r.classList.remove("disabled","content","tooltip","tooltip-dark"))})}},{key:"dataSelection",value:function(){var e,t=new FormData(this.form),o={productC
1ode:null==(e=this.form.querySelector("#productCode"))?void 0:e.value,bundleCode:null==(e=this.form.querySelector("#bundleCode"))?void 0:e.value,PackageCode:null==(e=this.form.querySelector("#bundleCode"))?void 0:e.value,specificationSelected:[],SelectedVariants:[]};return this.form.closest("#dialog-variant")&&this.form.querySelectorAll('.bn-select [name^="selection"]').forEach(function(e){!e.value||t.has(e.name)&&t.get(e.name)||t.append(e.name,e.value)}),t.forEach(function(e,t){t.startsWith("selection")&&e&&(o.specificationSelected.push({AttributeName:t.slice(10,-1),AttributeValue:BN.decodeHtml(e)}),o.SelectedVariants.push({ProductId:t.slice(10,-1),VariantId:BN.decodeHtml(e)}))}),o.isSpecificationSelected=BNApp.variant.isSpecificationSelected,o}},{key:"fetch",value:function(){var a=this,r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],s=this,d=s.isOnPDP&&s.form.querySelector(".pdp-variant-block"),e=new HttpService,u=(s.form.classList.add("event-none"),s.isOnPDP&&s.miniCartLoader&&s.miniCartLoader.classList.remove("hide"),this.dataSelection()),t=r?"/PackageProduct/SelectPackageVariant":s.isPackageBundlePage?"/BundleProduct/SelectPackage":"/".concat(s.options.type,"/selectVariant");e.post(t,u,null,!0).then(function(i){s.form.classList.remove("event-none");var e,t=document.querySelector(".pdp-tabs"),o=document.querySelector(".pdp-tabs__description"),l=document.querySelector(".pdp-tabs__specification"),c=document.querySelector(".pdp-tabs__restriction");if(s.isOnPDP&&(s.miniCartLoader&&s.miniCartLoader.classList.add("hide"),"object"==("undefined"==typeof SiteVibesProductCloned?"undefined":_typeof(SiteVibesProductCloned))&&"undefined"!=typeof SiteVibesEvents&&null!=(e=i.viewModel)&&e.sku)){SiteVibesProductCloned.product_variant_id=null==(e=i.viewModel)?void 0:e.sku;try{SiteVibesEvents.productData(SiteVibesProductCloned)}catch(e){}}BN.collectVolumeDiscountInfo((null==(e=i.viewModel)||null==(e=e.volumeDiscount)?void 0:e.volumeDiscountSetting)||{},(null==(e=i.viewModel)||null==(e=e.volumeDiscount)?void 0:e.volumePriceItems)||[]),s.inDialog?BNApp.dialogAddCart.variant=i.viewModel||{}:(BNApp.variant=i.viewModel||{},null!=(e=i.viewModel)&&e.sku&&(t.insertBefore(l,o),t.insertBefore(c,o)),(s.isPackageBundlePage||r)&&(BNApp.packageBundle.package=i.variantItems||{},BNApp.packageBundle.showDetail=[],BNApp.packageBundle.showFullRestriction=[],BNApp.packageBundle.showFullSpecification=[]),n&&BN.dropdownService.closeAll()),s.variant.value.showCoupon=i.viewModel.coupon&&i.viewModel.coupon.couponCode,BNApp.restriction&&(BNApp.restriction.isFFLProduct=null==(e=i.viewModel)?void 0:e.isFflProduct,BNApp.restriction.dealerData=null==(t=i.viewModel)?void 0:t.fflContactModel),s.options.enableHistory&&(o=new URL(window.document.location.href),null!=(e=i.viewModel)&&e.sku?(selectImageSlideBasedOnSelectedVariant(i.viewModel.sku),o.searchParams.set("sku",i.viewModel.sku)):(selectImageSlideBasedOnSelectedVariant(),o.searchParams.delete("sku")),window.history.replaceState({path:o.toString()},"",o.toString())),i.specificationSelectionModel&&(BNApp.$data.selections=i.specificationSelectionModel,s.setStateSelection(i.specificationSelectionModel),document.querySelectorAll(".bn-select-list-variant").forEach(function(e){e.classList.remove("without-choosing")})),null!=i&&null!=(t=i.viewModel)&&t.code?(s.inputCode.value=i.viewModel.code,s.inDialog||checkAddedFavorite(i.viewModel.code),BNApp.pdpTabs&&(BNApp.pdpTabs.restrictionDesc=(null==(e=i.viewModel.restriction)?void 0:e.extraTextToDisplayOnPdp)||"",BNApp.pdpTabs.productDescription)&&""!=BNApp.pdpTabs.restrictionDesc&&(BNApp.pdpTabs.showReadMore=!0),d&&BN.pushDataLayer(null,null,{event:"pdp_interaction_sku_select",pid:null==(o=datalayerProduct)||null==(o=o[0])?void 0:o.id,productSku:i.viewModel.code,variant:null==u?void 0:u.specificationSelected.map(function(e){return e.AttributeValue}).join(",")})):BNApp.pdpTabs.showReadMore=!1,(!s.isErrorNoVariant||i.viewModel.code&&a.isErrorNoVariant)&&(s.setErrorMessage(""),s.isErrorNoVariant=!1),BN.clicked2SeePrice&&(s.variant.value.clickToSeePriceEnable=!1),BNApp.pdpTabs&&(BNApp.pdpTabs.showMore.specification=!1,BNApp.pdpTabs.showMore.restriction=!1),BNApp.pdpTabs&&BNApp.pdpTabs.guarantedModel&&(BNApp.pdpTabs.guarantedModel.originCountryBadgeUrl=null==(t=i.viewModel)||null==(t=t.countryOfOrigin)?void 0:t.badgeUrl,BNApp.pdpTabs.guarantedModel.originCountryDescription=null==(e=i.viewModel)||null==(e=e.countryOfOrigin)?void 0:e.description,BNApp.pdpTabs.guarantedModel.isMadeInUsa=null==(o=i.viewModel)||null==(o=o.countryOfOrigin)?void 0:o.isMadeInUsa,BNApp.pdpTabs.guarantedModel.guarantedBadgeUrl=null==(t=i.viewModel)||null==(t=t.guaranteedForever)?void 0:t.badgeUrl,BNApp.pdpTabs.guarantedModel.guarantedDescription=null==(e=i.viewModel)||null==(e=e.guaranteedForever)?void 0:e.description,BNApp.pdpTabs.guarantedModel.isGuaranteedForever=null==(o=i.viewModel)||null==(o=o.guaranteedForever)?void 0:o.isGuaranteedForever),BN.restrictionCtrl&&BN.restrictionCtrl.clearZipCodeCheckingStatus&&BN.restrictionCtrl.clearZipCodeCheckingStatus(),BNApp.$nextTick(function(){s.inDialog&&BN.dropdownService.loopFocus(s.form.closest(".bn-dialog-container"),null,!0);var e,t=new FocusEvent("focusin",{view:window,bubbles:!0,cancelable:!0}),o=(null!=(o=BN.lastClickedVariant)&&o.dispatchEvent(t),null==c?void 0:c.querySelector(".pdp-tabs__main")),t=null==l?void 0:l.querySelector(".pdp-tabs__main"),a="Please select from the options above",r=!1,n=!1;null!=(e=i.viewModel)&&e.sku&&(r=o&&o.textContent&&0<o.textContent.trim().length&&!o.textContent.toLowerCase().includes(a.toLowerCase()),n=t&&t.textContent&&0<t.textContent.trim().length&&!t.textContent.toLowerCase().includes(a.toLowerCase())),null!=l&&l.classList.toggle("d-none",!n),null!=c&&c.classList.toggle("d-none",!r),UpdateDescriptionTitle(null==(e=i.viewModel)?void 0:e.title)})})}},{key:"scrollToVariantsBlock",value:function(){var e=BNApp.$refs["variants-block"];e&&window.scrollTo({top:e.offsetTop+e.clientHeight/2-window.innerHeight/2,behavior:"smooth"})}},{key:"addEventForm",value:function(){var u,s=this,p=this;this.form.classList.contains("variant-selection-ready")||(this.form.classList.add("variant-selection-ready"),this.form.addEventListener("change",function(e){var t,o,a=e.target;BNApp.variant.isSpecificationSelected="radio"!=a.type||a.checked,a.name&&a.name.startsWith("selection")?(t=p.form.querySelectorAll('input[name^="selection"]'),o=p.form.querySelectorAll('[name^="bnSelect"]'),(null!==a.getAttribute("fake-disabled")||"SELECT"==a.tagName&&a.options[a.selectedIndex].classList.contains("disabled"))&&(o.forEac
1h(function(e){e.select.selectElement.name!=a.name&&(e.select.active_value="",e.select.selectElement.value="")}),t.forEach(function(e){a!=e&&(e.checked=!1)})),t.forEach(function(e){e.checked?e.setAttribute("data-checked","true"):e.removeAttribute("data-checked")}),p.isErrorNoVariant||p.setErrorMessage(""),p.fetch(!(null==(o=e.target)||!o.closest(".package-product-form")),!(null==(t=e.target)||!t.closest(".package-variant-list-dialog")))):p.setErrorMessage("")}),u=function(i,l,c){p.isOnPDP&&p.miniCartLoader&&p.miniCartLoader.classList.remove("hide"),p.form.classList.add("event-none","submitting"),BN.add2Cart(l).then(function(e){var t,o,a,r,n;e.isSuccess?("category"===p.options.type&&BN.dropdownService.close(i),c&&c(e),null!=(t=BN.searchPageCtrl)&&t.trackingAdd2Cart&&(t=l.Code,n=l.Quantity,o=s.currency,a=null==(a=e.miniCart)||null==(a=a.latestAddedItem)?void 0:a.originPlacedPrice)&&t&&n&&null!=(r=BN.searchPageCtrl)&&r.trackingAdd2Cart({currency:o,price:a,quantity:n,uniqueId:t}),null!=(r=BN.zaiusTracking)&&r.trackAddToCart(null==l?void 0:l.Code),n=_objectSpread(_objectSpread({},BN.getPurchaseTrackingProperties(e)),{},{event:"add_to_cart",cart_items:null==e?void 0:e.cart_items,ecommerce:{currencyCode:BN.defaultConfig.currencyCode,add:{actionField:_objectSpread({list:p.form.dataset.list,position:p.form.dataset.position},null!=(o=p.form.dataset)&&o.datalayerActType?{actType:null==(a=p.form.dataset)?void 0:a.datalayerActType}:{}),products:e.products}}}),null!=(t=BN.ga4)&&t.enrichWithBasketStarter(n,null==e?void 0:e.cart_items,null==e?void 0:e.products),BN.pushDataLayer(null,null,n)):(p.setErrorMessage(e.message),BN.pushDataLayer(null,null,{event:"atc_error",error_type:"atc error",error_message:e.message}),p.isOnPDP&&p.miniCartLoader&&p.miniCartLoader.classList.add("hide")),p.form.classList.remove("event-none","submitting")})},this.form.addEventListener("submit",function(e){e.preventDefault();var t,o,a,r,n,i,l,c,s,d=p.inputCode.value;p.setErrorMessage(""),d?p.variantState.value._isNotifyMeButton?null!=(r=BN.productCtrl)&&r.openDialogNotifyMe&&null!=(r=BN.productCtrl)&&r.openDialogNotifyMe(e.submitter,"button"):(t=("product"!==p.options.type?BNApp.dialogAddCart:BNApp).variant,r=new FormData(p.form),o=parseInt(null!=(r=r.get("qty"))?r:1),a={Code:d,Quantity:o=(o=isNaN(o)?1:o)<1?1:o,ShouldShowLastestItemAddedInCart:!0,ProductList:p.form.dataset.list||""},p.form.elements.qty.value=o,"undefined"!=typeof addToCartDialogConfirm?(r='\n                        <div class="bn-dialog__title-product">\n                            <div class="bn-dialog__title-product--image">\n                                <a href="#">\n                                    <img src="'.concat(t.thumbnailImageUrl,'" alt="').concat(t.title,'">\n                                </a>\n                            </div>\n                            <div class="bn-dialog__title-product--title">\n                                <a href="#" class="subtitle-2 font-weight-bolder">\n                                    ').concat(t.title,"\n                                </a>\n                            </div>\n                        </div>\n                    "),l=i=d="",n=s=!1,t.isPreOrder&&!t.inventoryQuantity?(d=null==(c=addToCartDialogConfirm.preOrder)?void 0:c.body,i=null==(c=addToCartDialogConfirm.preOrder)?void 0:c.buttonConfirm,l=null==(c=addToCartDialogConfirm.preOrder)?void 0:c.buttonCancel,s=!0):t.isBackOrder&&(t.inventoryQuantity?o>t.maxAvailabelQuantity?(d=null==(c=addToCartDialogConfirm.backOrder2)?void 0:c.body,i=null==(c=addToCartDialogConfirm.backOrder2)?void 0:c.buttonConfirm,l=null==(c=addToCartDialogConfirm.backOrder2)?void 0:c.buttonCancel,s=!0):n=!0:(d=null==(c=addToCartDialogConfirm.backOrder1)?void 0:c.body,i=null==(c=addToCartDialogConfirm.backOrder1)?void 0:c.buttonConfirm,l=null==(c=addToCartDialogConfirm.backOrder1)?void 0:c.buttonCancel,s=!0)),s?BN.dialogService.showConfirm(e,r,d,function(){u(e,a,function(){n&&(t.maxAvailabelQuantity-=o)})},null,{btnConfirmText:i,btnCancelText:l}):u(e,a,function(){n&&(t.maxAvailabelQuantity-=o)})):u(e,a)):(p.isErrorNoVariant=!0,p.setErrorMessage(p.errorMessage),window.matchMedia("screen and (max-width: 991px)").matches&&(c=document.querySelector('.pdp-sticky-anchor [href="#variant"]'),s=document.querySelector(".variants"),c&&c.click(),s)&&window.scrollTo(0,s.offsetTop-document.querySelector("header").offsetHeight),p.variantState.value._isNotifyMeButton?BN.pushDataLayer(null,null,{event:"form_error",formid:"Notify Me",formfield:null,errorType:null,errorMessage:p.errorMessage}):BN.pushDataLayer(null,null,{event:"atc_error",error_type:"atc error",error_message:p.errorMessage}))}))}}]))();function checkAddedFavorite(e){var t;window.isAuthenticated&&null!=(t=BNApp)&&t.favorites&&(new HttpService).get("/Favorite/CheckAddedFavorite?variantCode="+e).then(function(e){"boolean"==typeof e&&(BNApp.favorites.isAddedToFavorite=e)})}function UpdateDescriptionTitle(e){var t=document.querySelector(".pdp-info__header h1"),t=(t&&(t.innerHTML=e),document.querySelector(".pdp-tabs__description .pdp-tabs__title"));t&&(t.innerText="What is the "+e+"?")}BN.VariantsSelection=function(t){var e;document.querySelectorAll(".product-form").forEach(function(e){e.variantsSelection=new VariantsSelection(e,t)}),null!=(e=window.currentProduct)&&null!=(e=e.viewModel)&&e.code&&checkAddedFavorite(null==(e=window.currentProduct)?void 0:e.viewM
1odel.code)},BN.variantCtrl=function(){return{getInfor:function(e,t){var o,a,r,n,i,l,c,s;return e?(a="add-to-cart",r="pre-order",n="back-order",i="notify-me",l="no-longer-available",c=function(e){switch(o.buttonType=e){case a:o.buttonLabel=t.addToCartButtonLabel,o.buttonStyle=t.addToCartButtonStyle;break;case n:o.buttonLabel=t.backOrderButtonLabel,o.buttonStyle=t.backOrderButtonStyle;break;case r:o.buttonLabel=t.preOrderButtonLabel,o.buttonStyle=t.preOrderButtonStyle;break;case i:o.buttonLabel=t.notifyMeButtonLabel,o.buttonStyle=t.notifyMeButtonStyle;break;case l:o.buttonLabel=t.noLongerAvailableLabel}},(o={}).externalDropShipText=s="",e.isExternalDropShip?(c(a),o.externalDropShipText=e.externalDropShipText):e.isDiscontinued?(c(l),o.isNoLongerAvailable=!0,o.statusRed=!1,s="",o.similarLinkForDiscontinuedProduct=e.similarLinkForDiscontinuedProduct):e.isBackOrder?e.code?e.inventoryQuantity?s=e.isInStock||e.isOnlineOnly?(c(a),e.isOnlineOnly?"<b>".concat(t.onlineOnlyLabel," - ").concat(t.inStockLabel,"</b>"):t.inStockLabel):(c(i),o.isButtonNotifyMe=!0,o.statusRed=!0,t.outStockLabel):(c(n),s=e.availableInStockDate||t.outStockLabel,o.statusRed=!e.availableInStockDate):(s=e.availableInStockDate||t.outStockLabel,o.statusRed=!e.availableInStockDate,c(n)):e.isPreOrder?e.code?e.inventoryQuantity?s=e.isInStock||e.isOnlineOnly?(c(a),e.isOnlineOnly?"<b>".concat(t.onlineOnlyLabel," - ").concat(t.inStockLabel,"</b>"):t.inStockLabel):(c(i),o.isButtonNotifyMe=!0,o.statusRed=!0,t.outStockLabel):c(r):(c(a),s=e.availableInStockDate||t.preOrderLabel):e.isDropship?(c(a),s="<b>".concat(t.onlineOnlyLabel," - ").concat(t.dropshipLabel,"</b>")):e.isSpecial?(c(a),s=e.inventoryQuantity?"<b>".concat(t.inStockLabel," - ").concat(t.specialLabel,"</b>"):"<b>".concat(t.onlineOnlyLabel," - ").concat(t.specialLabel,". Please allow 4-5 weeks additional processing time.</b>")):e.isInStock?(c(a),s=e.isOnlineOnly?"<b>".concat(t.onlineOnlyLabel," - ").concat(t.inStockLabel,"</b>"):t.inStockLabel):e.isOutOfStock?!e.code&&e.isLeastOneBackOrder?(c(n),s=e.availableInStockDate||t.outStockLabel,o.statusRed=!e.availableInStockDate):(c(i),o.isButtonNotifyMe=!0,o.statusRed=!0,s=t.outStockLabel):e.code||!e.isLeastOnePreOrder||e.isLeastOneInStock?!e.code&&e.isLeastOneInStock&&(e.isLeastOnePreOrder||e.isLeastOneBackOrder||e.isLeastOneOutOfStock||e.isLeastOneDiscontinued)?(c(a),s=t.selectItemInStockLabel):e.code||!e.isLeastOneBackOrder||e.isLeastOneInStock?s=!e.code&&e.isLeastOneOutOfStock?(c(i),o.isButtonNotifyMe=!0,o.statusRed=!0,t.outStockLabel):(c(a),t.inStockLabel):(c(n),s=e.availableInStockDate||t.outStockLabel,o.statusRed=!e.availableInStockDate):(c(a),s=e.availableInStockDate||t.preOrderLabel),o.status=s,o):{}},toggleCheck:function(e){e.preventDefault(),BN.lastClickedVariant=e.target.closest(".variants-item"),null!=(e=BN.lastClickedVariant)&&e.querySelector(".checked-js").click()}}},BN.domContentLoadedFncList.push(function(){BN.VariantsSelection(),"function"==typeof BN.variantCtrl&&(BN.variantCtrl=BN.variantCtrl())});

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.