@getlupa/client 1.15.0 → 1.15.1

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.
@@ -6806,6 +6806,8 @@ var __async = (__this, __arguments, generator) => {
6806
6806
  const TRACKING_STORAGE_KEY = "LUPA_STATS";
6807
6807
  const TRACKING_STORAGE_KEY_BASE = "LUPA_STATS_BASE";
6808
6808
  const TRACKING_ANALYTICS_KEY = "LUPA_ANALYTICS";
6809
+ const TRACKING_CLICK_DELAYED = "LUPA_TRACKING_CLICK_DELAYED";
6810
+ const DELAYED_TRACKING_EVENTS_CACHE = "LUPA_DELAYED_TRACKING_EVENTS";
6809
6811
  const TRACKING_KEY_LENGTH = 10;
6810
6812
  const HISTORY_MAX_ITEMS = 7;
6811
6813
  const S_MIN_WIDTH = 575;
@@ -7026,6 +7028,14 @@ var __async = (__this, __arguments, generator) => {
7026
7028
  const transformedStr = typeof str === "string" ? str : str.toString();
7027
7029
  return transformedStr.normalize === void 0 ? (_a = transformedStr.toLocaleLowerCase()) == null ? void 0 : _a.trim() : (_b = transformedStr.toLocaleLowerCase().normalize("NFKD").replace(/[^\w\s.-_/]/g, "")) == null ? void 0 : _b.trim();
7028
7030
  };
7031
+ const getTransformedString = (str) => {
7032
+ var _a, _b;
7033
+ if (!str) {
7034
+ return "";
7035
+ }
7036
+ const transformedStr = typeof str === "string" ? str : str.toString();
7037
+ return transformedStr.normalize === void 0 ? (_a = transformedStr.toLocaleLowerCase()) == null ? void 0 : _a.trim() : (_b = transformedStr.toLocaleLowerCase().normalize("NFKD")) == null ? void 0 : _b.trim();
7038
+ };
7029
7039
  const capitalize$1 = (str) => {
7030
7040
  if (!str) {
7031
7041
  return "";
@@ -7099,8 +7109,8 @@ var __async = (__this, __arguments, generator) => {
7099
7109
  if (!input2) {
7100
7110
  return false;
7101
7111
  }
7102
- const normalizedInput = getNormalizedString(input2);
7103
- return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
7112
+ const normalizedInput = getTransformedString(input2);
7113
+ return possibleValues.some((v) => getTransformedString(v) === normalizedInput);
7104
7114
  };
7105
7115
  const levenshteinDistance = (s = "", t = "") => {
7106
7116
  if (!(s == null ? void 0 : s.length)) {
@@ -7133,225 +7143,6 @@ var __async = (__this, __arguments, generator) => {
7133
7143
  const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
7134
7144
  return closestValue;
7135
7145
  };
7136
- const initAnalyticsTracking = (analyticsOptions) => {
7137
- try {
7138
- if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
7139
- window.sessionStorage.setItem(TRACKING_ANALYTICS_KEY, JSON.stringify(analyticsOptions));
7140
- } else {
7141
- window.sessionStorage.removeItem(TRACKING_ANALYTICS_KEY);
7142
- }
7143
- } catch (e2) {
7144
- }
7145
- };
7146
- const initBaseTracking = (enabled) => {
7147
- try {
7148
- if (enabled) {
7149
- window.sessionStorage.setItem(TRACKING_STORAGE_KEY_BASE, "1");
7150
- } else {
7151
- window.sessionStorage.removeItem(TRACKING_STORAGE_KEY_BASE);
7152
- clearSessionTracking();
7153
- clearUserTracking();
7154
- }
7155
- } catch (e2) {
7156
- }
7157
- };
7158
- const clearSessionTracking = () => {
7159
- try {
7160
- window.sessionStorage.removeItem(TRACKING_STORAGE_KEY);
7161
- } catch (e2) {
7162
- }
7163
- };
7164
- const initSessionTracking = () => {
7165
- try {
7166
- if (getSessionKey()) {
7167
- return;
7168
- }
7169
- const key = getRandomString(TRACKING_KEY_LENGTH);
7170
- window.sessionStorage.setItem(TRACKING_STORAGE_KEY, key);
7171
- } catch (e2) {
7172
- }
7173
- };
7174
- const initUserTracking = (userKey) => {
7175
- try {
7176
- if (getUserKey()) {
7177
- return;
7178
- }
7179
- const key = userKey || getRandomString(TRACKING_KEY_LENGTH);
7180
- window.localStorage.setItem(TRACKING_STORAGE_KEY, key);
7181
- } catch (e2) {
7182
- }
7183
- };
7184
- const clearUserTracking = () => {
7185
- try {
7186
- window.localStorage.removeItem(TRACKING_STORAGE_KEY);
7187
- } catch (e2) {
7188
- }
7189
- };
7190
- const isTrackingEnabled = () => {
7191
- try {
7192
- return Boolean(window.sessionStorage.getItem(TRACKING_STORAGE_KEY_BASE));
7193
- } catch (e2) {
7194
- return false;
7195
- }
7196
- };
7197
- const getSessionKey = () => {
7198
- var _a;
7199
- try {
7200
- return (_a = window.sessionStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7201
- } catch (e2) {
7202
- return void 0;
7203
- }
7204
- };
7205
- const getUserKey = () => {
7206
- var _a;
7207
- try {
7208
- return (_a = window.localStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7209
- } catch (e2) {
7210
- return void 0;
7211
- }
7212
- };
7213
- const initTracking = (options) => {
7214
- initBaseTracking(Boolean(options.trackBase));
7215
- if (options.trackSession) {
7216
- initSessionTracking();
7217
- } else {
7218
- clearSessionTracking();
7219
- }
7220
- if (options.trackUser) {
7221
- initUserTracking(options.userKey);
7222
- } else {
7223
- clearUserTracking();
7224
- }
7225
- if (options.analytics) {
7226
- initAnalyticsTracking(options.analytics);
7227
- }
7228
- };
7229
- const getLupaTrackingContext = () => {
7230
- if (!isTrackingEnabled()) {
7231
- return {};
7232
- }
7233
- return {
7234
- userId: getUserKey(),
7235
- sessionId: getSessionKey()
7236
- };
7237
- };
7238
- const trackLupaEvent = (queryKey, data = {}, options) => {
7239
- var _a, _b;
7240
- if (!queryKey || !data.type) {
7241
- return;
7242
- }
7243
- const eventData = {
7244
- searchQuery: (_a = data.searchQuery) != null ? _a : "",
7245
- itemId: (_b = data.itemId) != null ? _b : "",
7246
- name: data.type,
7247
- userId: getUserKey(),
7248
- sessionId: getSessionKey(),
7249
- filters: data.filters
7250
- };
7251
- LupaSearchSdk.track(queryKey, eventData, options);
7252
- };
7253
- const sendGa = (name, ...args) => {
7254
- window.ga(() => {
7255
- const trackers = window.ga.getAll();
7256
- const firstTracker = trackers[0];
7257
- if (!firstTracker) {
7258
- console.error("GA tracker not found");
7259
- }
7260
- const trackerName = firstTracker.get("name");
7261
- window.ga(`${trackerName}.${name}`, ...args);
7262
- });
7263
- };
7264
- const trackAnalyticsEvent = (data) => {
7265
- var _a, _b, _c;
7266
- try {
7267
- const options = JSON.parse(
7268
- (_a = window.sessionStorage.getItem(TRACKING_ANALYTICS_KEY)) != null ? _a : "{}"
7269
- );
7270
- if (!data.analytics || !options.enabled || ((_c = options.ignoreEvents) == null ? void 0 : _c.includes((_b = data.analytics) == null ? void 0 : _b.type))) {
7271
- return;
7272
- }
7273
- switch (options.type) {
7274
- case "ua":
7275
- sendUaAnalyticsEvent(data, options);
7276
- break;
7277
- case "ga4":
7278
- sendGa4AnalyticsEvent(data, options);
7279
- break;
7280
- case "debug":
7281
- processDebugEvent(data);
7282
- break;
7283
- default:
7284
- sendUaAnalyticsEvent(data, options);
7285
- }
7286
- } catch (e2) {
7287
- console.error("Unable to send an event to google analytics");
7288
- }
7289
- };
7290
- const parseEcommerceData = (data, title) => {
7291
- var _a, _b;
7292
- return ((_a = data.analytics) == null ? void 0 : _a.items) ? {
7293
- item_list_name: title,
7294
- items: (_b = data.analytics) == null ? void 0 : _b.items
7295
- } : void 0;
7296
- };
7297
- const sendUaAnalyticsEvent = (data, options) => {
7298
- var _a, _b, _c, _d;
7299
- const ga = window.ga;
7300
- if (!ga) {
7301
- console.error("Google Analytics object not found");
7302
- return;
7303
- }
7304
- sendGa(
7305
- "send",
7306
- "event",
7307
- options.parentEventName,
7308
- (_b = (_a = data.analytics) == null ? void 0 : _a.type) != null ? _b : "",
7309
- (_d = (_c = data.analytics) == null ? void 0 : _c.label) != null ? _d : ""
7310
- );
7311
- };
7312
- const sendGa4AnalyticsEvent = (data, options) => {
7313
- var _a, _b, _c, _d, _e, _f, _g;
7314
- if (!window || !window.dataLayer) {
7315
- console.error("dataLayer object not found.");
7316
- return;
7317
- }
7318
- const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7319
- const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7320
- const params = __spreadValues2({
7321
- search_text: data.searchQuery,
7322
- item_title: title,
7323
- item_id: data.itemId,
7324
- ecommerce: parseEcommerceData(data, (_c = data.analytics) == null ? void 0 : _c.listLabel)
7325
- }, (_e = (_d = data.analytics) == null ? void 0 : _d.additionalParams) != null ? _e : {});
7326
- window.dataLayer.push(__spreadValues2({
7327
- event: (_g = (_f = data.analytics) == null ? void 0 : _f.type) != null ? _g : options.parentEventName
7328
- }, params));
7329
- };
7330
- const processDebugEvent = (data) => {
7331
- var _a, _b, _c, _d;
7332
- const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7333
- const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7334
- const params = {
7335
- event: (_c = data.analytics) == null ? void 0 : _c.type,
7336
- search_text: data.searchQuery,
7337
- item_title: title,
7338
- item_id: data.itemId,
7339
- ecommerce: parseEcommerceData(data, (_d = data.analytics) == null ? void 0 : _d.listLabel)
7340
- };
7341
- console.debug("Analytics debug event:", params);
7342
- };
7343
- const track = (queryKey, data = {}, options) => {
7344
- var _a;
7345
- if (!isTrackingEnabled()) {
7346
- return;
7347
- }
7348
- const hasSearchQuery = data.searchQuery;
7349
- if (!hasSearchQuery && !((_a = data.options) == null ? void 0 : _a.allowEmptySearchQuery)) {
7350
- return;
7351
- }
7352
- trackAnalyticsEvent(data);
7353
- trackLupaEvent(queryKey, data, options);
7354
- };
7355
7146
  const DEFAULT_SEARCH_BOX_OPTIONS$1 = {
7356
7147
  inputSelector: "#searchBox",
7357
7148
  options: {
@@ -7633,6 +7424,266 @@ var __async = (__this, __arguments, generator) => {
7633
7424
  getQueryParamName
7634
7425
  };
7635
7426
  });
7427
+ const initAnalyticsTracking = (analyticsOptions) => {
7428
+ try {
7429
+ if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
7430
+ window.sessionStorage.setItem(TRACKING_ANALYTICS_KEY, JSON.stringify(analyticsOptions));
7431
+ } else {
7432
+ window.sessionStorage.removeItem(TRACKING_ANALYTICS_KEY);
7433
+ }
7434
+ } catch (e2) {
7435
+ }
7436
+ };
7437
+ const initBaseTracking = (enabled) => {
7438
+ try {
7439
+ if (enabled) {
7440
+ window.sessionStorage.setItem(TRACKING_STORAGE_KEY_BASE, "1");
7441
+ } else {
7442
+ window.sessionStorage.removeItem(TRACKING_STORAGE_KEY_BASE);
7443
+ clearSessionTracking();
7444
+ clearUserTracking();
7445
+ }
7446
+ } catch (e2) {
7447
+ }
7448
+ };
7449
+ const clearSessionTracking = () => {
7450
+ try {
7451
+ window.sessionStorage.removeItem(TRACKING_STORAGE_KEY);
7452
+ } catch (e2) {
7453
+ }
7454
+ };
7455
+ const initSessionTracking = () => {
7456
+ try {
7457
+ if (getSessionKey()) {
7458
+ return;
7459
+ }
7460
+ const key = getRandomString(TRACKING_KEY_LENGTH);
7461
+ window.sessionStorage.setItem(TRACKING_STORAGE_KEY, key);
7462
+ } catch (e2) {
7463
+ }
7464
+ };
7465
+ const initUserTracking = (userKey) => {
7466
+ try {
7467
+ if (getUserKey()) {
7468
+ return;
7469
+ }
7470
+ const key = userKey || getRandomString(TRACKING_KEY_LENGTH);
7471
+ window.localStorage.setItem(TRACKING_STORAGE_KEY, key);
7472
+ } catch (e2) {
7473
+ }
7474
+ };
7475
+ const clearUserTracking = () => {
7476
+ try {
7477
+ window.localStorage.removeItem(TRACKING_STORAGE_KEY);
7478
+ } catch (e2) {
7479
+ }
7480
+ };
7481
+ const isTrackingEnabled = () => {
7482
+ try {
7483
+ return Boolean(window.sessionStorage.getItem(TRACKING_STORAGE_KEY_BASE));
7484
+ } catch (e2) {
7485
+ return false;
7486
+ }
7487
+ };
7488
+ const isDelayedClickTracking = () => {
7489
+ try {
7490
+ return Boolean(window.localStorage.getItem(TRACKING_CLICK_DELAYED));
7491
+ } catch (e2) {
7492
+ return false;
7493
+ }
7494
+ };
7495
+ const getSessionKey = () => {
7496
+ var _a;
7497
+ try {
7498
+ return (_a = window.sessionStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7499
+ } catch (e2) {
7500
+ return void 0;
7501
+ }
7502
+ };
7503
+ const getUserKey = () => {
7504
+ var _a;
7505
+ try {
7506
+ return (_a = window.localStorage.getItem(TRACKING_STORAGE_KEY)) != null ? _a : void 0;
7507
+ } catch (e2) {
7508
+ return void 0;
7509
+ }
7510
+ };
7511
+ const initTracking = (options) => {
7512
+ initBaseTracking(Boolean(options.trackBase));
7513
+ if (options.trackSession) {
7514
+ initSessionTracking();
7515
+ } else {
7516
+ clearSessionTracking();
7517
+ }
7518
+ if (options.trackUser) {
7519
+ initUserTracking(options.userKey);
7520
+ } else {
7521
+ clearUserTracking();
7522
+ }
7523
+ if (options.analytics) {
7524
+ initAnalyticsTracking(options.analytics);
7525
+ }
7526
+ if (options.delayedClickTracking) {
7527
+ window.localStorage.setItem(TRACKING_CLICK_DELAYED, "1");
7528
+ checkAndDispatchDelayedEvents();
7529
+ } else {
7530
+ window.localStorage.removeItem(TRACKING_CLICK_DELAYED);
7531
+ }
7532
+ };
7533
+ const getLupaTrackingContext = () => {
7534
+ if (!isTrackingEnabled()) {
7535
+ return {};
7536
+ }
7537
+ return {
7538
+ userId: getUserKey(),
7539
+ sessionId: getSessionKey()
7540
+ };
7541
+ };
7542
+ const trackLupaEvent = (queryKey, data = {}, options) => {
7543
+ var _a, _b;
7544
+ if (!queryKey || !data.type) {
7545
+ return;
7546
+ }
7547
+ const eventData = {
7548
+ searchQuery: (_a = data.searchQuery) != null ? _a : "",
7549
+ itemId: (_b = data.itemId) != null ? _b : "",
7550
+ name: data.type,
7551
+ userId: getUserKey(),
7552
+ sessionId: getSessionKey(),
7553
+ filters: data.filters
7554
+ };
7555
+ LupaSearchSdk.track(queryKey, eventData, options);
7556
+ };
7557
+ const sendGa = (name, ...args) => {
7558
+ window.ga(() => {
7559
+ const trackers = window.ga.getAll();
7560
+ const firstTracker = trackers[0];
7561
+ if (!firstTracker) {
7562
+ console.error("GA tracker not found");
7563
+ }
7564
+ const trackerName = firstTracker.get("name");
7565
+ window.ga(`${trackerName}.${name}`, ...args);
7566
+ });
7567
+ };
7568
+ const trackAnalyticsEvent = (data) => {
7569
+ var _a, _b, _c;
7570
+ try {
7571
+ const options = JSON.parse(
7572
+ (_a = window.sessionStorage.getItem(TRACKING_ANALYTICS_KEY)) != null ? _a : "{}"
7573
+ );
7574
+ if (!data.analytics || !options.enabled || ((_c = options.ignoreEvents) == null ? void 0 : _c.includes((_b = data.analytics) == null ? void 0 : _b.type))) {
7575
+ return;
7576
+ }
7577
+ switch (options.type) {
7578
+ case "ua":
7579
+ sendUaAnalyticsEvent(data, options);
7580
+ break;
7581
+ case "ga4":
7582
+ sendGa4AnalyticsEvent(data, options);
7583
+ break;
7584
+ case "debug":
7585
+ processDebugEvent(data);
7586
+ break;
7587
+ default:
7588
+ sendUaAnalyticsEvent(data, options);
7589
+ }
7590
+ } catch (e2) {
7591
+ console.error("Unable to send an event to google analytics");
7592
+ }
7593
+ };
7594
+ const parseEcommerceData = (data, title) => {
7595
+ var _a, _b;
7596
+ return ((_a = data.analytics) == null ? void 0 : _a.items) ? {
7597
+ item_list_name: title,
7598
+ items: (_b = data.analytics) == null ? void 0 : _b.items
7599
+ } : void 0;
7600
+ };
7601
+ const sendUaAnalyticsEvent = (data, options) => {
7602
+ var _a, _b, _c, _d;
7603
+ const ga = window.ga;
7604
+ if (!ga) {
7605
+ console.error("Google Analytics object not found");
7606
+ return;
7607
+ }
7608
+ sendGa(
7609
+ "send",
7610
+ "event",
7611
+ options.parentEventName,
7612
+ (_b = (_a = data.analytics) == null ? void 0 : _a.type) != null ? _b : "",
7613
+ (_d = (_c = data.analytics) == null ? void 0 : _c.label) != null ? _d : ""
7614
+ );
7615
+ };
7616
+ const sendGa4AnalyticsEvent = (data, options) => {
7617
+ var _a, _b, _c, _d, _e, _f, _g;
7618
+ if (!window || !window.dataLayer) {
7619
+ console.error("dataLayer object not found.");
7620
+ return;
7621
+ }
7622
+ const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7623
+ const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7624
+ const params = __spreadValues2({
7625
+ search_text: data.searchQuery,
7626
+ item_title: title,
7627
+ item_id: data.itemId,
7628
+ ecommerce: parseEcommerceData(data, (_c = data.analytics) == null ? void 0 : _c.listLabel)
7629
+ }, (_e = (_d = data.analytics) == null ? void 0 : _d.additionalParams) != null ? _e : {});
7630
+ window.dataLayer.push(__spreadValues2({
7631
+ event: (_g = (_f = data.analytics) == null ? void 0 : _f.type) != null ? _g : options.parentEventName
7632
+ }, params));
7633
+ };
7634
+ const processDebugEvent = (data) => {
7635
+ var _a, _b, _c, _d;
7636
+ const sendItemTitle = data.searchQuery !== ((_a = data.analytics) == null ? void 0 : _a.label);
7637
+ const title = sendItemTitle ? (_b = data.analytics) == null ? void 0 : _b.label : void 0;
7638
+ const params = {
7639
+ event: (_c = data.analytics) == null ? void 0 : _c.type,
7640
+ search_text: data.searchQuery,
7641
+ item_title: title,
7642
+ item_id: data.itemId,
7643
+ ecommerce: parseEcommerceData(data, (_d = data.analytics) == null ? void 0 : _d.listLabel)
7644
+ };
7645
+ console.debug("Analytics debug event:", params);
7646
+ };
7647
+ const getDelayedEventsCache = () => {
7648
+ var _a;
7649
+ try {
7650
+ return JSON.parse((_a = window.localStorage.getItem(DELAYED_TRACKING_EVENTS_CACHE)) != null ? _a : "{}");
7651
+ } catch (e2) {
7652
+ return {};
7653
+ }
7654
+ };
7655
+ const storeDelayedEventCache = (cache) => {
7656
+ try {
7657
+ window.localStorage.setItem(DELAYED_TRACKING_EVENTS_CACHE, JSON.stringify(cache));
7658
+ } catch (e2) {
7659
+ }
7660
+ };
7661
+ const checkAndDispatchDelayedEvents = () => {
7662
+ var _a, _b;
7663
+ const optionsStore = useOptionsStore();
7664
+ const eventCache = getDelayedEventsCache();
7665
+ const urls = Object.keys(eventCache);
7666
+ for (const url of urls) {
7667
+ if ((_a = window.location.href) == null ? void 0 : _a.includes(url)) {
7668
+ const options = (_b = optionsStore.envOptions) != null ? _b : { environment: "production" };
7669
+ const { queryKey, data } = eventCache[url];
7670
+ track(queryKey, data, options);
7671
+ }
7672
+ }
7673
+ storeDelayedEventCache({});
7674
+ };
7675
+ const track = (queryKey, data = {}, options) => {
7676
+ var _a;
7677
+ if (!isTrackingEnabled()) {
7678
+ return;
7679
+ }
7680
+ const hasSearchQuery = data.searchQuery;
7681
+ if (!hasSearchQuery && !((_a = data.options) == null ? void 0 : _a.allowEmptySearchQuery)) {
7682
+ return;
7683
+ }
7684
+ trackAnalyticsEvent(data);
7685
+ trackLupaEvent(queryKey, data, options);
7686
+ };
7636
7687
  var DocumentElementType = /* @__PURE__ */ ((DocumentElementType2) => {
7637
7688
  DocumentElementType2["IMAGE"] = "image";
7638
7689
  DocumentElementType2["TITLE"] = "title";
@@ -8616,7 +8667,7 @@ var __async = (__this, __arguments, generator) => {
8616
8667
  const _hoisted_1$1g = { id: "lupa-search-box-input-container" };
8617
8668
  const _hoisted_2$U = { class: "lupa-input-clear" };
8618
8669
  const _hoisted_3$D = { id: "lupa-search-box-input" };
8619
- const _hoisted_4$s = ["value"];
8670
+ const _hoisted_4$t = ["value"];
8620
8671
  const _hoisted_5$j = ["aria-label", "placeholder"];
8621
8672
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
8622
8673
  const _hoisted_7$7 = [
@@ -8723,7 +8774,7 @@ var __async = (__this, __arguments, generator) => {
8723
8774
  "aria-hidden": "true",
8724
8775
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
8725
8776
  disabled: ""
8726
- }, null, 8, _hoisted_4$s),
8777
+ }, null, 8, _hoisted_4$t),
8727
8778
  withDirectives(createBaseVNode("input", mergeProps({
8728
8779
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
8729
8780
  }, inputAttributes.value, {
@@ -8935,7 +8986,7 @@ var __async = (__this, __arguments, generator) => {
8935
8986
  class: "lupa-suggestion-facet",
8936
8987
  "data-cy": "lupa-suggestion-facet"
8937
8988
  };
8938
- const _hoisted_4$r = {
8989
+ const _hoisted_4$s = {
8939
8990
  class: "lupa-suggestion-facet-label",
8940
8991
  "data-cy": "lupa-suggestion-facet-label"
8941
8992
  };
@@ -8981,7 +9032,7 @@ var __async = (__this, __arguments, generator) => {
8981
9032
  innerHTML: _ctx.suggestion.displayHighlight
8982
9033
  }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(_ctx.suggestion.display), 1)),
8983
9034
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
8984
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
9035
+ createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
8985
9036
  createBaseVNode("span", _hoisted_5$i, toDisplayString(_ctx.suggestion.facet.title), 1)
8986
9037
  ])) : createCommentVNode("", true)
8987
9038
  ]);
@@ -18497,7 +18548,7 @@ and ensure you are accounting for this risk.
18497
18548
  const _hoisted_1$16 = ["innerHTML"];
18498
18549
  const _hoisted_2$O = { key: 0 };
18499
18550
  const _hoisted_3$B = { key: 1 };
18500
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
18551
+ const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
18501
18552
  const _hoisted_5$h = { class: "lupa-search-box-custom-text" };
18502
18553
  const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18503
18554
  __name: "SearchBoxProductCustom",
@@ -18530,7 +18581,7 @@ and ensure you are accounting for this risk.
18530
18581
  class: [className.value, "lupa-search-box-product-custom"]
18531
18582
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
18532
18583
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
18533
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
18584
+ createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
18534
18585
  createBaseVNode("div", _hoisted_5$h, toDisplayString(text.value), 1)
18535
18586
  ]))
18536
18587
  ], 16));
