@getlupa/client 1.8.6 → 1.8.8

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.
@@ -6401,6 +6401,37 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6401
6401
  const normalizedInput = getNormalizedString(input);
6402
6402
  return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
6403
6403
  };
6404
+ const levenshteinDistance = (s = "", t = "") => {
6405
+ if (!(s == null ? void 0 : s.length)) {
6406
+ return t.length;
6407
+ }
6408
+ if (!(t == null ? void 0 : t.length)) {
6409
+ return s.length;
6410
+ }
6411
+ const arr = [];
6412
+ for (let i = 0; i <= t.length; i++) {
6413
+ arr[i] = [i];
6414
+ for (let j = 1; j <= s.length; j++) {
6415
+ arr[i][j] = i === 0 ? j : Math.min(
6416
+ arr[i - 1][j] + 1,
6417
+ arr[i][j - 1] + 1,
6418
+ arr[i - 1][j - 1] + (s[j - 1] === t[i - 1] ? 0 : 1)
6419
+ );
6420
+ }
6421
+ }
6422
+ return arr[t.length][s.length];
6423
+ };
6424
+ const findClosestStringValue = (input, possibleValues, key) => {
6425
+ var _a;
6426
+ const directMatch = possibleValues.find((v) => v[key] === input);
6427
+ if (directMatch) {
6428
+ return directMatch;
6429
+ }
6430
+ const distances = possibleValues.map((v) => levenshteinDistance(`${v[key]}`, input));
6431
+ const minDistance = Math.min(...distances);
6432
+ const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
6433
+ return closestValue;
6434
+ };
6404
6435
  const initAnalyticsTracking = (analyticsOptions) => {
6405
6436
  try {
6406
6437
  if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
@@ -7810,7 +7841,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7810
7841
  });
7811
7842
  const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
7812
7843
  const _hoisted_2$P = { class: "lupa-input-clear" };
7813
- const _hoisted_3$B = { id: "lupa-search-box-input" };
7844
+ const _hoisted_3$A = { id: "lupa-search-box-input" };
7814
7845
  const _hoisted_4$s = ["value"];
7815
7846
  const _hoisted_5$g = ["aria-label", "placeholder"];
7816
7847
  const _hoisted_6$9 = {
@@ -7905,7 +7936,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7905
7936
  onClick: clear2
7906
7937
  }, null, 2)
7907
7938
  ]),
7908
- createBaseVNode("div", _hoisted_3$B, [
7939
+ createBaseVNode("div", _hoisted_3$A, [
7909
7940
  createBaseVNode("input", {
7910
7941
  class: "lupa-hint",
7911
7942
  "aria-hidden": "true",
@@ -8086,7 +8117,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8086
8117
  "data-cy": "lupa-suggestion-value",
8087
8118
  class: "lupa-suggestion-value"
8088
8119
  };
8089
- const _hoisted_3$A = {
8120
+ const _hoisted_3$z = {
8090
8121
  key: 2,
8091
8122
  class: "lupa-suggestion-facet",
8092
8123
  "data-cy": "lupa-suggestion-facet"
@@ -8136,7 +8167,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8136
8167
  "data-cy": "lupa-suggestion-value",
8137
8168
  innerHTML: _ctx.suggestion.displayHighlight
8138
8169
  }, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
8139
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
8170
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
8140
8171
  createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
8141
8172
  createBaseVNode("span", _hoisted_5$f, toDisplayString(_ctx.suggestion.facet.title), 1)
8142
8173
  ])) : createCommentVNode("", true)
@@ -8550,7 +8581,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8550
8581
  });
8551
8582
  const _hoisted_1$11 = ["innerHTML"];
8552
8583
  const _hoisted_2$K = { key: 0 };
8553
- const _hoisted_3$z = { key: 1 };
8584
+ const _hoisted_3$y = { key: 1 };
8554
8585
  const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
8555
8586
  const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
8556
8587
  const _sfc_main$16 = /* @__PURE__ */ defineComponent({
@@ -8583,7 +8614,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8583
8614
  key: 1,
8584
8615
  class: [className.value, "lupa-search-box-product-custom"]
8585
8616
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
8586
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
8617
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
8587
8618
  createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
8588
8619
  createBaseVNode("div", _hoisted_5$e, toDisplayString(text.value), 1)
8589
8620
  ]))
@@ -8808,7 +8839,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8808
8839
  });
8809
8840
  const _hoisted_1$$ = { class: "lupa-search-box-add-to-cart-wrapper" };
8810
8841
  const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
8811
- const _hoisted_3$y = ["onClick", "disabled"];
8842
+ const _hoisted_3$x = ["onClick", "disabled"];
8812
8843
  const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8813
8844
  __name: "SearchBoxProductAddToCart",
