/*! js-cookie v3.0.5 | MIT */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,function(){"use strict";function e(e){for(var t=1;t__')),null!==(r=window)&&void 0!==r&&null!==(o=r.localStorage)&&void 0!==o&&o.getItem("wccom-tracks-debug"))&&console.debug("%cwccom:tracks%c "+c,"color: #ff32cc;","color: inherit;",null!==(n=e)&&void 0!==n?n:{});var a=function(){void 0===e&&(e={}),wccom.fillReferer(e),e.current_url=window.location.href;var t=new FormData;t.append("action","woothemes_tracks_ajax"),t.append("event_name",c);for(var r=0,o=Object.keys(e);r button.single_docs_button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("a.wccom-bundle-button","a.wccom-mock-bundle-button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("#theme_buynow_link").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("#theme_demo_link").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view demo",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t(".all-themes-pricing .button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t(".woocommerce-cart .graphflow-recommendations a").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view recommendation",eventAction:"cart",eventLabel:t(this).attr("title"),eventValue:""})})),t(".single-product .graphflow-recommendations a").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view recommendation",eventAction:"product",eventLabel:t(this).attr("title"),eventValue:""})})),t("div.product-type-external .cart a.button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view external product",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName})})),t("#wc_introduction .wc_learn_more").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"Overview",eventAction:"WooCommerce",eventLabel:"Overview Video",eventValue:""})})),t(".main-search .title").on("click","a",(function(){var e=t(this).parents(".results-group"),n=t(this).parents(".results-item").index();(10=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,c=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw c}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:window.location.href,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.split("?");return e&&(n[0]=n[0].split("#")[0]),n[1]?{url:n[0],params:this.queryStringToObject(n[1])}:{url:n[0],params:{}}},queryStringToObject:function(t){return(t||window.location.search).replace(/(^\?)/,"").split("&").map(function(t){return this[(t=t.split("="))[0]]=t[1],this}.bind({}))[0]},objectToQueryString:function(t){return Object.keys(t).map((function(e){return t[e]?e+"="+t[e]:e})).join("&")},getLoginUrl:function(){var t=window.location,e=t.pathname,n=t.search,o=t.hash,r="".concat(e).concat(n).concat(o);return"/sso?next=".concat(encodeURIComponent(r))},maybeResizeImage:function(t,e){var n=i.parseUrl(t).params,o=parseInt(n.w);return n&&"number"==typeof e&&Number.isInteger(o)?i.fixedImageSize(t,o,parseInt(o*e),"resize"):t},fixedImageSize:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fit";if(!["fit","resize"].includes(o))return t;var c=i.parseUrl(t),a=c.params;if("object"!==r(a))return t;return["w","h","resize","crop","fit"].forEach((function(t){return delete a[t]})),a[o]=e+","+n,c.url+"?"+this.objectToQueryString(a)},setViewportHeightCSSProperty:function(){var t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(t,"px"))},getIdFromClassList:function(t,e){var n,o=new RegExp("^"+e+"\\-(\\d+)$"),r=c(t);try{for(r.s();!(n=r.n()).done;){var a=n.value.match(o);if(a)return parseInt(a[1])}}catch(t){r.e(t)}finally{r.f()}},uuidv4:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},randomId:function(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)},countWords:function(t){return t.split(/\s+/).filter((function(t){return""!==t})).length},elementInView:function(t){var e=document.querySelector(t);if(!e||null===e.offsetParent)return!1;var n=e.getBoundingClientRect();return 0<=n.top&&0<=n.left&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)},checkTrapContainerVisibility:function(t){var e=t.map((function(t){return new Promise((function(e){var n=window.setInterval((function(){"hidden"!==window.getComputedStyle(t).visibility&&(e(),window.clearInterval(n))}),25)}))}));return Promise.all(e)},roundedMonthlyPrice:function(t){return Math.ceil(t/12*100)/100},getUserLocation:function(){var t=(new Date).getTime();return fetch("https://public-api.wordpress.com/geo/?v="+t).then((function(t){return t.ok?t.json():t.body().then((function(t){throw new Error(t)}))})).catch((function(){return null}))}},u=i;function d(t){var e;return null===(e=document.cookie.split("; ").find((function(e){return e.startsWith(t+"=")})))||void 0===e?void 0:e.split("=")[1]}function s(t,e,n){var o="";if(n){var r=new Date;r.setTime(r.getTime()+864e5*n),o="expires=".concat(r.toUTCString(),"; ")}document.cookie="".concat(t,"=").concat(e,"; ").concat(o,"Path=/; SameSite=None; Secure")}function m(t){document.cookie="".concat(t,"=; Path=/; Max-Age=-99999;")}jQuery((function(){window.dataLayer=window.dataLayer||[];var t="WCCOM_Data_Layer_Geo_v2",e=d(t),n=function(t){"undefined"!=typeof wccomGTMEE&&t&&(wccomGTMEE.geolocation={countryShort:t.country_short,countryLong:t.country_long,region:t.region,city:t.city},dataLayer.push({event:"geolocation",geolocation:wccomGTMEE.geolocation}))};"undefined"!=typeof wccomGTMEE&&wccomGTMEE.productView&&dataLayer.push({event:"visitor interaction",interaction_name:"view product page",ecommerce:{detail:{products:[{category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType}]}}}),"undefined"!=typeof wccomGTMEE&&wccomGTMEE.orderReceivedView&&dataLayer.push({event:"visitor interaction",interaction_name:"transaction confirmation",net_revenue:wccomGTMEE.order.netRevenue,ecommerce:{currencyCode:wccomGTMEE.currencyCode,purchase:{actionField:{id:wccomGTMEE.order.number,affiliation:wccomGTMEE.order.methodOfPayment,revenue:wccomGTMEE.order.total,tax:wccomGTMEE.order.tax,shipping:wccomGTMEE.order.shippingTotal,coupon:wccomGTMEE.order.coupon},products:wccomGTMEE.order.products}}}),e?n(JSON.parse(decodeURIComponent(e))):u.getUserLocation().then((function(e){e&&(s(t,encodeURIComponent(JSON.stringify(e)),1),n(e))})).catch((function(){dataLayer.push({event:"geolocation",geolocation:{}})})),jQuery(".wccom-product-box a.single_add_to_cart_button").not(".wccom-product-single--in-app .wccom-product-box a.single_add_to_cart_button").not(".wccom-product-box--is-free a.single_add_to_cart_button").not(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"buy now"})})),jQuery(".wccom-product-sticky-bottom-bar a.single_add_to_cart_button").not(".wccom-product-single--in-app .wccom-product-sticky-bottom-bar a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-free a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"buy now sticky mobile"})})),jQuery(".wccom-product-box--is-free a.single_add_to_cart_button").not(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"free download"})})),jQuery(".wccom-product-sticky-bottom-bar--is-free a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"free download sticky mobile"})})),jQuery(".wccom-product-sticky-top-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external sticky"})})),jQuery(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external"})})),jQuery(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external sticky mobile"})})),jQuery(".wccom-product-single--in-app .wccom-product-sticky-top-bar a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app sticky"})})),jQuery(".wccom-product-single--in-app .wccom-product-box a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app"})})),jQuery(".wccom-product-single--in-app .wccom-product-sticky-bottom-bar a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app sticky mobile"})})),jQuery(".sf-downloads a.download").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"get woocommerce storefront bottom"})})),jQuery(".storefront-heading a.download").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"get woocommerce storefront top"})})),jQuery(document).on("click",".woocommerce-cart-form a.remove",(function(t){if("undefined"!=typeof wccomGTMEE&&wccomGTMEE.cart){t.preventDefault();var e=jQuery(this).attr("data-product_id");dataLayer.push({event:"visitor interaction",interaction_name:"remove from cart",remove_btn:"remove product",ecommerce:{remove:{products:[{category:wccomGTMEE.cart[e].category,brand:wccomGTMEE.cart[e].brand,name:wccomGTMEE.cart[e].name,id:wccomGTMEE.cart[e].id,variant:wccomGTMEE.cart[e].variant,price:wccomGTMEE.cart[e].price,quantity:wccomGTMEE.cart[e].quantity}]}}}),delete wccomGTMEE.cart[e]}})),jQuery(document).on("click",'.woocommerce-cart-form :input[name="update_cart"]',(function(){if("undefined"!=typeof wccomGTMEE&&wccomGTMEE.cartKeys){var t=wccomGTMEE.cartKeys,e=jQuery(".woocommerce-cart-form"),n=jQuery.fn.formToJSON(e);jQuery.each(t,(function(t,e){var o=e;n["cart["+t+"][qty]"]&&(n["cart["+t+"][qty]"]>e.quantity?(o.quantity=n["cart["+t+"][qty]"]-o.quantity,dataLayer.push({event:"visitor interaction",interaction_name:"add to cart",add_to_cart_btn:"update cart",ecommerce:{add:{products:[{product:o}]}}})):0===parseInt(n["cart["+t+"][qty]"])?dataLayer.push({event:"visitor interaction",interaction_name:"remove from cart",remove_btn:"update cart",ecommerce:{remove:{products:[{product:o}]}}}):n["cart["+t+"][qty]"]0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"!=typeof wccomGTMEE){var e={event:"visitor interaction",interaction_name:"add to cart",add_to_cart_btn:"add to cart sidebar",ecommerce:{add:{products:[{category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType,price:wccomGTMEE.product.price1,quantity:1}]}}};dataLayer.push(jQuery.extend(e,t))}},jQuery.fn.commenceCheckoutDLPush=function(){if("undefined"!=typeof wccomGTMEE){var t=[];jQuery.each(wccomGTMEE.cart,(function(e,n){t.push(n)})),t.push({category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType,price:wccomGTMEE.product.price1,quantity:1}),dataLayer.push({event:"visitor interaction",page_type:"application process",interaction_name:"commence checkout",ecommerce:{currencyCode:wccomGTMEE.currencyCode,checkout:{actionField:{step:1},products:t}}})}},jQuery.fn.formToJSON=function(t){var e=t.serializeArray(),n={};return jQuery.map(e,(function(t){n[t.name]=t.value})),n};var l=wp.hooks;"undefined"!=typeof vendorGoogleAnalyticsTagId&&(0,l.addAction)("wccom_buy_now_button_clicked","wccom",(function(){"undefined"!=typeof gtag&>ag("event","wccom_buy_now_button_click",{send_to:vendorGoogleAnalyticsTagId})}));n(3319);window.addEventListener("DOMContentLoaded",(function(){var t="irclickid",e=new URLSearchParams(window.location.search).get(t),n="".concat(t,"-expiration");if(e&&wccom.canTrackUser("analytics")&&e!==d(t)){var o=(new Date).getTime()+2592e6;s(t,e,30),s(n,o,30),m("wccom-refer-affiliate-id")}})),window.addEventListener("DOMContentLoaded",(function(){(0,l.addFilter)("wccom_nux_installation_url","wccom-refer/impact-radius",(function(t){var e=d("irclickid");if(e){var n=new URL(t);return n.searchParams.set("irclickid",e),n.toString()}return t}))})),function(t){/(\?|&)ref=\d+/.test(window.location.search)&&(window.location.search=window.location.search.replace(/(\?|&)ref=/i,"$1aff="));var e=wccom&&wccom.fireTracksEvent||function(){};jQuery((function(){if(window.URLSearchParams){var t=new window.URLSearchParams(window.location.search);if(t.get("aff")&&null===t.get("utm_source")&&null===t.get("utm_medium")&&null===t.get("utm_campaign")){var n={affiliate_id:t.get("aff"),campaign_id:t.get("cid"),sub_id:t.get("sid")};e("refer_visit",n)}}})),t(document).on("referral_tracked",(function(t,n){var o,r,c,a=n.responseJSON||{};if(n.success)o=n.data.affiliate_id,r=n.data.campaign_id,c=n.data.sub_id,a=n.data;else{if(!n.affiliate_id)return a.refer_message=n.message,void e("refer_visit_response_fail",a);a.affiliate_id=o}e("refer_visit_response",a);var i=new window.URLSearchParams(window.location.search);if(null!==i.get("utm_source")||null!==i.get("utm_medium")||null!==i.get("utm_campaign"))return o&&(a.affiliate_id=o),void e("refer_visit_illegal_utm_params_usage",a);var u="wccom-refer-affiliate-id="+o+";",d=new Date;d.setTime(d.getTime()+2592e6);var s=" expires="+d.toGMTString()+";",l=" path=/;";document.cookie=u+s+l,m("irclickid");var p={};r&&String(r).match(/^\d+$/)&&(p.campaignId=r),c&&(p.subId=String(c).substring(0,255));var f="wccom-refer-affiliate-meta="+JSON.stringify(p)+";";document.cookie=f+s+l})),t(document).on("referral_tracked_error",(function(t,n){var o=n.responseJSON||{};o.status=n.status||"",e("refer_visit_response_error",o)}))}(jQuery);n(9983),n(8926),n(7499)}()}();;