@depict-ai/utilishared 0.0.48 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference path="../jsx.d.ts" />
2
- /// <reference path="../jsx.d.ts" />
3
2
  import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
4
- export const version = "0.0.48";
3
+ export const version = "0.0.50";
5
4
  export const is_debug: boolean;
6
5
  /**
7
6
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
package/dist/main.js CHANGED
@@ -271,7 +271,7 @@ $parcel$export(module.exports, "camelCasifyObject", () => $89758b55120b0cbd$expo
271
271
  $parcel$export(module.exports, "snakeCasifyObject", () => $89758b55120b0cbd$export$b481488de1caa85);
272
272
  $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fbfd8236492);
273
273
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
274
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.48";
274
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.50";
275
275
 
276
276
 
277
277
  const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/ (()=>process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (document.currentScript?.dataset?.debug === "true" || localStorage.getItem("debug") === "true"))();
@@ -833,7 +833,7 @@ async function $0cf2ab65d8901485$var$load_sentry(TENANT, more_options = {}, extr
833
833
 
834
834
 
835
835
 
836
- const $61a34358bf0d3d8b$export$af2e17a20c2ea3c5 = !(process.env.SENTRY === "true" || process.env.DEPICT_ERROR_REPORTING === "true" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "true") && (process.env.SENTRY === "false" || process.env.DEPICT_ERROR_REPORTING === "false" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "false" || (0, $7b5e577a60b81e60$export$55fe61489d2c7417)) ? /*@__PURE__*/ $61a34358bf0d3d8b$var$fakesentry() : /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$0cf2ab65d8901485$export$2e2bcd8739ae039)(process.env.TENANT || "unknown", undefined, (0, $e6c6e7929ea385ae$export$de56f1198d121036));
836
+ const $61a34358bf0d3d8b$export$af2e17a20c2ea3c5 = !(process.env.SENTRY === "true" || process.env.DEPICT_ERROR_REPORTING === "true" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "true") && (process.env.SENTRY === "false" || process.env.DEPICT_ERROR_REPORTING === "false" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "false" || (0, $7b5e577a60b81e60$export$55fe61489d2c7417)) ? /*@__PURE__*/ $61a34358bf0d3d8b$var$fakesentry() : /*@__PURE__*/ (0, /*@__PURE__*/$0cf2ab65d8901485$export$2e2bcd8739ae039)(process.env.TENANT || "unknown", undefined, (0, $e6c6e7929ea385ae$export$de56f1198d121036));
837
837
  function $61a34358bf0d3d8b$var$fakesentry() {
838
838
  // // source: https://docs.sentry.io/platforms/javascript/troubleshooting/#dealing-with-ad-blockers
839
839
  // const handler = {
@@ -896,7 +896,7 @@ function $268cbd9e4ade92db$export$f18d5b0af29128b7(msg, severity, input_data = {
896
896
  }
897
897
 
898
898
 
899
- const $eee5951374097b61$export$8582cf3716962dc2 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async ({ recs: recs , min_recs: min_recs , market: market , type: type , product_id: product_id , tenant: tenant })=>{
899
+ const $eee5951374097b61$export$8582cf3716962dc2 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async ({ recs: recs , min_recs: min_recs , market: market , type: type , product_id: product_id , tenant: tenant })=>{
900
900
  if (type == "placeholder") return;
901
901
  if (typeof product_id === "function") product_id = product_id();
902
902
  product_id = await product_id;
@@ -1030,7 +1030,7 @@ function $7599647868f98022$var$check_if_querySelectorAll_needs_patching() {
1030
1030
 
1031
1031
  let $55595fc7bb226f61$var$has_queued_microtask = false;
1032
1032
  const $55595fc7bb226f61$var$queued_callbacks = /*@__PURE__*/ new Map();
1033
- const $55595fc7bb226f61$var$catchified_deduplicate_and_dispatch = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)($55595fc7bb226f61$var$deduplicate_and_dispatch, "error in observer event processing", "error");
1033
+ const $55595fc7bb226f61$var$catchified_deduplicate_and_dispatch = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)($55595fc7bb226f61$var$deduplicate_and_dispatch, "error in observer event processing", "error");
1034
1034
  function $55595fc7bb226f61$export$2b08e30396270f0b(callback, ev) {
1035
1035
  $55595fc7bb226f61$var$queued_callbacks.set(ev, callback);
1036
1036
  if (!$55595fc7bb226f61$var$has_queued_microtask) queueMicrotask($55595fc7bb226f61$var$catchified_deduplicate_and_dispatch);
@@ -2088,9 +2088,9 @@ let $e0a87646d12cb987$export$6399bdb2291895e0 = ()=>{
2088
2088
  };
2089
2089
  let $e0a87646d12cb987$export$adc61a405a4cabed = $e0a87646d12cb987$export$6399bdb2291895e0;
2090
2090
  let $e0a87646d12cb987$export$61e7e1f11e96692f = ()=>undefined;
2091
- const $e0a87646d12cb987$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$6399bdb2291895e0 = newfn);
2092
- const $e0a87646d12cb987$export$8a96793bf9f87d90 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$adc61a405a4cabed = newfn);
2093
- const $e0a87646d12cb987$export$93ae15b1ae509334 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$61e7e1f11e96692f = newfn);
2091
+ const $e0a87646d12cb987$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$6399bdb2291895e0 = newfn);
2092
+ const $e0a87646d12cb987$export$8a96793bf9f87d90 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$adc61a405a4cabed = newfn);
2093
+ const $e0a87646d12cb987$export$93ae15b1ae509334 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$61e7e1f11e96692f = newfn);
2094
2094
  const $e0a87646d12cb987$export$8c6f26a5b6921b95 = /*@__PURE__*/ ()=>{
2095
2095
  return {
2096
2096
  session_id: $e0a87646d12cb987$export$61e7e1f11e96692f(),
@@ -2101,7 +2101,7 @@ const $e0a87646d12cb987$export$8c6f26a5b6921b95 = /*@__PURE__*/ ()=>{
2101
2101
  document_referrer: document?.referrer
2102
2102
  };
2103
2103
  };
2104
- const $e0a87646d12cb987$export$82badda1f9923310 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((vars, use_ws)=>{
2104
+ const $e0a87646d12cb987$export$82badda1f9923310 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((vars, use_ws)=>{
2105
2105
  if (process.env.DEPICT === "false") return;
2106
2106
  const payload = [
2107
2107
  {
@@ -2115,7 +2115,7 @@ const $e0a87646d12cb987$export$82badda1f9923310 = /*@__PURE__*/ (0, /*@__PURE__*
2115
2115
  ];
2116
2116
  return (0, $0c84f8e99aac5765$export$28cacbd9b4306ffc)(payload, use_ws);
2117
2117
  });
2118
- const $e0a87646d12cb987$export$15f8a0cd5a8c0ebb = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((vars)=>{
2118
+ const $e0a87646d12cb987$export$15f8a0cd5a8c0ebb = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((vars)=>{
2119
2119
  if (process.env.DEPICT === "false") return;
2120
2120
  const beacon_retval = $e0a87646d12cb987$export$82badda1f9923310({
2121
2121
  ...vars,
@@ -2129,7 +2129,7 @@ const $e0a87646d12cb987$export$15f8a0cd5a8c0ebb = /*@__PURE__*/ (0, /*@__PURE__*
2129
2129
  );
2130
2130
  return beacon_retval;
2131
2131
  });
2132
- const $e0a87646d12cb987$export$9028351cb994757e = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((vars)=>{
2132
+ const $e0a87646d12cb987$export$9028351cb994757e = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((vars)=>{
2133
2133
  if (process.env.DEPICT === "false") return;
2134
2134
  return $e0a87646d12cb987$export$82badda1f9923310({
2135
2135
  ...vars,
@@ -2304,7 +2304,7 @@ const $72ed530554068e4f$var$intersection_observer_callback = (entries)=>{
2304
2304
  * Global IntersectionObserver used for all impression tracking.
2305
2305
  * It's faster to use one observer for all elements than to create a new one for each element.
2306
2306
  */ const $72ed530554068e4f$var$intersection_observer = /*@__PURE__*/ new IntersectionObserver((0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)($72ed530554068e4f$var$intersection_observer_callback), {
2307
- threshold: /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$0da0cad4f39e8f32$export$f8ea2e7b15b5d129)(8)
2307
+ threshold: /*@__PURE__*/ (0, /*@__PURE__*/$0da0cad4f39e8f32$export$f8ea2e7b15b5d129)(8)
2308
2308
  });
2309
2309
 
2310
2310
 
@@ -2365,7 +2365,7 @@ const $8e19f8200d357fe7$export$37125ccc5dd98050 = ({ element: element , data: da
2365
2365
 
2366
2366
 
2367
2367
  let $dd025eb6f77f8f8b$export$135da44d0ba958bc = [
2368
- 0.75,
2368
+ 0.6,
2369
2369
  0.5
2370
2370
  ];
2371
2371
  const $dd025eb6f77f8f8b$export$c543ee4cdb0d0964 = (start, end)=>$dd025eb6f77f8f8b$export$135da44d0ba958bc = [
@@ -2435,8 +2435,8 @@ async function $c8263a2185830bf1$export$2c34560c3749dc63(button, get_product_id,
2435
2435
 
2436
2436
 
2437
2437
 
2438
- const $69f7524c8bdd85b4$export$20e9533e68ee72e7 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$9a42a570de51ea3d$export$e806c6c1615a59ae)(false);
2439
- const $69f7524c8bdd85b4$export$a9d39e43ae273d26 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$9a42a570de51ea3d$export$e806c6c1615a59ae)();
2438
+ const $69f7524c8bdd85b4$export$20e9533e68ee72e7 = /*@__PURE__*/ (0, /*@__PURE__*/$9a42a570de51ea3d$export$e806c6c1615a59ae)(false);
2439
+ const $69f7524c8bdd85b4$export$a9d39e43ae273d26 = /*@__PURE__*/ (0, /*@__PURE__*/$9a42a570de51ea3d$export$e806c6c1615a59ae)();
2440
2440
  const $69f7524c8bdd85b4$export$446840cab57eeedb = /*@__PURE__*/ new Set();
2441
2441
  let $69f7524c8bdd85b4$var$old_url;
2442
2442
  const $69f7524c8bdd85b4$var$maybe_navigation = ()=>{
@@ -2622,7 +2622,7 @@ function $28e42b0009d694b2$export$8827362e5e938d26() {
2622
2622
  ].forEach((e)=>window.addEventListener(e, consent_maybe_changed, false));
2623
2623
  return $28e42b0009d694b2$var$cookie_ipns;
2624
2624
  }
2625
- const $28e42b0009d694b2$export$abec7fd9f0b9cc22 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2625
+ const $28e42b0009d694b2$export$abec7fd9f0b9cc22 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2626
2626
  (0, $e6c6e7929ea385ae$export$de56f1198d121036)("Initializing Cookiebot tracking");
2627
2627
  if (!$28e42b0009d694b2$var$required_consent_level) return (0, $e6c6e7929ea385ae$export$de56f1198d121036)("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
2628
2628
  const original_get_depict_id = (0, $e0a87646d12cb987$export$6399bdb2291895e0);
@@ -2700,7 +2700,7 @@ function $2026711c6c2d6204$export$7e4427e80d5fc619() {
2700
2700
  }));
2701
2701
  return $2026711c6c2d6204$var$cookie_ipns;
2702
2702
  }
2703
- const $2026711c6c2d6204$export$f0f6c846d96fdbec = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2703
+ const $2026711c6c2d6204$export$f0f6c846d96fdbec = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2704
2704
  (0, $e6c6e7929ea385ae$export$de56f1198d121036)("Initializing OptAnon tracking");
2705
2705
  if (!$2026711c6c2d6204$var$required_consent_level) return (0, $e6c6e7929ea385ae$export$de56f1198d121036)("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
2706
2706
  const original_get_depict_id = (0, $e0a87646d12cb987$export$6399bdb2291895e0);
@@ -2719,7 +2719,7 @@ const $2026711c6c2d6204$export$f0f6c846d96fdbec = /*@__PURE__*/ (0, /*@__PURE__*
2719
2719
 
2720
2720
 
2721
2721
  const $d3d8549954e0318e$var$g = typeof globalThis == "object" && globalThis || window;
2722
- const $d3d8549954e0318e$export$f3354ec2ce95ebd9 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (GA_ID, strict)=>{
2722
+ const $d3d8549954e0318e$export$f3354ec2ce95ebd9 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (GA_ID, strict)=>{
2723
2723
  if (process.env.GTAG === "false") return;
2724
2724
  if (!GA_ID) {
2725
2725
  (0, $e6c6e7929ea385ae$export$c2363754d4758444)("Couldn't load gtag, GA_ID not specified", GA_ID);
@@ -2757,7 +2757,7 @@ const $d3d8549954e0318e$export$f3354ec2ce95ebd9 = /*@__PURE__*/ (0, /*@__PURE__*
2757
2757
  head.appendChild(script);
2758
2758
  (0, $e6c6e7929ea385ae$export$de56f1198d121036)("Loading gtag now", script);
2759
2759
  });
2760
- const $d3d8549954e0318e$export$d031e55ccd4c52dc = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((GA_ID)=>{
2760
+ const $d3d8549954e0318e$export$d031e55ccd4c52dc = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((GA_ID)=>{
2761
2761
  if (process.env.GTAG === "false") return;
2762
2762
  $d3d8549954e0318e$var$g.dataLayer ||= [];
2763
2763
  function gtag() {
@@ -2770,7 +2770,7 @@ const $d3d8549954e0318e$export$d031e55ccd4c52dc = /*@__PURE__*/ (0, /*@__PURE__*
2770
2770
  });
2771
2771
  (0, $e6c6e7929ea385ae$export$de56f1198d121036)("configuring gtag with", GA_ID);
2772
2772
  });
2773
- const $d3d8549954e0318e$export$7babcd5d4056b2ca = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (raw_displays, get_product_id, more)=>{
2773
+ const $d3d8549954e0318e$export$7babcd5d4056b2ca = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (raw_displays, get_product_id, more)=>{
2774
2774
  const displays = raw_displays; // gtag tracking is "obsolete" and we don't expect any customers using something else than LegacyDisplay to use it
2775
2775
  if (process.env.GTAG === "false") return;
2776
2776
  if (process.env.GTAG_VIEW === "false") return;
@@ -2802,7 +2802,7 @@ const $d3d8549954e0318e$export$7babcd5d4056b2ca = /*@__PURE__*/ (0, /*@__PURE__*
2802
2802
  }
2803
2803
  } else (0, $e6c6e7929ea385ae$export$c2363754d4758444)("not sending gtag tracking as there is no gtag");
2804
2804
  });
2805
- const $d3d8549954e0318e$export$f522672c9379e339 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (product_id, index, more)=>{
2805
+ const $d3d8549954e0318e$export$f522672c9379e339 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (product_id, index, more)=>{
2806
2806
  if (process.env.GTAG === "false") return;
2807
2807
  if (process.env.GTAG_EVENT_CONSENT_LEVEL !== undefined && !await $d3d8549954e0318e$var$can_send_gtag_events(product_id, index, more)) return;
2808
2808
  if (typeof $d3d8549954e0318e$var$g.gtag == "function") {
@@ -2825,7 +2825,7 @@ const $d3d8549954e0318e$export$f522672c9379e339 = /*@__PURE__*/ (0, /*@__PURE__*
2825
2825
  return $d3d8549954e0318e$var$g.gtag(...gtag_args);
2826
2826
  } else (0, $e6c6e7929ea385ae$export$c2363754d4758444)("not sending gtag tracking as there is no gtag");
2827
2827
  });
2828
- const $d3d8549954e0318e$export$f75172d2e289cd02 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((action)=>{
2828
+ const $d3d8549954e0318e$export$f75172d2e289cd02 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((action)=>{
2829
2829
  if (process.env.GA === "false") return;
2830
2830
  if (typeof $d3d8549954e0318e$var$g.ga != "function") {
2831
2831
  (0, $e6c6e7929ea385ae$export$c2363754d4758444)("Not sending to ga as there is no ga");
@@ -2840,7 +2840,7 @@ const $d3d8549954e0318e$export$f75172d2e289cd02 = /*@__PURE__*/ (0, /*@__PURE__*
2840
2840
  nonInteraction: 1
2841
2841
  });
2842
2842
  });
2843
- const $d3d8549954e0318e$export$ac7296527cb52311 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((GAID)=>{
2843
+ const $d3d8549954e0318e$export$ac7296527cb52311 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((GAID)=>{
2844
2844
  if (process.env.GA === "false") return;
2845
2845
  if (!GAID) {
2846
2846
  (0, $e6c6e7929ea385ae$export$c2363754d4758444)(new Error("No GAID specified"));
@@ -2854,8 +2854,8 @@ const $d3d8549954e0318e$export$ac7296527cb52311 = /*@__PURE__*/ (0, /*@__PURE__*
2854
2854
  $d3d8549954e0318e$var$g.ga("create", GAID, "auto", "depict");
2855
2855
  $d3d8549954e0318e$export$f3354ec2ce95ebd9(GAID, false);
2856
2856
  });
2857
- const $d3d8549954e0318e$export$127751e82111fcf = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(()=>$d3d8549954e0318e$export$f75172d2e289cd02("rec_bar_click"));
2858
- const $d3d8549954e0318e$export$bf205937e5e012cb = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(()=>$d3d8549954e0318e$export$f75172d2e289cd02("add_to_cart_after_rec_bar_click"));
2857
+ const $d3d8549954e0318e$export$127751e82111fcf = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(()=>$d3d8549954e0318e$export$f75172d2e289cd02("rec_bar_click"));
2858
+ const $d3d8549954e0318e$export$bf205937e5e012cb = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(()=>$d3d8549954e0318e$export$f75172d2e289cd02("add_to_cart_after_rec_bar_click"));
2859
2859
  async function $d3d8549954e0318e$var$can_send_gtag_events(...stuff_to_log) {
2860
2860
  const required_consent_level = process.env.GTAG_LOADING_CONSENT_LEVEL;
2861
2861
  if (required_consent_level !== undefined) return true; // just in case
@@ -2881,7 +2881,7 @@ async function $d3d8549954e0318e$var$can_send_gtag_events(...stuff_to_log) {
2881
2881
 
2882
2882
  let $e4bebbfa0f0b1454$var$existing_style_tag;
2883
2883
  let $e4bebbfa0f0b1454$var$reactions_in_last_s = 0;
2884
- const $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (css)=>{
2884
+ const $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (css)=>{
2885
2885
  const style_tag = await ($e4bebbfa0f0b1454$var$existing_style_tag ||= (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("head").then((head)=>{
2886
2886
  const tag = document.createElement("style");
2887
2887
  (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onremoved(// reinsertion for next.js's "portable" <head>
@@ -3025,7 +3025,7 @@ const $fbb09973782881cb$var$default_get_ga_prod_id = (elem)=>elem?.dataset?.ga_i
3025
3025
  const $fbb09973782881cb$var$get_index_in_children_of_el = (el)=>[
3026
3026
  ...el?.parentElement?.children || []
3027
3027
  ].indexOf(el);
3028
- const $fbb09973782881cb$export$29a6094e0bd8bc5f = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (options, gtag_options)=>{
3028
+ const $fbb09973782881cb$export$29a6094e0bd8bc5f = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (options, gtag_options)=>{
3029
3029
  const { product_selector: product_selector , a2c_selector: a2c_selector , rec_a2c_selector: rec_a2c_selector , rec_a2c_unbubbled: rec_a2c_unbubbled , get_product_id: get_product_id = options.t?.get_product_id , get_rec_id: get_rec_id = $fbb09973782881cb$var$default_get_rec_id , get_prod_id: get_prod_id = $fbb09973782881cb$var$default_get_prod_id , get_ga_prod_id: get_ga_prod_id = $fbb09973782881cb$var$default_get_ga_prod_id , get_display: get_display , impression_tracking: impression_tracking , a2c_elements: a2c_elements , product_elements: product_elements , t: t , click_location_prefix: click_location_prefix = (elem)=>elem?.parentElement?.dataset?.type + "_" } = options;
3030
3030
  const get_display_data = async (elem)=>{
3031
3031
  const data = {};
@@ -3222,7 +3222,7 @@ const $fbb09973782881cb$export$29a6094e0bd8bc5f = /*@__PURE__*/ (0, /*@__PURE__*
3222
3222
  })
3223
3223
  };
3224
3224
  });
3225
- const $fbb09973782881cb$export$6ebd242c09192cec = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((element)=>{
3225
+ const $fbb09973782881cb$export$6ebd242c09192cec = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((element)=>{
3226
3226
  element.style.boxShadow = "rgba(255,0,0,0.5) 10px 10px 30px 40px";
3227
3227
  element.style.background = "rgba(255,0,0,0.5)";
3228
3228
  element.style.color = "white";
@@ -4714,6 +4714,7 @@ class $1683d0164abd7c1d$export$692b27c28639e5b9 {
4714
4714
 
4715
4715
 
4716
4716
 
4717
+
4717
4718
  class $a69a5236b5814082$export$68babfc5be0de5da extends (0, $1683d0164abd7c1d$export$692b27c28639e5b9) {
4718
4719
  constructor(options, lazyfier_options){
4719
4720
  super(options);
@@ -4726,7 +4727,10 @@ class $a69a5236b5814082$export$68babfc5be0de5da extends (0, $1683d0164abd7c1d$ex
4726
4727
  disconnector();
4727
4728
  return;
4728
4729
  }
4729
- }));
4730
+ }), // Fixes https://gitlab.com/depict-ai/depict.ai/-/merge_requests/5816/diffs, don't understand why
4731
+ {
4732
+ threshold: (0, $0da0cad4f39e8f32$export$f8ea2e7b15b5d129)(10)
4733
+ });
4730
4734
  i_o.observe(element);
4731
4735
  });
4732
4736
  });
@@ -7345,7 +7349,7 @@ function $c693a2d89c78efe6$export$f811d2ce0aa6019b({ surfaces: input_surfaces ,
7345
7349
  }
7346
7350
  return surfaces.map(({ promise_: promise_ })=>promise_);
7347
7351
  }
7348
- const $c693a2d89c78efe6$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (target, should_stay_inserted)=>{
7352
+ const $c693a2d89c78efe6$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)(async (target, should_stay_inserted)=>{
7349
7353
  const per_el_fn = (el, disconnect_observer)=>{
7350
7354
  const comment_node = document.createComment("Old recs were here // Depict");
7351
7355
  (0, $e6c6e7929ea385ae$export$de56f1198d121036)("Replacing", el, "with", comment_node);
package/dist/module.js CHANGED
@@ -4,7 +4,7 @@ function $parcel$export(e, n, v, s) {
4
4
  function $parcel$interopDefault(a) {
5
5
  return a && a.__esModule ? a.default : a;
6
6
  }
7
- const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.48";
7
+ const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.50";
8
8
 
9
9
 
10
10
  const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/ (()=>process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (document.currentScript?.dataset?.debug === "true" || localStorage.getItem("debug") === "true"))();
@@ -566,7 +566,7 @@ async function $a035d75d336cf506$var$load_sentry(TENANT, more_options = {}, extr
566
566
 
567
567
 
568
568
 
569
- const $eba382943196079c$export$af2e17a20c2ea3c5 = !(process.env.SENTRY === "true" || process.env.DEPICT_ERROR_REPORTING === "true" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "true") && (process.env.SENTRY === "false" || process.env.DEPICT_ERROR_REPORTING === "false" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "false" || (0, $571bce04eb920cd8$export$55fe61489d2c7417)) ? /*@__PURE__*/ $eba382943196079c$var$fakesentry() : /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$a035d75d336cf506$export$2e2bcd8739ae039)(process.env.TENANT || "unknown", undefined, (0, $649f456f663da9fc$export$de56f1198d121036));
569
+ const $eba382943196079c$export$af2e17a20c2ea3c5 = !(process.env.SENTRY === "true" || process.env.DEPICT_ERROR_REPORTING === "true" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "true") && (process.env.SENTRY === "false" || process.env.DEPICT_ERROR_REPORTING === "false" || process.env.NEXT_PUBLIC_DEPICT_ERROR_REPORTING === "false" || (0, $571bce04eb920cd8$export$55fe61489d2c7417)) ? /*@__PURE__*/ $eba382943196079c$var$fakesentry() : /*@__PURE__*/ (0, /*@__PURE__*/$a035d75d336cf506$export$2e2bcd8739ae039)(process.env.TENANT || "unknown", undefined, (0, $649f456f663da9fc$export$de56f1198d121036));
570
570
  function $eba382943196079c$var$fakesentry() {
571
571
  // // source: https://docs.sentry.io/platforms/javascript/troubleshooting/#dealing-with-ad-blockers
572
572
  // const handler = {
@@ -629,7 +629,7 @@ function $b04e44fad5ea42c7$export$f18d5b0af29128b7(msg, severity, input_data = {
629
629
  }
630
630
 
631
631
 
632
- const $66b898e9bfcef532$export$8582cf3716962dc2 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async ({ recs: recs , min_recs: min_recs , market: market , type: type , product_id: product_id , tenant: tenant })=>{
632
+ const $66b898e9bfcef532$export$8582cf3716962dc2 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async ({ recs: recs , min_recs: min_recs , market: market , type: type , product_id: product_id , tenant: tenant })=>{
633
633
  if (type == "placeholder") return;
634
634
  if (typeof product_id === "function") product_id = product_id();
635
635
  product_id = await product_id;
@@ -763,7 +763,7 @@ function $39ef887981612535$var$check_if_querySelectorAll_needs_patching() {
763
763
 
764
764
  let $8be08add28592faf$var$has_queued_microtask = false;
765
765
  const $8be08add28592faf$var$queued_callbacks = /*@__PURE__*/ new Map();
766
- const $8be08add28592faf$var$catchified_deduplicate_and_dispatch = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)($8be08add28592faf$var$deduplicate_and_dispatch, "error in observer event processing", "error");
766
+ const $8be08add28592faf$var$catchified_deduplicate_and_dispatch = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)($8be08add28592faf$var$deduplicate_and_dispatch, "error in observer event processing", "error");
767
767
  function $8be08add28592faf$export$2b08e30396270f0b(callback, ev) {
768
768
  $8be08add28592faf$var$queued_callbacks.set(ev, callback);
769
769
  if (!$8be08add28592faf$var$has_queued_microtask) queueMicrotask($8be08add28592faf$var$catchified_deduplicate_and_dispatch);
@@ -1821,9 +1821,9 @@ let $43683b1103edab15$export$6399bdb2291895e0 = ()=>{
1821
1821
  };
1822
1822
  let $43683b1103edab15$export$adc61a405a4cabed = $43683b1103edab15$export$6399bdb2291895e0;
1823
1823
  let $43683b1103edab15$export$61e7e1f11e96692f = ()=>undefined;
1824
- const $43683b1103edab15$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$6399bdb2291895e0 = newfn);
1825
- const $43683b1103edab15$export$8a96793bf9f87d90 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$adc61a405a4cabed = newfn);
1826
- const $43683b1103edab15$export$93ae15b1ae509334 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$61e7e1f11e96692f = newfn);
1824
+ const $43683b1103edab15$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$6399bdb2291895e0 = newfn);
1825
+ const $43683b1103edab15$export$8a96793bf9f87d90 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$adc61a405a4cabed = newfn);
1826
+ const $43683b1103edab15$export$93ae15b1ae509334 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$61e7e1f11e96692f = newfn);
1827
1827
  const $43683b1103edab15$export$8c6f26a5b6921b95 = /*@__PURE__*/ ()=>{
1828
1828
  return {
1829
1829
  session_id: $43683b1103edab15$export$61e7e1f11e96692f(),
@@ -1834,7 +1834,7 @@ const $43683b1103edab15$export$8c6f26a5b6921b95 = /*@__PURE__*/ ()=>{
1834
1834
  document_referrer: document?.referrer
1835
1835
  };
1836
1836
  };
1837
- const $43683b1103edab15$export$82badda1f9923310 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((vars, use_ws)=>{
1837
+ const $43683b1103edab15$export$82badda1f9923310 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((vars, use_ws)=>{
1838
1838
  if (process.env.DEPICT === "false") return;
1839
1839
  const payload = [
1840
1840
  {
@@ -1848,7 +1848,7 @@ const $43683b1103edab15$export$82badda1f9923310 = /*@__PURE__*/ (0, /*@__PURE__*
1848
1848
  ];
1849
1849
  return (0, $cafa1ff1049985c2$export$28cacbd9b4306ffc)(payload, use_ws);
1850
1850
  });
1851
- const $43683b1103edab15$export$15f8a0cd5a8c0ebb = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((vars)=>{
1851
+ const $43683b1103edab15$export$15f8a0cd5a8c0ebb = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((vars)=>{
1852
1852
  if (process.env.DEPICT === "false") return;
1853
1853
  const beacon_retval = $43683b1103edab15$export$82badda1f9923310({
1854
1854
  ...vars,
@@ -1862,7 +1862,7 @@ const $43683b1103edab15$export$15f8a0cd5a8c0ebb = /*@__PURE__*/ (0, /*@__PURE__*
1862
1862
  );
1863
1863
  return beacon_retval;
1864
1864
  });
1865
- const $43683b1103edab15$export$9028351cb994757e = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((vars)=>{
1865
+ const $43683b1103edab15$export$9028351cb994757e = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((vars)=>{
1866
1866
  if (process.env.DEPICT === "false") return;
1867
1867
  return $43683b1103edab15$export$82badda1f9923310({
1868
1868
  ...vars,
@@ -2037,7 +2037,7 @@ const $f24c14db771b471d$var$intersection_observer_callback = (entries)=>{
2037
2037
  * Global IntersectionObserver used for all impression tracking.
2038
2038
  * It's faster to use one observer for all elements than to create a new one for each element.
2039
2039
  */ const $f24c14db771b471d$var$intersection_observer = /*@__PURE__*/ new IntersectionObserver((0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)($f24c14db771b471d$var$intersection_observer_callback), {
2040
- threshold: /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$9ab9ecb74920f343$export$f8ea2e7b15b5d129)(8)
2040
+ threshold: /*@__PURE__*/ (0, /*@__PURE__*/$9ab9ecb74920f343$export$f8ea2e7b15b5d129)(8)
2041
2041
  });
2042
2042
 
2043
2043
 
@@ -2098,7 +2098,7 @@ const $21285393646b9849$export$37125ccc5dd98050 = ({ element: element , data: da
2098
2098
 
2099
2099
 
2100
2100
  let $ccf918da074d7243$export$135da44d0ba958bc = [
2101
- 0.75,
2101
+ 0.6,
2102
2102
  0.5
2103
2103
  ];
2104
2104
  const $ccf918da074d7243$export$c543ee4cdb0d0964 = (start, end)=>$ccf918da074d7243$export$135da44d0ba958bc = [
@@ -2168,8 +2168,8 @@ async function $91b2e49f92ed636c$export$2c34560c3749dc63(button, get_product_id,
2168
2168
 
2169
2169
 
2170
2170
 
2171
- const $0d2acf276472ebf7$export$20e9533e68ee72e7 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$607fc90221d440a6$export$e806c6c1615a59ae)(false);
2172
- const $0d2acf276472ebf7$export$a9d39e43ae273d26 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$607fc90221d440a6$export$e806c6c1615a59ae)();
2171
+ const $0d2acf276472ebf7$export$20e9533e68ee72e7 = /*@__PURE__*/ (0, /*@__PURE__*/$607fc90221d440a6$export$e806c6c1615a59ae)(false);
2172
+ const $0d2acf276472ebf7$export$a9d39e43ae273d26 = /*@__PURE__*/ (0, /*@__PURE__*/$607fc90221d440a6$export$e806c6c1615a59ae)();
2173
2173
  const $0d2acf276472ebf7$export$446840cab57eeedb = /*@__PURE__*/ new Set();
2174
2174
  let $0d2acf276472ebf7$var$old_url;
2175
2175
  const $0d2acf276472ebf7$var$maybe_navigation = ()=>{
@@ -2355,7 +2355,7 @@ function $155540b3b8aca771$export$8827362e5e938d26() {
2355
2355
  ].forEach((e)=>window.addEventListener(e, consent_maybe_changed, false));
2356
2356
  return $155540b3b8aca771$var$cookie_ipns;
2357
2357
  }
2358
- const $155540b3b8aca771$export$abec7fd9f0b9cc22 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2358
+ const $155540b3b8aca771$export$abec7fd9f0b9cc22 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2359
2359
  (0, $649f456f663da9fc$export$de56f1198d121036)("Initializing Cookiebot tracking");
2360
2360
  if (!$155540b3b8aca771$var$required_consent_level) return (0, $649f456f663da9fc$export$de56f1198d121036)("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
2361
2361
  const original_get_depict_id = (0, $43683b1103edab15$export$6399bdb2291895e0);
@@ -2433,7 +2433,7 @@ function $5dbacdc6a3feeb15$export$7e4427e80d5fc619() {
2433
2433
  }));
2434
2434
  return $5dbacdc6a3feeb15$var$cookie_ipns;
2435
2435
  }
2436
- const $5dbacdc6a3feeb15$export$f0f6c846d96fdbec = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2436
+ const $5dbacdc6a3feeb15$export$f0f6c846d96fdbec = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (anon_id = "anonymous")=>{
2437
2437
  (0, $649f456f663da9fc$export$de56f1198d121036)("Initializing OptAnon tracking");
2438
2438
  if (!$5dbacdc6a3feeb15$var$required_consent_level) return (0, $649f456f663da9fc$export$de56f1198d121036)("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
2439
2439
  const original_get_depict_id = (0, $43683b1103edab15$export$6399bdb2291895e0);
@@ -2452,7 +2452,7 @@ const $5dbacdc6a3feeb15$export$f0f6c846d96fdbec = /*@__PURE__*/ (0, /*@__PURE__*
2452
2452
 
2453
2453
 
2454
2454
  const $c749fe63b72056ef$var$g = typeof globalThis == "object" && globalThis || window;
2455
- const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (GA_ID, strict)=>{
2455
+ const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (GA_ID, strict)=>{
2456
2456
  if (process.env.GTAG === "false") return;
2457
2457
  if (!GA_ID) {
2458
2458
  (0, $649f456f663da9fc$export$c2363754d4758444)("Couldn't load gtag, GA_ID not specified", GA_ID);
@@ -2490,7 +2490,7 @@ const $c749fe63b72056ef$export$f3354ec2ce95ebd9 = /*@__PURE__*/ (0, /*@__PURE__*
2490
2490
  head.appendChild(script);
2491
2491
  (0, $649f456f663da9fc$export$de56f1198d121036)("Loading gtag now", script);
2492
2492
  });
2493
- const $c749fe63b72056ef$export$d031e55ccd4c52dc = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((GA_ID)=>{
2493
+ const $c749fe63b72056ef$export$d031e55ccd4c52dc = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((GA_ID)=>{
2494
2494
  if (process.env.GTAG === "false") return;
2495
2495
  $c749fe63b72056ef$var$g.dataLayer ||= [];
2496
2496
  function gtag() {
@@ -2503,7 +2503,7 @@ const $c749fe63b72056ef$export$d031e55ccd4c52dc = /*@__PURE__*/ (0, /*@__PURE__*
2503
2503
  });
2504
2504
  (0, $649f456f663da9fc$export$de56f1198d121036)("configuring gtag with", GA_ID);
2505
2505
  });
2506
- const $c749fe63b72056ef$export$7babcd5d4056b2ca = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (raw_displays, get_product_id, more)=>{
2506
+ const $c749fe63b72056ef$export$7babcd5d4056b2ca = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (raw_displays, get_product_id, more)=>{
2507
2507
  const displays = raw_displays; // gtag tracking is "obsolete" and we don't expect any customers using something else than LegacyDisplay to use it
2508
2508
  if (process.env.GTAG === "false") return;
2509
2509
  if (process.env.GTAG_VIEW === "false") return;
@@ -2535,7 +2535,7 @@ const $c749fe63b72056ef$export$7babcd5d4056b2ca = /*@__PURE__*/ (0, /*@__PURE__*
2535
2535
  }
2536
2536
  } else (0, $649f456f663da9fc$export$c2363754d4758444)("not sending gtag tracking as there is no gtag");
2537
2537
  });
2538
- const $c749fe63b72056ef$export$f522672c9379e339 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (product_id, index, more)=>{
2538
+ const $c749fe63b72056ef$export$f522672c9379e339 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (product_id, index, more)=>{
2539
2539
  if (process.env.GTAG === "false") return;
2540
2540
  if (process.env.GTAG_EVENT_CONSENT_LEVEL !== undefined && !await $c749fe63b72056ef$var$can_send_gtag_events(product_id, index, more)) return;
2541
2541
  if (typeof $c749fe63b72056ef$var$g.gtag == "function") {
@@ -2558,7 +2558,7 @@ const $c749fe63b72056ef$export$f522672c9379e339 = /*@__PURE__*/ (0, /*@__PURE__*
2558
2558
  return $c749fe63b72056ef$var$g.gtag(...gtag_args);
2559
2559
  } else (0, $649f456f663da9fc$export$c2363754d4758444)("not sending gtag tracking as there is no gtag");
2560
2560
  });
2561
- const $c749fe63b72056ef$export$f75172d2e289cd02 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((action)=>{
2561
+ const $c749fe63b72056ef$export$f75172d2e289cd02 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((action)=>{
2562
2562
  if (process.env.GA === "false") return;
2563
2563
  if (typeof $c749fe63b72056ef$var$g.ga != "function") {
2564
2564
  (0, $649f456f663da9fc$export$c2363754d4758444)("Not sending to ga as there is no ga");
@@ -2573,7 +2573,7 @@ const $c749fe63b72056ef$export$f75172d2e289cd02 = /*@__PURE__*/ (0, /*@__PURE__*
2573
2573
  nonInteraction: 1
2574
2574
  });
2575
2575
  });
2576
- const $c749fe63b72056ef$export$ac7296527cb52311 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((GAID)=>{
2576
+ const $c749fe63b72056ef$export$ac7296527cb52311 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((GAID)=>{
2577
2577
  if (process.env.GA === "false") return;
2578
2578
  if (!GAID) {
2579
2579
  (0, $649f456f663da9fc$export$c2363754d4758444)(new Error("No GAID specified"));
@@ -2587,8 +2587,8 @@ const $c749fe63b72056ef$export$ac7296527cb52311 = /*@__PURE__*/ (0, /*@__PURE__*
2587
2587
  $c749fe63b72056ef$var$g.ga("create", GAID, "auto", "depict");
2588
2588
  $c749fe63b72056ef$export$f3354ec2ce95ebd9(GAID, false);
2589
2589
  });
2590
- const $c749fe63b72056ef$export$127751e82111fcf = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(()=>$c749fe63b72056ef$export$f75172d2e289cd02("rec_bar_click"));
2591
- const $c749fe63b72056ef$export$bf205937e5e012cb = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(()=>$c749fe63b72056ef$export$f75172d2e289cd02("add_to_cart_after_rec_bar_click"));
2590
+ const $c749fe63b72056ef$export$127751e82111fcf = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(()=>$c749fe63b72056ef$export$f75172d2e289cd02("rec_bar_click"));
2591
+ const $c749fe63b72056ef$export$bf205937e5e012cb = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(()=>$c749fe63b72056ef$export$f75172d2e289cd02("add_to_cart_after_rec_bar_click"));
2592
2592
  async function $c749fe63b72056ef$var$can_send_gtag_events(...stuff_to_log) {
2593
2593
  const required_consent_level = process.env.GTAG_LOADING_CONSENT_LEVEL;
2594
2594
  if (required_consent_level !== undefined) return true; // just in case
@@ -2614,7 +2614,7 @@ async function $c749fe63b72056ef$var$can_send_gtag_events(...stuff_to_log) {
2614
2614
 
2615
2615
  let $0a581f1dfa083522$var$existing_style_tag;
2616
2616
  let $0a581f1dfa083522$var$reactions_in_last_s = 0;
2617
- const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (css)=>{
2617
+ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (css)=>{
2618
2618
  const style_tag = await ($0a581f1dfa083522$var$existing_style_tag ||= (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("head").then((head)=>{
2619
2619
  const tag = document.createElement("style");
2620
2620
  (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onremoved(// reinsertion for next.js's "portable" <head>
@@ -2758,7 +2758,7 @@ const $d4ffde0b9fca0369$var$default_get_ga_prod_id = (elem)=>elem?.dataset?.ga_i
2758
2758
  const $d4ffde0b9fca0369$var$get_index_in_children_of_el = (el)=>[
2759
2759
  ...el?.parentElement?.children || []
2760
2760
  ].indexOf(el);
2761
- const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (options, gtag_options)=>{
2761
+ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (options, gtag_options)=>{
2762
2762
  const { product_selector: product_selector , a2c_selector: a2c_selector , rec_a2c_selector: rec_a2c_selector , rec_a2c_unbubbled: rec_a2c_unbubbled , get_product_id: get_product_id = options.t?.get_product_id , get_rec_id: get_rec_id = $d4ffde0b9fca0369$var$default_get_rec_id , get_prod_id: get_prod_id = $d4ffde0b9fca0369$var$default_get_prod_id , get_ga_prod_id: get_ga_prod_id = $d4ffde0b9fca0369$var$default_get_ga_prod_id , get_display: get_display , impression_tracking: impression_tracking , a2c_elements: a2c_elements , product_elements: product_elements , t: t , click_location_prefix: click_location_prefix = (elem)=>elem?.parentElement?.dataset?.type + "_" } = options;
2763
2763
  const get_display_data = async (elem)=>{
2764
2764
  const data = {};
@@ -2955,7 +2955,7 @@ const $d4ffde0b9fca0369$export$29a6094e0bd8bc5f = /*@__PURE__*/ (0, /*@__PURE__*
2955
2955
  })
2956
2956
  };
2957
2957
  });
2958
- const $d4ffde0b9fca0369$export$6ebd242c09192cec = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((element)=>{
2958
+ const $d4ffde0b9fca0369$export$6ebd242c09192cec = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((element)=>{
2959
2959
  element.style.boxShadow = "rgba(255,0,0,0.5) 10px 10px 30px 40px";
2960
2960
  element.style.background = "rgba(255,0,0,0.5)";
2961
2961
  element.style.color = "white";
@@ -4447,6 +4447,7 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
4447
4447
 
4448
4448
 
4449
4449
 
4450
+
4450
4451
  class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$export$692b27c28639e5b9) {
4451
4452
  constructor(options, lazyfier_options){
4452
4453
  super(options);
@@ -4459,7 +4460,10 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
4459
4460
  disconnector();
4460
4461
  return;
4461
4462
  }
4462
- }));
4463
+ }), // Fixes https://gitlab.com/depict-ai/depict.ai/-/merge_requests/5816/diffs, don't understand why
4464
+ {
4465
+ threshold: (0, $9ab9ecb74920f343$export$f8ea2e7b15b5d129)(10)
4466
+ });
4463
4467
  i_o.observe(element);
4464
4468
  });
4465
4469
  });
@@ -7078,7 +7082,7 @@ function $8bed543774ca0dd4$export$f811d2ce0aa6019b({ surfaces: input_surfaces ,
7078
7082
  }
7079
7083
  return surfaces.map(({ promise_: promise_ })=>promise_);
7080
7084
  }
7081
- const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*//*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (target, should_stay_inserted)=>{
7085
+ const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(async (target, should_stay_inserted)=>{
7082
7086
  const per_el_fn = (el, disconnect_observer)=>{
7083
7087
  const comment_node = document.createComment("Old recs were here // Depict");
7084
7088
  (0, $649f456f663da9fc$export$de56f1198d121036)("Replacing", el, "with", comment_node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/utilishared",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -42,7 +42,7 @@
42
42
  "@babel/core": "latest",
43
43
  "@babel/runtime": "latest",
44
44
  "@babel/runtime-corejs3": "latest",
45
- "@depict-ai/types": "^0.0.3",
45
+ "@depict-ai/types": "^0.0.5",
46
46
  "@parcel/resolver-default": "^2.8.0",
47
47
  "@sentry/cli": "latest",
48
48
  "@sentry/types": "^7.13.0",