8814
8845
  props: {
@@ -8844,7 +8875,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8844
8875
  "data-cy": "lupa-add-to-cart",
8845
8876
  type: "button",
8846
8877
  disabled: !inStockValue.value || loading.value
8847
- }, toDisplayString(label.value), 11, _hoisted_3$y)
8878
+ }, toDisplayString(label.value), 11, _hoisted_3$x)
8848
8879
  ])
8849
8880
  ]);
8850
8881
  };
@@ -8923,7 +8954,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8923
8954
  }));
8924
8955
  const _hoisted_1$_ = ["href"];
8925
8956
  const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
8926
- const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
8957
+ const _hoisted_3$w = { class: "lupa-search-box-product-details-section" };
8927
8958
  const _hoisted_4$p = {
8928
8959
  key: 0,
8929
8960
  class: "lupa-search-box-product-add-to-cart-section"
@@ -8996,7 +9027,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8996
9027
  }, null, 8, ["item", "element", "labels", "link"]);
8997
9028
  }), 128))
8998
9029
  ]),
8999
- createBaseVNode("div", _hoisted_3$x, [
9030
+ createBaseVNode("div", _hoisted_3$w, [
9000
9031
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
9001
9032
  return openBlock(), createBlock(_sfc_main$13, {
9002
9033
  class: "lupa-search-box-product-element",
@@ -9240,7 +9271,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9240
9271
  id: "lupa-search-box-panel"
9241
9272
  };
9242
9273
  const _hoisted_2$H = ["data-cy"];
9243
- const _hoisted_3$w = {
9274
+ const _hoisted_3$v = {
9244
9275
  key: 0,
9245
9276
  class: "lupa-panel-title"
9246
9277
  };
@@ -9392,7 +9423,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9392
9423
  ]),
9393
9424
  "data-cy": "lupa-panel-" + panel.type + "-index"
9394
9425
  }, [
9395
- ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$w, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
9426
+ ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
9396
9427
  panel.queryKey ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
9397
9428
  key: 1,
9398
9429
  panel,
@@ -9535,13 +9566,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9535
9566
  suggestedValue.value = defaultSuggestedValue;
9536
9567
  };
9537
9568
  const handleKeyDown = (e) => {
9569
+ var _a2, _b;
9538
9570
  if (!opened.value) {
9539
9571
  return;
9540
9572
  }
9541
9573
  switch (e.key) {
9542
9574
  case "Tab":
9543
- e.preventDefault();
9544
- selectSuggestion(__spreadProps2(__spreadValues2({}, suggestedValue.value), { override: true }));
9575
+ if ((_b = (_a2 = suggestedValue == null ? void 0 : suggestedValue.value) == null ? void 0 : _a2.item) == null ? void 0 : _b.suggestion) {
9576
+ e.preventDefault();
9577
+ selectSuggestion(__spreadProps2(__spreadValues2({}, suggestedValue.value), { override: true }));
9578
+ }
9545
9579
  break;
9546
9580
  case "Enter":
9547
9581
  e.preventDefault();
@@ -9799,7 +9833,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9799
9833
  key: 0,
9800
9834
  "data-cy": "suggested-search-text-label"
9801
9835
  };
9802
- const _hoisted_3$v = {
9836
+ const _hoisted_3$u = {
9803
9837
  key: 1,
9804
9838
  "data-cy": "did-you-mean-label"
9805
9839
  };
@@ -9846,7 +9880,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9846
9880
  ]);
9847
9881
  }), 128))
9848
9882
  ])) : createCommentVNode("", true),
9849
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$v, [
9883
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
9850
9884
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
9851
9885
  return openBlock(), createElementBlock("span", { key: index }, [
9852
9886
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -9900,7 +9934,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9900
9934
  "data-cy": "lupa-result-page-title"
9901
9935
  };
9902
9936
  const _hoisted_2$D = { key: 0 };
9903
- const _hoisted_3$u = {
9937
+ const _hoisted_3$t = {
9904
9938
  key: 1,
9905
9939
  class: "lupa-results-total-count"
9906
9940
  };
@@ -9943,7 +9977,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9943
9977
  showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$U, [
9944
9978
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
9945
9979
  queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$D, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
9946
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$u, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
9980
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$t, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
9947
9981
  ])) : createCommentVNode("", true),
9948
9982
  _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$Y, {
9949
9983
  key: 1,
@@ -9963,7 +9997,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9963
9997
  class: "lupa-current-filter-label",
9964
9998
  "data-cy": "lupa-current-filter-label"
9965
9999
  };
9966
- const _hoisted_3$t = {
10000
+ const _hoisted_3$s = {
9967
10001
  class: "lupa-current-filter-value",
9968
10002
  "data-cy": "lupa-current-filter-value"
9969
10003
  };
@@ -9985,7 +10019,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9985
10019
  onClick: handleClick
9986
10020
  }, "⨉"),
