Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more - Version 1.16.12

Version Description

XX.XX.2022

  • Tweak: Added a new event listener for the Complianz Cookie Banner
Download this release

Release Info

Developer alekv
Plugin Icon 128x128 Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more
Version 1.16.12
Comparing to
See all releases

Code changes from version 1.16.11 to 1.16.12

classes/pixels/google/class-google.php CHANGED
@@ -418,9 +418,11 @@ class Google extends Pixel
418
  $item_index = 1;
419
  foreach ( $refund->get_items() as $item_id => $item ) {
420
  // $product = new WC_Product($refund_item->get_product_id());
421
- $order_item_data = $this->google->get_order_item_data( $item );
422
  $data['pr' . $item_index . 'id'] = $order_item_data['id'];
423
  $data['pr' . $item_index . 'qt'] = -1 * $order_item_data['quantity'];
 
 
424
  $item_index++;
425
  }
426
  return $data;
418
  $item_index = 1;
419
  foreach ( $refund->get_items() as $item_id => $item ) {
420
  // $product = new WC_Product($refund_item->get_product_id());
421
+ $order_item_data = $this->get_order_item_data( $item );
422
  $data['pr' . $item_index . 'id'] = $order_item_data['id'];
423
  $data['pr' . $item_index . 'qt'] = -1 * $order_item_data['quantity'];
424
+ // $data['pr' . $item_index . 'qt'] = $order_item_data['quantity'];
425
+ $data['pr' . $item_index . 'pr'] = $order_item_data['price'];
426
  $item_index++;
427
  }
428
  return $data;