@@ -18943,7 +18994,7 @@ and ensure you are accounting for this risk.
18943
18994
  const _hoisted_1$12 = { class: "lupa-badge-title" };
18944
18995
  const _hoisted_2$M = ["src"];
18945
18996
  const _hoisted_3$z = { key: 1 };
18946
- const _hoisted_4$p = {
18997
+ const _hoisted_4$q = {
18947
18998
  key: 0,
18948
18999
  class: "lupa-badge-full-text"
18949
19000
  };
@@ -18987,7 +19038,7 @@ and ensure you are accounting for this risk.
18987
19038
  }, null, 8, _hoisted_2$M)) : createCommentVNode("", true),
18988
19039
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
18989
19040
  ]),
18990
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
19041
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18991
19042
  ], 6);
18992
19043
  };
18993
19044
  }
@@ -19465,7 +19516,18 @@ and ensure you are accounting for this risk.
19465
19516
  options
19466
19517
  );
19467
19518
  };
19468
- return { trackSearch, trackResults, trackEvent };
19519
+ const trackDelayedEvent = ({
19520
+ queryKey,
19521
+ data,
19522
+ url
19523
+ }) => {
19524
+ let currentCache = getDelayedEventsCache();
19525
+ currentCache = __spreadProps2(__spreadValues2({}, currentCache), {
19526
+ [url]: { data, queryKey }
19527
+ });
19528
+ storeDelayedEventCache(currentCache);
19529
+ };
19530
+ return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
19469
19531
  });
19470
19532
  const _hoisted_1$X = { id: "lupa-search-box-products" };
19471
19533
  const _sfc_main$12 = /* @__PURE__ */ defineComponent({
@@ -19509,7 +19571,7 @@ and ensure you are accounting for this risk.
19509
19571
  if (!props.panelOptions.idKey) {
19510
19572
  return;
19511
19573
  }
19512
- trackingStore.trackEvent({
19574
+ const trackableEvent = {
19513
19575
  queryKey: props.panelOptions.queryKey,
19514
19576
  data: {
19515
19577
  itemId: id,
@@ -19521,7 +19583,14 @@ and ensure you are accounting for this risk.
19521
19583
  items: [item]
19522
19584
  }
19523
19585
  }
19524
- });
19586
+ };
19587
+ if (isDelayedClickTracking()) {
19588
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, trackableEvent), {
19589
+ url: link
19590
+ }));
19591
+ } else {
19592
+ trackingStore.trackEvent(trackableEvent);
19593
+ }
19525
19594
  if (!link || eventType === "addToCart") {
19526
19595
  return;
19527
19596
  }
@@ -19787,7 +19856,7 @@ and ensure you are accounting for this risk.
19787
19856
  key: 0,
19788
19857
  class: "lupa-panel-title lupa-panel-title-top-results"
19789
19858
  };
19790
- const _hoisted_4$o = {
19859
+ const _hoisted_4$p = {
19791
19860
  key: 1,
19792
19861
  class: "lupa-panel-title"
19793
19862
  };
@@ -19981,7 +20050,7 @@ and ensure you are accounting for this risk.
19981
20050
  "data-cy": "lupa-panel-" + panel.type + "-index"
19982
20051
  }, [
19983
20052
  ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
19984
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
20053
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
19985
20054
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
19986
20055
  key: 2,
19987
20056
  panel,
@@ -20247,7 +20316,7 @@ and ensure you are accounting for this risk.
20247
20316
  if (!doc2.queryKey || !doc2.doc) {
20248
20317
  return;
20249
20318
  }
20250
- trackingStore.trackEvent({
20319
+ const event = {
20251
20320
  queryKey: doc2.queryKey,
20252
20321
  data: {
20253
20322
  itemId: doc2.id,
@@ -20259,7 +20328,14 @@ and ensure you are accounting for this risk.
20259
20328
  items: [doc2]
20260
20329
  }
20261
20330
  }
20262
- });
20331
+ };
20332
+ if (isDelayedClickTracking()) {
20333
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, event), {
20334
+ url: generateLink(props.options.links.searchResults, doc2)
20335
+ }));
20336
+ } else {
20337
+ trackingStore.trackEvent(event);
20338
+ }
20263
20339
  };
20264
20340
  const trackSearchQuery = (query) => {
20265
20341
  if (!query) {
@@ -20420,7 +20496,7 @@ and ensure you are accounting for this risk.
20420
20496
  key: 1,
20421
20497
  "data-cy": "did-you-mean-label"
20422
20498
  };
20423
- const _hoisted_4$n = { key: 1 };
20499
+ const _hoisted_4$o = { key: 1 };
20424
20500
  const _sfc_main$Y = /* @__PURE__ */ defineComponent({
20425
20501
  __name: "SearchResultsDidYouMean",
20426
20502
  props: {
@@ -20471,7 +20547,7 @@ and ensure you are accounting for this risk.
20471
20547
  class: "lupa-did-you-mean lupa-highlighted-search-text",
20472
20548
  "data-cy": "did-you-mean-value",
20473
20549
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
20474
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
20550
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
20475
20551
  ]);
20476
20552
  }), 128))
20477
20553
  ])) : createCommentVNode("", true)
@@ -20521,7 +20597,7 @@ and ensure you are accounting for this risk.
20521
20597
  key: 1,
20522
20598
  class: "lupa-results-total-count"
20523
20599
  };
20524
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
20600
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
20525
20601
  const _hoisted_5$f = ["innerHTML"];
20526
20602
  const _sfc_main$W = /* @__PURE__ */ defineComponent({
20527
20603
  __name: "SearchResultsTitle",
@@ -20567,7 +20643,7 @@ and ensure you are accounting for this risk.
20567
20643
  queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20568
20644
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
20569
20645
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
20570
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
20646
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
20571
20647
  createTextVNode(")")
20572
20648
  ])) : createCommentVNode("", true)
20573
20649
  ])) : createCommentVNode("", true),
@@ -20625,7 +20701,7 @@ and ensure you are accounting for this risk.
20625
20701
  key: 0,
20626
20702
  class: "filter-values"
20627
20703
  };
20628
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
20704
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
20629
20705
  const _sfc_main$U = /* @__PURE__ */ defineComponent({
20630
20706
  __name: "CurrentFilters",
20631
20707
  props: {
@@ -20709,7 +20785,7 @@ and ensure you are accounting for this risk.
20709
20785
  }, null, 2)) : createCommentVNode("", true)
20710
20786
  ]),
20711
20787
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
20712
- createBaseVNode("div", _hoisted_4$l, [
20788
+ createBaseVNode("div", _hoisted_4$m, [
20713
20789
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
20714
20790
  return openBlock(), createBlock(_sfc_main$V, {
20715
20791
  key: filter2.key + "_" + filter2.value,
@@ -20777,7 +20853,7 @@ and ensure you are accounting for this risk.
20777
20853
  };
20778
20854
  const _hoisted_2$B = { class: "lupa-category-back" };
20779
20855
  const _hoisted_3$s = ["href"];
20780
- const _hoisted_4$k = ["href"];
20856
+ const _hoisted_4$l = ["href"];
20781
20857
  const _hoisted_5$e = { class: "lupa-child-category-list" };
20782
20858
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
20783
20859
  __name: "CategoryFilter",
@@ -20884,7 +20960,7 @@ and ensure you are accounting for this risk.
20884
20960
  href: parentUrlLink.value,
20885
20961
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
20886
20962
  onClick: handleNavigationParent
20887
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
20963
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
20888
20964
  ], 2),
20889
20965
  createBaseVNode("div", _hoisted_5$e, [
20890
20966
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
@@ -20905,7 +20981,7 @@ and ensure you are accounting for this risk.
20905
20981
  };
20906
20982
  const _hoisted_2$A = ["placeholder"];
20907
20983
  const _hoisted_3$r = { class: "lupa-terms-list" };
20908
- const _hoisted_4$j = ["onClick"];
20984
+ const _hoisted_4$k = ["onClick"];
20909
20985
  const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
20910
20986
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
20911
20987
  const _hoisted_7$6 = { class: "lupa-term-label" };
@@ -21013,7 +21089,7 @@ and ensure you are accounting for this risk.
21013
21089
  createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
21014
21090
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
21015
21091
  ])
21016
- ], 10, _hoisted_4$j);
21092
+ ], 10, _hoisted_4$k);
21017
21093
  }), 128))
21018
21094
  ]),
21019
21095
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -22013,7 +22089,7 @@ and ensure you are accounting for this risk.
22013
22089
  key: 1,
22014
22090
  class: "lupa-stats-facet-summary-input"
22015
22091
  };
22016
- const _hoisted_4$i = {
22092
+ const _hoisted_4$j = {
22017
22093
  key: 0,
22018
22094
  class: "lupa-stats-range-label"
22019
22095
  };
@@ -22212,7 +22288,7 @@ and ensure you are accounting for this risk.
22212
22288
  return openBlock(), createElementBlock("div", _hoisted_1$L, [
22213
22289
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
22214
22290
  createBaseVNode("div", null, [
22215
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22291
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22216
22292
  createBaseVNode("div", _hoisted_5$c, [
22217
22293
  withDirectives(createBaseVNode("input", {
22218
22294
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
@@ -22279,7 +22355,7 @@ and ensure you are accounting for this risk.
22279
22355
  const _hoisted_1$K = { class: "lupa-term-checkbox-wrapper" };
22280
22356
  const _hoisted_2$y = { class: "lupa-term-checkbox-label" };
22281
22357
  const _hoisted_3$p = { class: "lupa-term-label" };
22282
- const _hoisted_4$h = {
22358
+ const _hoisted_4$i = {
22283
22359
  key: 0,
22284
22360
  class: "lupa-term-count"
22285
22361
  };
@@ -22340,7 +22416,7 @@ and ensure you are accounting for this risk.
22340
22416
  ]),
22341
22417
  createBaseVNode("div", _hoisted_2$y, [
22342
22418
  createBaseVNode("span", _hoisted_3$p, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22343
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22419
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$i, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22344
22420
  ])
22345
22421
  ]),
22346
22422
  showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$b, [
@@ -22861,7 +22937,7 @@ and ensure you are accounting for this risk.
22861
22937
  };
22862
22938
  const _hoisted_2$t = ["onClick"];
22863
22939
  const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
22864
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
22940
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
22865
22941
  const _hoisted_5$a = { class: "lupa-sidebar-title" };
22866
22942
  const _hoisted_6$6 = {
22867
22943
  key: 0,
@@ -22905,7 +22981,7 @@ and ensure you are accounting for this risk.
22905
22981
  onClick: withModifiers(handleMobileToggle, ["stop"])
22906
22982
  }, null, 8, _hoisted_2$t),
22907
22983
  createBaseVNode("div", _hoisted_3$n, [
22908
- createBaseVNode("div", _hoisted_4$g, [
22984
+ createBaseVNode("div", _hoisted_4$h, [
22909
22985
  createBaseVNode("div", _hoisted_5$a, [
22910
22986
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
22911
22987
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
@@ -22933,7 +23009,7 @@ and ensure you are accounting for this risk.
22933
23009
  key: 1,
22934
23010
  class: "lupa-search-results-breadcrumb-text"
22935
23011
  };
22936
- const _hoisted_4$f = { key: 2 };
23012
+ const _hoisted_4$g = { key: 2 };
22937
23013
  const _sfc_main$H = /* @__PURE__ */ defineComponent({
22938
23014
  __name: "SearchResultsBreadcrumbs",
22939
23015
  props: {
@@ -22974,7 +23050,7 @@ and ensure you are accounting for this risk.
22974
23050
  return handleNavigation(e2, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
22975
23051
  }
22976
23052
  }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
22977
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
23053
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, " / ")) : createCommentVNode("", true)
22978
23054
  ]);
22979
23055
  }), 128))
22980
23056
  ]);
@@ -23080,7 +23156,7 @@ and ensure you are accounting for this risk.
23080
23156
  class: "lupa-page-number-separator"
23081
23157
  };
23082
23158
  const _hoisted_3$l = ["onClick"];
23083
- const _hoisted_4$e = {
23159
+ const _hoisted_4$f = {
23084
23160
  key: 0,
23085
23161
  class: "lupa-page-number-separator"
23086
23162
  };
@@ -23186,7 +23262,7 @@ and ensure you are accounting for this risk.
23186
23262
  }, toDisplayString(page), 11, _hoisted_3$l);
23187
23263
  }), 128)),
23188
23264
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
23189
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
23265
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
23190
23266
  createBaseVNode("div", {
23191
23267
  class: "lupa-page-number lupa-page-number-last",
23192
23268
  onClick: _cache[2] || (_cache[2] = () => {
@@ -23211,7 +23287,7 @@ and ensure you are accounting for this risk.
23211
23287
  };
23212
23288
  const _hoisted_2$q = { id: "lupa-select" };
23213
23289
  const _hoisted_3$k = { class: "lupa-select-label" };
23214
- const _hoisted_4$d = ["aria-label"];
23290
+ const _hoisted_4$e = ["aria-label"];
23215
23291
  const _hoisted_5$9 = ["value"];
23216
23292
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
23217
23293
  __name: "SearchResultsPageSize",
@@ -23258,7 +23334,7 @@ and ensure you are accounting for this risk.
23258
23334
  value: option
23259
23335
  }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
23260
23336
  }), 128))
23261
- ], 40, _hoisted_4$d)
23337
+ ], 40, _hoisted_4$e)
23262
23338
  ])
23263
23339
  ]);
23264
23340
  };
@@ -23270,7 +23346,7 @@ and ensure you are accounting for this risk.
23270
23346
  };
23271
23347
  const _hoisted_2$p = { id: "lupa-select" };
23272
23348
  const _hoisted_3$j = { class: "lupa-select-label" };
23273
- const _hoisted_4$c = ["aria-label"];
23349
+ const _hoisted_4$d = ["aria-label"];
23274
23350
  const _hoisted_5$8 = ["value"];
23275
23351
  const _sfc_main$B = /* @__PURE__ */ defineComponent({
23276
23352
  __name: "SearchResultsSort",
@@ -23338,7 +23414,7 @@ and ensure you are accounting for this risk.
23338
23414
  value: option.key
23339
23415
  }, toDisplayString(option.label), 9, _hoisted_5$8);
23340
23416
  }), 128))
23341
- ], 40, _hoisted_4$c), [
23417
+ ], 40, _hoisted_4$d), [
23342
23418
  [vModelSelect, selectedKey.value]
23343
23419
  ])
23344
23420
  ])
@@ -23352,7 +23428,7 @@ and ensure you are accounting for this risk.
23352
23428
  class: "lupa-toolbar-right-title"
23353
23429
  };
23354
23430
  const _hoisted_3$i = { key: 2 };
23355
- const _hoisted_4$b = { key: 4 };
23431
+ const _hoisted_4$c = { key: 4 };
23356
23432
  const _hoisted_5$7 = { key: 6 };
23357
23433
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
23358
23434
  const _hoisted_7$3 = {
@@ -23476,7 +23552,7 @@ and ensure you are accounting for this risk.
23476
23552
  label: searchSummaryLabel.value,
23477
23553
  clearable: unref(hasAnyFilter) && showFilterClear.value,
23478
23554
  onClear: handleClearAll
23479
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
23555
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
23480
23556
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$D, {
23481
23557
  key: 5,
23482
23558
  options: paginationOptions.value.pageSelect,
@@ -23525,7 +23601,7 @@ and ensure you are accounting for this risk.
23525
23601
  const _hoisted_1$u = ["title", "innerHTML"];
23526
23602
  const _hoisted_2$n = ["title"];
23527
23603
  const _hoisted_3$h = ["href", "innerHTML"];
23528
- const _hoisted_4$a = ["title"];
23604
+ const _hoisted_4$b = ["title"];
23529
23605
  const _hoisted_5$6 = {
23530
23606
  key: 0,
23531
23607
  class: "lupa-search-results-product-title-text"
@@ -23593,7 +23669,7 @@ and ensure you are accounting for this risk.
23593
23669
  class: "lupa-search-results-product-title-text lupa-title-link",
23594
23670
  onClick: handleNavigation
23595
23671
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
23596
- ], 12, _hoisted_4$a));
23672
+ ], 12, _hoisted_4$b));
23597
23673
  };
23598
23674
  }
23599
23675
  });
@@ -23636,7 +23712,7 @@ and ensure you are accounting for this risk.
23636
23712
  const _hoisted_1$s = { id: "lupa-search-results-rating" };
23637
23713
  const _hoisted_2$m = { class: "lupa-ratings" };
23638
23714
  const _hoisted_3$g = { class: "lupa-ratings-base" };
23639
- const _hoisted_4$9 = ["innerHTML"];
23715
+ const _hoisted_4$a = ["innerHTML"];
23640
23716
  const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
23641
23717
  const _hoisted_6$3 = ["innerHTML"];
23642
23718
  const _hoisted_7$2 = ["href"];
@@ -23686,7 +23762,7 @@ and ensure you are accounting for this risk.
23686
23762
  key: index,
23687
23763
  innerHTML: star,
23688
23764
  class: "lupa-rating lupa-rating-not-highlighted"
