Version Description
23.11.2022
Fix: Fixed an HPOS check for the debug info tab.
Download this release
Release Info
Developer | alekv |
Plugin | Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more |
Version | 1.27.6 |
Comparing to | |
See all releases |
Code changes from version 1.27.5 to 1.27.6
- classes/admin/class-debug-info.php +1 -1
- js/public/wpm-public.p1.min.js +1 -1
- js/public/wpm-public.p1.min.js.br +0 -0
- js/public/wpm-public.p1.min.js.gz +0 -0
- js/public/wpm-public.p1.min.js.map +1 -1
- readme.txt +6 -1
- wgact.php +2 -2
classes/admin/class-debug-info.php
CHANGED
@@ -589,7 +589,7 @@ class Debug_Info
|
|
589 |
{
|
590 |
global $wpdb ;
|
591 |
|
592 |
-
if (
|
593 |
// HPOS tables in use
|
594 |
$tracked_payment_methods = $wpdb->get_col( "SELECT DISTINCT payment_method FROM {$wpdb->prefix}wc_orders WHERE payment_method <> ''" );
|
595 |
} else {
|
589 |
{
|
590 |
global $wpdb ;
|
591 |
|
592 |
+
if ( Helpers::is_wc_hpos_enabled() ) {
|
593 |
// HPOS tables in use
|
594 |
$tracked_payment_methods = $wpdb->get_col( "SELECT DISTINCT payment_method FROM {$wpdb->prefix}wc_orders WHERE payment_method <> ''" );
|
595 |
} else {
|
js/public/wpm-public.p1.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,a,o,r,n,i,l,d;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!==(n=r.facebook)&&void 0!==n&&n.loaded||wpm.doesUrlContainPatterns(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.facebook)||void 0===d?void 0:d.exclusion_patterns)||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((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","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((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","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((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",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((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","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((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","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{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("wpmClientSideOrderReceivedPage",((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","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(n=a.createElement(o)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=a.getElementsByTagName(o)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&e.isFbAdvancedMatchingEnabled()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,n,i},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,k,b,C,x,j,S,I,P,Q,E,O,T,A,F,V,U,R,G,q,M,N,W;let B={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&null!==(a=t.id)&&void 0!==a&&a.raw&&(B.external_id=wpmDataLayer.user.id.raw),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.order)&&void 0!==r&&r.user_id&&(B.external_id=wpmDataLayer.order.user_id),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.user)&&void 0!==i&&null!==(l=i.email)&&void 0!==l&&l.facebook&&(B.em=wpmDataLayer.user.email.facebook),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(s=d.order)&&void 0!==s&&s.billing_email_hashed&&(B.em=wpmDataLayer.order.billing_email_hashed),null!==(c=wpmDataLayer)&&void 0!==c&&null!==(u=c.user)&&void 0!==u&&null!==(p=u.first_name)&&void 0!==p&&p.facebook&&(B.fn=wpmDataLayer.user.first_name.facebook),null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.order)&&void 0!==g&&g.billing_first_name&&(B.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.user)&&void 0!==w&&null!==(v=w.last_name)&&void 0!==v&&v.facebook&&(B.ln=wpmDataLayer.user.last_name.facebook),null!==(_=wpmDataLayer)&&void 0!==_&&null!==(f=_.order)&&void 0!==f&&f.billing_last_name&&(B.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.user)&&void 0!==L&&null!==(D=L.phone)&&void 0!==D&&D.facebook&&(B.ph=wpmDataLayer.user.phone.facebook),null!==(k=wpmDataLayer)&&void 0!==k&&null!==(b=k.order)&&void 0!==b&&b.billing_phone&&(B.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(C=wpmDataLayer)&&void 0!==C&&null!==(x=C.user)&&void 0!==x&&null!==(j=x.city)&&void 0!==j&&j.facebook&&(B.ct=wpmDataLayer.user.city.facebook),null!==(S=wpmDataLayer)&&void 0!==S&&null!==(I=S.order)&&void 0!==I&&I.billing_city&&(B.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(P=wpmDataLayer)&&void 0!==P&&null!==(Q=P.user)&&void 0!==Q&&null!==(E=Q.state)&&void 0!==E&&E.facebook&&(B.st=wpmDataLayer.user.state.facebook),null!==(O=wpmDataLayer)&&void 0!==O&&null!==(T=O.order)&&void 0!==T&&T.billing_state&&(B.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(A=wpmDataLayer)&&void 0!==A&&null!==(F=A.user)&&void 0!==F&&null!==(V=F.postcode)&&void 0!==V&&V.facebook&&(B.zp=wpmDataLayer.user.postcode.facebook),null!==(U=wpmDataLayer)&&void 0!==U&&null!==(R=U.order)&&void 0!==R&&R.billing_postcode&&(B.zp=wpmDataLayer.order.billing_postcode),null!==(G=wpmDataLayer)&&void 0!==G&&null!==(q=G.user)&&void 0!==q&&null!==(M=q.country)&&void 0!==M&&M.facebook&&(B.country=wpmDataLayer.user.country.facebook),null!==(N=wpmDataLayer)&&void 0!==N&&null!==(W=N.order)&&void 0!==W&&W.billing_country&&(B.country=wpmDataLayer.order.billing_country.toLowerCase()),B},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.isFbAdvancedMatchingEnabled=()=>{var e,t,a;return!(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.advanced_matching)},e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{let t={};var a,o,r;return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(t.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(t.fbc=e.getCookie("_fbc")),e.isFbAdvancedMatchingEnabled()&&null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&null!==(r=o.id)&&void 0!==r&&r.raw&&(t.external_id=wpmDataLayer.user.id.raw),navigator.userAgent&&(t.client_user_agent=navigator.userAgent),t},e.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.currency}),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=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,n,i;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let a=e.getFbRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return 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,n,i,l,d,s,c,u,p,m,g,y;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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;let e={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}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&null!==(y=g.id)&&void 0!==y&&y.raw&&(e.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,n,i,l,d,s,c,u,p,m;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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;let e={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}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&null!==(m=p.id)&&void 0!==m&&m.raw&&(e.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,n,i,l,d,s,c,u,p,m;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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;let e={send_to:wpm.getGoogleAdsConversionIdentifiers()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.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}]),null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&null!==(m=p.id)&&void 0!==m&&m.raw&&(e.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,n,i,l,d,s,c,u;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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let g=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var p,m;if(null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.general)&&void 0!==m&&m.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;g.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let y={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:g};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.id)&&void 0!==u&&u.raw&&(y.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",y)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s,c,u;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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let p={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.id)&&void 0!==u&&u.raw&&(p.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","purchase",p)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,n,i,l,d,s,c,u;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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let p={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.id)&&void 0!==u&&u.raw&&(p.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","login",p)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let l={},d={};l={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!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(l.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&null!==(r=o.id)&&void 0!==r&&r.raw&&(l.user_id=wpmDataLayer.user.id.raw),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.order)&&void 0!==i&&i.aw_merchant_id&&(d={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",{...l,...d})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(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&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,n]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==n.variation_id?(r.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[n.variation_id].variant_name,r.brand=wpmDataLayer.products[n.variation_id].brand):(r.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[n.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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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)}}))},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,n;return!(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)||("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,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D;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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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&>ag("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}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&>ag("set","user_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{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let n=wpmDataLayer.pixels.google.analytics.ga4.parameters;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.debug_mode&&(n.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,n),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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()).then((function(t,a){try{var o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,k,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!==(n=r.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var C,x,j,S;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!==(x=C.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.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&>ag("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!==(k=D.analytics)&&void 0!==k&&null!==(b=k.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 n=0;!function a(){var o,r,i;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(i=r.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=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,n,i,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!==(n=r.pixels)&&void 0!==n&&null!==(i=n.google)&&void 0!==i&&null!==(l=i.optimize)&&void 0!==l&&l.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,n,i,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!==(n=r.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.pixels)&&void 0!==l&&null!==(d=l.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}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=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.categories.analytics=!d,n.categories.ads=!d,i||l)return i&&(n.categories.analytics=!!i),void(l&&(n.categories.ads=!!l));if(t=e.getCookie("pmw_cookie_consent"))return t=JSON.parse(t),n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieConsent"))return t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieScriptConsent"))return t=JSON.parse(t),"reject"===t.action?(n.categories.analytics=!1,n.categories.ads=!1):2===t.categories.length?(n.categories.analytics=!0,n.categories.ads=!0):(n.categories.analytics=t.categories.indexOf("performance")>=0,n.categories.ads=t.categories.indexOf("targeting")>=0),void(n.visitorHasChosen=!0);var s,c,u,p,m,g,y,w;if(t=e.getCookie("borlabs-cookie"))return t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),n.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),n.visitorHasChosen=!0,n.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)||[]],void(n.mode="pixel");if(t=o())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=t.visitorHasChosen);if(t=e.getCookie("cookie_notice_accepted"))return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);if(t=e.getCookie("hu-consent"))return t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],void(n.visitorHasChosen=!0);if(t=r())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0===t.visitorHasChosen);if(t=e.getCookie("moove_gdpr_popup"))return t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,void(n.visitorHasChosen=!0);if(t=e.getCookie("wpautoterms-cookies-notice")){if("1"!==t)return;return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0)}if(window.localStorage&&window.localStorage.getItem("uc_settings")){if(console.log("Usercentrics settings detected"),"undefined"==typeof UC_UI)return void window.addEventListener("UC_UI_INITIALIZED",(function(t){e.ucUiProcessConsent()}));if(UC_UI.areAllConsentsAccepted())return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);e.ucUiProcessConsent()}if(t=e.getCookie("OptanonConsent")){let e=new URLSearchParams(t).get("groups").split(","),a={};return e.forEach((e=>{let t=e.split(":");a[t[0]]=t[1]})),n.categories.analytics="1"===groubsObject[2],n.categories.ads="1"===a[4],void(n.visitorHasChosen=!0)}},e.ucUiProcessConsent=function(){if("undefined"==typeof UC_UI)return;UC_UI.areAllConsentsAccepted()&&pmw.consentAcceptAll();const e=UC_UI.getSettingsLabels().categories.filter((e=>"Statistics"===e.label))[0].slug;pmw.consentAdjustSelectively({analytics:!UC_UI.getServicesBaseInfo().filter((t=>t.categorySlug===e&&!1===t.consent.status)).length>0,ads:!UC_UI.getServicesBaseInfo().filter((e=>"marketing"===e.categorySlug&&!1===e.consent.status)).length>0})},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===n.mode?o=!!n.categories[t]:"pixel"===n.mode?(o=n.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=n.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('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (PMW 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}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,i;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||n.visitorHasChosen)&&("category"!==n.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>n.categories[e])))&&("pixel"!==n.mode||!n.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==n.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>n.pixels.includes(e))))&&(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||"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"),document.dispatchEvent(new Event("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 t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===n.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(n.pixels.includes("google-analytics"),n.pixels.includes("google-ads"))):(e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(n.categories.analytics=!0),Cookiebot.consent.marketing&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(n.categories.analytics=!0),t.detail.categories.includes("targeting")&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),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(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&(!0===e.detail["Google Ads Remarketing"]?console.log("Google Ads Remarketing has consent"):console.log("Google Ads Remarketing has no consent"))})),window.addEventListener("UC_UI_CMP_EVENT",(function(e){"ACCEPT_ALL"===e.detail.type&&pmw.consentAcceptAll(),"DENY_ALL"===e.detail.type&&pmw.consentRevokeAll(),"SAVE"===e.detail.type&&console.log("event.detail",e.detail)})),jQuery("#accept-recommended-btn-handler, #onetrust-accept-btn-handler").on("click",(function(){void 0!==window.OneTrust&&pmw.consentAcceptAll()})),jQuery(".ot-pc-refuse-all-handler, #onetrust-reject-all-handler").on("click",(function(){pmw.consentRevokeAll()})),jQuery(".save-preference-btn-handler.onetrust-close-btn-handler").on("click",(function(){location.reload()}))}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}}));let e=[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(",");jQuery(document).on("click init_checkout",e,(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("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,wpmDataLayer.order.key),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{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",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r,n,i,l;let d={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(d.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.tiktok)&&void 0!==l&&l.loaded&&(d.tiktok={event:"AddToCart",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:t.price*t.quantity,currency:t.currency,contents:[{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,price:t.price}]}}),jQuery(document).trigger("wpmClientSideAddToCart",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a,o,r,n;let i={event:"beginCheckout"};var l;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(l=wpmDataLayer)&&void 0!==l&&l.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(i.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"InitiateCheckout",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()}),jQuery(document).trigger("wpmClientSideBeginCheckout",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r,n,i,l;let d={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(d.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.tiktok)&&void 0!==l&&l.loaded&&(d.tiktok={event:"AddToWishlist",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:t.price*t.quantity,currency:t.currency,contents:[{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,price:t.price}]}}),jQuery(document).trigger("wpmClientSideAddToWishlist",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o,r,n,i;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d={event:"viewItem",product:l};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(d.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},l&&(d.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(l))),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.pixels)&&void 0!==n&&null!==(i=n.tiktok)&&void 0!==i&&i.loaded&&(d.tiktok={event:"ViewContent",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()},l&&(d.tiktok.properties={value:l.price*l.quantity,currency:l.currency,contents:[{content_id:l.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:l.name,quantity:l.quantity,price:l.price}]})),jQuery(document).trigger("wpmClientSideViewItem",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a,o,r,n;let i={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"Search",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{query:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmPlaceOrder",(()=>{var e,t,a;let o={event:"placeOrder"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.tiktok)&&void 0!==a&&a.loaded&&(o.tiktok={event:"PlaceAnOrder",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()}),jQuery(document).trigger("wpmClientPlaceOrder",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a,o,r,n;let i={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"CompletePayment",event_id:wpmDataLayer.order.id.toString(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,contents:wpm.getTikTokOrderItemIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",i)}))},459:()=>{const e=[".add_to_cart_button:not(.product_type_variable)",".ajax_add_to_cart",".single_add_to_cart_button"].join(",");jQuery(e).on("click adding_to_cart",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}})),jQuery("a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)").one("click",(e=>{try{if(jQuery(e.target).closest("a").attr("href")){let t=new URL(jQuery(e.currentTarget).attr("href"),window.location.origin);if(t.searchParams.has("add-to-cart")){let e=t.searchParams.get("add-to-cart");wpm.addProductToCart(e,1)}}}catch(e){console.error(e)}})),jQuery(".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product").on("click",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}})),jQuery("#billing_email").on("input",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery("form.checkout").on("checkout_place_order_success",(()=>{!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).trigger("wpmPlaceOrder",{})})),jQuery("[name='update_cart']").on("click",(()=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}})),jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_pmw_endpoint_available",n="pmw/v1/test/";function i(){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=async()=>window.sessionStorage.getItem(r)?JSON.parse(window.sessionStorage.getItem(r)):await e.testEndpoint(),e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=async function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:e.root+n,o=arguments.length>1&&arguments[1]!==a?arguments[1]:r,i=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!0)),!0):404===i.status||0===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!1)),!1):void 0},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t,r){let n=arguments.length>2&&arguments[2]!==a?arguments[2]:"thankyou_page";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=[];i()&&(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(r,n)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!i()&&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{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.data.cart))}))}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{var a;if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products&&(t=t.filter((e=>!(e in wpmDataLayer.products)))),t&&0!==t.length){try{let a;if(a=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({pageId:wpmDataLayer.general.pageId,productIds:t})}):await fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:t})}),a.ok){let e=await a.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer.products&&wpmDataLayer.products[t]||await e.getProductsFromBackend([t]),e.triggerViewItemEvent(t)},e.triggerViewItemEvent=t=>{let a=e.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmViewItem",a)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},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.deleteCookie=t=>{e.setCookie(t,"",-1)},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=async(t,a)=>{try{let o;o=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":e.nonce_wp_rest},body:JSON.stringify({order_key:t,source:a}),keepalive:!0,cache:"no-cache"}):await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_key:t,source:a,nonce_ajax:e.nonce_ajax}),keepalive:!0});const r=await o.json();r.success?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error",r)}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=>{let t={dataType:"script",cache:!0,url:e};return 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),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),e.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t},e.doesUrlContainPatterns=e=>{for(const t of e)if(new RegExp(t).test(window.location.href))return!0;return!1},e.excludeDomainFromTracking=()=>{var e,t;let a=["appspot.com","translate.google.com"];return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.excludeDomains&&(a=[...a,...wpmDataLayer.general.excludeDomains]),!!a.some((e=>window.location.href.includes(e)))&&(console.debug("Pixel Manager for WooCommerce: Aborted due to excluded domain"),!0)},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2);let g=!1;const y=()=>{!1===g&&jQuery(document).trigger("pmw:ready"),g=!0};jQuery(document).on("ready",(()=>{y()})),document.addEventListener("DOMContentLoaded",(()=>{y()}))}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((()=>{console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),wpm.excludeDomainFromTracking()||document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((()=>{wpm.pageLoaded().then((()=>{document.dispatchEvent(new Event("wpmLoad"))}))})),jQuery(document).on("pmw:ready",(()=>{wpm.wpmDataLayerExists().then((()=>{wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,a),n.exports}a(534),wpm.jQueryExists().then((function(){jQuery(document).on("pmw:ready",(()=>{a(459)})),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",(()=>{var e,t,a,o,r,n,i,l,d;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!==(n=r.facebook)&&void 0!==n&&n.loaded||wpm.doesUrlContainPatterns(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.facebook)||void 0===d?void 0:d.exclusion_patterns)||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((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","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((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","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((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",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((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","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((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","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{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("wpmClientSideOrderReceivedPage",((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","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(n=a.createElement(o)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=a.getElementsByTagName(o)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&e.isFbAdvancedMatchingEnabled()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,n,i},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,k,b,C,x,j,S,I,P,Q,E,O,T,A,F,V,U,R,G,q,M,N,W;let B={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&null!==(a=t.id)&&void 0!==a&&a.raw&&(B.external_id=wpmDataLayer.user.id.raw),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.order)&&void 0!==r&&r.user_id&&(B.external_id=wpmDataLayer.order.user_id),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.user)&&void 0!==i&&null!==(l=i.email)&&void 0!==l&&l.facebook&&(B.em=wpmDataLayer.user.email.facebook),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(s=d.order)&&void 0!==s&&s.billing_email_hashed&&(B.em=wpmDataLayer.order.billing_email_hashed),null!==(c=wpmDataLayer)&&void 0!==c&&null!==(u=c.user)&&void 0!==u&&null!==(p=u.first_name)&&void 0!==p&&p.facebook&&(B.fn=wpmDataLayer.user.first_name.facebook),null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.order)&&void 0!==g&&g.billing_first_name&&(B.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.user)&&void 0!==w&&null!==(v=w.last_name)&&void 0!==v&&v.facebook&&(B.ln=wpmDataLayer.user.last_name.facebook),null!==(_=wpmDataLayer)&&void 0!==_&&null!==(f=_.order)&&void 0!==f&&f.billing_last_name&&(B.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.user)&&void 0!==L&&null!==(D=L.phone)&&void 0!==D&&D.facebook&&(B.ph=wpmDataLayer.user.phone.facebook),null!==(k=wpmDataLayer)&&void 0!==k&&null!==(b=k.order)&&void 0!==b&&b.billing_phone&&(B.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(C=wpmDataLayer)&&void 0!==C&&null!==(x=C.user)&&void 0!==x&&null!==(j=x.city)&&void 0!==j&&j.facebook&&(B.ct=wpmDataLayer.user.city.facebook),null!==(S=wpmDataLayer)&&void 0!==S&&null!==(I=S.order)&&void 0!==I&&I.billing_city&&(B.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(P=wpmDataLayer)&&void 0!==P&&null!==(Q=P.user)&&void 0!==Q&&null!==(E=Q.state)&&void 0!==E&&E.facebook&&(B.st=wpmDataLayer.user.state.facebook),null!==(O=wpmDataLayer)&&void 0!==O&&null!==(T=O.order)&&void 0!==T&&T.billing_state&&(B.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(A=wpmDataLayer)&&void 0!==A&&null!==(F=A.user)&&void 0!==F&&null!==(V=F.postcode)&&void 0!==V&&V.facebook&&(B.zp=wpmDataLayer.user.postcode.facebook),null!==(U=wpmDataLayer)&&void 0!==U&&null!==(R=U.order)&&void 0!==R&&R.billing_postcode&&(B.zp=wpmDataLayer.order.billing_postcode),null!==(G=wpmDataLayer)&&void 0!==G&&null!==(q=G.user)&&void 0!==q&&null!==(M=q.country)&&void 0!==M&&M.facebook&&(B.country=wpmDataLayer.user.country.facebook),null!==(N=wpmDataLayer)&&void 0!==N&&null!==(W=N.order)&&void 0!==W&&W.billing_country&&(B.country=wpmDataLayer.order.billing_country.toLowerCase()),B},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.isFbAdvancedMatchingEnabled=()=>{var e,t,a;return!(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.advanced_matching)},e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{let t={};var a,o,r;return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(t.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(t.fbc=e.getCookie("_fbc")),e.isFbAdvancedMatchingEnabled()&&null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&null!==(r=o.id)&&void 0!==r&&r.raw&&(t.external_id=wpmDataLayer.user.id.raw),navigator.userAgent&&(t.client_user_agent=navigator.userAgent),t},e.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.currency}),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=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,n,i;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let a=e.getFbRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return 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,n,i,l,d,s,c,u,p,m,g,y;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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;let e={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}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&null!==(y=g.id)&&void 0!==y&&y.raw&&(e.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,n,i,l,d,s,c,u,p,m;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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;let e={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}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&null!==(m=p.id)&&void 0!==m&&m.raw&&(e.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,n,i,l,d,s,c,u,p,m;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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;let e={send_to:wpm.getGoogleAdsConversionIdentifiers()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.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}]),null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&null!==(m=p.id)&&void 0!==m&&m.raw&&(e.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,n,i,l,d,s,c,u;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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let g=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var p,m;if(null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.general)&&void 0!==m&&m.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;g.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let y={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:g};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.id)&&void 0!==u&&u.raw&&(y.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",y)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s,c,u;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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let p={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.id)&&void 0!==u&&u.raw&&(p.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","purchase",p)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,n,i,l,d,s,c,u;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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let p={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.id)&&void 0!==u&&u.raw&&(p.user_id=wpmDataLayer.user.id.raw),wpm.gtagLoaded().then((function(){gtag("event","login",p)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let l={},d={};l={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!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(l.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&null!==(r=o.id)&&void 0!==r&&r.raw&&(l.user_id=wpmDataLayer.user.id.raw),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.order)&&void 0!==i&&i.aw_merchant_id&&(d={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",{...l,...d})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(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&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,n]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==n.variation_id?(r.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[n.variation_id].variant_name,r.brand=wpmDataLayer.products[n.variation_id].brand):(r.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[n.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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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)}}))},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,n;return!(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)||("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,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D;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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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&>ag("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}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&>ag("set","user_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{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let n=wpmDataLayer.pixels.google.analytics.ga4.parameters;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.debug_mode&&(n.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,n),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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()).then((function(t,a){try{var o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,k,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!==(n=r.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var C,x,j,S;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!==(x=C.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.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&>ag("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!==(k=D.analytics)&&void 0!==k&&null!==(b=k.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 n=0;!function a(){var o,r,i;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(i=r.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=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,n,i,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!==(n=r.pixels)&&void 0!==n&&null!==(i=n.google)&&void 0!==i&&null!==(l=i.optimize)&&void 0!==l&&l.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,n,i,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!==(n=r.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.pixels)&&void 0!==l&&null!==(d=l.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}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=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.categories.analytics=!d,n.categories.ads=!d,i||l)return i&&(n.categories.analytics=!!i),void(l&&(n.categories.ads=!!l));if(t=e.getCookie("pmw_cookie_consent"))return t=JSON.parse(t),n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieConsent"))return t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieScriptConsent"))return t=JSON.parse(t),"reject"===t.action?(n.categories.analytics=!1,n.categories.ads=!1):2===t.categories.length?(n.categories.analytics=!0,n.categories.ads=!0):(n.categories.analytics=t.categories.indexOf("performance")>=0,n.categories.ads=t.categories.indexOf("targeting")>=0),void(n.visitorHasChosen=!0);var s,c,u,p,m,g,y,w;if(t=e.getCookie("borlabs-cookie"))return t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),n.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),n.visitorHasChosen=!0,n.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)||[]],void(n.mode="pixel");if(t=o())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=t.visitorHasChosen);if(t=e.getCookie("cookie_notice_accepted"))return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);if(t=e.getCookie("hu-consent"))return t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],void(n.visitorHasChosen=!0);if(t=r())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0===t.visitorHasChosen);if(t=e.getCookie("moove_gdpr_popup"))return t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,void(n.visitorHasChosen=!0);if(t=e.getCookie("wpautoterms-cookies-notice")){if("1"!==t)return;return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0)}if(window.localStorage&&window.localStorage.getItem("uc_settings")){if(console.log("Usercentrics settings detected"),"undefined"==typeof UC_UI)return void window.addEventListener("UC_UI_INITIALIZED",(function(t){e.ucUiProcessConsent()}));if(UC_UI.areAllConsentsAccepted())return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);e.ucUiProcessConsent()}if(t=e.getCookie("OptanonConsent")){let e=new URLSearchParams(t).get("groups").split(","),a={};return e.forEach((e=>{let t=e.split(":");a[t[0]]=t[1]})),n.categories.analytics="1"===groubsObject[2],n.categories.ads="1"===a[4],void(n.visitorHasChosen=!0)}},e.ucUiProcessConsent=function(){if("undefined"==typeof UC_UI)return;UC_UI.areAllConsentsAccepted()&&pmw.consentAcceptAll();const e=UC_UI.getSettingsLabels().categories.filter((e=>"Statistics"===e.label))[0].slug;pmw.consentAdjustSelectively({analytics:!UC_UI.getServicesBaseInfo().filter((t=>t.categorySlug===e&&!1===t.consent.status)).length>0,ads:!UC_UI.getServicesBaseInfo().filter((e=>"marketing"===e.categorySlug&&!1===e.consent.status)).length>0})},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===n.mode?o=!!n.categories[t]:"pixel"===n.mode?(o=n.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=n.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('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (PMW 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}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,i;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||n.visitorHasChosen)&&("category"!==n.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>n.categories[e])))&&("pixel"!==n.mode||!n.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==n.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>n.pixels.includes(e))))&&(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||"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"),document.dispatchEvent(new Event("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 t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===n.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(n.pixels.includes("google-analytics"),n.pixels.includes("google-ads"))):(e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(n.categories.analytics=!0),Cookiebot.consent.marketing&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(n.categories.analytics=!0),t.detail.categories.includes("targeting")&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),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(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&(!0===e.detail["Google Ads Remarketing"]?console.log("Google Ads Remarketing has consent"):console.log("Google Ads Remarketing has no consent"))})),window.addEventListener("UC_UI_CMP_EVENT",(function(e){"ACCEPT_ALL"===e.detail.type&&pmw.consentAcceptAll(),"DENY_ALL"===e.detail.type&&pmw.consentRevokeAll(),"SAVE"===e.detail.type&&console.log("event.detail",e.detail)})),jQuery("#accept-recommended-btn-handler, #onetrust-accept-btn-handler").on("click",(function(){void 0!==window.OneTrust&&pmw.consentAcceptAll()})),jQuery(".ot-pc-refuse-all-handler, #onetrust-reject-all-handler").on("click",(function(){pmw.consentRevokeAll()})),jQuery(".save-preference-btn-handler.onetrust-close-btn-handler").on("click",(function(){location.reload()}))}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}}));let e=[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(",");jQuery(document).on("click init_checkout",e,(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("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,wpmDataLayer.order.key),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{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",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r,n,i,l;let d={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(d.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.tiktok)&&void 0!==l&&l.loaded&&(d.tiktok={event:"AddToCart",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:t.price*t.quantity,currency:t.currency,contents:[{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,price:t.price}]}}),jQuery(document).trigger("wpmClientSideAddToCart",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a,o,r,n;let i={event:"beginCheckout"};var l;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(l=wpmDataLayer)&&void 0!==l&&l.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(i.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"InitiateCheckout",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()}),jQuery(document).trigger("wpmClientSideBeginCheckout",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r,n,i,l;let d={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(d.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.tiktok)&&void 0!==l&&l.loaded&&(d.tiktok={event:"AddToWishlist",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:t.price*t.quantity,currency:t.currency,contents:[{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,price:t.price}]}}),jQuery(document).trigger("wpmClientSideAddToWishlist",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o,r,n,i;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d={event:"viewItem",product:l};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(d.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},l&&(d.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(l))),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.pixels)&&void 0!==n&&null!==(i=n.tiktok)&&void 0!==i&&i.loaded&&(d.tiktok={event:"ViewContent",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()},l&&(d.tiktok.properties={value:l.price*l.quantity,currency:l.currency,contents:[{content_id:l.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:l.name,quantity:l.quantity,price:l.price}]})),jQuery(document).trigger("wpmClientSideViewItem",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a,o,r,n;let i={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"Search",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{query:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmPlaceOrder",(()=>{var e,t,a;let o={event:"placeOrder"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.tiktok)&&void 0!==a&&a.loaded&&(o.tiktok={event:"PlaceAnOrder",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()}),jQuery(document).trigger("wpmClientPlaceOrder",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a,o,r,n;let i={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id.toString(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"CompletePayment",event_id:wpmDataLayer.order.id.toString(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,contents:wpm.getTikTokOrderItemIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",i)}))},459:()=>{const e=[".add_to_cart_button:not(.product_type_variable)",".ajax_add_to_cart",".single_add_to_cart_button"].join(",");jQuery(e).on("click adding_to_cart",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}})),jQuery("a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)").one("click",(e=>{try{if(jQuery(e.target).closest("a").attr("href")){let t=new URL(jQuery(e.currentTarget).attr("href"),window.location.origin);if(t.searchParams.has("add-to-cart")){let e=t.searchParams.get("add-to-cart");wpm.addProductToCart(e,1)}}}catch(e){console.error(e)}})),jQuery(".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product").on("click",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}})),jQuery("#billing_email").on("input",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery("form.checkout").on("checkout_place_order_success",(()=>{!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).trigger("wpmPlaceOrder",{})})),jQuery("[name='update_cart']").on("click",(()=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}})),jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_pmw_endpoint_available",n="pmw/v1/test/";function i(){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=async()=>window.sessionStorage.getItem(r)?JSON.parse(window.sessionStorage.getItem(r)):await e.testEndpoint(),e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=async function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:e.root+n,o=arguments.length>1&&arguments[1]!==a?arguments[1]:r,i=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!0)),!0):404===i.status||0===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!1)),!1):void 0},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t,r){let n=arguments.length>2&&arguments[2]!==a?arguments[2]:"thankyou_page";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=[];i()&&(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(r,n)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!i()&&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{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.data.cart))}))}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{var a;if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products&&(t=t.filter((e=>!(e in wpmDataLayer.products)))),t&&0!==t.length){try{let a;if(a=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({pageId:wpmDataLayer.general.pageId,productIds:t})}):await fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:t})}),a.ok){let e=await a.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer.products&&wpmDataLayer.products[t]||await e.getProductsFromBackend([t]),e.triggerViewItemEvent(t)},e.triggerViewItemEvent=t=>{let a=e.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmViewItem",a)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},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.deleteCookie=t=>{e.setCookie(t,"",-1)},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=async(t,a)=>{try{let o;o=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":e.nonce_wp_rest},body:JSON.stringify({order_key:t,source:a}),keepalive:!0,cache:"no-cache"}):await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_key:t,source:a,nonce_ajax:e.nonce_ajax}),keepalive:!0});const r=await o.json();r.success?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error",r)}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=>{let t={dataType:"script",cache:!0,url:e};return 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),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),e.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t},e.doesUrlContainPatterns=e=>{for(const t of e)if(new RegExp(t).test(window.location.href))return!0;return!1},e.excludeDomainFromTracking=()=>{var e,t;let a=["appspot.com","translate.google.com"];return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.excludeDomains&&(a=[...a,...wpmDataLayer.general.excludeDomains]),!!a.some((e=>window.location.href.includes(e)))&&(console.debug("Pixel Manager for WooCommerce: Aborted due to excluded domain"),!0)},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2);let g=!1;const y=()=>{!1===g&&jQuery(document).trigger("pmw:ready"),g=!0};jQuery(document).on("ready",(()=>{y()})),document.addEventListener("DOMContentLoaded",(()=>{y()}))}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((()=>{console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),wpm.excludeDomainFromTracking()||document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((()=>{wpm.pageLoaded().then((()=>{document.dispatchEvent(new Event("wpmLoad"))}))})),jQuery(document).on("pmw:ready",(()=>{wpm.wpmDataLayerExists().then((()=>{wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,a),n.exports}a(534),wpm.jQueryExists().then((function(){jQuery(document).on("pmw:ready",(()=>{a(459)})),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.br
CHANGED
Binary file
|
js/public/wpm-public.p1.min.js.gz
CHANGED
Binary file
|
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,KAAM,sBAG7B,QAAZ,EAAAC,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCC,UAChB,QAAb,EAACH,oBAAY,OAAQ,QAAR,EAAZ,EAAcC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AQ,KAIRA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAuBRA,EAAQ,IACT,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners_on_ready.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./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\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\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(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\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\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet() && wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\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\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.email?.facebook) data.em = wpmDataLayer.user.email.facebook\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.first_name?.facebook) data.fn = wpmDataLayer.user.first_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.last_name?.facebook) data.ln = wpmDataLayer.user.last_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.phone?.facebook) data.ph = wpmDataLayer.user.phone.facebook\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.city?.facebook) data.ct = wpmDataLayer.user.city.facebook\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.state?.facebook) data.st = wpmDataLayer.user.state.facebook\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.postcode?.facebook) data.zp = wpmDataLayer.user.postcode.facebook\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.country?.facebook) data.country = wpmDataLayer.user.country.facebook\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge 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.\n\t\t *\n\t\t * 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\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.isFbAdvancedMatchingEnabled = () => {\n\t\tif (wpmDataLayer?.pixels?.facebook?.advanced_matching) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\tif (navigator.userAgent) data.client_user_agent = navigator.userAgent\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\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\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\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, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\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\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\n\t\treturn content_ids\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\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\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\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\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion 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(wpm.getGoogleAdsConversionIdentifiersWithLabel())) 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?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id.raw\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 * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\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 (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_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\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\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\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.then(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\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\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\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// .then(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\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\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\t// Update the PMW consent values with values coming from a CMP\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\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\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\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", function (event) {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groubsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = function () {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\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(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW 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\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.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\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"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// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\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\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/**\n\t * Borlabs Cookie\n\t * If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\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/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\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\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.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\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\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\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\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\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\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\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\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\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", function (e) {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", function (event) {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", function () {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", function () {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", function () {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * remove_from_cart event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\t// console.log(\"remove_from_cart event\" + new Date().getTime())\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).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/**\n * begin_checkout event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\nlet checkoutButtonClasses = [\n\t// \".checkout\",\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\t\".elementor-button--checkout\",\n].join(\",\")\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"click init_checkout\", checkoutButtonClasses, () => {\n\n\t// console.log(\"init_checkout at: \" + new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n/**\n * Set up PWM events\n */\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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}\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 */\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"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 (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id, wpmDataLayer.order.key)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\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\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\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\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585702922241#item-link-Adding%20parameters%20to%20event%20code\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToCart\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"InitiateCheckout\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"ViewContent\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.tiktok.properties = {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"Search\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tquery: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmPlaceOrder\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"placeOrder\",\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"PlaceAnOrder\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientPlaceOrder\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\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}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"CompletePayment\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcontents: wpm.getTikTokOrderItemIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\n\n","/**\n * Register event listeners\n */\n\n\n/**\n * add_to_cart event\n *\n * WC is inconsistent with events that emit add-to-cart events.\n * adding_to_cart and added_to_are legacy events. Also, they only work\n * on Ajax buttons on shop pages.\n */\n\nconst addToCartSelectors = [\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n].join(\",\")\n\njQuery(addToCartSelectors).on(\"click adding_to_cart\", (event) => {\n\t// console log current time\n\t// console.log(\"add_to_cart event fired at: \" + new Date().getTime())\n\n\ttry {\n\n\t\t// console.log(\"add_to_cart event detected\")\n\n\t\tlet quantity = 1,\n\t\t\tproductId\n\n\t\t// Only process on product pages\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(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\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\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\njQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin)\n\n\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\")\n\t\t\t\twpm.addProductToCart(productId, 1)\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// jQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\njQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\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(event.currentTarget).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\n// checkout_progress event\n// track checkout option event: entered valid billing email\n// jQuery(document).on(\"input\", \"#billing_email\", (event) => {\njQuery(\"#billing_email\").on(\"input\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n *\n * Has to be hooked after document ready !\n */\njQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t// console log current time\n\t// console.log(\"checkout_place_order_success event fired at: \" + new Date().getTime())\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\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n})\n\n/**\n * Update cart event\n *\n * Has to be hooked after document ready !\n */\njQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\t\tlet quantity = jQuery(element).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// add_to_wishlist\njQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).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\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\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(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\ttry {\n\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\twpm.triggerViewItemEventPrep(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\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\n// jQuery(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// \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\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\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\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\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 = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, orderKey, source = \"thankyou_page\", 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( orderKey, source)\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\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\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\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products))\n\t\t}\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\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\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.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\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\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.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\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 = async ( orderKey, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t\t\"X-WP-Nonce\" : wpm.nonce_wp_rest,\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\t// order_id: orderId,\n\t\t\t\t\t\torder_key: orderKey,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t\t// nonce : wpm.pmw_nonce,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\t// order_id: orderId,\n\t\t\t\t\t\torder_key: orderKey,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t\tnonce_ajax : wpm.nonce_ajax,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tconst responseJson = await response.json()\n\n\t\t\tif (responseJson.success) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\", responseJson)\n\t\t\t}\n\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/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\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\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tlet excludeDomains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"translate.google.com\",\n\t\t]\n\n\t\tif (wpmDataLayer?.general?.excludeDomains) {\n\t\t\texcludeDomains = [...excludeDomains, ...wpmDataLayer.general.excludeDomains]\n\t\t}\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (excludeDomains.some(domain => window.location.href.includes(domain))) {\n\t\t\tconsole.debug(\"Pixel Manager for WooCommerce: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\tlet jQueryReadyFired = false\n\n\tconst triggerDomReadyEvent = () => {\n\t\tif (jQueryReadyFired === false) jQuery(document).trigger(\"pmw:ready\")\n\t\tjQueryReadyFired = true\n\t}\n\n\tjQuery(document).on(\"ready\", () => {\n\t\ttriggerDomReadyEvent()\n\t})\n\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\ttriggerDomReadyEvent()\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(() => {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") + \" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tif (wpm.excludeDomainFromTracking()) return\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(() => {\n\t\twpm.pageLoaded().then(() => {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n/**\n * Run when page is ready\n */\n\n// wpm.pageReady().then(() => {\njQuery(document).on(\"pmw:ready\", () => {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(() => {\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\tjQuery(document).on(\"pmw:ready\", () => {\n\t\trequire(\"./wpm/event_listeners_on_ready\")\n\t})\n\n\trequire(\"./wpm/event_listeners\")\n\n\t// require(\"./wpm/wc_hooks\")\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(\"./wpm/event_listeners_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","doesUrlContainPatterns","exclusion_patterns","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","isFbAdvancedMatchingEnabled","getUserIdentifiersForFb","user","id","raw","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","advanced_matching","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","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","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","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","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","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","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","localStorage","getItem","log","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","URLSearchParams","get","split","groupsObject","forEach","group","groupArray","groubsObject","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","consent","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","duration","consentSetCookie","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","checkoutButtonClasses","paymentMethodSelected","fireCheckoutProgress","fireCheckoutOption","val","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","product_type","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","tiktok","getRandomEventId","context","getTikTokUserDataFromBrowser","properties","contents","content_id","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","query","getTikTokOrderItemIds","addToCartSelectors","addProductToCart","Number","each","index","find","classes","getPostIdFromString","one","target","closest","origin","searchParams","has","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","emailSelected","getCartItemsFromBackend","variation","triggerViewItemEventPrep","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","orderKey","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","pageId","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","match","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","nonce_wp_rest","order_key","nonce_ajax","responseJson","cartItemKey","cartItemKeys","matches","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","patterns","pattern","excludeDomainFromTracking","excludeDomains","domain","debug","jQueryReadyFired","triggerDomReadyEvent","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,KAAM,sBAG7B,QAAZ,EAAAC,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCC,UAChB,QAAb,EAACH,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,OAA9B,EAAgCE,QAChCC,IAAIC,uBAAmC,QAAb,EAACN,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,WAAlB,EAAZ,EAAgCK,qBAE3DF,IAAIG,SAAS,MAAO,iBAAiBH,IAAII,mBAC9C,IAKDZ,OAAOC,UAAUC,GAAG,0BAA0B,CAACW,EAAOC,KAErD,IAAI,UACH,GAAiB,QAAb,EAACX,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCE,OAAQ,OAE7CQ,IAAI,QAAS,YAAaD,EAAQT,SAASW,YAAa,CACvDC,QAASH,EAAQT,SAASa,UAI5B,CAFE,MAAOC,GACRC,QAAQD,MAAMA,EACf,KAKDnB,OAAOC,UAAUC,GAAG,8BAA8B,CAACW,EAAOC,KAEzD,IAAI,UACH,GAAiB,QAAb,EAACX,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCE,OAAQ,OAE7CQ,IAAI,QAAS,mBAAoBD,EAAQT,SAASW,YAAa,CAC9DC,QAASH,EAAQT,SAASa,UAI5B,CAFE,MAAOC,GACRC,QAAQD,MAAMA,EACf,KAKDnB,OAAOC,UAAUC,GAA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,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB7jB,IAAjB8jB,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CClBA9c,EAAQ,KAGRhI,IAAI2iB,eAAe9Z,MAAK,WAEvBrJ,OAAOC,UAAUC,GAAG,aAAa,KAChCsI,EAAQ,IAAiC,IAG1CA,EAAQ,KAIRA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAuBRA,EAAQ,IACT,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners_on_ready.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./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\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\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(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\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\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet() && wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\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\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.email?.facebook) data.em = wpmDataLayer.user.email.facebook\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.first_name?.facebook) data.fn = wpmDataLayer.user.first_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.last_name?.facebook) data.ln = wpmDataLayer.user.last_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.phone?.facebook) data.ph = wpmDataLayer.user.phone.facebook\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.city?.facebook) data.ct = wpmDataLayer.user.city.facebook\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.state?.facebook) data.st = wpmDataLayer.user.state.facebook\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.postcode?.facebook) data.zp = wpmDataLayer.user.postcode.facebook\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.country?.facebook) data.country = wpmDataLayer.user.country.facebook\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge 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.\n\t\t *\n\t\t * 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\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.isFbAdvancedMatchingEnabled = () => {\n\t\tif (wpmDataLayer?.pixels?.facebook?.advanced_matching) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\tif (navigator.userAgent) data.client_user_agent = navigator.userAgent\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\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\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\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, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\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\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\n\t\treturn content_ids\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\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\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\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\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\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\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion 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(wpm.getGoogleAdsConversionIdentifiersWithLabel())) 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?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id.raw\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 * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\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 (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_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\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\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\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.then(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\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\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\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// .then(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\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\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\t// Update the PMW consent values with values coming from a CMP\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\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\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\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", function (event) {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groubsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = function () {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\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(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW 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\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.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\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"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// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\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\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/**\n\t * Borlabs Cookie\n\t * If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\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/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\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\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.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\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\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\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\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\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\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\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\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\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", function (e) {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", function (event) {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", function () {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", function () {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", function () {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * remove_from_cart event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\t// console.log(\"remove_from_cart event\" + new Date().getTime())\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).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/**\n * begin_checkout event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\nlet checkoutButtonClasses = [\n\t// \".checkout\",\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\t\".elementor-button--checkout\",\n].join(\",\")\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"click init_checkout\", checkoutButtonClasses, () => {\n\n\t// console.log(\"init_checkout at: \" + new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n/**\n * Set up PWM events\n */\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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}\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 */\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"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 (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id, wpmDataLayer.order.key)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\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\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\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\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585702922241#item-link-Adding%20parameters%20to%20event%20code\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToCart\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"InitiateCheckout\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"ViewContent\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.tiktok.properties = {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"Search\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tquery: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmPlaceOrder\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"placeOrder\",\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"PlaceAnOrder\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientPlaceOrder\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\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}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"CompletePayment\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcontents: wpm.getTikTokOrderItemIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\n\n","/**\n * Register event listeners\n */\n\n\n/**\n * add_to_cart event\n *\n * WC is inconsistent with events that emit add-to-cart events.\n * adding_to_cart and added_to_are legacy events. Also, they only work\n * on Ajax buttons on shop pages.\n */\n\nconst addToCartSelectors = [\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n].join(\",\")\n\njQuery(addToCartSelectors).on(\"click adding_to_cart\", (event) => {\n\t// console log current time\n\t// console.log(\"add_to_cart event fired at: \" + new Date().getTime())\n\n\ttry {\n\n\t\t// console.log(\"add_to_cart event detected\")\n\n\t\tlet quantity = 1,\n\t\t\tproductId\n\n\t\t// Only process on product pages\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(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\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\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\njQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin)\n\n\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\")\n\t\t\t\twpm.addProductToCart(productId, 1)\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// jQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\njQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\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(event.currentTarget).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\n// checkout_progress event\n// track checkout option event: entered valid billing email\n// jQuery(document).on(\"input\", \"#billing_email\", (event) => {\njQuery(\"#billing_email\").on(\"input\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n *\n * Has to be hooked after document ready !\n */\njQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t// console log current time\n\t// console.log(\"checkout_place_order_success event fired at: \" + new Date().getTime())\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\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n})\n\n/**\n * Update cart event\n *\n * Has to be hooked after document ready !\n */\njQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\t\tlet quantity = jQuery(element).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// add_to_wishlist\njQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).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\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\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(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\ttry {\n\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\twpm.triggerViewItemEventPrep(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\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\n// jQuery(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// \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\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\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\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\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 = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, orderKey, source = \"thankyou_page\", 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( orderKey, source)\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\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\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\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products))\n\t\t}\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\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\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.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\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\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.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\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 = async ( orderKey, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t\t\"X-WP-Nonce\" : wpm.nonce_wp_rest,\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\t// order_id: orderId,\n\t\t\t\t\t\torder_key: orderKey,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t\t// nonce : wpm.pmw_nonce,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\t// order_id: orderId,\n\t\t\t\t\t\torder_key: orderKey,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t\tnonce_ajax : wpm.nonce_ajax,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tconst responseJson = await response.json()\n\n\t\t\tif (responseJson.success) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\", responseJson)\n\t\t\t}\n\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/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\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\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tlet excludeDomains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"translate.google.com\",\n\t\t]\n\n\t\tif (wpmDataLayer?.general?.excludeDomains) {\n\t\t\texcludeDomains = [...excludeDomains, ...wpmDataLayer.general.excludeDomains]\n\t\t}\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (excludeDomains.some(domain => window.location.href.includes(domain))) {\n\t\t\tconsole.debug(\"Pixel Manager for WooCommerce: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\tlet jQueryReadyFired = false\n\n\tconst triggerDomReadyEvent = () => {\n\t\tif (jQueryReadyFired === false) jQuery(document).trigger(\"pmw:ready\")\n\t\tjQueryReadyFired = true\n\t}\n\n\tjQuery(document).on(\"ready\", () => {\n\t\ttriggerDomReadyEvent()\n\t})\n\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\ttriggerDomReadyEvent()\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(() => {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") + \" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tif (wpm.excludeDomainFromTracking()) return\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(() => {\n\t\twpm.pageLoaded().then(() => {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n/**\n * Run when page is ready\n */\n\n// wpm.pageReady().then(() => {\njQuery(document).on(\"pmw:ready\", () => {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(() => {\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\tjQuery(document).on(\"pmw:ready\", () => {\n\t\trequire(\"./wpm/event_listeners_on_ready\")\n\t})\n\n\trequire(\"./wpm/event_listeners\")\n\n\t// require(\"./wpm/wc_hooks\")\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(\"./wpm/event_listeners_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","doesUrlContainPatterns","exclusion_patterns","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","isFbAdvancedMatchingEnabled","getUserIdentifiersForFb","user","id","raw","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","advanced_matching","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","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","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","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","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","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","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","localStorage","getItem","log","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","URLSearchParams","get","split","groupsObject","forEach","group","groupArray","groubsObject","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","consent","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","duration","consentSetCookie","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","checkoutButtonClasses","paymentMethodSelected","fireCheckoutProgress","fireCheckoutOption","val","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","product_type","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","tiktok","getRandomEventId","context","getTikTokUserDataFromBrowser","properties","contents","content_id","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","query","getTikTokOrderItemIds","addToCartSelectors","addProductToCart","Number","each","index","find","classes","getPostIdFromString","one","target","closest","origin","searchParams","has","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","emailSelected","getCartItemsFromBackend","variation","triggerViewItemEventPrep","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","orderKey","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","pageId","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","match","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","nonce_wp_rest","order_key","nonce_ajax","responseJson","cartItemKey","cartItemKeys","matches","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","patterns","pattern","excludeDomainFromTracking","excludeDomains","domain","debug","jQueryReadyFired","triggerDomReadyEvent","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, google analytics, google ads, facebook, conversion tracking,
|
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 6.1
|
6 |
Requires PHP: 7.3
|
7 |
-
Stable tag: 1.27.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -221,6 +221,11 @@ You can send the link to the front page of your shop too if you think it would b
|
|
221 |
|
222 |
== Changelog ==
|
223 |
|
|
|
|
|
|
|
|
|
|
|
224 |
= 1.27.5 = 23.11.2022
|
225 |
|
226 |
* Tweak: Prioritize order billing info over logged-in user billing info.
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 6.1
|
6 |
Requires PHP: 7.3
|
7 |
+
Stable tag: 1.27.6
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
221 |
|
222 |
== Changelog ==
|
223 |
|
224 |
+
= 1.27.6 = 23.11.2022
|
225 |
+
|
226 |
+
|
227 |
+
Fix: Fixed an HPOS check for the debug info tab.
|
228 |
+
|
229 |
= 1.27.5 = 23.11.2022
|
230 |
|
231 |
* Tweak: Prioritize order billing info over logged-in user billing info.
|
wgact.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Developer URI: https://sweetcode.com
|
11 |
* Text Domain: woocommerce-google-adwords-conversion-tracking-tag
|
12 |
* Domain path: /languages
|
13 |
-
* * Version: 1.27.
|
14 |
*
|
15 |
* WC requires at least: 3.7
|
16 |
* WC tested up to: 7.1
|
@@ -19,7 +19,7 @@
|
|
19 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
20 |
*
|
21 |
**/
|
22 |
-
const WPM_CURRENT_VERSION = '1.27.
|
23 |
// TODO add option checkbox on uninstall and ask if user wants to delete options from db
|
24 |
|
25 |
if ( !defined( 'ABSPATH' ) ) {
|
10 |
* Developer URI: https://sweetcode.com
|
11 |
* Text Domain: woocommerce-google-adwords-conversion-tracking-tag
|
12 |
* Domain path: /languages
|
13 |
+
* * Version: 1.27.6
|
14 |
*
|
15 |
* WC requires at least: 3.7
|
16 |
* WC tested up to: 7.1
|
19 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
20 |
*
|
21 |
**/
|
22 |
+
const WPM_CURRENT_VERSION = '1.27.6' ;
|
23 |
// TODO add option checkbox on uninstall and ask if user wants to delete options from db
|
24 |
|
25 |
if ( !defined( 'ABSPATH' ) ) {
|