9987
10021
  createBaseVNode("div", _hoisted_2$C, toDisplayString(_ctx.filter.label) + ": ", 1),
9988
- createBaseVNode("div", _hoisted_3$t, toDisplayString(_ctx.filter.value), 1)
10022
+ createBaseVNode("div", _hoisted_3$s, toDisplayString(_ctx.filter.value), 1)
9989
10023
  ]);
9990
10024
  };
9991
10025
  }
@@ -9995,7 +10029,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9995
10029
  key: 0,
9996
10030
  class: "lupa-filter-count"
9997
10031
  };
9998
- const _hoisted_3$s = {
10032
+ const _hoisted_3$r = {
9999
10033
  key: 0,
10000
10034
  class: "filter-values"
10001
10035
  };
@@ -10064,7 +10098,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10064
10098
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
10065
10099
  }, null, 2)) : createCommentVNode("", true)
10066
10100
  ]),
10067
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
10101
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
10068
10102
  createBaseVNode("div", _hoisted_4$l, [
10069
10103
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
10070
10104
  return openBlock(), createBlock(_sfc_main$W, {
@@ -10132,7 +10166,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10132
10166
  "data-cy": "lupa-category-filter"
10133
10167
  };
10134
10168
  const _hoisted_2$A = { class: "lupa-category-back" };
10135
- const _hoisted_3$r = ["href"];
10169
+ const _hoisted_3$q = ["href"];
10136
10170
  const _hoisted_4$k = ["href"];
10137
10171
  const _hoisted_5$d = { class: "lupa-child-category-list" };
10138
10172
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
@@ -10228,7 +10262,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10228
10262
  "data-cy": "lupa-category-back",
10229
10263
  href: backUrlLink.value,
10230
10264
  onClick: handleNavigationBack
10231
- }, toDisplayString(backTitle.value), 9, _hoisted_3$r)) : createCommentVNode("", true)
10265
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$q)) : createCommentVNode("", true)
10232
10266
  ]),
10233
10267
  createBaseVNode("div", {
10234
10268
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -10258,7 +10292,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10258
10292
  "data-cy": "lupa-search-result-facet-term-values"
10259
10293
  };
10260
10294
  const _hoisted_2$z = ["placeholder"];
10261
- const _hoisted_3$q = { class: "lupa-terms-list" };
10295
+ const _hoisted_3$p = { class: "lupa-terms-list" };
10262
10296
  const _hoisted_4$j = ["onClick"];
10263
10297
  const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
10264
10298
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
@@ -10348,7 +10382,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10348
10382
  }, null, 8, _hoisted_2$z)), [
10349
10383
  [vModelText, termFilter.value]
10350
10384
  ]) : createCommentVNode("", true),
10351
- createBaseVNode("div", _hoisted_3$q, [
10385
+ createBaseVNode("div", _hoisted_3$p, [
10352
10386
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
10353
10387
  return openBlock(), createElementBlock("div", {
10354
10388
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -11361,7 +11395,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11361
11395
  key: 0,
11362
11396
  class: "lupa-stats-facet-summary"
11363
11397
  };
11364
- const _hoisted_3$p = {
11398
+ const _hoisted_3$o = {
11365
11399
  key: 1,
11366
11400
  class: "lupa-stats-facet-summary-input"
11367
11401
  };
@@ -11547,7 +11581,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11547
11581
  };
11548
11582
  return (_ctx, _cache) => {
11549
11583
  return openBlock(), createElementBlock("div", _hoisted_1$O, [
11550
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$p, [
11584
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
11551
11585
  createBaseVNode("div", null, [
11552
11586
  rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
11553
11587
  createBaseVNode("div", _hoisted_5$b, [
@@ -11615,7 +11649,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11615
11649
  });
11616
11650
  const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
11617
11651
  const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
11618
- const _hoisted_3$o = { class: "lupa-term-label" };
11652
+ const _hoisted_3$n = { class: "lupa-term-label" };
11619
11653
  const _hoisted_4$h = {
11620
11654
  key: 0,
11621
11655
  class: "lupa-term-count"
@@ -11676,7 +11710,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11676
11710
  }, null, 2)
11677
11711
  ]),
11678
11712
  createBaseVNode("div", _hoisted_2$x, [
11679
- createBaseVNode("span", _hoisted_3$o, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
11713
+ createBaseVNode("span", _hoisted_3$n, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
11680
11714
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
11681
11715
  ])
11682
11716
  ]),
@@ -11701,7 +11735,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11701
11735
  "data-cy": "lupa-search-result-facet-term-values"
11702
11736
  };
11703
11737
  const _hoisted_2$w = { key: 0 };
11704
- const _hoisted_3$n = ["placeholder"];
11738
+ const _hoisted_3$m = ["placeholder"];
11705
11739
  const _sfc_main$P = /* @__PURE__ */ defineComponent({
11706
11740
  __name: "HierarchyFacet",
11707
11741
  props: {
@@ -11759,7 +11793,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11759
11793
  "data-cy": "lupa-term-filter",
11760
11794
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
11761
11795
  placeholder: _ctx.options.labels.facetFilter
11762
- }, null, 8, _hoisted_3$n), [
11796
+ }, null, 8, _hoisted_3$m), [
11763
11797
  [vModelText, termFilter.value]
11764
11798
  ])
11765
11799
  ])) : createCommentVNode("", true),
@@ -12127,7 +12161,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12127
12161
  class: "lupa-mobile-filter-sidebar"
12128
12162
  };
12129
12163
  const _hoisted_2$t = ["onClick"];
12130
- const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
12164
+ const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
12131
12165
  const _hoisted_4$g = { class: "lupa-sidebar-top" };
12132
12166
  const _hoisted_5$9 = { class: "lupa-sidebar-title" };
12133
12167
  const _hoisted_6$6 = {
@@ -12166,7 +12200,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12166
12200
  class: "lupa-sidebar-close",
12167
12201
  onClick: withModifiers(handleMobileToggle, ["stop"])
12168
12202
  }, null, 8, _hoisted_2$t),
12169
- createBaseVNode("div", _hoisted_3$m, [
12203
+ createBaseVNode("div", _hoisted_3$l, [
12170
12204
  createBaseVNode("div", _hoisted_4$g, [
12171
12205
  createBaseVNode("div", _hoisted_5$9, [
12172
12206
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
@@ -12190,7 +12224,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12190
12224
  });
12191
12225
  const _hoisted_1$G = { id: "lupa-search-results-breadcrumbs" };
12192
12226
  const _hoisted_2$s = ["href", "onClick"];
12193
- const _hoisted_3$l = {
12227
+ const _hoisted_3$k = {
12194
12228
  key: 1,
12195
12229
  class: "lupa-search-results-breadcrumb-text"
12196
12230
  };
@@ -12234,7 +12268,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12234
12268
  var _a;
12235
12269
  return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
12236
12270
  }
12237
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(getLabel(breadcrumb.label)), 1)),
12271
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString(getLabel(breadcrumb.label)), 1)),
12238
12272
  index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
12239
12273
  ]);
12240
12274
  }), 128))
@@ -12335,7 +12369,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12335
12369
  key: 0,
12336
12370
  class: "lupa-page-number-separator"
12337
12371
  };
12338
- const _hoisted_3$k = ["onClick"];
12372
+ const _hoisted_3$j = ["onClick"];
12339
12373
  const _hoisted_4$e = {
12340
12374
  key: 0,
12341
12375
  class: "lupa-page-number-separator"
@@ -12439,7 +12473,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12439
12473
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
12440
12474
  ]),
12441
12475
  "data-cy": "lupa-page-number"
12442
- }, toDisplayString(page), 11, _hoisted_3$k);
12476
+ }, toDisplayString(page), 11, _hoisted_3$j);
12443
12477
  }), 128)),
12444
12478
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
12445
12479
  showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
@@ -12466,7 +12500,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12466
12500
  "data-cy": "lupa-search-results-page-size"
12467
12501
  };
12468
12502
  const _hoisted_2$q = { id: "lupa-select" };
12469
- const _hoisted_3$j = { class: "lupa-select-label" };
12503
+ const _hoisted_3$i = { class: "lupa-select-label" };
12470
12504
  const _hoisted_4$d = ["aria-label"];
12471
12505
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
12472
12506
  __name: "SearchResultsPageSize",
@@ -12487,7 +12521,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12487
12521
  return (_ctx, _cache) => {
12488
12522
  return openBlock(), createElementBlock("div", _hoisted_1$B, [
12489
12523
  createBaseVNode("div", _hoisted_2$q, [
12490
- createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.label), 1),
12524
+ createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.label), 1),
12491
12525
  createBaseVNode("select", {
12492
12526
  class: "lupa-select-dropdown",
12493
12527
  "aria-label": _ctx.label,
@@ -12510,7 +12544,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12510
12544
  class: "lupa-search-results-sort"
12511
12545
  };
12512
12546
  const _hoisted_2$p = { id: "lupa-select" };
12513
- const _hoisted_3$i = { class: "lupa-select-label" };
12547
+ const _hoisted_3$h = { class: "lupa-select-label" };
12514
12548
  const _hoisted_4$c = ["aria-label"];
12515
12549
  const _hoisted_5$8 = ["value"];
12516
12550
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
@@ -12563,7 +12597,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12563
12597
  return (_ctx, _cache) => {
12564
12598
  return openBlock(), createElementBlock("div", _hoisted_1$A, [
12565
12599
  createBaseVNode("div", _hoisted_2$p, [
12566
- createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.options.label), 1),
12600
+ createBaseVNode("label", _hoisted_3$h, toDisplayString(_ctx.options.label), 1),
12567
12601
  withDirectives(createBaseVNode("select", {
12568
12602
  class: "lupa-select-dropdown",
12569
12603
  "aria-label": _ctx.options.label,
@@ -12588,7 +12622,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12588
12622
  });
12589
12623
  const _hoisted_1$z = { class: "lupa-toolbar-left" };
12590
12624
  const _hoisted_2$o = { key: 1 };
12591
- const _hoisted_3$h = { key: 3 };
12625
+ const _hoisted_3$g = { key: 3 };
12592
12626
  const _hoisted_4$b = { key: 5 };
12593
12627
  const _hoisted_5$7 = { class: "lupa-toolbar-right" };
12594
12628
  const _hoisted_6$5 = { key: 1 };
@@ -12699,7 +12733,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12699
12733
  label: searchSummaryLabel.value,
12700
12734
  clearable: unref(hasAnyFilter) && showFilterClear.value,
12701
12735
  onClear: handleClearAll
12702
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$h)),
12736
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$g)),
12703
12737
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$F, {
12704
12738
  key: 4,
12705
12739
  options: paginationOptions.value.pageSelect,
@@ -12729,7 +12763,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12729
12763
  });
12730
12764
  const _hoisted_1$y = { class: "lupa-badge-title" };
12731
12765
  const _hoisted_2$n = ["src"];
12732
- const _hoisted_3$g = { key: 1 };
12766
+ const _hoisted_3$f = { key: 1 };
12733
12767
  const _hoisted_4$a = {
12734
12768
  key: 0,
12735
12769
  class: "lupa-badge-full-text"
@@ -12772,7 +12806,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12772
12806
  key: 0,
12773
12807
  src: image.value
12774
12808
  }, null, 8, _hoisted_2$n)) : createCommentVNode("", true),
12775
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$g, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
12809
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
12776
12810
  ]),
12777
12811
  hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
12778
12812
  ], 6);
@@ -12999,7 +13033,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12999
13033
  });
13000
13034
  const _hoisted_1$s = ["innerHTML"];
13001
13035
  const _hoisted_2$l = ["title"];
13002
- const _hoisted_3$f = {
13036
+ const _hoisted_3$e = {
13003
13037
  key: 0,
13004
13038
  class: "lupa-search-results-product-title-text"
13005
13039
  };
@@ -13043,7 +13077,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13043
13077
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
13044
13078
  title: title.value
13045
13079
  }, [
13046
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(title.value), 1)) : createCommentVNode("", true),
13080
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(title.value), 1)) : createCommentVNode("", true),
13047
13081
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
13048
13082
  key: 1,
13049
13083
  href: _ctx.link,
@@ -13089,7 +13123,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13089
13123
  });
13090
13124
  const _hoisted_1$q = { id: "lupa-search-results-rating" };
13091
13125
  const _hoisted_2$k = { class: "lupa-ratings" };
13092
- const _hoisted_3$e = { class: "lupa-ratings-base" };
13126
+ const _hoisted_3$d = { class: "lupa-ratings-base" };
13093
13127
  const _hoisted_4$8 = ["innerHTML"];
13094
13128
  const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
13095
13129
  const _hoisted_6$4 = ["innerHTML"];
@@ -13128,7 +13162,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13128
13162
  return (_ctx, _cache) => {
13129
13163
  return openBlock(), createElementBlock("div", _hoisted_1$q, [
13130
13164
  createBaseVNode("div", _hoisted_2$k, [
13131
- createBaseVNode("div", _hoisted_3$e, [
13165
+ createBaseVNode("div", _hoisted_3$d, [
13132
13166
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
13133
13167
  return openBlock(), createElementBlock("div", {
13134
13168
  key: index,
@@ -13216,7 +13250,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13216
13250
  });
13217
13251
  const _hoisted_1$n = { class: "lupa-search-results-add-to-cart-wrapper" };
13218
13252
  const _hoisted_2$j = { class: "lupa-search-results-product-addtocart" };
13219
- const _hoisted_3$d = ["onClick", "disabled"];
13253
+ const _hoisted_3$c = ["onClick", "disabled"];
13220
13254
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
13221
13255
  __name: "SearchResultsProductAddToCart",
13222
13256
  props: {
@@ -13251,7 +13285,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13251
13285
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
13252
13286
  "data-cy": "lupa-add-to-cart",
13253
13287
  disabled: !inStockValue.value || loading.value
13254
- }, toDisplayString(label.value), 11, _hoisted_3$d)
13288
+ }, toDisplayString(label.value), 11, _hoisted_3$c)
13255
13289
  ])
13256
13290
  ]);
13257
13291
  };
@@ -13259,7 +13293,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13259
13293
  });
13260
13294
  const _hoisted_1$m = ["innerHTML"];
13261
13295
  const _hoisted_2$i = { key: 0 };
13262
- const _hoisted_3$c = { key: 1 };
13296
+ const _hoisted_3$b = { key: 1 };
13263
13297
  const _hoisted_4$7 = { class: "lupa-search-box-custom-label" };
13264
13298
  const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
13265
13299
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
@@ -13304,7 +13338,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13304
13338
  key: 1,
13305
13339
  class: className.value
13306
13340
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
13307
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$c, [
13341
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$b, [
13308
13342
  createBaseVNode("div", _hoisted_4$7, toDisplayString(label.value), 1),
13309
13343
  createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
13310
13344
  ]))
@@ -13343,7 +13377,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13343
13377
  });
13344
13378
  const _hoisted_1$k = { id: "lupa-search-results-rating" };
13345
13379
  const _hoisted_2$h = ["innerHTML"];
13346
- const _hoisted_3$b = { class: "lupa-ratings" };
13380
+ const _hoisted_3$a = { class: "lupa-ratings" };
13347
13381
  const _hoisted_4$6 = ["href"];
13348
13382
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
13349
13383
  __name: "SearchResultsProductSingleStarRating",
@@ -13378,7 +13412,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13378
13412
  innerHTML: star.value,
13379
13413
  class: "lupa-rating lupa-rating-highlighted"
13380
13414
  }, null, 8, _hoisted_2$h),
13381
- createBaseVNode("div", _hoisted_3$b, toDisplayString(rating.value), 1),
13415
+ createBaseVNode("div", _hoisted_3$a, toDisplayString(rating.value), 1),
13382
13416
  createBaseVNode("a", {
13383
13417
  href: ratingLink.value,
13384
13418
  class: "lupa-total-ratings"
@@ -13476,7 +13510,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13476
13510
  key: 0,
13477
13511
  class: "lupa-out-of-stock"
13478
13512
  };
13479
- const _hoisted_3$a = { class: "lupa-search-result-product-details-section" };
13513
+ const _hoisted_3$9 = { class: "lupa-search-result-product-details-section" };
13480
13514
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
13481
13515
  __name: "SearchResultsProductCard",
13482
13516
  props: {
@@ -13652,7 +13686,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13652
13686
  }, null, 8, ["options"]),
13653
13687
  ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$g, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
13654
13688
  ], 8, _hoisted_1$j),
13655
- createBaseVNode("div", _hoisted_3$a, [
13689
+ createBaseVNode("div", _hoisted_3$9, [
13656
13690
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
13657
13691
  return openBlock(), createBlock(_sfc_main$l, {
13658
13692
  class: "lupa-search-results-product-element",
@@ -13695,7 +13729,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13695
13729
  "data-cy": "lupa-search-results-similar-queries"
13696
13730
  };
13697
13731
  const _hoisted_2$f = { class: "lupa-similar-queries-label" };
13698
- const _hoisted_3$9 = {
13732
+ const _hoisted_3$8 = {
13699
13733
  class: "lupa-similar-query-label",
13700
13734
  "data-cy": "lupa-similar-query-label"
13701
13735
  };
@@ -13740,7 +13774,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13740
13774
  createBaseVNode("div", _hoisted_2$f, toDisplayString(_ctx.labels.similarQueries), 1),
13741
13775
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
13742
13776
  return openBlock(), createElementBlock("div", { key: index }, [
13743
- createBaseVNode("div", _hoisted_3$9, [
13777
+ createBaseVNode("div", _hoisted_3$8, [
13744
13778
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
13745
13779
  createBaseVNode("span", {
13746
13780
  id: "lupa-similar-query-text-component",
@@ -13929,7 +13963,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13929
13963
  "data-cy": "lupa-search-results-similar-results"
13930
13964
  };
13931
13965
  const _hoisted_2$c = { class: "lupa-similar-results-label" };
13932
- const _hoisted_3$8 = {
13966
+ const _hoisted_3$7 = {
13933
13967
  class: "lupa-products",
13934
13968
  "data-cy": "lupa-products"
13935
13969
  };
@@ -13951,7 +13985,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13951
13985
  return (_ctx, _cache) => {
13952
13986
  return openBlock(), createElementBlock("div", _hoisted_1$e, [
13953
13987
  createBaseVNode("div", _hoisted_2$c, toDisplayString(_ctx.labels.similarResultsLabel), 1),
13954
- createBaseVNode("div", _hoisted_3$8, [
13988
+ createBaseVNode("div", _hoisted_3$7, [
13955
13989
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
13956
13990
  return openBlock(), createBlock(_sfc_main$k, {
13957
13991
  style: normalizeStyle(_ctx.columnSize),
@@ -13970,7 +14004,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13970
14004
  class: "lupa-products",
13971
14005
  "data-cy": "lupa-products"
13972
14006
  };
13973
- const _hoisted_3$7 = {
14007
+ const _hoisted_3$6 = {
13974
14008
  key: 0,
13975
14009
  class: "lupa-empty-results",
13976
14010
  "data-cy": "lupa-no-results-in-page"
@@ -14133,7 +14167,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14133
14167
  }, null, 8, ["style", "product", "options"]);
14134
14168
  }), 128))
14135
14169
  ]),
14136
- unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
14170
+ unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
14137
14171
  createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
14138
14172
  _ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
14139
14173
  key: 0,
@@ -14179,7 +14213,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14179
14213
  key: 0,
14180
14214
  class: "lupa-category-back"
14181
14215
  };
14182
- const _hoisted_3$6 = ["href"];
14216
+ const _hoisted_3$5 = ["href"];
14183
14217
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
14184
14218
  __name: "CategoryTopFilters",
14185
14219
  props: {
@@ -14218,7 +14252,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14218
14252
  "data-cy": "lupa-category-back",
14219
14253
  href: backUrlLink.value,
14220
14254
  onClick: handleNavigationBack
14221
- }, toDisplayString(backTitle.value), 9, _hoisted_3$6)
14255
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$5)
14222
14256
  ])) : createCommentVNode("", true),
14223
14257
  createVNode(_sfc_main$C, {
14224
14258
  class: "lupa-toolbar-mobile",
@@ -14239,7 +14273,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14239
14273
  id: "lupa-search-results",
14240
14274
  class: "top-layout-wrapper"
14241
14275
  };
14242
- const _hoisted_3$5 = { class: "search-content" };
14276
+ const _hoisted_3$4 = { class: "search-content" };
14243
14277
  const _hoisted_4$3 = { id: "lupa-search-results" };
14244
14278
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
14245
14279
  __name: "SearchResults",
@@ -14478,7 +14512,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14478
14512
  ref_key: "searchResultsFilters",
14479
14513
  ref: searchResultsFilters
14480
14514
  }, null, 8, ["options"])) : createCommentVNode("", true),
14481
- createBaseVNode("div", _hoisted_3$5, [
14515
+ createBaseVNode("div", _hoisted_3$4, [
14482
14516
  createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14483
14517
  createVNode(_sfc_main$X, {
14484
14518
  options: _ctx.options,
@@ -20969,12 +21003,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20969
21003
  });
20970
21004
  const _hoisted_1$7 = { class: "lupa-chat-spinner" };
20971
21005
  const _hoisted_2$5 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
20972
- const _hoisted_3$4 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
21006
+ const _hoisted_3$3 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
20973
21007
  const _hoisted_4$2 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
20974
21008
  const _hoisted_5$2 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
20975
21009
  const _hoisted_6$1 = [
20976
21010
  _hoisted_2$5,
20977
- _hoisted_3$4,
21011
+ _hoisted_3$3,
20978
21012
  _hoisted_4$2,
20979
21013
  _hoisted_5$2
20980
21014
  ];
@@ -20998,7 +21032,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20998
21032
  });
20999
21033
  const _hoisted_1$6 = { class: "lupa-chat-input-container" };
21000
21034
  const _hoisted_2$4 = { id: "lupa-search-box-input" };
21001
- const _hoisted_3$3 = {
21035
+ const _hoisted_3$2 = {
21002
21036
  key: 0,
21003
21037
  class: "lupa-chat-form-submit"
21004
21038
  };
@@ -21034,7 +21068,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21034
21068
  [vModelText, inputValue.value]
21035
21069
  ])
21036
21070
  ]),
21037
- !_ctx.disabled ? (openBlock(), createElementBlock("button", _hoisted_3$3, "Ask LupaChat")) : (openBlock(), createBlock(_sfc_main$7, {
21071
+ !_ctx.disabled ? (openBlock(), createElementBlock("button", _hoisted_3$2, "Ask LupaChat")) : (openBlock(), createBlock(_sfc_main$7, {
21038
21072
  key: 1,
21039
21073
  small: true
21040
21074
  }))
@@ -21201,7 +21235,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21201
21235
  });
21202
21236
  const _hoisted_1$4 = { class: "lupa-chat-content-entry-phrase" };
21203
21237
  const _hoisted_2$3 = { class: "lupa-chat-phrase-title" };
21204
- const _hoisted_3$2 = {
21238
+ const _hoisted_3$1 = {
21205
21239
  key: 0,
21206
21240
  class: "alert"
21207
21241
  };
@@ -21302,7 +21336,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21302
21336
  createBaseVNode("div", _hoisted_2$3, [
21303
21337
  createBaseVNode("h3", null, toDisplayString(displayPhrase.value), 1),
21304
21338
  createBaseVNode("sub", null, toDisplayString(usedAlternativePhrases.value.join(", ")), 1),
21305
- usedPartialResults.value ? (openBlock(), createElementBlock("sub", _hoisted_3$2, "Including partial matches - which might not be what you are looking for")) : createCommentVNode("", true)
21339
+ usedPartialResults.value ? (openBlock(), createElementBlock("sub", _hoisted_3$1, "Including partial matches - which might not be what you are looking for")) : createCommentVNode("", true)
21306
21340
  ]),
21307
21341
  createBaseVNode("div", null, [
21308
21342
  createVNode(_sfc_main$5, {
@@ -21321,7 +21355,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21321
21355
  });
21322
21356
  const _hoisted_1$3 = { class: "lupa-chat-best-matches lupa-chat-content-entry" };
21323
21357
  const _hoisted_2$2 = /* @__PURE__ */ createBaseVNode("h3", null, "Best matches", -1);
21324
- const _hoisted_3$1 = { key: 0 };
21358
+ const MAX_SOURCES_FOR_BEST_ITEM_MATCHING = 250;
21325
21359
  const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
21326
21360
  __name: "ChatContentEntry",
21327
21361
  props: {
@@ -21351,20 +21385,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21351
21385
  return (_a = props.options.displayOptions.titleKey) != null ? _a : "title";
21352
21386
  });
21353
21387
  const loadFinalRecommendations = () => __async(this, null, function* () {
21354
- var _a;
21388
+ var _a, _b;
21355
21389
  try {
21356
- const productResultStrings = loadedResults.value.map(
21357
- (result) => {
21358
- var _a2, _b;
21359
- return (_b = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b : "";
21360
- }
21361
- );
21390
+ const productResultStrings = (_a = loadedResults.value.map((result) => {
21391
+ var _a2, _b2;
21392
+ return (_b2 = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b2 : "";
21393
+ })) == null ? void 0 : _a.slice(0, MAX_SOURCES_FOR_BEST_ITEM_MATCHING);
21362
21394
  const { products } = yield ChatService.suggestBestProductMatches(
21363
21395
  props.options.sdkOptions,
21364
21396
  {
21365
21397
  initialQuery: props.entry.userInput,
21366
21398
  productStrings: productResultStrings,
21367
- messageHistory: (_a = props.history) != null ? _a : [],
21399
+ messageHistory: (_b = props.history) != null ? _b : [],
21368
21400
  queryKey: props.options.displayOptions.queryKey
21369
21401
  },
21370
21402
  props.options.chatSettings
@@ -21377,13 +21409,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21377
21409
  });
21378
21410
  const bestMatchProducts = computed(() => {
21379
21411
  return bestMatches.value.map((productName) => {
21380
- return loadedResults.value.find((r) => r[titleKey.value] === productName);
21412
+ return findClosestStringValue(productName, loadedResults.value, titleKey.value);
21381
21413
  }).filter(Boolean);
21382
21414
  });
21383
- const explanation = computed(() => {
21384
- var _a, _b;
21385
- return ((_a = bestMatches.value) == null ? void 0 : _a.length) > 0 && !bestMatchProducts.value.length ? (_b = bestMatches == null ? void 0 : bestMatches.value) == null ? void 0 : _b[0] : "";
21386
- });
21387
21415
  return (_ctx, _cache) => {
21388
21416
  return openBlock(), createElementBlock("div", null, [
21389
21417
  createBaseVNode("ul", null, [
@@ -21403,13 +21431,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21403
21431
  ]),
21404
21432
  createBaseVNode("section", _hoisted_1$3, [
21405
21433
  _hoisted_2$2,
21406
- explanation.value ? (openBlock(), createElementBlock("p", _hoisted_3$1, toDisplayString(explanation.value), 1)) : createCommentVNode("", true),
21407
21434
  loading.value ? (openBlock(), createBlock(_sfc_main$7, {
21408
- key: 1,
21435
+ key: 0,
21409
21436
  message: "Selecting the best matches for you. This might take a few seconds."
21410
21437
  })) : createCommentVNode("", true),
21411
21438
  bestMatches.value.length ? (openBlock(), createBlock(_sfc_main$5, {
21412
- key: 2,
21439
+ key: 1,
21413
21440
  "search-results": bestMatchProducts.value,
21414
21441
  options: _ctx.options.displayOptions
21415
21442
  }, null, 8, ["search-results", "options"])) : createCommentVNode("", true)