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

Version Description

30.08.2022

  • New: Column on order list, showing for which orders the browser conversion pixels have fired.
  • New: View in order list that only shows orders where browser conversion pixels have not fired.
  • Tweak: Removed the off-site payment gateway notification.
  • Tweak: Added CartFlows custom thankyou pages compatibility.
  • Tweak: Changed product price output to include tax by default, plus added a filter to turn it off.
  • Tweak: Improved event listeners for init_checkout, payment_method_selected and place_order for higher compatibility with themes.
  • Tweak: Automatically disable specific pixels in WooFunnels if they are enabled in the Pixel Manager in order to avoid duplicate tracking.
  • Tweak: Automatically disable specific pixels in Woo Product Feed Pro and Elite if they are enabled in the Pixel Manager in order to avoid duplicate tracking.
  • Tweak: Refactored some code to avoid unnecessary duplicate class initializations.
  • Tweak: Disable gtag in Google Listing and Ads if Google Ads is active in PMW.
  • Tweak: Analyse only orders in the payment gateway report that have been created by customers, not shop managers.
  • Fix: Added brand output for variations.
  • Fix: Fixed a bug that caused the conversion pixels to fire on purchase order payment pages (orders manually created by the shop manager and sent to the customer for payment).
  • Fix: Fixed variations output for FB CAPI server side orders when variaitons output is enabled.
Download this release

Release Info

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

Code changes from version 1.19.4 to 1.20.0

classes/admin/class-admin.php CHANGED
@@ -18,15 +18,20 @@ class Admin
18
  protected $text_domain ;
19
  protected $options ;
20
  protected $plugin_hook ;
21
- protected $documentation ;
22
- private $consent_mode_regions ;
23
- private $validations ;
24
  private $google ;
25
- public function __construct( $options )
 
26
  {
27
- $this->options = $options;
 
 
 
 
 
 
 
 
28
  $this->plugin_hook = 'woocommerce_page_wpm';
29
- $this->documentation = new Documentation();
30
  $this->google = new Google( $this->options );
31
  add_action( 'admin_enqueue_scripts', [ $this, 'wpm_admin_scripts' ] );
32
  // add the admin options page
@@ -40,38 +45,8 @@ class Admin
40
  wpm_fs()->add_filter( 'templates/checkout.php', [ $this, 'fs_inject_additional_scripts' ] );
41
  wpm_fs()->add_filter( 'checkout/purchaseCompleted', [ $this, 'fs_after_purchase_js' ] );
42
  // end __construct
43
- $this->consent_mode_regions = new Consent_Mode_Regions();
44
- $this->validations = new Validations();
45
- // add_action('wp_ajax_wpm_save_imported_settings', [$this, 'wpm_save_imported_settings']);
46
- }
47
-
48
- // public function wpm_save_imported_settings() {
49
- //
50
- // $_post = filter_input_array(INPUT_POST, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
51
- //
52
- //
53
- //// error_log(print_r($_post, true));
54
- //
55
- // error_log(print_r($_post['settings'], true));
56
- // error_log(print_r(json_decode($_post['settings']), true));
57
- // error_log(print_r(json_decode($_post['settings'], true), true));
58
- //
59
- //
60
- // $options = json_decode($_post['settings'], true);
61
- //
62
- //// error_log($options);
63
- //
64
- //// error_log(print_r($options, true));
65
- //
66
- // // Validate imported options
67
- // if ($this->validations->validate_imported_options($options)) {
68
- // update_option(WPM_DB_OPTIONS_NAME, $options);
69
- // wp_send_json_success(['message' => 'Options saved']);
70
- // } else {
71
- // error_log('Invalid Options. Options not saved');
72
- // wp_send_json_error(['message' => 'Invalid options']);
73
- // }
74
- // }
75
  protected function if_is_wpm_admin_page()
76
  {
77
  $_get = $this->get_input_vars( INPUT_GET );
@@ -113,10 +88,13 @@ class Admin
113
 
114
  public function wpm_admin_scripts( $hook_suffix )
115
  {
116
- // only output the admin scripts on the plugin pages
117
- // if ($this->plugin_hook != $hook_suffix) {
118
- // return;
119
- // }
 
 
 
120
  if ( !strpos( $hook_suffix, 'page_wpm' ) ) {
121
  return;
122
  }
@@ -141,12 +119,6 @@ class Admin
141
  WPM_CURRENT_VERSION,
142
  false
143
  );
144
- wp_enqueue_style(
145
- 'wpm-admin',
146
- WPM_PLUGIN_DIR_PATH . 'css/admin.css',
147
- [],
148
- WPM_CURRENT_VERSION
149
- );
150
  wp_enqueue_style(
151
  'wpm-selectWoo',
152
  WPM_PLUGIN_DIR_PATH . 'css/selectWoo.min.css',
@@ -432,6 +404,7 @@ class Admin
432
  'wpm_plugin_options_page',
433
  $section_ids['settings_name']
434
  );
 
435
  if ( wpm_fs()->is__premium_only() || $this->options['general']['pro_version_demo'] ) {
436
  // add checkbox for disabling tracking for user roles
437
  add_settings_field(
@@ -441,7 +414,16 @@ class Admin
441
  'wpm_plugin_options_page',
442
  $section_ids['settings_name']
443
  );
 
 
 
 
 
 
 
 
444
  }
 
445
  }
446
 
447
  public function add_section_advanced_subsection_google( $section_ids )
@@ -473,7 +455,7 @@ class Admin
473
  add_settings_field(
474
  'wpm_setting_google_analytics_eec',
475
  esc_html__( 'Enhanced E-Commerce', 'woocommerce-google-adwords-conversion-tracking-tag' ),
476
- [ $this, 'wpm_setting_html_google_analytics_eec' ],
477
  'wpm_plugin_options_page',
478
  $section_ids['settings_name']
479
  );
@@ -576,7 +558,7 @@ class Admin
576
  'wpm_plugin_options_page',
577
  $section_ids['settings_name']
578
  );
579
- if ( ( new Environment_Check( $this->options ) )->is_borlabs_cookie_active() ) {
580
  // add fields for the Borlabs Cookie support
581
  add_settings_field(
582
  'wpm_setting_borlabs_support',
@@ -586,7 +568,7 @@ class Admin
586
  $section_ids['settings_name']
587
  );
588
  }
589
- if ( ( new Environment_Check( $this->options ) )->is_cookiebot_active() ) {
590
  // add fields for the Cookiebot support
591
  add_settings_field(
592
  'wpm_setting_cookiebot_support',
@@ -596,7 +578,7 @@ class Admin
596
  $section_ids['settings_name']
597
  );
598
  }
599
- if ( ( new Environment_Check( $this->options ) )->is_complianz_active() ) {
600
  // add fields for the Complianz GDPR support
601
  add_settings_field(
602
  'wpm_setting_complianz_support',
@@ -606,7 +588,7 @@ class Admin
606
  $section_ids['settings_name']
607
  );
608
  }
609
- if ( ( new Environment_Check( $this->options ) )->is_cookie_notice_active() ) {
610
  // add fields for the Cookie Notice by hu-manity.co support
611
  add_settings_field(
612
  'wpm_setting_cookie_notice_support',
@@ -616,7 +598,7 @@ class Admin
616
  $section_ids['settings_name']
617
  );
618
  }
619
- if ( ( new Environment_Check( $this->options ) )->is_cookie_script_active() ) {
620
  // add fields for the Cookie Script support
621
  add_settings_field(
622
  'wpm_setting_cookie_script_support',
@@ -626,7 +608,7 @@ class Admin
626
  $section_ids['settings_name']
627
  );
628
  }
629
- if ( ( new Environment_Check( $this->options ) )->is_moove_gdpr_active() ) {
630
  // add fields for the GDPR Cookie Compliance support
631
  add_settings_field(
632
  'wpm_setting_moove_gdpr_support',
@@ -636,7 +618,7 @@ class Admin
636
  $section_ids['settings_name']
637
  );
638
  }
639
- if ( ( new Environment_Check( $this->options ) )->is_cookie_law_info_active() ) {
640
  // add fields for the GDPR Cookie Consent support
641
  add_settings_field(
642
  'wpm_setting_cookie_law_info_support',
@@ -845,7 +827,7 @@ class Admin
845
  </p>
846
  <p>
847
  <a href="<?php
848
- echo esc_url( $this->documentation->get_link( 'script_blockers' ) ) ;
849
  ?>"
850
  target="_blank">
851
  <?php
@@ -997,7 +979,7 @@ class Admin
997
  ?>
998
  :</b>
999
  </div>
1000
- <div style="margin-top: 10px; font-family: Courier">
1001
  <table>
1002
  <thead style="align:left">
1003
  <tr>
@@ -1014,7 +996,7 @@ class Admin
1014
  </thead>
1015
  <tbody>
1016
  <?php
1017
- foreach ( ( new Debug_Info( $this->options ) )->get_payment_gateways() as $gateway ) {
1018
  ?>
1019
  <tr>
1020
  <td><?php
@@ -1044,14 +1026,14 @@ class Admin
1044
 
1045
  <?php
1046
 
1047
- if ( ( new Debug_Info( $this->options ) )->get_gateway_analysis_array() === false ) {
1048
  ?>
1049
  <br>
1050
  <?php
1051
  esc_html_e( 'The analysis is being generated. Please check back in 5 minutes.', 'woocommerce-google-adwords-conversion-tracking-tag' );
1052
  $per_gateway_analysis = [];
1053
  } else {
1054
- $per_gateway_analysis = ( new Debug_Info( $this->options ) )->get_gateway_analysis_array();
1055
  }
1056
 
1057
  ?>
@@ -1110,14 +1092,14 @@ class Admin
1110
 
1111
  <?php
1112
 
1113
- if ( ( new Debug_Info( $this->options ) )->get_gateway_analysis_weighted_array() === false ) {
1114
  ?>
1115
  <br>
1116
  <?php
1117
  esc_html_e( 'The analysis is being generated. Please check back in 5 minutes.', 'woocommerce-google-adwords-conversion-tracking-tag' );
1118
  $per_gateway_analysis = [];
1119
  } else {
1120
- $per_gateway_analysis = ( new Debug_Info( $this->options ) )->get_gateway_analysis_weighted_array();
1121
  }
1122
 
1123
  ?>
@@ -1193,10 +1175,44 @@ class Admin
1193
 
1194
  </div>
1195
 
 
1196
 
1197
- <!-- abcd-->
 
 
 
 
 
 
 
 
 
 
 
1198
 
 
1199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1200
  <?php
1201
  }
1202
 
@@ -1251,7 +1267,7 @@ class Admin
1251
  style="display:block; margin-bottom: 10px; width: 100%;resize: none;color:dimgrey;font-family: Courier"
1252
  cols="100%" rows="30"
1253
  readonly><?php
1254
- esc_html_e( ( new Debug_Info( $this->options ) )->get_debug_info() );
1255
  ?>
1256
  </textarea>
1257
  <button id="debug-info-button"
@@ -1707,14 +1723,14 @@ class Admin
1707
  </label>
1708
  <br><br>
1709
  <?php
1710
- esc_html_e( 'This is the order total amount reported back to Google Ads', 'woocommerce-google-adwords-conversion-tracking-tag' );
1711
  ?>
1712
  <?php
1713
  }
1714
 
1715
  private function get_documentation_html_by_key( $key = 'default' )
1716
  {
1717
- return $this->get_documentation_html( $this->documentation->get_link( $key ) );
1718
  }
1719
 
1720
  protected function get_documentation_html( $path )
@@ -1784,7 +1800,7 @@ class Admin
1784
  ?>
1785
  >
1786
  <?php
1787
- foreach ( $this->consent_mode_regions->get_consent_mode_regions() as $region_code => $region_name ) {
1788
  ?>
1789
  <option value="<?php
1790
  esc_html_e( $region_code );
@@ -1816,41 +1832,12 @@ class Admin
1816
  <?php
1817
  }
1818
 
1819
- public function wpm_setting_html_google_analytics_eec()
1820
  {
1821
- // adding the hidden input is a hack to make WordPress save the option with the value zero,
1822
- // instead of not saving it and remove that array key entirely
1823
- // https://stackoverflow.com/a/1992745/4688612
1824
- ?>
1825
- <label>
1826
- <input type='hidden' value='0' name='wgact_plugin_options[google][analytics][eec]'>
1827
- <input type='checkbox' id='wpm_setting_google_analytics_eec'
1828
- name='wgact_plugin_options[google][analytics][eec]'
1829
- value='1'
1830
- <?php
1831
- checked( $this->options['google']['analytics']['eec'] );
1832
- ?>
1833
- <?php
1834
- esc_html_e( $this->disable_if_demo() );
1835
- ?>
1836
- />
1837
- <?php
1838
- esc_html_e( 'Enable Google Analytics enhanced e-commerce', 'woocommerce-google-adwords-conversion-tracking-tag' );
1839
- ?>
1840
- </label>
1841
- <?php
1842
- $this->get_status_icon_new( $this->options['google']['analytics']['eec'], $this->options['google']['analytics']['universal']['property_id'] || $this->options['google']['analytics']['ga4']['measurement_id'], true );
1843
  $this->html_pro_feature();
1844
- // ($this->get_documentation_html_by_key('google_analytics_eec'));
1845
- ?>
1846
- <?php
1847
-
1848
- if ( $this->options['google']['analytics']['eec'] && (!$this->options['google']['analytics']['universal']['property_id'] && !$this->options['google']['analytics']['ga4']['measurement_id']) ) {
1849
- echo '<p></p><span class="dashicons dashicons-info"></span>' ;
1850
- esc_html_e( 'You need to activate at least Google Analytics UA or Google Analytics 4', 'woocommerce-google-adwords-conversion-tracking-tag' );
1851
- echo '</p><br>' ;
1852
- }
1853
-
1854
  }
1855
 
1856
  public function wpm_setting_html_google_analytics_4_api_secret()
@@ -1869,7 +1856,7 @@ class Admin
1869
  ?>
1870
  />
1871
  <?php
1872
- $this->get_status_icon_new( $this->options['google']['analytics']['ga4']['api_secret'], $this->options['google']['analytics']['eec'] );
1873
  $this->get_documentation_html_by_key( 'google_analytics_4_api_secret' );
1874
  $this->html_pro_feature();
1875
  echo '<br><br>' ;
@@ -1880,13 +1867,6 @@ class Admin
1880
  echo '</p>' ;
1881
  }
1882
 
1883
-
1884
- if ( !$this->options['google']['analytics']['eec'] ) {
1885
- echo '<p></p><span class="dashicons dashicons-info" style="margin-right: 10px"></span>' ;
1886
- esc_html_e( 'Enhanced E-Commerce activation required', 'woocommerce-google-adwords-conversion-tracking-tag' );
1887
- echo '</p><br>' ;
1888
- }
1889
-
1890
  esc_html_e( 'If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag' );
1891
  }
1892
 
@@ -1953,7 +1933,7 @@ class Admin
1953
  ?>
1954
  <?php
1955
 
1956
- if ( $this->options['google']['analytics']['eec'] && (!$this->options['google']['analytics']['universal']['property_id'] && !$this->options['google']['analytics']['ga4']['measurement_id']) ) {
1957
  echo '<p></p><span class="dashicons dashicons-info"></span>' ;
1958
  esc_html_e( 'You need to activate at least Google Analytics UA or Google Analytics 4', 'woocommerce-google-adwords-conversion-tracking-tag' );
1959
  echo '</p><br>' ;
@@ -2353,6 +2333,14 @@ class Admin
2353
  $this->html_pro_feature();
2354
  }
2355
 
 
 
 
 
 
 
 
 
2356
  private function get_order_duplication_prevention_text()
2357
  {
2358
  esc_html_e( 'Basic order duplication prevention is ', 'woocommerce-google-adwords-conversion-tracking-tag' );
@@ -2658,6 +2646,21 @@ class Admin
2658
  return '<div class="status-icon beta">' . esc_html__( 'beta', 'woocommerce-google-adwords-conversion-tracking-tag' ) . '</div>';
2659
  }
2660
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2661
  private function html_active()
2662
  {
2663
  return '<div class="status-icon active">' . esc_html__( 'active', 'woocommerce-google-adwords-conversion-tracking-tag' ) . '</div>';
@@ -2758,11 +2761,10 @@ class Admin
2758
  // validate the options
2759
  public function wpm_options_validate( $input )
2760
  {
2761
- // error_log(print_r($input, true));
2762
  // validate Google Analytics Universal property ID
2763
  if ( isset( $input['google']['analytics']['universal']['property_id'] ) ) {
2764
 
2765
- if ( !$this->validations->is_google_analytics_universal_property_id( $input['google']['analytics']['universal']['property_id'] ) ) {
2766
  $input['google']['analytics']['universal']['property_id'] = ( isset( $this->options['google']['analytics']['universal']['property_id'] ) ? $this->options['google']['analytics']['universal']['property_id'] : '' );
2767
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-universal-property-id', esc_html__( 'You have entered an invalid Google Analytics Universal property ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2768
  }
@@ -2771,7 +2773,7 @@ class Admin
2771
  // validate Google Analytics 4 measurement ID
2772
  if ( isset( $input['google']['analytics']['ga4']['measurement_id'] ) ) {
2773
 
2774
- if ( !$this->validations->is_google_analytics_4_measurement_id( $input['google']['analytics']['ga4']['measurement_id'] ) ) {
2775
  $input['google']['analytics']['ga4']['measurement_id'] = ( isset( $this->options['google']['analytics']['ga4']['measurement_id'] ) ? $this->options['google']['analytics']['ga4']['measurement_id'] : '' );
2776
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-measurement-id', esc_html__( 'You have entered an invalid Google Analytics 4 measurement ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2777
  }
@@ -2780,7 +2782,7 @@ class Admin
2780
  // validate Google Analytics 4 API key
2781
  if ( isset( $input['google']['analytics']['ga4']['api_secret'] ) ) {
2782
 
2783
- if ( !$this->validations->is_google_analytics_4_api_secret( $input['google']['analytics']['ga4']['api_secret'] ) ) {
2784
  $input['google']['analytics']['ga4']['api_secret'] = ( isset( $this->options['google']['analytics']['ga4']['api_secret'] ) ? $this->options['google']['analytics']['ga4']['api_secret'] : '' );
2785
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-measurement-id', esc_html__( 'You have entered an invalid Google Analytics 4 API key.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2786
  }
@@ -2789,7 +2791,7 @@ class Admin
2789
  // validate ['google]['ads']['conversion_id']
2790
  if ( isset( $input['google']['ads']['conversion_id'] ) ) {
2791
 
2792
- if ( !$this->validations->is_gads_conversion_id( $input['google']['ads']['conversion_id'] ) ) {
2793
  $input['google']['ads']['conversion_id'] = ( isset( $this->options['google']['ads']['conversion_id'] ) ? $this->options['google']['ads']['conversion_id'] : '' );
2794
  add_settings_error( 'wgact_plugin_options', 'invalid-conversion-id', esc_html__( 'You have entered an invalid conversion ID. It only contains 8 to 10 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2795
  }
@@ -2798,7 +2800,7 @@ class Admin
2798
  // validate ['google]['ads']['conversion_label']
2799
  if ( isset( $input['google']['ads']['conversion_label'] ) ) {
2800
 
2801
- if ( !$this->validations->is_gads_conversion_label( $input['google']['ads']['conversion_label'] ) ) {
2802
  $input['google']['ads']['conversion_label'] = ( isset( $this->options['google']['ads']['conversion_label'] ) ? $this->options['google']['ads']['conversion_label'] : '' );
2803
  add_settings_error( 'wgact_plugin_options', 'invalid-conversion-label', esc_html__( 'You have entered an invalid conversion label.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2804
  }
@@ -2807,7 +2809,7 @@ class Admin
2807
  // validate ['google]['ads']['phone_conversion_label']
2808
  if ( isset( $input['google']['ads']['phone_conversion_label'] ) ) {
2809
 
2810
- if ( !$this->validations->is_gads_conversion_label( $input['google']['ads']['phone_conversion_label'] ) ) {
2811
  $input['google']['ads']['phone_conversion_label'] = ( isset( $this->options['google']['ads']['phone_conversion_label'] ) ? $this->options['google']['ads']['phone_conversion_label'] : '' );
2812
  add_settings_error( 'wgact_plugin_options', 'invalid-conversion-label', esc_html__( 'You have entered an invalid conversion label.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2813
  }
@@ -2816,7 +2818,7 @@ class Admin
2816
  // validate ['google]['ads']['aw_merchant_id']
2817
  if ( isset( $input['google']['ads']['aw_merchant_id'] ) ) {
2818
 
2819
- if ( !$this->validations->is_gads_aw_merchant_id( $input['google']['ads']['aw_merchant_id'] ) ) {
2820
  $input['google']['ads']['aw_merchant_id'] = ( isset( $this->options['google']['ads']['aw_merchant_id'] ) ? $this->options['google']['ads']['aw_merchant_id'] : '' );
2821
  add_settings_error( 'wgact_plugin_options', 'invalid-aw-merchant-id', esc_html__( 'You have entered an invalid merchant ID. It only contains 6 to 12 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2822
  }
@@ -2825,7 +2827,7 @@ class Admin
2825
  // validate Google Optimize container ID
2826
  if ( isset( $input['google']['optimize']['container_id'] ) ) {
2827
 
2828
- if ( !$this->validations->is_google_optimize_measurement_id( $input['google']['optimize']['container_id'] ) ) {
2829
  $input['google']['optimize']['container_id'] = ( isset( $this->options['google']['optimize']['container_id'] ) ? $this->options['google']['optimize']['container_id'] : '' );
2830
  add_settings_error( 'wgact_plugin_options', 'invalid-google-optimize-container-id', esc_html__( 'You have entered an invalid Google Optimize container ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2831
  }
@@ -2834,7 +2836,7 @@ class Admin
2834
  // validate ['facebook']['pixel_id']
2835
  if ( isset( $input['facebook']['pixel_id'] ) ) {
2836
 
2837
- if ( !$this->validations->is_facebook_pixel_id( $input['facebook']['pixel_id'] ) ) {
2838
  $input['facebook']['pixel_id'] = ( isset( $this->options['facebook']['pixel_id'] ) ? $this->options['facebook']['pixel_id'] : '' );
2839
  add_settings_error( 'wgact_plugin_options', 'invalid-facebook-pixel-id', esc_html__( 'You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2840
  }
@@ -2843,7 +2845,7 @@ class Admin
2843
  // validate ['facebook']['capi']['token']
2844
  if ( isset( $input['facebook']['capi']['token'] ) ) {
2845
 
2846
- if ( !$this->validations->is_facebook_capi_token( $input['facebook']['capi']['token'] ) ) {
2847
  $input['facebook']['capi']['token'] = ( isset( $this->options['facebook']['capi']['token'] ) ? $this->options['facebook']['capi']['token'] : '' );
2848
  add_settings_error( 'wgact_plugin_options', 'invalid-facebook-pixel-id', esc_html__( 'You have entered an invalid Meta (Facebook) CAPI token.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2849
  }
@@ -2852,7 +2854,7 @@ class Admin
2852
  // validate Bing Ads UET tag ID
2853
  if ( isset( $input['bing']['uet_tag_id'] ) ) {
2854
 
2855
- if ( !$this->validations->is_bing_uet_tag_id( $input['bing']['uet_tag_id'] ) ) {
2856
  $input['bing']['uet_tag_id'] = ( isset( $this->options['bing']['uet_tag_id'] ) ? $this->options['bing']['uet_tag_id'] : '' );
2857
  add_settings_error( 'wgact_plugin_options', 'invalid-bing-ads-uet-tag-id', esc_html__( 'You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2858
  }
@@ -2861,7 +2863,7 @@ class Admin
2861
  // validate Twitter pixel ID
2862
  if ( isset( $input['twitter']['pixel_id'] ) ) {
2863
 
2864
- if ( !$this->validations->is_twitter_pixel_id( $input['twitter']['pixel_id'] ) ) {
2865
  $input['twitter']['pixel_id'] = ( isset( $this->options['twitter']['pixel_id'] ) ? $this->options['twitter']['pixel_id'] : '' );
2866
  add_settings_error( 'wgact_plugin_options', 'invalid-twitter-pixel-id', esc_html__( 'You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2867
  }
@@ -2870,7 +2872,7 @@ class Admin
2870
  // validate Pinterest pixel ID
2871
  if ( isset( $input['pinterest']['pixel_id'] ) ) {
2872
 
2873
- if ( !$this->validations->is_pinterest_pixel_id( $input['pinterest']['pixel_id'] ) ) {
2874
  $input['pinterest']['pixel_id'] = ( isset( $this->options['pinterest']['pixel_id'] ) ? $this->options['pinterest']['pixel_id'] : '' );
2875
  add_settings_error( 'wgact_plugin_options', 'invalid-pinterest-pixel-id', esc_html__( 'You have entered an invalid Pinterest pixel ID. It only contains 13 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2876
  }
@@ -2879,7 +2881,7 @@ class Admin
2879
  // validate Snapchat pixel ID
2880
  if ( isset( $input['snapchat']['pixel_id'] ) ) {
2881
 
2882
- if ( !$this->validations->is_snapchat_pixel_id( $input['snapchat']['pixel_id'] ) ) {
2883
  $input['snapchat']['pixel_id'] = ( isset( $this->options['snapchat']['pixel_id'] ) ? $this->options['snapchat']['pixel_id'] : '' );
2884
  add_settings_error( 'wgact_plugin_options', 'invalid-snapchat-pixel-id', esc_html__( 'You have entered an invalid Snapchat pixel ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2885
  }
@@ -2888,7 +2890,7 @@ class Admin
2888
  // validate TikTok pixel ID
2889
  if ( isset( $input['tiktok']['pixel_id'] ) ) {
2890
 
2891
- if ( !$this->validations->is_tiktok_pixel_id( $input['tiktok']['pixel_id'] ) ) {
2892
  $input['tiktok']['pixel_id'] = ( isset( $this->options['tiktok']['pixel_id'] ) ? $this->options['tiktok']['pixel_id'] : '' );
2893
  add_settings_error( 'wgact_plugin_options', 'invalid-tiktok-pixel-id', esc_html__( 'You have entered an invalid TikTok pixel ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2894
  }
@@ -2897,7 +2899,7 @@ class Admin
2897
  // validate Hotjar site ID
2898
  if ( isset( $input['hotjar']['site_id'] ) ) {
2899
 
2900
- if ( !$this->validations->is_hotjar_site_id( $input['hotjar']['site_id'] ) ) {
2901
  $input['hotjar']['site_id'] = ( isset( $this->options['hotjar']['site_id'] ) ? $this->options['hotjar']['site_id'] : '' );
2902
  add_settings_error( 'wgact_plugin_options', 'invalid-hotjar-site-id', esc_html__( 'You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2903
  }
18
  protected $text_domain ;
19
  protected $options ;
20
  protected $plugin_hook ;
 
 
 
21
  private $google ;
22
+ private static $instance ;
23
+ public static function get_instance()
24
  {
25
+ if ( is_null( self::$instance ) ) {
26
+ self::$instance = new self();
27
+ }
28
+ return self::$instance;
29
+ }
30
+
31
+ private function __construct()
32
+ {
33
+ $this->options = get_option( WPM_DB_OPTIONS_NAME );
34
  $this->plugin_hook = 'woocommerce_page_wpm';
 
35
  $this->google = new Google( $this->options );
36
  add_action( 'admin_enqueue_scripts', [ $this, 'wpm_admin_scripts' ] );
37
  // add the admin options page
45
  wpm_fs()->add_filter( 'templates/checkout.php', [ $this, 'fs_inject_additional_scripts' ] );
46
  wpm_fs()->add_filter( 'checkout/purchaseCompleted', [ $this, 'fs_after_purchase_js' ] );
47
  // end __construct
48
+ }
49
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  protected function if_is_wpm_admin_page()
51
  {
52
  $_get = $this->get_input_vars( INPUT_GET );
88
 
89
  public function wpm_admin_scripts( $hook_suffix )
90
  {
91
+ wp_enqueue_style(
92
+ 'wpm-admin',
93
+ WPM_PLUGIN_DIR_PATH . 'css/admin.css',
94
+ [],
95
+ WPM_CURRENT_VERSION
96
+ );
97
+ // Only ouput the remaining scripts on PMW settings page
98
  if ( !strpos( $hook_suffix, 'page_wpm' ) ) {
99
  return;
100
  }
119
  WPM_CURRENT_VERSION,
120
  false
121
  );
 
 
 
 
 
 
122
  wp_enqueue_style(
123
  'wpm-selectWoo',
124
  WPM_PLUGIN_DIR_PATH . 'css/selectWoo.min.css',
404
  'wpm_plugin_options_page',
405
  $section_ids['settings_name']
406
  );
407
+
408
  if ( wpm_fs()->is__premium_only() || $this->options['general']['pro_version_demo'] ) {
409
  // add checkbox for disabling tracking for user roles
410
  add_settings_field(
414
  'wpm_plugin_options_page',
415
  $section_ids['settings_name']
416
  );
417
+ // add checkbox for disabling tracking for user roles
418
+ add_settings_field(
419
+ 'wpm_setting_acr',
420
+ esc_html__( 'ACR', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
421
+ [ $this, 'wpm_info_html_acr' ],
422
+ 'wpm_plugin_options_page',
423
+ $section_ids['settings_name']
424
+ );
425
  }
426
+
427
  }
428
 
429
  public function add_section_advanced_subsection_google( $section_ids )
455
  add_settings_field(
456
  'wpm_setting_google_analytics_eec',
457
  esc_html__( 'Enhanced E-Commerce', 'woocommerce-google-adwords-conversion-tracking-tag' ),
458
+ [ $this, 'wpm_info_html_google_analytics_eec' ],
459
  'wpm_plugin_options_page',
460
  $section_ids['settings_name']
461
  );
558
  'wpm_plugin_options_page',
559
  $section_ids['settings_name']
560
  );
561
+ if ( Environment_Check::get_instance()->is_borlabs_cookie_active() ) {
562
  // add fields for the Borlabs Cookie support
563
  add_settings_field(
564
  'wpm_setting_borlabs_support',
568
  $section_ids['settings_name']
569
  );
570
  }
571
+ if ( Environment_Check::get_instance()->is_cookiebot_active() ) {
572
  // add fields for the Cookiebot support
573
  add_settings_field(
574
  'wpm_setting_cookiebot_support',
578
  $section_ids['settings_name']
579
  );
580
  }
581
+ if ( Environment_Check::get_instance()->is_complianz_active() ) {
582
  // add fields for the Complianz GDPR support
583
  add_settings_field(
584
  'wpm_setting_complianz_support',
588
  $section_ids['settings_name']
589
  );
590
  }
591
+ if ( Environment_Check::get_instance()->is_cookie_notice_active() ) {
592
  // add fields for the Cookie Notice by hu-manity.co support
593
  add_settings_field(
594
  'wpm_setting_cookie_notice_support',
598
  $section_ids['settings_name']
599
  );
600
  }
601
+ if ( Environment_Check::get_instance()->is_cookie_script_active() ) {
602
  // add fields for the Cookie Script support
603
  add_settings_field(
604
  'wpm_setting_cookie_script_support',
608
  $section_ids['settings_name']
609
  );
610
  }
611
+ if ( Environment_Check::get_instance()->is_moove_gdpr_active() ) {
612
  // add fields for the GDPR Cookie Compliance support
613
  add_settings_field(
614
  'wpm_setting_moove_gdpr_support',
618
  $section_ids['settings_name']
619
  );
620
  }
621
+ if ( Environment_Check::get_instance()->is_cookie_law_info_active() ) {
622
  // add fields for the GDPR Cookie Consent support
623
  add_settings_field(
624
  'wpm_setting_cookie_law_info_support',
827
  </p>
828
  <p>
829
  <a href="<?php
830
+ echo esc_url( Documentation::get_link( 'script_blockers' ) ) ;
831
  ?>"
832
  target="_blank">
833
  <?php
979
  ?>
980
  :</b>
981
  </div>
982
+ <div style="margin-left: 10px; font-family: Courier">
983
  <table>
984
  <thead style="align:left">
985
  <tr>
996
  </thead>
997
  <tbody>
998
  <?php
999
+ foreach ( Debug_Info::get_instance()->get_payment_gateways() as $gateway ) {
1000
  ?>
1001
  <tr>
1002
  <td><?php
1026
 
1027
  <?php
1028
 
1029
+ if ( Debug_Info::get_instance()->get_gateway_analysis_array() === false ) {
1030
  ?>
1031
  <br>
1032
  <?php
1033
  esc_html_e( 'The analysis is being generated. Please check back in 5 minutes.', 'woocommerce-google-adwords-conversion-tracking-tag' );
1034
  $per_gateway_analysis = [];
1035
  } else {
1036
+ $per_gateway_analysis = Debug_Info::get_instance()->get_gateway_analysis_array();
1037
  }
1038
 
1039
  ?>
1092
 
1093
  <?php
1094
 
1095
+ if ( Debug_Info::get_instance()->get_gateway_analysis_weighted_array() === false ) {
1096
  ?>
1097
  <br>
1098
  <?php
1099
  esc_html_e( 'The analysis is being generated. Please check back in 5 minutes.', 'woocommerce-google-adwords-conversion-tracking-tag' );
1100
  $per_gateway_analysis = [];
1101
  } else {
1102
+ $per_gateway_analysis = Debug_Info::get_instance()->get_gateway_analysis_weighted_array();
1103
  }
1104
 
1105
  ?>
1175
 
1176
  </div>
1177
 
1178
+ <div style="margin-top: 10px">
1179
 
1180
+ <b><?php
1181
+ esc_html_e( 'Automatic Conversion Recovery (ACR)', 'woocommerce-google-adwords-conversion-tracking-tag' );
1182
+ ?>
1183
+ :</b>
1184
+ <?php
1185
+ $this->get_documentation_html_by_key( 'acr' );
1186
+ ?>
1187
+ <?php
1188
+ $this->html_beta_e( '-2px' );
1189
+ ?>
1190
+ <?php
1191
+ ?>
1192
 
1193
+ <div style="margin-top: 10px">
1194
 
1195
+ <div style="margin-left: 10px">
1196
+ <p>
1197
+ <?php
1198
+ esc_html_e( 'This feature is only available in the pro version of the plugin. Follow the link to learn more about it:', 'woocommerce-google-adwords-conversion-tracking-tag' );
1199
+ ?>
1200
+ <?php
1201
+ $this->get_documentation_html_by_key( 'acr' );
1202
+ ?></br>
1203
+ <?php
1204
+ esc_html_e( 'Get the pro version of the Pixel Manager for WooCommerce over here', 'woocommerce-google-adwords-conversion-tracking-tag' );
1205
+ ?>
1206
+ : <a href="//sweetcode.com/pricing"
1207
+ target="_blank"><?php
1208
+ esc_html_e( 'Go Pro', 'woocommerce-google-adwords-conversion-tracking-tag' );
1209
+ ?></a>
1210
+ </p>
1211
+ </div>
1212
+ </div>
1213
+ <?php
1214
+ ?>
1215
+ </div>
1216
  <?php
1217
  }
1218
 
1267
  style="display:block; margin-bottom: 10px; width: 100%;resize: none;color:dimgrey;font-family: Courier"
1268
  cols="100%" rows="30"
1269
  readonly><?php
1270
+ esc_html_e( Debug_Info::get_instance()->get_debug_info() );
1271
  ?>
1272
  </textarea>
1273
  <button id="debug-info-button"
1723
  </label>
1724
  <br><br>
1725
  <?php
1726
+ esc_html_e( 'This is the order total amount reported back to the paid ads pixels (such as Google Ads, Facebook, etc.)', 'woocommerce-google-adwords-conversion-tracking-tag' );
1727
  ?>
1728
  <?php
1729
  }
1730
 
1731
  private function get_documentation_html_by_key( $key = 'default' )
1732
  {
1733
+ return $this->get_documentation_html( Documentation::get_link( $key ) );
1734
  }
1735
 
1736
  protected function get_documentation_html( $path )
1800
  ?>
1801
  >
1802
  <?php
1803
+ foreach ( Consent_Mode_Regions::get_consent_mode_regions() as $region_code => $region_name ) {
1804
  ?>
1805
  <option value="<?php
1806
  esc_html_e( $region_code );
1832
  <?php
1833
  }
1834
 
1835
+ public function wpm_info_html_google_analytics_eec()
1836
  {
1837
+ esc_html_e( 'Google Analytics Enhanced E-Commerce is ', 'woocommerce-google-adwords-conversion-tracking-tag' );
1838
+ $this->get_status_icon_new( wpm_fs()->is__premium_only() && $this->google->is_google_analytics_active() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1839
  $this->html_pro_feature();
1840
+ // $this->get_documentation_html_by_key('eec');
 
 
 
 
 
 
 
 
 
1841
  }
1842
 
1843
  public function wpm_setting_html_google_analytics_4_api_secret()
1856
  ?>
1857
  />
1858
  <?php
1859
+ $this->get_status_icon_new( $this->options['google']['analytics']['ga4']['api_secret'] );
1860
  $this->get_documentation_html_by_key( 'google_analytics_4_api_secret' );
1861
  $this->html_pro_feature();
1862
  echo '<br><br>' ;
1867
  echo '</p>' ;
1868
  }
1869
 
 
 
 
 
 
 
 
1870
  esc_html_e( 'If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag' );
1871
  }
1872
 
1933
  ?>
1934
  <?php
1935
 
1936
+ if ( !$this->options['google']['analytics']['universal']['property_id'] && !$this->options['google']['analytics']['ga4']['measurement_id'] ) {
1937
  echo '<p></p><span class="dashicons dashicons-info"></span>' ;
1938
  esc_html_e( 'You need to activate at least Google Analytics UA or Google Analytics 4', 'woocommerce-google-adwords-conversion-tracking-tag' );
1939
  echo '</p><br>' ;
2333
  $this->html_pro_feature();
2334
  }
2335
 
2336
+ public function wpm_info_html_acr()
2337
+ {
2338
+ esc_html_e( 'Automatic Conversion Recovery (ACR) is ', 'woocommerce-google-adwords-conversion-tracking-tag' );
2339
+ $this->get_status_icon_new( wpm_fs()->is__premium_only() );
2340
+ $this->html_pro_feature();
2341
+ $this->get_documentation_html_by_key( 'acr' );
2342
+ }
2343
+
2344
  private function get_order_duplication_prevention_text()
2345
  {
2346
  esc_html_e( 'Basic order duplication prevention is ', 'woocommerce-google-adwords-conversion-tracking-tag' );
2646
  return '<div class="status-icon beta">' . esc_html__( 'beta', 'woocommerce-google-adwords-conversion-tracking-tag' ) . '</div>';
2647
  }
2648
 
2649
+ private function html_beta_e( $margin_top = '1px' )
2650
+ {
2651
+ ?>
2652
+ <div class="status-icon beta"
2653
+ style="margin-top: <?php
2654
+ esc_html_e( $margin_top );
2655
+ ?>"
2656
+ >
2657
+ <?php
2658
+ esc_html_e( 'beta', 'woocommerce-google-adwords-conversion-tracking-tag' );
2659
+ ?>
2660
+ </div>
2661
+ <?php
2662
+ }
2663
+
2664
  private function html_active()
2665
  {
2666
  return '<div class="status-icon active">' . esc_html__( 'active', 'woocommerce-google-adwords-conversion-tracking-tag' ) . '</div>';
2761
  // validate the options
2762
  public function wpm_options_validate( $input )
2763
  {
 
2764
  // validate Google Analytics Universal property ID
2765
  if ( isset( $input['google']['analytics']['universal']['property_id'] ) ) {
2766
 
2767
+ if ( !Validations::is_google_analytics_universal_property_id( $input['google']['analytics']['universal']['property_id'] ) ) {
2768
  $input['google']['analytics']['universal']['property_id'] = ( isset( $this->options['google']['analytics']['universal']['property_id'] ) ? $this->options['google']['analytics']['universal']['property_id'] : '' );
2769
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-universal-property-id', esc_html__( 'You have entered an invalid Google Analytics Universal property ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2770
  }
2773
  // validate Google Analytics 4 measurement ID
2774
  if ( isset( $input['google']['analytics']['ga4']['measurement_id'] ) ) {
2775
 
2776
+ if ( !Validations::is_google_analytics_4_measurement_id( $input['google']['analytics']['ga4']['measurement_id'] ) ) {
2777
  $input['google']['analytics']['ga4']['measurement_id'] = ( isset( $this->options['google']['analytics']['ga4']['measurement_id'] ) ? $this->options['google']['analytics']['ga4']['measurement_id'] : '' );
2778
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-measurement-id', esc_html__( 'You have entered an invalid Google Analytics 4 measurement ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2779
  }
2782
  // validate Google Analytics 4 API key
2783
  if ( isset( $input['google']['analytics']['ga4']['api_secret'] ) ) {
2784
 
2785
+ if ( !Validations::is_google_analytics_4_api_secret( $input['google']['analytics']['ga4']['api_secret'] ) ) {
2786
  $input['google']['analytics']['ga4']['api_secret'] = ( isset( $this->options['google']['analytics']['ga4']['api_secret'] ) ? $this->options['google']['analytics']['ga4']['api_secret'] : '' );
2787
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-measurement-id', esc_html__( 'You have entered an invalid Google Analytics 4 API key.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2788
  }
2791
  // validate ['google]['ads']['conversion_id']
2792
  if ( isset( $input['google']['ads']['conversion_id'] ) ) {
2793
 
2794
+ if ( !Validations::is_gads_conversion_id( $input['google']['ads']['conversion_id'] ) ) {
2795
  $input['google']['ads']['conversion_id'] = ( isset( $this->options['google']['ads']['conversion_id'] ) ? $this->options['google']['ads']['conversion_id'] : '' );
2796
  add_settings_error( 'wgact_plugin_options', 'invalid-conversion-id', esc_html__( 'You have entered an invalid conversion ID. It only contains 8 to 10 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2797
  }
2800
  // validate ['google]['ads']['conversion_label']
2801
  if ( isset( $input['google']['ads']['conversion_label'] ) ) {
2802
 
2803
+ if ( !Validations::is_gads_conversion_label( $input['google']['ads']['conversion_label'] ) ) {
2804
  $input['google']['ads']['conversion_label'] = ( isset( $this->options['google']['ads']['conversion_label'] ) ? $this->options['google']['ads']['conversion_label'] : '' );
2805
  add_settings_error( 'wgact_plugin_options', 'invalid-conversion-label', esc_html__( 'You have entered an invalid conversion label.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2806
  }
2809
  // validate ['google]['ads']['phone_conversion_label']
2810
  if ( isset( $input['google']['ads']['phone_conversion_label'] ) ) {
2811
 
2812
+ if ( !Validations::is_gads_conversion_label( $input['google']['ads']['phone_conversion_label'] ) ) {
2813
  $input['google']['ads']['phone_conversion_label'] = ( isset( $this->options['google']['ads']['phone_conversion_label'] ) ? $this->options['google']['ads']['phone_conversion_label'] : '' );
2814
  add_settings_error( 'wgact_plugin_options', 'invalid-conversion-label', esc_html__( 'You have entered an invalid conversion label.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2815
  }
2818
  // validate ['google]['ads']['aw_merchant_id']
2819
  if ( isset( $input['google']['ads']['aw_merchant_id'] ) ) {
2820
 
2821
+ if ( !Validations::is_gads_aw_merchant_id( $input['google']['ads']['aw_merchant_id'] ) ) {
2822
  $input['google']['ads']['aw_merchant_id'] = ( isset( $this->options['google']['ads']['aw_merchant_id'] ) ? $this->options['google']['ads']['aw_merchant_id'] : '' );
2823
  add_settings_error( 'wgact_plugin_options', 'invalid-aw-merchant-id', esc_html__( 'You have entered an invalid merchant ID. It only contains 6 to 12 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2824
  }
2827
  // validate Google Optimize container ID
2828
  if ( isset( $input['google']['optimize']['container_id'] ) ) {
2829
 
2830
+ if ( !Validations::is_google_optimize_measurement_id( $input['google']['optimize']['container_id'] ) ) {
2831
  $input['google']['optimize']['container_id'] = ( isset( $this->options['google']['optimize']['container_id'] ) ? $this->options['google']['optimize']['container_id'] : '' );
2832
  add_settings_error( 'wgact_plugin_options', 'invalid-google-optimize-container-id', esc_html__( 'You have entered an invalid Google Optimize container ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2833
  }
2836
  // validate ['facebook']['pixel_id']
2837
  if ( isset( $input['facebook']['pixel_id'] ) ) {
2838
 
2839
+ if ( !Validations::is_facebook_pixel_id( $input['facebook']['pixel_id'] ) ) {
2840
  $input['facebook']['pixel_id'] = ( isset( $this->options['facebook']['pixel_id'] ) ? $this->options['facebook']['pixel_id'] : '' );
2841
  add_settings_error( 'wgact_plugin_options', 'invalid-facebook-pixel-id', esc_html__( 'You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2842
  }
2845
  // validate ['facebook']['capi']['token']
2846
  if ( isset( $input['facebook']['capi']['token'] ) ) {
2847
 
2848
+ if ( !Validations::is_facebook_capi_token( $input['facebook']['capi']['token'] ) ) {
2849
  $input['facebook']['capi']['token'] = ( isset( $this->options['facebook']['capi']['token'] ) ? $this->options['facebook']['capi']['token'] : '' );
2850
  add_settings_error( 'wgact_plugin_options', 'invalid-facebook-pixel-id', esc_html__( 'You have entered an invalid Meta (Facebook) CAPI token.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2851
  }
2854
  // validate Bing Ads UET tag ID
2855
  if ( isset( $input['bing']['uet_tag_id'] ) ) {
2856
 
2857
+ if ( !Validations::is_bing_uet_tag_id( $input['bing']['uet_tag_id'] ) ) {
2858
  $input['bing']['uet_tag_id'] = ( isset( $this->options['bing']['uet_tag_id'] ) ? $this->options['bing']['uet_tag_id'] : '' );
2859
  add_settings_error( 'wgact_plugin_options', 'invalid-bing-ads-uet-tag-id', esc_html__( 'You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2860
  }
2863
  // validate Twitter pixel ID
2864
  if ( isset( $input['twitter']['pixel_id'] ) ) {
2865
 
2866
+ if ( !Validations::is_twitter_pixel_id( $input['twitter']['pixel_id'] ) ) {
2867
  $input['twitter']['pixel_id'] = ( isset( $this->options['twitter']['pixel_id'] ) ? $this->options['twitter']['pixel_id'] : '' );
2868
  add_settings_error( 'wgact_plugin_options', 'invalid-twitter-pixel-id', esc_html__( 'You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2869
  }
2872
  // validate Pinterest pixel ID
2873
  if ( isset( $input['pinterest']['pixel_id'] ) ) {
2874
 
2875
+ if ( !Validations::is_pinterest_pixel_id( $input['pinterest']['pixel_id'] ) ) {
2876
  $input['pinterest']['pixel_id'] = ( isset( $this->options['pinterest']['pixel_id'] ) ? $this->options['pinterest']['pixel_id'] : '' );
2877
  add_settings_error( 'wgact_plugin_options', 'invalid-pinterest-pixel-id', esc_html__( 'You have entered an invalid Pinterest pixel ID. It only contains 13 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2878
  }
2881
  // validate Snapchat pixel ID
2882
  if ( isset( $input['snapchat']['pixel_id'] ) ) {
2883
 
2884
+ if ( !Validations::is_snapchat_pixel_id( $input['snapchat']['pixel_id'] ) ) {
2885
  $input['snapchat']['pixel_id'] = ( isset( $this->options['snapchat']['pixel_id'] ) ? $this->options['snapchat']['pixel_id'] : '' );
2886
  add_settings_error( 'wgact_plugin_options', 'invalid-snapchat-pixel-id', esc_html__( 'You have entered an invalid Snapchat pixel ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2887
  }
2890
  // validate TikTok pixel ID
2891
  if ( isset( $input['tiktok']['pixel_id'] ) ) {
2892
 
2893
+ if ( !Validations::is_tiktok_pixel_id( $input['tiktok']['pixel_id'] ) ) {
2894
  $input['tiktok']['pixel_id'] = ( isset( $this->options['tiktok']['pixel_id'] ) ? $this->options['tiktok']['pixel_id'] : '' );
2895
  add_settings_error( 'wgact_plugin_options', 'invalid-tiktok-pixel-id', esc_html__( 'You have entered an invalid TikTok pixel ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2896
  }
2899
  // validate Hotjar site ID
2900
  if ( isset( $input['hotjar']['site_id'] ) ) {
2901
 
2902
+ if ( !Validations::is_hotjar_site_id( $input['hotjar']['site_id'] ) ) {
2903
  $input['hotjar']['site_id'] = ( isset( $this->options['hotjar']['site_id'] ) ? $this->options['hotjar']['site_id'] : '' );
2904
  add_settings_error( 'wgact_plugin_options', 'invalid-hotjar-site-id', esc_html__( 'You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
2905
  }
classes/admin/class-ask-for-rating.php CHANGED
@@ -14,6 +14,15 @@ class Ask_For_Rating {
14
 
15
  private $option_name = WPM_DB_RATINGS;
16
 
 
 
 
 
 
 
 
 
 
17
  public function __construct() {
18
 
19
  // $options = get_option($this->option_name);
@@ -139,7 +148,7 @@ class Ask_For_Rating {
139
  <br>
140
  <div style="margin-top:5px;">
141
 
142
- <span >- Aleksandar (Lead developer)</span>
143
  </div>
144
  </div>
145
  <div style="">
14
 
15
  private $option_name = WPM_DB_RATINGS;
16
 
17
+ private static $instance;
18
+
19
+ public static function get_instance() {
20
+ if (is_null(self::$instance)) {
21
+ self::$instance = new self();
22
+ }
23
+ return self::$instance;
24
+ }
25
+
26
  public function __construct() {
27
 
28
  // $options = get_option($this->option_name);
148
  <br>
149
  <div style="margin-top:5px;">
150
 
151
+ <span>- Aleksandar (Lead developer)</span>
152
  </div>
153
  </div>
154
  <div style="">
classes/admin/class-consent-mode-regions.php CHANGED
@@ -4,7 +4,7 @@ namespace WCPM\Classes\Admin;
4
 
5
  class Consent_Mode_Regions {
6
 
7
- public function get_consent_mode_regions() {
8
  return [
9
  'EU' => 'European Union',
10
  'AF' => 'Afghanistan',
4
 
5
  class Consent_Mode_Regions {
6
 
7
+ public static function get_consent_mode_regions() {
8
  return [
9
  'EU' => 'European Union',
10
  'AF' => 'Afghanistan',
classes/admin/class-debug-info.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  namespace WCPM\Classes\Admin;
4
 
5
- use WC_Order_Query ;
6
  use WCPM\Classes\Pixels\Trait_Shop ;
7
  use WP_Query ;
8
 
@@ -14,21 +13,19 @@ if ( !defined( 'ABSPATH' ) ) {
14
  class Debug_Info
15
  {
16
  use Trait_Shop ;
17
- protected $environment_check ;
18
  protected $options ;
19
- public function __construct( $options )
 
20
  {
21
- $this->options = $options;
22
- $this->environment_check = new Environment_Check( $this->options );
23
- // If pmw transients don't exist, run Action Scheduler to create them
24
- // if transient pmw_tracking_accuracy_analysis doesn't exist
25
- // add_action( 'init', function() {
26
- // add_action( 'as_run_tracking_accuracy_analysis', 'run_tracking_accuracy_analysis' );
27
- //
28
- // if (!get_transient('pmw_tracking_accuracy_analysis')) {
29
- // as_enqueue_async_action('as_run_tracking_accuracy_analysis');
30
- // }
31
- // } );
32
  }
33
 
34
  public function get_debug_info()
@@ -48,8 +45,8 @@ class Debug_Info
48
  $html .= 'WordPress version: ' . $wp_version . PHP_EOL;
49
  $html .= 'WooCommerce version: ' . $woocommerce->version . PHP_EOL;
50
  $html .= 'PHP version: ' . phpversion() . PHP_EOL;
51
- $html .= 'WordPress memory limit: ' . $this->environment_check->get_wp_memory_limit() . PHP_EOL;
52
- $curl_available = ( $this->environment_check->is_curl_active() ? 'yes' : 'no' );
53
  $html .= 'curl available: ' . $curl_available . PHP_EOL;
54
  $html .= 'wp_remote_get to Cloudflare: ' . $this->wp_remote_get_response( 'https://www.cloudflare.com/cdn-cgi/trace' ) . PHP_EOL;
55
  $html .= 'wp_remote_get to Google Analytics API: ' . $this->wp_remote_get_response( 'https://www.google-analytics.com/debug/collect' ) . PHP_EOL;
@@ -68,7 +65,7 @@ class Debug_Info
68
  $html .= 'Logged in user display name: ' . $current_user->display_name . PHP_EOL;
69
  $html .= 'hook_suffix: ' . $hook_suffix . PHP_EOL;
70
  $html .= PHP_EOL;
71
- $html .= 'Hosting provider: ' . $this->environment_check->get_hosting_provider() . PHP_EOL;
72
  $html .= PHP_EOL . '## WooCommerce ##' . PHP_EOL . PHP_EOL;
73
  $html .= 'Default currency: ' . get_woocommerce_currency() . PHP_EOL;
74
  $html .= 'Shop URL: ' . get_home_url() . PHP_EOL;
@@ -78,15 +75,15 @@ class Debug_Info
78
  $order_received_page_url = wc_get_checkout_url() . ltrim( wc_get_endpoint_url( 'order-received' ), '/' );
79
  $html .= 'is_order_received_page(): ' . $order_received_page_url . PHP_EOL . PHP_EOL;
80
 
81
- if ( $this->environment_check->does_one_order_exist() ) {
82
- $last_order_url = $this->environment_check->get_last_order_url();
83
  $html .= 'Last order URL: ' . $last_order_url . '&nodedupe' . PHP_EOL;
84
- $last_order_url_contains_order_received_page_url = ( strpos( $this->environment_check->get_last_order_url(), $order_received_page_url ) !== false ? 'yes' : 'no' );
85
  $html .= 'Order received page uses proper is_order_received() url: ' . $last_order_url_contains_order_received_page_url . PHP_EOL;
86
- $purchase_confirmation_page_redirect = ( $this->environment_check->does_url_redirect( $last_order_url ) ? 'yes' : 'no' );
87
- $html .= $this->show_warning( $this->environment_check->does_url_redirect( $last_order_url ) ) . 'Purchase confirmation page redirect: ' . $purchase_confirmation_page_redirect . PHP_EOL;
88
- if ( $this->environment_check->does_url_redirect( $last_order_url ) ) {
89
- $html .= 'Redirect URL: ' . $this->environment_check->get_redirect_url( $this->environment_check->get_last_order_url() ) . PHP_EOL;
90
  }
91
  }
92
 
@@ -95,29 +92,33 @@ class Debug_Info
95
  $html .= 'Available payment gateways: ' . PHP_EOL;
96
  $pg = $this->get_payment_gateways();
97
  // Get the longest string from the array of payment gateways
98
- $len_id = 0;
99
- $len_method_title = 0;
100
- $len_class_name = 0;
101
  foreach ( $pg as $p ) {
102
  $len_id = max( strlen( $p->id ), $len_id );
103
  $len_method_title = max( strlen( $p->method_title ), $len_method_title );
104
  $len_class_name = max( strlen( get_class( $p ) ), $len_class_name );
105
  }
 
 
 
 
 
 
 
 
106
  foreach ( $this->get_payment_gateways() as $gateway ) {
107
  $html .= ' ';
108
- $html .= 'id: ' . str_pad( $gateway->id, $len_id ) . ', ';
109
- $html .= 'method_title: ' . str_pad( $gateway->method_title, $len_method_title ) . ', ';
110
- $html .= 'class: ' . str_pad( get_class( $gateway ), $len_class_name );
111
  $html .= PHP_EOL;
112
  }
113
  $html .= PHP_EOL . 'Purchase confirmation page reached per gateway (active and inactive):' . PHP_EOL;
114
  $html .= $this->get_gateway_analysis_for_debug_info();
115
  $html .= PHP_EOL . 'Purchase confirmation page reached per gateway only active and weighted by frequency:' . PHP_EOL;
116
  $html .= $this->get_gateway_analysis_weighted_for_debug_info();
117
- // if (wpm_fs()->is__premium_only()) {
118
- // $html .= PHP_EOL . 'Automatic Conversion Recovery (ACR):' . PHP_EOL;
119
- // $html .= $this->get_acr_analysis_for_debug_info__premium_only();
120
- // }
121
  // Time it took to run the payment gateway analysis
122
  if ( get_transient( 'pmw_tracking_accuracy_analysis_time' ) ) {
123
  $html .= PHP_EOL . 'Time to generate the payment gateway analysis: ' . round( get_transient( 'pmw_tracking_accuracy_analysis_time' ), 2 ) . ' seconds' . PHP_EOL;
@@ -160,7 +161,7 @@ class Debug_Info
160
 
161
  // TODO maybe add all active plugins
162
  $html .= PHP_EOL;
163
- $html .= PHP_EOL . '## freemius ##' . PHP_EOL . PHP_EOL;
164
  $html .= 'api.freemius.com : ' . $this->try_connect_to_server( 'api.freemius.com' ) . PHP_EOL;
165
  $html .= 'wp.freemius.com : ' . $this->try_connect_to_server( 'wp.freemius.com' ) . PHP_EOL;
166
  $html .= PHP_EOL . PHP_EOL . '### End of Information ###';
@@ -169,7 +170,6 @@ class Debug_Info
169
 
170
  public function run_tracking_accuracy_analysis()
171
  {
172
- error_log( 'run_tracking_accuracy_analysis' );
173
  // Start measuring time
174
  $start_time = microtime( true );
175
  $this->generate_pmw_tracked_payment_methods();
@@ -296,6 +296,7 @@ class Debug_Info
296
  $orders = $this->get_pmw_tracked_orders( $limit );
297
  // Analyse all orders
298
  foreach ( $orders as $order ) {
 
299
 
300
  if ( in_array( $order->get_payment_method(), $gateway_ids ) ) {
301
  $analysis[$order->get_payment_method()]['order_count_total']++;
@@ -438,6 +439,7 @@ class Debug_Info
438
  'on-hold',
439
  'pending'
440
  ],
 
441
  'meta_key' => '_wpm_process_through_wpm',
442
  'meta_compare' => '=',
443
  'meta_value' => true,
@@ -498,6 +500,7 @@ class Debug_Info
498
  'on-hold',
499
  'pending'
500
  ],
 
501
  'meta_key' => '_wpm_process_through_wpm',
502
  'meta_value' => true,
503
  'meta_compare' => '=',
@@ -517,6 +520,7 @@ class Debug_Info
517
  'on-hold',
518
  'pending'
519
  ],
 
520
  'meta_key' => '_wpm_process_through_wpm',
521
  'meta_value' => true,
522
  'meta_compare' => '=',
2
 
3
  namespace WCPM\Classes\Admin;
4
 
 
5
  use WCPM\Classes\Pixels\Trait_Shop ;
6
  use WP_Query ;
7
 
13
  class Debug_Info
14
  {
15
  use Trait_Shop ;
 
16
  protected $options ;
17
+ private static $instance ;
18
+ public static function get_instance()
19
  {
20
+ if ( is_null( self::$instance ) ) {
21
+ self::$instance = new self();
22
+ }
23
+ return self::$instance;
24
+ }
25
+
26
+ private function __construct()
27
+ {
28
+ $this->options = get_option( WPM_DB_OPTIONS_NAME );
 
 
29
  }
30
 
31
  public function get_debug_info()
45
  $html .= 'WordPress version: ' . $wp_version . PHP_EOL;
46
  $html .= 'WooCommerce version: ' . $woocommerce->version . PHP_EOL;
47
  $html .= 'PHP version: ' . phpversion() . PHP_EOL;
48
+ $html .= 'WordPress memory limit: ' . Environment_Check::get_instance()->get_wp_memory_limit() . PHP_EOL;
49
+ $curl_available = ( Environment_Check::get_instance()->is_curl_active() ? 'yes' : 'no' );
50
  $html .= 'curl available: ' . $curl_available . PHP_EOL;
51
  $html .= 'wp_remote_get to Cloudflare: ' . $this->wp_remote_get_response( 'https://www.cloudflare.com/cdn-cgi/trace' ) . PHP_EOL;
52
  $html .= 'wp_remote_get to Google Analytics API: ' . $this->wp_remote_get_response( 'https://www.google-analytics.com/debug/collect' ) . PHP_EOL;
65
  $html .= 'Logged in user display name: ' . $current_user->display_name . PHP_EOL;
66
  $html .= 'hook_suffix: ' . $hook_suffix . PHP_EOL;
67
  $html .= PHP_EOL;
68
+ $html .= 'Hosting provider: ' . Environment_Check::get_instance()->get_hosting_provider() . PHP_EOL;
69
  $html .= PHP_EOL . '## WooCommerce ##' . PHP_EOL . PHP_EOL;
70
  $html .= 'Default currency: ' . get_woocommerce_currency() . PHP_EOL;
71
  $html .= 'Shop URL: ' . get_home_url() . PHP_EOL;
75
  $order_received_page_url = wc_get_checkout_url() . ltrim( wc_get_endpoint_url( 'order-received' ), '/' );
76
  $html .= 'is_order_received_page(): ' . $order_received_page_url . PHP_EOL . PHP_EOL;
77
 
78
+ if ( Environment_Check::get_instance()->does_one_order_exist() ) {
79
+ $last_order_url = Environment_Check::get_instance()->get_last_order_url();
80
  $html .= 'Last order URL: ' . $last_order_url . '&nodedupe' . PHP_EOL;
81
+ $last_order_url_contains_order_received_page_url = ( strpos( Environment_Check::get_instance()->get_last_order_url(), $order_received_page_url ) !== false ? 'yes' : 'no' );
82
  $html .= 'Order received page uses proper is_order_received() url: ' . $last_order_url_contains_order_received_page_url . PHP_EOL;
83
+ $purchase_confirmation_page_redirect = ( Environment_Check::get_instance()->does_url_redirect( $last_order_url ) ? 'yes' : 'no' );
84
+ $html .= $this->show_warning( Environment_Check::get_instance()->does_url_redirect( $last_order_url ) ) . 'Purchase confirmation page redirect: ' . $purchase_confirmation_page_redirect . PHP_EOL;
85
+ if ( Environment_Check::get_instance()->does_url_redirect( $last_order_url ) ) {
86
+ $html .= 'Redirect URL: ' . Environment_Check::get_instance()->get_redirect_url( Environment_Check::get_instance()->get_last_order_url() ) . PHP_EOL;
87
  }
88
  }
89
 
92
  $html .= 'Available payment gateways: ' . PHP_EOL;
93
  $pg = $this->get_payment_gateways();
94
  // Get the longest string from the array of payment gateways
95
+ $len_id = strlen( 'id:' );
96
+ $len_method_title = strlen( 'method_title:' );
97
+ $len_class_name = strlen( 'class_name:' );
98
  foreach ( $pg as $p ) {
99
  $len_id = max( strlen( $p->id ), $len_id );
100
  $len_method_title = max( strlen( $p->method_title ), $len_method_title );
101
  $len_class_name = max( strlen( get_class( $p ) ), $len_class_name );
102
  }
103
+ $len_id = $len_id + 2;
104
+ $len_method_title = $len_method_title + 2;
105
+ $len_class_name = $len_class_name + 2;
106
+ $html .= ' ';
107
+ $html .= str_pad( 'id:', $len_id );
108
+ $html .= str_pad( 'method_title:', $len_method_title );
109
+ $html .= str_pad( 'class:', $len_class_name );
110
+ $html .= PHP_EOL;
111
  foreach ( $this->get_payment_gateways() as $gateway ) {
112
  $html .= ' ';
113
+ $html .= str_pad( $gateway->id, $len_id );
114
+ $html .= str_pad( $gateway->method_title, $len_method_title );
115
+ $html .= str_pad( get_class( $gateway ), $len_class_name );
116
  $html .= PHP_EOL;
117
  }
118
  $html .= PHP_EOL . 'Purchase confirmation page reached per gateway (active and inactive):' . PHP_EOL;
119
  $html .= $this->get_gateway_analysis_for_debug_info();
120
  $html .= PHP_EOL . 'Purchase confirmation page reached per gateway only active and weighted by frequency:' . PHP_EOL;
121
  $html .= $this->get_gateway_analysis_weighted_for_debug_info();
 
 
 
 
122
  // Time it took to run the payment gateway analysis
123
  if ( get_transient( 'pmw_tracking_accuracy_analysis_time' ) ) {
124
  $html .= PHP_EOL . 'Time to generate the payment gateway analysis: ' . round( get_transient( 'pmw_tracking_accuracy_analysis_time' ), 2 ) . ' seconds' . PHP_EOL;
161
 
162
  // TODO maybe add all active plugins
163
  $html .= PHP_EOL;
164
+ $html .= PHP_EOL . '## Freemius ##' . PHP_EOL . PHP_EOL;
165
  $html .= 'api.freemius.com : ' . $this->try_connect_to_server( 'api.freemius.com' ) . PHP_EOL;
166
  $html .= 'wp.freemius.com : ' . $this->try_connect_to_server( 'wp.freemius.com' ) . PHP_EOL;
167
  $html .= PHP_EOL . PHP_EOL . '### End of Information ###';
170
 
171
  public function run_tracking_accuracy_analysis()
172
  {
 
173
  // Start measuring time
174
  $start_time = microtime( true );
175
  $this->generate_pmw_tracked_payment_methods();
296
  $orders = $this->get_pmw_tracked_orders( $limit );
297
  // Analyse all orders
298
  foreach ( $orders as $order ) {
299
+ // Only analyse orders that were paid with one of the active payment gateways
300
 
301
  if ( in_array( $order->get_payment_method(), $gateway_ids ) ) {
302
  $analysis[$order->get_payment_method()]['order_count_total']++;
439
  'on-hold',
440
  'pending'
441
  ],
442
+ 'created_via' => 'checkout',
443
  'meta_key' => '_wpm_process_through_wpm',
444
  'meta_compare' => '=',
445
  'meta_value' => true,
500
  'on-hold',
501
  'pending'
502
  ],
503
+ 'created_via' => 'checkout',
504
  'meta_key' => '_wpm_process_through_wpm',
505
  'meta_value' => true,
506
  'meta_compare' => '=',
520
  'on-hold',
521
  'pending'
522
  ],
523
+ 'created_via' => 'checkout',
524
  'meta_key' => '_wpm_process_through_wpm',
525
  'meta_value' => true,
526
  'meta_compare' => '=',
classes/admin/class-documentation.php CHANGED
@@ -8,17 +8,17 @@ if (!defined('ABSPATH')) {
8
 
9
  class Documentation {
10
 
11
- public function get_link( $key = 'default' ) {
12
 
13
  // Change to wcm through gulp for the wcm distribution
14
  $doc_host_url = 'default';
15
 
16
- $url = $this->get_documentation_host() . $this->get_documentation_path($key, $doc_host_url);
17
 
18
- return $this->add_utm_parameters($url, $key);
19
  }
20
 
21
- private function add_utm_parameters( $url, $key ) {
22
 
23
  $url_parts = explode('#', $url);
24
 
@@ -31,11 +31,11 @@ class Documentation {
31
  return $url;
32
  }
33
 
34
- private function get_documentation_host() {
35
  return 'https://sweetcode.com';
36
  }
37
 
38
- private function get_documentation_path( $key = 'default', $doc_host_url = 'default' ) {
39
 
40
  $documentation_links = [
41
  'default' => [
8
 
9
  class Documentation {
10
 
11
+ public static function get_link( $key = 'default' ) {
12
 
13
  // Change to wcm through gulp for the wcm distribution
14
  $doc_host_url = 'default';
15
 
16
+ $url = self::get_documentation_host() . self::get_documentation_path($key, $doc_host_url);
17
 
18
+ return self::add_utm_parameters($url, $key);
19
  }
20
 
21
+ private static function add_utm_parameters( $url, $key ) {
22
 
23
  $url_parts = explode('#', $url);
24
 
31
  return $url;
32
  }
33
 
34
+ private static function get_documentation_host() {
35
  return 'https://sweetcode.com';
36
  }
37
 
38
+ private static function get_documentation_path( $key = 'default', $doc_host_url = 'default' ) {
39
 
40
  $documentation_links = [
41
  'default' => [
classes/admin/class-environment-check.php CHANGED
@@ -12,19 +12,24 @@ class Environment_Check {
12
 
13
  use Trait_Shop;
14
 
15
- public $notifications;
16
- private $documentation;
17
  private $order_redirect = null;
18
  private $options;
 
19
 
20
- public function __construct( $options ) {
21
 
22
- if (is_admin()) {
 
 
 
 
 
 
 
23
 
24
- $this->options = $options;
25
 
26
- $this->notifications = new Notifications();
27
- $this->documentation = new Documentation();
28
 
29
  // add_action('admin_enqueue_scripts', [$this, 'environment_check_script']);
30
  add_action('wp_ajax_environment_check_handler', [$this, 'ajax_environment_check_handler']);
@@ -76,7 +81,7 @@ class Environment_Check {
76
 
77
  if (is_array($saved_notifications) && !array_key_exists($plugin['slug'], $saved_notifications) && is_plugin_active($plugin['file_location'])) {
78
 
79
- ( new Notifications() )->plugin_is_incompatible(
80
  $plugin['name'],
81
  $plugin['version'],
82
  $plugin['slug'],
@@ -94,7 +99,7 @@ class Environment_Check {
94
  'slug' => 'wc-custom-thank-you',
95
  'file_location' => 'wc-custom-thank-you/woocommerce-custom-thankyou.php',
96
  'link' => 'https://wordpress.org/plugins/wc-custom-thank-you/',
97
- 'wpm_doc_link' => $this->documentation->get_link('custom_thank_you'),
98
  'version' => '1.2.1',
99
  ]
100
  ];
@@ -347,26 +352,6 @@ class Environment_Check {
347
  }
348
  }
349
 
350
- public function check_active_off_site_payment_gateways() {
351
-
352
- if ($this->is_not_allowed_notification_page(get_current_screen()->id)) {
353
- return;
354
- }
355
-
356
- $wpm_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
357
-
358
- if (
359
- !is_array($wpm_notifications) ||
360
- !array_key_exists('dismiss_paypal_standard_warning', $wpm_notifications) ||
361
- true !== $wpm_notifications['dismiss_paypal_standard_warning']
362
- ) {
363
- if ($this->is_paypal_standard_active()) {
364
- // run off-site payment gateway warning
365
- ( new Notifications() )->paypal_standard_active_warning();
366
- }
367
- }
368
- }
369
-
370
  public function get_active_payment_gateways_after_plugins_loaded() {
371
  error_log(print_r($this->get_active_payment_gateways(), true));
372
  }
@@ -442,45 +427,14 @@ class Environment_Check {
442
  wp_die(); // this is required to terminate immediately and return a proper response
443
  }
444
 
445
- private function check_wp_rocket_js_concatenation() {
446
- $wpm_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
447
-
448
- if ($this->is_wp_rocket_active() && ( !is_array($wpm_notifications) || false == $wpm_notifications['dismiss_wp_rocket_javascript_concatenation_error'] )) {
449
-
450
- $wp_rocket_settings = get_option('wp_rocket_settings');
451
-
452
- if ($wp_rocket_settings) {
453
- if (true == $wp_rocket_settings['minify_concatenate_js']) {
454
- // display warning
455
- ( new Notifications() )->wp_rocket_js_concatenation_error();
456
- }
457
- }
458
- }
459
- }
460
-
461
- private function check_litespeed_js_inline_after_dom() {
462
- $wpm_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
463
-
464
- if ($this->is_litespeed_active() && ( !is_array($wpm_notifications) || false == $wpm_notifications['dismiss_litespeed_inline_js_dom_ready_error'] )) {
465
-
466
- $litespeed_js_inline_defer_settings = get_option('litespeed.conf.optm-js_inline_defer');
467
-
468
- if ($litespeed_js_inline_defer_settings) {
469
- if (1 == $litespeed_js_inline_defer_settings) {
470
- // display warning
471
- ( new Notifications() )->litespeed_js_defer_error();
472
- }
473
- }
474
- }
475
- }
476
-
477
  public function is_paypal_standard_active() {
478
  $woocommerce_paypal_settings = get_option('woocommerce_paypal_settings');
479
 
480
  if (
481
  !is_bool($woocommerce_paypal_settings) &&
482
  array_key_exists('enabled', $woocommerce_paypal_settings) &&
483
- 'yes' === $woocommerce_paypal_settings['enabled']) {
 
484
  return true;
485
  } else {
486
  return false;
@@ -614,14 +568,21 @@ class Environment_Check {
614
  }
615
 
616
  public function is_woo_discount_rules_active() {
617
- if (
618
  is_plugin_active('woo-discount-rules/woo-discount-rules.php') ||
619
- is_plugin_active('woo-discount-rules-pro/woo-discount-rules-pro.php')
620
- ) {
621
- return true;
622
- } else {
623
- return false;
624
- }
 
 
 
 
 
 
 
625
  }
626
 
627
  public function is_wp_optimize_active() {
@@ -939,7 +900,13 @@ class Environment_Check {
939
  }
940
  }
941
 
942
- public function disable_third_party_js_optimization() {
 
 
 
 
 
 
943
 
944
  /**
945
  * SiteGround Optimizer
@@ -984,6 +951,145 @@ class Environment_Check {
984
  return $excludes;
985
  });
986
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
987
  }
988
 
989
  public function enable_compatibility_mode() {
@@ -1351,7 +1457,6 @@ class Environment_Check {
1351
  $memory_limit = wc_let_to_num($memory_limit);
1352
 
1353
  $actual_memory_limit = wc_let_to_num(WP_MEMORY_LIMIT);
1354
-
1355
  }
1356
 
1357
  public function is_memory_limit_higher_than( $memory_limit ) {
@@ -1366,4 +1471,16 @@ class Environment_Check {
1366
  return false;
1367
  }
1368
  }
 
 
 
 
 
 
 
 
 
 
 
 
1369
  }
12
 
13
  use Trait_Shop;
14
 
 
 
15
  private $order_redirect = null;
16
  private $options;
17
+ private $wpm_ist_order_received_page;
18
 
19
+ private static $instance;
20
 
21
+ public static function get_instance() {
22
+ if (is_null(self::$instance)) {
23
+ self::$instance = new self();
24
+ }
25
+ return self::$instance;
26
+ }
27
+
28
+ private function __construct() {
29
 
30
+ $this->options = get_option(WPM_DB_OPTIONS_NAME);
31
 
32
+ if (is_admin()) {
 
33
 
34
  // add_action('admin_enqueue_scripts', [$this, 'environment_check_script']);
35
  add_action('wp_ajax_environment_check_handler', [$this, 'ajax_environment_check_handler']);
81
 
82
  if (is_array($saved_notifications) && !array_key_exists($plugin['slug'], $saved_notifications) && is_plugin_active($plugin['file_location'])) {
83
 
84
+ Notifications::plugin_is_incompatible(
85
  $plugin['name'],
86
  $plugin['version'],
87
  $plugin['slug'],
99
  'slug' => 'wc-custom-thank-you',
100
  'file_location' => 'wc-custom-thank-you/woocommerce-custom-thankyou.php',
101
  'link' => 'https://wordpress.org/plugins/wc-custom-thank-you/',
102
+ 'wpm_doc_link' => Documentation::get_link('custom_thank_you'),
103
  'version' => '1.2.1',
104
  ]
105
  ];
352
  }
353
  }
354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  public function get_active_payment_gateways_after_plugins_loaded() {
356
  error_log(print_r($this->get_active_payment_gateways(), true));
357
  }
427
  wp_die(); // this is required to terminate immediately and return a proper response
428
  }
429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
  public function is_paypal_standard_active() {
431
  $woocommerce_paypal_settings = get_option('woocommerce_paypal_settings');
432
 
433
  if (
434
  !is_bool($woocommerce_paypal_settings) &&
435
  array_key_exists('enabled', $woocommerce_paypal_settings) &&
436
+ 'yes' === $woocommerce_paypal_settings['enabled']
437
+ ) {
438
  return true;
439
  } else {
440
  return false;
568
  }
569
 
570
  public function is_woo_discount_rules_active() {
571
+ return
572
  is_plugin_active('woo-discount-rules/woo-discount-rules.php') ||
573
+ is_plugin_active('woo-discount-rules-pro/woo-discount-rules-pro.php');
574
+ }
575
+
576
+ public function is_woofunnels_active() {
577
+ return
578
+ is_plugin_active('funnel-builder/funnel-builder.php') ||
579
+ is_plugin_active('funnel-builder-pro/funnel-builder-pro.php');
580
+ }
581
+
582
+ public function is_woo_product_feed_active() {
583
+ return
584
+ is_plugin_active('woo-product-feed-pro/woocommerce-sea.php') ||
585
+ is_plugin_active('woo-product-feed-elite/woocommerce-sea.php');
586
  }
587
 
588
  public function is_wp_optimize_active() {
900
  }
901
  }
902
 
903
+ public function disable_third_party_plugin_features() {
904
+
905
+ /**
906
+ * WooCommerce Google Ads Dynamic Remarketing
907
+ */
908
+
909
+ $this->disable_woocommerce_google_ads_dynamic_remarketing();
910
 
911
  /**
912
  * SiteGround Optimizer
951
  return $excludes;
952
  });
953
  }
954
+
955
+ /**
956
+ * WooFunnels
957
+ */
958
+
959
+ if ($this->is_woofunnels_active()) {
960
+ // We need to check so early that is_admin() is not working yet
961
+ $_server = filter_input_array(INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
962
+
963
+ // Only run if REQUEST_URI is available and only if we are not on the WooFunnels settings page
964
+ if (isset($_server['REQUEST_URI']) && strpos($_server['REQUEST_URI'], 'woofunnels-admin') === false) {
965
+ $this->disable_woofunnels_features();
966
+ }
967
+ }
968
+
969
+ /**
970
+ * Woo Product Feed
971
+ */
972
+
973
+ if ($this->is_woo_product_feed_active()) {
974
+ // We need to check so early that is_admin() is not working yet
975
+ $_server = filter_input_array(INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
976
+
977
+ // Only run if REQUEST_URI is available and only if we are not on the Woo Product Feed settings page
978
+ if (
979
+ isset($_server['REQUEST_URI']) &&
980
+ (
981
+ strpos($_server['REQUEST_URI'], 'woosea_manage_settings') === false &&
982
+ strpos($_server['REQUEST_URI'], 'woosea_elite_manage_settings') === false
983
+ )
984
+ ) {
985
+ $this->disable_woo_product_feed_features();
986
+ }
987
+ }
988
+
989
+ /**
990
+ * Google Listing and Ads
991
+ *
992
+ * Disable gtag if Google Ads is active in PMW
993
+ */
994
+
995
+ if ($this->is_pmw_google_ads_active()) {
996
+ add_filter('woocommerce_gla_disable_gtag_tracking', '__return_true');
997
+ }
998
+ }
999
+
1000
+ private function disable_woocommerce_google_ads_dynamic_remarketing() {
1001
+
1002
+ if ($this->is_pmw_google_ads_dynamic_remarketing_active()) {
1003
+ // make sure to disable the WGDR plugin in case we use dynamic remarketing in this plugin
1004
+ add_filter('wgdr_third_party_cookie_prevention', '__return_true');
1005
+ }
1006
+ }
1007
+
1008
+ private function disable_woofunnels_features() {
1009
+
1010
+ add_filter('option_bwf_gen_config', function ( $options ) {
1011
+
1012
+ // Disable Facebook events output
1013
+ if ($this->is_pmw_facebook_active()) {
1014
+ $options['fb_pixel_key'] = '';
1015
+ }
1016
+
1017
+ // Disable Google Analytics events output
1018
+ if ($this->is_pmw_google_analytics_active()) {
1019
+ $options['ga_key'] = '';
1020
+ }
1021
+
1022
+ // Disable Google Ads events output
1023
+ if ($this->is_pmw_google_ads_active()) {
1024
+ $options['gad_key'] = '';
1025
+ }
1026
+
1027
+ // Disable Pinterest events output
1028
+ if ($this->is_pmw_pinterest_active()) {
1029
+ $options['pint_key'] = '';
1030
+ }
1031
+
1032
+ // Disable TikTok events output
1033
+ if ($this->is_pmw_tiktok_active()) {
1034
+ $options['tiktok_pixel'] = '';
1035
+ }
1036
+
1037
+ // Disable Snapchat events output
1038
+ if ($this->is_pmw_snapchat_active()) {
1039
+ $options['snapchat_pixel'] = '';
1040
+ }
1041
+
1042
+ return $options;
1043
+ });
1044
+ }
1045
+
1046
+ private function disable_woo_product_feed_features() {
1047
+
1048
+ // Disable Facebook events output
1049
+ if ($this->is_pmw_facebook_active()) {
1050
+ add_filter('option_add_facebook_pixel', function () {
1051
+ return 'no';
1052
+ });
1053
+
1054
+ add_filter('option_add_facebook_capi', function () {
1055
+ return 'no';
1056
+ });
1057
+ }
1058
+
1059
+ // Disable Google Ads events output
1060
+ if ($this->is_pmw_google_ads_active()) {
1061
+ add_filter('option_add_remarketing', function () {
1062
+ return 'no';
1063
+ });
1064
+ }
1065
+ }
1066
+
1067
+ public function is_pmw_tiktok_active() {
1068
+ return $this->options['tiktok']['pixel_id'];
1069
+ }
1070
+
1071
+ public function is_pmw_google_ads_active() {
1072
+ return $this->options['google']['ads']['conversion_id'];
1073
+ }
1074
+
1075
+ public function is_pmw_google_analytics_active() {
1076
+ return $this->options['google']['analytics']['universal']['property_id'] || $this->options['google']['analytics']['ga4']['measurement_id'];
1077
+ }
1078
+
1079
+ public function is_pmw_snapchat_active() {
1080
+ return $this->options['snapchat']['pixel_id'];
1081
+ }
1082
+
1083
+ public function is_pmw_pinterest_active() {
1084
+ return $this->options['pinterest']['pixel_id'];
1085
+ }
1086
+
1087
+ public function is_pmw_facebook_active() {
1088
+ return $this->options['facebook']['pixel_id'];
1089
+ }
1090
+
1091
+ public function is_pmw_google_ads_dynamic_remarketing_active() {
1092
+ return !empty($this->options['google']['ads']['dynamic_remarketing']);
1093
  }
1094
 
1095
  public function enable_compatibility_mode() {
1457
  $memory_limit = wc_let_to_num($memory_limit);
1458
 
1459
  $actual_memory_limit = wc_let_to_num(WP_MEMORY_LIMIT);
 
1460
  }
1461
 
1462
  public function is_memory_limit_higher_than( $memory_limit ) {
1471
  return false;
1472
  }
1473
  }
1474
+
1475
+ public function wpm_is_order_received_page() {
1476
+
1477
+ // Get cached value
1478
+ if (is_bool($this->wpm_ist_order_received_page)) {
1479
+ return $this->wpm_ist_order_received_page;
1480
+ }
1481
+
1482
+ // Get value from WC or db
1483
+ $this->wpm_ist_order_received_page = is_order_received_page() || $this->is_valid_order_key_in_url();
1484
+ return $this->wpm_ist_order_received_page;
1485
+ }
1486
  }
classes/admin/class-notification-handlers.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WCPM\Classes\Admin;
4
+
5
+ if (!defined('ABSPATH')) {
6
+ exit; // Exit if accessed directly
7
+ }
8
+
9
+ class Notification_Handlers {
10
+
11
+ private static $instance;
12
+
13
+ public static function get_instance() {
14
+ if (is_null(self::$instance)) {
15
+ self::$instance = new self();
16
+ }
17
+ return self::$instance;
18
+ }
19
+
20
+ private function __construct() {
21
+
22
+ add_action('admin_enqueue_scripts', [$this, 'enqueue_admin_notification_scripts']);
23
+
24
+ add_action('wp_ajax_dismiss_pmw_payment_gateway_notification', [$this, 'dismiss_payment_gateway_notification']);
25
+ }
26
+
27
+ public function enqueue_admin_notification_scripts() {
28
+
29
+ // error_log('enqueue_admin_notification_scripts');
30
+ wp_enqueue_script(
31
+ 'pmw-admin-notifications',
32
+ WPM_PLUGIN_DIR_PATH . '/js/admin/notifications.js',
33
+ ['jquery'],
34
+ WPM_CURRENT_VERSION,
35
+ true
36
+ );
37
+ }
38
+
39
+ public function dismiss_payment_gateway_notification() {
40
+
41
+ error_log('dismiss_payment_gateway_notification');
42
+
43
+
44
+ // update_option('my-acf-notice-dismissed', 1);
45
+ }
46
+ }
classes/admin/class-notifications.php CHANGED
@@ -7,97 +7,79 @@ if (!defined('ABSPATH')) {
7
  }
8
 
9
  class Notifications {
10
- private $documentation;
11
 
12
- public function __construct() {
13
- $this->documentation = new Documentation();
 
14
  }
15
 
16
- public function wp_rocket_js_concatenation_error() {
17
- ?>
18
- <div class="notice notice-error wpm-wp-rocket-js-concatenation-error">
19
- <p style="color:red;font-weight: bold">
20
- <span>
21
- <?php
22
- esc_html_e('We detected that the WP Rocket JavaScript concatenation function has been enabled. This function has been proven to be incompatible with the WooCommerce Google Ads Conversion Tracking plugin.
23
- Please turn off the WP Rocket JavaScript concatenation.', 'woocommerce-google-adwords-conversion-tracking-tag')
24
- ?>
25
- </span><br>
26
- </p>
27
- <p>
28
- <a href="<?php echo esc_url($this->documentation->get_link('wp-rocket-javascript-concatenation')); ?>"
29
- target="_blank"
30
- style="font-weight: bold;color:blue">
31
- <?php esc_html_e('Learn more', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
32
- </a>
33
- </p>
34
- <p>
35
- <a href="<?php echo esc_url(get_admin_url() . 'options-general.php?page=wprocket#file_optimization'); ?>"
36
- style="font-weight: bold;color:blue">
37
- <?php esc_html_e('Open the WP Rocket JavaScript concatenation settings', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
38
- </a>
39
- </p>
40
- <p>
41
- <div id="wpm-wp-rocket-js-concatenation-disable" class="button button-primary">
42
- <?php esc_html_e('Click here to simply turn off the WP Rocket JavaScript concatenation', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
43
- </div>
44
- </p>
45
- <p>
46
- <div id="wpm-dismiss-wp-rocket-js-concatenation-error" class="button" style="white-space:normal;">
47
- <?php esc_html_e('Click here to dismiss this warning forever.', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
48
- <br>
49
- <?php esc_html_e('And I swear that I triple checked that the visitor and conversion tracking is working just fine and that I won\'t ask for support as long as the WP Rocket JavaScript concatenation is turned on!', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
50
 
51
- </div>
52
- </p>
 
53
 
54
- </div>
55
- <?php
 
 
 
 
 
56
  }
57
 
58
- public function litespeed_js_defer_error() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  ?>
60
- <div class="notice notice-error wpm-litespeed-inline-js-dom-ready-error">
61
- <p style="color:red;font-weight: bold">
62
- <span>
63
- <?php
64
- esc_html_e('We detected that the LiteSpeed Inline JavaScript After DOM Ready function has been enabled. This function has been proven to be incompatible with the WooCommerce Google Ads Conversion Tracking plugin.
65
- Please turn off the LiteSpeed Inline JavaScript After DOM Ready function.', 'woocommerce-google-adwords-conversion-tracking-tag')
66
- ?>
67
- </span><br>
68
- </p>
69
  <p>
70
- <a href="<?php echo esc_url($this->documentation->get_link('litespeed-cache-inline-javascript-after-dom-ready')); ?>"
71
- target="_blank"
72
- style="font-weight: bold;color:blue">
73
- <?php esc_html_e('Learn more', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
74
- </a>
75
  </p>
76
- <p>
77
- <a href="<?php echo esc_url(get_admin_url() . 'admin.php?page=litespeed-page_optm'); ?>"
78
- style="font-weight: bold;color:blue">
79
- <?php esc_html_e('Open the LiteSpeed Inline JavaScript After DOM Ready settings', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
80
- </a>
81
- </p>
82
- <p>
83
- <div id="wpm-litespeed-inline-js-dom-ready-disable" class="button button-primary">
84
- <?php esc_html_e('Click here to simply turn off LiteSpeed Inline JavaScript After DOM Ready', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
85
- </div>
86
- </p>
87
- <p>
88
- <div id="wpm-dismiss-litespeed-inline-js-dom-ready-error" class="button" style="white-space:normal;">
89
- <?php esc_html_e('Click here to dismiss this warning forever.', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
90
- <br>
91
- <?php esc_html_e('And I swear that I triple checked that the visitor and conversion tracking is working just fine and that I won\'t ask for support as long as the LiteSpeed Inline JavaScript After DOM Ready is turned on!', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
92
-
93
- </div>
94
- </p>
95
-
96
  </div>
97
  <?php
 
98
  }
99
 
100
- public function paypal_standard_active_warning() {
101
  ?>
102
  <div class="notice notice-error wpm-paypal-standard-error">
103
  <p style="color:red;">
@@ -109,7 +91,7 @@ class Notifications {
109
  </span><br>
110
  </p>
111
  <p>
112
- <a href="<?php echo esc_url($this->documentation->get_link('payment-gateways')); ?>"
113
  target="_blank">
114
  <?php esc_html_e('Learn more', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
115
  </a>
@@ -126,7 +108,7 @@ class Notifications {
126
  <?php esc_html_e('Click here to dismiss this warning forever', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
127
  </div>
128
  <div style="white-space:normal; bottom:0; right: 0; margin-bottom: 0; margin-right: 5px;align-self: flex-end;">
129
- <a href="<?php echo esc_url(( new Documentation() )->get_link('the_dismiss_button_doesnt_work_why')); ?>"
130
  target="_blank">
131
  <?php esc_html_e('If the dismiss button is not working, here\'s why >>', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
132
  </a>
@@ -137,7 +119,7 @@ class Notifications {
137
  <?php
138
  }
139
 
140
- public function plugin_is_incompatible( $name, $version, $slug, $link = '', $wpm_doc_link = '' ) {
141
  ?>
142
  <div class="notice notice-error <?php echo esc_js($slug); ?>-incompatible-plugin-error">
143
  <p>
@@ -175,7 +157,7 @@ class Notifications {
175
  <?php esc_html_e('Click here to dismiss this warning forever', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
176
  </div>
177
  <div style="white-space:normal; bottom:0; right: 0; margin-bottom: 0; margin-right: 5px;align-self: flex-end;">
178
- <a href="<?php echo esc_url(( new Documentation() )->get_link('the_dismiss_button_doesnt_work_why')); ?>"
179
  target="_blank">
180
  <?php esc_html_e('If the dismiss button is not working, here\'s why >>', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
181
  </a>
7
  }
8
 
9
  class Notifications {
 
10
 
11
+ // Only show the notification on the dashboard and on the PMW settings page
12
+ private static function is_not_allowed_to_show_pmw_notification() {
13
+ return !self::is_allowed_to_show_pmw_notification();
14
  }
15
 
16
+ private static function is_allowed_to_show_pmw_notification() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ if (!self::can_current_page_show_pmw_notification()) {
19
+ return false;
20
+ }
21
 
22
+ // Only show the notifications to admins and shop managers
23
+ $user = wp_get_current_user();
24
+ if (!in_array('administrator', $user->roles, true) && !in_array('shop_manager', $user->roles, true)) {
25
+ return false;
26
+ }
27
+
28
+ return true;
29
  }
30
 
31
+ public static function can_current_page_show_pmw_notification() {
32
+
33
+ global $hook_suffix;
34
+
35
+ $allowed_pages = ['page_wpm', 'index.php', 'dashboard'];
36
+
37
+ /**
38
+ * We can't use in_array because woocommerce_page_wpm
39
+ * is malformed on certain installs, but the substring
40
+ * page_wpm is fine. So we need to search for partial
41
+ * matches.
42
+ * */
43
+ foreach ($allowed_pages as $allowed_page) {
44
+ if (strpos($hook_suffix, $allowed_page) !== false) {
45
+ return true;
46
+ }
47
+ }
48
+
49
+ return false;
50
+ }
51
+
52
+ public static function payment_gateway_accuracy_warning() {
53
+
54
+ // Only show the warning on the dashboard and on the PMW settings page
55
+ if (self::is_not_allowed_to_show_pmw_notification()) {
56
+ return;
57
+ }
58
+
59
+ $pg_report = get_transient('pmw_tracking_accuracy_analysis_weighted');
60
+
61
+ // Only run if the weighted payment gateway analysis has been created
62
+ if (!$pg_report) {
63
+ return;
64
+ }
65
+
66
+ // Only run if the total of the PGs is in status warning
67
+
68
+ // Only run if the user has not dismissed the notification for a specific time period
69
+
70
  ?>
71
+ <div class="pmw-payment-gateway-notification notice notice-error is-dismissible">
 
 
 
 
 
 
 
 
72
  <p>
73
+ <?php
74
+ esc_html_e('Payment Gateway Accuracy Warning', 'woocommerce-google-adwords-conversion-tracking-tag');
75
+ ?>
 
 
76
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  </div>
78
  <?php
79
+
80
  }
81
 
82
+ public static function paypal_standard_active_warning() {
83
  ?>
84
  <div class="notice notice-error wpm-paypal-standard-error">
85
  <p style="color:red;">
91
  </span><br>
92
  </p>
93
  <p>
94
+ <a href="<?php echo esc_url(Documentation::get_link('payment-gateways')); ?>"
95
  target="_blank">
96
  <?php esc_html_e('Learn more', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
97
  </a>
108
  <?php esc_html_e('Click here to dismiss this warning forever', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
109
  </div>
110
  <div style="white-space:normal; bottom:0; right: 0; margin-bottom: 0; margin-right: 5px;align-self: flex-end;">
111
+ <a href="<?php echo esc_url(Documentation::get_link('the_dismiss_button_doesnt_work_why')); ?>"
112
  target="_blank">
113
  <?php esc_html_e('If the dismiss button is not working, here\'s why >>', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
114
  </a>
119
  <?php
120
  }
121
 
122
+ public static function plugin_is_incompatible( $name, $version, $slug, $link = '', $wpm_doc_link = '' ) {
123
  ?>
124
  <div class="notice notice-error <?php echo esc_js($slug); ?>-incompatible-plugin-error">
125
  <p>
157
  <?php esc_html_e('Click here to dismiss this warning forever', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
158
  </div>
159
  <div style="white-space:normal; bottom:0; right: 0; margin-bottom: 0; margin-right: 5px;align-self: flex-end;">
160
+ <a href="<?php echo esc_url(Documentation::get_link('the_dismiss_button_doesnt_work_why')); ?>"
161
  target="_blank">
162
  <?php esc_html_e('If the dismiss button is not working, here\'s why >>', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
163
  </a>
classes/admin/class-order-columns.php ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WCPM\Classes\Admin;
4
+
5
+ use WCPM\Classes\Helpers;
6
+
7
+ if (!defined('ABSPATH')) {
8
+ exit; // Exit if accessed directly
9
+ }
10
+
11
+ // https://stackoverflow.com/a/36453587/4688612
12
+ class Order_Columns {
13
+
14
+ private static $instance;
15
+
16
+ public static function get_instance() {
17
+ if (is_null(self::$instance)) {
18
+ self::$instance = new self();
19
+ }
20
+ return self::$instance;
21
+ }
22
+
23
+ private function __construct() {
24
+
25
+ add_filter('manage_edit-shop_order_columns', [$this, 'custom_shop_order_column'], 20);
26
+ add_action('manage_shop_order_posts_custom_column', [$this, 'custom_orders_list_column_content'], 20, 2);
27
+ add_action('pre_get_posts', [$this, 'view_pixels_not_fired'], 1000, 1);
28
+
29
+ }
30
+
31
+ public function view_pixels_not_fired( $query ) {
32
+ global $pagenow;
33
+
34
+ // Only run on WooCommerce orders page
35
+ if (!( isset($query->query_vars['post_type']) && 'shop_order' === $query->query_vars['post_type'] && ( 'edit.php' === $pagenow ) )) {
36
+ return;
37
+ }
38
+
39
+ if (!$query->is_main_query()) {
40
+ return;
41
+ }
42
+
43
+ $_get = Helpers::get_input_vars_sanitized(INPUT_GET);
44
+ $pmw_pixels_not_fired_query = isset($_get['pmw-pixels-not-fired']);
45
+
46
+
47
+ // Set additional filters for the view
48
+ if ($pmw_pixels_not_fired_query) {
49
+
50
+ $query->set('post_status', ['wc-completed', 'wc-processing', 'wc-on-hold', 'wc-pending']);
51
+
52
+ // Only search order not older than 30 days
53
+ $query->set('date_query', [
54
+ 'column' => 'post_date',
55
+ 'after' => '30 days ago',
56
+ ]);
57
+
58
+ $query->query_vars['meta_query'][] = [
59
+ 'key' => '_wpm_process_through_wpm',
60
+ 'compare' => 'EXISTS',
61
+ ];
62
+
63
+ $query->query_vars['meta_query'][] = [
64
+ 'key' => '_wpm_conversion_pixel_fired',
65
+ 'compare' => 'NOT EXISTS',
66
+ ];
67
+
68
+ $query->query_vars['meta_query'][] = [
69
+ 'key' => '_created_via',
70
+ 'value' => 'checkout',
71
+ 'compare' => '=',
72
+ ];
73
+ }
74
+
75
+ // Count all post_meta where _wpm_process_through_wpm exists and _wpm_conversion_pixel_fired is missing and not older than 30d
76
+ $count_missing_pixel_fires = count(get_posts([
77
+ 'fields' => 'ids',
78
+ 'post_type' => 'shop_order',
79
+ 'post_status' => ['wc-completed', 'wc-processing', 'wc-on-hold', 'wc-pending'],
80
+ 'posts_per_page' => -1,
81
+ 'date_query' => [
82
+ 'column' => 'post_date',
83
+ 'after' => '30 days ago',
84
+ ],
85
+ 'meta_query' => [
86
+ [
87
+ 'key' => '_wpm_process_through_wpm',
88
+ 'compare' => 'EXISTS',
89
+ ],
90
+ [
91
+ 'key' => '_wpm_conversion_pixel_fired',
92
+ 'compare' => 'NOT EXISTS'
93
+ ],
94
+ [
95
+ 'key' => '_created_via',
96
+ 'value' => 'checkout',
97
+ 'compare' => '=',
98
+ ],
99
+ ]
100
+ ]));
101
+
102
+
103
+ // Add new view with all orders where the conversion pixels have not been fired
104
+ add_filter('views_edit-shop_order', function ( $views ) use ( $count_missing_pixel_fires, $pmw_pixels_not_fired_query ) {
105
+
106
+ $query_string = admin_url('edit.php?post_type=shop_order');
107
+ $query_string = add_query_arg('pmw-pixels-not-fired', '', $query_string);
108
+
109
+ $class = $pmw_pixels_not_fired_query ? 'current' : '';
110
+
111
+ $views['pmw-pixels-not-fired'] = sprintf('<a href="%s" class="%s">%s <span class="count">(%s)</span></a>', $query_string, $class, esc_html__('PMW pixels not fired - 30d', 'woocommerce-google-adwords-conversion-tracking-tag'), $count_missing_pixel_fires);
112
+
113
+ return $views;
114
+
115
+ });
116
+ }
117
+
118
+ public function pmw_order_table_styles() {
119
+ wp_add_inline_style(
120
+ 'woocommerce_admin_styles',
121
+ 'table.wp-list-table .column-pmw-monitored{ width: 9%; } table.wp-list-table .column-pmw-pixels-fired{ width: 9px; }'
122
+ );
123
+ }
124
+
125
+ public function custom_shop_order_column( $columns ) {
126
+
127
+ function get_list_order_parameter( $list_order ) {
128
+ if (is_null($list_order)) {
129
+ return '';
130
+ }
131
+
132
+ return '&amp;order=' . $list_order;
133
+ }
134
+
135
+ $_get = Helpers::get_input_vars_sanitized(INPUT_GET);
136
+
137
+
138
+ if (!isset($_get['order'])) {
139
+ $list_order = 'dsc';
140
+ } elseif ('dsc' === $_get['order']) {
141
+ $list_order = 'asc';
142
+ } else {
143
+ $list_order = null;
144
+ }
145
+
146
+ $reordered_columns = [];
147
+
148
+ // Inserting columns to a specific location
149
+ foreach ($columns as $key => $column) {
150
+ $reordered_columns[$key] = $column;
151
+ if ('order_total' === $key) {
152
+ // $reordered_columns['pmw-monitored'] = '<a href="' . get_site_url() . '/wp-admin/edit.php?post_type=shop_order&amp;orderby=pmw-monitored' . get_list_order_parameter($list_order) . '"><span class="widefat column-order_date column-pmw-monitored { width: 9%; } pmw-monitored-head tips" data-tip="PMW monitored">PMW monitored</span></a>';
153
+ $pixels_fired_text = esc_html__('PMW pixels fired', 'woocommerce-google-adwords-conversion-tracking-tag');
154
+ $reordered_columns['pmw-pixels-fired'] = '<span class="pmw-monitored-head tips" data-tip="' . $pixels_fired_text . '">' . $pixels_fired_text . '</span>';
155
+ }
156
+ }
157
+
158
+ return $reordered_columns;
159
+ }
160
+
161
+
162
+ public function custom_orders_list_column_content( $column, $post_id ) {
163
+ switch ($column) {
164
+ case 'pmw-monitored':
165
+ // Get custom post meta data
166
+ if (get_post_meta($post_id, '_wpm_process_through_wpm', true)) {
167
+ $text = __('PMW monitored order', 'woocommerce-google-adwords-conversion-tracking-tag');
168
+ ?>
169
+ <div aria-hidden="true" title="<?php esc_html_e($text); ?>" class="pmw-monitored-icon good">
170
+ <span class="screen-reader-text"><?php esc_html_e($text); ?></span>
171
+ </div>
172
+ <?php
173
+ } else {
174
+ $text = __('Not monitored by PMW', 'woocommerce-google-adwords-conversion-tracking-tag');
175
+ ?>
176
+ <div aria-hidden="true" title="<?php esc_html_e($text); ?>" class="pmw-monitored-icon bad">
177
+ <span class="screen-reader-text"><?php esc_html_e($text); ?></span>
178
+ </div>
179
+ <?php
180
+ }
181
+
182
+ break;
183
+
184
+ case 'pmw-pixels-fired':
185
+ // Get custom post meta data
186
+ if (!get_post_meta($post_id, '_wpm_process_through_wpm', true)) {
187
+ $text = __('Order not tracked by PMW', 'woocommerce-google-adwords-conversion-tracking-tag');
188
+ ?>
189
+ <div aria-hidden="true" title="<?php esc_html_e($text); ?>" class="pmw-monitored-icon none">
190
+ <span class="screen-reader-text"><?php esc_html_e($text); ?></span>
191
+ </div>
192
+ <?php
193
+
194
+ } elseif (get_post_meta($post_id, '_created_via', true) !== 'checkout') {
195
+ $text = __('This order was created by a shop manager. Only orders created by customers are analysed.', 'woocommerce-google-adwords-conversion-tracking-tag');
196
+ ?>
197
+ <div aria-hidden="true" title="<?php esc_html_e($text); ?>" class="pmw-monitored-icon none">
198
+ <span class="screen-reader-text"><?php esc_html_e($text); ?></span>
199
+ </div>
200
+ <?php
201
+
202
+ } elseif (get_post_meta($post_id, '_wpm_conversion_pixel_fired', true)) {
203
+ $text = __('Conversion pixels fired', 'woocommerce-google-adwords-conversion-tracking-tag');
204
+ ?>
205
+ <div aria-hidden="true" title="<?php esc_html_e($text); ?>" class="pmw-monitored-icon good">
206
+ <span class="screen-reader-text"><?php esc_html_e($text); ?></span>
207
+ </div>
208
+ <?php
209
+
210
+ } else {
211
+ $text = __('Conversion pixels not fired yet', 'woocommerce-google-adwords-conversion-tracking-tag');
212
+ ?>
213
+ <div aria-hidden="true" title="<?php esc_html_e($text); ?>" class="pmw-monitored-icon bad">
214
+ <span class="screen-reader-text"><?php esc_html_e($text); ?></span>
215
+ </div>
216
+ <?php
217
+ }
218
+
219
+ break;
220
+ }
221
+ }
222
+ }
classes/admin/class-validations.php CHANGED
@@ -4,7 +4,7 @@ namespace WCPM\Classes\Admin;
4
 
5
  class Validations {
6
 
7
- public function validate_imported_options( $options ) {
8
 
9
  // if (is_array($options) && array_key_exists('db_version', $options)) {
10
  if (isset($options['db_version'])) {
@@ -14,158 +14,158 @@ class Validations {
14
  }
15
  }
16
 
17
- public function is_gads_conversion_id( $string ) {
18
  if (empty($string)) {
19
  return true;
20
  }
21
 
22
  $re = '/^\d{8,11}$/m';
23
 
24
- return $this->validate_with_regex($re, $string);
25
  }
26
 
27
- public function is_hotjar_site_id( $string ) {
28
  if (empty($string)) {
29
  return true;
30
  }
31
 
32
  $re = '/^\d{6,9}$/m';
33
 
34
- return $this->validate_with_regex($re, $string);
35
  }
36
 
37
- public function is_facebook_capi_token( $string ) {
38
  if (empty($string)) {
39
  return true;
40
  }
41
 
42
  $re = '/^[a-zA-Z\d_-]{150,250}$/m';
43
 
44
- return $this->validate_with_regex($re, $string);
45
  }
46
 
47
- public function is_gads_conversion_label( $string ) {
48
  if (empty($string)) {
49
  return true;
50
  }
51
 
52
  $re = '/^[-a-zA-Z_0-9]{17,20}$/m';
53
 
54
- return $this->validate_with_regex($re, $string);
55
  }
56
 
57
- public function is_gads_aw_merchant_id( $string ) {
58
  if (empty($string)) {
59
  return true;
60
  }
61
 
62
  $re = '/^\d{6,12}$/m';
63
 
64
- return $this->validate_with_regex($re, $string);
65
  }
66
 
67
- public function is_google_optimize_measurement_id( $string ) {
68
  if (empty($string)) {
69
  return true;
70
  }
71
 
72
  $re = '/^(GTM|OPT)-[A-Z0-9]{6,8}$/m';
73
 
74
- return $this->validate_with_regex($re, $string);
75
  }
76
 
77
- public function is_google_analytics_universal_property_id( $string ) {
78
  if (empty($string)) {
79
  return true;
80
  }
81
 
82
  $re = '/^UA-\d{6,10}-\d{1,2}$/m';
83
 
84
- return $this->validate_with_regex($re, $string);
85
  }
86
 
87
- public function is_google_analytics_4_measurement_id( $string ) {
88
  if (empty($string)) {
89
  return true;
90
  }
91
 
92
  $re = '/^G-[A-Z0-9]{10,12}$/m';
93
 
94
- return $this->validate_with_regex($re, $string);
95
  }
96
 
97
 
98
- public function is_google_analytics_4_api_secret( $string ) {
99
  if (empty($string)) {
100
  return true;
101
  }
102
 
103
  $re = '/^[a-zA-Z\d_-]{18,26}$/m';
104
 
105
- return $this->validate_with_regex($re, $string);
106
  }
107
 
108
- public function is_facebook_pixel_id( $string ) {
109
  if (empty($string)) {
110
  return true;
111
  }
112
 
113
  $re = '/^\d{14,16}$/m';
114
 
115
- return $this->validate_with_regex($re, $string);
116
  }
117
 
118
- public function is_bing_uet_tag_id( $string ) {
119
  if (empty($string)) {
120
  return true;
121
  }
122
 
123
  $re = '/^\d{7,9}$/m';
124
 
125
- return $this->validate_with_regex($re, $string);
126
  }
127
 
128
- public function is_twitter_pixel_id( $string ) {
129
  if (empty($string)) {
130
  return true;
131
  }
132
 
133
  $re = '/^[a-z0-9]{5,7}$/m';
134
 
135
- return $this->validate_with_regex($re, $string);
136
  }
137
 
138
- public function is_pinterest_pixel_id( $string ) {
139
  if (empty($string)) {
140
  return true;
141
  }
142
 
143
  $re = '/^\d{13}$/m';
144
 
145
- return $this->validate_with_regex($re, $string);
146
  }
147
 
148
- public function is_snapchat_pixel_id( $string ) {
149
  if (empty($string)) {
150
  return true;
151
  }
152
 
153
  $re = '/^[a-z0-9\-]*$/m';
154
 
155
- return $this->validate_with_regex($re, $string);
156
  }
157
 
158
- public function is_tiktok_pixel_id( $string ) {
159
  if (empty($string)) {
160
  return true;
161
  }
162
 
163
  $re = '/^[A-Z0-9]{20,20}$/m';
164
 
165
- return $this->validate_with_regex($re, $string);
166
  }
167
 
168
- public function validate_with_regex( $re, $string ) {
169
  preg_match_all($re, $string, $matches, PREG_SET_ORDER, 0);
170
 
171
  if (isset($matches[0])) {
4
 
5
  class Validations {
6
 
7
+ public static function validate_imported_options( $options ) {
8
 
9
  // if (is_array($options) && array_key_exists('db_version', $options)) {
10
  if (isset($options['db_version'])) {
14
  }
15
  }
16
 
17
+ public static function is_gads_conversion_id( $string ) {
18
  if (empty($string)) {
19
  return true;
20
  }
21
 
22
  $re = '/^\d{8,11}$/m';
23
 
24
+ return self::validate_with_regex($re, $string);
25
  }
26
 
27
+ public static function is_hotjar_site_id( $string ) {
28
  if (empty($string)) {
29
  return true;
30
  }
31
 
32
  $re = '/^\d{6,9}$/m';
33
 
34
+ return self::validate_with_regex($re, $string);
35
  }
36
 
37
+ public static function is_facebook_capi_token( $string ) {
38
  if (empty($string)) {
39
  return true;
40
  }
41
 
42
  $re = '/^[a-zA-Z\d_-]{150,250}$/m';
43
 
44
+ return self::validate_with_regex($re, $string);
45
  }
46
 
47
+ public static function is_gads_conversion_label( $string ) {
48
  if (empty($string)) {
49
  return true;
50
  }
51
 
52
  $re = '/^[-a-zA-Z_0-9]{17,20}$/m';
53
 
54
+ return self::validate_with_regex($re, $string);
55
  }
56
 
57
+ public static function is_gads_aw_merchant_id( $string ) {
58
  if (empty($string)) {
59
  return true;
60
  }
61
 
62
  $re = '/^\d{6,12}$/m';
63
 
64
+ return self::validate_with_regex($re, $string);
65
  }
66
 
67
+ public static function is_google_optimize_measurement_id( $string ) {
68
  if (empty($string)) {
69
  return true;
70
  }
71
 
72
  $re = '/^(GTM|OPT)-[A-Z0-9]{6,8}$/m';
73
 
74
+ return self::validate_with_regex($re, $string);
75
  }
76
 
77
+ public static function is_google_analytics_universal_property_id( $string ) {
78
  if (empty($string)) {
79
  return true;
80
  }
81
 
82
  $re = '/^UA-\d{6,10}-\d{1,2}$/m';
83
 
84
+ return self::validate_with_regex($re, $string);
85
  }
86
 
87
+ public static function is_google_analytics_4_measurement_id( $string ) {
88
  if (empty($string)) {
89
  return true;
90
  }
91
 
92
  $re = '/^G-[A-Z0-9]{10,12}$/m';
93
 
94
+ return self::validate_with_regex($re, $string);
95
  }
96
 
97
 
98
+ public static function is_google_analytics_4_api_secret( $string ) {
99
  if (empty($string)) {
100
  return true;
101
  }
102
 
103
  $re = '/^[a-zA-Z\d_-]{18,26}$/m';
104
 
105
+ return self::validate_with_regex($re, $string);
106
  }
107
 
108
+ public static function is_facebook_pixel_id( $string ) {
109
  if (empty($string)) {
110
  return true;
111
  }
112
 
113
  $re = '/^\d{14,16}$/m';
114
 
115
+ return self::validate_with_regex($re, $string);
116
  }
117
 
118
+ public static function is_bing_uet_tag_id( $string ) {
119
  if (empty($string)) {
120
  return true;
121
  }
122
 
123
  $re = '/^\d{7,9}$/m';
124
 
125
+ return self::validate_with_regex($re, $string);
126
  }
127
 
128
+ public static function is_twitter_pixel_id( $string ) {
129
  if (empty($string)) {
130
  return true;
131
  }
132
 
133
  $re = '/^[a-z0-9]{5,7}$/m';
134
 
135
+ return self::validate_with_regex($re, $string);
136
  }
137
 
138
+ public static function is_pinterest_pixel_id( $string ) {
139
  if (empty($string)) {
140
  return true;
141
  }
142
 
143
  $re = '/^\d{13}$/m';
144
 
145
+ return self::validate_with_regex($re, $string);
146
  }
147
 
148
+ public static function is_snapchat_pixel_id( $string ) {
149
  if (empty($string)) {
150
  return true;
151
  }
152
 
153
  $re = '/^[a-z0-9\-]*$/m';
154
 
155
+ return self::validate_with_regex($re, $string);
156
  }
157
 
158
+ public static function is_tiktok_pixel_id( $string ) {
159
  if (empty($string)) {
160
  return true;
161
  }
162
 
163
  $re = '/^[A-Z0-9]{20,20}$/m';
164
 
165
+ return self::validate_with_regex($re, $string);
166
  }
167
 
168
+ public static function validate_with_regex( $re, $string ) {
169
  preg_match_all($re, $string, $matches, PREG_SET_ORDER, 0);
170
 
171
  if (isset($matches[0])) {
classes/class-db-upgrade.php CHANGED
@@ -11,28 +11,28 @@ if (!defined('ABSPATH')) {
11
 
12
  class Db_Upgrade {
13
 
14
- protected $options_backup_name = 'wgact_options_backup';
15
 
16
- public function run_options_db_upgrade() {
17
 
18
- $mysql_db_version = $this->get_mysql_db_version();
19
 
20
  // determine version and run version specific upgrade function
21
  // check if options db version zero by looking if the old entries are still there.
22
  if ('0' === $mysql_db_version) {
23
- $this->up_from_zero_to_1();
24
  }
25
 
26
  if (version_compare(2, $mysql_db_version, '>')) {
27
- $this->up_from_1_to_2();
28
  }
29
 
30
  if (version_compare(3, $mysql_db_version, '>')) {
31
- $this->up_from_2_to_3();
32
  }
33
  }
34
 
35
- protected function up_from_2_to_3() {
36
 
37
  $options_old = get_option(WPM_DB_OPTIONS_NAME);
38
 
@@ -58,7 +58,7 @@ class Db_Upgrade {
58
  update_option(WPM_DB_OPTIONS_NAME, $options_new);
59
  }
60
 
61
- protected function up_from_1_to_2() {
62
 
63
  $options_old = get_option(WPM_DB_OPTIONS_NAME);
64
 
@@ -82,7 +82,7 @@ class Db_Upgrade {
82
  update_option(WPM_DB_OPTIONS_NAME, $options_new);
83
  }
84
 
85
- protected function get_mysql_db_version() {
86
 
87
  $options = get_option(WPM_DB_OPTIONS_NAME);
88
 
@@ -97,15 +97,15 @@ class Db_Upgrade {
97
  }
98
  }
99
 
100
- public function up_from_zero_to_1() {
101
 
102
  $option_name_old_1 = 'wgact_plugin_options_1';
103
  $option_name_old_2 = 'wgact_plugin_options_2';
104
 
105
  // db version place options into new array
106
  $options = [
107
- 'conversion_id' => $this->get_option_value_v1($option_name_old_1),
108
- 'conversion_label' => $this->get_option_value_v1($option_name_old_2),
109
  ];
110
 
111
  // store new option array into the options table
@@ -118,7 +118,7 @@ class Db_Upgrade {
118
  delete_option($option_name_old_2);
119
  }
120
 
121
- protected function get_option_value_v1( $option_name ) {
122
 
123
  if (!get_option($option_name)) {
124
  $option_value = '';
@@ -130,12 +130,12 @@ class Db_Upgrade {
130
  return $option_value;
131
  }
132
 
133
- protected function backup_options( $options, $version ) {
134
 
135
- $options_backup = get_option($this->options_backup_name);
136
 
137
  $options_backup[$version] = $options;
138
 
139
- update_option($this->options_backup_name, $options_backup);
140
  }
141
  }
11
 
12
  class Db_Upgrade {
13
 
14
+ private static $options_backup_name = 'wgact_options_backup';
15
 
16
+ public static function run_options_db_upgrade() {
17
 
18
+ $mysql_db_version = self::get_mysql_db_version();
19
 
20
  // determine version and run version specific upgrade function
21
  // check if options db version zero by looking if the old entries are still there.
22
  if ('0' === $mysql_db_version) {
23
+ self::up_from_zero_to_1();
24
  }
25
 
26
  if (version_compare(2, $mysql_db_version, '>')) {
27
+ self::up_from_1_to_2();
28
  }
29
 
30
  if (version_compare(3, $mysql_db_version, '>')) {
31
+ self::up_from_2_to_3();
32
  }
33
  }
34
 
35
+ private function up_from_2_to_3() {
36
 
37
  $options_old = get_option(WPM_DB_OPTIONS_NAME);
38
 
58
  update_option(WPM_DB_OPTIONS_NAME, $options_new);
59
  }
60
 
61
+ private function up_from_1_to_2() {
62
 
63
  $options_old = get_option(WPM_DB_OPTIONS_NAME);
64
 
82
  update_option(WPM_DB_OPTIONS_NAME, $options_new);
83
  }
84
 
85
+ private static function get_mysql_db_version() {
86
 
87
  $options = get_option(WPM_DB_OPTIONS_NAME);
88
 
97
  }
98
  }
99
 
100
+ private static function up_from_zero_to_1() {
101
 
102
  $option_name_old_1 = 'wgact_plugin_options_1';
103
  $option_name_old_2 = 'wgact_plugin_options_2';
104
 
105
  // db version place options into new array
106
  $options = [
107
+ 'conversion_id' => self::get_option_value_v1($option_name_old_1),
108
+ 'conversion_label' => self::get_option_value_v1($option_name_old_2),
109
  ];
110
 
111
  // store new option array into the options table
118
  delete_option($option_name_old_2);
119
  }
120
 
121
+ protected static function get_option_value_v1( $option_name ) {
122
 
123
  if (!get_option($option_name)) {
124
  $option_value = '';
130
  return $option_value;
131
  }
132
 
133
+ protected static function backup_options( $options, $version ) {
134
 
135
+ $options_backup = get_option(self::$options_backup_name);
136
 
137
  $options_backup[$version] = $options;
138
 
139
+ update_option(self::$options_backup_name, $options_backup);
140
  }
141
  }
classes/class-default-options.php CHANGED
@@ -33,7 +33,6 @@ class Default_Options {
33
  'measurement_id' => '',
34
  'api_secret' => '',
35
  ],
36
- 'eec' => 0,
37
  'link_attribution' => 0,
38
  ],
39
  'optimize' => [
33
  'measurement_id' => '',
34
  'api_secret' => '',
35
  ],
 
36
  'link_attribution' => 0,
37
  ],
38
  'optimize' => [
classes/class-deprecated-filters.php CHANGED
@@ -12,7 +12,7 @@ if (!defined('ABSPATH')) {
12
 
13
  class Deprecated_Filters {
14
 
15
- public function load_deprecated_filters() {
16
 
17
  // Nothing in here yet
18
 
12
 
13
  class Deprecated_Filters {
14
 
15
+ public static function load_deprecated_filters() {
16
 
17
  // Nothing in here yet
18
 
classes/class-helpers.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WCPM\Classes;
4
+
5
+ if (!defined('ABSPATH')) {
6
+ exit; // Exit if accessed directly
7
+ }
8
+
9
+ class Helpers {
10
+
11
+ public static function get_input_vars_sanitized( $type ) {
12
+
13
+ $input_vars = filter_input_array($type, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
14
+
15
+ return self::generic_sanitization($input_vars);
16
+ }
17
+
18
+ private static function generic_sanitization( $input ) {
19
+
20
+ if (is_array($input)) {
21
+ array_walk_recursive($input, function ( &$value, $key ) {
22
+ $value = filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
23
+ });
24
+ } else {
25
+ $input = filter_var($input, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
26
+ }
27
+
28
+ return $input;
29
+ }
30
+
31
+ public static function is_allowed_notification_page( $page ) {
32
+
33
+ $allowed_pages = ['page_wpm', 'index.php', 'dashboard'];
34
+
35
+ foreach ($allowed_pages as $allowed_page) {
36
+ if (strpos($page, $allowed_page) !== false) {
37
+ return true;
38
+ }
39
+ }
40
+
41
+ return false;
42
+ }
43
+ }
classes/pixels/class-pixel-manager.php CHANGED
@@ -25,24 +25,27 @@ class Pixel_Manager
25
  protected $cart ;
26
  protected $facebook_active ;
27
  protected $google_active ;
28
- protected $position = 1 ;
29
  protected $google ;
30
  protected $microdata_product_id ;
31
- protected $environment_check ;
32
- protected $validations ;
33
  protected $is_order_received_page = false ;
34
  protected $order ;
35
- public function __construct( $options )
 
 
 
 
 
 
 
 
 
36
  {
37
- /**
38
- * Set up constants
39
- */
40
- $this->is_order_received_page = $this->wpm_is_order_received_page();
41
  /**
42
  * Initialize options
43
  */
44
- $this->options = $options;
45
- $this->options_obj = $this->get_options_object( $options );
46
  if ( function_exists( 'get_woocommerce_currency' ) ) {
47
  $this->options_obj->shop->currency = get_woocommerce_currency();
48
  }
@@ -56,14 +59,12 @@ class Pixel_Manager
56
  /**
57
  * Initialize additional classes
58
  */
59
- $this->environment_check = new Environment_Check( $this->options );
60
- $this->validations = new Validations();
61
  /**
62
  * Inject WPM snippets in head
63
  */
64
  add_action( 'wp_head', function () {
65
  $this->inject_wpm_opening();
66
- if ( wpm_fs()->is__premium_only() && $this->environment_check->is_woocommerce_active() && is_product() ) {
67
  if ( $this->options_obj->facebook->microdata ) {
68
  $this->microdata_product_id = ( new Facebook_Microdata( $this->options ) )->inject_schema( wc_get_product( get_the_ID() ) );
69
  }
@@ -120,7 +121,7 @@ class Pixel_Manager
120
  */
121
  new Shortcodes( $this->options );
122
 
123
- if ( $this->environment_check->is_woocommerce_active() ) {
124
  add_action(
125
  'woocommerce_after_shop_loop_item',
126
  [ $this, 'action_woocommerce_after_shop_loop_item' ],
@@ -159,15 +160,6 @@ class Pixel_Manager
159
  * Register REST API endpoints
160
  */
161
  add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
162
- // if (wpm_fs()->is__premium_only()) {
163
- //
164
- // /**
165
- // * Automatic Conversion Recovery
166
- // */
167
- // add_action('woocommerce_checkout_order_created', [$this, 'acr_set_cookie__premium_only']);
168
- // add_action('wp_ajax_get_acr_order_data_ajax', [$this, 'get_acr_order_data_ajax__premium_only']);
169
- // add_action('wp_ajax_nopriv_get_acr_order_data_ajax', [$this, 'get_acr_order_data_ajax__premium_only']);
170
- // }
171
  }
172
 
173
  protected function pmw_get_current_order()
@@ -181,7 +173,7 @@ class Pixel_Manager
181
 
182
  public function register_rest_routes()
183
  {
184
- register_rest_route( 'pmw/v1', '/test/post/', [
185
  'methods' => 'POST',
186
  'callback' => function () {
187
  wp_send_json_success();
@@ -190,7 +182,7 @@ class Pixel_Manager
190
  return true;
191
  },
192
  ] );
193
- register_rest_route( 'pmw/v1', '/test/get/', [
194
  'methods' => 'GET',
195
  'callback' => function () {
196
  wp_send_json_success();
@@ -320,7 +312,7 @@ class Pixel_Manager
320
  public function run_background_processes()
321
  {
322
 
323
- if ( wpm_fs()->is__premium_only() && $this->environment_check->is_woocommerce_active() ) {
324
 
325
  if ( is_cart() || is_checkout() ) {
326
  if ( $this->options_obj->facebook->pixel_id && $this->options_obj->facebook->capi->token ) {
@@ -331,7 +323,7 @@ class Pixel_Manager
331
  }
332
  }
333
 
334
- if ( $this->is_order_received_page ) {
335
  if ( $this->pmw_get_current_order() ) {
336
  ( new Google_Pixel_Manager( $this->options ) )->save_gclid_in_order__premium_only( $this->pmw_get_current_order() );
337
  }
@@ -522,7 +514,7 @@ class Pixel_Manager
522
  * Load remaining settings
523
  */
524
 
525
- if ( $this->environment_check->is_woocommerce_active() ) {
526
  $data = $this->add_order_data( $data );
527
  // $data = array_merge($data, $this->get_order_data());
528
  $data['shop'] = $this->get_shop_data();
@@ -604,7 +596,7 @@ class Pixel_Manager
604
  'debug_mode' => $this->google->is_ga4_debug_mode_active(),
605
  ],
606
  'id_type' => $this->google->get_ga_id_type(),
607
- 'eec' => (bool) $this->options_obj->google->analytics->eec,
608
  ];
609
  }
610
  if ( $this->google->is_google_optimize_active() ) {
@@ -634,7 +626,7 @@ class Pixel_Manager
634
  ],
635
  'capi' => (bool) $this->options_obj->facebook->capi->token,
636
  ];
637
- if ( wpm_fs()->is__premium_only() && $this->environment_check->is_woocommerce_active() && is_product() && $this->options_obj->facebook->microdata ) {
638
  $data['microdata_product_id'] = $this->microdata_product_id;
639
  }
640
  return $data;
@@ -697,7 +689,7 @@ class Pixel_Manager
697
 
698
  protected function add_order_data( $data )
699
  {
700
- if ( !$this->is_order_received_page ) {
701
  return array_merge( $data, [] );
702
  }
703
  if ( !$this->pmw_get_current_order() ) {
@@ -787,7 +779,7 @@ class Pixel_Manager
787
  {
788
  $data = [];
789
 
790
- if ( is_user_logged_in() || $this->is_order_received_page ) {
791
  $current_user = wp_get_current_user();
792
  $data['id'] = get_current_user_id();
793
  // $data['fb_external_id'] = hash('sha256', get_current_user_id());
@@ -867,7 +859,7 @@ class Pixel_Manager
867
  return [];
868
  }
869
 
870
- return [
871
  'product_id' => $product->get_id(),
872
  'name' => $product->get_name(),
873
  'type' => $product->get_type(),
@@ -876,6 +868,13 @@ class Pixel_Manager
876
  'category' => (array) $this->get_product_category( $product_id ),
877
  'variant_name' => ( (string) ($product->get_type() === 'variation') ? $this->get_formatted_variant_text( $product ) : '' ),
878
  ];
 
 
 
 
 
 
 
879
  }
880
 
881
  public function view_item_list_trigger_settings()
@@ -904,7 +903,7 @@ class Pixel_Manager
904
 
905
  public function inject_wpm_closing()
906
  {
907
- if ( $this->environment_check->is_woocommerce_active() && $this->is_order_received_page && $this->pmw_get_current_order() ) {
908
  $this->increase_conversion_count_for_ratings( $this->pmw_get_current_order() );
909
  }
910
  echo PHP_EOL . '<!-- END Pixel Manager for WooCommerce -->' . PHP_EOL ;
@@ -960,6 +959,7 @@ class Pixel_Manager
960
  $data['cart'][$product->get_id()]['name'] = $parent_product->get_name();
961
  $data['cart'][$product->get_id()]['parentId'] = (string) $parent_product->get_id();
962
  $data['cart'][$product->get_id()]['parentId_dyn_r_ids'] = $this->get_dyn_r_ids( $parent_product );
 
963
  } else {
964
  wc_get_logger()->debug( 'Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', [
965
  'source' => 'wpm',
@@ -1039,6 +1039,10 @@ class Pixel_Manager
1039
  {
1040
  update_post_meta( $order_id, '_wpm_conversion_pixel_trigger', $source );
1041
  update_post_meta( $order_id, '_wpm_conversion_pixel_fired', true );
 
 
 
 
1042
  }
1043
 
1044
  public function wpm_front_end_scripts()
@@ -1130,7 +1134,7 @@ class Pixel_Manager
1130
  $data['list_name'] = 'Front Page';
1131
  $data['list_id'] = 'front_page';
1132
  $data['page_type'] = 'front_page';
1133
- } elseif ( $this->is_order_received_page ) {
1134
  $data['list_name'] = 'Order Received Page';
1135
  $data['list_id'] = 'order_received_page';
1136
  $data['page_type'] = 'order_received_page';
@@ -1199,7 +1203,7 @@ class Pixel_Manager
1199
  if ( is_user_logged_in() ) {
1200
  $current_user = wp_get_current_user();
1201
  $email = $current_user->user_email;
1202
- } elseif ( $this->is_order_received_page ) {
1203
  $order = $this->pmw_get_current_order();
1204
 
1205
  if ( $order ) {
@@ -1222,19 +1226,11 @@ class Pixel_Manager
1222
  // https://stackoverflow.com/a/49616130/4688612
1223
  protected function get_order_from_order_received_page()
1224
  {
1225
-
1226
- if ( $this->get_order_from_query_vars() ) {
1227
- return $this->get_order_from_query_vars();
1228
- } else {
1229
-
1230
- if ( $this->get_order_with_url_order_key() ) {
1231
- return $this->get_order_with_url_order_key();
1232
- } else {
1233
- return false;
1234
- }
1235
-
1236
  }
1237
-
1238
  }
1239
 
1240
  }
25
  protected $cart ;
26
  protected $facebook_active ;
27
  protected $google_active ;
 
28
  protected $google ;
29
  protected $microdata_product_id ;
30
+ protected $position = 1 ;
 
31
  protected $is_order_received_page = false ;
32
  protected $order ;
33
+ private static $instance ;
34
+ public static function get_instance()
35
+ {
36
+ if ( is_null( self::$instance ) ) {
37
+ self::$instance = new self();
38
+ }
39
+ return self::$instance;
40
+ }
41
+
42
+ private function __construct()
43
  {
 
 
 
 
44
  /**
45
  * Initialize options
46
  */
47
+ $this->options = get_option( WPM_DB_OPTIONS_NAME );
48
+ $this->options_obj = $this->get_options_object( $this->options );
49
  if ( function_exists( 'get_woocommerce_currency' ) ) {
50
  $this->options_obj->shop->currency = get_woocommerce_currency();
51
  }
59
  /**
60
  * Initialize additional classes
61
  */
 
 
62
  /**
63
  * Inject WPM snippets in head
64
  */
65
  add_action( 'wp_head', function () {
66
  $this->inject_wpm_opening();
67
+ if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() && is_product() ) {
68
  if ( $this->options_obj->facebook->microdata ) {
69
  $this->microdata_product_id = ( new Facebook_Microdata( $this->options ) )->inject_schema( wc_get_product( get_the_ID() ) );
70
  }
121
  */
122
  new Shortcodes( $this->options );
123
 
124
+ if ( Environment_Check::get_instance()->is_woocommerce_active() ) {
125
  add_action(
126
  'woocommerce_after_shop_loop_item',
127
  [ $this, 'action_woocommerce_after_shop_loop_item' ],
160
  * Register REST API endpoints
161
  */
162
  add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
 
 
 
 
 
 
 
 
 
163
  }
164
 
165
  protected function pmw_get_current_order()
173
 
174
  public function register_rest_routes()
175
  {
176
+ register_rest_route( 'pmw/v1', '/test/', [
177
  'methods' => 'POST',
178
  'callback' => function () {
179
  wp_send_json_success();
182
  return true;
183
  },
184
  ] );
185
+ register_rest_route( 'pmw/v1', '/test/', [
186
  'methods' => 'GET',
187
  'callback' => function () {
188
  wp_send_json_success();
312
  public function run_background_processes()
313
  {
314
 
315
+ if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() ) {
316
 
317
  if ( is_cart() || is_checkout() ) {
318
  if ( $this->options_obj->facebook->pixel_id && $this->options_obj->facebook->capi->token ) {
323
  }
324
  }
325
 
326
+ if ( Environment_Check::get_instance()->wpm_is_order_received_page() ) {
327
  if ( $this->pmw_get_current_order() ) {
328
  ( new Google_Pixel_Manager( $this->options ) )->save_gclid_in_order__premium_only( $this->pmw_get_current_order() );
329
  }
514
  * Load remaining settings
515
  */
516
 
517
+ if ( Environment_Check::get_instance()->is_woocommerce_active() ) {
518
  $data = $this->add_order_data( $data );
519
  // $data = array_merge($data, $this->get_order_data());
520
  $data['shop'] = $this->get_shop_data();
596
  'debug_mode' => $this->google->is_ga4_debug_mode_active(),
597
  ],
598
  'id_type' => $this->google->get_ga_id_type(),
599
+ 'eec' => wpm_fs()->is__premium_only() && $this->google->is_google_analytics_active(),
600
  ];
601
  }
602
  if ( $this->google->is_google_optimize_active() ) {
626
  ],
627
  'capi' => (bool) $this->options_obj->facebook->capi->token,
628
  ];
629
+ if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() && is_product() && $this->options_obj->facebook->microdata ) {
630
  $data['microdata_product_id'] = $this->microdata_product_id;
631
  }
632
  return $data;
689
 
690
  protected function add_order_data( $data )
691
  {
692
+ if ( !Environment_Check::get_instance()->wpm_is_order_received_page() ) {
693
  return array_merge( $data, [] );
694
  }
695
  if ( !$this->pmw_get_current_order() ) {
779
  {
780
  $data = [];
781
 
782
+ if ( is_user_logged_in() || Environment_Check::get_instance()->wpm_is_order_received_page() ) {
783
  $current_user = wp_get_current_user();
784
  $data['id'] = get_current_user_id();
785
  // $data['fb_external_id'] = hash('sha256', get_current_user_id());
859
  return [];
860
  }
861
 
862
+ $data = [
863
  'product_id' => $product->get_id(),
864
  'name' => $product->get_name(),
865
  'type' => $product->get_type(),
868
  'category' => (array) $this->get_product_category( $product_id ),
869
  'variant_name' => ( (string) ($product->get_type() === 'variation') ? $this->get_formatted_variant_text( $product ) : '' ),
870
  ];
871
+
872
+ if ( $product->get_type() === 'variation' ) {
873
+ $parent_product = wc_get_product( $product->get_parent_id() );
874
+ $data['brand'] = $this->get_brand_name( $parent_product->get_id() );
875
+ }
876
+
877
+ return $data;
878
  }
879
 
880
  public function view_item_list_trigger_settings()
903
 
904
  public function inject_wpm_closing()
905
  {
906
+ if ( Environment_Check::get_instance()->is_woocommerce_active() && Environment_Check::get_instance()->wpm_is_order_received_page() && $this->pmw_get_current_order() ) {
907
  $this->increase_conversion_count_for_ratings( $this->pmw_get_current_order() );
908
  }
909
  echo PHP_EOL . '<!-- END Pixel Manager for WooCommerce -->' . PHP_EOL ;
959
  $data['cart'][$product->get_id()]['name'] = $parent_product->get_name();
960
  $data['cart'][$product->get_id()]['parentId'] = (string) $parent_product->get_id();
961
  $data['cart'][$product->get_id()]['parentId_dyn_r_ids'] = $this->get_dyn_r_ids( $parent_product );
962
+ $data['cart'][$product->get_id()]['brand'] = $this->get_brand_name( $parent_product->get_id() );
963
  } else {
964
  wc_get_logger()->debug( 'Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', [
965
  'source' => 'wpm',
1039
  {
1040
  update_post_meta( $order_id, '_wpm_conversion_pixel_trigger', $source );
1041
  update_post_meta( $order_id, '_wpm_conversion_pixel_fired', true );
1042
+ // Get the time between when the order was created and now and save it in _wpm_conversion_pixel_fired_delay
1043
+ $order = wc_get_order( $order_id );
1044
+ $time_diff = time() - strtotime( $order->get_date_created() );
1045
+ update_post_meta( $order_id, '_wpm_conversion_pixel_fired_delay', $time_diff );
1046
  }
1047
 
1048
  public function wpm_front_end_scripts()
1134
  $data['list_name'] = 'Front Page';
1135
  $data['list_id'] = 'front_page';
1136
  $data['page_type'] = 'front_page';
1137
+ } elseif ( Environment_Check::get_instance()->wpm_is_order_received_page() ) {
1138
  $data['list_name'] = 'Order Received Page';
1139
  $data['list_id'] = 'order_received_page';
1140
  $data['page_type'] = 'order_received_page';
1203
  if ( is_user_logged_in() ) {
1204
  $current_user = wp_get_current_user();
1205
  $email = $current_user->user_email;
1206
+ } elseif ( Environment_Check::get_instance()->wpm_is_order_received_page() ) {
1207
  $order = $this->pmw_get_current_order();
1208
 
1209
  if ( $order ) {
1226
  // https://stackoverflow.com/a/49616130/4688612
1227
  protected function get_order_from_order_received_page()
1228
  {
1229
+ $order = $this->get_order_from_query_vars();
1230
+ if ( !$order ) {
1231
+ $order = $this->get_order_with_url_order_key();
 
 
 
 
 
 
 
 
1232
  }
1233
+ return $order;
1234
  }
1235
 
1236
  }
classes/pixels/facebook/class-facebook-pixel-manager.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace WCPM\Classes\Pixels\Facebook;
4
 
5
  use WCPM\Classes\Http\Facebook_CAPI ;
 
6
 
7
  if ( !defined( 'ABSPATH' ) ) {
8
  exit;
@@ -11,6 +12,7 @@ if ( !defined( 'ABSPATH' ) ) {
11
 
12
  class Facebook_Pixel_Manager
13
  {
 
14
  protected $facebook_capi ;
15
  public function __construct( $options )
16
  {
@@ -26,9 +28,26 @@ class Facebook_Pixel_Manager
26
  add_action( 'woocommerce_order_status_processing', [ $this, 'facebook_capi_report_purchase__premium_only' ] );
27
  add_action( 'woocommerce_payment_complete', [ $this, 'facebook_capi_report_purchase__premium_only' ] );
28
  add_action( 'woocommerce_order_status_completed', [ $this, 'facebook_capi_report_purchase__premium_only' ] );
29
- // Process subscription renewals
30
- // https://docs.woocommerce.com/document/subscriptions/develop/action-reference/
31
- // add_action('woocommerce_subscription_renewal_payment_complete', [$this, 'facebook_capi_report_subscription_purchase_renewal__premium_only']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  }
3
  namespace WCPM\Classes\Pixels\Facebook;
4
 
5
  use WCPM\Classes\Http\Facebook_CAPI ;
6
+ use WCPM\Classes\Pixels\Trait_Shop ;
7
 
8
  if ( !defined( 'ABSPATH' ) ) {
9
  exit;
12
 
13
  class Facebook_Pixel_Manager
14
  {
15
+ use Trait_Shop ;
16
  protected $facebook_capi ;
17
  public function __construct( $options )
18
  {
28
  add_action( 'woocommerce_order_status_processing', [ $this, 'facebook_capi_report_purchase__premium_only' ] );
29
  add_action( 'woocommerce_payment_complete', [ $this, 'facebook_capi_report_purchase__premium_only' ] );
30
  add_action( 'woocommerce_order_status_completed', [ $this, 'facebook_capi_report_purchase__premium_only' ] );
31
+ /**
32
+ * Process WooCommerce Subscription renewals
33
+ * https://docs.woocommerce.com/document/subscriptions/develop/action-reference/
34
+ * https://github.com/wp-premium/woocommerce-subscriptions/blob/master/includes/class-wc-subscription.php
35
+ * https://developers.facebook.com/docs/marketing-api/conversions-api/subscription-lifecycle-events/
36
+ * */
37
+ add_action( 'woocommerce_subscription_payment_complete', [ $this, 'facebook_capi_report_subscription_payment_complete__premium_only' ] );
38
+ add_action(
39
+ 'woocommerce_subscription_renewal_payment_complete',
40
+ [ $this, 'facebook_capi_report_subscription_purchase_renewal__premium_only' ],
41
+ 10,
42
+ 2
43
+ );
44
+ add_action( 'woocommerce_subscription_status_cancelled', [ $this, 'facebook_capi_report_subscription_cancellation__premium_only' ] );
45
+ add_action(
46
+ 'woocommerce_subscription_status_updated',
47
+ [ $this, 'facebook_capi_report_subscription_reactivation__premium_only' ],
48
+ 10,
49
+ 3
50
+ );
51
  }
52
 
53
  }
classes/pixels/google/class-google.php CHANGED
@@ -4,6 +4,7 @@ namespace WCPM\Classes\Pixels\Google;
4
 
5
  use WCPM\Classes\Admin\Environment_Check ;
6
  use WCPM\Classes\Pixels\Pixel ;
 
7
  use WCPM\Classes\Pixels\Trait_Shop ;
8
 
9
  if ( !defined( 'ABSPATH' ) ) {
@@ -14,6 +15,7 @@ if ( !defined( 'ABSPATH' ) ) {
14
  class Google extends Pixel
15
  {
16
  use Trait_Shop ;
 
17
  private $google_ads_conversion_identifiers ;
18
  public function is_ga4_debug_mode_active()
19
  {
@@ -46,12 +48,19 @@ class Google extends Pixel
46
  }
47
 
48
  $dyn_r_ids = $this->get_dyn_r_ids( $product );
 
 
 
 
 
49
 
50
  if ( $product->get_type() === 'variation' ) {
51
  $parent_product = wc_get_product( $product->get_parent_id() );
52
  $name = $parent_product->get_name();
 
53
  } else {
54
  $name = $product->get_name();
 
55
  }
56
 
57
  return [
@@ -59,11 +68,11 @@ class Google extends Pixel
59
  'name' => (string) $name,
60
  'quantity' => (int) $order_item['quantity'],
61
  'affiliation' => (string) get_bloginfo( 'name' ),
62
- 'brand' => (string) $this->get_brand_name( $product->get_id() ),
63
  'category' => implode( ',', $this->get_product_category( $product->get_id() ) ),
64
  'category_array' => $this->get_product_category( $product->get_id() ),
65
  'variant' => ( (string) ($product->get_type() === 'variation') ? $this->get_formatted_variant_text( $product ) : '' ),
66
- 'price' => (double) $this->wpm_get_order_item_price( $order_item, $product ),
67
  ];
68
  }
69
 
@@ -172,24 +181,22 @@ class Google extends Pixel
172
 
173
  }
174
 
175
- public function wpm_get_order_item_price( $order_item, $product )
176
  {
177
 
178
- if ( ( new Environment_Check( $this->options ) )->is_woo_discount_rules_active() ) {
179
  $item_value = $order_item->get_meta( '_advanced_woo_discount_item_total_discount' );
180
 
181
- if ( is_array( $item_value ) && array_key_exists( 'discounted_price', $item_value ) && 0 != $item_value['discounted_price'] ) {
182
  return (double) $item_value['discounted_price'];
183
- } elseif ( is_array( $item_value ) && array_key_exists( 'initial_price', $item_value ) && 0 != $item_value['initial_price'] ) {
184
  return (double) $item_value['initial_price'];
185
- } else {
186
- return (double) $product->get_price();
187
  }
188
 
189
- } else {
190
- return (double) $product->get_price();
191
  }
192
-
 
 
193
  }
194
 
195
  public function add_categories_to_ga4_product_items( $item_details_array, $categories )
@@ -241,8 +248,9 @@ class Google extends Pixel
241
  );
242
  $this->google_ads_conversion_identifiers = apply_filters( 'wpm_google_ads_conversion_identifiers', $this->google_ads_conversion_identifiers );
243
  $formatted_conversion_ids = [];
 
244
 
245
- if ( ( new Environment_Check( $this->options ) )->is_woocommerce_active() && $this->wpm_is_order_received_page() ) {
246
  foreach ( $this->google_ads_conversion_identifiers as $conversion_id => $conversion_label ) {
247
  $conversion_id = $this->extract_google_ads_id( $conversion_id );
248
  if ( $conversion_id ) {
4
 
5
  use WCPM\Classes\Admin\Environment_Check ;
6
  use WCPM\Classes\Pixels\Pixel ;
7
+ use WCPM\Classes\Pixels\Trait_Product ;
8
  use WCPM\Classes\Pixels\Trait_Shop ;
9
 
10
  if ( !defined( 'ABSPATH' ) ) {
15
  class Google extends Pixel
16
  {
17
  use Trait_Shop ;
18
+ use Trait_Product ;
19
  private $google_ads_conversion_identifiers ;
20
  public function is_ga4_debug_mode_active()
21
  {
48
  }
49
 
50
  $dyn_r_ids = $this->get_dyn_r_ids( $product );
51
+ /**
52
+ * Get the name of the product.
53
+ * For Variations, fall back to the name in the parent product
54
+ * because on some installs the name is not saved in the Variation.
55
+ */
56
 
57
  if ( $product->get_type() === 'variation' ) {
58
  $parent_product = wc_get_product( $product->get_parent_id() );
59
  $name = $parent_product->get_name();
60
+ $brand = $this->get_brand_name( $parent_product->get_id() );
61
  } else {
62
  $name = $product->get_name();
63
+ $brand = $this->get_brand_name( $product->get_id() );
64
  }
65
 
66
  return [
68
  'name' => (string) $name,
69
  'quantity' => (int) $order_item['quantity'],
70
  'affiliation' => (string) get_bloginfo( 'name' ),
71
+ 'brand' => (string) $brand,
72
  'category' => implode( ',', $this->get_product_category( $product->get_id() ) ),
73
  'category_array' => $this->get_product_category( $product->get_id() ),
74
  'variant' => ( (string) ($product->get_type() === 'variation') ? $this->get_formatted_variant_text( $product ) : '' ),
75
+ 'price' => (double) $this->wpm_get_order_item_price( $order_item ),
76
  ];
77
  }
78
 
181
 
182
  }
183
 
184
+ public function wpm_get_order_item_price( $order_item )
185
  {
186
 
187
+ if ( Environment_Check::get_instance()->is_woo_discount_rules_active() ) {
188
  $item_value = $order_item->get_meta( '_advanced_woo_discount_item_total_discount' );
189
 
190
+ if ( isset( $item_value['discounted_price'] ) && 0 !== $item_value['discounted_price'] ) {
191
  return (double) $item_value['discounted_price'];
192
+ } elseif ( isset( $item_value['initial_price'] ) && 0 !== $item_value['initial_price'] ) {
193
  return (double) $item_value['initial_price'];
 
 
194
  }
195
 
 
 
196
  }
197
+
198
+ return (double) $order_item->get_order()->get_item_total( $order_item, $this->pmw_output_product_prices_with_tax() );
199
+ // return (float) $product->get_price();
200
  }
201
 
202
  public function add_categories_to_ga4_product_items( $item_details_array, $categories )
248
  );
249
  $this->google_ads_conversion_identifiers = apply_filters( 'wpm_google_ads_conversion_identifiers', $this->google_ads_conversion_identifiers );
250
  $formatted_conversion_ids = [];
251
+ // if (Environment_Check::get_instance()->is_woocommerce_active() && $this->wpm_is_order_received_page()) {
252
 
253
+ if ( Environment_Check::get_instance()->is_woocommerce_active() && Environment_Check::get_instance()->wpm_is_order_received_page() ) {
254
  foreach ( $this->google_ads_conversion_identifiers as $conversion_id => $conversion_label ) {
255
  $conversion_id = $this->extract_google_ads_id( $conversion_id );
256
  if ( $conversion_id ) {
classes/pixels/trait-product.php CHANGED
@@ -29,11 +29,11 @@ trait Trait_Product {
29
 
30
  protected function get_variation_or_product_id( $item, $variations_output = true ) {
31
 
32
- if (0 <> $item['variation_id'] && true === $variations_output) {
33
  return $item['variation_id'];
34
- } else {
35
- return $item['product_id'];
36
  }
 
 
37
  }
38
 
39
  // https://stackoverflow.com/a/56278308/4688612
@@ -42,9 +42,9 @@ trait Trait_Product {
42
 
43
  $brand_taxonomy = 'pa_brand';
44
 
45
- if (( new Environment_Check($this->options) )->is_yith_wc_brands_active()) {
46
  $brand_taxonomy = 'yith_product_brand';
47
- } elseif (( new Environment_Check($this->options) )->is_woocommerce_brands_active()) {
48
  $brand_taxonomy = 'product_brand';
49
  }
50
 
@@ -209,12 +209,12 @@ trait Trait_Product {
209
  if ($product->is_type('variation')) {
210
  $product_details['variant'] = $this->get_formatted_variant_text($product);
211
 
212
- $parent_id = $product->get_parent_id();
213
- $parent_product = wc_get_product($parent_id);
214
 
215
  $dyn_r_ids_parent = $this->get_dyn_r_ids($parent_product);
216
  $parent_product_id_compiled = $dyn_r_ids_parent[$this->get_dyn_r_id_type()];
217
  $product_details['parent_id'] = $parent_product_id_compiled;
 
218
  }
219
 
220
  $order_items_formatted[] = $product_details;
@@ -281,7 +281,7 @@ trait Trait_Product {
281
  'variation_id' => $order_item_data['variation_id'],
282
  'name' => $order_item_data['name'],
283
  'quantity' => $order_item_data['quantity'],
284
- 'price' => ( new Google($this->options) )->wpm_get_order_item_price($order_item, $product),
285
  'subtotal' => (float) wc_format_decimal($order_item_data['subtotal'], 2),
286
  'subtotal_tax' => (float) wc_format_decimal($order_item_data['subtotal_tax'], 2),
287
  'total' => (float) wc_format_decimal($order_item_data['total'], 2),
@@ -345,16 +345,37 @@ trait Trait_Product {
345
  <?php
346
  }
347
 
 
 
 
 
 
 
 
348
  public function get_product_details_for_datalayer( $product ) {
349
 
350
  global $woocommerce_wpml;
351
 
352
  $dyn_r_ids = $this->get_dyn_r_ids($product);
353
 
354
- if (( new Environment_Check($this->options) )->is_wpml_woocommerce_multi_currency_active()) {
 
 
 
 
 
355
  $price = $woocommerce_wpml->multi_currency->prices->get_product_price_in_currency($product->get_id(), get_woocommerce_currency());
 
 
 
 
356
  } else {
357
- $price = $product->get_price();
 
 
 
 
 
358
  }
359
 
360
  $product_details = [
@@ -377,6 +398,7 @@ trait Trait_Product {
377
 
378
  $product_details['parentId_dyn_r_ids'] = $this->get_dyn_r_ids($parent_product);
379
  $product_details['parentId'] = $parent_product->get_id();
 
380
  } else {
381
 
382
  wc_get_logger()->debug('Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', ['source' => 'wpm']);
29
 
30
  protected function get_variation_or_product_id( $item, $variations_output = true ) {
31
 
32
+ if (true === filter_var($variations_output, FILTER_VALIDATE_BOOLEAN) && !empty($item['variation_id'])) {
33
  return $item['variation_id'];
 
 
34
  }
35
+
36
+ return $item['product_id'];
37
  }
38
 
39
  // https://stackoverflow.com/a/56278308/4688612
42
 
43
  $brand_taxonomy = 'pa_brand';
44
 
45
+ if (Environment_Check::get_instance()->is_yith_wc_brands_active()) {
46
  $brand_taxonomy = 'yith_product_brand';
47
+ } elseif (Environment_Check::get_instance()->is_woocommerce_brands_active()) {
48
  $brand_taxonomy = 'product_brand';
49
  }
50
 
209
  if ($product->is_type('variation')) {
210
  $product_details['variant'] = $this->get_formatted_variant_text($product);
211
 
212
+ $parent_product = wc_get_product($product->get_parent_id());
 
213
 
214
  $dyn_r_ids_parent = $this->get_dyn_r_ids($parent_product);
215
  $parent_product_id_compiled = $dyn_r_ids_parent[$this->get_dyn_r_id_type()];
216
  $product_details['parent_id'] = $parent_product_id_compiled;
217
+ $product_details['brand'] = $this->get_brand_name($parent_product->get_id());
218
  }
219
 
220
  $order_items_formatted[] = $product_details;
281
  'variation_id' => $order_item_data['variation_id'],
282
  'name' => $order_item_data['name'],
283
  'quantity' => $order_item_data['quantity'],
284
+ 'price' => ( new Google($this->options) )->wpm_get_order_item_price($order_item),
285
  'subtotal' => (float) wc_format_decimal($order_item_data['subtotal'], 2),
286
  'subtotal_tax' => (float) wc_format_decimal($order_item_data['subtotal_tax'], 2),
287
  'total' => (float) wc_format_decimal($order_item_data['total'], 2),
345
  <?php
346
  }
347
 
348
+ protected function pmw_output_product_prices_with_tax() {
349
+
350
+ // Output the product prices with tax as default
351
+ // otherwise, output the prices without tax
352
+ return apply_filters('pmw_output_product_prices_with_tax', true);
353
+ }
354
+
355
  public function get_product_details_for_datalayer( $product ) {
356
 
357
  global $woocommerce_wpml;
358
 
359
  $dyn_r_ids = $this->get_dyn_r_ids($product);
360
 
361
+ // Output the product prices with tax as default
362
+ // otherwise, output the prices without tax
363
+ $use_price_with_tax = $this->pmw_output_product_prices_with_tax();
364
+
365
+ if (Environment_Check::get_instance()->is_wpml_woocommerce_multi_currency_active()) {
366
+ // https://github.com/wp-premium/woocommerce-multilingual/blob/134e1a789622341e8de7690b955b25ea8d8f7cfc/inc/currencies/class-wcml-multi-currency-prices.php#L158
367
  $price = $woocommerce_wpml->multi_currency->prices->get_product_price_in_currency($product->get_id(), get_woocommerce_currency());
368
+
369
+ if ($use_price_with_tax) {
370
+ $price = ( $price / wc_get_price_excluding_tax($product) ) * wc_get_price_including_tax($product);
371
+ }
372
  } else {
373
+ // https://stackoverflow.com/a/37231033/4688612
374
+ if ($use_price_with_tax) {
375
+ $price = wc_get_price_including_tax($product);
376
+ } else {
377
+ $price = wc_get_price_excluding_tax($product);
378
+ }
379
  }
380
 
381
  $product_details = [
398
 
399
  $product_details['parentId_dyn_r_ids'] = $this->get_dyn_r_ids($parent_product);
400
  $product_details['parentId'] = $parent_product->get_id();
401
+ $product_details['brand'] = $this->get_brand_name($parent_product->get_id());
402
  } else {
403
 
404
  wc_get_logger()->debug('Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', ['source' => 'wpm']);
classes/pixels/trait-shop.php CHANGED
@@ -7,6 +7,7 @@ use libphonenumber\PhoneNumberFormat ;
7
  use libphonenumber\PhoneNumberUtil ;
8
  use WC_Geolocation ;
9
  use WCPM\Classes\Admin\Documentation ;
 
10
 
11
  if ( !defined( 'ABSPATH' ) ) {
12
  exit;
@@ -80,16 +81,29 @@ trait Trait_Shop
80
  return $list_suffix;
81
  }
82
 
83
- protected function wpm_is_order_received_page()
84
- {
85
- return is_order_received_page() || $this->is_valid_order_key_in_url();
86
- }
87
-
88
  protected function is_valid_order_key_in_url()
89
  {
90
  $_get = $this->get_input_vars( INPUT_GET );
 
 
 
 
 
 
 
 
 
91
 
92
- if ( isset( $_get['key'] ) && wc_get_order_id_by_order_key( $_get['key'] ) ) {
 
 
 
 
 
 
 
 
 
93
  return true;
94
  } else {
95
  return false;
@@ -142,9 +156,19 @@ trait Trait_Shop
142
  protected function get_order_with_url_order_key()
143
  {
144
  $_get = $this->get_input_vars( INPUT_GET );
 
 
145
 
146
- if ( isset( $_get['key'] ) ) {
147
- $order_key = $_get['key'];
 
 
 
 
 
 
 
 
148
  wc_get_logger()->debug( 'URL order key: ' . $order_key, [
149
  'source' => 'wpm',
150
  ] );
@@ -252,7 +276,7 @@ trait Trait_Shop
252
  return false;
253
  }
254
  // Abort if memory_limit is too low
255
- if ( !$this->environment_check->is_memory_limit_higher_than( '100M' ) ) {
256
  return false;
257
  }
258
  // Abort if customer has too many orders
7
  use libphonenumber\PhoneNumberUtil ;
8
  use WC_Geolocation ;
9
  use WCPM\Classes\Admin\Documentation ;
10
+ use WCPM\Classes\Admin\Environment_Check ;
11
 
12
  if ( !defined( 'ABSPATH' ) ) {
13
  exit;
81
  return $list_suffix;
82
  }
83
 
 
 
 
 
 
84
  protected function is_valid_order_key_in_url()
85
  {
86
  $_get = $this->get_input_vars( INPUT_GET );
87
+ // If a purchase order was created by a shop manager
88
+ // and the customer is viewing the PO
89
+ // don't fire the conversion pixels
90
+ if ( isset( $_get['pay_for_order'] ) ) {
91
+ return false;
92
+ }
93
+ $order_key = null;
94
+ // key is for WooCommerce
95
+ // wcf-key is for CartFlows
96
 
97
+ if ( isset( $_get['key'] ) ) {
98
+ $order_key = $_get['key'];
99
+ // for WooCommerce
100
+ } elseif ( isset( $_get['wcf-key'] ) ) {
101
+ $order_key = $_get['wcf-key'];
102
+ // for CartFlows
103
+ }
104
+
105
+
106
+ if ( $order_key && wc_get_order_id_by_order_key( $order_key ) ) {
107
  return true;
108
  } else {
109
  return false;
156
  protected function get_order_with_url_order_key()
157
  {
158
  $_get = $this->get_input_vars( INPUT_GET );
159
+ // key is for WooCommerce
160
+ // wcf-key is for CartFlows
161
 
162
+ if ( isset( $_get['key'] ) || isset( $_get['wcf-key'] ) ) {
163
+
164
+ if ( isset( $_get['key'] ) ) {
165
+ $order_key = $_get['key'];
166
+ // for WooCommerce keys
167
+ } else {
168
+ $order_key = $_get['wcf-key'];
169
+ // for CartFlows keys
170
+ }
171
+
172
  wc_get_logger()->debug( 'URL order key: ' . $order_key, [
173
  'source' => 'wpm',
174
  ] );
276
  return false;
277
  }
278
  // Abort if memory_limit is too low
279
+ if ( !Environment_Check::get_instance()->is_memory_limit_higher_than( '100M' ) ) {
280
  return false;
281
  }
282
  // Abort if customer has too many orders
css/admin.css CHANGED
@@ -183,3 +183,57 @@ input:checked + .slider:before {
183
  background-color: #333;
184
  margin: 30px 0 30px 0;
185
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  background-color: #333;
184
  margin: 30px 0 30px 0;
185
  }
186
+
187
+ .pmw-monitored-icon.good {
188
+ background-color: green;
189
+ mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9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jQ1MSAyMDAtMjAwIDIwMC0xMTAuNTMyIDAtMjAwLTg5LjQ1MS0yMDAtMjAwIDAtMTEwLjUzMiA4OS40NTEtMjAwIDIwMC0yMDBtMTQwLjIwNCAxMzAuMjY3bC0yMi41MzYtMjIuNzE4Yy00LjY2Ny00LjcwNS0xMi4yNjUtNC43MzYtMTYuOTctLjA2OEwyMTUuMzQ2IDMwMy42OTdsLTU5Ljc5Mi02MC4yNzdjLTQuNjY3LTQuNzA1LTEyLjI2NS00LjczNi0xNi45Ny0uMDY5bC0yMi43MTkgMjIuNTM2Yy00LjcwNSA0LjY2Ny00LjczNiAxMi4yNjUtLjA2OCAxNi45NzFsOTAuNzgxIDkxLjUxNmM0LjY2NyA0LjcwNSAxMi4yNjUgNC43MzYgMTYuOTcuMDY4bDE3Mi41ODktMTcxLjIwNGM0LjcwNC00LjY2OCA0LjczNC0xMi4yNjYuMDY3LTE2Ljk3MXoiLz48L3N2Zz4=");
192
+ -webkit-mask-size: cover;
193
+ }
194
+
195
+ .pmw-monitored-icon.bad {
196
+ background-color: red;
197
+ /*color: green;*/
198
+ /*content: '';*/
199
+ mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDhDMTE5IDggOCAxMTkgOCAyNTZzMTExIDI0OCAyNDggMjQ4IDI0OC0xMTEgMjQ4LTI0OFMzOTMgOCAyNTYgOHptMCA0NDhjLTExMC41IDAtMjAwLTg5LjUtMjAwLTIwMFMxNDUuNSA1NiAyNTYgNTZzMjAwIDg5LjUgMjAwIDIwMC04OS41IDIwMC0yMDAgMjAweiIvPjwvc3ZnPg==");
200
+ mask-size: cover;
201
+ -webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDhDMTE5IDggOCAxMTkgOCAyNTZzMTExIDI0OCAyNDggMjQ4IDI0OC0xMTEgMjQ4LTI0OFMzOTMgOCAyNTYgOHptMCA0NDhjLTExMC41IDAtMjAwLTg5LjUtMjAwLTIwMFMxNDUuNSA1NiAyNTYgNTZzMjAwIDg5LjUgMjAwIDIwMC04OS41IDIwMC0yMDAgMjAweiIvPjwvc3ZnPg==");
202
+ -webkit-mask-size: cover;
203
+ }
204
+
205
+ .pmw-monitored-icon.none {
206
+ background-color: gray;
207
+ mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZD0iTTEwIDlhMiAyIDAgMSAxIDAtNCAyIDIgMCAwIDEgMCA0em0wIDZhMiAyIDAgMSAxIDAtNCAyIDIgMCAwIDEgMCA0eiIvPjwvc3ZnPg==");
208
+ mask-size: cover;
209
+ -webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZD0iTTEwIDlhMiAyIDAgMSAxIDAtNCAyIDIgMCAwIDEgMCA0em0wIDZhMiAyIDAgMSAxIDAtNCAyIDIgMCAwIDEgMCA0eiIvPjwvc3ZnPg==");
210
+ -webkit-mask-size: cover;
211
+ }
212
+
213
+ .pmw-monitored-icon {
214
+ /*display: block;*/
215
+ /*background: #888;*/
216
+ /*border-radius: 50% !important;*/
217
+ /*height: 12px !important;*/
218
+ /*width: 12px !important;*/
219
+ /*margin: auto auto;*/
220
+ display: block;
221
+ height: 1.5em;
222
+ width: 1.5em;
223
+ margin: auto auto;
224
+ }
225
+
226
+ table.wp-list-table .pmw-monitored-head {
227
+ display: block;
228
+ height: 2em;
229
+ width: 20px !important;
230
+ margin: auto auto;
231
+ /*content: url("data:image/svg+xml;base64,PHN2Z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 
 
 
 
 
 
 
 
 
1
+ jQuery(document).on( 'click', '.pmw-payment-gateway-notification .notice-dismiss', function() {
2
+
3
+ jQuery.ajax({
4
+ url: ajaxurl,
5
+ data: {
6
+ action: 'dismiss_pmw_payment_gateway_notification'
7
+ }
8
+ })
9
+
10
+ })
js/public/wpm-public.p1.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var __webpack_modules__={4749:(e,t,o)=>{var r=o(2856),a=o(7406),n=TypeError;e.exports=function(e){if(r(e))return e;throw n(a(e)+" is not a function")}},1342:(e,t,o)=>{var r=o(1286),a=o(8810),n=o(7872).f,i=r("unscopables"),l=Array.prototype;null==l[i]&&n(l,i,{configurable:!0,value:a(null)}),e.exports=function(e){l[i][e]=!0}},448:(e,t,o)=>{var r=o(6873),a=String,n=TypeError;e.exports=function(e){if(r(e))return e;throw n(a(e)+" is not an object")}},5071:(e,t,o)=>{var r=o(5185),a=o(873),n=o(918),i=function(e){return function(t,o,i){var l,s=r(t),d=n(s),c=a(i,d);if(e&&o!=o){for(;d>c;)if((l=s[c++])!=l)return!0}else for(;d>c;c++)if((e||c in s)&&s[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},5248:(e,t,o)=>{var r=o(547),a=r({}.toString),n=r("".slice);e.exports=function(e){return n(a(e),8,-1)}},632:(e,t,o)=>{var r=o(3208),a=o(5313),n=o(8688),i=o(7872);e.exports=function(e,t,o){for(var l=a(t),s=i.f,d=n.f,c=0;c<l.length;c++){var u=l[c];r(e,u)||o&&r(o,u)||s(e,u,d(t,u))}}},2357:(e,t,o)=>{var r=o(414),a=o(7872),n=o(6730);e.exports=r?function(e,t,o){return a.f(e,t,n(1,o))}:function(e,t,o){return e[t]=o,e}},6730:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4279:(e,t,o)=>{var r=o(2856),a=o(7872),n=o(1998),i=o(7942);e.exports=function(e,t,o,l){l||(l={});var s=l.enumerable,d=void 0!==l.name?l.name:t;if(r(o)&&n(o,d,l),l.global)s?e[t]=o:i(t,o);else{try{l.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=o:a.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},7942:(e,t,o)=>{var r=o(5433),a=Object.defineProperty;e.exports=function(e,t){try{a(r,e,{value:t,configurable:!0,writable:!0})}catch(o){r[e]=t}return t}},414:(e,t,o)=>{var r=o(2933);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2388:(e,t,o)=>{var r=o(5433),a=o(6873),n=r.document,i=a(n)&&a(n.createElement);e.exports=function(e){return i?n.createElement(e):{}}},5575:(e,t,o)=>{var r=o(1272);e.exports=r("navigator","userAgent")||""},5723:(e,t,o)=>{var r,a,n=o(5433),i=o(5575),l=n.process,s=n.Deno,d=l&&l.versions||s&&s.version,c=d&&d.v8;c&&(a=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},5604:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4429:(e,t,o)=>{var r=o(5433),a=o(8688).f,n=o(2357),i=o(4279),l=o(7942),s=o(632),d=o(1476);e.exports=function(e,t){var o,c,u,p,m,g=e.target,w=e.global,y=e.stat;if(o=w?r:y?r[g]||l(g,{}):(r[g]||{}).prototype)for(c in t){if(p=t[c],u=e.dontCallGetSet?(m=a(o,c))&&m.value:o[c],!d(w?c:g+(y?".":"#")+c,e.forced)&&void 0!==u){if(typeof p==typeof u)continue;s(p,u)}(e.sham||u&&u.sham)&&n(p,"sham",!0),i(o,c,p,e)}}},2933:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},3001:(e,t,o)=>{var r=o(2933);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3573:(e,t,o)=>{var r=o(3001),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},4081:(e,t,o)=>{var r=o(414),a=o(3208),n=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,l=a(n,"name"),s=l&&"something"===function(){}.name,d=l&&(!r||r&&i(n,"name").configurable);e.exports={EXISTS:l,PROPER:s,CONFIGURABLE:d}},547:(e,t,o)=>{var r=o(3001),a=Function.prototype,n=a.bind,i=a.call,l=r&&n.bind(i,i);e.exports=r?function(e){return e&&l(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},1272:(e,t,o)=>{var r=o(5433),a=o(2856),n=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?n(r[e]):r[e]&&r[e][t]}},9345:(e,t,o)=>{var r=o(4749);e.exports=function(e,t){var o=e[t];return null==o?void 0:r(o)}},5433:(e,t,o)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof o.g&&o.g)||function(){return this}()||Function("return this")()},3208:(e,t,o)=>{var r=o(547),a=o(4021),n=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return n(a(e),t)}},7557:e=>{e.exports={}},6383:(e,t,o)=>{var r=o(1272);e.exports=r("document","documentElement")},5841:(e,t,o)=>{var r=o(414),a=o(2933),n=o(2388);e.exports=!r&&!a((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},8946:(e,t,o)=>{var r=o(547),a=o(2933),n=o(5248),i=Object,l=r("".split);e.exports=a((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==n(e)?l(e,""):i(e)}:i},2009:(e,t,o)=>{var r=o(547),a=o(2856),n=o(3479),i=r(Function.toString);a(n.inspectSource)||(n.inspectSource=function(e){return i(e)}),e.exports=n.inspectSource},418:(e,t,o)=>{var r,a,n,i=o(3829),l=o(5433),s=o(547),d=o(6873),c=o(2357),u=o(3208),p=o(3479),m=o(8607),g=o(7557),w="Object already initialized",y=l.TypeError,v=l.WeakMap;if(i||p.state){var f=p.state||(p.state=new v),_=s(f.get),h=s(f.has),L=s(f.set);r=function(e,t){if(h(f,e))throw new y(w);return t.facade=e,L(f,e,t),t},a=function(e){return _(f,e)||{}},n=function(e){return h(f,e)}}else{var b=m("state");g[b]=!0,r=function(e,t){if(u(e,b))throw new y(w);return t.facade=e,c(e,b,t),t},a=function(e){return u(e,b)?e[b]:{}},n=function(e){return u(e,b)}}e.exports={set:r,get:a,has:n,enforce:function(e){return n(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var o;if(!d(t)||(o=a(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return o}}}},2856:e=>{e.exports=function(e){return"function"==typeof e}},1476:(e,t,o)=>{var r=o(2933),a=o(2856),n=/#|\.prototype\./,i=function(e,t){var o=s[l(e)];return o==c||o!=d&&(a(t)?r(t):!!t)},l=i.normalize=function(e){return String(e).replace(n,".").toLowerCase()},s=i.data={},d=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},6873:(e,t,o)=>{var r=o(2856);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},2390:e=>{e.exports=!1},9650:(e,t,o)=>{var r=o(1272),a=o(2856),n=o(7012),i=o(8951),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&n(t.prototype,l(e))}},918:(e,t,o)=>{var r=o(9262);e.exports=function(e){return r(e.length)}},1998:(e,t,o)=>{var r=o(2933),a=o(2856),n=o(3208),i=o(414),l=o(4081).CONFIGURABLE,s=o(2009),d=o(418),c=d.enforce,u=d.get,p=Object.defineProperty,m=i&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),g=String(String).split("String"),w=e.exports=function(e,t,o){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!n(e,"name")||l&&e.name!==t)&&(i?p(e,"name",{value:t,configurable:!0}):e.name=t),m&&o&&n(o,"arity")&&e.length!==o.arity&&p(e,"length",{value:o.arity});try{o&&n(o,"constructor")&&o.constructor?i&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=c(e);return n(r,"source")||(r.source=g.join("string"==typeof t?t:"")),e};Function.prototype.toString=w((function(){return a(this)&&u(this).source||s(this)}),"toString")},1190:e=>{var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?o:t)(r)}},6634:(e,t,o)=>{var r=o(5723),a=o(2933);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3829:(e,t,o)=>{var r=o(5433),a=o(2856),n=o(2009),i=r.WeakMap;e.exports=a(i)&&/native code/.test(n(i))},8810:(e,t,o)=>{var r,a=o(448),n=o(21),i=o(5604),l=o(7557),s=o(6383),d=o(2388),c=o(8607)("IE_PROTO"),u=function(){},p=function(e){return"<script>"+e+"<\/script>"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;g="undefined"!=typeof document?document.domain&&r?m(r):((t=d("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(r);for(var o=i.length;o--;)delete g.prototype[i[o]];return g()};l[c]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(u.prototype=a(e),o=new u,u.prototype=null,o[c]=e):o=g(),void 0===t?o:n.f(o,t)}},21:(e,t,o)=>{var r=o(414),a=o(8272),n=o(7872),i=o(448),l=o(5185),s=o(8454);t.f=r&&!a?Object.defineProperties:function(e,t){i(e);for(var o,r=l(t),a=s(t),d=a.length,c=0;d>c;)n.f(e,o=a[c++],r[o]);return e}},7872:(e,t,o)=>{var r=o(414),a=o(5841),n=o(8272),i=o(448),l=o(29),s=TypeError,d=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.f=r?n?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&"writable"in o&&!o.writable){var r=c(e,t);r&&r.writable&&(e[t]=o.value,o={configurable:"configurable"in o?o.configurable:r.configurable,enumerable:"enumerable"in o?o.enumerable:r.enumerable,writable:!1})}return d(e,t,o)}:d:function(e,t,o){if(i(e),t=l(t),i(o),a)try{return d(e,t,o)}catch(e){}if("get"in o||"set"in o)throw s("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},8688:(e,t,o)=>{var r=o(414),a=o(3573),n=o(4017),i=o(6730),l=o(5185),s=o(29),d=o(3208),c=o(5841),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=l(e),t=s(t),c)try{return u(e,t)}catch(e){}if(d(e,t))return i(!a(n.f,e,t),e[t])}},7839:(e,t,o)=>{var r=o(209),a=o(5604).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},6824:(e,t)=>{t.f=Object.getOwnPropertySymbols},7012:(e,t,o)=>{var r=o(547);e.exports=r({}.isPrototypeOf)},209:(e,t,o)=>{var r=o(547),a=o(3208),n=o(5185),i=o(5071).indexOf,l=o(7557),s=r([].push);e.exports=function(e,t){var o,r=n(e),d=0,c=[];for(o in r)!a(l,o)&&a(r,o)&&s(c,o);for(;t.length>d;)a(r,o=t[d++])&&(~i(c,o)||s(c,o));return c}},8454:(e,t,o)=>{var r=o(209),a=o(5604);e.exports=Object.keys||function(e){return r(e,a)}},4017:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!o.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},542:(e,t,o)=>{var r=o(3573),a=o(2856),n=o(6873),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&a(o=e.toString)&&!n(l=r(o,e)))return l;if(a(o=e.valueOf)&&!n(l=r(o,e)))return l;if("string"!==t&&a(o=e.toString)&&!n(l=r(o,e)))return l;throw i("Can't convert object to primitive value")}},5313:(e,t,o)=>{var r=o(1272),a=o(547),n=o(7839),i=o(6824),l=o(448),s=a([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=n.f(l(e)),o=i.f;return o?s(t,o(e)):t}},4630:e=>{var t=TypeError;e.exports=function(e){if(null==e)throw t("Can't call method on "+e);return e}},8607:(e,t,o)=>{var r=o(3062),a=o(5834),n=r("keys");e.exports=function(e){return n[e]||(n[e]=a(e))}},3479:(e,t,o)=>{var r=o(5433),a=o(7942),n="__core-js_shared__",i=r[n]||a(n,{});e.exports=i},3062:(e,t,o)=>{var r=o(2390),a=o(3479);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})},873:(e,t,o)=>{var r=o(7219),a=Math.max,n=Math.min;e.exports=function(e,t){var o=r(e);return o<0?a(o+t,0):n(o,t)}},5185:(e,t,o)=>{var r=o(8946),a=o(4630);e.exports=function(e){return r(a(e))}},7219:(e,t,o)=>{var r=o(1190);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},9262:(e,t,o)=>{var r=o(7219),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},4021:(e,t,o)=>{var r=o(4630),a=Object;e.exports=function(e){return a(r(e))}},9984:(e,t,o)=>{var r=o(3573),a=o(6873),n=o(9650),i=o(9345),l=o(542),s=o(1286),d=TypeError,c=s("toPrimitive");e.exports=function(e,t){if(!a(e)||n(e))return e;var o,s=i(e,c);if(s){if(void 0===t&&(t="default"),o=r(s,e,t),!a(o)||n(o))return o;throw d("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},29:(e,t,o)=>{var r=o(9984),a=o(9650);e.exports=function(e){var t=r(e,"string");return a(t)?t:t+""}},7406:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},5834:(e,t,o)=>{var r=o(547),a=0,n=Math.random(),i=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+n,36)}},8951:(e,t,o)=>{var r=o(6634);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8272:(e,t,o)=>{var r=o(414),a=o(2933);e.exports=r&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1286:(e,t,o)=>{var r=o(5433),a=o(3062),n=o(3208),i=o(5834),l=o(6634),s=o(8951),d=a("wks"),c=r.Symbol,u=c&&c.for,p=s?c:c&&c.withoutSetter||i;e.exports=function(e){if(!n(d,e)||!l&&"string"!=typeof d[e]){var t="Symbol."+e;l&&n(c,e)?d[e]=c[e]:d[e]=s&&u?u(t):p(t)}return d[e]}},3647:(e,t,o)=>{"use strict";o(3647);var r=o(4429),a=o(5071).includes,n=o(2933),i=o(1342);r({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,o,r,a,n;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.facebook)||void 0===o||!o.pixel_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(a=r.pixels)&&void 0!==a&&null!==(n=a.facebook)&&void 0!==n&&n.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((e,t)=>{try{var o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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,o;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.facebook)||void 0===o||!o.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideOrderReceivedPage",((e,t)=>{try{var o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},7746:()=>{!function(e,t,o){let r;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,o=document,r="script",t.fbq||(a=t.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},t._fbq||(t._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.queue=[],(n=o.createElement(r)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=o.getElementsByTagName(r)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(r){console.error(r)}var t,o,r,a,n,i},e.getUserIdentifiersForFb=()=>{var e,t,o,r,a,n,i,l,s,d,c,u,p,m,g,w,y,v,f,_,h,L,b,D,k,x,C,j,S,I,O,P,E,Q,T,F,A,V,R,q,M,G,N,W;let U={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(U.external_id=wpmDataLayer.user.id),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.order)&&void 0!==r&&r.user_id&&(U.external_id=wpmDataLayer.order.user_id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(n=a.user)&&void 0!==n&&null!==(i=n.facebook)&&void 0!==i&&i.email&&(U.em=wpmDataLayer.user.facebook.email),null!==(l=wpmDataLayer)&&void 0!==l&&null!==(s=l.order)&&void 0!==s&&s.billing_email_hashed&&(U.em=wpmDataLayer.order.billing_email_hashed),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(U.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(U.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(w=g.user)&&void 0!==w&&null!==(y=w.facebook)&&void 0!==y&&y.last_name&&(U.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(f=v.order)&&void 0!==f&&f.billing_last_name&&(U.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(_=wpmDataLayer)&&void 0!==_&&null!==(h=_.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(U.ph=wpmDataLayer.user.facebook.phone),null!==(b=wpmDataLayer)&&void 0!==b&&null!==(D=b.order)&&void 0!==D&&D.billing_phone&&(U.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(k=wpmDataLayer)&&void 0!==k&&null!==(x=k.user)&&void 0!==x&&null!==(C=x.facebook)&&void 0!==C&&C.city&&(U.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(U.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(O=I.user)&&void 0!==O&&null!==(P=O.facebook)&&void 0!==P&&P.state&&(U.st=wpmDataLayer.user.facebook.state),null!==(E=wpmDataLayer)&&void 0!==E&&null!==(Q=E.order)&&void 0!==Q&&Q.billing_state&&(U.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(T=wpmDataLayer)&&void 0!==T&&null!==(F=T.user)&&void 0!==F&&null!==(A=F.facebook)&&void 0!==A&&A.postcode&&(U.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(R=V.order)&&void 0!==R&&R.billing_postcode&&(U.zp=wpmDataLayer.order.billing_postcode),null!==(q=wpmDataLayer)&&void 0!==q&&null!==(M=q.user)&&void 0!==M&&null!==(G=M.facebook)&&void 0!==G&&G.country&&(U.country=wpmDataLayer.user.facebook.country),null!==(N=wpmDataLayer)&&void 0!==N&&null!==(W=N.order)&&void 0!==W&&W.billing_country&&(U.country=wpmDataLayer.order.billing_country.toLowerCase()),U},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(r={...r,...e.getFbUserDataFromBrowser()},r),e.setFbUserData=()=>{r=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,o;let r={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(r.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(r.fbc=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.user)&&void 0!==o&&o.id&&(r.external_id=wpmDataLayer.user.id),navigator.userAgent&&(r.client_user_agent=navigator.userAgent),r},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[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?e.push(String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let r=arguments.length>1&&arguments[1]!==o?arguments[1]:{};try{var a,n,i;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let o=e.getFbRandomEventId();fbq("trackCustom",t,r,{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:o,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:r})}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)},5012:(e,t,o)=>{o(7746),o(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var o,r,a,n,i,l,s,d,c,u,p,m,g;if(jQuery.isEmptyObject(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(s=l.google)||void 0===s||null===(d=s.ads)||void 0===d||null===(c=d.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&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var o,r,a,n,i,l,s,d,c,u,p;if(jQuery.isEmptyObject(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(s=l.google)||void 0===s||null===(d=s.ads)||void 0===d||null===(c=d.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&&p.id&&(e.user_id=wpmDataLayer.user.id),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 o,r,a,n,i,l,s,d,c,u,p;if(jQuery.isEmptyObject(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(s=l.google)||void 0===s||null===(d=s.ads)||void 0===d||null===(c=d.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&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,o,r,a,n,i,l,s,d,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.conversionIds))return;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(s=l.dynamic_remarketing)||void 0===s||!s.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;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;m.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 g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n,i,l,s,d,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.conversionIds))return;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(s=l.dynamic_remarketing)||void 0===s||!s.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,o,r,a,n,i,l,s,d,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.conversionIds))return;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(s=l.dynamic_remarketing)||void 0===s||!s.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let i={},l={};i={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&&(i.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.user)&&void 0!==r&&r.id&&(i.user_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(n=a.order)&&void 0!==n&&n.aw_merchant_id&&(l={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...i,...l})}))}catch(e){console.error(e)}}))},9042:()=>{!function(e,t,o){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,o,r;let a=[];if(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.ads)&&void 0!==r&&r.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&a.push(e+"/"+t);return a},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,o]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;let r;r={quantity:a.quantity,price:a.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?(r.id=String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r)):(r.id=String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;let r;r={quantity:a.quantity,price:a.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?(r.id=String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r)):(r.id=String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r))}return e}}(window.wpm=window.wpm||{},jQuery)},5190:(e,t,o)=>{o(9042),o(165)},3625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n,i,l,s,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.analytics)||void 0===r||null===(a=r.universal)||void 0===a||!a.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!==(s=l.analytics)&&void 0!==s&&null!==(d=s.universal)&&void 0!==d&&d.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)}}))},6019:()=>{!function(e,t,o){e.getGAUAOrderItems=function(){let t=[];for(const[a,n]of Object.entries(wpmDataLayer.order.items)){var o,r;let a;a={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.general)&&void 0!==r&&r.variationsOutput&&0!==n.variation_id?(a.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),a.variant=wpmDataLayer.products[n.variation_id].variant_name,a.brand=wpmDataLayer.products[n.variation_id].brand):(a.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),a.brand=wpmDataLayer.products[n.id].brand),a=e.ga3AddListNameToProduct(a),t.push(a)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==o?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,o)=>{o(6019),o(3625)},7572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n,i,l,s,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.analytics)||void 0===r||null===(a=r.ga4)||void 0===a||!a.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!==(s=l.analytics)&&void 0!==s&&null!==(d=s.ga4)&&void 0!==d&&d.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)}}))},6228:()=>{!function(e,t,o){e.getGA4OrderItems=function(){let e=[];for(const[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;let r;r={quantity:a.quantity,price:a.price,item_name:a.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[a.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?(r.item_id=String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.item_variant=wpmDataLayer.products[a.variation_id].variant_name,r.item_brand=wpmDataLayer.products[a.variation_id].brand):(r.item_id=String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.item_brand=wpmDataLayer.products[a.id].brand),e.push(r)}return e}}(window.wpm=window.wpm||{},jQuery)},8522:(e,t,o)=>{o(6228),o(7572)},6774:(e,t,o)=>{o(562),o(8522)},9294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,o;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o?void 0:o.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},9860:(e,t,o)=>{"use strict";o.r(t),o(3647),function(e,t,o){e.googleConfigConditionsMet=function(t){var o,r,a,n;return!(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.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]!==o)||arguments[0],t=!(arguments.length>1&&arguments[1]!==o)||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,o,r,a,n,i,l,s,d,c,u,p,m,g,w,y,v,f,_,h,L,b;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.ads)&&void 0!==r&&null!==(a=r.enhanced_conversions)&&void 0!==a&&a.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!==(s=l.ads)&&void 0!==s&&s.conversionIds&&null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.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!==(w=g.google)&&void 0!==w&&null!==(y=w.ads)&&void 0!==y&&y.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(f=v.shop)&&void 0!==f&&f.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(_=wpmDataLayer)&&void 0!==_&&null!==(h=_.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(b=L.ads)&&void 0!==b&&b.enhanced_conversion_data&&gtag("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,o,r,a;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!==(o=t.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(a=r.ga4)&&void 0!==a&&a.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,o,r,a,n,i,l,s,d,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(a=r.universal)&&void 0!==a&&a.property_id||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(s=l.analytics)&&void 0!==s&&null!==(d=s.ga4)&&void 0!==d&&d.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,o,r,a,n,i,l,s,d;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(a=r.universal)&&void 0!==a&&a.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!==(s=l.analytics)&&void 0!==s&&null!==(d=s.ga4)&&void 0!==d&&d.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,o){try{var r,a,n,i,l,s,d,c,u,p,m,g,w,y,v,f,_,h,L,b,D,k;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(a=r.pixels)&&void 0!==a&&null!==(n=a.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var x,C,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!==(x=wpmDataLayer)&&void 0!==x&&null!==(C=x.pixels)&&void 0!==C&&null!==(j=C.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!==(s=l.pixels)&&void 0!==s&&null!==(d=s.google)&&void 0!==d&&null!==(c=d.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(w=wpmDataLayer)&&void 0!==w&&null!==(y=w.pixels)&&void 0!==y&&null!==(v=y.google)&&void 0!==v&&null!==(f=v.analytics)&&void 0!==f&&null!==(_=f.universal)&&void 0!==_&&_.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!==(b=L.google)&&void 0!==b&&null!==(D=b.analytics)&&void 0!==D&&null!==(k=D.ga4)&&void 0!==k&&k.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,o,r,a;return!(null===(t=wpmDataLayer)||void 0===t||null===(o=t.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(a=r.consent_mode)||void 0===a||!a.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 o,r,a;void 0===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a?void 0:a.state)&&t();let n=0;!function o(){var r,a,i;return"ready"===(null===(r=wpmDataLayer)||void 0===r||null===(a=r.pixels)||void 0===a||null===(i=a.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=200,void setTimeout(o,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},1580:(e,t,o)=>{o(9860),o(9294)},8069:(e,t,o)=>{o(1580),o(5190),o(6774),o(3463)},1945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,o,r,a,n,i,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.optimize)||void 0===r||!r.container_id||null!==(a=wpmDataLayer)&&void 0!==a&&null!==(n=a.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()}))},8962:()=>{!function(e,t,o){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},3463:(e,t,o)=>{o(8962),o(1945)},2300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,o,r,a,n,i,l,s;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.hotjar)||void 0===o||!o.site_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(a=r.pixels)&&void 0!==a&&null!==(n=a.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.pixels)&&void 0!==l&&null!==(s=l.hotjar)&&void 0!==s&&s.loaded||wpm.load_hotjar_pixel()}))},2376:()=>{!function(e,t,o){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},o=t.getElementsByTagName("head")[0],(r=t.createElement("script")).async=1,r.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,o.appendChild(r)}catch(e){console.error(e)}var e,t,o,r}}(window.wpm=window.wpm||{},jQuery)},8787:(e,t,o)=>{o(2376),o(2300)},473:(e,t,o)=>{"use strict";o.r(t),o(3647),function(e,t,o){let r=()=>{let t=e.getCookie("cmplz_statistics"),o=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===o,visitorHasChosen:!0}},a=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),o=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),r=e.getCookie("CookieLawInfoConsent");return!(!t&&!o)&&{analytics:"yes"===t,ads:"yes"===o,visitorHasChosen:!!r}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==o&&arguments[0],t=arguments.length>1&&arguments[1]!==o&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=arguments.length>0&&arguments[0]!==o?arguments[0]:null,l=arguments.length>1&&arguments[1]!==o?arguments[1]:null,s=arguments.length>2&&arguments[2]!==o&&arguments[2];if(i||l)i&&(n.categories.analytics=!!i),l&&(n.categories.ads=!!l);else if(t=e.getCookie("CookieConsent"))t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,n.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))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),n.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var d,c,u,p,m,g,w,y;t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(d=t)||void 0===d||null===(c=d.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===(w=t)||void 0===w||null===(y=w.consents)||void 0===y?void 0:y.marketing)||[]],n.mode="pixel"}else(t=r())?(n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,n.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(n.categories.analytics=!0,n.categories.ads=!0,n.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],n.visitorHasChosen=!0):(t=a())?(n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,n.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,n.visitorHasChosen=!0):(n.categories.analytics=!s,n.categories.ads=!s)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,o)=>{let r;return"category"===n.mode?r=!!n.categories[t]:"pixel"===n.mode?(r=n.pixels.includes(o),!1===r&&"microsoft-ads"===o&&(r=n.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),r=!1),!!r||(e.logPreventedPixelLoading(o,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var o,r,a;null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.shop)&&void 0!==r&&null!==(a=r.cookie_consent_mgmt)&&void 0!==a&&a.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. (WPM 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. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((o=>{o.forEach((o=>{let{addedNodes:r}=o;[...r].forEach((o=>{t(o).data("wpm-cookie-category")&&(e.shouldScriptBeActive(o)?e.unblockScript(o):e.blockScript(o))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var o,r,a,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===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(i=a.consent_mode)||void 0===i||!i.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let r=arguments.length>1&&arguments[1]!==o&&arguments[1];r&&t(e).remove();let a=t(e).data("wpm-src");a&&t(e).attr("src",a),e.type="text/javascript",r&&t(e).appendTo("head"),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.blockScript=function(e){let r=arguments.length>1&&arguments[1]!==o&&arguments[1];r&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",r&&t(e).appendTo("head")},e.unblockAllScripts=function(){document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},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.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:o}=t;[...o].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}),e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery)},3299:(e,t,o)=>{"use strict";o.r(t),o(3647),jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),o=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(o)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(e=>{try{let t,o=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,o)),"simple"===wpmDataLayer.shop.product_type&&(o=Number(jQuery(".input-text.qty").val()),o||0===o||(o=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,o)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(o=Number(jQuery(".input-text.qty").val()),o||0===o||(o=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,o)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,r)=>{o=Number(jQuery(r).find(".input-text.qty").val()),o||0===o||(o=1);let a=jQuery(r).attr("class");t=wpm.getPostIdFromString(a),wpm.addProductToCart(t,o)})),"bundle"===wpmDataLayer.shop.product_type&&(o=Number(jQuery(".input-text.qty").val()),o||0===o||(o=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,o))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,o))}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(e=>{try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(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(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(","),(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(()=>{!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(e=>{try{jQuery(".cart_item").each(((e,t)=>{let o=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),r=wpm.getProductIdByCartItemKeyUrl(o),a=jQuery(t).find(".qty").val();0===a?wpm.removeProductFromCart(r):a<wpmDataLayer.cart[r].quantity?wpm.removeProductFromCart(r,wpmDataLayer.cart[r].quantity-a):a>wpmDataLayer.cart[r].quantity&&wpm.addProductToCart(r,a-wpmDataLayer.cart[r].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery((function(){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 o=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",o)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery((()=>{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)}}))})),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,o,r;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),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.user)&&void 0!==r&&r.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,o;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(o=t.cookie_consent_mgmt)&&void 0!==o&&o.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var o,r,a;let n={event:"addToCart",product:t};null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(a=r.facebook)&&void 0!==a&&a.loaded&&(n.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,o;let r={event:"beginCheckout"};var a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.facebook)&&void 0!==o&&o.loaded&&(r.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(a=wpmDataLayer)&&void 0!==a&&a.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(r.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",r),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(r)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var o,r,a;let n={event:"addToWishlist",product:t};null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(a=r.facebook)&&void 0!==a&&a.loaded&&(n.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmViewItem",(function(e){var t,o,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={event:"viewItem",product:a};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(n.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},a&&(n.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(a))),jQuery(document).trigger("wpmClientSideViewItem",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmSearch",(()=>{var e,t,o;let r={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.facebook)&&void 0!==o&&o.loaded&&(r.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",r),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(r)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,o;let r={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.facebook)&&void 0!==o&&o.loaded&&(r.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()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",r)}))},9584:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3647);(function(wpm,$,undefined){const wpmDeduper={keyName:"_wpm_order_ids",cookieExpiresDays:365},wpmRestSettings={cookiePmwRestEndpointAvailable:"_pmw_endpoint_available",restEndpointPost:"pmw/v1/test/post/",restFails:0,restFailsThreshold:10};function checkCookie(){return""!==wpm.getCookie(wpmDeduper.keyName)}wpm.emailSelected=!1,wpm.paymentMethodSelected=!1,wpm.useRestEndpoint=()=>wpm.isSessionStorageAvailable()&&wpm.isRestEndpointAvailable()&&wpm.isBelowRestErrorThreshold(),wpm.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(wpmRestSettings.restFails)<=wpmRestSettings.restFailsThreshold,wpm.isRestEndpointAvailable=async()=>window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)?JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)):await wpm.testEndpoint(),wpm.isSessionStorageAvailable=()=>!!window.sessionStorage,wpm.testEndpoint=async function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpm.root+wpmRestSettings.restEndpointPost,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:wpmRestSettings.cookiePmwRestEndpointAvailable,o=await fetch(e,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===o.status?(window.sessionStorage.setItem(t,JSON.stringify(!0)),!0):404===o.status||0===o.status?(window.sessionStorage.setItem(t,JSON.stringify(!1)),!1):void 0},wpm.isWpmRestEndpointAvailable=function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpmRestSettings.cookiePmwRestEndpointAvailable;return!!wpm.getCookie(e)},wpm.writeOrderIdToStorage=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"thankyou_page";if(window.Storage)if(null===localStorage.getItem(wpmDeduper.keyName)){let t=[];t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t))}else{let t=JSON.parse(localStorage.getItem(wpmDeduper.keyName));t.includes(e)||(t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t)))}else{let t=new Date;t.setDate(t.getDate()+wpmDeduper.cookieExpiresDays);let o=[];checkCookie()&&(o=JSON.parse(wpm.getCookie(wpmDeduper.keyName))),o.includes(e)||(o.push(e),document.cookie=wpmDeduper.keyName+"="+JSON.stringify(o)+";expires="+t.toUTCString())}"function"==typeof wpm.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&wpm.storeOrderIdOnServer(e,t)},wpm.isOrderIdStored=e=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(wpmDeduper.keyName)&&JSON.parse(localStorage.getItem(wpmDeduper.keyName)).includes(e):!!checkCookie()&&JSON.parse(wpm.getCookie(wpmDeduper.keyName)).includes(e):(console.log("order duplication prevention: off"),!1),wpm.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),wpm.removeProductFromCart=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;try{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");let o;if(o=null==t?wpmDataLayer.cart[e].quantity:t,wpmDataLayer.cart[e]){let r=wpm.getProductDetailsFormattedForEvent(e,o);jQuery(document).trigger("wpmRemoveFromCart",r),null==t||wpmDataLayer.cart[e].quantity===t?(delete wpmDataLayer.cart[e],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity-o,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},wpm.getIdBasedOndVariationsOutputSetting=e=>{try{var t,o;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},wpm.addProductToCart=(e,t)=>{try{var o;if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[e]){var r;let o=wpm.getProductDetailsFormattedForEvent(e,t);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[e]?wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity+t:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[e]=wpm.getProductDetailsFormattedForEvent(e,t)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(e){console.error(e),wpm.getCartItemsFromBackend()}},wpm.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?wpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):wpm.getCartItemsFromBackend()},wpm.getCartItemsFromBackend=()=>{try{fetch(wpm.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((e=>{if(!e.success)throw Error("Error getting cart items from backend");e.data.cart||(e.data.cart={}),wpm.saveCartObjectToDataLayer(e.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(e.data.cart))}))}catch(e){console.error(e)}},wpm.getProductsFromBackend=async e=>{var t;if(null!==(t=wpmDataLayer)&&void 0!==t&&t.products&&(e=e.filter((e=>!wpmDataLayer.products.hasOwnProperty(e)))),e&&0!==e.length){try{let t;if(t=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}):await fetch(wpm.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:e})}),t.ok){let e=await t.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}},wpm.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},wpm.triggerViewItemEventPrep=async e=>{wpmDataLayer.products&&wpmDataLayer.products[e]||await wpm.getProductsFromBackend([e]),wpm.triggerViewItemEvent(e)},wpm.triggerViewItemEvent=e=>{let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)},wpm.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},wpm.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null,o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},wpm.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},wpm.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},wpm.triggerViewItemList=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",wpm.getProductDataForViewItemEvent(e))},wpm.getProductDataForViewItemEvent=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[e])return wpm.getProductDetailsFormattedForEvent(e)}catch(e){console.error(e)}},wpm.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},wpm.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})},wpm.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let ioTimeouts={},io;wpm.observerCallback=(e,t)=>{e.forEach((e=>{try{let o,r=jQuery(e.target).data("ioid");if(o=jQuery(e.target).next(".wpmProductId").length?jQuery(e.target).next(".wpmProductId").data("id"):jQuery(e.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");e.isIntersecting?ioTimeouts[r]=setTimeout((()=>{wpm.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&wpm.viewItemListTriggerTestMode(e.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&t.unobserve(e.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(ioTimeouts[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(e.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let ioid=0,allIoElementsToWatch,getAllElementsToWatch=()=>{allIoElementsToWatch=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}))};wpm.startIntersectionObserverToWatch=()=>{try{wpm.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),io=new IntersectionObserver(wpm.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),getAllElementsToWatch(),allIoElementsToWatch.each(((e,t)=>{jQuery(t[0]).data("ioid",ioid++),io.observe(t[0])}))}catch(e){console.error(e)}},wpm.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&productsMutationObserver.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let productsMutationObserver=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"))&&hasWpmProductIdElement(this)&&(jQuery(this).data("ioid",ioid++),io.observe(this))}))}))})),hasWpmProductIdElement=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);wpm.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"",o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(o){let r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3);let a="expires="+r.toUTCString();document.cookie=e+"="+t+";"+a+";path=/"}else document.cookie=e+"="+t+";path=/"},wpm.getCookie=e=>{let t=e+"=",o=decodeURIComponent(document.cookie).split(";");for(let e=0;e<o.length;e++){let r=o[e];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""},wpm.deleteCookie=e=>{wpm.setCookie(e,"",-1)},wpm.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},wpm.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},wpm.storeOrderIdOnServer=async(e,t)=>{try{let o;o=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:e,source:t}),keepalive:!0,cache:"no-cache"}):await fetch(wpm.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:e,source:t}),keepalive:!0}),o.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}catch(e){console.error(e)}},wpm.getProductIdByCartItemKeyUrl=e=>{let t,o=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[o].variation_id?wpmDataLayer.cartItemKeys[o].product_id:wpmDataLayer.cartItemKeys[o].variation_id,t},wpm.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(),wpm.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==undefined?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},wpm.setReferrerToCookie=()=>{wpm.getCookie("wpmReferrer")||wpm.setCookie("wpmReferrer",document.referrer)},wpm.getReferrerFromCookie=()=>wpm.getCookie("wpmReferrer")?wpm.getCookie("wpmReferrer"):null,wpm.getClidFromBrowser=function(){let e,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"gclid";return e={gclid:"_gcl_aw",dclid:"_gcl_dc"},wpm.getCookie(e[t])?wpm.getCookie(e[t]).match(/(GCL.[\d]*.)(.*)/)[2]:""},wpm.getUserAgent=()=>navigator.userAgent,wpm.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),wpm.version=()=>{console.log(wpmDataLayer.version)},wpm.loadScriptAndCacheIt=url=>fetch(url,{method:"GET",cache:"default",keepalive:!0}).then((e=>{if(e.ok)return e.text();throw new Error("Network response was not ok: "+url)})).then((script=>{eval(script)})).catch((e=>{console.error(e)})),wpm.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,wpm.hasLoginEventFired=()=>{let e=wpm.getWpmSessionData();return null==e?void 0:e.loginEventFired},wpm.setLoginEventFired=()=>{let e=wpm.getWpmSessionData();e.loginEventFired=!0,wpm.setWpmSessionData(e)},wpm.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),wpm.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),wpm.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},wpm.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),wpm.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),wpm.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(""))),wpm.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let o=wpmDataLayer.cart[e];t+=o.quantity*o.price}return t}})(window.wpm=window.wpm||{},jQuery)},3534:(e,t,o)=>{o(9584),o(473)},7207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((function(){wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var o=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](o,o.exports,__webpack_require__),o.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__(3534),wpm.jQueryExists().then((function(){__webpack_require__(3299),__webpack_require__(8069),__webpack_require__(5012),__webpack_require__(8787),__webpack_require__(7207)}))})();
2
  //# sourceMappingURL=wpm-public.p1.min.js.map
1
+ (()=>{var __webpack_modules__={4749:(e,t,o)=>{var r=o(2856),a=o(7406),n=TypeError;e.exports=function(e){if(r(e))return e;throw n(a(e)+" is not a function")}},1342:(e,t,o)=>{var r=o(1286),a=o(8810),n=o(7872).f,i=r("unscopables"),l=Array.prototype;null==l[i]&&n(l,i,{configurable:!0,value:a(null)}),e.exports=function(e){l[i][e]=!0}},448:(e,t,o)=>{var r=o(6873),a=String,n=TypeError;e.exports=function(e){if(r(e))return e;throw n(a(e)+" is not an object")}},5071:(e,t,o)=>{var r=o(5185),a=o(873),n=o(918),i=function(e){return function(t,o,i){var l,s=r(t),d=n(s),c=a(i,d);if(e&&o!=o){for(;d>c;)if((l=s[c++])!=l)return!0}else for(;d>c;c++)if((e||c in s)&&s[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},5248:(e,t,o)=>{var r=o(547),a=r({}.toString),n=r("".slice);e.exports=function(e){return n(a(e),8,-1)}},632:(e,t,o)=>{var r=o(3208),a=o(5313),n=o(8688),i=o(7872);e.exports=function(e,t,o){for(var l=a(t),s=i.f,d=n.f,c=0;c<l.length;c++){var u=l[c];r(e,u)||o&&r(o,u)||s(e,u,d(t,u))}}},2357:(e,t,o)=>{var r=o(414),a=o(7872),n=o(6730);e.exports=r?function(e,t,o){return a.f(e,t,n(1,o))}:function(e,t,o){return e[t]=o,e}},6730:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4279:(e,t,o)=>{var r=o(2856),a=o(7872),n=o(1998),i=o(7942);e.exports=function(e,t,o,l){l||(l={});var s=l.enumerable,d=void 0!==l.name?l.name:t;if(r(o)&&n(o,d,l),l.global)s?e[t]=o:i(t,o);else{try{l.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=o:a.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},7942:(e,t,o)=>{var r=o(5433),a=Object.defineProperty;e.exports=function(e,t){try{a(r,e,{value:t,configurable:!0,writable:!0})}catch(o){r[e]=t}return t}},414:(e,t,o)=>{var r=o(2933);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2388:(e,t,o)=>{var r=o(5433),a=o(6873),n=r.document,i=a(n)&&a(n.createElement);e.exports=function(e){return i?n.createElement(e):{}}},5575:(e,t,o)=>{var r=o(1272);e.exports=r("navigator","userAgent")||""},5723:(e,t,o)=>{var r,a,n=o(5433),i=o(5575),l=n.process,s=n.Deno,d=l&&l.versions||s&&s.version,c=d&&d.v8;c&&(a=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},5604:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4429:(e,t,o)=>{var r=o(5433),a=o(8688).f,n=o(2357),i=o(4279),l=o(7942),s=o(632),d=o(1476);e.exports=function(e,t){var o,c,u,p,m,g=e.target,w=e.global,y=e.stat;if(o=w?r:y?r[g]||l(g,{}):(r[g]||{}).prototype)for(c in t){if(p=t[c],u=e.dontCallGetSet?(m=a(o,c))&&m.value:o[c],!d(w?c:g+(y?".":"#")+c,e.forced)&&void 0!==u){if(typeof p==typeof u)continue;s(p,u)}(e.sham||u&&u.sham)&&n(p,"sham",!0),i(o,c,p,e)}}},2933:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},3001:(e,t,o)=>{var r=o(2933);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3573:(e,t,o)=>{var r=o(3001),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},4081:(e,t,o)=>{var r=o(414),a=o(3208),n=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,l=a(n,"name"),s=l&&"something"===function(){}.name,d=l&&(!r||r&&i(n,"name").configurable);e.exports={EXISTS:l,PROPER:s,CONFIGURABLE:d}},547:(e,t,o)=>{var r=o(3001),a=Function.prototype,n=a.bind,i=a.call,l=r&&n.bind(i,i);e.exports=r?function(e){return e&&l(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},1272:(e,t,o)=>{var r=o(5433),a=o(2856),n=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?n(r[e]):r[e]&&r[e][t]}},9345:(e,t,o)=>{var r=o(4749);e.exports=function(e,t){var o=e[t];return null==o?void 0:r(o)}},5433:(e,t,o)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof o.g&&o.g)||function(){return this}()||Function("return this")()},3208:(e,t,o)=>{var r=o(547),a=o(4021),n=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return n(a(e),t)}},7557:e=>{e.exports={}},6383:(e,t,o)=>{var r=o(1272);e.exports=r("document","documentElement")},5841:(e,t,o)=>{var r=o(414),a=o(2933),n=o(2388);e.exports=!r&&!a((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},8946:(e,t,o)=>{var r=o(547),a=o(2933),n=o(5248),i=Object,l=r("".split);e.exports=a((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==n(e)?l(e,""):i(e)}:i},2009:(e,t,o)=>{var r=o(547),a=o(2856),n=o(3479),i=r(Function.toString);a(n.inspectSource)||(n.inspectSource=function(e){return i(e)}),e.exports=n.inspectSource},418:(e,t,o)=>{var r,a,n,i=o(3829),l=o(5433),s=o(547),d=o(6873),c=o(2357),u=o(3208),p=o(3479),m=o(8607),g=o(7557),w="Object already initialized",y=l.TypeError,v=l.WeakMap;if(i||p.state){var f=p.state||(p.state=new v),_=s(f.get),h=s(f.has),L=s(f.set);r=function(e,t){if(h(f,e))throw new y(w);return t.facade=e,L(f,e,t),t},a=function(e){return _(f,e)||{}},n=function(e){return h(f,e)}}else{var b=m("state");g[b]=!0,r=function(e,t){if(u(e,b))throw new y(w);return t.facade=e,c(e,b,t),t},a=function(e){return u(e,b)?e[b]:{}},n=function(e){return u(e,b)}}e.exports={set:r,get:a,has:n,enforce:function(e){return n(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var o;if(!d(t)||(o=a(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return o}}}},2856:e=>{e.exports=function(e){return"function"==typeof e}},1476:(e,t,o)=>{var r=o(2933),a=o(2856),n=/#|\.prototype\./,i=function(e,t){var o=s[l(e)];return o==c||o!=d&&(a(t)?r(t):!!t)},l=i.normalize=function(e){return String(e).replace(n,".").toLowerCase()},s=i.data={},d=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},6873:(e,t,o)=>{var r=o(2856);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},2390:e=>{e.exports=!1},9650:(e,t,o)=>{var r=o(1272),a=o(2856),n=o(7012),i=o(8951),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&n(t.prototype,l(e))}},918:(e,t,o)=>{var r=o(9262);e.exports=function(e){return r(e.length)}},1998:(e,t,o)=>{var r=o(2933),a=o(2856),n=o(3208),i=o(414),l=o(4081).CONFIGURABLE,s=o(2009),d=o(418),c=d.enforce,u=d.get,p=Object.defineProperty,m=i&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),g=String(String).split("String"),w=e.exports=function(e,t,o){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!n(e,"name")||l&&e.name!==t)&&(i?p(e,"name",{value:t,configurable:!0}):e.name=t),m&&o&&n(o,"arity")&&e.length!==o.arity&&p(e,"length",{value:o.arity});try{o&&n(o,"constructor")&&o.constructor?i&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=c(e);return n(r,"source")||(r.source=g.join("string"==typeof t?t:"")),e};Function.prototype.toString=w((function(){return a(this)&&u(this).source||s(this)}),"toString")},1190:e=>{var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?o:t)(r)}},6634:(e,t,o)=>{var r=o(5723),a=o(2933);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3829:(e,t,o)=>{var r=o(5433),a=o(2856),n=o(2009),i=r.WeakMap;e.exports=a(i)&&/native code/.test(n(i))},8810:(e,t,o)=>{var r,a=o(448),n=o(21),i=o(5604),l=o(7557),s=o(6383),d=o(2388),c=o(8607)("IE_PROTO"),u=function(){},p=function(e){return"<script>"+e+"<\/script>"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;g="undefined"!=typeof document?document.domain&&r?m(r):((t=d("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(r);for(var o=i.length;o--;)delete g.prototype[i[o]];return g()};l[c]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(u.prototype=a(e),o=new u,u.prototype=null,o[c]=e):o=g(),void 0===t?o:n.f(o,t)}},21:(e,t,o)=>{var r=o(414),a=o(8272),n=o(7872),i=o(448),l=o(5185),s=o(8454);t.f=r&&!a?Object.defineProperties:function(e,t){i(e);for(var o,r=l(t),a=s(t),d=a.length,c=0;d>c;)n.f(e,o=a[c++],r[o]);return e}},7872:(e,t,o)=>{var r=o(414),a=o(5841),n=o(8272),i=o(448),l=o(29),s=TypeError,d=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.f=r?n?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&"writable"in o&&!o.writable){var r=c(e,t);r&&r.writable&&(e[t]=o.value,o={configurable:"configurable"in o?o.configurable:r.configurable,enumerable:"enumerable"in o?o.enumerable:r.enumerable,writable:!1})}return d(e,t,o)}:d:function(e,t,o){if(i(e),t=l(t),i(o),a)try{return d(e,t,o)}catch(e){}if("get"in o||"set"in o)throw s("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},8688:(e,t,o)=>{var r=o(414),a=o(3573),n=o(4017),i=o(6730),l=o(5185),s=o(29),d=o(3208),c=o(5841),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=l(e),t=s(t),c)try{return u(e,t)}catch(e){}if(d(e,t))return i(!a(n.f,e,t),e[t])}},7839:(e,t,o)=>{var r=o(209),a=o(5604).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},6824:(e,t)=>{t.f=Object.getOwnPropertySymbols},7012:(e,t,o)=>{var r=o(547);e.exports=r({}.isPrototypeOf)},209:(e,t,o)=>{var r=o(547),a=o(3208),n=o(5185),i=o(5071).indexOf,l=o(7557),s=r([].push);e.exports=function(e,t){var o,r=n(e),d=0,c=[];for(o in r)!a(l,o)&&a(r,o)&&s(c,o);for(;t.length>d;)a(r,o=t[d++])&&(~i(c,o)||s(c,o));return c}},8454:(e,t,o)=>{var r=o(209),a=o(5604);e.exports=Object.keys||function(e){return r(e,a)}},4017:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!o.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},542:(e,t,o)=>{var r=o(3573),a=o(2856),n=o(6873),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&a(o=e.toString)&&!n(l=r(o,e)))return l;if(a(o=e.valueOf)&&!n(l=r(o,e)))return l;if("string"!==t&&a(o=e.toString)&&!n(l=r(o,e)))return l;throw i("Can't convert object to primitive value")}},5313:(e,t,o)=>{var r=o(1272),a=o(547),n=o(7839),i=o(6824),l=o(448),s=a([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=n.f(l(e)),o=i.f;return o?s(t,o(e)):t}},4630:e=>{var t=TypeError;e.exports=function(e){if(null==e)throw t("Can't call method on "+e);return e}},8607:(e,t,o)=>{var r=o(3062),a=o(5834),n=r("keys");e.exports=function(e){return n[e]||(n[e]=a(e))}},3479:(e,t,o)=>{var r=o(5433),a=o(7942),n="__core-js_shared__",i=r[n]||a(n,{});e.exports=i},3062:(e,t,o)=>{var r=o(2390),a=o(3479);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})},873:(e,t,o)=>{var r=o(7219),a=Math.max,n=Math.min;e.exports=function(e,t){var o=r(e);return o<0?a(o+t,0):n(o,t)}},5185:(e,t,o)=>{var r=o(8946),a=o(4630);e.exports=function(e){return r(a(e))}},7219:(e,t,o)=>{var r=o(1190);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},9262:(e,t,o)=>{var r=o(7219),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},4021:(e,t,o)=>{var r=o(4630),a=Object;e.exports=function(e){return a(r(e))}},9984:(e,t,o)=>{var r=o(3573),a=o(6873),n=o(9650),i=o(9345),l=o(542),s=o(1286),d=TypeError,c=s("toPrimitive");e.exports=function(e,t){if(!a(e)||n(e))return e;var o,s=i(e,c);if(s){if(void 0===t&&(t="default"),o=r(s,e,t),!a(o)||n(o))return o;throw d("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},29:(e,t,o)=>{var r=o(9984),a=o(9650);e.exports=function(e){var t=r(e,"string");return a(t)?t:t+""}},7406:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},5834:(e,t,o)=>{var r=o(547),a=0,n=Math.random(),i=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+n,36)}},8951:(e,t,o)=>{var r=o(6634);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8272:(e,t,o)=>{var r=o(414),a=o(2933);e.exports=r&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1286:(e,t,o)=>{var r=o(5433),a=o(3062),n=o(3208),i=o(5834),l=o(6634),s=o(8951),d=a("wks"),c=r.Symbol,u=c&&c.for,p=s?c:c&&c.withoutSetter||i;e.exports=function(e){if(!n(d,e)||!l&&"string"!=typeof d[e]){var t="Symbol."+e;l&&n(c,e)?d[e]=c[e]:d[e]=s&&u?u(t):p(t)}return d[e]}},3647:(e,t,o)=>{"use strict";o(3647);var r=o(4429),a=o(5071).includes,n=o(2933),i=o(1342);r({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,o,r,a,n;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.facebook)||void 0===o||!o.pixel_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(a=r.pixels)&&void 0!==a&&null!==(n=a.facebook)&&void 0!==n&&n.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((e,t)=>{try{var o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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 o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.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,o;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.facebook)||void 0===o||!o.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideOrderReceivedPage",((e,t)=>{try{var o,r,a;if(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},7746:()=>{!function(e,t,o){let r;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,o=document,r="script",t.fbq||(a=t.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},t._fbq||(t._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.queue=[],(n=o.createElement(r)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=o.getElementsByTagName(r)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(r){console.error(r)}var t,o,r,a,n,i},e.getUserIdentifiersForFb=()=>{var e,t,o,r,a,n,i,l,s,d,c,u,p,m,g,w,y,v,f,_,h,L,b,D,k,x,C,j,S,I,O,P,E,Q,T,F,A,V,R,q,M,G,N,W;let U={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(U.external_id=wpmDataLayer.user.id),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.order)&&void 0!==r&&r.user_id&&(U.external_id=wpmDataLayer.order.user_id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(n=a.user)&&void 0!==n&&null!==(i=n.facebook)&&void 0!==i&&i.email&&(U.em=wpmDataLayer.user.facebook.email),null!==(l=wpmDataLayer)&&void 0!==l&&null!==(s=l.order)&&void 0!==s&&s.billing_email_hashed&&(U.em=wpmDataLayer.order.billing_email_hashed),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(U.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(U.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(w=g.user)&&void 0!==w&&null!==(y=w.facebook)&&void 0!==y&&y.last_name&&(U.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(f=v.order)&&void 0!==f&&f.billing_last_name&&(U.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(_=wpmDataLayer)&&void 0!==_&&null!==(h=_.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(U.ph=wpmDataLayer.user.facebook.phone),null!==(b=wpmDataLayer)&&void 0!==b&&null!==(D=b.order)&&void 0!==D&&D.billing_phone&&(U.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(k=wpmDataLayer)&&void 0!==k&&null!==(x=k.user)&&void 0!==x&&null!==(C=x.facebook)&&void 0!==C&&C.city&&(U.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(U.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(O=I.user)&&void 0!==O&&null!==(P=O.facebook)&&void 0!==P&&P.state&&(U.st=wpmDataLayer.user.facebook.state),null!==(E=wpmDataLayer)&&void 0!==E&&null!==(Q=E.order)&&void 0!==Q&&Q.billing_state&&(U.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(T=wpmDataLayer)&&void 0!==T&&null!==(F=T.user)&&void 0!==F&&null!==(A=F.facebook)&&void 0!==A&&A.postcode&&(U.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(R=V.order)&&void 0!==R&&R.billing_postcode&&(U.zp=wpmDataLayer.order.billing_postcode),null!==(q=wpmDataLayer)&&void 0!==q&&null!==(M=q.user)&&void 0!==M&&null!==(G=M.facebook)&&void 0!==G&&G.country&&(U.country=wpmDataLayer.user.facebook.country),null!==(N=wpmDataLayer)&&void 0!==N&&null!==(W=N.order)&&void 0!==W&&W.billing_country&&(U.country=wpmDataLayer.order.billing_country.toLowerCase()),U},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(r={...r,...e.getFbUserDataFromBrowser()},r),e.setFbUserData=()=>{r=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,o;let r={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(r.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(r.fbc=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.user)&&void 0!==o&&o.id&&(r.external_id=wpmDataLayer.user.id),navigator.userAgent&&(r.client_user_agent=navigator.userAgent),r},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[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?e.push(String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let r=arguments.length>1&&arguments[1]!==o?arguments[1]:{};try{var a,n,i;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let o=e.getFbRandomEventId();fbq("trackCustom",t,r,{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:o,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:r})}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)},5012:(e,t,o)=>{o(7746),o(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var o,r,a,n,i,l,s,d,c,u,p,m,g;if(jQuery.isEmptyObject(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(s=l.google)||void 0===s||null===(d=s.ads)||void 0===d||null===(c=d.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&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var o,r,a,n,i,l,s,d,c,u,p;if(jQuery.isEmptyObject(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(s=l.google)||void 0===s||null===(d=s.ads)||void 0===d||null===(c=d.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&&p.id&&(e.user_id=wpmDataLayer.user.id),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 o,r,a,n,i,l,s,d,c,u,p;if(jQuery.isEmptyObject(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(s=l.google)||void 0===s||null===(d=s.ads)||void 0===d||null===(c=d.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&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,o,r,a,n,i,l,s,d,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.conversionIds))return;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(s=l.dynamic_remarketing)||void 0===s||!s.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;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;m.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 g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n,i,l,s,d,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.conversionIds))return;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(s=l.dynamic_remarketing)||void 0===s||!s.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,o,r,a,n,i,l,s,d,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.conversionIds))return;if(null===(a=wpmDataLayer)||void 0===a||null===(n=a.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(s=l.dynamic_remarketing)||void 0===s||!s.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let i={},l={};i={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&&(i.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.user)&&void 0!==r&&r.id&&(i.user_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(n=a.order)&&void 0!==n&&n.aw_merchant_id&&(l={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...i,...l})}))}catch(e){console.error(e)}}))},9042:()=>{!function(e,t,o){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,o,r;let a=[];if(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.ads)&&void 0!==r&&r.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&a.push(e+"/"+t);return a},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,o]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;let r;r={quantity:a.quantity,price:a.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?(r.id=String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r)):(r.id=String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;let r;r={quantity:a.quantity,price:a.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?(r.id=String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r)):(r.id=String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(r))}return e}}(window.wpm=window.wpm||{},jQuery)},5190:(e,t,o)=>{o(9042),o(165)},3625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n,i,l,s,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.analytics)||void 0===r||null===(a=r.universal)||void 0===a||!a.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!==(s=l.analytics)&&void 0!==s&&null!==(d=s.universal)&&void 0!==d&&d.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)}}))},6019:()=>{!function(e,t,o){e.getGAUAOrderItems=function(){let t=[];for(const[a,n]of Object.entries(wpmDataLayer.order.items)){var o,r;let a;a={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.general)&&void 0!==r&&r.variationsOutput&&0!==n.variation_id?(a.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),a.variant=wpmDataLayer.products[n.variation_id].variant_name,a.brand=wpmDataLayer.products[n.variation_id].brand):(a.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),a.brand=wpmDataLayer.products[n.id].brand),a=e.ga3AddListNameToProduct(a),t.push(a)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==o?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,o)=>{o(6019),o(3625)},7572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,o,r,a,n,i,l,s,d;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.analytics)||void 0===r||null===(a=r.ga4)||void 0===a||!a.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!==(s=l.analytics)&&void 0!==s&&null!==(d=s.ga4)&&void 0!==d&&d.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)}}))},6228:()=>{!function(e,t,o){e.getGA4OrderItems=function(){let e=[];for(const[r,a]of Object.entries(wpmDataLayer.order.items)){var t,o;let r;r={quantity:a.quantity,price:a.price,item_name:a.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[a.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput&&0!==a.variation_id?(r.item_id=String(wpmDataLayer.products[a.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.item_variant=wpmDataLayer.products[a.variation_id].variant_name,r.item_brand=wpmDataLayer.products[a.variation_id].brand):(r.item_id=String(wpmDataLayer.products[a.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.item_brand=wpmDataLayer.products[a.id].brand),e.push(r)}return e}}(window.wpm=window.wpm||{},jQuery)},8522:(e,t,o)=>{o(6228),o(7572)},6774:(e,t,o)=>{o(562),o(8522)},9294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,o;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o?void 0:o.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},9860:(e,t,o)=>{"use strict";o.r(t),o(3647),function(e,t,o){e.googleConfigConditionsMet=function(t){var o,r,a,n;return!(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(n=a.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]!==o)||arguments[0],t=!(arguments.length>1&&arguments[1]!==o)||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,o,r,a,n,i,l,s,d,c,u,p,m,g,w,y,v,f,_,h,L,b;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.ads)&&void 0!==r&&null!==(a=r.enhanced_conversions)&&void 0!==a&&a.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!==(s=l.ads)&&void 0!==s&&s.conversionIds&&null!==(d=wpmDataLayer)&&void 0!==d&&null!==(c=d.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!==(w=g.google)&&void 0!==w&&null!==(y=w.ads)&&void 0!==y&&y.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(f=v.shop)&&void 0!==f&&f.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(_=wpmDataLayer)&&void 0!==_&&null!==(h=_.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(b=L.ads)&&void 0!==b&&b.enhanced_conversion_data&&gtag("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,o,r,a;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!==(o=t.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(a=r.ga4)&&void 0!==a&&a.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,o,r,a,n,i,l,s,d,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(a=r.universal)&&void 0!==a&&a.property_id||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(s=l.analytics)&&void 0!==s&&null!==(d=s.ga4)&&void 0!==d&&d.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,o,r,a,n,i,l,s,d;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.google)&&void 0!==o&&null!==(r=o.analytics)&&void 0!==r&&null!==(a=r.universal)&&void 0!==a&&a.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!==(s=l.analytics)&&void 0!==s&&null!==(d=s.ga4)&&void 0!==d&&d.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,o){try{var r,a,n,i,l,s,d,c,u,p,m,g,w,y,v,f,_,h,L,b,D,k;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(a=r.pixels)&&void 0!==a&&null!==(n=a.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var x,C,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!==(x=wpmDataLayer)&&void 0!==x&&null!==(C=x.pixels)&&void 0!==C&&null!==(j=C.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!==(s=l.pixels)&&void 0!==s&&null!==(d=s.google)&&void 0!==d&&null!==(c=d.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(w=wpmDataLayer)&&void 0!==w&&null!==(y=w.pixels)&&void 0!==y&&null!==(v=y.google)&&void 0!==v&&null!==(f=v.analytics)&&void 0!==f&&null!==(_=f.universal)&&void 0!==_&&_.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!==(b=L.google)&&void 0!==b&&null!==(D=b.analytics)&&void 0!==D&&null!==(k=D.ga4)&&void 0!==k&&k.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,o,r,a;return!(null===(t=wpmDataLayer)||void 0===t||null===(o=t.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(a=r.consent_mode)||void 0===a||!a.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 o,r,a;void 0===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a?void 0:a.state)&&t();let n=0;!function o(){var r,a,i;return"ready"===(null===(r=wpmDataLayer)||void 0===r||null===(a=r.pixels)||void 0===a||null===(i=a.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=200,void setTimeout(o,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},1580:(e,t,o)=>{o(9860),o(9294)},8069:(e,t,o)=>{o(1580),o(5190),o(6774),o(3463)},1945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,o,r,a,n,i,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.google)||void 0===o||null===(r=o.optimize)||void 0===r||!r.container_id||null!==(a=wpmDataLayer)&&void 0!==a&&null!==(n=a.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()}))},8962:()=>{!function(e,t,o){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},3463:(e,t,o)=>{o(8962),o(1945)},2300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,o,r,a,n,i,l,s;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(o=t.hotjar)||void 0===o||!o.site_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(a=r.pixels)&&void 0!==a&&null!==(n=a.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.pixels)&&void 0!==l&&null!==(s=l.hotjar)&&void 0!==s&&s.loaded||wpm.load_hotjar_pixel()}))},2376:()=>{!function(e,t,o){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},o=t.getElementsByTagName("head")[0],(r=t.createElement("script")).async=1,r.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,o.appendChild(r)}catch(e){console.error(e)}var e,t,o,r}}(window.wpm=window.wpm||{},jQuery)},8787:(e,t,o)=>{o(2376),o(2300)},473:(e,t,o)=>{"use strict";o.r(t),o(3647),function(e,t,o){let r=()=>{let t=e.getCookie("cmplz_statistics"),o=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===o,visitorHasChosen:!0}},a=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),o=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),r=e.getCookie("CookieLawInfoConsent");return!(!t&&!o)&&{analytics:"yes"===t,ads:"yes"===o,visitorHasChosen:!!r}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==o&&arguments[0],t=arguments.length>1&&arguments[1]!==o&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=arguments.length>0&&arguments[0]!==o?arguments[0]:null,l=arguments.length>1&&arguments[1]!==o?arguments[1]:null,s=arguments.length>2&&arguments[2]!==o&&arguments[2];if(i||l)i&&(n.categories.analytics=!!i),l&&(n.categories.ads=!!l);else if(t=e.getCookie("CookieConsent"))t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,n.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))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),n.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var d,c,u,p,m,g,w,y;t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(d=t)||void 0===d||null===(c=d.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===(w=t)||void 0===w||null===(y=w.consents)||void 0===y?void 0:y.marketing)||[]],n.mode="pixel"}else(t=r())?(n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,n.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(n.categories.analytics=!0,n.categories.ads=!0,n.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],n.visitorHasChosen=!0):(t=a())?(n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,n.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,n.visitorHasChosen=!0):(n.categories.analytics=!s,n.categories.ads=!s)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,o)=>{let r;return"category"===n.mode?r=!!n.categories[t]:"pixel"===n.mode?(r=n.pixels.includes(o),!1===r&&"microsoft-ads"===o&&(r=n.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),r=!1),!!r||(e.logPreventedPixelLoading(o,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var o,r,a;null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.shop)&&void 0!==r&&null!==(a=r.cookie_consent_mgmt)&&void 0!==a&&a.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. (WPM 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. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((o=>{o.forEach((o=>{let{addedNodes:r}=o;[...r].forEach((o=>{t(o).data("wpm-cookie-category")&&(e.shouldScriptBeActive(o)?e.unblockScript(o):e.blockScript(o))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var o,r,a,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===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(a=r.google)||void 0===a||null===(i=a.consent_mode)||void 0===i||!i.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let r=arguments.length>1&&arguments[1]!==o&&arguments[1];r&&t(e).remove();let a=t(e).data("wpm-src");a&&t(e).attr("src",a),e.type="text/javascript",r&&t(e).appendTo("head"),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.blockScript=function(e){let r=arguments.length>1&&arguments[1]!==o&&arguments[1];r&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",r&&t(e).appendTo("head")},e.unblockAllScripts=function(){document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},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.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:o}=t;[...o].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}),e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery)},3299:(e,t,o)=>{"use strict";o.r(t),o(3647),jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),o=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(o)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(e=>{try{let t,o=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,o)),"simple"===wpmDataLayer.shop.product_type&&(o=Number(jQuery(".input-text.qty").val()),o||0===o||(o=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,o)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(o=Number(jQuery(".input-text.qty").val()),o||0===o||(o=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,o)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,r)=>{o=Number(jQuery(r).find(".input-text.qty").val()),o||0===o||(o=1);let a=jQuery(r).attr("class");t=wpm.getPostIdFromString(a),wpm.addProductToCart(t,o)})),"bundle"===wpmDataLayer.shop.product_type&&(o=Number(jQuery(".input-text.qty").val()),o||0===o||(o=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,o))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,o))}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(e=>{try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(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(document).one("click init_checkout",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(","),(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),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((()=>{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).on("click","[name='update_cart']",(e=>{try{jQuery(".cart_item").each(((e,t)=>{let o=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),r=wpm.getProductIdByCartItemKeyUrl(o),a=jQuery(t).find(".qty").val();0===a?wpm.removeProductFromCart(r):a<wpmDataLayer.cart[r].quantity?wpm.removeProductFromCart(r,wpmDataLayer.cart[r].quantity-a):a>wpmDataLayer.cart[r].quantity&&wpm.addProductToCart(r,a-wpmDataLayer.cart[r].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery((function(){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 o=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",o)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery((()=>{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)}}))})),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,o,r;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),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.user)&&void 0!==r&&r.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,o;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(o=t.cookie_consent_mgmt)&&void 0!==o&&o.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var o,r,a;let n={event:"addToCart",product:t};null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(a=r.facebook)&&void 0!==a&&a.loaded&&(n.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,o;let r={event:"beginCheckout"};var a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.facebook)&&void 0!==o&&o.loaded&&(r.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(a=wpmDataLayer)&&void 0!==a&&a.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(r.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",r),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(r)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var o,r,a;let n={event:"addToWishlist",product:t};null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(a=r.facebook)&&void 0!==a&&a.loaded&&(n.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmViewItem",(function(e){var t,o,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={event:"viewItem",product:a};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(n.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},a&&(n.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(a))),jQuery(document).trigger("wpmClientSideViewItem",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmSearch",(()=>{var e,t,o;let r={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.facebook)&&void 0!==o&&o.loaded&&(r.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",r),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(r)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,o;let r={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(o=t.facebook)&&void 0!==o&&o.loaded&&(r.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()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",r)}))},9584:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3647);(function(wpm,$,undefined){const wpmDeduper={keyName:"_wpm_order_ids",cookieExpiresDays:365},wpmRestSettings={cookiePmwRestEndpointAvailable:"_pmw_endpoint_available",restEndpointPost:"pmw/v1/test/",restFails:0,restFailsThreshold:10};function checkCookie(){return""!==wpm.getCookie(wpmDeduper.keyName)}wpm.emailSelected=!1,wpm.paymentMethodSelected=!1,wpm.useRestEndpoint=()=>wpm.isSessionStorageAvailable()&&wpm.isRestEndpointAvailable()&&wpm.isBelowRestErrorThreshold(),wpm.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(wpmRestSettings.restFails)<=wpmRestSettings.restFailsThreshold,wpm.isRestEndpointAvailable=async()=>window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)?JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)):await wpm.testEndpoint(),wpm.isSessionStorageAvailable=()=>!!window.sessionStorage,wpm.testEndpoint=async function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpm.root+wpmRestSettings.restEndpointPost,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:wpmRestSettings.cookiePmwRestEndpointAvailable,o=await fetch(e,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===o.status?(window.sessionStorage.setItem(t,JSON.stringify(!0)),!0):404===o.status||0===o.status?(window.sessionStorage.setItem(t,JSON.stringify(!1)),!1):void 0},wpm.isWpmRestEndpointAvailable=function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpmRestSettings.cookiePmwRestEndpointAvailable;return!!wpm.getCookie(e)},wpm.writeOrderIdToStorage=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"thankyou_page";if(window.Storage)if(null===localStorage.getItem(wpmDeduper.keyName)){let t=[];t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t))}else{let t=JSON.parse(localStorage.getItem(wpmDeduper.keyName));t.includes(e)||(t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t)))}else{let t=new Date;t.setDate(t.getDate()+wpmDeduper.cookieExpiresDays);let o=[];checkCookie()&&(o=JSON.parse(wpm.getCookie(wpmDeduper.keyName))),o.includes(e)||(o.push(e),document.cookie=wpmDeduper.keyName+"="+JSON.stringify(o)+";expires="+t.toUTCString())}"function"==typeof wpm.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&wpm.storeOrderIdOnServer(e,t)},wpm.isOrderIdStored=e=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(wpmDeduper.keyName)&&JSON.parse(localStorage.getItem(wpmDeduper.keyName)).includes(e):!!checkCookie()&&JSON.parse(wpm.getCookie(wpmDeduper.keyName)).includes(e):(console.log("order duplication prevention: off"),!1),wpm.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),wpm.removeProductFromCart=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;try{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");let o;if(o=null==t?wpmDataLayer.cart[e].quantity:t,wpmDataLayer.cart[e]){let r=wpm.getProductDetailsFormattedForEvent(e,o);jQuery(document).trigger("wpmRemoveFromCart",r),null==t||wpmDataLayer.cart[e].quantity===t?(delete wpmDataLayer.cart[e],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity-o,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},wpm.getIdBasedOndVariationsOutputSetting=e=>{try{var t,o;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(o=t.general)&&void 0!==o&&o.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},wpm.addProductToCart=(e,t)=>{try{var o;if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[e]){var r;let o=wpm.getProductDetailsFormattedForEvent(e,t);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[e]?wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity+t:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[e]=wpm.getProductDetailsFormattedForEvent(e,t)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(e){console.error(e),wpm.getCartItemsFromBackend()}},wpm.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?wpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):wpm.getCartItemsFromBackend()},wpm.getCartItemsFromBackend=()=>{try{fetch(wpm.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((e=>{if(!e.success)throw Error("Error getting cart items from backend");e.data.cart||(e.data.cart={}),wpm.saveCartObjectToDataLayer(e.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(e.data.cart))}))}catch(e){console.error(e)}},wpm.getProductsFromBackend=async e=>{var t;if(null!==(t=wpmDataLayer)&&void 0!==t&&t.products&&(e=e.filter((e=>!wpmDataLayer.products.hasOwnProperty(e)))),e&&0!==e.length){try{let t;if(t=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}):await fetch(wpm.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:e})}),t.ok){let e=await t.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}},wpm.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},wpm.triggerViewItemEventPrep=async e=>{wpmDataLayer.products&&wpmDataLayer.products[e]||await wpm.getProductsFromBackend([e]),wpm.triggerViewItemEvent(e)},wpm.triggerViewItemEvent=e=>{let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)},wpm.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},wpm.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null,o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},wpm.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},wpm.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},wpm.triggerViewItemList=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",wpm.getProductDataForViewItemEvent(e))},wpm.getProductDataForViewItemEvent=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[e])return wpm.getProductDetailsFormattedForEvent(e)}catch(e){console.error(e)}},wpm.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},wpm.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})},wpm.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let ioTimeouts={},io;wpm.observerCallback=(e,t)=>{e.forEach((e=>{try{let o,r=jQuery(e.target).data("ioid");if(o=jQuery(e.target).next(".wpmProductId").length?jQuery(e.target).next(".wpmProductId").data("id"):jQuery(e.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");e.isIntersecting?ioTimeouts[r]=setTimeout((()=>{wpm.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&wpm.viewItemListTriggerTestMode(e.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&t.unobserve(e.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(ioTimeouts[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(e.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let ioid=0,allIoElementsToWatch,getAllElementsToWatch=()=>{allIoElementsToWatch=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}))};wpm.startIntersectionObserverToWatch=()=>{try{wpm.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),io=new IntersectionObserver(wpm.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),getAllElementsToWatch(),allIoElementsToWatch.each(((e,t)=>{jQuery(t[0]).data("ioid",ioid++),io.observe(t[0])}))}catch(e){console.error(e)}},wpm.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&productsMutationObserver.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let productsMutationObserver=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"))&&hasWpmProductIdElement(this)&&(jQuery(this).data("ioid",ioid++),io.observe(this))}))}))})),hasWpmProductIdElement=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);wpm.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"",o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(o){let r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3);let a="expires="+r.toUTCString();document.cookie=e+"="+t+";"+a+";path=/"}else document.cookie=e+"="+t+";path=/"},wpm.getCookie=e=>{let t=e+"=",o=decodeURIComponent(document.cookie).split(";");for(let e=0;e<o.length;e++){let r=o[e];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""},wpm.deleteCookie=e=>{wpm.setCookie(e,"",-1)},wpm.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},wpm.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},wpm.storeOrderIdOnServer=async(e,t)=>{try{let o;o=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:e,source:t}),keepalive:!0,cache:"no-cache"}):await fetch(wpm.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:e,source:t}),keepalive:!0}),o.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}catch(e){console.error(e)}},wpm.getProductIdByCartItemKeyUrl=e=>{let t,o=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[o].variation_id?wpmDataLayer.cartItemKeys[o].product_id:wpmDataLayer.cartItemKeys[o].variation_id,t},wpm.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(),wpm.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==undefined?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},wpm.setReferrerToCookie=()=>{wpm.getCookie("wpmReferrer")||wpm.setCookie("wpmReferrer",document.referrer)},wpm.getReferrerFromCookie=()=>wpm.getCookie("wpmReferrer")?wpm.getCookie("wpmReferrer"):null,wpm.getClidFromBrowser=function(){let e,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"gclid";return e={gclid:"_gcl_aw",dclid:"_gcl_dc"},wpm.getCookie(e[t])?wpm.getCookie(e[t]).match(/(GCL.[\d]*.)(.*)/)[2]:""},wpm.getUserAgent=()=>navigator.userAgent,wpm.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),wpm.version=()=>{console.log(wpmDataLayer.version)},wpm.loadScriptAndCacheIt=url=>fetch(url,{method:"GET",cache:"default",keepalive:!0}).then((e=>{if(e.ok)return e.text();throw new Error("Network response was not ok: "+url)})).then((script=>{eval(script)})).catch((e=>{console.error(e)})),wpm.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,wpm.hasLoginEventFired=()=>{let e=wpm.getWpmSessionData();return null==e?void 0:e.loginEventFired},wpm.setLoginEventFired=()=>{let e=wpm.getWpmSessionData();e.loginEventFired=!0,wpm.setWpmSessionData(e)},wpm.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),wpm.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),wpm.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},wpm.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),wpm.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),wpm.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(""))),wpm.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let o=wpmDataLayer.cart[e];t+=o.quantity*o.price}return t}})(window.wpm=window.wpm||{},jQuery)},3534:(e,t,o)=>{o(9584),o(473)},7207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((function(){wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var o=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](o,o.exports,__webpack_require__),o.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__(3534),wpm.jQueryExists().then((function(){__webpack_require__(3299),__webpack_require__(8069),__webpack_require__(5012),__webpack_require__(8787),__webpack_require__(7207)}))})();
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":"8CAAA,IAAIA,EAAaC,EAAQ,MACrBC,EAAcD,EAAQ,MAEtBE,EAAaC,UAGjBC,EAAOC,QAAU,SAAUC,GACzB,GAAIP,EAAWO,GAAW,OAAOA,EACjC,MAAMJ,EAAWD,EAAYK,GAAY,qBAC1C,C,iBCTD,IAAIC,EAAkBP,EAAQ,MAC1BQ,EAASR,EAAQ,MACjBS,EAAiBT,EAAAA,MAAAA,EAEjBU,EAAcH,EAAgB,eAC9BI,EAAiBC,MAAMC,UAIQC,MAA/BH,EAAeD,IACjBD,EAAeE,EAAgBD,EAAa,CAC1CK,cAAc,EACdC,MAAOR,EAAO,QAKlBJ,EAAOC,QAAU,SAAUY,GACzBN,EAAeD,GAAaO,IAAO,CACpC,C,gBCnBD,IAAIC,EAAWlB,EAAQ,MAEnBmB,EAAUC,OACVlB,EAAaC,UAGjBC,EAAOC,QAAU,SAAUC,GACzB,GAAIY,EAASZ,GAAW,OAAOA,EAC/B,MAAMJ,EAAWiB,EAAQb,GAAY,oBACtC,C,iBCTD,IAAIe,EAAkBrB,EAAQ,MAC1BsB,EAAkBtB,EAAQ,KAC1BuB,EAAoBvB,EAAQ,KAG5BwB,EAAe,SAAUC,GAC3B,OAAO,SAAUC,EAAOC,EAAIC,GAC1B,IAGIZ,EAHAa,EAAIR,EAAgBK,GACpBI,EAASP,EAAkBM,GAC3BE,EAAQT,EAAgBM,EAAWE,GAIvC,GAAIL,GAAeE,GAAMA,GAAI,KAAOG,EAASC,GAG3C,IAFAf,EAAQa,EAAEE,OAEGf,EAAO,OAAO,OAEtB,KAAMc,EAASC,EAAOA,IAC3B,IAAKN,GAAeM,KAASF,IAAMA,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AOA,MACxC,CACA,CAPuB,GCCxBkoB,oBAAoBjR,EAAKne,IACH,oBAAXkL,QAA0BA,OAAOukB,aAC1C5rB,OAAOzD,eAAeJ,EAASkL,OAAOukB,YAAa,CAAE9uB,MAAO,WAE7DkD,OAAOzD,eAAeJ,EAAS,aAAc,CAAEW,OAAO,GAAO,E,2BCD9DhB,oBAAQ,MAGRsR,IAAIgd,eAAerW,MAAK,WAEvBjY,oBAAQ,MAERA,oBAAQ,MACRA,oBAAQ,MACRA,oBAAQ,MAuBRA,oBAAQ,KACR,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/a-callable.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/add-to-unscopables.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/an-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/array-includes.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/classof-raw.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/create-property-descriptor.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/define-built-in.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/define-global-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/descriptors.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/document-create-element.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/engine-user-agent.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/engine-v8-version.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/enum-bug-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/export.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/fails.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-bind-native.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-call.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-name.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-uncurry-this.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/get-built-in.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/get-method.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/global.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/has-own-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/hidden-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/html.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/ie8-dom-define.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/indexed-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/inspect-source.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/internal-state.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-callable.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-forced.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-pure.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-symbol.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/length-of-array-like.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/make-built-in.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/math-trunc.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/native-symbol.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/native-weak-map.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-create.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-define-properties.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-define-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-is-prototype-of.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-keys-internal.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/ordinary-to-primitive.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/own-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/require-object-coercible.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/shared-key.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/shared-store.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/shared.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-absolute-index.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-indexed-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-integer-or-infinity.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-length.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-primitive.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-property-key.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/try-to-string.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/uid.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/use-symbol-as-uid.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/v8-prototype-define-bug.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/well-known-symbol.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/modules/es.array.includes.js","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/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/webpack/runtime/global","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/make namespace object","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a function');\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n defineProperty(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw $TypeError($String(argument) + ' is not an object');\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n","var global = require('../internals/global');\n\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar uncurryThis = NATIVE_BIND && bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? function (fn) {\n return fn && uncurryThis(fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es-x/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es-x/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","module.exports = {};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget(store, it) || {};\n };\n has = function (it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","module.exports = false;\n","var getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es-x/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n","/* eslint-disable es-x/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es-x/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es-x/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es-x/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw $TypeError(\"Can't convert object to primitive value\");\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","var $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw $TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || defineGlobalProperty(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.24.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n","var call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","var $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","/* eslint-disable es-x/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar symbolFor = Symbol && Symbol['for'];\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n var description = 'Symbol.' + name;\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else if (USE_SYMBOL_AS_UID && symbolFor) {\n WellKnownSymbolsStore[name] = symbolFor(description);\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n }\n } return WellKnownSymbolsStore[name];\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n return !Array(1).includes();\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","/**\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 (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"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()) {\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) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\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?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\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?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\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?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\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?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\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?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\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.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 (wpmDataLayer?.user?.id) {\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\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\t\t\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\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\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\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\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\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t// jQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\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// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\t// jQuery(document).on(\"CookiebotOnAccept\", () => {\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.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\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\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// add_to_cart event\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", (event) => {\n\n\ttry {\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\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (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// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), () => {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", (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// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", () => {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", () => {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", (event) => {\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\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\n// add_to_wishlist\njQuery(function () {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(() => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\twpm.triggerViewItemEventPrep(productId)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\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\n/**\n * Set up wpm events\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 */\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)\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// 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/**\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\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/**\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\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/**\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\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/**\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\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/**\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(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\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/**\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 * 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/post/\",\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, 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(orderId, 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// reduce productIds by products already in the dataLayer\n\t\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\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(productIds),\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 (orderId, 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},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource: source\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache\t: \"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\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\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\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\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// https://api.jquery.com/jquery.getscript/\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\treturn 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\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}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./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":["isCallable","require","tryToString","$TypeError","TypeError","module","exports","argument","wellKnownSymbol","create","defineProperty","UNSCOPABLES","ArrayPrototype","Array","prototype","undefined","configurable","value","key","isObject","$String","String","toIndexedObject","toAbsoluteIndex","lengthOfArrayLike","createMethod","IS_INCLUDES","$this","el","fromIndex","O","length","index","includes","indexOf","uncurryThis","toString","stringSlice","slice","it","hasOwn","ownKeys","getOwnPropertyDescriptorModule","definePropertyModule","target","source","exceptions","keys","f","getOwnPropertyDescriptor","i","DESCRIPTORS","createPropertyDescriptor","object","bitmap","enumerable","writable","makeBuiltIn","defineGlobalProperty","options","simple","name","global","unsafe","error","nonConfigurable","nonWritable","Object","fails","get","document","EXISTS","createElement","getBuiltIn","match","version","userAgent","process","Deno","versions","v8","split","createNonEnumerableProperty","defineBuiltIn","copyConstructorProperties","isForced","targetProperty","sourceProperty","descriptor","TARGET","GLOBAL","STATIC","stat","dontCallGetSet","forced","sham","exec","test","bind","hasOwnProperty","NATIVE_BIND","call","Function","apply","arguments","FunctionPrototype","getDescriptor","PROPER","CONFIGURABLE","fn","aFunction","namespace","method","aCallable","V","P","func","check","Math","globalThis","window","self","this","toObject","a","classof","$Object","propertyIsEnumerable","store","functionToString","inspectSource","set","has","NATIVE_WEAK_MAP","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","state","wmget","wmhas","wmset","metadata","facade","STATE","enforce","getterFor","TYPE","type","replacement","feature","detection","data","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","isPrototypeOf","USE_SYMBOL_AS_UID","$Symbol","toLength","obj","CONFIGURABLE_FUNCTION_NAME","InternalStateModule","enforceInternalState","getInternalState","CONFIGURABLE_LENGTH","TEMPLATE","getter","setter","arity","constructor","join","ceil","floor","trunc","x","n","V8_VERSION","getOwnPropertySymbols","symbol","Symbol","activeXDocument","anObject","definePropertiesModule","enumBugKeys","html","documentCreateElement","IE_PROTO","EmptyConstructor","scriptTag","content","LT","NullProtoObjectViaActiveX","write","close","temp","parentWindow","NullProtoObject","ActiveXObject","iframeDocument","iframe","domain","style","display","appendChild","src","contentWindow","open","F","Properties","result","V8_PROTOTYPE_DEFINE_BUG","objectKeys","defineProperties","props","IE8_DOM_DEFINE","toPropertyKey","$defineProperty","$getOwnPropertyDescriptor","Attributes","current","propertyIsEnumerableModule","internalObjectKeys","concat","getOwnPropertyNames","push","names","$propertyIsEnumerable","NASHORN_BUG","input","pref","val","valueOf","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","uid","SHARED","IS_PURE","mode","copyright","license","toIntegerOrInfinity","max","min","integer","IndexedObject","requireObjectCoercible","number","isSymbol","getMethod","ordinaryToPrimitive","TO_PRIMITIVE","exoticToPrim","toPrimitive","id","postfix","random","NATIVE_SYMBOL","iterator","WellKnownSymbolsStore","symbolFor","createWellKnownSymbol","withoutSetter","description","$","$includes","addToUnscopables","proto","jQuery","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","console","setFbUserData","fbUserData","b","e","callMethod","queue","_fbq","t","async","s","getElementsByTagName","parentNode","insertBefore","isFbpSet","getUserIdentifiersForFb","user","external_id","order","user_id","email","em","billing_email_hashed","first_name","billing_first_name","last_name","ln","billing_last_name","phone","ph","billing_phone","city","ct","billing_city","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","client_user_agent","RegExp","fbGetProductDataForCapiEvent","product","content_type","content_name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","parseFloat","quantity","price","currency","facebookContentIds","prodIds","item","entries","items","general","variationsOutput","variation_id","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","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","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","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","consent_mode","active","getConsentValues","categories","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","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","r","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","JSON","parse","action","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","addEventListener","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","explicitConsentStateAlreadySet","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","each","find","classes","getPostIdFromString","one","closest","matches","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","setCookie","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","getItem","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","keyName","cookieExpiresDays","wpmRestSettings","cookiePmwRestEndpointAvailable","restEndpointPost","restFails","restFailsThreshold","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","cache","keepalive","setItem","stringify","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","URLSearchParams","ok","json","success","filter","headers","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","ioTimeouts","io","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","ioid","allIoElementsToWatch","getAllElementsToWatch","map","elem","parent","hasClass","prev","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","order_id","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","clientWidth","innerWidth","height","clientHeight","innerHeight","text","eval","catch","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Uint8Array","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","g","toStringTag"],"sourceRoot":""}
1
+ {"version":3,"file":"wpm-public.p1.min.js","mappings":"8CAAA,IAAIA,EAAaC,EAAQ,MACrBC,EAAcD,EAAQ,MAEtBE,EAAaC,UAGjBC,EAAOC,QAAU,SAAUC,GACzB,GAAIP,EAAWO,GAAW,OAAOA,EACjC,MAAMJ,EAAWD,EAAYK,GAAY,qBAC1C,C,iBCTD,IAAIC,EAAkBP,EAAQ,MAC1BQ,EAASR,EAAQ,MACjBS,EAAiBT,EAAAA,MAAAA,EAEjBU,EAAcH,EAAgB,eAC9BI,EAAiBC,MAAMC,UAIQC,MAA/BH,EAAeD,IACjBD,EAAeE,EAAgBD,EAAa,CAC1CK,cAAc,EACdC,MAAOR,EAAO,QAKlBJ,EAAOC,QAAU,SAAUY,GACzBN,EAAeD,GAAaO,IAAO,CACpC,C,gBCnBD,IAAIC,EAAWlB,EAAQ,MAEnBmB,EAAUC,OACVlB,EAAaC,UAGjBC,EAAOC,QAAU,SAAUC,GACzB,GAAIY,EAASZ,GAAW,OAAOA,EAC/B,MAAMJ,EAAWiB,EAAQb,GAAY,oBACtC,C,iBCTD,IAAIe,EAAkBrB,EAAQ,MAC1BsB,EAAkBtB,EAAQ,KAC1BuB,EAAoBvB,EAAQ,KAG5BwB,EAAe,SAAUC,GAC3B,OAAO,SAAUC,EAAOC,EAAIC,GAC1B,IAGIZ,EAHAa,EAAIR,EAAgBK,GACpBI,EAASP,EAAkBM,GAC3BE,EAAQT,EAAgBM,EAAWE,GAIvC,GAAIL,GAAeE,GAAMA,GAAI,KAAOG,EAAS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CCtBAovB,oBAAoBI,EAAI,WACvB,GAA0B,iBAAfvoB,WAAyB,OAAOA,WAC3C,IACC,OAAOG,MAAQ,IAAIpB,SAAS,cAAb,EAGhB,CAFE,MAAO8L,GACR,GAAsB,iBAAX5K,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCCxBkoB,oBAAoBjR,EAAKne,IACH,oBAAXkL,QAA0BA,OAAOukB,aAC1C5rB,OAAOzD,eAAeJ,EAASkL,OAAOukB,YAAa,CAAE9uB,MAAO,WAE7DkD,OAAOzD,eAAeJ,EAAS,aAAc,CAAEW,OAAO,GAAO,E,2BCD9DhB,oBAAQ,MAGRsR,IAAIgd,eAAerW,MAAK,WAEvBjY,oBAAQ,MAERA,oBAAQ,MACRA,oBAAQ,MACRA,oBAAQ,MAuBRA,oBAAQ,KACR,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/a-callable.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/add-to-unscopables.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/an-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/array-includes.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/classof-raw.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/create-property-descriptor.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/define-built-in.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/define-global-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/descriptors.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/document-create-element.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/engine-user-agent.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/engine-v8-version.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/enum-bug-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/export.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/fails.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-bind-native.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-call.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-name.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/function-uncurry-this.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/get-built-in.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/get-method.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/global.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/has-own-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/hidden-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/html.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/ie8-dom-define.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/indexed-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/inspect-source.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/internal-state.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-callable.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-forced.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-pure.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/is-symbol.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/length-of-array-like.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/make-built-in.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/math-trunc.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/native-symbol.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/native-weak-map.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-create.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-define-properties.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-define-property.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-is-prototype-of.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-keys-internal.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/ordinary-to-primitive.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/own-keys.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/require-object-coercible.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/shared-key.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/shared-store.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/shared.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-absolute-index.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-indexed-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-integer-or-infinity.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-length.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-object.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-primitive.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/to-property-key.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/try-to-string.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/uid.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/use-symbol-as-uid.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/v8-prototype-define-bug.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/internals/well-known-symbol.js","webpack://Pixel-Manager-for-WooCommerce/./node_modules/core-js/modules/es.array.includes.js","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/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/webpack/runtime/global","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/make namespace object","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a function');\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n defineProperty(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw $TypeError($String(argument) + ' is not an object');\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n","var global = require('../internals/global');\n\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar uncurryThis = NATIVE_BIND && bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? function (fn) {\n return fn && uncurryThis(fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es-x/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es-x/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","module.exports = {};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget(store, it) || {};\n };\n has = function (it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","module.exports = false;\n","var getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es-x/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n","/* eslint-disable es-x/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es-x/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es-x/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es-x/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw $TypeError(\"Can't convert object to primitive value\");\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","var $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw $TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || defineGlobalProperty(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.24.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n","var call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","var $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","/* eslint-disable es-x/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar symbolFor = Symbol && Symbol['for'];\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n var description = 'Symbol.' + name;\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else if (USE_SYMBOL_AS_UID && symbolFor) {\n WellKnownSymbolsStore[name] = symbolFor(description);\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n }\n } return WellKnownSymbolsStore[name];\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar fails = require('../internals/fails');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// FF99+ bug\nvar BROKEN_ON_SPARSE = fails(function () {\n return !Array(1).includes();\n});\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","/**\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 (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"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()) {\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) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\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?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\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?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\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?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\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?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\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?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\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.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 (wpmDataLayer?.user?.id) {\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\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\t\t\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\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) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\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\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\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\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\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t// jQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\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// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\t// jQuery(document).on(\"CookiebotOnAccept\", () => {\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.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\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\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// add_to_cart event\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", (event) => {\n\n\ttry {\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\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (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// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n]\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).one(\"click init_checkout\", checkoutButtonClasses.join(\",\"), () => {\n\t// console.log(\"begin_checkout\", new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", (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// 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// track checkout option event: purchase click\n// jQuery(document).one(\"click\", \"#place_order\", () => {\n// https://stackoverflow.com/a/34112407/4688612\njQuery(() => {\n\tjQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t\tif (false === wpm.emailSelected) {\n\t\t\twpm.fireCheckoutProgress(2)\n\t\t}\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\t}\n\n\t\twpm.fireCheckoutProgress(4)\n\t})\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", (event) => {\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\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\n// add_to_wishlist\njQuery(function () {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(() => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\twpm.triggerViewItemEventPrep(productId)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\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\n/**\n * Set up wpm events\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 */\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)\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// 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/**\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\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/**\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\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/**\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\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/**\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\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/**\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(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\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/**\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 * 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, 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(orderId, 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// reduce productIds by products already in the dataLayer\n\t\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\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(productIds),\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 (orderId, 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},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource: source\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache\t: \"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\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\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\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\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// https://api.jquery.com/jquery.getscript/\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\treturn 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\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}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./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":["isCallable","require","tryToString","$TypeError","TypeError","module","exports","argument","wellKnownSymbol","create","defineProperty","UNSCOPABLES","ArrayPrototype","Array","prototype","undefined","configurable","value","key","isObject","$String","String","toIndexedObject","toAbsoluteIndex","lengthOfArrayLike","createMethod","IS_INCLUDES","$this","el","fromIndex","O","length","index","includes","indexOf","uncurryThis","toString","stringSlice","slice","it","hasOwn","ownKeys","getOwnPropertyDescriptorModule","definePropertyModule","target","source","exceptions","keys","f","getOwnPropertyDescriptor","i","DESCRIPTORS","createPropertyDescriptor","object","bitmap","enumerable","writable","makeBuiltIn","defineGlobalProperty","options","simple","name","global","unsafe","error","nonConfigurable","nonWritable","Object","fails","get","document","EXISTS","createElement","getBuiltIn","match","version","userAgent","process","Deno","versions","v8","split","createNonEnumerableProperty","defineBuiltIn","copyConstructorProperties","isForced","targetProperty","sourceProperty","descriptor","TARGET","GLOBAL","STATIC","stat","dontCallGetSet","forced","sham","exec","test","bind","hasOwnProperty","NATIVE_BIND","call","Function","apply","arguments","FunctionPrototype","getDescriptor","PROPER","CONFIGURABLE","fn","aFunction","namespace","method","aCallable","V","P","func","check","Math","globalThis","window","self","this","toObject","a","classof","$Object","propertyIsEnumerable","store","functionToString","inspectSource","set","has","NATIVE_WEAK_MAP","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","state","wmget","wmhas","wmset","metadata","facade","STATE","enforce","getterFor","TYPE","type","replacement","feature","detection","data","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","isPrototypeOf","USE_SYMBOL_AS_UID","$Symbol","toLength","obj","CONFIGURABLE_FUNCTION_NAME","InternalStateModule","enforceInternalState","getInternalState","CONFIGURABLE_LENGTH","TEMPLATE","getter","setter","arity","constructor","join","ceil","floor","trunc","x","n","V8_VERSION","getOwnPropertySymbols","symbol","Symbol","activeXDocument","anObject","definePropertiesModule","enumBugKeys","html","documentCreateElement","IE_PROTO","EmptyConstructor","scriptTag","content","LT","NullProtoObjectViaActiveX","write","close","temp","parentWindow","NullProtoObject","ActiveXObject","iframeDocument","iframe","domain","style","display","appendChild","src","contentWindow","open","F","Properties","result","V8_PROTOTYPE_DEFINE_BUG","objectKeys","defineProperties","props","IE8_DOM_DEFINE","toPropertyKey","$defineProperty","$getOwnPropertyDescriptor","Attributes","current","propertyIsEnumerableModule","internalObjectKeys","concat","getOwnPropertyNames","push","names","$propertyIsEnumerable","NASHORN_BUG","input","pref","val","valueOf","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","uid","SHARED","IS_PURE","mode","copyright","license","toIntegerOrInfinity","max","min","integer","IndexedObject","requireObjectCoercible","number","isSymbol","getMethod","ordinaryToPrimitive","TO_PRIMITIVE","exoticToPrim","toPrimitive","id","postfix","random","NATIVE_SYMBOL","iterator","WellKnownSymbolsStore","symbolFor","createWellKnownSymbol","withoutSetter","description","$","$includes","addToUnscopables","proto","jQuery","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","console","setFbUserData","fbUserData","b","e","callMethod","queue","_fbq","t","async","s","getElementsByTagName","parentNode","insertBefore","isFbpSet","getUserIdentifiersForFb","user","external_id","order","user_id","email","em","billing_email_hashed","first_name","billing_first_name","last_name","ln","billing_last_name","phone","ph","billing_phone","city","ct","billing_city","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","client_user_agent","RegExp","fbGetProductDataForCapiEvent","product","content_type","content_name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","parseFloat","quantity","price","currency","facebookContentIds","prodIds","item","entries","items","general","variationsOutput","variation_id","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","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","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","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","consent_mode","active","getConsentValues","categories","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","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","r","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","JSON","parse","action","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","addEventListener","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","explicitConsentStateAlreadySet","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","each","find","classes","getPostIdFromString","one","closest","matches","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","setCookie","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","getItem","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","keyName","cookieExpiresDays","wpmRestSettings","cookiePmwRestEndpointAvailable","restEndpointPost","restFails","restFailsThreshold","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","cache","keepalive","setItem","stringify","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","URLSearchParams","ok","json","success","filter","headers","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","ioTimeouts","io","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","ioid","allIoElementsToWatch","getAllElementsToWatch","map","elem","parent","hasClass","prev","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","order_id","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","clientWidth","innerWidth","height","clientHeight","innerHeight","text","eval","catch","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Uint8Array","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","g","toStringTag"],"sourceRoot":""}
languages/woocommerce-google-adwords-conversion-tracking-tag.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GNU General Public License v3.0.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Pixel Manager for WooCommerce 1.19.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-08-14T09:51:57+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
@@ -34,813 +34,832 @@ msgstr ""
34
  msgid "https://sweetcode.com"
35
  msgstr ""
36
 
37
- #: classes/admin/class-admin.php:289
38
- #: classes/admin/class-admin.php:290
39
- #: wgact.php:240
40
- #: wgact.php:241
41
  msgid "Pixel Manager"
42
  msgstr ""
43
 
44
- #: classes/admin/class-admin.php:330
45
  msgid "Main"
46
  msgstr ""
47
 
48
- #: classes/admin/class-admin.php:351
49
  msgid "Google"
50
  msgstr ""
51
 
52
- #: classes/admin/class-admin.php:374
53
  msgid "Google Ads Conversion ID"
54
  msgstr ""
55
 
56
- #: classes/admin/class-admin.php:386
57
  msgid "Google Ads Purchase Conversion Label"
58
  msgstr ""
59
 
60
- #: classes/admin/class-admin.php:397
61
  msgid "Google Analytics UA"
62
  msgstr ""
63
 
64
- #: classes/admin/class-admin.php:408
65
  msgid "Google Analytics 4"
66
  msgstr ""
67
 
68
- #: classes/admin/class-admin.php:419
69
  msgid "Google Optimize"
70
  msgstr ""
71
 
72
- #: classes/admin/class-admin.php:431
73
  msgid "Meta (Facebook)"
74
  msgstr ""
75
 
76
- #: classes/admin/class-admin.php:454
77
  msgid "Meta (Facebook) pixel ID"
78
  msgstr ""
79
 
80
- #: classes/admin/class-admin.php:466
81
  msgid "more pixels"
82
  msgstr ""
83
 
84
- #: classes/admin/class-admin.php:491
85
  msgid "Microsoft Advertising UET tag ID"
86
  msgstr ""
87
 
88
- #: classes/admin/class-admin.php:503
89
  msgid "Twitter pixel ID"
90
  msgstr ""
91
 
92
- #: classes/admin/class-admin.php:515
93
  msgid "Pinterest pixel ID"
94
  msgstr ""
95
 
96
- #: classes/admin/class-admin.php:527
97
  msgid "Snapchat pixel ID"
98
  msgstr ""
99
 
100
- #: classes/admin/class-admin.php:539
101
  msgid "TikTok pixel ID"
102
  msgstr ""
103
 
104
- #: classes/admin/class-admin.php:552
105
  msgid "Hotjar site ID"
106
  msgstr ""
107
 
108
- #: classes/admin/class-admin.php:564
109
  msgid "Advanced"
110
  msgstr ""
111
 
112
- #: classes/admin/class-admin.php:615
113
  msgid "Order Total Logic"
114
  msgstr ""
115
 
116
- #: classes/admin/class-admin.php:627
117
  msgid "Order Duplication Prevention"
118
  msgstr ""
119
 
120
- #: classes/admin/class-admin.php:639
121
  msgid "Maximum Compatibility Mode"
122
  msgstr ""
123
 
124
- #: classes/admin/class-admin.php:653
125
  msgid "Disable Tracking for User Roles"
126
  msgstr ""
127
 
128
- #: classes/admin/class-admin.php:687
 
 
 
 
129
  msgid "Conversion Cart Data"
130
  msgstr ""
131
 
132
- #: classes/admin/class-admin.php:700
133
  msgid "Enhanced E-Commerce"
134
  msgstr ""
135
 
136
- #: classes/admin/class-admin.php:712
137
  msgid "GA 4 API secret"
138
  msgstr ""
139
 
140
- #: classes/admin/class-admin.php:725
141
  msgid "Enhanced Link Attribution"
142
  msgstr ""
143
 
144
- #: classes/admin/class-admin.php:738
145
  msgid "Google User ID"
146
  msgstr ""
147
 
148
- #: classes/admin/class-admin.php:750
149
  msgid "Google Ads Enhanced Conversions"
150
  msgstr ""
151
 
152
- #: classes/admin/class-admin.php:764
153
  msgid "Google Ads Phone Conversion Number"
154
  msgstr ""
155
 
156
- #: classes/admin/class-admin.php:776
157
  msgid "Google Ads Phone Conversion Label"
158
  msgstr ""
159
 
160
- #: classes/admin/class-admin.php:789
161
  msgid "Cookie Consent Management"
162
  msgstr ""
163
 
164
- #: classes/admin/class-admin.php:812
165
  msgid "Google Consent Mode"
166
  msgstr ""
167
 
168
- #: classes/admin/class-admin.php:824
169
  msgid "Google Consent Regions"
170
  msgstr ""
171
 
172
- #: classes/admin/class-admin.php:836
173
  msgid "Explicit Consent Mode"
174
  msgstr ""
175
 
176
- #: classes/admin/class-admin.php:849
177
  msgid "Borlabs Cookie support"
178
  msgstr ""
179
 
180
- #: classes/admin/class-admin.php:863
181
  msgid "Cookiebot support"
182
  msgstr ""
183
 
184
- #: classes/admin/class-admin.php:877
185
  msgid "Complianz GDPR support"
186
  msgstr ""
187
 
188
- #: classes/admin/class-admin.php:891
189
  msgid "Cookie Notice support"
190
  msgstr ""
191
 
192
- #: classes/admin/class-admin.php:905
193
  msgid "Cookie Script support"
194
  msgstr ""
195
 
196
- #: classes/admin/class-admin.php:919
197
  msgid "GDPR Cookie Compliance support"
198
  msgstr ""
199
 
200
- #: classes/admin/class-admin.php:933
201
  msgid "GDPR Cookie Consent support"
202
  msgstr ""
203
 
204
- #: classes/admin/class-admin.php:966
205
  msgid "Meta (Facebook) CAPI: token"
206
  msgstr ""
207
 
208
- #: classes/admin/class-admin.php:978
209
  msgid "Meta (Facebook) CAPI: process anonymous hits"
210
  msgstr ""
211
 
212
- #: classes/admin/class-admin.php:990
213
  msgid "Meta (Facebook) CAPI: send additional visitor identifiers"
214
  msgstr ""
215
 
216
- #: classes/admin/class-admin.php:1002
217
  msgid "Meta (Facebook) Microdata Tags for Catalogues"
218
  msgstr ""
219
 
220
- #: classes/admin/class-admin.php:1014
221
- #: classes/admin/class-admin.php:1027
222
- #: classes/admin/class-admin.php:1038
223
  msgid "Dynamic Remarketing"
224
  msgstr ""
225
 
226
- #: classes/admin/class-admin.php:1050
227
  msgid "Product Identifier"
228
  msgstr ""
229
 
230
- #: classes/admin/class-admin.php:1062
231
  msgid "Variations output"
232
  msgstr ""
233
 
234
- #: classes/admin/class-admin.php:1075
235
  msgid "Google Business Vertical"
236
  msgstr ""
237
 
238
- #: classes/admin/class-admin.php:1088
239
- #: classes/admin/class-admin.php:1097
240
  msgid "Diagnostics"
241
  msgstr ""
242
 
243
- #: classes/admin/class-admin.php:1105
244
- #: classes/admin/class-admin.php:1114
245
  msgid "Support"
246
  msgstr ""
247
 
248
- #: classes/admin/class-admin.php:1122
249
- #: classes/admin/class-admin.php:1132
250
  msgid "Author"
251
  msgstr ""
252
 
253
- #: classes/admin/class-admin.php:1179
254
  msgid ""
255
  "It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.\n"
256
  " In order for the plugin to work properly you need to disable the script blocker."
257
  msgstr ""
258
 
259
- #: classes/admin/class-admin.php:1186
260
- #: classes/admin/class-notifications.php:31
261
- #: classes/admin/class-notifications.php:73
262
- #: classes/admin/class-notifications.php:114
263
- #: classes/admin/class-notifications.php:164
264
  msgid "Learn more"
265
  msgstr ""
266
 
267
- #: classes/admin/class-admin.php:1230
268
  msgid "Profit Driven Marketing by SweetCode"
269
  msgstr ""
270
 
271
- #: classes/admin/class-admin.php:1255
272
  msgid "Visit us here:"
273
  msgstr ""
274
 
275
- #: classes/admin/class-admin.php:1301
276
  msgid "Payment Gateway Tracking Accuracy Report"
277
  msgstr ""
278
 
279
- #: classes/admin/class-admin.php:1302
280
- #: classes/admin/class-admin.php:2629
 
281
  msgid "beta"
282
  msgstr ""
283
 
284
- #: classes/admin/class-admin.php:1306
285
  msgid "What's this? Follow this link to learn more"
286
  msgstr ""
287
 
288
- #: classes/admin/class-admin.php:1314
289
  msgid "Available payment gateways"
290
  msgstr ""
291
 
292
- #: classes/admin/class-admin.php:1326
293
  msgid "id"
294
  msgstr ""
295
 
296
- #: classes/admin/class-admin.php:1327
297
  msgid "method_title"
298
  msgstr ""
299
 
300
- #: classes/admin/class-admin.php:1328
301
  msgid "class"
302
  msgstr ""
303
 
304
- #: classes/admin/class-admin.php:1345
305
  msgid "Purchase confirmation page reached per gateway (active and inactive)"
306
  msgstr ""
307
 
308
- #: classes/admin/class-admin.php:1353
309
- #: classes/admin/class-admin.php:1402
 
310
  msgid "The analysis is being generated. Please check back in 5 minutes."
311
  msgstr ""
312
 
313
- #: classes/admin/class-admin.php:1394
314
  msgid "Purchase confirmation page reached per gateway (only active), weighted by frequency"
315
  msgstr ""
316
 
317
- #: classes/admin/class-admin.php:1488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  msgid "Contacting Support"
319
  msgstr ""
320
 
321
- #: classes/admin/class-admin.php:1510
322
  msgid "Debug Information"
323
  msgstr ""
324
 
325
- #: classes/admin/class-admin.php:1519
326
  msgid "copy to clipboard"
327
  msgstr ""
328
 
329
- #: classes/admin/class-admin.php:1529
330
  msgid "Export settings"
331
  msgstr ""
332
 
333
- #: classes/admin/class-admin.php:1541
334
  msgid "Export to disk"
335
  msgstr ""
336
 
337
- #: classes/admin/class-admin.php:1550
338
  msgid "Import settings"
339
  msgstr ""
340
 
341
- #: classes/admin/class-admin.php:1555
342
  msgid "Settings imported successfully!"
343
  msgstr ""
344
 
345
- #: classes/admin/class-admin.php:1558
346
  msgid "Reloading...(in 5 seconds)!"
347
  msgstr ""
348
 
349
- #: classes/admin/class-admin.php:1564
350
  msgid "There was an error importing that file! Please try again."
351
  msgstr ""
352
 
353
- #: classes/admin/class-admin.php:1581
354
  msgid "Translations"
355
  msgstr ""
356
 
357
- #: classes/admin/class-admin.php:1582
358
  msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
359
  msgstr ""
360
 
361
- #: classes/admin/class-admin.php:1600
362
  msgid "Post a support request in the WordPress support forum here: "
363
  msgstr ""
364
 
365
- #: classes/admin/class-admin.php:1603
366
  msgid "Support forum"
367
  msgstr ""
368
 
369
- #: classes/admin/class-admin.php:1607
370
  msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
371
  msgstr ""
372
 
373
- #: classes/admin/class-admin.php:1610
374
  msgid "Or send us an email to the following address: "
375
  msgstr ""
376
 
377
- #: classes/admin/class-admin.php:1626
378
  msgid "Send us your support request through the WooCommerce.com dashboard: "
379
  msgstr ""
380
 
381
- #: classes/admin/class-admin.php:1640
382
  msgid "More details about the developer of this plugin: "
383
  msgstr ""
384
 
385
- #: classes/admin/class-admin.php:1643
386
  msgid "Developer: SweetCode"
387
  msgstr ""
388
 
389
- #: classes/admin/class-admin.php:1645
390
  msgid "Website: "
391
  msgstr ""
392
 
393
- #: classes/admin/class-admin.php:1668
394
  msgid "The Google Analytics Universal property ID looks like this:"
395
  msgstr ""
396
 
397
- #: classes/admin/class-admin.php:1684
398
  msgid "The Google Analytics 4 measurement ID looks like this:"
399
  msgstr ""
400
 
401
- #: classes/admin/class-admin.php:1700
402
  msgid "The conversion ID looks similar to this:"
403
  msgstr ""
404
 
405
- #: classes/admin/class-admin.php:1716
406
  msgid "The purchase conversion label looks similar to this:"
407
  msgstr ""
408
 
409
- #: classes/admin/class-admin.php:1720
410
- #: classes/admin/class-admin.php:2451
411
  msgid "Requires an active Google Ads Conversion ID"
412
  msgstr ""
413
 
414
- #: classes/admin/class-admin.php:1738
415
  msgid "The Google Optimize container ID looks like this:"
416
  msgstr ""
417
 
418
- #: classes/admin/class-admin.php:1740
419
  msgid "or"
420
  msgstr ""
421
 
422
- #: classes/admin/class-admin.php:1756
423
  msgid "The Meta (Facebook) pixel ID looks similar to this:"
424
  msgstr ""
425
 
426
- #: classes/admin/class-admin.php:1774
427
  msgid "The Microsoft Advertising UET tag ID looks similar to this:"
428
  msgstr ""
429
 
430
- #: classes/admin/class-admin.php:1793
431
  msgid "The Twitter pixel ID looks similar to this:"
432
  msgstr ""
433
 
434
- #: classes/admin/class-admin.php:1812
435
  msgid "The Pinterest pixel ID looks similar to this:"
436
  msgstr ""
437
 
438
- #: classes/admin/class-admin.php:1831
439
  msgid "The Snapchat pixel ID looks similar to this:"
440
  msgstr ""
441
 
442
- #: classes/admin/class-admin.php:1852
443
  msgid "The TikTok pixel ID looks similar to this:"
444
  msgstr ""
445
 
446
- #: classes/admin/class-admin.php:1864
447
  msgid "The Hotjar site ID looks similar to this:"
448
  msgstr ""
449
 
450
- #: classes/admin/class-admin.php:1874
451
  msgid "Use order_subtotal: Doesn't include tax and shipping (default)"
452
  msgstr ""
453
 
454
- #: classes/admin/class-admin.php:1881
455
  msgid "Use order_total: Includes tax and shipping"
456
  msgstr ""
457
 
458
- #: classes/admin/class-admin.php:1884
459
- msgid "This is the order total amount reported back to Google Ads"
460
  msgstr ""
461
 
462
- #: classes/admin/class-admin.php:1904
463
  msgid "open the documentation"
464
  msgstr ""
465
 
466
- #: classes/admin/class-admin.php:1924
467
  msgid "Enable Google consent mode with standard settings"
468
  msgstr ""
469
 
470
- #: classes/admin/class-admin.php:1962
471
  msgid "If no region is set, then the restrictions are enabled for all regions. If you specify one or more regions, then the restrictions only apply for the specified regions."
472
  msgstr ""
473
 
474
- #: classes/admin/class-admin.php:1983
475
- msgid "Enable Google Analytics enhanced e-commerce"
476
  msgstr ""
477
 
478
- #: classes/admin/class-admin.php:1994
479
- #: classes/admin/class-admin.php:2055
480
  #: classes/admin/class-admin.php:2085
481
- msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
482
- msgstr ""
483
-
484
- #: classes/admin/class-admin.php:2016
485
  msgid "Google Analytics 4 activation required"
486
  msgstr ""
487
 
488
- #: classes/admin/class-admin.php:2021
489
- msgid "Enhanced E-Commerce activation required"
490
- msgstr ""
491
-
492
- #: classes/admin/class-admin.php:2024
493
  msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
494
  msgstr ""
495
 
496
- #: classes/admin/class-admin.php:2039
497
  msgid "Enable Google Analytics enhanced link attribution"
498
  msgstr ""
499
 
500
- #: classes/admin/class-admin.php:2074
 
 
 
 
 
501
  msgid "Enable Google user ID"
502
  msgstr ""
503
 
504
- #: classes/admin/class-admin.php:2104
505
  msgid "Enable Google Ads Enhanced Conversions"
506
  msgstr ""
507
 
508
- #: classes/admin/class-admin.php:2115
509
  msgid "You need to activate Google Ads"
510
  msgstr ""
511
 
512
- #: classes/admin/class-admin.php:2135
513
  msgid "The Google Ads phone conversion number must be in the same format as on the website."
514
  msgstr ""
515
 
516
- #: classes/admin/class-admin.php:2157
517
  msgid "Borlabs Cookie detected. Automatic support is:"
518
  msgstr ""
519
 
520
- #: classes/admin/class-admin.php:2163
521
  msgid "Cookiebot detected. Automatic support is:"
522
  msgstr ""
523
 
524
- #: classes/admin/class-admin.php:2169
525
  msgid "Complianz GDPR detected. Automatic support is:"
526
  msgstr ""
527
 
528
- #: classes/admin/class-admin.php:2175
529
  msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
530
  msgstr ""
531
 
532
- #: classes/admin/class-admin.php:2181
533
  msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
534
  msgstr ""
535
 
536
- #: classes/admin/class-admin.php:2187
537
  msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
538
  msgstr ""
539
 
540
- #: classes/admin/class-admin.php:2193
541
  msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
542
  msgstr ""
543
 
544
- #: classes/admin/class-admin.php:2212
545
  msgid "Enable Explicit Consent Mode"
546
  msgstr ""
547
 
548
- #: classes/admin/class-admin.php:2221
549
  msgid "Only activate the Explicit Consent Mode if you are also using a Cookie Management Platform (a cookie banner) that is compatible with this plugin. Find a list of compatible plugins in the documentation."
550
  msgstr ""
551
 
552
- #: classes/admin/class-admin.php:2240
553
- #: classes/admin/class-admin.php:2273
554
- #: classes/admin/class-admin.php:2302
555
- #: classes/admin/class-admin.php:2330
556
  msgid "You need to activate the Meta (Facebook) pixel"
557
  msgstr ""
558
 
559
- #: classes/admin/class-admin.php:2264
560
  msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
561
  msgstr ""
562
 
563
- #: classes/admin/class-admin.php:2293
564
  msgid "Include additional visitor's identifiers, such as IP address, email and shop ID in the CAPI hit."
565
  msgstr ""
566
 
567
- #: classes/admin/class-admin.php:2321
568
  msgid "Enable Meta (Facebook) product microdata output"
569
  msgstr ""
570
 
571
- #: classes/admin/class-admin.php:2357
572
  msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
573
  msgstr ""
574
 
575
- #: classes/admin/class-admin.php:2374
576
  msgid "Enable the maximum compatibility mode"
577
  msgstr ""
578
 
579
- #: classes/admin/class-admin.php:2410
 
 
 
 
580
  msgid "Advanced order duplication prevention is "
581
  msgstr ""
582
 
583
- #: classes/admin/class-admin.php:2412
584
  msgid "Basic order duplication prevention is "
585
  msgstr ""
586
 
587
- #: classes/admin/class-admin.php:2436
588
  msgid "Enable dynamic remarketing audience collection"
589
  msgstr ""
590
 
591
- #: classes/admin/class-admin.php:2457
592
  msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
593
  msgstr ""
594
 
595
- #: classes/admin/class-admin.php:2475
596
  msgid "Enable variations output"
597
  msgstr ""
598
 
599
- #: classes/admin/class-admin.php:2486
600
  msgid "In order for this to work you need to upload your product feed including product variations and the item_group_id. Disable it, if you choose only to upload the parent product for variable products."
601
  msgstr ""
602
 
603
- #: classes/admin/class-admin.php:2501
604
  msgid "Retail"
605
  msgstr ""
606
 
607
- #: classes/admin/class-admin.php:2511
608
  msgid "Education"
609
  msgstr ""
610
 
611
- #: classes/admin/class-admin.php:2521
612
  msgid "Hotels and rentals"
613
  msgstr ""
614
 
615
- #: classes/admin/class-admin.php:2531
616
  msgid "Jobs"
617
  msgstr ""
618
 
619
- #: classes/admin/class-admin.php:2541
620
  msgid "Local deals"
621
  msgstr ""
622
 
623
- #: classes/admin/class-admin.php:2551
624
  msgid "Real estate"
625
  msgstr ""
626
 
627
- #: classes/admin/class-admin.php:2561
628
  msgid "Custom"
629
  msgstr ""
630
 
631
- #: classes/admin/class-admin.php:2580
632
  msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
633
  msgstr ""
634
 
635
- #: classes/admin/class-admin.php:2589
636
  msgid "post ID (default)"
637
  msgstr ""
638
 
639
- #: classes/admin/class-admin.php:2595
640
  msgid "SKU"
641
  msgstr ""
642
 
643
- #: classes/admin/class-admin.php:2602
644
  msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
645
  msgstr ""
646
 
647
- #: classes/admin/class-admin.php:2609
648
  msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
649
  msgstr ""
650
 
651
- #: classes/admin/class-admin.php:2613
652
  msgid "Choose a product identifier."
653
  msgstr ""
654
 
655
- #: classes/admin/class-admin.php:2616
656
  msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
657
  msgstr ""
658
 
659
- #: classes/admin/class-admin.php:2620
660
  msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
661
  msgstr ""
662
 
663
- #: classes/admin/class-admin.php:2633
664
- #: classes/admin/class-admin.php:2638
665
  msgid "active"
666
  msgstr ""
667
 
668
- #: classes/admin/class-admin.php:2643
669
- #: classes/admin/class-admin.php:2648
670
  msgid "inactive"
671
  msgstr ""
672
 
673
- #: classes/admin/class-admin.php:2653
674
- #: classes/admin/class-admin.php:2658
675
  msgid "partially active"
676
  msgstr ""
677
 
678
- #: classes/admin/class-admin.php:2669
679
  msgid "Pro Feature"
680
  msgstr ""
681
 
682
- #: classes/admin/class-admin.php:2713
683
  msgid "You have entered an invalid Google Analytics Universal property ID."
684
  msgstr ""
685
 
686
- #: classes/admin/class-admin.php:2721
687
  msgid "You have entered an invalid Google Analytics 4 measurement ID."
688
  msgstr ""
689
 
690
- #: classes/admin/class-admin.php:2729
691
  msgid "You have entered an invalid Google Analytics 4 API key."
692
  msgstr ""
693
 
694
- #: classes/admin/class-admin.php:2737
695
  msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
696
  msgstr ""
697
 
698
- #: classes/admin/class-admin.php:2745
699
- #: classes/admin/class-admin.php:2753
700
  msgid "You have entered an invalid conversion label."
701
  msgstr ""
702
 
703
- #: classes/admin/class-admin.php:2761
704
  msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
705
  msgstr ""
706
 
707
- #: classes/admin/class-admin.php:2769
708
  msgid "You have entered an invalid Google Optimize container ID."
709
  msgstr ""
710
 
711
- #: classes/admin/class-admin.php:2777
712
  msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
713
  msgstr ""
714
 
715
- #: classes/admin/class-admin.php:2785
716
  msgid "You have entered an invalid Meta (Facebook) CAPI token."
717
  msgstr ""
718
 
719
- #: classes/admin/class-admin.php:2793
720
  msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
721
  msgstr ""
722
 
723
- #: classes/admin/class-admin.php:2801
724
  msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
725
  msgstr ""
726
 
727
- #: classes/admin/class-admin.php:2809
728
  msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
729
  msgstr ""
730
 
731
- #: classes/admin/class-admin.php:2817
732
  msgid "You have entered an invalid Snapchat pixel ID."
733
  msgstr ""
734
 
735
- #: classes/admin/class-admin.php:2825
736
  msgid "You have entered an invalid TikTok pixel ID."
737
  msgstr ""
738
 
739
- #: classes/admin/class-admin.php:2833
740
  msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
741
  msgstr ""
742
 
743
  #. translators: %d: the amount of purchase conversions that have been measured
744
- #: classes/admin/class-ask-for-rating.php:133
745
  msgid "Hey, I noticed that you tracked more than %d purchase conversions with the Pixel Manager for WooCommerce plugin - that's awesome! Could you please do me a BIG favour and give it a 5-star rating on WordPress? It will help to spread the word and boost our motivation."
746
  msgstr ""
747
 
748
- #: classes/admin/class-ask-for-rating.php:150
749
  msgid "Ok, you deserve it"
750
  msgstr ""
751
 
752
- #: classes/admin/class-ask-for-rating.php:155
753
  msgid "Nope, maybe later"
754
  msgstr ""
755
 
756
- #: classes/admin/class-ask-for-rating.php:164
757
  msgid "I already did"
758
  msgstr ""
759
 
760
- #: classes/admin/class-ask-for-rating.php:170
761
- #: classes/admin/class-notifications.php:131
762
- #: classes/admin/class-notifications.php:180
763
  msgid "If the dismiss button is not working, here's why >>"
764
  msgstr ""
765
 
766
- #: classes/admin/class-notifications.php:22
767
- msgid ""
768
- "We detected that the WP Rocket JavaScript concatenation function has been enabled. This function has been proven to be incompatible with the WooCommerce Google Ads Conversion Tracking plugin. \n"
769
- "\t\t\t\t\t\tPlease turn off the WP Rocket JavaScript concatenation."
770
  msgstr ""
771
 
772
- #: classes/admin/class-notifications.php:37
773
- msgid "Open the WP Rocket JavaScript concatenation settings"
774
  msgstr ""
775
 
776
- #: classes/admin/class-notifications.php:42
777
- msgid "Click here to simply turn off the WP Rocket JavaScript concatenation"
778
  msgstr ""
779
 
780
- #: classes/admin/class-notifications.php:47
781
- #: classes/admin/class-notifications.php:89
782
- msgid "Click here to dismiss this warning forever."
783
  msgstr ""
784
 
785
- #: classes/admin/class-notifications.php:49
786
- msgid "And I swear that I triple checked that the visitor and conversion tracking is working just fine and that I won't ask for support as long as the WP Rocket JavaScript concatenation is turned on!"
787
  msgstr ""
788
 
789
- #: classes/admin/class-notifications.php:64
790
- msgid ""
791
- "We detected that the LiteSpeed Inline JavaScript After DOM Ready function has been enabled. This function has been proven to be incompatible with the WooCommerce Google Ads Conversion Tracking plugin. \n"
792
- "\t\t\t\t\t\tPlease turn off the LiteSpeed Inline JavaScript After DOM Ready function."
793
  msgstr ""
794
 
795
- #: classes/admin/class-notifications.php:79
796
- msgid "Open the LiteSpeed Inline JavaScript After DOM Ready settings"
797
  msgstr ""
798
 
799
- #: classes/admin/class-notifications.php:84
800
- msgid "Click here to simply turn off LiteSpeed Inline JavaScript After DOM Ready"
801
  msgstr ""
802
 
803
- #: classes/admin/class-notifications.php:91
804
- msgid "And I swear that I triple checked that the visitor and conversion tracking is working just fine and that I won't ask for support as long as the LiteSpeed Inline JavaScript After DOM Ready is turned on!"
805
  msgstr ""
806
 
807
- #: classes/admin/class-notifications.php:107
808
- msgid "The Pixel Manager for WooCommerce plugin detected that the PayPal standard payment gateway is active. The PayPal standard payment gateway is an off-site payment gateway which impairs conversion tracking significantly. Please switch to an on-site payment gateway as soon as possible in order to increase your conversion tracking accuracy."
809
  msgstr ""
810
 
811
- #: classes/admin/class-notifications.php:119
812
- msgid "Open the WooCommerce payment methods settings"
813
  msgstr ""
814
 
815
- #: classes/admin/class-notifications.php:126
816
- #: classes/admin/class-notifications.php:175
817
- msgid "Click here to dismiss this warning forever"
818
  msgstr ""
819
 
820
- #: classes/admin/class-notifications.php:145
821
- msgid "The following plugin is not compatible with the Pixel Manager for WooCommerce: "
822
  msgstr ""
823
 
824
- #: classes/admin/class-notifications.php:151
825
- msgid "Version"
826
  msgstr ""
827
 
828
- #: classes/admin/class-notifications.php:156
829
- msgid "Please disable the plugin as soon as possible."
830
  msgstr ""
831
 
832
- #: classes/admin/class-notifications.php:160
833
- msgid "Find more information about the the reason in our documentation: "
834
  msgstr ""
835
 
836
- #: wgact.php:256
837
  msgid "Pixel Manager for WooCommerce error"
838
  msgstr ""
839
 
840
- #: wgact.php:258
841
  msgid "Your environment doesn't meet all the system requirements listed below."
842
  msgstr ""
843
 
844
- #: wgact.php:262
845
  msgid "The WooCommerce plugin needs to be activated"
846
  msgstr ""
2
  # This file is distributed under the GNU General Public License v3.0.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Pixel Manager for WooCommerce 1.20.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-08-30T09:53:16+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
34
  msgid "https://sweetcode.com"
35
  msgstr ""
36
 
37
+ #: classes/admin/class-admin.php:257
38
+ #: classes/admin/class-admin.php:258
39
+ #: wgact.php:229
40
+ #: wgact.php:230
41
  msgid "Pixel Manager"
42
  msgstr ""
43
 
44
+ #: classes/admin/class-admin.php:298
45
  msgid "Main"
46
  msgstr ""
47
 
48
+ #: classes/admin/class-admin.php:319
49
  msgid "Google"
50
  msgstr ""
51
 
52
+ #: classes/admin/class-admin.php:342
53
  msgid "Google Ads Conversion ID"
54
  msgstr ""
55
 
56
+ #: classes/admin/class-admin.php:354
57
  msgid "Google Ads Purchase Conversion Label"
58
  msgstr ""
59
 
60
+ #: classes/admin/class-admin.php:365
61
  msgid "Google Analytics UA"
62
  msgstr ""
63
 
64
+ #: classes/admin/class-admin.php:376
65
  msgid "Google Analytics 4"
66
  msgstr ""
67
 
68
+ #: classes/admin/class-admin.php:387
69
  msgid "Google Optimize"
70
  msgstr ""
71
 
72
+ #: classes/admin/class-admin.php:399
73
  msgid "Meta (Facebook)"
74
  msgstr ""
75
 
76
+ #: classes/admin/class-admin.php:422
77
  msgid "Meta (Facebook) pixel ID"
78
  msgstr ""
79
 
80
+ #: classes/admin/class-admin.php:434
81
  msgid "more pixels"
82
  msgstr ""
83
 
84
+ #: classes/admin/class-admin.php:459
85
  msgid "Microsoft Advertising UET tag ID"
86
  msgstr ""
87
 
88
+ #: classes/admin/class-admin.php:471
89
  msgid "Twitter pixel ID"
90
  msgstr ""
91
 
92
+ #: classes/admin/class-admin.php:483
93
  msgid "Pinterest pixel ID"
94
  msgstr ""
95
 
96
+ #: classes/admin/class-admin.php:495
97
  msgid "Snapchat pixel ID"
98
  msgstr ""
99
 
100
+ #: classes/admin/class-admin.php:507
101
  msgid "TikTok pixel ID"
102
  msgstr ""
103
 
104
+ #: classes/admin/class-admin.php:520
105
  msgid "Hotjar site ID"
106
  msgstr ""
107
 
108
+ #: classes/admin/class-admin.php:532
109
  msgid "Advanced"
110
  msgstr ""
111
 
112
+ #: classes/admin/class-admin.php:583
113
  msgid "Order Total Logic"
114
  msgstr ""
115
 
116
+ #: classes/admin/class-admin.php:595
117
  msgid "Order Duplication Prevention"
118
  msgstr ""
119
 
120
+ #: classes/admin/class-admin.php:607
121
  msgid "Maximum Compatibility Mode"
122
  msgstr ""
123
 
124
+ #: classes/admin/class-admin.php:621
125
  msgid "Disable Tracking for User Roles"
126
  msgstr ""
127
 
128
+ #: classes/admin/class-admin.php:633
129
+ msgid "ACR"
130
+ msgstr ""
131
+
132
+ #: classes/admin/class-admin.php:667
133
  msgid "Conversion Cart Data"
134
  msgstr ""
135
 
136
+ #: classes/admin/class-admin.php:680
137
  msgid "Enhanced E-Commerce"
138
  msgstr ""
139
 
140
+ #: classes/admin/class-admin.php:692
141
  msgid "GA 4 API secret"
142
  msgstr ""
143
 
144
+ #: classes/admin/class-admin.php:705
145
  msgid "Enhanced Link Attribution"
146
  msgstr ""
147
 
148
+ #: classes/admin/class-admin.php:718
149
  msgid "Google User ID"
150
  msgstr ""
151
 
152
+ #: classes/admin/class-admin.php:730
153
  msgid "Google Ads Enhanced Conversions"
154
  msgstr ""
155
 
156
+ #: classes/admin/class-admin.php:744
157
  msgid "Google Ads Phone Conversion Number"
158
  msgstr ""
159
 
160
+ #: classes/admin/class-admin.php:756
161
  msgid "Google Ads Phone Conversion Label"
162
  msgstr ""
163
 
164
+ #: classes/admin/class-admin.php:769
165
  msgid "Cookie Consent Management"
166
  msgstr ""
167
 
168
+ #: classes/admin/class-admin.php:792
169
  msgid "Google Consent Mode"
170
  msgstr ""
171
 
172
+ #: classes/admin/class-admin.php:804
173
  msgid "Google Consent Regions"
174
  msgstr ""
175
 
176
+ #: classes/admin/class-admin.php:816
177
  msgid "Explicit Consent Mode"
178
  msgstr ""
179
 
180
+ #: classes/admin/class-admin.php:829
181
  msgid "Borlabs Cookie support"
182
  msgstr ""
183
 
184
+ #: classes/admin/class-admin.php:843
185
  msgid "Cookiebot support"
186
  msgstr ""
187
 
188
+ #: classes/admin/class-admin.php:857
189
  msgid "Complianz GDPR support"
190
  msgstr ""
191
 
192
+ #: classes/admin/class-admin.php:871
193
  msgid "Cookie Notice support"
194
  msgstr ""
195
 
196
+ #: classes/admin/class-admin.php:885
197
  msgid "Cookie Script support"
198
  msgstr ""
199
 
200
+ #: classes/admin/class-admin.php:899
201
  msgid "GDPR Cookie Compliance support"
202
  msgstr ""
203
 
204
+ #: classes/admin/class-admin.php:913
205
  msgid "GDPR Cookie Consent support"
206
  msgstr ""
207
 
208
+ #: classes/admin/class-admin.php:946
209
  msgid "Meta (Facebook) CAPI: token"
210
  msgstr ""
211
 
212
+ #: classes/admin/class-admin.php:958
213
  msgid "Meta (Facebook) CAPI: process anonymous hits"
214
  msgstr ""
215
 
216
+ #: classes/admin/class-admin.php:970
217
  msgid "Meta (Facebook) CAPI: send additional visitor identifiers"
218
  msgstr ""
219
 
220
+ #: classes/admin/class-admin.php:982
221
  msgid "Meta (Facebook) Microdata Tags for Catalogues"
222
  msgstr ""
223
 
224
+ #: classes/admin/class-admin.php:994
225
+ #: classes/admin/class-admin.php:1007
226
+ #: classes/admin/class-admin.php:1018
227
  msgid "Dynamic Remarketing"
228
  msgstr ""
229
 
230
+ #: classes/admin/class-admin.php:1030
231
  msgid "Product Identifier"
232
  msgstr ""
233
 
234
+ #: classes/admin/class-admin.php:1042
235
  msgid "Variations output"
236
  msgstr ""
237
 
238
+ #: classes/admin/class-admin.php:1055
239
  msgid "Google Business Vertical"
240
  msgstr ""
241
 
242
+ #: classes/admin/class-admin.php:1068
243
+ #: classes/admin/class-admin.php:1077
244
  msgid "Diagnostics"
245
  msgstr ""
246
 
247
+ #: classes/admin/class-admin.php:1085
248
+ #: classes/admin/class-admin.php:1094
249
  msgid "Support"
250
  msgstr ""
251
 
252
+ #: classes/admin/class-admin.php:1102
253
+ #: classes/admin/class-admin.php:1112
254
  msgid "Author"
255
  msgstr ""
256
 
257
+ #: classes/admin/class-admin.php:1159
258
  msgid ""
259
  "It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.\n"
260
  " In order for the plugin to work properly you need to disable the script blocker."
261
  msgstr ""
262
 
263
+ #: classes/admin/class-admin.php:1166
264
+ #: classes/admin/class-notifications.php:96
265
+ #: classes/admin/class-notifications.php:146
 
 
266
  msgid "Learn more"
267
  msgstr ""
268
 
269
+ #: classes/admin/class-admin.php:1210
270
  msgid "Profit Driven Marketing by SweetCode"
271
  msgstr ""
272
 
273
+ #: classes/admin/class-admin.php:1235
274
  msgid "Visit us here:"
275
  msgstr ""
276
 
277
+ #: classes/admin/class-admin.php:1281
278
  msgid "Payment Gateway Tracking Accuracy Report"
279
  msgstr ""
280
 
281
+ #: classes/admin/class-admin.php:1282
282
+ #: classes/admin/class-admin.php:2700
283
+ #: classes/admin/class-admin.php:2708
284
  msgid "beta"
285
  msgstr ""
286
 
287
+ #: classes/admin/class-admin.php:1286
288
  msgid "What's this? Follow this link to learn more"
289
  msgstr ""
290
 
291
+ #: classes/admin/class-admin.php:1294
292
  msgid "Available payment gateways"
293
  msgstr ""
294
 
295
+ #: classes/admin/class-admin.php:1301
296
  msgid "id"
297
  msgstr ""
298
 
299
+ #: classes/admin/class-admin.php:1302
300
  msgid "method_title"
301
  msgstr ""
302
 
303
+ #: classes/admin/class-admin.php:1303
304
  msgid "class"
305
  msgstr ""
306
 
307
+ #: classes/admin/class-admin.php:1321
308
  msgid "Purchase confirmation page reached per gateway (active and inactive)"
309
  msgstr ""
310
 
311
+ #: classes/admin/class-admin.php:1329
312
+ #: classes/admin/class-admin.php:1378
313
+ #: classes/admin/class-admin.php:1453
314
  msgid "The analysis is being generated. Please check back in 5 minutes."
315
  msgstr ""
316
 
317
+ #: classes/admin/class-admin.php:1370
318
  msgid "Purchase confirmation page reached per gateway (only active), weighted by frequency"
319
  msgstr ""
320
 
321
+ #: classes/admin/class-admin.php:1441
322
+ msgid "Automatic Conversion Recovery (ACR)"
323
+ msgstr ""
324
+
325
+ #. translators: The number and percentage of orders that were recovered by the Automatic Conversion Recovery (ACR).
326
+ #: classes/admin/class-admin.php:1529
327
+ msgid "ACR recovered %1$s (%2$s%%) out of %3$s missing conversions."
328
+ msgstr ""
329
+
330
+ #: classes/admin/class-admin.php:1547
331
+ msgid "This feature is only available in the pro version of the plugin. Follow the link to learn more about it:"
332
+ msgstr ""
333
+
334
+ #: classes/admin/class-admin.php:1549
335
+ msgid "Get the pro version of the Pixel Manager for WooCommerce over here"
336
+ msgstr ""
337
+
338
+ #: classes/admin/class-admin.php:1551
339
+ msgid "Go Pro"
340
+ msgstr ""
341
+
342
+ #: classes/admin/class-admin.php:1580
343
  msgid "Contacting Support"
344
  msgstr ""
345
 
346
+ #: classes/admin/class-admin.php:1602
347
  msgid "Debug Information"
348
  msgstr ""
349
 
350
+ #: classes/admin/class-admin.php:1611
351
  msgid "copy to clipboard"
352
  msgstr ""
353
 
354
+ #: classes/admin/class-admin.php:1621
355
  msgid "Export settings"
356
  msgstr ""
357
 
358
+ #: classes/admin/class-admin.php:1633
359
  msgid "Export to disk"
360
  msgstr ""
361
 
362
+ #: classes/admin/class-admin.php:1642
363
  msgid "Import settings"
364
  msgstr ""
365
 
366
+ #: classes/admin/class-admin.php:1647
367
  msgid "Settings imported successfully!"
368
  msgstr ""
369
 
370
+ #: classes/admin/class-admin.php:1650
371
  msgid "Reloading...(in 5 seconds)!"
372
  msgstr ""
373
 
374
+ #: classes/admin/class-admin.php:1656
375
  msgid "There was an error importing that file! Please try again."
376
  msgstr ""
377
 
378
+ #: classes/admin/class-admin.php:1673
379
  msgid "Translations"
380
  msgstr ""
381
 
382
+ #: classes/admin/class-admin.php:1674
383
  msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
384
  msgstr ""
385
 
386
+ #: classes/admin/class-admin.php:1692
387
  msgid "Post a support request in the WordPress support forum here: "
388
  msgstr ""
389
 
390
+ #: classes/admin/class-admin.php:1695
391
  msgid "Support forum"
392
  msgstr ""
393
 
394
+ #: classes/admin/class-admin.php:1699
395
  msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
396
  msgstr ""
397
 
398
+ #: classes/admin/class-admin.php:1702
399
  msgid "Or send us an email to the following address: "
400
  msgstr ""
401
 
402
+ #: classes/admin/class-admin.php:1718
403
  msgid "Send us your support request through the WooCommerce.com dashboard: "
404
  msgstr ""
405
 
406
+ #: classes/admin/class-admin.php:1732
407
  msgid "More details about the developer of this plugin: "
408
  msgstr ""
409
 
410
+ #: classes/admin/class-admin.php:1735
411
  msgid "Developer: SweetCode"
412
  msgstr ""
413
 
414
+ #: classes/admin/class-admin.php:1737
415
  msgid "Website: "
416
  msgstr ""
417
 
418
+ #: classes/admin/class-admin.php:1760
419
  msgid "The Google Analytics Universal property ID looks like this:"
420
  msgstr ""
421
 
422
+ #: classes/admin/class-admin.php:1776
423
  msgid "The Google Analytics 4 measurement ID looks like this:"
424
  msgstr ""
425
 
426
+ #: classes/admin/class-admin.php:1792
427
  msgid "The conversion ID looks similar to this:"
428
  msgstr ""
429
 
430
+ #: classes/admin/class-admin.php:1808
431
  msgid "The purchase conversion label looks similar to this:"
432
  msgstr ""
433
 
434
+ #: classes/admin/class-admin.php:1812
435
+ #: classes/admin/class-admin.php:2522
436
  msgid "Requires an active Google Ads Conversion ID"
437
  msgstr ""
438
 
439
+ #: classes/admin/class-admin.php:1830
440
  msgid "The Google Optimize container ID looks like this:"
441
  msgstr ""
442
 
443
+ #: classes/admin/class-admin.php:1832
444
  msgid "or"
445
  msgstr ""
446
 
447
+ #: classes/admin/class-admin.php:1848
448
  msgid "The Meta (Facebook) pixel ID looks similar to this:"
449
  msgstr ""
450
 
451
+ #: classes/admin/class-admin.php:1866
452
  msgid "The Microsoft Advertising UET tag ID looks similar to this:"
453
  msgstr ""
454
 
455
+ #: classes/admin/class-admin.php:1885
456
  msgid "The Twitter pixel ID looks similar to this:"
457
  msgstr ""
458
 
459
+ #: classes/admin/class-admin.php:1904
460
  msgid "The Pinterest pixel ID looks similar to this:"
461
  msgstr ""
462
 
463
+ #: classes/admin/class-admin.php:1923
464
  msgid "The Snapchat pixel ID looks similar to this:"
465
  msgstr ""
466
 
467
+ #: classes/admin/class-admin.php:1944
468
  msgid "The TikTok pixel ID looks similar to this:"
469
  msgstr ""
470
 
471
+ #: classes/admin/class-admin.php:1956
472
  msgid "The Hotjar site ID looks similar to this:"
473
  msgstr ""
474
 
475
+ #: classes/admin/class-admin.php:1966
476
  msgid "Use order_subtotal: Doesn't include tax and shipping (default)"
477
  msgstr ""
478
 
479
+ #: classes/admin/class-admin.php:1973
480
  msgid "Use order_total: Includes tax and shipping"
481
  msgstr ""
482
 
483
+ #: classes/admin/class-admin.php:1976
484
+ msgid "This is the order total amount reported back to the paid ads pixels (such as Google Ads, Facebook, etc.)"
485
  msgstr ""
486
 
487
+ #: classes/admin/class-admin.php:1996
488
  msgid "open the documentation"
489
  msgstr ""
490
 
491
+ #: classes/admin/class-admin.php:2016
492
  msgid "Enable Google consent mode with standard settings"
493
  msgstr ""
494
 
495
+ #: classes/admin/class-admin.php:2054
496
  msgid "If no region is set, then the restrictions are enabled for all regions. If you specify one or more regions, then the restrictions only apply for the specified regions."
497
  msgstr ""
498
 
499
+ #: classes/admin/class-admin.php:2062
500
+ msgid "Google Analytics Enhanced E-Commerce is "
501
  msgstr ""
502
 
 
 
503
  #: classes/admin/class-admin.php:2085
 
 
 
 
504
  msgid "Google Analytics 4 activation required"
505
  msgstr ""
506
 
507
+ #: classes/admin/class-admin.php:2088
 
 
 
 
508
  msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
509
  msgstr ""
510
 
511
+ #: classes/admin/class-admin.php:2103
512
  msgid "Enable Google Analytics enhanced link attribution"
513
  msgstr ""
514
 
515
+ #: classes/admin/class-admin.php:2119
516
+ #: classes/admin/class-admin.php:2149
517
+ msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
518
+ msgstr ""
519
+
520
+ #: classes/admin/class-admin.php:2138
521
  msgid "Enable Google user ID"
522
  msgstr ""
523
 
524
+ #: classes/admin/class-admin.php:2168
525
  msgid "Enable Google Ads Enhanced Conversions"
526
  msgstr ""
527
 
528
+ #: classes/admin/class-admin.php:2179
529
  msgid "You need to activate Google Ads"
530
  msgstr ""
531
 
532
+ #: classes/admin/class-admin.php:2199
533
  msgid "The Google Ads phone conversion number must be in the same format as on the website."
534
  msgstr ""
535
 
536
+ #: classes/admin/class-admin.php:2221
537
  msgid "Borlabs Cookie detected. Automatic support is:"
538
  msgstr ""
539
 
540
+ #: classes/admin/class-admin.php:2227
541
  msgid "Cookiebot detected. Automatic support is:"
542
  msgstr ""
543
 
544
+ #: classes/admin/class-admin.php:2233
545
  msgid "Complianz GDPR detected. Automatic support is:"
546
  msgstr ""
547
 
548
+ #: classes/admin/class-admin.php:2239
549
  msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
550
  msgstr ""
551
 
552
+ #: classes/admin/class-admin.php:2245
553
  msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
554
  msgstr ""
555
 
556
+ #: classes/admin/class-admin.php:2251
557
  msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
558
  msgstr ""
559
 
560
+ #: classes/admin/class-admin.php:2257
561
  msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
562
  msgstr ""
563
 
564
+ #: classes/admin/class-admin.php:2276
565
  msgid "Enable Explicit Consent Mode"
566
  msgstr ""
567
 
568
+ #: classes/admin/class-admin.php:2285
569
  msgid "Only activate the Explicit Consent Mode if you are also using a Cookie Management Platform (a cookie banner) that is compatible with this plugin. Find a list of compatible plugins in the documentation."
570
  msgstr ""
571
 
572
+ #: classes/admin/class-admin.php:2304
573
+ #: classes/admin/class-admin.php:2337
574
+ #: classes/admin/class-admin.php:2366
575
+ #: classes/admin/class-admin.php:2394
576
  msgid "You need to activate the Meta (Facebook) pixel"
577
  msgstr ""
578
 
579
+ #: classes/admin/class-admin.php:2328
580
  msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
581
  msgstr ""
582
 
583
+ #: classes/admin/class-admin.php:2357
584
  msgid "Include additional visitor's identifiers, such as IP address, email and shop ID in the CAPI hit."
585
  msgstr ""
586
 
587
+ #: classes/admin/class-admin.php:2385
588
  msgid "Enable Meta (Facebook) product microdata output"
589
  msgstr ""
590
 
591
+ #: classes/admin/class-admin.php:2421
592
  msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
593
  msgstr ""
594
 
595
+ #: classes/admin/class-admin.php:2438
596
  msgid "Enable the maximum compatibility mode"
597
  msgstr ""
598
 
599
+ #: classes/admin/class-admin.php:2473
600
+ msgid "Automatic Conversion Recovery (ACR) is "
601
+ msgstr ""
602
+
603
+ #: classes/admin/class-admin.php:2481
604
  msgid "Advanced order duplication prevention is "
605
  msgstr ""
606
 
607
+ #: classes/admin/class-admin.php:2483
608
  msgid "Basic order duplication prevention is "
609
  msgstr ""
610
 
611
+ #: classes/admin/class-admin.php:2507
612
  msgid "Enable dynamic remarketing audience collection"
613
  msgstr ""
614
 
615
+ #: classes/admin/class-admin.php:2528
616
  msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
617
  msgstr ""
618
 
619
+ #: classes/admin/class-admin.php:2546
620
  msgid "Enable variations output"
621
  msgstr ""
622
 
623
+ #: classes/admin/class-admin.php:2557
624
  msgid "In order for this to work you need to upload your product feed including product variations and the item_group_id. Disable it, if you choose only to upload the parent product for variable products."
625
  msgstr ""
626
 
627
+ #: classes/admin/class-admin.php:2572
628
  msgid "Retail"
629
  msgstr ""
630
 
631
+ #: classes/admin/class-admin.php:2582
632
  msgid "Education"
633
  msgstr ""
634
 
635
+ #: classes/admin/class-admin.php:2592
636
  msgid "Hotels and rentals"
637
  msgstr ""
638
 
639
+ #: classes/admin/class-admin.php:2602
640
  msgid "Jobs"
641
  msgstr ""
642
 
643
+ #: classes/admin/class-admin.php:2612
644
  msgid "Local deals"
645
  msgstr ""
646
 
647
+ #: classes/admin/class-admin.php:2622
648
  msgid "Real estate"
649
  msgstr ""
650
 
651
+ #: classes/admin/class-admin.php:2632
652
  msgid "Custom"
653
  msgstr ""
654
 
655
+ #: classes/admin/class-admin.php:2651
656
  msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
657
  msgstr ""
658
 
659
+ #: classes/admin/class-admin.php:2660
660
  msgid "post ID (default)"
661
  msgstr ""
662
 
663
+ #: classes/admin/class-admin.php:2666
664
  msgid "SKU"
665
  msgstr ""
666
 
667
+ #: classes/admin/class-admin.php:2673
668
  msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
669
  msgstr ""
670
 
671
+ #: classes/admin/class-admin.php:2680
672
  msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
673
  msgstr ""
674
 
675
+ #: classes/admin/class-admin.php:2684
676
  msgid "Choose a product identifier."
677
  msgstr ""
678
 
679
+ #: classes/admin/class-admin.php:2687
680
  msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
681
  msgstr ""
682
 
683
+ #: classes/admin/class-admin.php:2691
684
  msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
685
  msgstr ""
686
 
687
+ #: classes/admin/class-admin.php:2714
688
+ #: classes/admin/class-admin.php:2719
689
  msgid "active"
690
  msgstr ""
691
 
692
+ #: classes/admin/class-admin.php:2724
693
+ #: classes/admin/class-admin.php:2729
694
  msgid "inactive"
695
  msgstr ""
696
 
697
+ #: classes/admin/class-admin.php:2734
698
+ #: classes/admin/class-admin.php:2739
699
  msgid "partially active"
700
  msgstr ""
701
 
702
+ #: classes/admin/class-admin.php:2750
703
  msgid "Pro Feature"
704
  msgstr ""
705
 
706
+ #: classes/admin/class-admin.php:2793
707
  msgid "You have entered an invalid Google Analytics Universal property ID."
708
  msgstr ""
709
 
710
+ #: classes/admin/class-admin.php:2801
711
  msgid "You have entered an invalid Google Analytics 4 measurement ID."
712
  msgstr ""
713
 
714
+ #: classes/admin/class-admin.php:2809
715
  msgid "You have entered an invalid Google Analytics 4 API key."
716
  msgstr ""
717
 
718
+ #: classes/admin/class-admin.php:2817
719
  msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
720
  msgstr ""
721
 
722
+ #: classes/admin/class-admin.php:2825
723
+ #: classes/admin/class-admin.php:2833
724
  msgid "You have entered an invalid conversion label."
725
  msgstr ""
726
 
727
+ #: classes/admin/class-admin.php:2841
728
  msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
729
  msgstr ""
730
 
731
+ #: classes/admin/class-admin.php:2849
732
  msgid "You have entered an invalid Google Optimize container ID."
733
  msgstr ""
734
 
735
+ #: classes/admin/class-admin.php:2857
736
  msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
737
  msgstr ""
738
 
739
+ #: classes/admin/class-admin.php:2865
740
  msgid "You have entered an invalid Meta (Facebook) CAPI token."
741
  msgstr ""
742
 
743
+ #: classes/admin/class-admin.php:2873
744
  msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
745
  msgstr ""
746
 
747
+ #: classes/admin/class-admin.php:2881
748
  msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
749
  msgstr ""
750
 
751
+ #: classes/admin/class-admin.php:2889
752
  msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
753
  msgstr ""
754
 
755
+ #: classes/admin/class-admin.php:2897
756
  msgid "You have entered an invalid Snapchat pixel ID."
757
  msgstr ""
758
 
759
+ #: classes/admin/class-admin.php:2905
760
  msgid "You have entered an invalid TikTok pixel ID."
761
  msgstr ""
762
 
763
+ #: classes/admin/class-admin.php:2913
764
  msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
765
  msgstr ""
766
 
767
  #. translators: %d: the amount of purchase conversions that have been measured
768
+ #: classes/admin/class-ask-for-rating.php:142
769
  msgid "Hey, I noticed that you tracked more than %d purchase conversions with the Pixel Manager for WooCommerce plugin - that's awesome! Could you please do me a BIG favour and give it a 5-star rating on WordPress? It will help to spread the word and boost our motivation."
770
  msgstr ""
771
 
772
+ #: classes/admin/class-ask-for-rating.php:159
773
  msgid "Ok, you deserve it"
774
  msgstr ""
775
 
776
+ #: classes/admin/class-ask-for-rating.php:164
777
  msgid "Nope, maybe later"
778
  msgstr ""
779
 
780
+ #: classes/admin/class-ask-for-rating.php:173
781
  msgid "I already did"
782
  msgstr ""
783
 
784
+ #: classes/admin/class-ask-for-rating.php:179
785
+ #: classes/admin/class-notifications.php:113
786
+ #: classes/admin/class-notifications.php:162
787
  msgid "If the dismiss button is not working, here's why >>"
788
  msgstr ""
789
 
790
+ #: classes/admin/class-notifications.php:74
791
+ msgid "Payment Gateway Accuracy Warning"
 
 
792
  msgstr ""
793
 
794
+ #: classes/admin/class-notifications.php:89
795
+ msgid "The Pixel Manager for WooCommerce plugin detected that the PayPal standard payment gateway is active. The PayPal standard payment gateway is an off-site payment gateway which impairs conversion tracking significantly. Please switch to an on-site payment gateway as soon as possible in order to increase your conversion tracking accuracy."
796
  msgstr ""
797
 
798
+ #: classes/admin/class-notifications.php:101
799
+ msgid "Open the WooCommerce payment methods settings"
800
  msgstr ""
801
 
802
+ #: classes/admin/class-notifications.php:108
803
+ #: classes/admin/class-notifications.php:157
804
+ msgid "Click here to dismiss this warning forever"
805
  msgstr ""
806
 
807
+ #: classes/admin/class-notifications.php:127
808
+ msgid "The following plugin is not compatible with the Pixel Manager for WooCommerce: "
809
  msgstr ""
810
 
811
+ #: classes/admin/class-notifications.php:133
812
+ msgid "Version"
 
 
813
  msgstr ""
814
 
815
+ #: classes/admin/class-notifications.php:138
816
+ msgid "Please disable the plugin as soon as possible."
817
  msgstr ""
818
 
819
+ #: classes/admin/class-notifications.php:142
820
+ msgid "Find more information about the the reason in our documentation: "
821
  msgstr ""
822
 
823
+ #: classes/admin/class-order-columns.php:111
824
+ msgid "PMW pixels not fired - 30d"
825
  msgstr ""
826
 
827
+ #: classes/admin/class-order-columns.php:153
828
+ msgid "PMW pixels fired"
829
  msgstr ""
830
 
831
+ #: classes/admin/class-order-columns.php:167
832
+ msgid "PMW monitored order"
833
  msgstr ""
834
 
835
+ #: classes/admin/class-order-columns.php:174
836
+ msgid "Not monitored by PMW"
 
837
  msgstr ""
838
 
839
+ #: classes/admin/class-order-columns.php:187
840
+ msgid "Order not tracked by PMW"
841
  msgstr ""
842
 
843
+ #: classes/admin/class-order-columns.php:195
844
+ msgid "This order was created by a shop manager. Only orders created by customers are analysed."
845
  msgstr ""
846
 
847
+ #: classes/admin/class-order-columns.php:203
848
+ msgid "Conversion pixels fired"
849
  msgstr ""
850
 
851
+ #: classes/admin/class-order-columns.php:211
852
+ msgid "Conversion pixels not fired yet"
853
  msgstr ""
854
 
855
+ #: wgact.php:245
856
  msgid "Pixel Manager for WooCommerce error"
857
  msgstr ""
858
 
859
+ #: wgact.php:247
860
  msgid "Your environment doesn't meet all the system requirements listed below."
861
  msgstr ""
862
 
863
+ #: wgact.php:251
864
  msgid "The WooCommerce plugin needs to be activated"
865
  msgstr ""
readme.txt CHANGED
@@ -4,33 +4,37 @@ Tags: woocommerce, google analytics, google ads, facebook, conversion tracking,
4
  Requires at least: 3.7
5
  Tested up to: 6.0
6
  Requires PHP: 7.3
7
- Stable tag: 1.19.4
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- Track visitors and conversions for WooCommerce Google Analytics Universal, GA4, Google Ads, Meta (Facebook), TikTok, Microsoft and many more!
12
 
13
  == Description ==
14
 
15
  This plugin <strong>tracks WooCommerce shop visitors and collects valuable data for conversion optimization, dynamic remarketing and reporting</strong>.
16
 
17
- The Pixel Manager is the most complete and flexible solution for implementing pixels of various providers, like Google Analytics (Universal and GA4), Google Ads (formerly Google AdWords) Pixel, Meta Pixel (Facebook Pixel), Microsoft Pixel, TikTok Pixel and many more.
18
 
19
  The Pixel Managers advanced architecture has numerous advantages over other solutions:
20
 
21
  - Its transpiled and optimized JavaScript library ensures compatibility with more than 98% of all browsers that visit your website.
22
  - Data privacy features allow you to achieve the highest level of GDPR (and other privacy) compliance.
23
  - It is very easy to use and easy to understand.
24
- - Filters allow to modify the output very flexibly and customize it perfectly to your needs.
25
- - Standardized output to all pixels allows a much better apples to apples comparison between different providers.
 
 
26
 
27
- While the setup is as simple as it can get, the pixel engine under the hood is very powerful. It tracks all e-commerce events and implements all advanced pixel features like Meta CAPI (Facebook CAPI) (Pro version), Google Analytics Enhanced E-Commerce, Google Shopping Cart Item Tracking and much more. For advanced users the plugin offers filters which allow to tweak the output flexibly and fine tune the behavior to each shop.
28
 
29
  <strong>What sets us apart from other, similar plugins?</strong>
30
 
31
- Out of many things, its unparallelled high tracking accuracy and a simple user interface are the most important properties that set our plugin apart from others.
32
 
33
- Additionally, to the standard features offered by the tracking pixels we've developed more functional layers into the plugin which help increase measurement accuracy. For instance, if the plugin detects problems in the shop setup that might lower or prevent accurate tracking, it either fixes them seamlessly, or shows warnings with guidance on how to fix the problems.
 
 
34
 
35
  Read more about the importance of tracking accuracy over [here](https://sweetcode.com/docs/wpm/faq/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=tracking-accuracy#why-is-tracking-accuracy-so-important).
36
 
@@ -56,6 +60,8 @@ Read more about the importance of tracking accuracy over [here](https://sweetcod
56
  * Collects dynamic remarketing audiences for dynamic retargeting (Google Ads, Meta (Facebook), etc.)
57
  * Google Add Cart Data feature. [Google support page](https://support.google.com/google-ads/answer/9028254)
58
  * Support for various cookie consent management systems
 
 
59
 
60
  <strong>Free Features</strong>
61
 
@@ -72,11 +78,13 @@ Read more about the importance of tracking accuracy over [here](https://sweetcod
72
  * Basic Order Duplication Prevention
73
  * Many useful filters that help tweak the plugin output
74
  * Works with lazy loaded product lists
 
75
 
76
  Have a look at the full feature list over [here](https://sweetcode.com/docs/wpm/features).
77
 
78
  <strong>Premium Features</strong>
79
 
 
80
  * Meta CAPI (Facebook CAPI)
81
  * Meta Microdata Output (Facebook Microdata Output)
82
  * Google Analytics Universal and Google Analytics 4 Enhanced E-Commerce
@@ -96,11 +104,14 @@ Are you interested in buying the [Pro version](https://sweetcode.com)? Come and
96
 
97
  <strong>Plugin Compatibility</strong>
98
 
99
- The plugin supports and works with following third party plugins.
100
 
 
101
  * WooCommerce Brands
102
  * WooCommerce Composite Products
 
103
  * WooCommerce Google Product Feed
 
104
  * WooCommerce Wishlists
105
  * WooFunnels
106
  * Woo Discount Rules
@@ -118,7 +129,7 @@ Take a look at our [roadmap](https://roadmap.sweetcode.com/pixel-manager-for-woo
118
 
119
  <strong>Cookie Consent Management</strong>
120
 
121
- The plugin uses data from several Cookie Consent Management plugins to manage approvals and disapprovals for injection of marketing pixels.
122
 
123
  It works with the following Cookie Consent Management plugins out of the box:
124
 
@@ -198,6 +209,24 @@ You can send the link to the front page of your shop too if you think it would b
198
 
199
  == Changelog ==
200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  = 1.19.4 = 14.08.2022
202
 
203
  * Tweak: Added safeguard if function as_enqueue_async_action isn't available.
4
  Requires at least: 3.7
5
  Tested up to: 6.0
6
  Requires PHP: 7.3
7
+ Stable tag: 1.20.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ Track visitors and conversions for WooCommerce Google Analytics Universal, GA4, Google Ads, Meta (Facebook), TikTok, Microsoft, and many more!
12
 
13
  == Description ==
14
 
15
  This plugin <strong>tracks WooCommerce shop visitors and collects valuable data for conversion optimization, dynamic remarketing and reporting</strong>.
16
 
17
+ The Pixel Manager is the most complete and flexible solution for implementing pixels of various providers, like Google Analytics (Universal and GA4), Google Ads (formerly Google AdWords) Pixel, Meta Pixel (Facebook Pixel), Microsoft Pixel, TikTok Pixel, and many more.
18
 
19
  The Pixel Managers advanced architecture has numerous advantages over other solutions:
20
 
21
  - Its transpiled and optimized JavaScript library ensures compatibility with more than 98% of all browsers that visit your website.
22
  - Data privacy features allow you to achieve the highest level of GDPR (and other privacy) compliance.
23
  - It is very easy to use and easy to understand.
24
+ - Filters allow you to modify the output very flexibly and customize it perfectly to your needs.
25
+ - Standardized output to all pixels allows a much better apples-to-apples comparison between different providers.
26
+ - Payment gateway accuracy report that shows how many conversions are lost due to redirect issues.
27
+ - Automatic Conversion Recovery (ACR) feature allows you to recover lost conversions due to redirect issues.
28
 
29
+ While the setup is as simple as it can get, the pixel engine under the hood is very powerful. It tracks all e-commerce events and implements all advanced pixel features like Meta CAPI (Facebook CAPI) (Pro version), Google Analytics Enhanced E-Commerce, Google Shopping Cart Item Tracking, and much more. For advanced users, the plugin offers filters that allow them to tweak the output flexibly and fine-tune the behavior for each shop.
30
 
31
  <strong>What sets us apart from other, similar plugins?</strong>
32
 
33
+ The unparalleled and high tracking accuracy, the simple user interface, and constant innovation make Pixel Manager the best solution for e-commerce tracking.
34
 
35
+ For instance, the [Payment Gateway Accuracy Report](https://sweetcode.com/docs/wpm/diagnostics?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=payment-gateway-accuracy-report#payment-gateway-tracking-accuracy-report) shows how many conversions are lost due to redirect issues. Payment gateway accuracy issues are more common than you might think and the Pixel Manager is the only tracking solution that provides insights into that problem.
36
+
37
+ And with the [Automatic Conversion Recovery (ACR)](https://sweetcode.com/docs/wpm/features/acr?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=acr) (premium feature), which helps you recover lost conversions due to redirect issues, the Pixel Manager solidifies its pole position in tracking solutions. There is no other tracking solution that ships that type of feature (yet).
38
 
39
  Read more about the importance of tracking accuracy over [here](https://sweetcode.com/docs/wpm/faq/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=tracking-accuracy#why-is-tracking-accuracy-so-important).
40
 
60
  * Collects dynamic remarketing audiences for dynamic retargeting (Google Ads, Meta (Facebook), etc.)
61
  * Google Add Cart Data feature. [Google support page](https://support.google.com/google-ads/answer/9028254)
62
  * Support for various cookie consent management systems
63
+ * [Payment gateway accuracy report](https://sweetcode.com/docs/wpm/diagnostics?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=payment-gateway-accuracy-report#payment-gateway-tracking-accuracy-report)
64
+ * [Automatic Conversion Recovery (ACR)](https://sweetcode.com/docs/wpm/features/acr?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=acr)
65
 
66
  <strong>Free Features</strong>
67
 
78
  * Basic Order Duplication Prevention
79
  * Many useful filters that help tweak the plugin output
80
  * Works with lazy loaded product lists
81
+ * [Payment gateway accuracy report](https://sweetcode.com/docs/wpm/diagnostics?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=payment-gateway-accuracy-report#payment-gateway-tracking-accuracy-report)
82
 
83
  Have a look at the full feature list over [here](https://sweetcode.com/docs/wpm/features).
84
 
85
  <strong>Premium Features</strong>
86
 
87
+ * [Automatic Conversion Recovery (ACR)](https://sweetcode.com/docs/wpm/features/acr?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=acr)
88
  * Meta CAPI (Facebook CAPI)
89
  * Meta Microdata Output (Facebook Microdata Output)
90
  * Google Analytics Universal and Google Analytics 4 Enhanced E-Commerce
104
 
105
  <strong>Plugin Compatibility</strong>
106
 
107
+ The plugin supports and works with the following third-party plugins.
108
 
109
+ * CartFlows
110
  * WooCommerce Brands
111
  * WooCommerce Composite Products
112
+ * WooCommerce Deposits
113
  * WooCommerce Google Product Feed
114
+ * WooCommerce Subscriptions
115
  * WooCommerce Wishlists
116
  * WooFunnels
117
  * Woo Discount Rules
129
 
130
  <strong>Cookie Consent Management</strong>
131
 
132
+ The plugin uses data from several Cookie Consent Management plugins to manage approvals and disapproval for the injection of marketing pixels.
133
 
134
  It works with the following Cookie Consent Management plugins out of the box:
135
 
209
 
210
  == Changelog ==
211
 
212
+ = 1.20.0 = 30.08.2022
213
+
214
+
215
+ * New: Column on order list, showing for which orders the browser conversion pixels have fired.
216
+ * New: View in order list that only shows orders where browser conversion pixels have not fired.
217
+ * Tweak: Removed the off-site payment gateway notification.
218
+ * Tweak: Added CartFlows custom thankyou pages compatibility.
219
+ * Tweak: Changed product price output to include tax by default, plus added a filter to turn it off.
220
+ * Tweak: Improved event listeners for init_checkout, payment_method_selected and place_order for higher compatibility with themes.
221
+ * Tweak: Automatically disable specific pixels in WooFunnels if they are enabled in the Pixel Manager in order to avoid duplicate tracking.
222
+ * Tweak: Automatically disable specific pixels in Woo Product Feed Pro and Elite if they are enabled in the Pixel Manager in order to avoid duplicate tracking.
223
+ * Tweak: Refactored some code to avoid unnecessary duplicate class initializations.
224
+ * Tweak: Disable gtag in Google Listing and Ads if Google Ads is active in PMW.
225
+ * Tweak: Analyse only orders in the payment gateway report that have been created by customers, not shop managers.
226
+ * Fix: Added brand output for variations.
227
+ * Fix: Fixed a bug that caused the conversion pixels to fire on purchase order payment pages (orders manually created by the shop manager and sent to the customer for payment).
228
+ * Fix: Fixed variations output for FB CAPI server side orders when variaitons output is enabled.
229
+
230
  = 1.19.4 = 14.08.2022
231
 
232
  * Tweak: Added safeguard if function as_enqueue_async_action isn't available.
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.19.4
14
  *
15
  * WC requires at least: 3.7
16
  * WC tested up to: 6.8
@@ -19,8 +19,7 @@
19
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
  **/
22
- const WPM_CURRENT_VERSION = '1.19.4' ;
23
- // TODO export settings function
24
  // TODO add option checkbox on uninstall and ask if user wants to delete options from db
25
 
26
  if ( !defined( 'ABSPATH' ) ) {
@@ -31,6 +30,9 @@ if ( !defined( 'ABSPATH' ) ) {
31
  use WCPM\Classes\Admin\Admin ;
32
  use WCPM\Classes\Admin\Debug_Info ;
33
  use WCPM\Classes\Admin\Environment_Check ;
 
 
 
34
  use WCPM\Classes\Db_Upgrade ;
35
  use WCPM\Classes\Default_Options ;
36
  use WCPM\Classes\Deprecated_Filters ;
@@ -111,7 +113,6 @@ if ( function_exists( 'wpm_fs' ) ) {
111
  class WCPM
112
  {
113
  protected $options ;
114
- protected $environment_check ;
115
  public function __construct()
116
  {
117
  define( 'WPM_PLUGIN_PREFIX', 'wpm_' );
@@ -134,26 +135,17 @@ if ( function_exists( 'wpm_fs' ) ) {
134
  $this->setup_freemius_environment();
135
  // running the DB updater
136
  if ( get_option( WPM_DB_OPTIONS_NAME ) ) {
137
- ( new Db_Upgrade() )->run_options_db_upgrade();
138
  }
139
  // load the options
140
  $this->wpm_options_init();
141
- $this->environment_check = new Environment_Check( $this->options );
142
- if ( isset( $this->options['google']['gads']['dynamic_remarketing'] ) && $this->options['google']['gads']['dynamic_remarketing'] ) {
143
- // make sure to disable the WGDR plugin in case we use dynamic remarketing in this plugin
144
- add_filter( 'wgdr_third_party_cookie_prevention', '__return_true' );
145
- }
146
  // run environment workflows
147
- add_action( 'admin_notices', [ $this, 'run_admin_compatibility_checks' ] );
148
- add_action( 'admin_notices', [ $this, 'environment_check_admin_notices' ] );
149
- add_action( 'admin_notices', function () {
150
- $this->environment_check->run_incompatible_plugins_checks();
151
- } );
152
- $this->environment_check->disable_third_party_js_optimization();
153
  if ( $this->options['general']['maximum_compatibility_mode'] ) {
154
- $this->environment_check->enable_compatibility_mode();
155
  }
156
- $this->environment_check->flush_cache_on_plugin_changes();
157
  register_activation_hook( __FILE__, [ $this, 'plugin_activated' ] );
158
  register_deactivation_hook( __FILE__, [ $this, 'plugin_deactivated' ] );
159
  register_deactivation_hook( __FILE__, function () {
@@ -248,24 +240,19 @@ if ( function_exists( 'wpm_fs' ) ) {
248
 
249
  public function plugin_activated()
250
  {
251
- $this->environment_check->flush_cache_of_all_cache_plugins();
252
  }
253
 
254
  public function plugin_deactivated()
255
  {
256
- $this->environment_check->flush_cache_of_all_cache_plugins();
257
  }
258
 
259
  public function environment_check_admin_notices()
260
  {
261
- if ( apply_filters( 'wpm_show_admin_alerts', apply_filters_deprecated(
262
- 'wooptpm_show_admin_alerts',
263
- [ true ],
264
- '1.13.0',
265
- 'wpm_show_admin_alerts'
266
- ) ) ) {
267
- $this->environment_check->check_active_off_site_payment_gateways();
268
- }
269
  // https://developer.wordpress.org/reference/hooks/admin_notices/#comment-5163
270
  // if (defined('DISABLE_NAG_NOTICES') && DISABLE_NAG_NOTICES) {
271
  // // do some stuff
@@ -276,7 +263,7 @@ if ( function_exists( 'wpm_fs' ) ) {
276
  public function init()
277
  {
278
  add_action( 'pmw_tracking_accuracy_analysis', function () {
279
- ( new Debug_Info( $this->options ) )->run_tracking_accuracy_analysis();
280
  } );
281
 
282
  if ( is_admin() ) {
@@ -294,14 +281,19 @@ if ( function_exists( 'wpm_fs' ) ) {
294
  wp_schedule_event( strtotime( '03:25:00' ), 'daily', 'pmw_tracking_accuracy_analysis' );
295
  }
296
  // display admin views
297
- new Admin( $this->options );
298
  // ask visitor for rating
299
- new Ask_For_Rating();
 
 
 
 
 
300
  // add a settings link on the plugins page
301
  add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'wpm_settings_link' ] );
302
  }
303
 
304
- ( new Deprecated_Filters() )->load_deprecated_filters();
305
  // inject pixels into front end
306
  // add_action('after_setup_theme', [$this, 'inject_pixels']);
307
  $this->inject_pixels();
@@ -325,13 +317,32 @@ if ( function_exists( 'wpm_fs' ) ) {
325
  );
326
  if ( false === $cookie_prevention ) {
327
  // inject pixels
328
- new Pixel_Manager( $this->options );
329
  }
330
  }
331
 
332
- public function run_admin_compatibility_checks()
333
  {
334
- $this->environment_check->run_checks();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  }
336
 
337
  // initialise the options
10
  * Developer URI: https://sweetcode.com
11
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
12
  * Domain path: /languages
13
+ * * Version: 1.20.0
14
  *
15
  * WC requires at least: 3.7
16
  * WC tested up to: 6.8
19
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
  **/
22
+ const WPM_CURRENT_VERSION = '1.20.0' ;
 
23
  // TODO add option checkbox on uninstall and ask if user wants to delete options from db
24
 
25
  if ( !defined( 'ABSPATH' ) ) {
30
  use WCPM\Classes\Admin\Admin ;
31
  use WCPM\Classes\Admin\Debug_Info ;
32
  use WCPM\Classes\Admin\Environment_Check ;
33
+ use WCPM\Classes\Admin\Notification_Handlers ;
34
+ use WCPM\Classes\Admin\Notifications ;
35
+ use WCPM\Classes\Admin\Order_Columns ;
36
  use WCPM\Classes\Db_Upgrade ;
37
  use WCPM\Classes\Default_Options ;
38
  use WCPM\Classes\Deprecated_Filters ;
113
  class WCPM
114
  {
115
  protected $options ;
 
116
  public function __construct()
117
  {
118
  define( 'WPM_PLUGIN_PREFIX', 'wpm_' );
135
  $this->setup_freemius_environment();
136
  // running the DB updater
137
  if ( get_option( WPM_DB_OPTIONS_NAME ) ) {
138
+ Db_Upgrade::run_options_db_upgrade();
139
  }
140
  // load the options
141
  $this->wpm_options_init();
 
 
 
 
 
142
  // run environment workflows
143
+ add_action( 'admin_notices', [ $this, 'show_admin_notifications' ] );
144
+ Environment_Check::get_instance()->disable_third_party_plugin_features();
 
 
 
 
145
  if ( $this->options['general']['maximum_compatibility_mode'] ) {
146
+ Environment_Check::get_instance()->enable_compatibility_mode();
147
  }
148
+ Environment_Check::get_instance()->flush_cache_on_plugin_changes();
149
  register_activation_hook( __FILE__, [ $this, 'plugin_activated' ] );
150
  register_deactivation_hook( __FILE__, [ $this, 'plugin_deactivated' ] );
151
  register_deactivation_hook( __FILE__, function () {
240
 
241
  public function plugin_activated()
242
  {
243
+ Environment_Check::get_instance()->flush_cache_of_all_cache_plugins();
244
  }
245
 
246
  public function plugin_deactivated()
247
  {
248
+ Environment_Check::get_instance()->flush_cache_of_all_cache_plugins();
249
  }
250
 
251
  public function environment_check_admin_notices()
252
  {
253
+ // if (apply_filters('wpm_show_admin_alerts', apply_filters_deprecated('wooptpm_show_admin_alerts', [true], '1.13.0', 'wpm_show_admin_alerts'))) {
254
+ // // Add admin alerts that can be disabled by the user with a filter
255
+ // }
 
 
 
 
 
256
  // https://developer.wordpress.org/reference/hooks/admin_notices/#comment-5163
257
  // if (defined('DISABLE_NAG_NOTICES') && DISABLE_NAG_NOTICES) {
258
  // // do some stuff
263
  public function init()
264
  {
265
  add_action( 'pmw_tracking_accuracy_analysis', function () {
266
+ Debug_Info::get_instance()->run_tracking_accuracy_analysis();
267
  } );
268
 
269
  if ( is_admin() ) {
281
  wp_schedule_event( strtotime( '03:25:00' ), 'daily', 'pmw_tracking_accuracy_analysis' );
282
  }
283
  // display admin views
284
+ Admin::get_instance();
285
  // ask visitor for rating
286
+ Ask_For_Rating::get_instance();
287
+ // Load admin notification handlers
288
+ Notification_Handlers::get_instance();
289
+ if ( Environment_Check::get_instance()->is_woocommerce_active() ) {
290
+ Order_Columns::get_instance();
291
+ }
292
  // add a settings link on the plugins page
293
  add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'wpm_settings_link' ] );
294
  }
295
 
296
+ Deprecated_Filters::load_deprecated_filters();
297
  // inject pixels into front end
298
  // add_action('after_setup_theme', [$this, 'inject_pixels']);
299
  $this->inject_pixels();
317
  );
318
  if ( false === $cookie_prevention ) {
319
  // inject pixels
320
+ Pixel_Manager::get_instance();
321
  }
322
  }
323
 
324
+ public function show_admin_notifications()
325
  {
326
+ // Notifications::payment_gateway_accuracy_warning();
327
+ /**
328
+ * Run compatibility checks for the admin
329
+ */
330
+ Environment_Check::get_instance()->run_checks();
331
+ /**
332
+ * Check for incompatible plugins
333
+ */
334
+ Environment_Check::get_instance()->run_incompatible_plugins_checks();
335
+ /**
336
+ * Show admin notices
337
+ */
338
+ // if (apply_filters('wpm_show_admin_alerts', apply_filters_deprecated('wooptpm_show_admin_alerts', [true], '1.13.0', 'wpm_show_admin_alerts'))) {
339
+ // // Add admin alerts that can be disabled by the user with a filter
340
+ // }
341
+ //
342
+ // https://developer.wordpress.org/reference/hooks/admin_notices/#comment-5163
343
+ // if (defined('DISABLE_NAG_NOTICES') && DISABLE_NAG_NOTICES) {
344
+ // // do some stuff
345
+ // }
346
  }
347
 
348
  // initialise the options