(()=>{"use strict";var e={665:function(e,t,a){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(a(831)),i=r(a(865)),o=[{tag:"a",handler:n.default},{tag:"button",handler:i.default}];document.addEventListener("DOMContentLoaded",(function(){o.forEach((function(e){Array.from(document.getElementsByTagName(e.tag)).forEach((function(t){t.addEventListener("click",e.handler)}))}))}))},404:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.push1PDEvent=t.blogherads=void 0;var a=window;a.blogherads=a.blogherads||{},a.blogherads.adq=a.blogherads.adq||[],t.blogherads=a.blogherads,t.push1PDEvent=function(e,a){t.blogherads.adq.push((function(){t.blogherads.push1PDEvent(e,a)}))}},865:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formButtonClickHandler=void 0;var r=a(404);t.formButtonClickHandler=function(e){var t=e.currentTarget;if(t instanceof Element&&/(sign up|subscribe|newsletter)/.test(t.innerHTML.toLowerCase())){for(var a={source_id:t.className,source_value:t.innerHTML.trim(),email:""},n=t;n&&"FORM"!==n.tagName;)n=n.parentElement;n&&Array.from(n.children).forEach((function(e){var t,r;if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement){var n=null===(t=e.getAttribute("name"))||void 0===t?void 0:t.toLowerCase(),i=null===(r=e.getAttribute("id"))||void 0===r?void 0:r.toLowerCase(),o=e.value;"source"===n&&(a.source_id=e.id,a.source_value=o),(n&&n.indexOf("email")>=0||i&&i.indexOf("email")>=0)&&(a.email=o)}})),(0,r.push1PDEvent)("newsletter_signup_click",a)}},t.default=t.formButtonClickHandler},831:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.linkClickHandler=void 0;var r=a(404);t.linkClickHandler=function(e){var t,a=e.currentTarget;if(a instanceof Element){var n=a.getAttribute("href"),i=a.getAttribute("data-xid");if(!i&&n){var o=/xid:([^&/])*/gm.exec(n);o&&(i=o[0])}i=(null==i?void 0:i.replace("xid:",""))||"";var d=a.hasAttribute("custom-ga-data")?JSON.parse(a.getAttribute("custom-ga-data")):{},l=!(!d["1pd"]&&!a.getAttribute("data-1pd")),u=d.product||{},c=u.category||a.getAttribute("data-category-name"),s=u.currency||a.getAttribute("data-currency")||"US",v=u.name||a.getAttribute("data-product-name"),f=u.price||a.getAttribute("data-price"),g=d.type||a.getAttribute("data-type"),p=d.partner||a.getAttribute("data-partner");if(!(null==p?void 0:p.length)&&(null==n?void 0:n.length)){var m=null===(t=a.hostname)||void 0===t?void 0:t.split(".");m&&(m.pop(),m.length>1&&m.shift(),p=m.join(),["amazon","amzn"].includes(p)&&(p="Amazon"))}(l||(null==i?void 0:i.length)>0||(null==v?void 0:v.length)>0||(null==g?void 0:g.length)>0)&&(0,r.push1PDEvent)("ecommerce_click",{href:n,xid:i,data_partner:p,data_price:f,data_product_name:v,data_product_category:c,data_product_currency:s,data_type:g})}},t.default=t.linkClickHandler}},t={};!function a(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,a),i.exports}(665)})();