1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[1744],{28807:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var a=s(12737);const i=s(38302).default;class r extends i{constructor(t){super(t),this.adaHandleKeydown()}adaHandleKeydown(t){this.groupNode=this.element,this.radioButtons=[],this.firstRadioButton=null,this.lastRadioButton=null;for(var e=this.groupNode.querySelector(".selected.js_attribute-value[role=radio]"),s=this.groupNode.querySelectorAll(".variation-attribute .js_attribute-value[role=radio]"),a=0;a<s.length;a++){var i=s[a];i.parentElement.classList.contains("giftcard-amount")&&i.classList.remove("selected"),t?t===i?(i.tabIndex=0,i.setAttribute("aria-checked","true")):(i.setAttribute("aria-checked","false"),i.tabIndex=-1):i.classList.contains("selected")?(i.tabIndex=0,i.setAttribute("aria-checked","true")):(i.setAttribute("aria-checked","false"),i.tabIndex=-1),i.addEventListener("keydown",this.handleKeydown.bind(this)),i.addEventListener("focus",this.handleFocus.bind(this)),i.addEventListener("blur",this.handleBlur.bind(this)),this.radioButtons.push(i),this.isSelectableRadio(i)&&(this.firstRadioButton||(this.firstRadioButton=i),this.lastRadioButton=i)}this.firstRadioButton&&!e&&(this.firstRadioButton.tabIndex=0)}isSelectableRadio(t){return t&&!t.classList.contains("d-none")}setChecked(t){let e,s;const i=document.querySelector('[data-component="CartEditLineItemModal"]');i&&(s=i.classList.contains("open")),t.parentElement.classList.contains("giftcard-amount")?(this.adaHandleKeydown(),e={currentItem:t,adaKeydown:!0},a.Z.emit("product:giftCardSelectedValueSelected",e)):(e={element:t,dataset:t.dataset,currentItemClass:t.parentNode.classList},s?(this.adaHandleKeydown(t),$("body").trigger("product:selectedProductAttributesQuickView",t),t.tabIndex=0,t.setAttribute("aria-checked","true")):a.Z.emit("product:selectedProductAttributes",e)),t.focus()}setCheckedToPreviousItem(t){for(var e=this.radioButtons.length,s=this.radioButtons.indexOf(t),a=1;a<=e;a++){var i=this.radioButtons[((s-a)%e+e)%e];if(this.isSelectableRadio(i))return void this.setChecked(i)}}setCheckedToNextItem(t){for(var e=this.radioButtons.length,s=this.radioButtons.indexOf(t),a=1;a<=e;a++){var i=this.radioButtons[(s+a)%e];if(this.isSelectableRadio(i))return void this.setChecked(i)}}handleKeydown(t){var e=t.currentTarget,s=!1;switch(t.key){case" ":case"Enter":this.setChecked(e),s=!0;break;case"Up":case"ArrowUp":case"Left":case"ArrowLeft":this.setCheckedToPreviousItem(e),s=!0;break;case"Down":case"ArrowDown":case"Right":case"ArrowRight":this.setCheckedToNextItem(e),s=!0}s&&(t.stopPropagation(),t.preventDefault())}handleFocus(t){t.currentTarget.classList.add("focus")}handleBlur(t){t.currentTarget.classList.remove("focus")}}}}]);
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.