js/public/wpm-public.p1.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.facebook)||void 0===o||!o.loaded)return;let e=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;wpm.fbViewContent(t)}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;let o=wpm.getRandomEventId();fbq("track","Search",{},{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:o,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()},{eventID:wpmDataLayer.order.id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,e=window,t=document,a="script",e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(r=t.createElement(a)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),fbq("init",wpmDataLayer.pixels.facebook.pixel_id),fbq("track","PageView")}catch(a){console.error(a)}var e,t,a,o,r,i},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>o||e.getFbUserDataFromBrowser(),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>({fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc"),client_user_agent:navigator.userAgent}),e.fbViewContent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:i}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:i,user_data:e.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}},e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("trackCustom",t,{},{eventID:i}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:i,user_data:e.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,s,d,l,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,s,d,l,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,s,d,l,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:(t.quantity?t.quantity:1)*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var l,c;if(null!==(l=wpmDataLayer)&&void 0!==l&&null!==(c=l.general)&&void 0!==c&&c.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;u.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:u})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpm.getGoogleAdsConversionIdentifiers()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},s={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(s={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...s})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){let o=[];e.getGoogleAdsConversionIdentifiersWithLabel=function(){for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))o.push(e+"/"+t);return o},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d,l;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.universal)&&void 0!==l&&l.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d,l;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,s,d,l,c,u,p,g,m,y,w,v,_,f,h;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.ads)&&void 0!==d&&d.conversionIds&&null!==(l=wpmDataLayer)&&void 0!==l&&null!==(c=l.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(g=wpmDataLayer)&&void 0!==g&&null!==(m=g.pixels)&&void 0!==m&&null!==(y=m.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),"order_received_page"===wpmDataLayer.shop.page_type&&null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&null!==(f=_.google)&&void 0!==f&&null!==(h=f.ads)&&void 0!==h&&h.enhanced_conversion_data&&(window.enhanced_conversion_data=wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{wpmDataLayer.pixels.google.analytics.ga4.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,wpmDataLayer.pixels.google.analytics.ga4.parameters),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,s,d,l,c,u,p,g;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,s,d,l;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).done((function(t,a){try{var o,r,i,n,s,d,l,c,u,p,g,m,y,w,v,_,f,h,L,D,C,b;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var x,j,k,I;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(x=wpmDataLayer)&&void 0!==x&&null!==(j=x.pixels)&&void 0!==j&&null!==(k=j.google)&&void 0!==k&&null!==(I=k.consent_mode)&&void 0!==I&&I.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(s=wpmDataLayer)&&void 0!==s&&null!==(d=s.pixels)&&void 0!==d&&null!==(l=d.google)&&void 0!==l&&null!==(c=l.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(g=p.google)||void 0===g||null===(m=g.ads)||void 0===m?void 0:m.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(C=D.analytics)&&void 0!==C&&null!==(b=C.ga4)&&void 0!==b&&b.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,s;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(s=n.optimize)&&void 0!==s&&s.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,s,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(s=n.pixels)&&void 0!==s&&null!==(d=s.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a&&arguments[0];if(t=e.getCookie("CookieConsent"))t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,i.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),i.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var s,d,l,c,u,p,g,m;t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(s=t)||void 0===s||null===(d=s.consents)||void 0===d||!d.statistics),i.categories.ads=!(null===(l=t)||void 0===l||null===(c=l.consents)||void 0===c||!c.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p?void 0:p.statistics)||[],...(null===(g=t)||void 0===g||null===(m=g.consents)||void 0===m?void 0:m.marketing)||[]],i.mode="pixel"}else(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,i.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],i.visitorHasChosen=!0):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,i.visitorHasChosen=!0):(i.categories.analytics=!n,i.categories.ads=!n)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)'):console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),window.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),jQuery(document).trigger("wpmPreLoadPixels",{})},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){let o=!(arguments.length>0&&arguments[0]!==a)||arguments[0],r=!(arguments.length>1&&arguments[1]!==a)||arguments[1];t.each(t('script[type="blocked/javascript"]'),(function(a,i){(t(i).data("wpm-cookie-category").includes("analytics")&&o||t(i).data("wpm-cookie-category").includes("ads")&&r)&&e.unblockScript(i,!0)})),jQuery(document).trigger("wpmPreLoadPixels",{})},e.unblockSelectedPixels=()=>{t.each(t('script[type="blocked/javascript"]'),(function(a,o){(i.pixels.includes(t(o).data("wpm-pixel-name"))||"google"===t(o).data("wpm-pixel-name")&&["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&e.unblockScript(o,!0)})),jQuery(document).trigger("wpmPreLoadPixels",{})},window.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),window.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),window.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),window.addEventListener("CookieScriptAcceptAll",(()=>{e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),document.addEventListener("cmplzStatusChange",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(){e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0})}(window.wpm=window.wpm||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(function(){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=wpm.getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.error(e)}})),jQuery(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout"].join(","),(function(){jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(function(){!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(function(){!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.error(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")})),jQuery((function(){jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.error(e)}}))})),jQuery((function(){jQuery(".single_variation_wrap").on("hide_variation",(function(){try{var e,t;let i=jQuery("body").attr("class").match(/(postid-)(\d+)/)[2];if(!i)throw Error("Wasn't able to retrieve a productId");if("variable"===wpmDataLayer.shop.product_type&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.variationsOutput){var a,o,r;for(const[e,t]of Object.entries(wpmDataLayer.products))if("parentId"in t){i=t.id;break}null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.microdata_product_id&&(i=wpmDataLayer.pixels.facebook.microdata_product_id)}if(wpmDataLayer.products&&wpmDataLayer.products[i]){let e=wpm.getProductDetailsFormattedForEvent(i);jQuery(document).trigger("wpmViewItem",e)}}catch(e){console.error(e)}}))})),jQuery(window).on("wpmLoad",(function(){try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(window).on("wpmLoad",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("wpmLoad",(function(){if(!wpm.getCookie("wpmReferrer"))if(document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host?wpm.setCookie("wpmReferrer",e):wpm.setCookie("wpmReferrer","")}else wpm.setCookie("wpmReferrer","")})),jQuery(window).on("wpmLoad",(function(){try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a;if(jQuery(document).trigger("wpmLoadAlways"),"product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id)):jQuery(document).trigger("wpmEverywhereElse");null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(window).on("wpmPreLoadPixels",(function(){var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&wpm.updateConsentCookieValues(!0),jQuery(document).trigger("wpmLoadPixels",{})}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=()=>{if(window.sessionStorage.getItem(r))return JSON.parse(window.sessionStorage.getItem(r));e.testEndpoint()},e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:r;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];n()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!n()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.error(e)}},e.getProductsFromBackend=t=>{if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let s,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let l,c=0,u=()=>{l=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),s=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),l.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),s.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&g(this)&&(jQuery(this).data("ioid",c++),s.observe(this))}))}))})),g=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=t=>{try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=(e,t)=>(t=jQuery.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)),e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e)}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("WooCommerce Pixel Manager: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),jQuery(document).trigger("wpmPreLoadPixels",{})})).then((function(){wpm.pageLoaded().then((function(){jQuery(document).trigger("wpmLoad",{})}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a(534),wpm.jQueryExists().then((function(){a(299),a(69),a(12),a(787),a(207)}))})();
2
  //# sourceMappingURL=wpm-public.p1.min.js.map
1
+ (()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.facebook)||void 0===o||!o.loaded)return;let e=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;wpm.fbViewContent(t)}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;let o=wpm.getRandomEventId();fbq("track","Search",{},{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:o,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()},{eventID:wpmDataLayer.order.id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,e=window,t=document,a="script",e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(r=t.createElement(a)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),fbq("init",wpmDataLayer.pixels.facebook.pixel_id),fbq("track","PageView")}catch(a){console.error(a)}var e,t,a,o,r,i},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>o||e.getFbUserDataFromBrowser(),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>({fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc"),client_user_agent:navigator.userAgent}),e.fbViewContent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:i}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:i,user_data:e.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}},e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("trackCustom",t,{},{eventID:i}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:i,user_data:e.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,s,d,l,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,s,d,l,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,s,d,l,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:(t.quantity?t.quantity:1)*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var l,c;if(null!==(l=wpmDataLayer)&&void 0!==l&&null!==(c=l.general)&&void 0!==c&&c.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;u.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:u})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpm.getGoogleAdsConversionIdentifiers()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},s={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(s={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...s})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){let o=[];e.getGoogleAdsConversionIdentifiersWithLabel=function(){for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))o.push(e+"/"+t);return o},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d,l;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.universal)&&void 0!==l&&l.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d,l;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,s,d,l,c,u,p,g,m,y,w,v,_,f,h;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.ads)&&void 0!==d&&d.conversionIds&&null!==(l=wpmDataLayer)&&void 0!==l&&null!==(c=l.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(g=wpmDataLayer)&&void 0!==g&&null!==(m=g.pixels)&&void 0!==m&&null!==(y=m.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),"order_received_page"===wpmDataLayer.shop.page_type&&null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&null!==(f=_.google)&&void 0!==f&&null!==(h=f.ads)&&void 0!==h&&h.enhanced_conversion_data&&(window.enhanced_conversion_data=wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{wpmDataLayer.pixels.google.analytics.ga4.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,wpmDataLayer.pixels.google.analytics.ga4.parameters),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,s,d,l,c,u,p,g;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,s,d,l;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).done((function(t,a){try{var o,r,i,n,s,d,l,c,u,p,g,m,y,w,v,_,f,h,L,D,C,j;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var b,x,k,I;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(b=wpmDataLayer)&&void 0!==b&&null!==(x=b.pixels)&&void 0!==x&&null!==(k=x.google)&&void 0!==k&&null!==(I=k.consent_mode)&&void 0!==I&&I.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(s=wpmDataLayer)&&void 0!==s&&null!==(d=s.pixels)&&void 0!==d&&null!==(l=d.google)&&void 0!==l&&null!==(c=l.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(g=p.google)||void 0===g||null===(m=g.ads)||void 0===m?void 0:m.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(C=D.analytics)&&void 0!==C&&null!==(j=C.ga4)&&void 0!==j&&j.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,s;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(s=n.optimize)&&void 0!==s&&s.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,s,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(s=n.pixels)&&void 0!==s&&null!==(d=s.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a?arguments[0]:null,s=arguments.length>1&&arguments[1]!==a?arguments[1]:null,d=arguments.length>2&&arguments[2]!==a&&arguments[2];if(n||s)n&&(i.categories.analytics=!!n),s&&(i.categories.ads=!!s);else if(t=e.getCookie("CookieConsent"))t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,i.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),i.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var l,c,u,p,g,m,y,w;t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(l=t)||void 0===l||null===(c=l.consents)||void 0===c||!c.statistics),i.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(g=t)||void 0===g||null===(m=g.consents)||void 0===m?void 0:m.statistics)||[],...(null===(y=t)||void 0===y||null===(w=y.consents)||void 0===w?void 0:w.marketing)||[]],i.mode="pixel"}else(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,i.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],i.visitorHasChosen=!0):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,i.visitorHasChosen=!0):(i.categories.analytics=!d,i.categories.ads=!d)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)'):console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),jQuery(document).on("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),jQuery(document).trigger("wpmPreLoadPixels",{})},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){jQuery(document).trigger("wpmPreLoadPixels",{})},e.unblockSelectedPixels=()=>{jQuery(document).trigger("wpmPreLoadPixels",{})},jQuery(document).on("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),jQuery(document).on("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),jQuery(document).on("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),jQuery(document).on("CookieScriptAcceptAll",(()=>{e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)},jQuery(document).on("cmplzStatusChange",e.cmplzStatusChange),jQuery(document).on("cmplz_status_change",e.cmplzStatusChange),jQuery(document).on("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(){e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(function(){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=wpm.getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.error(e)}})),jQuery(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout"].join(","),(function(){jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(function(){!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(function(){!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.error(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")})),jQuery((function(){jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.error(e)}}))})),jQuery((function(){jQuery(".single_variation_wrap").on("hide_variation",(function(){try{var e,t;let i=jQuery("body").attr("class").match(/(postid-)(\d+)/)[2];if(!i)throw Error("Wasn't able to retrieve a productId");if("variable"===wpmDataLayer.shop.product_type&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.variationsOutput){var a,o,r;for(const[e,t]of Object.entries(wpmDataLayer.products))if("parentId"in t){i=t.id;break}null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.microdata_product_id&&(i=wpmDataLayer.pixels.facebook.microdata_product_id)}if(wpmDataLayer.products&&wpmDataLayer.products[i]){let e=wpm.getProductDetailsFormattedForEvent(i);jQuery(document).trigger("wpmViewItem",e)}}catch(e){console.error(e)}}))})),jQuery(window).on("wpmLoad",(function(){try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(window).on("wpmLoad",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("wpmLoad",(function(){if(!wpm.getCookie("wpmReferrer"))if(document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host?wpm.setCookie("wpmReferrer",e):wpm.setCookie("wpmReferrer","")}else wpm.setCookie("wpmReferrer","")})),jQuery(window).on("wpmLoad",(function(){try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a;if(jQuery(document).trigger("wpmLoadAlways"),"product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id)):jQuery(document).trigger("wpmEverywhereElse");null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(window).on("wpmPreLoadPixels",(function(){var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=()=>{if(window.sessionStorage.getItem(r))return JSON.parse(window.sessionStorage.getItem(r));e.testEndpoint()},e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:r;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];n()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!n()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.error(e)}},e.getProductsFromBackend=t=>{if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let s,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let l,c=0,u=()=>{l=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),s=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),l.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),s.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&g(this)&&(jQuery(this).data("ioid",c++),s.observe(this))}))}))})),g=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=t=>{try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=(e,t)=>(t=jQuery.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)),e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e)}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("WooCommerce Pixel Manager: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),jQuery(document).trigger("wpmPreLoadPixels",{})})).then((function(){wpm.pageLoaded().then((function(){jQuery(document).trigger("wpmLoad",{})}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a(534),wpm.jQueryExists().then((function(){a(299),a(69),a(12),a(787),a(207)}))})();
2
  //# sourceMappingURL=wpm-public.p1.min.js.map
js/public/wpm-public.p1.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wpm-public.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,WAAY,gBAEhC,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,E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KAuBRA,EAAQ,S","sources":["webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/cookie_consent.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/init.js","webpack://WooCommerce-Pixel-Manager/webpack/bootstrap","webpack://WooCommerce-Pixel-Manager/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToCart\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"InitiateCheckout\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.fbViewContent(product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"Search\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\",\n\t\t\t{\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t\t{eventID: wpmDataLayer.order.id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fBUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need the first one for InitiateCheckout\n\t\t * where getting the user_data from the browser is too slow\n\t\t * using wpm.getCookie(), so we cache the user_data earlier.\n\t\t * And we need the second one because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user_data is too slow. But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t */\n\n\t\tif (fBUserData) {\n\t\t\treturn fBUserData\n\t\t} else {\n\t\t\treturn wpm.getFbUserDataFromBrowser()\n\t\t}\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfBUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => ({\n\t\tfbp : wpm.getCookie(\"_fbp\"),\n\t\tfbc : wpm.getCookie(\"_fbc\"),\n\t\tclient_user_agent: navigator.userAgent,\n\t})\n\n\twpm.fbViewContent = product => {\n\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"track\", \"ViewContent\", {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_name: product.name,\n\t\t\t\t// content_category: product.category,\n\t\t\t\tcontent_ids: product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t\tvalue : product.price,\n\t\t\t}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : \"ViewContent\",\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tproduct_data : product,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, {}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : (product.quantity ? product.quantity : 1) * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\t// value : 1 * product.price,\n\t\t\t\titems: products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t\t})\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n\n\n\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet conversionIdentifiers = []\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t}\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\twindow.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, wpmDataLayer.pixels.google.analytics.ga4.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.done(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .done(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\twindow.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// console.log('unblocking all scripts')\n\n\t\t$.each(\n\t\t\t$(\"script[type=\\\"blocked/javascript\\\"]\"), function (index, scriptNode) {\n\n\t\t\t\tif ($(scriptNode).data(\"wpm-cookie-category\").includes(\"analytics\") && analytics) {\n\t\t\t\t\twpm.unblockScript(scriptNode, true)\n\t\t\t\t} else if ($(scriptNode).data(\"wpm-cookie-category\").includes(\"ads\") && ads) {\n\t\t\t\t\twpm.unblockScript(scriptNode, true)\n\t\t\t\t}\n\t\t\t})\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t$.each(\n\t\t\t$(\"script[type=\\\"blocked/javascript\\\"]\"), function (index, node) {\n\n\t\t\t\tif (wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\t\twpm.unblockScript(node, true)\n\t\t\t\t} else if ($(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\t\twpm.unblockScript(node, true)\n\t\t\t\t}\n\t\t\t})\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\twindow.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\twindow.addEventListener(\"CookiebotOnAccept\", () => {\n\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\twindow.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\twindow.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t// Complianz Cookie\n\t// If visitor accepts cookies in Complianz unblock the scripts\n\tdocument.addEventListener(\"cmplzStatusChange\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\tjQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", function () {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(this).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\n// jQuery('.add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .js-ajax-add-to-cart, .single_add_to_cart_button, .btn_color-2').on('click', function (e) {\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", function () {\n\n\ttry {\n\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(this).attr(\"href\") !== \"undefined\" && jQuery(this).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tlet quantity = 1\n\t\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t} else {\n\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(this).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"variable\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each(function () {\n\n\t\t\t\t\t\tlet quantity = Number(jQuery(this).find(\".input-text.qty\").val())\n\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\t\tlet classes = jQuery(this).attr(\"class\")\n\t\t\t\t\t\tlet productId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\tlet quantity = 1\n\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", function (event) {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", function () {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(this).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), function () {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", function () {\n\n\tif (wpm.isEmail(jQuery(this).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", function () {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", function () {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", function () {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each(function () {\n\n\t\t\tlet url = new URL(jQuery(this).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(this).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(document).on(\"click\", \".add_to_wishlist, .wl-add-to\", function () {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(this).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"productid\")\n\t\t} else if (jQuery(this).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"updated_cart_totals\", function () {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", function (event, variation) {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n\n\t\ttry {\n\t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n\t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t/**\n\t\t\t * If we have a variable product with no preset,\n\t\t\t * and variations output is enabled,\n\t\t\t * then we send a viewItem event with the first\n\t\t\t * variation we find for the parent.\n\t\t\t * If variations output is disabled,\n\t\t\t * we just send the parent ID.\n\t\t\t *\n\t\t\t * And if Facebook microdata is active, use the\n\t\t\t * microdata product ID.\n\t\t\t */\n\n\t\t\tif (\n\t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n\t\t\t\twpmDataLayer?.general?.variationsOutput\n\t\t\t) {\n\t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t\t\tif (\"parentId\" in product) {\n\n\t\t\t\t\t\tproductId = product.id\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n\t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(window).on(\"wpmLoad\", function () {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(window).on(\"wpmLoad\", function () {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t} else {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t\t}\n\n\t\t} else {\n\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (\"product\" === wpmDataLayer.shop.page_type && \"variable\" !== wpmDataLayer.shop.product_type && wpm.getMainProductIdFromProductPage()) {\n\n\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\n\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\n\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\n\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\n\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\n\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Load all pixels\n */\njQuery(window).on(\"wpmPreLoadPixels\", function () {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\twpm.updateConsentCookieValues(true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookieWpmRestEndpointAvailable: \"_wpm_endpoint_available\",\n\t\trestEndpoint : \"/wp-json/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable))\n\t\t} else {\n\t\t\t// return wpm.testEndpoint();\n\t\t\t// just set the value whenever possible in order not to wait or block the main thread\n\t\t\twpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\twpm.testEndpoint = (\n\t\turl = location.protocol + \"//\" + location.host + wpmRestSettings.restEndpoint,\n\t\tcookieName = wpmRestSettings.cookieWpmRestEndpointAvailable,\n\t) => {\n\t\t// console.log('testing endpoint');\n\n\t\tjQuery.ajax(url, {\n\t\t\ttype : \"HEAD\",\n\t\t\ttimeout: 1000,\n\t\t\t// async: false,\n\t\t\tstatusCode: {\n\t\t\t\t200: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, true);\n\t\t\t\t\t// console.log('endpoint works');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\t\t},\n\t\t\t\t404: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t\t0 : function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t},\n\t\t}).then(response => {\n\t\t\t// console.log('test done')\n\t\t\t// console.log('result: ' + JSON.parse(window.sessionStorage.getItem(cookieName)));\n\t\t\t// return JSON.parse(window.sessionStorage.getItem(cookieName));\n\t\t})\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookieWpmRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_get_cart_items\",\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (cartItems) {\n\n\t\t\t\t\t\t// save all cart items into wpmDataLayer\n\n\t\t\t\t\t\tif (!cartItems[\"cart\"]) cartItems[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(cartItems[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(cartItems[\"cart\"]))\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = productIds => {\n\n\n\t\t// reduce productIds by products already in the dataLayer\n\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_get_product_ids\",\n\t\t\t\tproductIds: productIds,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (products) {\n\n\t\t\t\t\t\t// merge products into wpmDataLayer.products\n\t\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, products)\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = orderId => {\n\n\t\ttry {\n\t\t\t// save the state in the database\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_purchase_pixels_fired\",\n\t\t\t\torder_id: orderId,\n\t\t\t\t// nonce : ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tif (response.success === false) {\n\t\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = (url, options) => {\n\n\t\t// Allow user to set any option except for dataType, cache, and url\n\t\toptions = jQuery.extend(options || {}, {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t})\n\n\t\t// Use $.ajax() since it is more flexible than $.getScript\n\t\t// Return the jqXHR object so we can chain callbacks\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"WooCommerce Pixel Manager: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tjQuery(document).trigger(\"wpmLoad\", {})\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","product","eventId","getRandomEventId","fbq","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","eventID","shop","trigger","event_name","event_id","user_data","getFbUserData","product_data","product_id","event_source_url","window","location","href","e","console","error","fbViewContent","setFbUserData","order","value_filtered","facebookContentIds","id","$","undefined","fBUserData","f","b","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","Math","random","toString","substring","getFbUserDataFromBrowser","fbp","getCookie","fbc","client_user_agent","navigator","userAgent","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","gtagLoaded","then","gtag","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","getGoogleAdsDynamicRemarketingOrderItems","data_basic","data_with_cart","getGoogleAdsConversionIdentifiersWithLabel","transaction_id","number","new_customer","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","state","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","done","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","indexOf","JSON","parse","action","length","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","data","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","addEventListener","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","removeAttr","unblockAllScripts","each","index","unblockSelectedPixels","Cookiebot","consent","detail","huObserver","hu","documentElement","body","url","URL","this","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","cart","getCartItemsFromBackend","variation","microdata_product_id","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","setCookie","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","user","hasLoginEventFired","setLoginEventFired","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","sessionStorage","getItem","testEndpoint","protocol","cookieName","ajax","timeout","statusCode","response","setItem","stringify","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","email","test","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","dataType","ajax_url","success","cartItems","filter","hasOwnProperty","assign","cartObject","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","getSearchTermFromUrl","URLSearchParams","search","get","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","getWpmSessionData","setWpmSessionData","order_id","nonce","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","extend","cache","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"wpm-public.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,WAAY,gBAEhC,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,EAAgCE,QAC5EC,IAAIC,SAAS,MAAO,iBAAiBD,IAAIE,uBAM/CV,OAAOC,UAAUC,GAAG,gB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webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/cookie_consent.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/init.js","webpack://WooCommerce-Pixel-Manager/webpack/bootstrap","webpack://WooCommerce-Pixel-Manager/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToCart\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"InitiateCheckout\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.fbViewContent(product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"Search\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\",\n\t\t\t{\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t\t{eventID: wpmDataLayer.order.id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fBUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need the first one for InitiateCheckout\n\t\t * where getting the user_data from the browser is too slow\n\t\t * using wpm.getCookie(), so we cache the user_data earlier.\n\t\t * And we need the second one because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user_data is too slow. But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t */\n\n\t\tif (fBUserData) {\n\t\t\treturn fBUserData\n\t\t} else {\n\t\t\treturn wpm.getFbUserDataFromBrowser()\n\t\t}\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfBUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => ({\n\t\tfbp : wpm.getCookie(\"_fbp\"),\n\t\tfbc : wpm.getCookie(\"_fbc\"),\n\t\tclient_user_agent: navigator.userAgent,\n\t})\n\n\twpm.fbViewContent = product => {\n\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"track\", \"ViewContent\", {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_name: product.name,\n\t\t\t\t// content_category: product.category,\n\t\t\t\tcontent_ids: product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t\tvalue : product.price,\n\t\t\t}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : \"ViewContent\",\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tproduct_data : product,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, {}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : (product.quantity ? product.quantity : 1) * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\t// value : 1 * product.price,\n\t\t\t\titems: products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t\t})\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n\n\n\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet conversionIdentifiers = []\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t}\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\twindow.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, wpmDataLayer.pixels.google.analytics.ga4.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.done(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .done(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\tjQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\tjQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\tjQuery(document).on(\"CookiebotOnAccept\", () => {\n\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\tjQuery(document).on(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\tjQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\tjQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tjQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\tjQuery(document).on(\"setCookieNotice\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\tjQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", function () {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(this).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\n// jQuery('.add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .js-ajax-add-to-cart, .single_add_to_cart_button, .btn_color-2').on('click', function (e) {\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", function () {\n\n\ttry {\n\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(this).attr(\"href\") !== \"undefined\" && jQuery(this).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tlet quantity = 1\n\t\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t} else {\n\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(this).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"variable\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each(function () {\n\n\t\t\t\t\t\tlet quantity = Number(jQuery(this).find(\".input-text.qty\").val())\n\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\t\tlet classes = jQuery(this).attr(\"class\")\n\t\t\t\t\t\tlet productId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\tlet quantity = 1\n\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", function (event) {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", function () {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(this).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), function () {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", function () {\n\n\tif (wpm.isEmail(jQuery(this).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", function () {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", function () {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", function () {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each(function () {\n\n\t\t\tlet url = new URL(jQuery(this).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(this).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(document).on(\"click\", \".add_to_wishlist, .wl-add-to\", function () {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(this).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"productid\")\n\t\t} else if (jQuery(this).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"updated_cart_totals\", function () {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", function (event, variation) {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n\n\t\ttry {\n\t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n\t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t/**\n\t\t\t * If we have a variable product with no preset,\n\t\t\t * and variations output is enabled,\n\t\t\t * then we send a viewItem event with the first\n\t\t\t * variation we find for the parent.\n\t\t\t * If variations output is disabled,\n\t\t\t * we just send the parent ID.\n\t\t\t *\n\t\t\t * And if Facebook microdata is active, use the\n\t\t\t * microdata product ID.\n\t\t\t */\n\n\t\t\tif (\n\t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n\t\t\t\twpmDataLayer?.general?.variationsOutput\n\t\t\t) {\n\t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t\t\tif (\"parentId\" in product) {\n\n\t\t\t\t\t\tproductId = product.id\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n\t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(window).on(\"wpmLoad\", function () {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(window).on(\"wpmLoad\", function () {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t} else {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t\t}\n\n\t\t} else {\n\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (\"product\" === wpmDataLayer.shop.page_type && \"variable\" !== wpmDataLayer.shop.product_type && wpm.getMainProductIdFromProductPage()) {\n\n\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\n\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\n\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\n\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\n\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\n\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Load all pixels\n */\njQuery(window).on(\"wpmPreLoadPixels\", function () {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null,true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookieWpmRestEndpointAvailable: \"_wpm_endpoint_available\",\n\t\trestEndpoint : \"/wp-json/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable))\n\t\t} else {\n\t\t\t// return wpm.testEndpoint();\n\t\t\t// just set the value whenever possible in order not to wait or block the main thread\n\t\t\twpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\twpm.testEndpoint = (\n\t\turl = location.protocol + \"//\" + location.host + wpmRestSettings.restEndpoint,\n\t\tcookieName = wpmRestSettings.cookieWpmRestEndpointAvailable,\n\t) => {\n\t\t// console.log('testing endpoint');\n\n\t\tjQuery.ajax(url, {\n\t\t\ttype : \"HEAD\",\n\t\t\ttimeout: 1000,\n\t\t\t// async: false,\n\t\t\tstatusCode: {\n\t\t\t\t200: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, true);\n\t\t\t\t\t// console.log('endpoint works');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\t\t},\n\t\t\t\t404: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t\t0 : function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t},\n\t\t}).then(response => {\n\t\t\t// console.log('test done')\n\t\t\t// console.log('result: ' + JSON.parse(window.sessionStorage.getItem(cookieName)));\n\t\t\t// return JSON.parse(window.sessionStorage.getItem(cookieName));\n\t\t})\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookieWpmRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_get_cart_items\",\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (cartItems) {\n\n\t\t\t\t\t\t// save all cart items into wpmDataLayer\n\n\t\t\t\t\t\tif (!cartItems[\"cart\"]) cartItems[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(cartItems[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(cartItems[\"cart\"]))\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = productIds => {\n\n\n\t\t// reduce productIds by products already in the dataLayer\n\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_get_product_ids\",\n\t\t\t\tproductIds: productIds,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (products) {\n\n\t\t\t\t\t\t// merge products into wpmDataLayer.products\n\t\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, products)\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = orderId => {\n\n\t\ttry {\n\t\t\t// save the state in the database\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_purchase_pixels_fired\",\n\t\t\t\torder_id: orderId,\n\t\t\t\t// nonce : ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tif (response.success === false) {\n\t\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = (url, options) => {\n\n\t\t// Allow user to set any option except for dataType, cache, and url\n\t\toptions = jQuery.extend(options || {}, {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t})\n\n\t\t// Use $.ajax() since it is more flexible than $.getScript\n\t\t// Return the jqXHR object so we can chain callbacks\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"WooCommerce Pixel Manager: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tjQuery(document).trigger(\"wpmLoad\", {})\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","product","eventId","getRandomEventId","fbq","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","eventID","shop","trigger","event_name","event_id","user_data","getFbUserData","product_data","product_id","event_source_url","window","location","href","e","console","error","fbViewContent","setFbUserData","order","value_filtered","facebookContentIds","id","$","undefined","fBUserData","f","b","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","Math","random","toString","substring","getFbUserDataFromBrowser","fbp","getCookie","fbc","client_user_agent","navigator","userAgent","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","gtagLoaded","then","gtag","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","getGoogleAdsDynamicRemarketingOrderItems","data_basic","data_with_cart","getGoogleAdsConversionIdentifiersWithLabel","transaction_id","number","new_customer","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","state","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","done","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","indexOf","JSON","parse","action","length","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","data","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","hu","documentElement","body","explicitConsentStateAlreadySet","url","URL","this","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","cart","getCartItemsFromBackend","variation","microdata_product_id","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","setCookie","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","user","hasLoginEventFired","setLoginEventFired","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","sessionStorage","getItem","testEndpoint","protocol","cookieName","ajax","timeout","statusCode","response","setItem","stringify","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","email","test","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","dataType","ajax_url","success","cartItems","filter","hasOwnProperty","assign","cartObject","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","getSearchTermFromUrl","URLSearchParams","search","get","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","getWpmSessionData","setWpmSessionData","order_id","nonce","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","extend","cache","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
js/public/wpm-public__premium_only.p1.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.facebook)||void 0===o||!o.loaded)return;let e=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;wpm.fbViewContent(t)}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;let o=wpm.getRandomEventId();fbq("track","Search",{},{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:o,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()},{eventID:wpmDataLayer.order.id})}catch(e){console.error(e)}}))},3599:()=>{jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToWishlist",{content_name:t.name,content_category:t.category,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:t.currency,value:t.price})}catch(e){console.error(e)}})),jQuery(document).on("wpmFbCapiEvent",(function(e,t){try{if(!wpmDataLayer.pixels.facebook.capi)return;let e={action:"wpm_facebook_capi_event",data:t,nonce:wpm.nonce};jQuery.ajax({type:"post",dataType:"json",url:wpm.ajax_url,data:e,success:function(e){},error:function(e){}})}catch(e){console.error(e)}})),jQuery(window).on("wpmLoadAlways",(function(){try{var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.pixel_id&&wpmDataLayer.pixels.facebook.capi&&["cart","checkout"].indexOf(wpmDataLayer.shop.page_type)>=0&&wpm.setFacebookIdentifiersOnServer()}catch(e){console.error(e)}}))},3001:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,e=window,t=document,a="script",e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(r=t.createElement(a)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),fbq("init",wpmDataLayer.pixels.facebook.pixel_id),fbq("track","PageView")}catch(a){console.error(a)}var e,t,a,o,r,i},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>o||e.getFbUserDataFromBrowser(),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>({fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc"),client_user_agent:navigator.userAgent}),e.fbViewContent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:i}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:i,user_data:e.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}},e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("trackCustom",t,{},{eventID:i}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:i,user_data:e.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},8323:()=>{!function(e,t,a){e.setFacebookIdentifiersOnServer=function(){try{let t={action:"wpm_facebook_set_session_identifiers",nonce:e.nonce,fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc")};if(t.fbp&&window.sessionStorage&&window.sessionStorage.getItem("wpm_fb_session_id_"+t.fbp+"_set"))return;jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:t,success:function(e){window.sessionStorage&&!0===e.success&&window.sessionStorage.setItem("wpm_fb_session_id_"+t.fbp+"_set",JSON.stringify(!0))},error:function(e){}})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},5012:(e,t,a)=>{a(3001),a(164),a(8323),a(3599)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:(t.quantity?t.quantity:1)*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var s,c;if(null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.general)&&void 0!==c&&c.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;u.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:u})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpm.getGoogleAdsConversionIdentifiers()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},l={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(l={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...l})}))}catch(e){console.error(e)}}))},9042:()=>{!function(e,t,a){let o=[];e.getGoogleAdsConversionIdentifiersWithLabel=function(){for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))o.push(e+"/"+t);return o},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},5190:(e,t,a)=>{a(9042),a(165)},3625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},5663:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSelectContentGaUa",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","select_content",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,content_type:"product",items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_wishlist",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmRemoveFromCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","remove_from_cart",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o,r,i,n,l,d,s;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.analytics)||void 0===r||!r.eec)return;if(null===(i=wpmDataLayer)||void 0===i||null===(n=i.pixels)||void 0===n||null===(l=n.google)||void 0===l||null===(d=l.analytics)||void 0===d||null===(s=d.universal)||void 0===s||!s.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","begin_checkout",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,currency:wpmDataLayer.shop.currency,items:wpm.getCartItemsGaUa()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmFireCheckoutOption",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","set_checkout_option",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,checkout_step:t.step,checkout_option:t.checkout_option,value:t.value})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmFireCheckoutProgress",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","checkout_progress",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,checkout_step:t.step})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.universal)||void 0===d||!d.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;let s=[];for(const[e,t]of Object.entries(wpmDataLayer.products))s.push(wpm.ga3GetFullProductItemData(t));wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,search_term:wpm.getSearchTermFromUrl(),items:s})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.universal)||void 0===d||!d.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id})}))}catch(e){console.error(e)}}))},6019:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},3769:()=>{!function(e,t,a){e.getCartItemsGaUa=function(){let t=[];for(const[a,o]of Object.entries(wpmDataLayer.cart))t.push(e.ga3GetFullProductItemData(o));return t},e.ga3GetBasicProductItemData=function(e){return{id:e.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],name:e.name,brand:e.brand,category:e.category.join("/"),price:e.price,quantity:e.quantity,variant:e.variant}},e.ga3CanProductListBeSet=function(e){if(window.sessionStorage){null===window.sessionStorage.getItem("wpm_product_list_store_ga3")&&window.sessionStorage.setItem("wpm_product_list_store_ga3",JSON.stringify([]));let t=JSON.parse(window.sessionStorage.getItem("wpm_product_list_store_ga3"));return!t.includes(e)&&(t.push(e),window.sessionStorage.setItem("wpm_product_list_store_ga3",JSON.stringify(t)),!0)}return!1},e.ga3GetFullProductItemData=function(t){let a;return a=e.ga3GetBasicProductItemData(t),a=e.ga3AddListNameToProduct(a,t.position),a}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(6019),a(3625),a(3769),a(5663)},7572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},2802:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,items:[wpm.ga4GetFullProductItemData(t)],item_list_name:wpmDataLayer.shop.list_name,item_list_id:wpmDataLayer.shop.list_id})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSelectItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","select_item",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_wishlist",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmRemoveFromCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","remove_from_cart",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o,r,i,n,l,d,s;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.analytics)||void 0===r||!r.eec)return;if(null===(i=wpmDataLayer)||void 0===i||null===(n=i.pixels)||void 0===n||null===(l=n.google)||void 0===l||null===(d=l.analytics)||void 0===d||null===(s=d.ga4)||void 0===s||!s.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","begin_checkout",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:wpm.getCartItemsGa4()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewCart",(function(e){try{var t,a,o,r,i,n,l,d,s;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.analytics)||void 0===r||!r.eec)return;if(null===(i=wpmDataLayer)||void 0===i||null===(n=i.pixels)||void 0===n||null===(l=n.google)||void 0===l||null===(d=l.analytics)||void 0===d||null===(s=d.ga4)||void 0===s||!s.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;if(jQuery.isEmptyObject(wpmDataLayer.cart))return;let e=[],c=null;for(const[t,a]of Object.entries(wpmDataLayer.cart))e.push(wpm.ga4GetFullProductItemData(a)),c+=a.quantity*a.price;wpm.gtagLoaded().then((function(){gtag("event","view_cart",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,value:c.toFixed(2),items:e})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.ga4)||void 0===d||!d.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;let s=[];for(const[e,t]of Object.entries(wpmDataLayer.products))s.push(wpm.ga4GetFullProductItemData(t));wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,search_term:wpm.getSearchTermFromUrl(),items:s})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.ga4)||void 0===d||!d.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id})}))}catch(e){console.error(e)}}))},6228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},3895:()=>{!function(e,t,a){e.ga4AddFormattedCategories=function(e,t){if(t=Array.from(new Set(t)),Array.isArray(t)&&t.length){e.item_category=t[0];let a=t.length>5?5:t.length;for(let o=1;o<a;o++)e["item_category"+(o+1)]=t[o]}return e},e.getCartItemsGa4=function(){let t=[];for(const[a,o]of Object.entries(wpmDataLayer.cart))t.push(e.ga4GetFullProductItemData(o));return t},e.ga4GetBasicProductItemData=function(e){return{item_id:e.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],item_name:e.name,item_brand:e.brand,item_variant:e.variant,price:e.price,currency:wpmDataLayer.shop.currency,quantity:e.quantity}},e.ga4AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.item_list_name=wpmDataLayer.shop.list_name,e.item_list_id=wpmDataLayer.shop.list_id,t&&(e.index=t),e},e.ga4GetFullProductItemData=function(t){let a;return a=e.ga4GetBasicProductItemData(t),a=e.ga4AddListNameToProduct(a,t.position),a=e.ga4AddFormattedCategories(a,t.category),a}}(window.wpm=window.wpm||{},jQuery)},8522:(e,t,a)=>{a(6228),a(7572),a(3895),a(2802)},6774:(e,t,a)=>{a(562),a(8522)},9294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},3788:()=>{jQuery(window).on("wpmLoadAlways",(function(){try{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec||null!==(r=window)&&void 0!==r&&null!==(i=r.sessionStorage)&&void 0!==i&&i.getItem("_wpm_ga_cid_set",JSON.parse(!0))||!(null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.google)&&void 0!==d&&null!==(s=d.analytics)&&void 0!==s&&null!==(c=s.universal)&&void 0!==c&&c.property_id||null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.pixels)&&void 0!==p&&null!==(m=p.google)&&void 0!==m&&null!==(g=m.analytics)&&void 0!==g&&null!==(y=g.ga4)&&void 0!==y&&y.measurement_id)||["cart","checkout"].indexOf(wpmDataLayer.shop.page_type)>=0&&wpm.setGoogleCidOnServer()}catch(e){console.error(e)}}))},9860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,L;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.ads)&&void 0!==d&&d.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(y=g.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),"order_received_page"===wpmDataLayer.shop.page_type&&null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&null!==(f=_.google)&&void 0!==f&&null!==(L=f.ads)&&void 0!==L&&L.enhanced_conversion_data&&(window.enhanced_conversion_data=wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{wpmDataLayer.pixels.google.analytics.ga4.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,wpmDataLayer.pixels.google.analytics.ga4.parameters),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,l,d,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,l,d,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).done((function(t,a){try{var o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,L,h,D,x,k;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var C,j,b,I;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(C=wpmDataLayer)&&void 0!==C&&null!==(j=C.pixels)&&void 0!==j&&null!==(b=j.google)&&void 0!==b&&null!==(I=b.consent_mode)&&void 0!==I&&I.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.pixels)&&void 0!==d&&null!==(s=d.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(L=wpmDataLayer)&&void 0!==L&&null!==(h=L.pixels)&&void 0!==h&&null!==(D=h.google)&&void 0!==D&&null!==(x=D.analytics)&&void 0!==x&&null!==(k=x.ga4)&&void 0!==k&&k.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},789:()=>{!function(e,t,a){e.setGoogleCidOnServer=function(){try{var t,a,o,r,i,n,l,d,s,c;let u=[];null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(i=r.ga4)&&void 0!==i&&i.measurement_id&&u.push(wpmDataLayer.pixels.google.analytics.ga4.measurement_id),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.google)&&void 0!==d&&null!==(s=d.analytics)&&void 0!==s&&null!==(c=s.universal)&&void 0!==c&&c.property_id&&u.push(wpmDataLayer.pixels.google.analytics.universal.property_id),e.gtagLoaded().then((function(){gtag("get",u[0],"client_id",(t=>{let a={action:"wpm_google_analytics_set_session_data",target_ids:u,client_id:t,referrer:e.getReferrerFromCookie(),gclid:e.getClidFromBrowser("gclid"),userAgent:e.getUserAgent(),viewPortWidth:e.getViewPort().width,viewPortHeight:e.getViewPort().height};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(a){!0===a.success&&(window.sessionStorage?u.forEach((e=>{window.sessionStorage.setItem("_wpm_ga_cid_set",JSON.stringify(!0)),window.sessionStorage.setItem("wpm_cid_"+e+"_"+t+"_set",JSON.stringify(!0))})):u.forEach((a=>{e.setCookie("wpm_cid_"+a+"_"+t+"_set",!0)})))},error:function(e){console.error(e)}})}))}))}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},1580:(e,t,a)=>{a(9860),a(9294),a(789),a(3788)},8069:(e,t,a)=>{a(1580),a(5190),a(6774),a(3463)},1945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(l=n.optimize)&&void 0!==l&&l.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},8962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},3463:(e,t,a)=>{a(8962),a(1945)},2300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},2376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,function(e,t,a,o,r,i){e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},r=t.getElementsByTagName("head")[0],(i=t.createElement("script")).async=1,i.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,r.appendChild(i)}(window,document)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},8787:(e,t,a)=>{a(2376),a(2300)},9167:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.uet_tag_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.bing)&&void 0!==i&&i.loaded||wpm.canIFire("ads","microsoft-ads")&&wpm.load_bing_pixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.bing)||void 0===r||!r.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"cart",ecomm_prodid:t.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.bing)||void 0===r||!r.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"product",ecomm_prodid:t.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]})}catch(e){console.error(e)}})),jQuery(document).on("wpmCategory",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"category"})}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"searchresults"})}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.loaded)return;window.uetq.push("event","purchase",{ecomm_pagetype:"purchase",ecomm_prodid:wpm.bing_purchase_ecomm_prodids(),revenue_value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,items:wpm.bing_purchase_items()})}catch(e){console.error(e)}}))},7254:()=>{!function(e,t,a){e.load_bing_pixel=function(){try{wpmDataLayer.pixels.bing.loaded=!0,window.uetq=window.uetq||[],e=window,t=document,a="script",e[o="uetq"]=e[o]||[],r=function(){var t={ti:wpmDataLayer.pixels.bing.uet_tag_id};t.q=e[o],e[o]=new UET(t),e[o].push("pageLoad")},(i=t.createElement(a)).src="//bat.bing.com/bat.js",i.async=1,i.onload=i.onreadystatechange=function(){var e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(r(),i.onload=i.onreadystatechange=null)},(n=t.getElementsByTagName(a)[0]).parentNode.insertBefore(i,n)}catch(e){console.error(e)}var e,t,a,o,r,i,n},e.bing_purchase_ecomm_prodids=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))}return e},e.bing_purchase_items=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},9101:(e,t,a)=>{a(7254),a(9167)},9789:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.pinterest)&&void 0!==i&&i.loaded||wpm.canIFire("ads","pinterest-ads")&&wpm.loadPinterestPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.pinterest)||void 0===r||!r.loaded)return;pintrk("track","addtocart",{value:parseFloat(t.quantity*t.price),currency:t.currency,line_items:[wpm.getPinterestProductData(t)]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.pinterest)||void 0===r||!r.loaded)return;pintrk("track","pagevisit",{currency:t.currency,line_items:[wpm.getPinterestProductData(t)]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.pinterest)||void 0===r||!r.loaded)return;let e=wpm.getPinterestProductData(t);pintrk("track","pagevisit",{currency:t.currency,line_items:[e]})}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.loaded)return;let o=new URLSearchParams(window.location.search);pintrk("track","search",{search_query:o.get("s")})}catch(e){console.error(e)}})),jQuery(document).on("wpmCategory",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.loaded)return;pintrk("track","viewcategory")}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.loaded)return;pintrk("track","checkout",{value:wpmDataLayer.order.value_filtered,order_quantity:wpmDataLayer.order.quantity,currency:wpmDataLayer.order.currency,order_id:wpmDataLayer.order.id,line_items:wpm.pinterestFormattedOrderItems()})}catch(e){console.error(e)}}))},7891:()=>{!function(e,t,a){e.getPinterestProductData=function(e){return e.isVariation?{product_name:e.name,product_variant_id:e.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],product_id:e.parentId_dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],product_category:e.category,product_variant:e.variant,product_price:e.price,product_quantity:e.quantity,product_brand:e.brand}:{product_name:e.name,product_id:e.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],product_category:e.category,product_price:e.price,product_quantity:e.quantity,product_brand:e.brand}},e.pinterestFormattedOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let i;i={product_category:wpmDataLayer.products[o].category.join(","),product_quantity:r.quantity,product_price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(i.product_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type]),i.product_name=wpmDataLayer.products[r.variation_id].name,e.push(i)):(i.product_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type]),i.product_name=wpmDataLayer.products[r.id].name,e.push(i))}return e},e.loadPinterestPixel=function(){try{wpmDataLayer.pixels.pinterest.loaded=!0,function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var t=window.pintrk;t.queue=[],t.version="3.0";var a=document.createElement("script");a.async=!0,a.src="https://s.pinimg.com/ct/core.js";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(a,o)}}(),e.pinterestLoadEvent(),pintrk("page")}catch(e){console.error(e)}},e.pinterestLoadEvent=function(){try{var e,t,a;(wpmDataLayer.general.userLoggedIn||"order_received_page"===wpmDataLayer.shop.page_type)&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.pinterest)&&void 0!==a&&a.enhanced_match?pintrk("load",wpmDataLayer.pixels.pinterest.pixel_id,{em:wpmDataLayer.pixels.pinterest.enhanced_match_email}):pintrk("load",wpmDataLayer.pixels.pinterest.pixel_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},5673:(e,t,a)=>{a(7891),a(9789)},9825:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.snapchat)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.snapchat)&&void 0!==i&&i.loaded||wpm.canIFire("ads","snapchat-ads")&&wpm.loadSnapchatPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.snapchat)||void 0===r||!r.loaded)return;snaptr("track","ADD_CART",{item_ids:[t.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.snapchat)||void 0===r||!r.loaded)return;snaptr("track","VIEW_CONTENT",{item_ids:[t.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]]})}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.snapchat)||void 0===a||!a.loaded)return;snaptr("track","PURCHASE",{currency:wpmDataLayer.order.currency,price:wpmDataLayer.order.value_filtered,transaction_id:wpmDataLayer.order.id,item_ids:wpm.getSnapchatOrderItemIds()})}catch(e){console.error(e)}}))},7870:()=>{!function(e,t,a){e.snapchatGetEmail=function(){var e,t;let a={};var o;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.email_sha256&&(a.user_hashed_email=null===(o=wpmDataLayer.user)||void 0===o?void 0:o.email_sha256),a},e.loadSnapchatPixel=function(){try{wpmDataLayer.pixels.snapchat.loaded=!0,function(e,t,a){if(!e.snaptr){var o=e.snaptr=function(){o.handleRequest?o.handleRequest.apply(o,arguments):o.queue.push(arguments)};o.queue=[];var i="script";r=t.createElement(i),r.async=!0,r.src="https://sc-static.net/scevent.min.js";var n=t.getElementsByTagName(i)[0];n.parentNode.insertBefore(r,n)}}(window,document),snaptr("init",wpmDataLayer.pixels.snapchat.pixel_id,e.snapchatGetEmail()),snaptr("track","PAGE_VIEW")}catch(e){console.error(e)}},e.getSnapchatOrderItemIds=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))}return e}}(window.wpm=window.wpm||{},jQuery)},1022:(e,t,a)=>{a(7870),a(9825)},539:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.tiktok)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.tiktok)&&void 0!==i&&i.loaded||wpm.canIFire("ads","tiktok-ads")&&wpm.loadTikTokPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.tiktok)||void 0===r||!r.loaded)return;ttq.track("AddToCart",{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,value:t.price,currency:t.currency})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.tiktok)||void 0===o||!o.loaded)return;ttq.track("InitiateCheckout")}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.tiktok)||void 0===r||!r.loaded)return;ttq.track("ViewContent",{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,value:t.price,currency:t.currency})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.tiktok)||void 0===r||!r.loaded)return;ttq.track("AddToWishlist",{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,value:t.price,currency:t.currency})}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.tiktok)||void 0===a||!a.loaded)return;ttq.track("Search")}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.tiktok)||void 0===a||!a.loaded)return;ttq.track(wpmDataLayer.pixels.tiktok.purchase_event_name,{value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,contents:wpm.getTikTokOrderItemIds()})}catch(e){console.error(e)}}))},3796:()=>{!function(e,t,a){e.loadTikTokPixel=function(){try{wpmDataLayer.pixels.tiktok.loaded=!0,function(e,t,a){e.TiktokAnalyticsObject=a;var o=e[a]=e[a]||[];o.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],o.setAndDefer=function(e,t){e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}};for(var r=0;r<o.methods.length;r++)o.setAndDefer(o,o.methods[r]);o.instance=function(e){for(var t=o._i[e]||[],a=0;a<o.methods.length;a++)o.setAndDefer(t,o.methods[a]);return t},o.load=function(e,t){var r="https://analytics.tiktok.com/i18n/pixel/events.js";o._i=o._i||{},o._i[e]=[],o._i[e]._u=r,o._t=o._t||{},o._t[e]=+new Date,o._o=o._o||{},o._o[e]=t||{};var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=r+"?sdkid="+e+"&lib="+a;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(i,n)},o.load(wpmDataLayer.pixels.tiktok.pixel_id),o.page()}(window,document,"ttq"),ttq.track("Browse")}catch(e){console.error(e)}},e.getTikTokOrderItemIds=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={content_type:"product",quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.content_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),o.content_name=wpmDataLayer.products[r.variation_id].name,e.push(o)):(o.content_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),o.content_name=wpmDataLayer.products[r.id].name,e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},4532:(e,t,a)=>{a(3796),a(539)},5982:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.twitter)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.twitter)&&void 0!==i&&i.loaded||wpm.canIFire("ads","twitter-ads")&&wpm.loadTwitterPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","AddToCart")}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","ViewContent")}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","AddToWishlist")}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","InitiateCheckout")}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.twitter)||void 0===a||!a.loaded)return;twq("track","Search")}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.twitter)||void 0===a||!a.loaded)return;twq("track","Purchase",{order_id:wpmDataLayer.order.id,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,num_items:wpmDataLayer.order.quantity,content_ids:wpm.twitterGetOrderContentIds()})}catch(e){console.error(e)}}))},2459:()=>{!function(e,t,a){e.loadTwitterPixel=function(){try{wpmDataLayer.pixels.twitter.loaded=!0,e=window,t=document,a="script",e.twq||(o=e.twq=function(){o.exe?o.exe.apply(o,arguments):o.queue.push(arguments)},o.version="1.1",o.queue=[],(r=t.createElement(a)).async=!0,r.src="//static.ads-twitter.com/uwt.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),twq("init",wpmDataLayer.pixels.twitter.pixel_id),twq("track","PageView")}catch(e){console.error(e)}var e,t,a,o,r,i},e.twitterGetOrderContentIds=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))}return e}}(window.wpm=window.wpm||{},jQuery)},4563:(e,t,a)=>{a(2459),a(5982)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a&&arguments[0];if(t=e.getCookie("CookieConsent"))t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,i.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),i.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var l,d,s,c,u,p,m,g;t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(l=t)||void 0===l||null===(d=l.consents)||void 0===d||!d.statistics),i.categories.ads=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p?void 0:p.statistics)||[],...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.marketing)||[]],i.mode="pixel"}else(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,i.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],i.visitorHasChosen=!0):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,i.visitorHasChosen=!0):(i.categories.analytics=!n,i.categories.ads=!n)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)'):console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),window.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),jQuery(document).trigger("wpmPreLoadPixels",{})},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){let o=!(arguments.length>0&&arguments[0]!==a)||arguments[0],r=!(arguments.length>1&&arguments[1]!==a)||arguments[1];t.each(t('script[type="blocked/javascript"]'),(function(a,i){(t(i).data("wpm-cookie-category").includes("analytics")&&o||t(i).data("wpm-cookie-category").includes("ads")&&r)&&e.unblockScript(i,!0)})),jQuery(document).trigger("wpmPreLoadPixels",{})},e.unblockSelectedPixels=()=>{t.each(t('script[type="blocked/javascript"]'),(function(a,o){(i.pixels.includes(t(o).data("wpm-pixel-name"))||"google"===t(o).data("wpm-pixel-name")&&["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&e.unblockScript(o,!0)})),jQuery(document).trigger("wpmPreLoadPixels",{})},window.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),window.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),window.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),window.addEventListener("CookieScriptAcceptAll",(()=>{e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),document.addEventListener("cmplzStatusChange",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(){e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0})}(window.wpm=window.wpm||{},jQuery)},3299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(function(){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=wpm.getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.error(e)}})),jQuery(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout"].join(","),(function(){jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(function(){!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(function(){!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.error(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")})),jQuery((function(){jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.error(e)}}))})),jQuery((function(){jQuery(".single_variation_wrap").on("hide_variation",(function(){try{var e,t;let i=jQuery("body").attr("class").match(/(postid-)(\d+)/)[2];if(!i)throw Error("Wasn't able to retrieve a productId");if("variable"===wpmDataLayer.shop.product_type&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.variationsOutput){var a,o,r;for(const[e,t]of Object.entries(wpmDataLayer.products))if("parentId"in t){i=t.id;break}null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.microdata_product_id&&(i=wpmDataLayer.pixels.facebook.microdata_product_id)}if(wpmDataLayer.products&&wpmDataLayer.products[i]){let e=wpm.getProductDetailsFormattedForEvent(i);jQuery(document).trigger("wpmViewItem",e)}}catch(e){console.error(e)}}))})),jQuery(window).on("wpmLoad",(function(){try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(window).on("wpmLoad",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("wpmLoad",(function(){if(!wpm.getCookie("wpmReferrer"))if(document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host?wpm.setCookie("wpmReferrer",e):wpm.setCookie("wpmReferrer","")}else wpm.setCookie("wpmReferrer","")})),jQuery(window).on("wpmLoad",(function(){try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a;if(jQuery(document).trigger("wpmLoadAlways"),"product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id)):jQuery(document).trigger("wpmEverywhereElse");null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(window).on("wpmPreLoadPixels",(function(){var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&wpm.updateConsentCookieValues(!0),jQuery(document).trigger("wpmLoadPixels",{})}))},9584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=()=>{if(window.sessionStorage.getItem(r))return JSON.parse(window.sessionStorage.getItem(r));e.testEndpoint()},e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:r;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];n()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!n()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.error(e)}},e.getProductsFromBackend=t=>{if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let l,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let s,c=0,u=()=>{s=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),l=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),s.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),l.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&m(this)&&(jQuery(this).data("ioid",c++),l.observe(this))}))}))})),m=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=t=>{try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=(e,t)=>(t=jQuery.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)),e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e)}(window.wpm=window.wpm||{},jQuery)},3534:(e,t,a)=>{a(9584),a(473),a(8626)},8626:()=>{window.wpm=window.wpm||{},jQuery},7207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("WooCommerce Pixel Manager: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),jQuery(document).trigger("wpmPreLoadPixels",{})})).then((function(){wpm.pageLoaded().then((function(){jQuery(document).trigger("wpmLoad",{})}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a(3534),wpm.jQueryExists().then((function(){a(3299),a(8069),a(5012),a(8787),a(9101),a(5673),a(1022),a(4532),a(4563),a(7207)}))})();
2
  //# sourceMappingURL=wpm-public__premium_only.p1.min.js.map
