(()=>{"use strict";var e={};function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function r(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){let t=e.replace(/[^\d.,]/g,"").trim();const r=t.lastIndexOf(","),o=t.lastIndexOf(".");return r>-1&&o>-1?t=r>o?t.replace(/\./g,"").replace(",","."):t.replace(/,/g,""):r>-1?t=3===t.length-r?t.replace(",","."):t.replace(/,/g,""):o>-1&&3!==t.length-o&&(t=t.replace(/\./g,"")),parseFloat(t)||0}e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),((e,i)=>{if(!e)return;const n=e("body"),l=globalThis._googlesitekit.easyDigitalDownloadsCurrency;var a,c;n.on("edd_cart_item_added",(e,t)=>{var r,i;const n=o(t.total),a=function(e){var t,r,i;const n=(new DOMParser).parseFromString(e,"text/html");return{id:(null===(t=n.querySelector(".edd-remove-from-cart"))||void 0===t?void 0:t.dataset.downloadId)||"",name:(null===(r=n.querySelector(".edd-cart-item-title"))||void 0===r?void 0:r.textContent.trim())||"",price:o((null===(i=n.querySelector(".edd-cart-item-price"))||void 0===i?void 0:i.textContent.trim())||"")}}(t.cart_item),c=a.id,u=a.name,d=a.price;null===(r=globalThis._googlesitekit)||void 0===r||null===(i=r.gtagEvent)||void 0===i||i.call(r,"add_to_cart",{currency:l,value:n,items:[{item_id:c,item_name:u,price:d}]})}),null!==(i=globalThis._googlesitekit)&&void 0!==i&&null!==(i=i.edddata)&&void 0!==i&&i.purchase&&(null===(a=globalThis._googlesitekit)||void 0===a||null===(c=a.gtagEvent)||void 0===c||c.call(a,"purchase",function(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?t(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}({currency:l},globalThis._googlesitekit.edddata.purchase)))})(globalThis.jQuery)})();