1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[24728],{857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?u(Array.isArray(t)?[]:{},t,e):t}function o(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function n(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function s(t,e){try{return e in t}catch(t){return!1}}function u(t,r,c){(c=c||{}).arrayMerge=c.arrayMerge||o,c.isMergeableObject=c.isMergeableObject||e,c.cloneUnlessOtherwiseSpecified=i;var a,l,d=Array.isArray(r);return d!==Array.isArray(t)?i(r,c):d?c.arrayMerge(t,r,c):(l={},(a=c).isMergeableObject(t)&&n(t).forEach(function(e){l[e]=i(t[e],a)}),n(r).forEach(function(e){(!s(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(s(t,e)&&a.isMergeableObject(r[e])?l[e]=(function(t,e){if(!e.customMerge)return u;var r=e.customMerge(t);return"function"==typeof r?r:u})(e,a)(t[e],r[e],a):l[e]=i(r[e],a))}),l)}u.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return u(t,r,e)},{})},t.exports=u},446:(t,e,r)=>{r.d(e,{Z:()=>s,y:()=>n});var i=r(293),o=r(49);let n=t=>{if("function"==typeof Event)return new Event(t);let e=document.createEvent("Event");return e.initEvent(t,!0,!0),e};class s extends i.Z{_init(){this.options.buyButtonSelector&&"#productDetailPageBuyProductForm .btn-buy"!==this.options.buyButtonSelector&&(this.options.selectors.buyButton=this.options.buyButtonSelector),this._context={customProductsForm:o.Z.querySelector(document,this.options.selectors.customProductsForm),buyForm:o.Z.querySelector(document,this.options.selectors.buyForm),buyWidget:o.Z.querySelector(document,this.options.selectors.buyWidget),buyButton:o.Z.querySelector(document,this.options.selectors.buyButton),subscription:{buyForm:o.Z.querySelector(document,this.options.selectors.subscription.buyForm,!1),buyWidget:o.Z.querySelector(document,this.options.selectors.subscription.buyWidget,!1),buyButton:o.Z.querySelector(document,this.options.selectors.subscription.buyButton,!1),oneTimeRadio:o.Z.querySelector(document,this.options.selectors.subscription.oneTimeRadio,!1)}},this._wrapAddEventListener(this._context.buyForm,this._context.subscription.buyForm),this._wrapAddEventListener(this._context.buyButton,this._context.subscription.buyButton),super._init()}get buyForm(){return s._isSubscription?this._context.subscription.buyForm:this._context.buyForm}set buyForm(t){console.error("Custom products: Overriding the buyForm like this is deprecated and could result in flaky behavior. Please use the options object instead."),s._isSubscription?this._context.subscription.buyForm=t:this._context.buyForm=t}get buyButton(){return s._isSubscription?this._context.subscription.buyButton:this._context.buyButton}set buyButton(t){console.error("Custom products: Overriding the buyButton like this is deprecated and could result in flaky behavior. Please use the options object instead."),s._isSubscription?this._context.subscription.buyButton=t:this._context.buyButton=t}get buyWidget(){return s._isSubscription?this._context.subscription.buyWidget:this._context.buyWidget}get customProductsForm(){return this._context.customProductsForm}_wrapAddEventListener(t,e){let r=this._contextSwitchingEventListener.bind(this,t,e);t&&(t.addEventListener=r),e&&(e.addEventListener=r)}_contextSwitchingEventListener(t,e,r,i){for(var o=arguments.length,n=Array(o>4?o-4:0),u=4;u<o;u++)n[u-4]=arguments[u];EventTarget.prototype.addEventListener.apply(t,[r,function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s._isSubscription||i(...e)},...n]),e&&EventTarget.prototype.addEventListener.apply(e,[r,function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s._isSubscription&&i(...e)},...n])}}s.options={selectors:{customProductsForm:"form .swag-customized-products",buyForm:"#productDetailPageBuyProductForm",buyWidget:"#productDetailPageBuyProductForm.buy-widget",buyButton:"#productDetailPageBuyProductForm .btn-buy",subscription:{buyForm:"#productDetailPageSubscriptionBuyProductForm",buyWidget:"#productDetailPageSubscriptionBuyProductForm .buy-widget",buyButton:"#productDetailPageSubscriptionBuyProductForm .btn-buy",oneTimeRadio:"#subscription-interval-option-one-time-buy"}}},s._isSubscription=!1},728:(t,e,r)=>{r.r(e),r.d(e,{default:()=>s});var i=r(446);function o(t,e,r){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(r||t):o.value}})(t,e,r||t)}
1function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}class s extends i.Z{init(){this._context.subscription.buyForm&&(this.options.subscriptionAddToCartHref&&this._context.subscription.buyForm.action!==this.options.subscriptionAddToCartHref&&(this._context.subscription.buyForm.action=this.options.subscriptionAddToCartHref),this._switchContext(!this._context.subscription.oneTimeRadio.checked),EventTarget.prototype.addEventListener.apply(this._context.subscription.buyForm,["change",this._onSubscriptionBuyFormChanges.bind(this)]))}_onSubscriptionBuyFormChanges(){this._switchContext(!this._context.subscription.oneTimeRadio.checked),this.customProductsForm.dispatchEvent((0,i.y)("change")),i.Z._isSubscription||this.buyForm.dispatchEvent((0,i.y)("change"))}_switchContext(t){i.Z._isSubscription!==t&&(i.Z._isSubscription=t,this.buyWidget.prepend(this.customProductsForm))}}s.options={...o(n(s),"options",s),subscriptionAddToCartHref:""}},49:(t,e,r)=>{r.d(e,{Z:()=>o});var i=r(140);class o{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!o.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===o.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.replace(/^data(|-)/,""),s=i.Z.toLowerCamelCase(n,"-");if(!o.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let u=t.dataset[s];if(void 0===u){if(r)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return u}return i.Z.parsePrimitive(u)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!o.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(r&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!o.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n select:not([tabindex^="-"]):not([disabled]),\n textarea:not([tabindex^="-"]):not([disabled]),\n button:not([tabindex^="-"]):not([disabled]),\n a[href]:not([tabindex^="-"]):not([disabled]),\n [tabindex]:not([tabindex^="-"]):not([disabled])\n ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},140:(t,e,r)=>{r.d(e,{Z:()=>i});class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=i.toUpperCamelCase(t,e);return i.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},293:(t,e,r)=>{r.d(e,{Z:()=>c});var i=r(857),o=r.n(i),n=r(49),s=r(140);class u{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,o=t.split("."),n=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=n;n=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(o[0],n),this.listeners.push({splitEventName:o,opts:r,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,r)=>([...r.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):t.push(r),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class c{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=s.Z.toDashCase(this._pluginName),r=n.Z.getDataAttribute(this.el,"data-".concat(e,"-config"),!1),i=n.Z.getAttribute(this.el,"data-".concat(e,"-options"),!1),u=[this.constructor.options,this.options,t];r&&u.push(window.PluginConfigManager.get(this._pluginName,r));try{i&&u.push(JSON.parse(i))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(e,'-options" could not be parsed to json: ').concat(t.message))}return o().all(u.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},r=!1){if(!n.Z.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new u(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}}}]);
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.