1
+ (()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.facebook)||void 0===o||!o.loaded)return;let e=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;wpm.fbViewContent(t)}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;let o=wpm.getRandomEventId();fbq("track","Search",{},{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:o,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()},{eventID:wpmDataLayer.order.id})}catch(e){console.error(e)}}))},3599:()=>{jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToWishlist",{content_name:t.name,content_category:t.category,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:t.currency,value:t.price})}catch(e){console.error(e)}})),jQuery(document).on("wpmFbCapiEvent",(function(e,t){try{if(!wpmDataLayer.pixels.facebook.capi)return;let e={action:"wpm_facebook_capi_event",data:t,nonce:wpm.nonce};jQuery.ajax({type:"post",dataType:"json",url:wpm.ajax_url,data:e,success:function(e){},error:function(e){}})}catch(e){console.error(e)}})),jQuery(window).on("wpmLoadAlways",(function(){try{var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.pixel_id&&wpmDataLayer.pixels.facebook.capi&&["cart","checkout"].indexOf(wpmDataLayer.shop.page_type)>=0&&wpm.setFacebookIdentifiersOnServer()}catch(e){console.error(e)}}))},3001:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,e=window,t=document,a="script",e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(r=t.createElement(a)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),fbq("init",wpmDataLayer.pixels.facebook.pixel_id),fbq("track","PageView")}catch(a){console.error(a)}var e,t,a,o,r,i},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>o||e.getFbUserDataFromBrowser(),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>({fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc"),client_user_agent:navigator.userAgent}),e.fbViewContent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:i}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:i,user_data:e.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}},e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("trackCustom",t,{},{eventID:i}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:i,user_data:e.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},8323:()=>{!function(e,t,a){e.setFacebookIdentifiersOnServer=function(){try{let t={action:"wpm_facebook_set_session_identifiers",nonce:e.nonce,fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc")};if(t.fbp&&window.sessionStorage&&window.sessionStorage.getItem("wpm_fb_session_id_"+t.fbp+"_set"))return;jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:t,success:function(e){window.sessionStorage&&!0===e.success&&window.sessionStorage.setItem("wpm_fb_session_id_"+t.fbp+"_set",JSON.stringify(!0))},error:function(e){}})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},5012:(e,t,a)=>{a(3001),a(164),a(8323),a(3599)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:(t.quantity?t.quantity:1)*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var s,c;if(null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.general)&&void 0!==c&&c.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;u.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:u})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpm.getGoogleAdsConversionIdentifiers()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},l={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(l={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...l})}))}catch(e){console.error(e)}}))},9042:()=>{!function(e,t,a){let o=[];e.getGoogleAdsConversionIdentifiersWithLabel=function(){for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))o.push(e+"/"+t);return o},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},5190:(e,t,a)=>{a(9042),a(165)},3625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},5663:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSelectContentGaUa",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","select_content",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,content_type:"product",items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_wishlist",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmRemoveFromCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","remove_from_cart",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga3GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o,r,i,n,l,d,s;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.analytics)||void 0===r||!r.eec)return;if(null===(i=wpmDataLayer)||void 0===i||null===(n=i.pixels)||void 0===n||null===(l=n.google)||void 0===l||null===(d=l.analytics)||void 0===d||null===(s=d.universal)||void 0===s||!s.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","begin_checkout",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,currency:wpmDataLayer.shop.currency,items:wpm.getCartItemsGaUa()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmFireCheckoutOption",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","set_checkout_option",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,checkout_step:t.step,checkout_option:t.checkout_option,value:t.value})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmFireCheckoutProgress",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.universal)||void 0===c||!c.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","checkout_progress",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,checkout_step:t.step})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.universal)||void 0===d||!d.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;let s=[];for(const[e,t]of Object.entries(wpmDataLayer.products))s.push(wpm.ga3GetFullProductItemData(t));wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id,search_term:wpm.getSearchTermFromUrl(),items:s})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.universal)||void 0===d||!d.property_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpmDataLayer.pixels.google.analytics.universal.property_id})}))}catch(e){console.error(e)}}))},6019:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},3769:()=>{!function(e,t,a){e.getCartItemsGaUa=function(){let t=[];for(const[a,o]of Object.entries(wpmDataLayer.cart))t.push(e.ga3GetFullProductItemData(o));return t},e.ga3GetBasicProductItemData=function(e){return{id:e.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],name:e.name,brand:e.brand,category:e.category.join("/"),price:e.price,quantity:e.quantity,variant:e.variant}},e.ga3CanProductListBeSet=function(e){if(window.sessionStorage){null===window.sessionStorage.getItem("wpm_product_list_store_ga3")&&window.sessionStorage.setItem("wpm_product_list_store_ga3",JSON.stringify([]));let t=JSON.parse(window.sessionStorage.getItem("wpm_product_list_store_ga3"));return!t.includes(e)&&(t.push(e),window.sessionStorage.setItem("wpm_product_list_store_ga3",JSON.stringify(t)),!0)}return!1},e.ga3GetFullProductItemData=function(t){let a;return a=e.ga3GetBasicProductItemData(t),a=e.ga3AddListNameToProduct(a,t.position),a}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(6019),a(3625),a(3769),a(5663)},7572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},2802:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,items:[wpm.ga4GetFullProductItemData(t)],item_list_name:wpmDataLayer.shop.list_name,item_list_id:wpmDataLayer.shop.list_id})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSelectItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","select_item",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_wishlist",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmRemoveFromCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.analytics)||void 0===i||!i.eec)return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.analytics)||void 0===s||null===(c=s.ga4)||void 0===c||!c.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","remove_from_cart",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:[wpm.ga4GetFullProductItemData(t)]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o,r,i,n,l,d,s;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.analytics)||void 0===r||!r.eec)return;if(null===(i=wpmDataLayer)||void 0===i||null===(n=i.pixels)||void 0===n||null===(l=n.google)||void 0===l||null===(d=l.analytics)||void 0===d||null===(s=d.ga4)||void 0===s||!s.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","begin_checkout",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,items:wpm.getCartItemsGa4()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewCart",(function(e){try{var t,a,o,r,i,n,l,d,s;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.analytics)||void 0===r||!r.eec)return;if(null===(i=wpmDataLayer)||void 0===i||null===(n=i.pixels)||void 0===n||null===(l=n.google)||void 0===l||null===(d=l.analytics)||void 0===d||null===(s=d.ga4)||void 0===s||!s.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;if(jQuery.isEmptyObject(wpmDataLayer.cart))return;let e=[],c=null;for(const[t,a]of Object.entries(wpmDataLayer.cart))e.push(wpm.ga4GetFullProductItemData(a)),c+=a.quantity*a.price;wpm.gtagLoaded().then((function(){gtag("event","view_cart",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,currency:wpmDataLayer.shop.currency,value:c.toFixed(2),items:e})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.ga4)||void 0===d||!d.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;let s=[];for(const[e,t]of Object.entries(wpmDataLayer.products))s.push(wpm.ga4GetFullProductItemData(t));wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id,search_term:wpm.getSearchTermFromUrl(),items:s})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec)return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.analytics)||void 0===l||null===(d=l.ga4)||void 0===d||!d.measurement_id)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpmDataLayer.pixels.google.analytics.ga4.measurement_id})}))}catch(e){console.error(e)}}))},6228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},3895:()=>{!function(e,t,a){e.ga4AddFormattedCategories=function(e,t){if(t=Array.from(new Set(t)),Array.isArray(t)&&t.length){e.item_category=t[0];let a=t.length>5?5:t.length;for(let o=1;o<a;o++)e["item_category"+(o+1)]=t[o]}return e},e.getCartItemsGa4=function(){let t=[];for(const[a,o]of Object.entries(wpmDataLayer.cart))t.push(e.ga4GetFullProductItemData(o));return t},e.ga4GetBasicProductItemData=function(e){return{item_id:e.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],item_name:e.name,item_brand:e.brand,item_variant:e.variant,price:e.price,currency:wpmDataLayer.shop.currency,quantity:e.quantity}},e.ga4AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.item_list_name=wpmDataLayer.shop.list_name,e.item_list_id=wpmDataLayer.shop.list_id,t&&(e.index=t),e},e.ga4GetFullProductItemData=function(t){let a;return a=e.ga4GetBasicProductItemData(t),a=e.ga4AddListNameToProduct(a,t.position),a=e.ga4AddFormattedCategories(a,t.category),a}}(window.wpm=window.wpm||{},jQuery)},8522:(e,t,a)=>{a(6228),a(7572),a(3895),a(2802)},6774:(e,t,a)=>{a(562),a(8522)},9294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},3788:()=>{jQuery(window).on("wpmLoadAlways",(function(){try{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||!o.eec||null!==(r=window)&&void 0!==r&&null!==(i=r.sessionStorage)&&void 0!==i&&i.getItem("_wpm_ga_cid_set",JSON.parse(!0))||!(null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.google)&&void 0!==d&&null!==(s=d.analytics)&&void 0!==s&&null!==(c=s.universal)&&void 0!==c&&c.property_id||null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.pixels)&&void 0!==p&&null!==(m=p.google)&&void 0!==m&&null!==(g=m.analytics)&&void 0!==g&&null!==(y=g.ga4)&&void 0!==y&&y.measurement_id)||["cart","checkout"].indexOf(wpmDataLayer.shop.page_type)>=0&&wpm.setGoogleCidOnServer()}catch(e){console.error(e)}}))},9860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,h;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.ads)&&void 0!==d&&d.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(y=g.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),"order_received_page"===wpmDataLayer.shop.page_type&&null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&null!==(f=_.google)&&void 0!==f&&null!==(h=f.ads)&&void 0!==h&&h.enhanced_conversion_data&&(window.enhanced_conversion_data=wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{wpmDataLayer.pixels.google.analytics.ga4.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,wpmDataLayer.pixels.google.analytics.ga4.parameters),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,l,d,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,l,d,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).done((function(t,a){try{var o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,x,k;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var C,j,b,I;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(C=wpmDataLayer)&&void 0!==C&&null!==(j=C.pixels)&&void 0!==j&&null!==(b=j.google)&&void 0!==b&&null!==(I=b.consent_mode)&&void 0!==I&&I.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.pixels)&&void 0!==d&&null!==(s=d.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(x=D.analytics)&&void 0!==x&&null!==(k=x.ga4)&&void 0!==k&&k.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},789:()=>{!function(e,t,a){e.setGoogleCidOnServer=function(){try{var t,a,o,r,i,n,l,d,s,c;let u=[];null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(i=r.ga4)&&void 0!==i&&i.measurement_id&&u.push(wpmDataLayer.pixels.google.analytics.ga4.measurement_id),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.google)&&void 0!==d&&null!==(s=d.analytics)&&void 0!==s&&null!==(c=s.universal)&&void 0!==c&&c.property_id&&u.push(wpmDataLayer.pixels.google.analytics.universal.property_id),e.gtagLoaded().then((function(){gtag("get",u[0],"client_id",(t=>{let a={action:"wpm_google_analytics_set_session_data",target_ids:u,client_id:t,referrer:e.getReferrerFromCookie(),gclid:e.getClidFromBrowser("gclid"),userAgent:e.getUserAgent(),viewPortWidth:e.getViewPort().width,viewPortHeight:e.getViewPort().height};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(a){!0===a.success&&(window.sessionStorage?u.forEach((e=>{window.sessionStorage.setItem("_wpm_ga_cid_set",JSON.stringify(!0)),window.sessionStorage.setItem("wpm_cid_"+e+"_"+t+"_set",JSON.stringify(!0))})):u.forEach((a=>{e.setCookie("wpm_cid_"+a+"_"+t+"_set",!0)})))},error:function(e){console.error(e)}})}))}))}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},1580:(e,t,a)=>{a(9860),a(9294),a(789),a(3788)},8069:(e,t,a)=>{a(1580),a(5190),a(6774),a(3463)},1945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(l=n.optimize)&&void 0!==l&&l.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},8962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},3463:(e,t,a)=>{a(8962),a(1945)},2300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},2376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,function(e,t,a,o,r,i){e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},r=t.getElementsByTagName("head")[0],(i=t.createElement("script")).async=1,i.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,r.appendChild(i)}(window,document)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},8787:(e,t,a)=>{a(2376),a(2300)},9167:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.uet_tag_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.bing)&&void 0!==i&&i.loaded||wpm.canIFire("ads","microsoft-ads")&&wpm.load_bing_pixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.bing)||void 0===r||!r.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"cart",ecomm_prodid:t.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.bing)||void 0===r||!r.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"product",ecomm_prodid:t.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]})}catch(e){console.error(e)}})),jQuery(document).on("wpmCategory",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"category"})}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.loaded)return;window.uetq.push("event","",{ecomm_pagetype:"searchresults"})}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.bing)||void 0===a||!a.loaded)return;window.uetq.push("event","purchase",{ecomm_pagetype:"purchase",ecomm_prodid:wpm.bing_purchase_ecomm_prodids(),revenue_value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,items:wpm.bing_purchase_items()})}catch(e){console.error(e)}}))},7254:()=>{!function(e,t,a){e.load_bing_pixel=function(){try{wpmDataLayer.pixels.bing.loaded=!0,window.uetq=window.uetq||[],e=window,t=document,a="script",e[o="uetq"]=e[o]||[],r=function(){var t={ti:wpmDataLayer.pixels.bing.uet_tag_id};t.q=e[o],e[o]=new UET(t),e[o].push("pageLoad")},(i=t.createElement(a)).src="//bat.bing.com/bat.js",i.async=1,i.onload=i.onreadystatechange=function(){var e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(r(),i.onload=i.onreadystatechange=null)},(n=t.getElementsByTagName(a)[0]).parentNode.insertBefore(i,n)}catch(e){console.error(e)}var e,t,a,o,r,i,n},e.bing_purchase_ecomm_prodids=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))}return e},e.bing_purchase_items=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},9101:(e,t,a)=>{a(7254),a(9167)},9789:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.pinterest)&&void 0!==i&&i.loaded||wpm.canIFire("ads","pinterest-ads")&&wpm.loadPinterestPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.pinterest)||void 0===r||!r.loaded)return;pintrk("track","addtocart",{value:parseFloat(t.quantity*t.price),currency:t.currency,line_items:[wpm.getPinterestProductData(t)]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.pinterest)||void 0===r||!r.loaded)return;pintrk("track","pagevisit",{currency:t.currency,line_items:[wpm.getPinterestProductData(t)]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.pinterest)||void 0===r||!r.loaded)return;let e=wpm.getPinterestProductData(t);pintrk("track","pagevisit",{currency:t.currency,line_items:[e]})}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.loaded)return;let o=new URLSearchParams(window.location.search);pintrk("track","search",{search_query:o.get("s")})}catch(e){console.error(e)}})),jQuery(document).on("wpmCategory",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.loaded)return;pintrk("track","viewcategory")}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.pinterest)||void 0===a||!a.loaded)return;pintrk("track","checkout",{value:wpmDataLayer.order.value_filtered,order_quantity:wpmDataLayer.order.quantity,currency:wpmDataLayer.order.currency,order_id:wpmDataLayer.order.id,line_items:wpm.pinterestFormattedOrderItems()})}catch(e){console.error(e)}}))},7891:()=>{!function(e,t,a){e.getPinterestProductData=function(e){return e.isVariation?{product_name:e.name,product_variant_id:e.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],product_id:e.parentId_dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],product_category:e.category,product_variant:e.variant,product_price:e.price,product_quantity:e.quantity,product_brand:e.brand}:{product_name:e.name,product_id:e.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],product_category:e.category,product_price:e.price,product_quantity:e.quantity,product_brand:e.brand}},e.pinterestFormattedOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let i;i={product_category:wpmDataLayer.products[o].category.join(","),product_quantity:r.quantity,product_price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(i.product_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type]),i.product_name=wpmDataLayer.products[r.variation_id].name,e.push(i)):(i.product_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type]),i.product_name=wpmDataLayer.products[r.id].name,e.push(i))}return e},e.loadPinterestPixel=function(){try{wpmDataLayer.pixels.pinterest.loaded=!0,function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var t=window.pintrk;t.queue=[],t.version="3.0";var a=document.createElement("script");a.async=!0,a.src="https://s.pinimg.com/ct/core.js";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(a,o)}}(),e.pinterestLoadEvent(),pintrk("page")}catch(e){console.error(e)}},e.pinterestLoadEvent=function(){try{var e,t,a;(wpmDataLayer.general.userLoggedIn||"order_received_page"===wpmDataLayer.shop.page_type)&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.pinterest)&&void 0!==a&&a.enhanced_match?pintrk("load",wpmDataLayer.pixels.pinterest.pixel_id,{em:wpmDataLayer.pixels.pinterest.enhanced_match_email}):pintrk("load",wpmDataLayer.pixels.pinterest.pixel_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},5673:(e,t,a)=>{a(7891),a(9789)},9825:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.snapchat)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.snapchat)&&void 0!==i&&i.loaded||wpm.canIFire("ads","snapchat-ads")&&wpm.loadSnapchatPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.snapchat)||void 0===r||!r.loaded)return;snaptr("track","ADD_CART",{item_ids:[t.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]]})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.snapchat)||void 0===r||!r.loaded)return;snaptr("track","VIEW_CONTENT",{item_ids:[t.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]]})}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.snapchat)||void 0===a||!a.loaded)return;snaptr("track","PURCHASE",{currency:wpmDataLayer.order.currency,price:wpmDataLayer.order.value_filtered,transaction_id:wpmDataLayer.order.id,item_ids:wpm.getSnapchatOrderItemIds()})}catch(e){console.error(e)}}))},7870:()=>{!function(e,t,a){e.snapchatGetEmail=function(){var e,t;let a={};var o;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.email_sha256&&(a.user_hashed_email=null===(o=wpmDataLayer.user)||void 0===o?void 0:o.email_sha256),a},e.loadSnapchatPixel=function(){try{wpmDataLayer.pixels.snapchat.loaded=!0,function(e,t,a){if(!e.snaptr){var o=e.snaptr=function(){o.handleRequest?o.handleRequest.apply(o,arguments):o.queue.push(arguments)};o.queue=[];var i="script";r=t.createElement(i),r.async=!0,r.src="https://sc-static.net/scevent.min.js";var n=t.getElementsByTagName(i)[0];n.parentNode.insertBefore(r,n)}}(window,document),snaptr("init",wpmDataLayer.pixels.snapchat.pixel_id,e.snapchatGetEmail()),snaptr("track","PAGE_VIEW")}catch(e){console.error(e)}},e.getSnapchatOrderItemIds=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))}return e}}(window.wpm=window.wpm||{},jQuery)},1022:(e,t,a)=>{a(7870),a(9825)},539:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.tiktok)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.tiktok)&&void 0!==i&&i.loaded||wpm.canIFire("ads","tiktok-ads")&&wpm.loadTikTokPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.tiktok)||void 0===r||!r.loaded)return;ttq.track("AddToCart",{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,value:t.price,currency:t.currency})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.tiktok)||void 0===o||!o.loaded)return;ttq.track("InitiateCheckout")}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.tiktok)||void 0===r||!r.loaded)return;ttq.track("ViewContent",{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,value:t.price,currency:t.currency})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.tiktok)||void 0===r||!r.loaded)return;ttq.track("AddToWishlist",{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,value:t.price,currency:t.currency})}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.tiktok)||void 0===a||!a.loaded)return;ttq.track("Search")}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.tiktok)||void 0===a||!a.loaded)return;ttq.track(wpmDataLayer.pixels.tiktok.purchase_event_name,{value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,contents:wpm.getTikTokOrderItemIds()})}catch(e){console.error(e)}}))},3796:()=>{!function(e,t,a){e.loadTikTokPixel=function(){try{wpmDataLayer.pixels.tiktok.loaded=!0,function(e,t,a){e.TiktokAnalyticsObject=a;var o=e[a]=e[a]||[];o.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],o.setAndDefer=function(e,t){e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}};for(var r=0;r<o.methods.length;r++)o.setAndDefer(o,o.methods[r]);o.instance=function(e){for(var t=o._i[e]||[],a=0;a<o.methods.length;a++)o.setAndDefer(t,o.methods[a]);return t},o.load=function(e,t){var r="https://analytics.tiktok.com/i18n/pixel/events.js";o._i=o._i||{},o._i[e]=[],o._i[e]._u=r,o._t=o._t||{},o._t[e]=+new Date,o._o=o._o||{},o._o[e]=t||{};var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=r+"?sdkid="+e+"&lib="+a;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(i,n)},o.load(wpmDataLayer.pixels.tiktok.pixel_id),o.page()}(window,document,"ttq"),ttq.track("Browse")}catch(e){console.error(e)}},e.getTikTokOrderItemIds=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={content_type:"product",quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.content_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),o.content_name=wpmDataLayer.products[r.variation_id].name,e.push(o)):(o.content_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]),o.content_name=wpmDataLayer.products[r.id].name,e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},4532:(e,t,a)=>{a(3796),a(539)},5982:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.twitter)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.twitter)&&void 0!==i&&i.loaded||wpm.canIFire("ads","twitter-ads")&&wpm.loadTwitterPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","AddToCart")}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","ViewContent")}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","AddToWishlist")}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.twitter)||void 0===r||!r.loaded)return;twq("track","InitiateCheckout")}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.twitter)||void 0===a||!a.loaded)return;twq("track","Search")}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.twitter)||void 0===a||!a.loaded)return;twq("track","Purchase",{order_id:wpmDataLayer.order.id,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,num_items:wpmDataLayer.order.quantity,content_ids:wpm.twitterGetOrderContentIds()})}catch(e){console.error(e)}}))},2459:()=>{!function(e,t,a){e.loadTwitterPixel=function(){try{wpmDataLayer.pixels.twitter.loaded=!0,e=window,t=document,a="script",e.twq||(o=e.twq=function(){o.exe?o.exe.apply(o,arguments):o.queue.push(arguments)},o.version="1.1",o.queue=[],(r=t.createElement(a)).async=!0,r.src="//static.ads-twitter.com/uwt.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),twq("init",wpmDataLayer.pixels.twitter.pixel_id),twq("track","PageView")}catch(e){console.error(e)}var e,t,a,o,r,i},e.twitterGetOrderContentIds=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))}return e}}(window.wpm=window.wpm||{},jQuery)},4563:(e,t,a)=>{a(2459),a(5982)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a?arguments[0]:null,l=arguments.length>1&&arguments[1]!==a?arguments[1]:null,d=arguments.length>2&&arguments[2]!==a&&arguments[2];if(n||l)n&&(i.categories.analytics=!!n),l&&(i.categories.ads=!!l);else if(t=e.getCookie("CookieConsent"))t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,i.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),i.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var s,c,u,p,m,g,y,w;t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),i.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.statistics)||[],...(null===(y=t)||void 0===y||null===(w=y.consents)||void 0===w?void 0:w.marketing)||[]],i.mode="pixel"}else(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,i.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],i.visitorHasChosen=!0):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,i.visitorHasChosen=!0):(i.categories.analytics=!d,i.categories.ads=!d)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)'):console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),jQuery(document).on("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),jQuery(document).trigger("wpmPreLoadPixels",{})},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){jQuery(document).trigger("wpmPreLoadPixels",{})},e.unblockSelectedPixels=()=>{jQuery(document).trigger("wpmPreLoadPixels",{})},jQuery(document).on("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),jQuery(document).on("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),jQuery(document).on("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),jQuery(document).on("CookieScriptAcceptAll",(()=>{e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)},jQuery(document).on("cmplzStatusChange",e.cmplzStatusChange),jQuery(document).on("cmplz_status_change",e.cmplzStatusChange),jQuery(document).on("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(){e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery)},3299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(function(){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=wpm.getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.error(e)}})),jQuery(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout"].join(","),(function(){jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(function(){!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(function(){!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.error(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")})),jQuery((function(){jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.error(e)}}))})),jQuery((function(){jQuery(".single_variation_wrap").on("hide_variation",(function(){try{var e,t;let i=jQuery("body").attr("class").match(/(postid-)(\d+)/)[2];if(!i)throw Error("Wasn't able to retrieve a productId");if("variable"===wpmDataLayer.shop.product_type&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.variationsOutput){var a,o,r;for(const[e,t]of Object.entries(wpmDataLayer.products))if("parentId"in t){i=t.id;break}null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.microdata_product_id&&(i=wpmDataLayer.pixels.facebook.microdata_product_id)}if(wpmDataLayer.products&&wpmDataLayer.products[i]){let e=wpm.getProductDetailsFormattedForEvent(i);jQuery(document).trigger("wpmViewItem",e)}}catch(e){console.error(e)}}))})),jQuery(window).on("wpmLoad",(function(){try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(window).on("wpmLoad",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("wpmLoad",(function(){if(!wpm.getCookie("wpmReferrer"))if(document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host?wpm.setCookie("wpmReferrer",e):wpm.setCookie("wpmReferrer","")}else wpm.setCookie("wpmReferrer","")})),jQuery(window).on("wpmLoad",(function(){try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a;if(jQuery(document).trigger("wpmLoadAlways"),"product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id)):jQuery(document).trigger("wpmEverywhereElse");null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(window).on("wpmPreLoadPixels",(function(){var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})}))},9584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=()=>{if(window.sessionStorage.getItem(r))return JSON.parse(window.sessionStorage.getItem(r));e.testEndpoint()},e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:r;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];n()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!n()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.error(e)}},e.getProductsFromBackend=t=>{if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let l,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let s,c=0,u=()=>{s=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),l=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),s.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),l.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&m(this)&&(jQuery(this).data("ioid",c++),l.observe(this))}))}))})),m=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=t=>{try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=(e,t)=>(t=jQuery.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)),e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e)}(window.wpm=window.wpm||{},jQuery)},3534:(e,t,a)=>{a(9584),a(473),a(8626)},8626:()=>{window.wpm=window.wpm||{},jQuery},7207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("WooCommerce Pixel Manager: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),jQuery(document).trigger("wpmPreLoadPixels",{})})).then((function(){wpm.pageLoaded().then((function(){jQuery(document).trigger("wpmLoad",{})}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a(3534),wpm.jQueryExists().then((function(){a(3299),a(8069),a(5012),a(8787),a(9101),a(5673),a(1022),a(4532),a(4563),a(7207)}))})();
2
  //# sourceMappingURL=wpm-public__premium_only.p1.min.js.map