23689
- }, null, 8, _hoisted_4$9);
23765
+ }, null, 8, _hoisted_4$a);
23690
23766
  }), 128))
23691
23767
  ]),
23692
23768
  createBaseVNode("div", _hoisted_5$5, [
@@ -23826,7 +23902,7 @@ and ensure you are accounting for this risk.
23826
23902
  const _hoisted_1$p = ["innerHTML"];
23827
23903
  const _hoisted_2$k = { key: 0 };
23828
23904
  const _hoisted_3$e = { key: 1 };
23829
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
23905
+ const _hoisted_4$9 = { class: "lupa-search-box-custom-label" };
23830
23906
  const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
23831
23907
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
23832
23908
  __name: "SearchResultsProductCustom",
@@ -23871,7 +23947,7 @@ and ensure you are accounting for this risk.
23871
23947
  class: className.value
23872
23948
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
23873
23949
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$k, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$e, [
23874
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
23950
+ createBaseVNode("div", _hoisted_4$9, toDisplayString(label.value), 1),
23875
23951
  createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
23876
23952
  ]))
23877
23953
  ], 16));
@@ -23917,7 +23993,7 @@ and ensure you are accounting for this risk.
23917
23993
  const _hoisted_1$n = { id: "lupa-search-results-rating" };
23918
23994
  const _hoisted_2$j = ["innerHTML"];
23919
23995
  const _hoisted_3$d = { class: "lupa-ratings" };
23920
- const _hoisted_4$7 = ["href"];
23996
+ const _hoisted_4$8 = ["href"];
23921
23997
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
23922
23998
  __name: "SearchResultsProductSingleStarRating",
23923
23999
  props: {
@@ -23955,7 +24031,7 @@ and ensure you are accounting for this risk.
23955
24031
  createBaseVNode("a", {
23956
24032
  href: ratingLink.value,
23957
24033
  class: "lupa-total-ratings"
23958
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
24034
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$8)
23959
24035
  ]);
23960
24036
  };
23961
24037
  }
@@ -24050,12 +24126,13 @@ and ensure you are accounting for this risk.
24050
24126
  };
24051
24127
  }
24052
24128
  }));
24053
- const _hoisted_1$m = ["href"];
24054
- const _hoisted_2$i = {
24129
+ const _hoisted_1$m = ["onMouseup"];
24130
+ const _hoisted_2$i = ["href"];
24131
+ const _hoisted_3$c = {
24055
24132
  key: 0,
24056
24133
  class: "lupa-out-of-stock"
24057
24134
  };
24058
- const _hoisted_3$c = { class: "lupa-search-result-product-details-section" };
24135
+ const _hoisted_4$7 = { class: "lupa-search-result-product-details-section" };
24059
24136
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
24060
24137
  __name: "SearchResultsProductCard",
24061
24138
  props: {
@@ -24159,7 +24236,7 @@ and ensure you are accounting for this risk.
24159
24236
  });
24160
24237
  const handleClick = () => {
24161
24238
  var _a, _b, _c, _d;
24162
- trackingStore.trackEvent({
24239
+ const event = {
24163
24240
  queryKey: props.options.queryKey,
24164
24241
  data: {
24165
24242
  itemId: id.value,
@@ -24172,9 +24249,15 @@ and ensure you are accounting for this risk.
24172
24249
  items: [props.product],
24173
24250
  itemId: id.value
24174
24251
  },
24175
- options: { allowEmptySearchQuery: true }
24252
+ options: { allowEmptySearchQuery: true },
24253
+ filters: searchResultStore.hasAnyFilter ? searchResultStore.filters : void 0
24176
24254
  }
24177
- });
24255
+ };
24256
+ if (isDelayedClickTracking()) {
24257
+ trackingStore.trackDelayedEvent(__spreadProps2(__spreadValues2({}, event), { url: link.value }));
24258
+ } else {
24259
+ trackingStore.trackEvent(event);
24260
+ }
24178
24261
  (_d = (_c = searchResultOptions.value.callbacks) == null ? void 0 : _c.onProductClick) == null ? void 0 : _d.call(_c, {
24179
24262
  queryKey: query.value,
24180
24263
  hasResults: true,
@@ -24207,7 +24290,10 @@ and ensure you are accounting for this risk.
24207
24290
  id: "lupa-search-result-product-card",
24208
24291
  "data-cy": "lupa-search-result-product-card",
24209
24292
  class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
24210
- }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
24293
+ }, customDocumentHtmlAttributes.value, {
24294
+ onClick: handleClick,
24295
+ onMouseup: withModifiers(handleClick, ["middle", "exact"])
24296
+ }), [
24211
24297
  createVNode(_sfc_main$14, { options: badgesOptions.value }, null, 8, ["options"]),
24212
24298
  createBaseVNode("div", {
24213
24299
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
@@ -24234,9 +24320,9 @@ and ensure you are accounting for this risk.
24234
24320
  position: "image",
24235
24321
  class: "lupa-image-badges"
24236
24322
  }, null, 8, ["options"]),
24237
- ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24238
- ], 8, _hoisted_1$m),
24239
- createBaseVNode("div", _hoisted_3$c, [
24323
+ ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_3$c, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24324
+ ], 8, _hoisted_2$i),
24325
+ createBaseVNode("div", _hoisted_4$7, [
24240
24326
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
24241
24327
  return openBlock(), createBlock(_sfc_main$p, {
24242
24328
  class: "lupa-search-results-product-element",
@@ -24270,7 +24356,7 @@ and ensure you are accounting for this risk.
24270
24356
  ], 2);
24271
24357
  }), 128))
24272
24358
  ], 2)
24273
- ], 16);
24359
+ ], 16, _hoisted_1$m);
24274
24360
  };
24275
24361
  }
24276
24362
  });
@@ -24408,6 +24494,7 @@ and ensure you are accounting for this risk.
24408
24494
  });
24409
24495
  };
24410
24496
  const handleQueryChange = () => {
24497
+ showAll.value = false;
24411
24498
  const context = getLupaTrackingContext();
24412
24499
  const queryBody = __spreadProps2(__spreadValues2({}, context), {
24413
24500
  limit: props.panel.totalCountLimit,