1function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,_toPropertyKey(c.key),c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"===_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!==_typeof(a)||null===a)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if("object"!==_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&_setPrototypeOf(a,b)}function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _possibleConstructorReturn(a,b){if(b&&("object"===_typeof(b)||"function"==typeof b))return b;if(void 0!==b)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(a)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _wrapNativeSuper(a){var b="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(a){function c(){return _construct(a,arguments,_getPrototypeOf(this).constructor)}if(null===a||!_isNativeFunction(a))return a;if("function"!=typeof a)throw new TypeError("Super expression must either be null or a function");if("undefined"!=typeof b){if(b.has(a))return b.get(a);b.set(a,c)}return c.prototype=Object.create(a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(c,a)},_wrapNativeSuper(a)}function _construct(){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function(b,c,d){var e=[null];e.push.apply(e,c);var a=Function.bind.apply(b,e),f=new a;return d&&_setPrototypeOf(f,d.prototype),f},_construct.apply(null,arguments)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function _isNativeFunction(a){return-1!==Function.toString.call(a).indexOf("[native code]")}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(a)}if(!customElements.get("cart-disclosure-modal")){var CartDisclosureModal=/*#__PURE__*/function(a){function b(){var a;return _classCallCheck(this,b),a=c.call(this),a.onOpenerClick=a.onOpenerClick.bind(_assertThisInitialized(a)),a.onCloseClick=a.onCloseClick.bind(_assertThisInitialized(a)),a.onModalClick=a.onModalClick.bind(_assertThisInitialized(a)),a.onKeyUp=a.onKeyUp.bind(_assertThisInitialized(a)),a.removeIfOpenerDisconnected=a.removeIfOpenerDisconnected.bind(_assertThisInitialized(a)),a}_inherits(b,a);var c=_createSuper(b);
1return _createClass(b,[{key:"connectedCallback",value:function connectedCallback(){var a,b,c,d,e=this;if(!this.initialized){this.initialized=!0,this.dialog=this.querySelector("[role=\"dialog\"]");var f=null===(a=this.dialog)||void 0===a?void 0:a.id;this.opener=null!==(b=this.previousElementSibling)&&void 0!==b&&b.classList.contains("cart-item__disclosure")?this.previousElementSibling:f?document.querySelector("[aria-controls=\"".concat(f,"\"]")):null,this.closeButton=this.querySelector("[data-cart-disclosure-close]");var g=!1;document.querySelectorAll("cart-disclosure-modal").forEach(function(a){a===e||a.id!==e.id||(g=g||a.hasAttribute("open"),a.remove())}),null===(c=this.opener)||void 0===c||c.addEventListener("click",this.onOpenerClick),null===(d=this.closeButton)||void 0===d||d.addEventListener("click",this.onCloseClick),this.addEventListener("click",this.onModalClick),this.addEventListener("keyup",this.onKeyUp),this.parentElement!==document.body&&(this.isMoving=!0,document.body.appendChild(this),this.isMoving=!1),this.observeOpener(),g&&this.show()}}},{key:"disconnectedCallback",value:function disconnectedCallback(){var a,b,c;this.isMoving||(null===(a=this.openerObserver)||void 0===a||a.disconnect(),null===(b=this.opener)||void 0===b||b.removeEventListener("click",this.onOpenerClick),null===(c=this.closeButton)||void 0===c||c.removeEventListener("click",this.onCloseClick),this.removeEventListener("click",this.onModalClick),this.removeEventListener("keyup",this.onKeyUp),this.hasAttribute("open")&&this.hide(!1))}},{key:"observeOpener",value:function observeOpener(){var a;null===(a=this.openerObserver)||void 0===a||a.disconnect(),this.opener&&(this.openerObserver=new MutationObserver(this.removeIfOpenerDisconnected),this.openerObserver.observe(document.body,{childList:!0,subtree:!0}),this.removeIfOpenerDisconnected())}},{key:"removeIfOpenerDisconnected",value:function removeIfOpenerDisconnected(){var a;this.isMoving||!this.isConnected||null!==(a=this.opener)&&void 0!==a&&a.isConnected||this.remove()}},{key:"onOpenerClick",value:function onOpenerClick(a){a.preventDefault(),a.stopPropagation(),this.show()}},{key:"onCloseClick",value:function onCloseClick(a){a.preventDefault(),a.stopPropagation(),this.hide()}},{key:"onModalClick",value:function onModalClick(a){a.stopPropagation(),a.target===this&&this.hide()}},{key:"onKeyUp",value:function onKeyUp(a){"ESCAPE"!==a.code.toUpperCase()||(a.preventDefault(),a.stopPropagation(),this.hide())}},{key:"show",value:function show(){var a,b=this;if(!this.hasAttribute("open")){if(document.querySelectorAll("cart-disclosure-modal[open]").forEach(function(a){a!==b&&a.hide(!1)}),this.lockScroll(),this.setAttribute("open",""),null===(a=this.opener)||void 0===a||a.setAttribute("aria-expanded","true"),"function"==typeof trapFocus)trapFocus(this,this.dialog);else{var c;null===(c=this.dialog)||void 0===c||c.focus()}window.pauseAllMedia()}}},{key:"hide",value:function hide(){var a,b=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];this.hasAttribute("open")&&(this.removeAttribute("open"),null===(a=this.opener)||void 0===a||a.setAttribute("aria-expanded","false"),this.unlockScroll(),b?this.restoreFocusTrap():"function"==typeof removeTrapFocus&&removeTrapFocus(),window.pauseAllMedia())}},{key:"lockScroll",value:function lockScroll(){if(this.bodyOverflowWasHidden=document.body.classList.contains("overflow-hidden"),this.previousBodyPaddingRight=document.body.style.paddingRight,!this.bodyOverflowWasHidden){var a=window.innerWidth-document.documentElement.clientWidth;if(0<a){var b=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight="".concat(b+a,"px")}document.body.classList.add("overflow-hidden")}}},{key:"unlockScroll",value:function unlockScroll(){this.bodyOverflowWasHidden||(document.body.classList.remove("overflow-hidden"),document.body.style.paddingRight=this.previousBodyPaddingRight)}},{key:"restoreFocusTrap",value:function restoreFocusTrap(){var a,b,c=null===(a=this.opener)||void 0===a?void 0:a.closest("cart-drawer.active"),d=null===(b=this.opener)||void 0===b||null===(b=b.closest("cart-notification"))||void 0===b?void 0:b.querySelector("#cart-notification.active");if(c&&"function"==typeof trapFocus){var e=c.classList.contains("is-empty")?c.querySelector(".drawer__inner-empty"):document.getElementById("CartDrawer");if(e)return void trapFocus(e,this.opener)}if(d&&"function"==typeof trapFocus)return void trapFocus(d,this.opener);if("function"==typeof removeTrapFocus)removeTrapFocus(this.opener);else{var f;
1null===(f=this.opener)||void 0===f||f.focus()}}}]),b}(/*#__PURE__*/_wrapNativeSuper(HTMLElement));customElements.define("cart-disclosure-modal",CartDisclosureModal)}
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.