js/public/wpm-public__premium_only.p1.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wpm-public__premium_only.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,WAAY,gBAEhC,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,EAAgCE,QAC5EC,IAAIC,SAAS,MAAO,iBAAiBD,IAAIE,uBAM/CV,OAAOC,UAAUC,GAAG,gBAAgB,SAAUS,EAAOC,GAEpD,IAAI,UACH,GAAI,UAACT,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,QAAC,EAAgCE,OAAQ,OAE7C,IAAIM,EAAUL,IAAIM,mBAElBC,IAAI,QAAS,YAAa,CACzBC,aAAc,UACdC,aAAcL,EAAQM,KACtBC,YAAcP,EAAQQ,UAAUjB,aAAaC,OAAOC,SAASgB,oBAAoBC,SACjFC,MAAcC,WAAWZ,EAAQa,SAAWb,EAAQc,OACpDC,SAAcf,EAAQe,UACpB,CACFC,QAASf,IAGVD,EAAO,SAAeT,aAAa0B,KAAKF,SAExC3B,OAAOC,UAAU6B,QAAQ,iBAAkB,CAC1CC,WAAkB,YAClBC,SAAkBnB,EAClBoB,UAAkBzB,IAAI0B,gBACtBC,aAAkBvB,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ooCommerce-Pixel-Manager/./src/js/public/facebook/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/microsoft-ads/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/microsoft-ads/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/microsoft-ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/pinterest/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/pinterest/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/pinterest/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/snapchat/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/snapchat/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/snapchat/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/tiktok/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/tiktok/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/tiktok/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/twitter/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/twitter/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/twitter/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/cookie_consent.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/init.js","webpack://WooCommerce-Pixel-Manager/webpack/bootstrap","webpack://WooCommerce-Pixel-Manager/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToCart\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"InitiateCheckout\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.fbViewContent(product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"Search\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\",\n\t\t\t{\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t\t{eventID: wpmDataLayer.order.id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * All event listeners\n * */\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_name : product.name,\n\t\t\tcontent_category: product.category,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t// contents : \"\",\n\t\t\tcurrency: product.currency,\n\t\t\tvalue : product.price,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmFbCapiEvent\", function (event, eventData) {\n\n\ttry {\n\t\tif (!wpmDataLayer.pixels.facebook.capi) return\n\n\t\t// save the state in the database\n\t\tlet data = {\n\t\t\taction: \"wpm_facebook_capi_event\",\n\t\t\tdata : eventData,\n\t\t\t// nonce : wpm_facebook_premium_only_ajax_object.nonce,\n\t\t\tnonce: wpm.nonce,\n\t\t}\n\n\t\tjQuery.ajax(\n\t\t\t{\n\t\t\t\ttype : \"post\",\n\t\t\t\tdataType: \"json\",\n\t\t\t\t// url : wpm_facebook_premium_only_ajax_object.ajax_url,\n\t\t\t\turl : wpm.ajax_url,\n\t\t\t\tdata : data,\n\t\t\t\tsuccess: function (msg) {\n\t\t\t\t\t// console.log(msg);\n\t\t\t\t},\n\t\t\t\terror : function (msg) {\n\t\t\t\t\t// console.log(msg);\n\t\t\t\t},\n\t\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\njQuery(window).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && wpmDataLayer.pixels.facebook.capi) {\n\n\t\t\t// We need to be sure that we capture the cid early enough, because the\n\t\t\t// shop might be using a one click checkout button as early as on the product page.\n\t\t\tif ([\"cart\", \"checkout\"].indexOf(wpmDataLayer.shop.page_type) >= 0) {\n\n\t\t\t\twpm.setFacebookIdentifiersOnServer()\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fBUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need the first one for InitiateCheckout\n\t\t * where getting the user_data from the browser is too slow\n\t\t * using wpm.getCookie(), so we cache the user_data earlier.\n\t\t * And we need the second one because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user_data is too slow. But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t */\n\n\t\tif (fBUserData) {\n\t\t\treturn fBUserData\n\t\t} else {\n\t\t\treturn wpm.getFbUserDataFromBrowser()\n\t\t}\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfBUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => ({\n\t\tfbp : wpm.getCookie(\"_fbp\"),\n\t\tfbc : wpm.getCookie(\"_fbc\"),\n\t\tclient_user_agent: navigator.userAgent,\n\t})\n\n\twpm.fbViewContent = product => {\n\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"track\", \"ViewContent\", {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_name: product.name,\n\t\t\t\t// content_category: product.category,\n\t\t\t\tcontent_ids: product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t\tvalue : product.price,\n\t\t\t}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : \"ViewContent\",\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tproduct_data : product,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, {}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Add functions for Facebook (pro)\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.setFacebookIdentifiersOnServer = function () {\n\n\t\ttry {\n\n\t\t\t// get first party cookies fbp and fbc\n\n\t\t\t// send the cookies to the server in order to save them on the session\n\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_facebook_set_session_identifiers\",\n\t\t\t\t// nonce : wpm_facebook_premium_only_ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t\tfbp : wpm.getCookie(\"_fbp\"),\n\t\t\t\tfbc : wpm.getCookie(\"_fbc\"),\n\t\t\t}\n\n\t\t\tif (data.fbp && window.sessionStorage && window.sessionStorage.getItem(\"wpm_fb_session_id_\" + data.fbp + \"_set\")) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : wpm_facebook_premium_only_ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t// console.log(response);\n\n\t\t\t\t\t\tif (window.sessionStorage && response[\"success\"] === true) {\n\t\t\t\t\t\t\t// console.log('setting session storage');\n\t\t\t\t\t\t\twindow.sessionStorage.setItem(\"wpm_fb_session_id_\" + data.fbp + \"_set\", JSON.stringify(true))\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\t// console.log(response);\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : (product.quantity ? product.quantity : 1) * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\t// value : 1 * product.price,\n\t\t\t\titems: products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t\t})\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n\n\n\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet conversionIdentifiers = []\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t}\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Universal Analytics (GA3) premium event listeners\n * */\n\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content event\njQuery(document).on(\"wpmSelectContentGaUa\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"select_content\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_wishlist event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// remove_from_cart event\njQuery(document).on(\"wpmRemoveFromCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"remove_from_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"begin_checkout\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\titems : wpm.getCartItemsGaUa(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// set_checkout_option event\njQuery(document).on(\"wpmFireCheckoutOption\", function (event, data) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"set_checkout_option\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcheckout_step : data.step,\n\t\t\t\tcheckout_option: data.checkout_option,\n\t\t\t\tvalue : data.value,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// checkout_progress event\njQuery(document).on(\"wpmFireCheckoutProgress\", function (event, data) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"checkout_progress\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcheckout_step: data.step,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t// console.log(`${key}: ${value}`);\n\n\t\t\tproducts.push(wpm.ga3GetFullProductItemData(product))\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\t\titems : products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// User login event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Universal Analytics (GA3) premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getCartItemsGaUa = function () {\n\n\t\tlet data = []\n\n\t\tfor (const [productId, product] of Object.entries(wpmDataLayer.cart)) {\n\n\t\t\tdata.push(wpm.ga3GetFullProductItemData(product))\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.ga3GetBasicProductItemData = function (product) {\n\n\t\treturn {\n\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],\n\t\t\tname : product.name,\n\t\t\tbrand : product.brand,\n\t\t\tcategory: product.category.join(\"/\"),\n\t\t\t// coupon : \"\",\n\t\t\t// list_name : wpmDataLayer.shop.list_name,\n\t\t\t// list_position: product.list_position, // doesn't make sense on mini_cart\n\t\t\tprice : product.price,\n\t\t\tquantity: product.quantity,\n\t\t\tvariant : product.variant,\n\t\t}\n\t}\n\n\n\n\twpm.ga3CanProductListBeSet = function (productId) {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\t// Check if the wpm_product_list_store_ga3 already exists,\n\t\t\t// and if not, create it\n\t\t\tif (window.sessionStorage.getItem(\"wpm_product_list_store_ga3\") === null) {\n\t\t\t\twindow.sessionStorage.setItem(\"wpm_product_list_store_ga3\", JSON.stringify([]))\n\t\t\t}\n\n\t\t\tlet wpmProductListStore = JSON.parse(window.sessionStorage.getItem(\"wpm_product_list_store_ga3\"))\n\n\t\t\tif (wpmProductListStore.includes(productId)) {\n\n\t\t\t\treturn false\n\t\t\t} else {\n\n\t\t\t\twpmProductListStore.push(productId)\n\t\t\t\twindow.sessionStorage.setItem(\"wpm_product_list_store_ga3\", JSON.stringify(wpmProductListStore))\n\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.ga3GetFullProductItemData = function (product) {\n\n\t\tlet item_data\n\n\t\titem_data = wpm.ga3GetBasicProductItemData(product)\n\t\titem_data = wpm.ga3AddListNameToProduct(item_data, product.position)\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 premium event listeners\n * */\n\n// view_item_list event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item_list\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\t\titem_list_name: wpmDataLayer.shop.list_name, // doesn't make sense on mini_cart\n\t\t\t\titem_list_id : wpmDataLayer.shop.list_id, // doesn't make sense on mini_cart\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#select_item\njQuery(document).on(\"wpmSelectItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"select_item\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_cart\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_wishlist event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_wishlist\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// remove_from_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#remove_from_cart\njQuery(document).on(\"wpmRemoveFromCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"remove_from_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#begin_checkout\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"begin_checkout\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\t// coupon: \"\",\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: wpm.getCartItemsGa4(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_cart\njQuery(document).on(\"wpmViewCart\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tif (jQuery.isEmptyObject(wpmDataLayer.cart)) return\n\n\t\tlet products = []\n\t\tlet cartValue = null\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.cart)) {\n\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product))\n\n\t\t\tcartValue = cartValue + product.quantity * product.price\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\tvalue : cartValue.toFixed(2),\n\t\t\t\titems : products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t// console.log(`${key}: ${value}`);\n\t\t\t\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product))\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\t\titems : products,\n\t\t\t})\n\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load GA4 premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.ga4AddFormattedCategories = function (item_data, categories) {\n\n\t\tlet maxCategories = 5\n\n\t\t// remove categories with equal names from array\n\t\tcategories = Array.from(new Set(categories))\n\n\t\tif (Array.isArray(categories) && categories.length) {\n\n\t\t\titem_data[\"item_category\"] = categories[0]\n\n\t\t\tlet max = categories.length > maxCategories ? maxCategories : categories.length\n\n\t\t\tfor (let i = 1; i < max; i++) {\n\t\t\t\titem_data[\"item_category\" + (i + 1)] = categories[i]\n\t\t\t}\n\t\t}\n\n\t\treturn item_data\n\t}\n\n\twpm.getCartItemsGa4 = function () {\n\n\t\tlet data = []\n\n\t\tfor (const [productId, product] of Object.entries(wpmDataLayer.cart)) {\n\n\t\t\tdata.push(wpm.ga4GetFullProductItemData(product))\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.ga4GetBasicProductItemData = function (product) {\n\n\t\treturn {\n\t\t\titem_id : product.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],\n\t\t\titem_name: product.name,\n\t\t\t// coupon : \"\",\n\t\t\t// discount: 0,\n\t\t\t// affiliation: \"\",\n\t\t\titem_brand : product.brand,\n\t\t\titem_variant: product.variant,\n\t\t\tprice : product.price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tquantity : product.quantity,\n\t\t}\n\t}\n\n\twpm.ga4AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\titem_data.item_list_name = wpmDataLayer.shop.list_name\n\t\titem_data.item_list_id = wpmDataLayer.shop.list_id\n\n\t\tif (productPosition) {\n\t\t\titem_data.index = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n\twpm.ga4GetFullProductItemData = function (product) {\n\n\t\tlet item_data\n\n\t\titem_data = wpm.ga4GetBasicProductItemData(product)\n\t\titem_data = wpm.ga4AddListNameToProduct(item_data, product.position)\n\t\titem_data = wpm.ga4AddFormattedCategories(item_data, product.category)\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Run the following on every page load\n */\n\njQuery(window).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.eec &&\n\t\t\t!window?.sessionStorage?.getItem('_wpm_ga_cid_set', JSON.parse(true)) &&\n\t\t\t(\n\t\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id\n\t\t\t)\n\t\t) {\n\t\t\t// We need to be sure that we capture the cid early enough, because the\n\t\t\t// shop might be using a one click checkout button as early as on the product page.\n\t\t\tif ([\"cart\", \"checkout\"].indexOf(wpmDataLayer.shop.page_type) >= 0) {\n\t\t\t\twpm.setGoogleCidOnServer()\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\twindow.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, wpmDataLayer.pixels.google.analytics.ga4.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.done(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base premium functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.setGoogleCidOnServer = function () {\n\n\t\ttry {\n\n\t\t\tlet targetIDs = []\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) targetIDs.push(wpmDataLayer.pixels.google.analytics.ga4.measurement_id)\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) targetIDs.push(wpmDataLayer.pixels.google.analytics.universal.property_id)\n\n\n\t\t\twpm.gtagLoaded().then(function () {\n\t\t\t\tgtag(\"get\", targetIDs[0], \"client_id\", (clientID) => {\n\n\t\t\t\t\t// save the state in the database\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\taction: \"wpm_google_analytics_set_session_data\",\n\t\t\t\t\t\t// 'nonce' : wpm_google_premium_only_ajax_object.nonce,\n\t\t\t\t\t\t// 'nonce' : wpm.nonce,\n\t\t\t\t\t\ttarget_ids: targetIDs,\n\t\t\t\t\t\tclient_id : clientID,\n\t\t\t\t\t\treferrer : wpm.getReferrerFromCookie(),\n\t\t\t\t\t\tgclid : wpm.getClidFromBrowser(\"gclid\"),\n\t\t\t\t\t\t// dclid : wpm.getClidFromBrowser('dclid'),\n\t\t\t\t\t\tuserAgent : wpm.getUserAgent(),\n\t\t\t\t\t\tviewPortWidth : wpm.getViewPort().width,\n\t\t\t\t\t\tviewPortHeight: wpm.getViewPort().height,\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.ajax(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype : \"post\",\n\t\t\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t\t\t// url : wpm_google_premium_only_ajax_object.ajax_url,\n\t\t\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\t\t\tdata : data,\n\t\t\t\t\t\t\tsuccess: function (response) {\n\n\t\t\t\t\t\t\t\tif (response[\"success\"] === true) {\n\t\t\t\t\t\t\t\t\tif (window.sessionStorage) {\n\t\t\t\t\t\t\t\t\t\ttargetIDs.forEach((targetId) => {\n\t\t\t\t\t\t\t\t\t\t\twindow.sessionStorage.setItem('_wpm_ga_cid_set', JSON.stringify(true))\n\t\t\t\t\t\t\t\t\t\t\twindow.sessionStorage.setItem(\"wpm_cid_\" + targetId + \"_\" + clientID + \"_set\", JSON.stringify(true))\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ttargetIDs.forEach((targetId) => {\n\t\t\t\t\t\t\t\t\t\t\twpm.setCookie(\"wpm_cid_\" + targetId + \"_\" + clientID + \"_set\", true)\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\t\t\tconsole.error(response)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\n\t\t\t\t\t// wp.ajax.post('wpm_google_analytics_set_session_data', data)\n\t\t\t\t\t// .done(function (response) {\n\t\t\t\t\t//\n\t\t\t\t\t// // console.log(response);\n\t\t\t\t\t//\n\t\t\t\t\t// if (response === 'success') {\n\t\t\t\t\t// if (window.sessionStorage) {\n\t\t\t\t\t// // console.log('setting session storage');\n\t\t\t\t\t// window.sessionStorage.setItem(cidSetOnServerCookie, JSON.stringify(true));\n\t\t\t\t\t// } else {\n\t\t\t\t\t// // console.log('not setting session storage');\n\t\t\t\t\t//\n\t\t\t\t\t// wpm.setCookie(cidSetOnServerCookie, true);\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\t// })\n\t\t\t\t\t// .fail(function (response) {\n\t\t\t\t\t// console.log(response);\n\t\t\t\t\t// });\n\t\t\t\t})\n\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .done(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Microsoft Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.bing?.uet_tag_id && !wpmDataLayer?.pixels?.bing?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"microsoft-ads\")) wpm.load_bing_pixel()\n\t}\n})\n\n// add-to-cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"cart\",\n\t\t\tecomm_prodid : product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"product\",\n\t\t\tecomm_prodid : product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view category event\njQuery(document).on(\"wpmCategory\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"category\",\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"searchresults\",\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"purchase\", {\n\t\t\tecomm_pagetype: \"purchase\",\n\t\t\tecomm_prodid : wpm.bing_purchase_ecomm_prodids(),\n\t\t\trevenue_value : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\titems : wpm.bing_purchase_items(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Load Microsoft Ads premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_bing_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.bing.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\twindow.uetq = window.uetq || [];\n\n\t\t\t(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:wpmDataLayer.pixels.bing.uet_tag_id};o.q=w[u],w[u]=new UET(o),w[u].push(\"pageLoad\")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!==\"loaded\"&&s!==\"complete\"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,\"script\",\"//bat.bing.com/bat.js\",\"uetq\");\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.bing_purchase_ecomm_prodids = function () {\n\n\t\tlet prodIds = []\n\n\t\tfor (const [key, orderItem] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== orderItem.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[orderItem.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[orderItem.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.bing_purchase_items = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Microsoft Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Pinterest event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.pinterest?.pixel_id && !wpmDataLayer?.pixels?.pinterest?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"pinterest-ads\")) wpm.loadPinterestPixel()\n\t}\n})\n\n\n// https://help.pinterest.com/en/business/article/add-event-codes\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"addtocart\", {\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [wpm.getPinterestProductData(product)],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// pageview event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"pagevisit\", {\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [wpm.getPinterestProductData(product)],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tlet productData = wpm.getPinterestProductData(product)\n\n\t\tpintrk(\"track\", \"pagevisit\", {\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [productData],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\n\t\tpintrk(\"track\", \"search\", {\n\t\t\tsearch_query: urlParams.get(\"s\"),\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view category event\njQuery(document).on(\"wpmCategory\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"viewcategory\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// https://developers.pinterest.com/docs/tag/conversion/\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"checkout\", {\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\torder_quantity: wpmDataLayer.order.quantity,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\torder_id : wpmDataLayer.order.id,\n\t\t\tline_items : wpm.pinterestFormattedOrderItems(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","// TODO add enhanced match email hash to uncached pages like cart and purchase confirmation page\n// TODO check if more values can be passed to product and category pages\n// TODO look into how Pinterest handles variants separately https://developers.pinterest.com/docs/tag/conversion/\n\n/**\n * Load Pinterest premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getPinterestProductData = function (product) {\n\n\t\tif (product.isVariation) {\n\t\t\treturn {\n\t\t\t\tproduct_name : product.name,\n\t\t\t\tproduct_variant_id: product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\t// product_id : wpmDataLayer.products[product.parentId].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_id : product.parentId_dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_category: product.category,\n\t\t\t\tproduct_variant : product.variant,\n\t\t\t\tproduct_price : product.price,\n\t\t\t\tproduct_quantity: product.quantity,\n\t\t\t\tproduct_brand : product.brand,\n\t\t\t}\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tproduct_name : product.name,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_category: product.category,\n\t\t\t\tproduct_price : product.price,\n\t\t\t\tproduct_quantity: product.quantity,\n\t\t\t\tproduct_brand : product.brand,\n\t\t\t}\n\t\t}\n\t}\n\n\twpm.pinterestFormattedOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tproduct_category: wpmDataLayer.products[key].category.join(\",\"),\n\t\t\t\t// product_brand : wpmDataLayer.products[key].brand,\n\t\t\t\tproduct_quantity: item.quantity,\n\t\t\t\tproduct_price : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.product_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])\n\t\t\t\torderItem.product_name = wpmDataLayer.products[item.variation_id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.product_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])\n\t\t\t\torderItem.product_name = wpmDataLayer.products[item.id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\t// https://developers.pinterest.com/docs/tag/conversion/\n\twpm.loadPinterestPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.pinterest.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(\n\t\t\t\tArray.prototype.slice.call(arguments))};var\n\t\t\t\tn=window.pintrk;n.queue=[],n.version=\"3.0\";var\n\t\t\t\tt=document.createElement(\"script\");t.async=!0,t.src=e;var\n\t\t\t\tr=document.getElementsByTagName(\"script\")[0];r.parentNode.insertBefore(t,r)}}(\"https://s.pinimg.com/ct/core.js\");\n\n\t\t\twpm.pinterestLoadEvent();\n\t\t\tpintrk('page');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.pinterestLoadEvent = function () {\n\t\ttry {\n\t\t\tif (\n\t\t\t\t(\n\t\t\t\t\twpmDataLayer.general.userLoggedIn ||\n\t\t\t\t\t\"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t)\n\t\t\t\t&& wpmDataLayer?.pixels?.pinterest?.enhanced_match\n\t\t\t) {\n\t\t\t\tpintrk(\"load\", wpmDataLayer.pixels.pinterest.pixel_id, {em: wpmDataLayer.pixels.pinterest.enhanced_match_email})\n\t\t\t} else {\n\t\t\t\tpintrk(\"load\", wpmDataLayer.pixels.pinterest.pixel_id)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Pinterest Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","// TODO check all events and add more if there are any\n\n/**\n * All event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.snapchat?.pixel_id && !wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"snapchat-ads\")) wpm.loadSnapchatPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"ADD_CART\", {\n\t\t\titem_ids: [product.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// VIEW_CONTENT event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"VIEW_CONTENT\", {\n\t\t\titem_ids: [product.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"PURCHASE\", {\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tprice : wpmDataLayer.order.value_filtered,\n\t\t\ttransaction_id: wpmDataLayer.order.id,\n\t\t\titem_ids : wpm.getSnapchatOrderItemIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Snapchat Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.snapchatGetEmail = function () {\n\n\t\tlet userInfo = {}\n\n\t\tif (wpmDataLayer?.user?.email_sha256) {\n\t\t\tuserInfo.user_hashed_email = wpmDataLayer.user?.email_sha256\n\t\t}\n\n\t\treturn userInfo\n\t}\n\n\twpm.loadSnapchatPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.snapchat.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(e,t,n){if(e.snaptr)return;var a=e.snaptr=function()\n\t\t\t{a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};\n\t\t\t\ta.queue=[];var s='script';r=t.createElement(s);r.async=!0;\n\t\t\t\tr.src=n;var u=t.getElementsByTagName(s)[0];\n\t\t\t\tu.parentNode.insertBefore(r,u);})(window,document,\n\t\t\t\t'https://sc-static.net/scevent.min.js');\n\n\t\t\tsnaptr(\"init\", wpmDataLayer.pixels.snapchat.pixel_id, wpm.snapchatGetEmail())\n\n\t\t\tsnaptr(\"track\", \"PAGE_VIEW\")\n\t\t\t// @formatter:on\n\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getSnapchatOrderItemIds = function () {\n\t\tlet contentIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn contentIds\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Snapchat Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","// https://ads.tiktok.com/help/article?aid=10028\n// TODO check all events and add more if there are any\n\n\n/**\n * Load TikTok Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.tiktok?.pixel_id && !wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"tiktok-ads\")) wpm.loadTikTokPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"AddToCart\", {\n\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tquantity : product.quantity,\n\t\t\tvalue : product.price,\n\t\t\tcurrency : product.currency,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"InitiateCheckout\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"ViewContent\", {\n\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tquantity : product.quantity,\n\t\t\tvalue : product.price,\n\t\t\tcurrency : product.currency,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"AddToWishlist\", {\n\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tquantity : product.quantity,\n\t\t\tvalue : product.price,\n\t\t\tcurrency : product.currency,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"Search\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n\n})\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(wpmDataLayer.pixels.tiktok.purchase_event_name, {\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\tcontents: wpm.getTikTokOrderItemIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load TikTok Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.loadTikTokPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.tiktok.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function (w, d, t) {\n\t\t\t\tw.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=[\"page\",\"track\",\"identify\",\"instances\",\"debug\",\"on\",\"off\",\"once\",\"ready\",\"alias\",\"group\",\"enableCookie\",\"disableCookie\"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i=\"https://analytics.tiktok.com/i18n/pixel/events.js\";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement(\"script\");o.type=\"text/javascript\",o.async=!0,o.src=i+\"?sdkid=\"+e+\"&lib=\"+t;var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(o,a)};\n\t\t\t\tttq.load(wpmDataLayer.pixels.tiktok.pixel_id);\n\t\t\t\tttq.page();\n\t\t\t}(window, document, 'ttq');\n\t\t\t// @formatter:on\n\n\t\t\tttq.track(\"Browse\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getTikTokOrderItemIds = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.content_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItem.content_name = wpmDataLayer.products[item.variation_id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.content_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItem.content_name = wpmDataLayer.products[item.id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * TikTok Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","// TODO implement AddPaymentInfo event\n// TODO check if more values can be passed to product and cart pages\n\n// https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html\n\n/**\n * Load Twitter Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.twitter?.pixel_id && !wpmDataLayer?.pixels?.twitter?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"twitter-ads\")) wpm.loadTwitterPixel()\n\t}\n})\n\n// add-to-cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"AddToCart\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"ViewContent\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// // view category event\n// jQuery(document).on('wpmCategory', function () {\n//\n// \tif (!wpmDataLayer?.pixels?.twitter?.loaded) return;\n//\n// \t// twq('track', 'AddToWishlist');\n// });\n\n// add-to-wishlist event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"AddToWishlist\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// start checkout event\njQuery(document).on(\"wpmBeginCheckout\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"InitiateCheckout\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"Search\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO find out under which circumstances to use different values in content_type\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"Purchase\", {\n\t\t\torder_id: wpmDataLayer.order.id,\n\t\t\t// content_type: 'product',\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnum_items : wpmDataLayer.order.quantity,\n\t\t\tcontent_ids: wpm.twitterGetOrderContentIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Load Twitter Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.loadTwitterPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.twitter.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);\n\t\t\t},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',\n\t\t\t\ta=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');\n\n\t\t\ttwq('init', wpmDataLayer.pixels.twitter.pixel_id);\n\t\t\t// @formatter:on\n\n\t\t\ttwq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.twitterGetOrderContentIds = function () {\n\t\tlet contentIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn contentIds\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Twitter Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\twindow.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// console.log('unblocking all scripts')\n\n\t\t$.each(\n\t\t\t$(\"script[type=\\\"blocked/javascript\\\"]\"), function (index, scriptNode) {\n\n\t\t\t\tif ($(scriptNode).data(\"wpm-cookie-category\").includes(\"analytics\") && analytics) {\n\t\t\t\t\twpm.unblockScript(scriptNode, true)\n\t\t\t\t} else if ($(scriptNode).data(\"wpm-cookie-category\").includes(\"ads\") && ads) {\n\t\t\t\t\twpm.unblockScript(scriptNode, true)\n\t\t\t\t}\n\t\t\t})\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t$.each(\n\t\t\t$(\"script[type=\\\"blocked/javascript\\\"]\"), function (index, node) {\n\n\t\t\t\tif (wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\t\twpm.unblockScript(node, true)\n\t\t\t\t} else if ($(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\t\twpm.unblockScript(node, true)\n\t\t\t\t}\n\t\t\t})\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\twindow.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\twindow.addEventListener(\"CookiebotOnAccept\", () => {\n\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\twindow.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\twindow.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t// Complianz Cookie\n\t// If visitor accepts cookies in Complianz unblock the scripts\n\tdocument.addEventListener(\"cmplzStatusChange\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\tjQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", function () {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(this).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\n// jQuery('.add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .js-ajax-add-to-cart, .single_add_to_cart_button, .btn_color-2').on('click', function (e) {\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", function () {\n\n\ttry {\n\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(this).attr(\"href\") !== \"undefined\" && jQuery(this).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tlet quantity = 1\n\t\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t} else {\n\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(this).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"variable\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each(function () {\n\n\t\t\t\t\t\tlet quantity = Number(jQuery(this).find(\".input-text.qty\").val())\n\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\t\tlet classes = jQuery(this).attr(\"class\")\n\t\t\t\t\t\tlet productId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\tlet quantity = 1\n\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", function (event) {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", function () {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(this).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), function () {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", function () {\n\n\tif (wpm.isEmail(jQuery(this).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", function () {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", function () {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", function () {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each(function () {\n\n\t\t\tlet url = new URL(jQuery(this).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(this).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(document).on(\"click\", \".add_to_wishlist, .wl-add-to\", function () {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(this).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"productid\")\n\t\t} else if (jQuery(this).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"updated_cart_totals\", function () {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", function (event, variation) {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n\n\t\ttry {\n\t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n\t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t/**\n\t\t\t * If we have a variable product with no preset,\n\t\t\t * and variations output is enabled,\n\t\t\t * then we send a viewItem event with the first\n\t\t\t * variation we find for the parent.\n\t\t\t * If variations output is disabled,\n\t\t\t * we just send the parent ID.\n\t\t\t *\n\t\t\t * And if Facebook microdata is active, use the\n\t\t\t * microdata product ID.\n\t\t\t */\n\n\t\t\tif (\n\t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n\t\t\t\twpmDataLayer?.general?.variationsOutput\n\t\t\t) {\n\t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t\t\tif (\"parentId\" in product) {\n\n\t\t\t\t\t\tproductId = product.id\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n\t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(window).on(\"wpmLoad\", function () {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(window).on(\"wpmLoad\", function () {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t} else {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t\t}\n\n\t\t} else {\n\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (\"product\" === wpmDataLayer.shop.page_type && \"variable\" !== wpmDataLayer.shop.product_type && wpm.getMainProductIdFromProductPage()) {\n\n\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\n\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\n\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\n\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\n\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\n\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Load all pixels\n */\njQuery(window).on(\"wpmPreLoadPixels\", function () {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\twpm.updateConsentCookieValues(true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookieWpmRestEndpointAvailable: \"_wpm_endpoint_available\",\n\t\trestEndpoint : \"/wp-json/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable))\n\t\t} else {\n\t\t\t// return wpm.testEndpoint();\n\t\t\t// just set the value whenever possible in order not to wait or block the main thread\n\t\t\twpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\twpm.testEndpoint = (\n\t\turl = location.protocol + \"//\" + location.host + wpmRestSettings.restEndpoint,\n\t\tcookieName = wpmRestSettings.cookieWpmRestEndpointAvailable,\n\t) => {\n\t\t// console.log('testing endpoint');\n\n\t\tjQuery.ajax(url, {\n\t\t\ttype : \"HEAD\",\n\t\t\ttimeout: 1000,\n\t\t\t// async: false,\n\t\t\tstatusCode: {\n\t\t\t\t200: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, true);\n\t\t\t\t\t// console.log('endpoint works');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\t\t},\n\t\t\t\t404: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t\t0 : function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t},\n\t\t}).then(response => {\n\t\t\t// console.log('test done')\n\t\t\t// console.log('result: ' + JSON.parse(window.sessionStorage.getItem(cookieName)));\n\t\t\t// return JSON.parse(window.sessionStorage.getItem(cookieName));\n\t\t})\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookieWpmRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_get_cart_items\",\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (cartItems) {\n\n\t\t\t\t\t\t// save all cart items into wpmDataLayer\n\n\t\t\t\t\t\tif (!cartItems[\"cart\"]) cartItems[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(cartItems[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(cartItems[\"cart\"]))\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = productIds => {\n\n\n\t\t// reduce productIds by products already in the dataLayer\n\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_get_product_ids\",\n\t\t\t\tproductIds: productIds,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (products) {\n\n\t\t\t\t\t\t// merge products into wpmDataLayer.products\n\t\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, products)\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = orderId => {\n\n\t\ttry {\n\t\t\t// save the state in the database\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_purchase_pixels_fired\",\n\t\t\t\torder_id: orderId,\n\t\t\t\t// nonce : ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tif (response.success === false) {\n\t\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = (url, options) => {\n\n\t\t// Allow user to set any option except for dataType, cache, and url\n\t\toptions = jQuery.extend(options || {}, {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t})\n\n\t\t// Use $.ajax() since it is more flexible than $.getScript\n\t\t// Return the jqXHR object so we can chain callbacks\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\n// #endif\n","(function (wpm, $, undefined) {\n\n\t// do something\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"WooCommerce Pixel Manager: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tjQuery(document).trigger(\"wpmLoad\", {})\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n\trequire(\"./microsoft-ads/loader\")\n\trequire(\"./pinterest/loader\")\n\trequire(\"./snapchat/loader\")\n\trequire(\"./tiktok/loader\")\n\trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","product","eventId","getRandomEventId","fbq","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","eventID","shop","trigger","event_name","event_id","user_data","getFbUserData","product_data","product_id","event_source_url","window","location","href","e","console","error","fbViewContent","setFbUserData","order","value_filtered","facebookContentIds","id","content_category","category","eventData","capi","data","action","nonce","ajax","type","dataType","url","ajax_url","success","msg","indexOf","page_type","setFacebookIdentifiersOnServer","$","undefined","fBUserData","f","b","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","Math","random","toString","substring","getFbUserDataFromBrowser","fbp","getCookie","fbc","client_user_agent","navigator","userAgent","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","sessionStorage","getItem","response","setItem","JSON","stringify","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","gtagLoaded","then","gtag","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","getGoogleAdsDynamicRemarketingOrderItems","data_basic","data_with_cart","getGoogleAdsConversionIdentifiersWithLabel","transaction_id","number","new_customer","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","eec","ga3GetFullProductItemData","getCartItemsGaUa","checkout_step","step","checkout_option","search_term","getSearchTermFromUrl","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","list_position","productId","cart","ga3GetBasicProductItemData","ga3CanProductListBeSet","wpmProductListStore","parse","includes","position","ga4","measurement_id","getGA4OrderItems","ga4GetFullProductItemData","item_list_name","item_list_id","list_id","getCartItemsGa4","cartValue","toFixed","item_name","item_category","item_id","item_variant","item_brand","ga4AddFormattedCategories","categories","Array","from","Set","isArray","length","max","i","ga4GetBasicProductItemData","ga4AddListNameToProduct","index","state","canGoogleLoad","loadGoogle","logPreventedPixelLoading","setGoogleCidOnServer","consent_mode","active","getConsentValues","mode","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","done","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","targetIDs","clientID","target_ids","client_id","referrer","getReferrerFromCookie","gclid","getClidFromBrowser","getUserAgent","viewPortWidth","getViewPort","width","viewPortHeight","height","forEach","targetId","setCookie","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","j","a","r","hj","q","_hjSettings","hjid","hjsv","appendChild","bing","uet_tag_id","load_bing_pixel","uetq","ecomm_pagetype","ecomm_prodid","bing_purchase_ecomm_prodids","revenue_value","bing_purchase_items","w","d","u","ti","UET","onload","onreadystatechange","this","readyState","pinterest","loadPinterestPixel","pintrk","line_items","getPinterestProductData","productData","urlParams","URLSearchParams","search","search_query","get","order_quantity","order_id","pinterestFormattedOrderItems","isVariation","product_name","product_variant_id","parentId_dyn_r_ids","product_category","product_variant","product_price","product_quantity","product_brand","prototype","slice","call","pinterestLoadEvent","userLoggedIn","enhanced_match","em","enhanced_match_email","snapchat","loadSnapchatPixel","snaptr","item_ids","getSnapchatOrderItemIds","snapchatGetEmail","userInfo","user","email_sha256","user_hashed_email","handleRequest","contentIds","tiktok","loadTikTokPixel","ttq","track","content_id","purchase_event_name","contents","getTikTokOrderItemIds","TiktokAnalyticsObject","methods","setAndDefer","concat","instance","_i","load","_u","_t","_o","page","twitter","loadTwitterPixel","twq","num_items","twitterGetOrderContentIds","exe","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","addEventListener","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","removeAttr","unblockAllScripts","each","unblockSelectedPixels","Cookiebot","consent","detail","huObserver","hu","documentElement","body","URL","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","microdata_product_id","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","hasLoginEventFired","setLoginEventFired","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","protocol","cookieName","timeout","statusCode","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","email","test","quantityToRemove","parentId","saveCartObjectToDataLayer","cartItems","filter","hasOwnProperty","assign","cartObject","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","elem","parent","hasClass","prev","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","getWpmSessionData","setWpmSessionData","cartItemKey","cartItemKeys","setReferrerToCookie","clidCookieId","clidId","dclid","clientWidth","innerWidth","clientHeight","innerHeight","options","extend","cache","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","pageReady","isMiniCartActive","parameter","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"wpm-public__premium_only.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,WAAY,gBAEhC,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,EAAgCE,QAC5EC,IAAIC,SAAS,MAAO,iBAAiBD,IAAIE,uBAM/CV,OAAOC,UAAUC,GAAG,gBAAgB,SAAUS,EAAOC,GAEpD,IAAI,UACH,GAAI,UAACT,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,QAAC,EAAgCE,OAAQ,OAE7C,IAAIM,EAAUL,IAAIM,mBAElBC,IAAI,QAAS,YAAa,CACzBC,aAAc,UACdC,aAAcL,EAAQM,KACtBC,YAAcP,EAAQQ,UAAUjB,aAAaC,OAAOC,SAASgB,oBAAoBC,SACjFC,MAAcC,WAAWZ,EAAQa,SAAWb,EAAQc,OACpDC,SAAcf,EAAQe,UACpB,CACFC,QAASf,IAGVD,EAAO,SAAeT,aAAa0B,KAAKF,SAExC3B,OAAOC,UAAU6B,QAAQ,iBAAkB,CAC1CC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U","sources":["webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/microsoft-ads/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/microsoft-ads/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/microsoft-ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/pinterest/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/pinterest/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/pinterest/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/snapchat/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/snapchat/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/snapchat/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/tiktok/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/tiktok/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/tiktok/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/twitter/event_listeners_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/twitter/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/twitter/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/cookie_consent.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_premium.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/init.js","webpack://WooCommerce-Pixel-Manager/webpack/bootstrap","webpack://WooCommerce-Pixel-Manager/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToCart\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"InitiateCheckout\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.fbViewContent(product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"Search\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\",\n\t\t\t{\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t\t{eventID: wpmDataLayer.order.id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * All event listeners\n * */\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_name : product.name,\n\t\t\tcontent_category: product.category,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t// contents : \"\",\n\t\t\tcurrency: product.currency,\n\t\t\tvalue : product.price,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmFbCapiEvent\", function (event, eventData) {\n\n\ttry {\n\t\tif (!wpmDataLayer.pixels.facebook.capi) return\n\n\t\t// save the state in the database\n\t\tlet data = {\n\t\t\taction: \"wpm_facebook_capi_event\",\n\t\t\tdata : eventData,\n\t\t\t// nonce : wpm_facebook_premium_only_ajax_object.nonce,\n\t\t\tnonce: wpm.nonce,\n\t\t}\n\n\t\tjQuery.ajax(\n\t\t\t{\n\t\t\t\ttype : \"post\",\n\t\t\t\tdataType: \"json\",\n\t\t\t\t// url : wpm_facebook_premium_only_ajax_object.ajax_url,\n\t\t\t\turl : wpm.ajax_url,\n\t\t\t\tdata : data,\n\t\t\t\tsuccess: function (msg) {\n\t\t\t\t\t// console.log(msg);\n\t\t\t\t},\n\t\t\t\terror : function (msg) {\n\t\t\t\t\t// console.log(msg);\n\t\t\t\t},\n\t\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\njQuery(window).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && wpmDataLayer.pixels.facebook.capi) {\n\n\t\t\t// We need to be sure that we capture the cid early enough, because the\n\t\t\t// shop might be using a one click checkout button as early as on the product page.\n\t\t\tif ([\"cart\", \"checkout\"].indexOf(wpmDataLayer.shop.page_type) >= 0) {\n\n\t\t\t\twpm.setFacebookIdentifiersOnServer()\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fBUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need the first one for InitiateCheckout\n\t\t * where getting the user_data from the browser is too slow\n\t\t * using wpm.getCookie(), so we cache the user_data earlier.\n\t\t * And we need the second one because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user_data is too slow. But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t */\n\n\t\tif (fBUserData) {\n\t\t\treturn fBUserData\n\t\t} else {\n\t\t\treturn wpm.getFbUserDataFromBrowser()\n\t\t}\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfBUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => ({\n\t\tfbp : wpm.getCookie(\"_fbp\"),\n\t\tfbc : wpm.getCookie(\"_fbc\"),\n\t\tclient_user_agent: navigator.userAgent,\n\t})\n\n\twpm.fbViewContent = product => {\n\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"track\", \"ViewContent\", {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_name: product.name,\n\t\t\t\t// content_category: product.category,\n\t\t\t\tcontent_ids: product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t\tvalue : product.price,\n\t\t\t}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : \"ViewContent\",\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tproduct_data : product,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, {}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Add functions for Facebook (pro)\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.setFacebookIdentifiersOnServer = function () {\n\n\t\ttry {\n\n\t\t\t// get first party cookies fbp and fbc\n\n\t\t\t// send the cookies to the server in order to save them on the session\n\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_facebook_set_session_identifiers\",\n\t\t\t\t// nonce : wpm_facebook_premium_only_ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t\tfbp : wpm.getCookie(\"_fbp\"),\n\t\t\t\tfbc : wpm.getCookie(\"_fbc\"),\n\t\t\t}\n\n\t\t\tif (data.fbp && window.sessionStorage && window.sessionStorage.getItem(\"wpm_fb_session_id_\" + data.fbp + \"_set\")) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : wpm_facebook_premium_only_ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t// console.log(response);\n\n\t\t\t\t\t\tif (window.sessionStorage && response[\"success\"] === true) {\n\t\t\t\t\t\t\t// console.log('setting session storage');\n\t\t\t\t\t\t\twindow.sessionStorage.setItem(\"wpm_fb_session_id_\" + data.fbp + \"_set\", JSON.stringify(true))\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\t// console.log(response);\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : (product.quantity ? product.quantity : 1) * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\t// value : 1 * product.price,\n\t\t\t\titems: products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t\t})\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n\n\n\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet conversionIdentifiers = []\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t}\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Universal Analytics (GA3) premium event listeners\n * */\n\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content event\njQuery(document).on(\"wpmSelectContentGaUa\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"select_content\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_wishlist event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// remove_from_cart event\njQuery(document).on(\"wpmRemoveFromCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"remove_from_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\titems : [wpm.ga3GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"begin_checkout\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\titems : wpm.getCartItemsGaUa(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// set_checkout_option event\njQuery(document).on(\"wpmFireCheckoutOption\", function (event, data) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"set_checkout_option\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcheckout_step : data.step,\n\t\t\t\tcheckout_option: data.checkout_option,\n\t\t\t\tvalue : data.value,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// checkout_progress event\njQuery(document).on(\"wpmFireCheckoutProgress\", function (event, data) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"checkout_progress\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tcheckout_step: data.step,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t// console.log(`${key}: ${value}`);\n\n\t\t\tproducts.push(wpm.ga3GetFullProductItemData(product))\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\t\titems : products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// User login event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.universal.property_id,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Universal Analytics (GA3) premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getCartItemsGaUa = function () {\n\n\t\tlet data = []\n\n\t\tfor (const [productId, product] of Object.entries(wpmDataLayer.cart)) {\n\n\t\t\tdata.push(wpm.ga3GetFullProductItemData(product))\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.ga3GetBasicProductItemData = function (product) {\n\n\t\treturn {\n\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],\n\t\t\tname : product.name,\n\t\t\tbrand : product.brand,\n\t\t\tcategory: product.category.join(\"/\"),\n\t\t\t// coupon : \"\",\n\t\t\t// list_name : wpmDataLayer.shop.list_name,\n\t\t\t// list_position: product.list_position, // doesn't make sense on mini_cart\n\t\t\tprice : product.price,\n\t\t\tquantity: product.quantity,\n\t\t\tvariant : product.variant,\n\t\t}\n\t}\n\n\n\n\twpm.ga3CanProductListBeSet = function (productId) {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\t// Check if the wpm_product_list_store_ga3 already exists,\n\t\t\t// and if not, create it\n\t\t\tif (window.sessionStorage.getItem(\"wpm_product_list_store_ga3\") === null) {\n\t\t\t\twindow.sessionStorage.setItem(\"wpm_product_list_store_ga3\", JSON.stringify([]))\n\t\t\t}\n\n\t\t\tlet wpmProductListStore = JSON.parse(window.sessionStorage.getItem(\"wpm_product_list_store_ga3\"))\n\n\t\t\tif (wpmProductListStore.includes(productId)) {\n\n\t\t\t\treturn false\n\t\t\t} else {\n\n\t\t\t\twpmProductListStore.push(productId)\n\t\t\t\twindow.sessionStorage.setItem(\"wpm_product_list_store_ga3\", JSON.stringify(wpmProductListStore))\n\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.ga3GetFullProductItemData = function (product) {\n\n\t\tlet item_data\n\n\t\titem_data = wpm.ga3GetBasicProductItemData(product)\n\t\titem_data = wpm.ga3AddListNameToProduct(item_data, product.position)\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 premium event listeners\n * */\n\n// view_item_list event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item_list\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\t\titem_list_name: wpmDataLayer.shop.list_name, // doesn't make sense on mini_cart\n\t\t\t\titem_list_id : wpmDataLayer.shop.list_id, // doesn't make sense on mini_cart\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#select_item\njQuery(document).on(\"wpmSelectItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"select_item\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_cart\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_wishlist event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_wishlist\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// remove_from_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#remove_from_cart\njQuery(document).on(\"wpmRemoveFromCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"remove_from_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#begin_checkout\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"begin_checkout\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\t// coupon: \"\",\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: wpm.getCartItemsGa4(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_cart\njQuery(document).on(\"wpmViewCart\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tif (jQuery.isEmptyObject(wpmDataLayer.cart)) return\n\n\t\tlet products = []\n\t\tlet cartValue = null\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.cart)) {\n\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product))\n\n\t\t\tcartValue = cartValue + product.quantity * product.price\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\tvalue : cartValue.toFixed(2),\n\t\t\t\titems : products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t// console.log(`${key}: ${value}`);\n\t\t\t\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product))\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\t\titems : products,\n\t\t\t})\n\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load GA4 premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.ga4AddFormattedCategories = function (item_data, categories) {\n\n\t\tlet maxCategories = 5\n\n\t\t// remove categories with equal names from array\n\t\tcategories = Array.from(new Set(categories))\n\n\t\tif (Array.isArray(categories) && categories.length) {\n\n\t\t\titem_data[\"item_category\"] = categories[0]\n\n\t\t\tlet max = categories.length > maxCategories ? maxCategories : categories.length\n\n\t\t\tfor (let i = 1; i < max; i++) {\n\t\t\t\titem_data[\"item_category\" + (i + 1)] = categories[i]\n\t\t\t}\n\t\t}\n\n\t\treturn item_data\n\t}\n\n\twpm.getCartItemsGa4 = function () {\n\n\t\tlet data = []\n\n\t\tfor (const [productId, product] of Object.entries(wpmDataLayer.cart)) {\n\n\t\t\tdata.push(wpm.ga4GetFullProductItemData(product))\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.ga4GetBasicProductItemData = function (product) {\n\n\t\treturn {\n\t\t\titem_id : product.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],\n\t\t\titem_name: product.name,\n\t\t\t// coupon : \"\",\n\t\t\t// discount: 0,\n\t\t\t// affiliation: \"\",\n\t\t\titem_brand : product.brand,\n\t\t\titem_variant: product.variant,\n\t\t\tprice : product.price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tquantity : product.quantity,\n\t\t}\n\t}\n\n\twpm.ga4AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\titem_data.item_list_name = wpmDataLayer.shop.list_name\n\t\titem_data.item_list_id = wpmDataLayer.shop.list_id\n\n\t\tif (productPosition) {\n\t\t\titem_data.index = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n\twpm.ga4GetFullProductItemData = function (product) {\n\n\t\tlet item_data\n\n\t\titem_data = wpm.ga4GetBasicProductItemData(product)\n\t\titem_data = wpm.ga4AddListNameToProduct(item_data, product.position)\n\t\titem_data = wpm.ga4AddFormattedCategories(item_data, product.category)\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Run the following on every page load\n */\n\njQuery(window).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.eec &&\n\t\t\t!window?.sessionStorage?.getItem('_wpm_ga_cid_set', JSON.parse(true)) &&\n\t\t\t(\n\t\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id\n\t\t\t)\n\t\t) {\n\t\t\t// We need to be sure that we capture the cid early enough, because the\n\t\t\t// shop might be using a one click checkout button as early as on the product page.\n\t\t\tif ([\"cart\", \"checkout\"].indexOf(wpmDataLayer.shop.page_type) >= 0) {\n\t\t\t\twpm.setGoogleCidOnServer()\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\twindow.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, wpmDataLayer.pixels.google.analytics.ga4.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.done(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base premium functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.setGoogleCidOnServer = function () {\n\n\t\ttry {\n\n\t\t\tlet targetIDs = []\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) targetIDs.push(wpmDataLayer.pixels.google.analytics.ga4.measurement_id)\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) targetIDs.push(wpmDataLayer.pixels.google.analytics.universal.property_id)\n\n\n\t\t\twpm.gtagLoaded().then(function () {\n\t\t\t\tgtag(\"get\", targetIDs[0], \"client_id\", (clientID) => {\n\n\t\t\t\t\t// save the state in the database\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\taction: \"wpm_google_analytics_set_session_data\",\n\t\t\t\t\t\t// 'nonce' : wpm_google_premium_only_ajax_object.nonce,\n\t\t\t\t\t\t// 'nonce' : wpm.nonce,\n\t\t\t\t\t\ttarget_ids: targetIDs,\n\t\t\t\t\t\tclient_id : clientID,\n\t\t\t\t\t\treferrer : wpm.getReferrerFromCookie(),\n\t\t\t\t\t\tgclid : wpm.getClidFromBrowser(\"gclid\"),\n\t\t\t\t\t\t// dclid : wpm.getClidFromBrowser('dclid'),\n\t\t\t\t\t\tuserAgent : wpm.getUserAgent(),\n\t\t\t\t\t\tviewPortWidth : wpm.getViewPort().width,\n\t\t\t\t\t\tviewPortHeight: wpm.getViewPort().height,\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.ajax(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype : \"post\",\n\t\t\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t\t\t// url : wpm_google_premium_only_ajax_object.ajax_url,\n\t\t\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\t\t\tdata : data,\n\t\t\t\t\t\t\tsuccess: function (response) {\n\n\t\t\t\t\t\t\t\tif (response[\"success\"] === true) {\n\t\t\t\t\t\t\t\t\tif (window.sessionStorage) {\n\t\t\t\t\t\t\t\t\t\ttargetIDs.forEach((targetId) => {\n\t\t\t\t\t\t\t\t\t\t\twindow.sessionStorage.setItem('_wpm_ga_cid_set', JSON.stringify(true))\n\t\t\t\t\t\t\t\t\t\t\twindow.sessionStorage.setItem(\"wpm_cid_\" + targetId + \"_\" + clientID + \"_set\", JSON.stringify(true))\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ttargetIDs.forEach((targetId) => {\n\t\t\t\t\t\t\t\t\t\t\twpm.setCookie(\"wpm_cid_\" + targetId + \"_\" + clientID + \"_set\", true)\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\t\t\tconsole.error(response)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\n\t\t\t\t\t// wp.ajax.post('wpm_google_analytics_set_session_data', data)\n\t\t\t\t\t// .done(function (response) {\n\t\t\t\t\t//\n\t\t\t\t\t// // console.log(response);\n\t\t\t\t\t//\n\t\t\t\t\t// if (response === 'success') {\n\t\t\t\t\t// if (window.sessionStorage) {\n\t\t\t\t\t// // console.log('setting session storage');\n\t\t\t\t\t// window.sessionStorage.setItem(cidSetOnServerCookie, JSON.stringify(true));\n\t\t\t\t\t// } else {\n\t\t\t\t\t// // console.log('not setting session storage');\n\t\t\t\t\t//\n\t\t\t\t\t// wpm.setCookie(cidSetOnServerCookie, true);\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\t// })\n\t\t\t\t\t// .fail(function (response) {\n\t\t\t\t\t// console.log(response);\n\t\t\t\t\t// });\n\t\t\t\t})\n\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .done(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Microsoft Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.bing?.uet_tag_id && !wpmDataLayer?.pixels?.bing?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"microsoft-ads\")) wpm.load_bing_pixel()\n\t}\n})\n\n// add-to-cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"cart\",\n\t\t\tecomm_prodid : product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"product\",\n\t\t\tecomm_prodid : product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view category event\njQuery(document).on(\"wpmCategory\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"category\",\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"\", {\n\t\t\tecomm_pagetype: \"searchresults\",\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"purchase\", {\n\t\t\tecomm_pagetype: \"purchase\",\n\t\t\tecomm_prodid : wpm.bing_purchase_ecomm_prodids(),\n\t\t\trevenue_value : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\titems : wpm.bing_purchase_items(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Load Microsoft Ads premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_bing_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.bing.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\twindow.uetq = window.uetq || [];\n\n\t\t\t(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:wpmDataLayer.pixels.bing.uet_tag_id};o.q=w[u],w[u]=new UET(o),w[u].push(\"pageLoad\")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!==\"loaded\"&&s!==\"complete\"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,\"script\",\"//bat.bing.com/bat.js\",\"uetq\");\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.bing_purchase_ecomm_prodids = function () {\n\n\t\tlet prodIds = []\n\n\t\tfor (const [key, orderItem] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== orderItem.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[orderItem.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[orderItem.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.bing_purchase_items = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Microsoft Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Pinterest event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.pinterest?.pixel_id && !wpmDataLayer?.pixels?.pinterest?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"pinterest-ads\")) wpm.loadPinterestPixel()\n\t}\n})\n\n\n// https://help.pinterest.com/en/business/article/add-event-codes\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"addtocart\", {\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [wpm.getPinterestProductData(product)],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// pageview event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"pagevisit\", {\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [wpm.getPinterestProductData(product)],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tlet productData = wpm.getPinterestProductData(product)\n\n\t\tpintrk(\"track\", \"pagevisit\", {\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [productData],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\n\t\tpintrk(\"track\", \"search\", {\n\t\t\tsearch_query: urlParams.get(\"s\"),\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view category event\njQuery(document).on(\"wpmCategory\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"viewcategory\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// https://developers.pinterest.com/docs/tag/conversion/\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"checkout\", {\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\torder_quantity: wpmDataLayer.order.quantity,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\torder_id : wpmDataLayer.order.id,\n\t\t\tline_items : wpm.pinterestFormattedOrderItems(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","// TODO add enhanced match email hash to uncached pages like cart and purchase confirmation page\n// TODO check if more values can be passed to product and category pages\n// TODO look into how Pinterest handles variants separately https://developers.pinterest.com/docs/tag/conversion/\n\n/**\n * Load Pinterest premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getPinterestProductData = function (product) {\n\n\t\tif (product.isVariation) {\n\t\t\treturn {\n\t\t\t\tproduct_name : product.name,\n\t\t\t\tproduct_variant_id: product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\t// product_id : wpmDataLayer.products[product.parentId].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_id : product.parentId_dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_category: product.category,\n\t\t\t\tproduct_variant : product.variant,\n\t\t\t\tproduct_price : product.price,\n\t\t\t\tproduct_quantity: product.quantity,\n\t\t\t\tproduct_brand : product.brand,\n\t\t\t}\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tproduct_name : product.name,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_category: product.category,\n\t\t\t\tproduct_price : product.price,\n\t\t\t\tproduct_quantity: product.quantity,\n\t\t\t\tproduct_brand : product.brand,\n\t\t\t}\n\t\t}\n\t}\n\n\twpm.pinterestFormattedOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tproduct_category: wpmDataLayer.products[key].category.join(\",\"),\n\t\t\t\t// product_brand : wpmDataLayer.products[key].brand,\n\t\t\t\tproduct_quantity: item.quantity,\n\t\t\t\tproduct_price : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.product_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])\n\t\t\t\torderItem.product_name = wpmDataLayer.products[item.variation_id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.product_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])\n\t\t\t\torderItem.product_name = wpmDataLayer.products[item.id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\t// https://developers.pinterest.com/docs/tag/conversion/\n\twpm.loadPinterestPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.pinterest.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(\n\t\t\t\tArray.prototype.slice.call(arguments))};var\n\t\t\t\tn=window.pintrk;n.queue=[],n.version=\"3.0\";var\n\t\t\t\tt=document.createElement(\"script\");t.async=!0,t.src=e;var\n\t\t\t\tr=document.getElementsByTagName(\"script\")[0];r.parentNode.insertBefore(t,r)}}(\"https://s.pinimg.com/ct/core.js\");\n\n\t\t\twpm.pinterestLoadEvent();\n\t\t\tpintrk('page');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.pinterestLoadEvent = function () {\n\t\ttry {\n\t\t\tif (\n\t\t\t\t(\n\t\t\t\t\twpmDataLayer.general.userLoggedIn ||\n\t\t\t\t\t\"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t)\n\t\t\t\t&& wpmDataLayer?.pixels?.pinterest?.enhanced_match\n\t\t\t) {\n\t\t\t\tpintrk(\"load\", wpmDataLayer.pixels.pinterest.pixel_id, {em: wpmDataLayer.pixels.pinterest.enhanced_match_email})\n\t\t\t} else {\n\t\t\t\tpintrk(\"load\", wpmDataLayer.pixels.pinterest.pixel_id)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Pinterest Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","// TODO check all events and add more if there are any\n\n/**\n * All event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.snapchat?.pixel_id && !wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"snapchat-ads\")) wpm.loadSnapchatPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"ADD_CART\", {\n\t\t\titem_ids: [product.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// VIEW_CONTENT event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"VIEW_CONTENT\", {\n\t\t\titem_ids: [product.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"PURCHASE\", {\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tprice : wpmDataLayer.order.value_filtered,\n\t\t\ttransaction_id: wpmDataLayer.order.id,\n\t\t\titem_ids : wpm.getSnapchatOrderItemIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Snapchat Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.snapchatGetEmail = function () {\n\n\t\tlet userInfo = {}\n\n\t\tif (wpmDataLayer?.user?.email_sha256) {\n\t\t\tuserInfo.user_hashed_email = wpmDataLayer.user?.email_sha256\n\t\t}\n\n\t\treturn userInfo\n\t}\n\n\twpm.loadSnapchatPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.snapchat.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(e,t,n){if(e.snaptr)return;var a=e.snaptr=function()\n\t\t\t{a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};\n\t\t\t\ta.queue=[];var s='script';r=t.createElement(s);r.async=!0;\n\t\t\t\tr.src=n;var u=t.getElementsByTagName(s)[0];\n\t\t\t\tu.parentNode.insertBefore(r,u);})(window,document,\n\t\t\t\t'https://sc-static.net/scevent.min.js');\n\n\t\t\tsnaptr(\"init\", wpmDataLayer.pixels.snapchat.pixel_id, wpm.snapchatGetEmail())\n\n\t\t\tsnaptr(\"track\", \"PAGE_VIEW\")\n\t\t\t// @formatter:on\n\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getSnapchatOrderItemIds = function () {\n\t\tlet contentIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn contentIds\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Snapchat Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","// https://ads.tiktok.com/help/article?aid=10028\n// TODO check all events and add more if there are any\n\n\n/**\n * Load TikTok Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.tiktok?.pixel_id && !wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"tiktok-ads\")) wpm.loadTikTokPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"AddToCart\", {\n\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tquantity : product.quantity,\n\t\t\tvalue : product.price,\n\t\t\tcurrency : product.currency,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"InitiateCheckout\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"ViewContent\", {\n\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tquantity : product.quantity,\n\t\t\tvalue : product.price,\n\t\t\tcurrency : product.currency,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"AddToWishlist\", {\n\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tquantity : product.quantity,\n\t\t\tvalue : product.price,\n\t\t\tcurrency : product.currency,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\"Search\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n\n})\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(wpmDataLayer.pixels.tiktok.purchase_event_name, {\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\tcontents: wpm.getTikTokOrderItemIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load TikTok Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.loadTikTokPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.tiktok.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function (w, d, t) {\n\t\t\t\tw.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=[\"page\",\"track\",\"identify\",\"instances\",\"debug\",\"on\",\"off\",\"once\",\"ready\",\"alias\",\"group\",\"enableCookie\",\"disableCookie\"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i=\"https://analytics.tiktok.com/i18n/pixel/events.js\";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement(\"script\");o.type=\"text/javascript\",o.async=!0,o.src=i+\"?sdkid=\"+e+\"&lib=\"+t;var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(o,a)};\n\t\t\t\tttq.load(wpmDataLayer.pixels.tiktok.pixel_id);\n\t\t\t\tttq.page();\n\t\t\t}(window, document, 'ttq');\n\t\t\t// @formatter:on\n\n\t\t\tttq.track(\"Browse\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getTikTokOrderItemIds = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.content_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItem.content_name = wpmDataLayer.products[item.variation_id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.content_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type])\n\t\t\t\torderItem.content_name = wpmDataLayer.products[item.id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * TikTok Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","// TODO implement AddPaymentInfo event\n// TODO check if more values can be passed to product and cart pages\n\n// https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html\n\n/**\n * Load Twitter Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.twitter?.pixel_id && !wpmDataLayer?.pixels?.twitter?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"twitter-ads\")) wpm.loadTwitterPixel()\n\t}\n})\n\n// add-to-cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"AddToCart\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"ViewContent\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// // view category event\n// jQuery(document).on('wpmCategory', function () {\n//\n// \tif (!wpmDataLayer?.pixels?.twitter?.loaded) return;\n//\n// \t// twq('track', 'AddToWishlist');\n// });\n\n// add-to-wishlist event\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"AddToWishlist\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// start checkout event\njQuery(document).on(\"wpmBeginCheckout\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"InitiateCheckout\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"Search\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO find out under which circumstances to use different values in content_type\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\ttwq(\"track\", \"Purchase\", {\n\t\t\torder_id: wpmDataLayer.order.id,\n\t\t\t// content_type: 'product',\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnum_items : wpmDataLayer.order.quantity,\n\t\t\tcontent_ids: wpm.twitterGetOrderContentIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Load Twitter Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.loadTwitterPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.twitter.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);\n\t\t\t},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',\n\t\t\t\ta=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');\n\n\t\t\ttwq('init', wpmDataLayer.pixels.twitter.pixel_id);\n\t\t\t// @formatter:on\n\n\t\t\ttwq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.twitterGetOrderContentIds = function () {\n\t\tlet contentIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn contentIds\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Twitter Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\nrequire(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\tjQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\tjQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\tjQuery(document).on(\"CookiebotOnAccept\", () => {\n\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\tjQuery(document).on(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\tjQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\tjQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tjQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\tjQuery(document).on(\"setCookieNotice\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\tjQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", function () {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(this).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\n// jQuery('.add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .js-ajax-add-to-cart, .single_add_to_cart_button, .btn_color-2').on('click', function (e) {\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", function () {\n\n\ttry {\n\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(this).attr(\"href\") !== \"undefined\" && jQuery(this).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tlet quantity = 1\n\t\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t} else {\n\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(this).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"variable\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each(function () {\n\n\t\t\t\t\t\tlet quantity = Number(jQuery(this).find(\".input-text.qty\").val())\n\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\t\tlet classes = jQuery(this).attr(\"class\")\n\t\t\t\t\t\tlet productId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\tlet quantity = 1\n\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", function (event) {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", function () {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(this).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), function () {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", function () {\n\n\tif (wpm.isEmail(jQuery(this).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", function () {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", function () {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", function () {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each(function () {\n\n\t\t\tlet url = new URL(jQuery(this).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(this).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(document).on(\"click\", \".add_to_wishlist, .wl-add-to\", function () {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(this).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"productid\")\n\t\t} else if (jQuery(this).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"updated_cart_totals\", function () {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", function (event, variation) {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n\n\t\ttry {\n\t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n\t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t/**\n\t\t\t * If we have a variable product with no preset,\n\t\t\t * and variations output is enabled,\n\t\t\t * then we send a viewItem event with the first\n\t\t\t * variation we find for the parent.\n\t\t\t * If variations output is disabled,\n\t\t\t * we just send the parent ID.\n\t\t\t *\n\t\t\t * And if Facebook microdata is active, use the\n\t\t\t * microdata product ID.\n\t\t\t */\n\n\t\t\tif (\n\t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n\t\t\t\twpmDataLayer?.general?.variationsOutput\n\t\t\t) {\n\t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t\t\tif (\"parentId\" in product) {\n\n\t\t\t\t\t\tproductId = product.id\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n\t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(window).on(\"wpmLoad\", function () {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(window).on(\"wpmLoad\", function () {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t} else {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t\t}\n\n\t\t} else {\n\t\t\twpm.setCookie(\"wpmReferrer\", \"\")\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (\"product\" === wpmDataLayer.shop.page_type && \"variable\" !== wpmDataLayer.shop.product_type && wpm.getMainProductIdFromProductPage()) {\n\n\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\n\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\n\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\n\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\n\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\n\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Load all pixels\n */\njQuery(window).on(\"wpmPreLoadPixels\", function () {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null,true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookieWpmRestEndpointAvailable: \"_wpm_endpoint_available\",\n\t\trestEndpoint : \"/wp-json/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable))\n\t\t} else {\n\t\t\t// return wpm.testEndpoint();\n\t\t\t// just set the value whenever possible in order not to wait or block the main thread\n\t\t\twpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\twpm.testEndpoint = (\n\t\turl = location.protocol + \"//\" + location.host + wpmRestSettings.restEndpoint,\n\t\tcookieName = wpmRestSettings.cookieWpmRestEndpointAvailable,\n\t) => {\n\t\t// console.log('testing endpoint');\n\n\t\tjQuery.ajax(url, {\n\t\t\ttype : \"HEAD\",\n\t\t\ttimeout: 1000,\n\t\t\t// async: false,\n\t\t\tstatusCode: {\n\t\t\t\t200: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, true);\n\t\t\t\t\t// console.log('endpoint works');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\t\t},\n\t\t\t\t404: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t\t0 : function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t},\n\t\t}).then(response => {\n\t\t\t// console.log('test done')\n\t\t\t// console.log('result: ' + JSON.parse(window.sessionStorage.getItem(cookieName)));\n\t\t\t// return JSON.parse(window.sessionStorage.getItem(cookieName));\n\t\t})\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookieWpmRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_get_cart_items\",\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (cartItems) {\n\n\t\t\t\t\t\t// save all cart items into wpmDataLayer\n\n\t\t\t\t\t\tif (!cartItems[\"cart\"]) cartItems[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(cartItems[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(cartItems[\"cart\"]))\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = productIds => {\n\n\n\t\t// reduce productIds by products already in the dataLayer\n\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_get_product_ids\",\n\t\t\t\tproductIds: productIds,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (products) {\n\n\t\t\t\t\t\t// merge products into wpmDataLayer.products\n\t\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, products)\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = orderId => {\n\n\t\ttry {\n\t\t\t// save the state in the database\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_purchase_pixels_fired\",\n\t\t\t\torder_id: orderId,\n\t\t\t\t// nonce : ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tif (response.success === false) {\n\t\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = (url, options) => {\n\n\t\t// Allow user to set any option except for dataType, cache, and url\n\t\toptions = jQuery.extend(options || {}, {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t})\n\n\t\t// Use $.ajax() since it is more flexible than $.getScript\n\t\t// Return the jqXHR object so we can chain callbacks\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\nrequire(\"./functions_premium\")\n// #endif\n","(function (wpm, $, undefined) {\n\n\t// do something\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"WooCommerce Pixel Manager: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tjQuery(document).trigger(\"wpmLoad\", {})\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n\trequire(\"./microsoft-ads/loader\")\n\trequire(\"./pinterest/loader\")\n\trequire(\"./snapchat/loader\")\n\trequire(\"./tiktok/loader\")\n\trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","product","eventId","getRandomEventId","fbq","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","eventID","shop","trigger","event_name","event_id","user_data","getFbUserData","product_data","product_id","event_source_url","window","location","href","e","console","error","fbViewContent","setFbUserData","order","value_filtered","facebookContentIds","id","content_category","category","eventData","capi","data","action","nonce","ajax","type","dataType","url","ajax_url","success","msg","indexOf","page_type","setFacebookIdentifiersOnServer","$","undefined","fBUserData","f","b","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","Math","random","toString","substring","getFbUserDataFromBrowser","fbp","getCookie","fbc","client_user_agent","navigator","userAgent","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","sessionStorage","getItem","response","setItem","JSON","stringify","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","gtagLoaded","then","gtag","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","getGoogleAdsDynamicRemarketingOrderItems","data_basic","data_with_cart","getGoogleAdsConversionIdentifiersWithLabel","transaction_id","number","new_customer","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","eec","ga3GetFullProductItemData","getCartItemsGaUa","checkout_step","step","checkout_option","search_term","getSearchTermFromUrl","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","list_position","productId","cart","ga3GetBasicProductItemData","ga3CanProductListBeSet","wpmProductListStore","parse","includes","position","ga4","measurement_id","getGA4OrderItems","ga4GetFullProductItemData","item_list_name","item_list_id","list_id","getCartItemsGa4","cartValue","toFixed","item_name","item_category","item_id","item_variant","item_brand","ga4AddFormattedCategories","categories","Array","from","Set","isArray","length","max","i","ga4GetBasicProductItemData","ga4AddListNameToProduct","index","state","canGoogleLoad","loadGoogle","logPreventedPixelLoading","setGoogleCidOnServer","consent_mode","active","getConsentValues","mode","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","done","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","targetIDs","clientID","target_ids","client_id","referrer","getReferrerFromCookie","gclid","getClidFromBrowser","getUserAgent","viewPortWidth","getViewPort","width","viewPortHeight","height","forEach","targetId","setCookie","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","j","a","r","hj","q","_hjSettings","hjid","hjsv","appendChild","bing","uet_tag_id","load_bing_pixel","uetq","ecomm_pagetype","ecomm_prodid","bing_purchase_ecomm_prodids","revenue_value","bing_purchase_items","w","d","u","ti","UET","onload","onreadystatechange","this","readyState","pinterest","loadPinterestPixel","pintrk","line_items","getPinterestProductData","productData","urlParams","URLSearchParams","search","search_query","get","order_quantity","order_id","pinterestFormattedOrderItems","isVariation","product_name","product_variant_id","parentId_dyn_r_ids","product_category","product_variant","product_price","product_quantity","product_brand","prototype","slice","call","pinterestLoadEvent","userLoggedIn","enhanced_match","em","enhanced_match_email","snapchat","loadSnapchatPixel","snaptr","item_ids","getSnapchatOrderItemIds","snapchatGetEmail","userInfo","user","email_sha256","user_hashed_email","handleRequest","contentIds","tiktok","loadTikTokPixel","ttq","track","content_id","purchase_event_name","contents","getTikTokOrderItemIds","TiktokAnalyticsObject","methods","setAndDefer","concat","instance","_i","load","_u","_t","_o","page","twitter","loadTwitterPixel","twq","num_items","twitterGetOrderContentIds","exe","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","hu","documentElement","body","explicitConsentStateAlreadySet","URL","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","microdata_product_id","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","hasLoginEventFired","setLoginEventFired","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","protocol","cookieName","timeout","statusCode","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","email","test","quantityToRemove","parentId","saveCartObjectToDataLayer","cartItems","filter","hasOwnProperty","assign","cartObject","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","elem","parent","hasClass","prev","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductI