@getlupa/vue 0.8.4 → 0.8.6

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.
@@ -1757,6 +1757,37 @@ const inputsAreEqual = (input, possibleValues) => {
1757
1757
  const normalizedInput = getNormalizedString(input);
1758
1758
  return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
1759
1759
  };
1760
+ const levenshteinDistance = (s = "", t = "") => {
1761
+ if (!(s == null ? void 0 : s.length)) {
1762
+ return t.length;
1763
+ }
1764
+ if (!(t == null ? void 0 : t.length)) {
1765
+ return s.length;
1766
+ }
1767
+ const arr = [];
1768
+ for (let i = 0; i <= t.length; i++) {
1769
+ arr[i] = [i];
1770
+ for (let j = 1; j <= s.length; j++) {
1771
+ arr[i][j] = i === 0 ? j : Math.min(
1772
+ arr[i - 1][j] + 1,
1773
+ arr[i][j - 1] + 1,
1774
+ arr[i - 1][j - 1] + (s[j - 1] === t[i - 1] ? 0 : 1)
1775
+ );
1776
+ }
1777
+ }
1778
+ return arr[t.length][s.length];
1779
+ };
1780
+ const findClosestStringValue = (input, possibleValues, key) => {
1781
+ var _a;
1782
+ const directMatch = possibleValues.find((v) => v[key] === input);
1783
+ if (directMatch) {
1784
+ return directMatch;
1785
+ }
1786
+ const distances = possibleValues.map((v) => levenshteinDistance(`${v[key]}`, input));
1787
+ const minDistance = Math.min(...distances);
1788
+ const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
1789
+ return closestValue;
1790
+ };
1760
1791
  const initAnalyticsTracking = (analyticsOptions) => {
1761
1792
  try {
1762
1793
  if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
@@ -3166,7 +3197,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
3166
3197
  });
3167
3198
  const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
3168
3199
  const _hoisted_2$P = { class: "lupa-input-clear" };
3169
- const _hoisted_3$B = { id: "lupa-search-box-input" };
3200
+ const _hoisted_3$A = { id: "lupa-search-box-input" };
3170
3201
  const _hoisted_4$s = ["value"];
3171
3202
  const _hoisted_5$g = ["aria-label", "placeholder"];
3172
3203
  const _hoisted_6$9 = {
@@ -3261,7 +3292,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
3261
3292
  onClick: clear
3262
3293
  }, null, 2)
3263
3294
  ]),
3264
- vue.createElementVNode("div", _hoisted_3$B, [
3295
+ vue.createElementVNode("div", _hoisted_3$A, [
3265
3296
  vue.createElementVNode("input", {
3266
3297
  class: "lupa-hint",
3267
3298
  "aria-hidden": "true",
@@ -3442,7 +3473,7 @@ const _hoisted_2$N = {
3442
3473
  "data-cy": "lupa-suggestion-value",
3443
3474
  class: "lupa-suggestion-value"
3444
3475
  };
3445
- const _hoisted_3$A = {
3476
+ const _hoisted_3$z = {
3446
3477
  key: 2,
3447
3478
  class: "lupa-suggestion-facet",
3448
3479
  "data-cy": "lupa-suggestion-facet"
@@ -3492,7 +3523,7 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
3492
3523
  "data-cy": "lupa-suggestion-value",
3493
3524
  innerHTML: _ctx.suggestion.displayHighlight
3494
3525
  }, null, 8, _hoisted_1$18)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$N, vue.toDisplayString(_ctx.suggestion.display), 1)),
3495
- _ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$A, [
3526
+ _ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
3496
3527
  vue.createElementVNode("span", _hoisted_4$r, vue.toDisplayString(facetLabel.value), 1),
3497
3528
  vue.createElementVNode("span", _hoisted_5$f, vue.toDisplayString(_ctx.suggestion.facet.title), 1)
3498
3529
  ])) : vue.createCommentVNode("", true)
@@ -3906,7 +3937,7 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
3906
3937
  });
3907
3938
  const _hoisted_1$11 = ["innerHTML"];
3908
3939
  const _hoisted_2$K = { key: 0 };
3909
- const _hoisted_3$z = { key: 1 };
3940
+ const _hoisted_3$y = { key: 1 };
3910
3941
  const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
3911
3942
  const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
3912
3943
  const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
@@ -3939,7 +3970,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
3939
3970
  key: 1,
3940
3971
  class: [className.value, "lupa-search-box-product-custom"]
3941
3972
  }, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
3942
- !label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$K, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
3973
+ !label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$K, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$y, [
3943
3974
  vue.createElementVNode("div", _hoisted_4$q, vue.toDisplayString(label.value), 1),
3944
3975
  vue.createElementVNode("div", _hoisted_5$e, vue.toDisplayString(text.value), 1)
3945
3976
  ]))
@@ -4164,7 +4195,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
4164
4195
  });
4165
4196
  const _hoisted_1$$ = { class: "lupa-search-box-add-to-cart-wrapper" };
4166
4197
  const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
4167
- const _hoisted_3$y = ["onClick", "disabled"];
4198
+ const _hoisted_3$x = ["onClick", "disabled"];
4168
4199
  const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
4169
4200
  __name: "SearchBoxProductAddToCart",
4170
4201
  props: {
@@ -4200,7 +4231,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
4200
4231
  "data-cy": "lupa-add-to-cart",
4201
4232
  type: "button",
4202
4233
  disabled: !inStockValue.value || loading.value
4203
- }, vue.toDisplayString(label.value), 11, _hoisted_3$y)
4234
+ }, vue.toDisplayString(label.value), 11, _hoisted_3$x)
4204
4235
  ])
4205
4236
  ]);
4206
4237
  };
@@ -4279,7 +4310,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadV
4279
4310
  }));
4280
4311
  const _hoisted_1$_ = ["href"];
4281
4312
  const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
4282
- const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
4313
+ const _hoisted_3$w = { class: "lupa-search-box-product-details-section" };
4283
4314
  const _hoisted_4$p = {
4284
4315
  key: 0,
4285
4316
  class: "lupa-search-box-product-add-to-cart-section"
@@ -4352,7 +4383,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
4352
4383
  }, null, 8, ["item", "element", "labels", "link"]);
4353
4384
  }), 128))
4354
4385
  ]),
4355
- vue.createElementVNode("div", _hoisted_3$x, [
4386
+ vue.createElementVNode("div", _hoisted_3$w, [
4356
4387
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(detailElements.value, (element) => {
4357
4388
  return vue.openBlock(), vue.createBlock(_sfc_main$13, {
4358
4389
  class: "lupa-search-box-product-element",
@@ -4596,7 +4627,7 @@ const _hoisted_1$Y = {
4596
4627
  id: "lupa-search-box-panel"
4597
4628
  };
4598
4629
  const _hoisted_2$H = ["data-cy"];
4599
- const _hoisted_3$w = {
4630
+ const _hoisted_3$v = {
4600
4631
  key: 0,
4601
4632
  class: "lupa-panel-title"
4602
4633
  };
@@ -4748,7 +4779,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
4748
4779
  ]),
4749
4780
  "data-cy": "lupa-panel-" + panel.type + "-index"
4750
4781
  }, [
4751
- ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$w, vue.toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : vue.createCommentVNode("", true),
4782
+ ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$v, vue.toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : vue.createCommentVNode("", true),
4752
4783
  panel.queryKey ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getComponent(panel.type)), {
4753
4784
  key: 1,
4754
4785
  panel,
@@ -4891,13 +4922,16 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
4891
4922
  suggestedValue.value = defaultSuggestedValue;
4892
4923
  };
4893
4924
  const handleKeyDown = (e) => {
4925
+ var _a2, _b;
4894
4926
  if (!opened.value) {
4895
4927
  return;
4896
4928
  }
4897
4929
  switch (e.key) {
4898
4930
  case "Tab":
4899
- e.preventDefault();
4900
- selectSuggestion(__spreadProps(__spreadValues({}, suggestedValue.value), { override: true }));
4931
+ if ((_b = (_a2 = suggestedValue == null ? void 0 : suggestedValue.value) == null ? void 0 : _a2.item) == null ? void 0 : _b.suggestion) {
4932
+ e.preventDefault();
4933
+ selectSuggestion(__spreadProps(__spreadValues({}, suggestedValue.value), { override: true }));
4934
+ }
4901
4935
  break;
4902
4936
  case "Enter":
4903
4937
  e.preventDefault();
@@ -5171,7 +5205,7 @@ const _hoisted_2$F = {
5171
5205
  key: 0,
5172
5206
  "data-cy": "suggested-search-text-label"
5173
5207
  };
5174
- const _hoisted_3$v = {
5208
+ const _hoisted_3$u = {
5175
5209
  key: 1,
5176
5210
  "data-cy": "did-you-mean-label"
5177
5211
  };
@@ -5218,7 +5252,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
5218
5252
  ]);
5219
5253
  }), 128))
5220
5254
  ])) : vue.createCommentVNode("", true),
5221
- didYouMeanValue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$v, [
5255
+ didYouMeanValue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
5222
5256
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
5223
5257
  return vue.openBlock(), vue.createElementBlock("span", { key: index }, [
5224
5258
  label.includes("{1}") ? (vue.openBlock(), vue.createElementBlock("span", {
@@ -5272,7 +5306,7 @@ const _hoisted_1$U = {
5272
5306
  "data-cy": "lupa-result-page-title"
5273
5307
  };
5274
5308
  const _hoisted_2$D = { key: 0 };
5275
- const _hoisted_3$u = {
5309
+ const _hoisted_3$t = {
5276
5310
  key: 1,
5277
5311
  class: "lupa-results-total-count"
5278
5312
  };
@@ -5315,7 +5349,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
5315
5349
  showSearchTitle.value ? (vue.openBlock(), vue.createElementBlock("h1", _hoisted_1$U, [
5316
5350
  vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.searchResults), 1),
5317
5351
  queryText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$D, "'" + vue.toDisplayString(queryText.value) + "'", 1)) : vue.createCommentVNode("", true),
5318
- showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$u, "(" + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
5352
+ showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$t, "(" + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
5319
5353
  ])) : vue.createCommentVNode("", true),
5320
5354
  _ctx.showSummary ? (vue.openBlock(), vue.createBlock(_sfc_main$Y, {
5321
5355
  key: 1,
@@ -5335,7 +5369,7 @@ const _hoisted_2$C = {
5335
5369
  class: "lupa-current-filter-label",
5336
5370
  "data-cy": "lupa-current-filter-label"
5337
5371
  };
5338
- const _hoisted_3$t = {
5372
+ const _hoisted_3$s = {
5339
5373
  class: "lupa-current-filter-value",
5340
5374
  "data-cy": "lupa-current-filter-value"
5341
5375
  };
@@ -5357,7 +5391,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
5357
5391
  onClick: handleClick
5358
5392
  }, "⨉"),
5359
5393
  vue.createElementVNode("div", _hoisted_2$C, vue.toDisplayString(_ctx.filter.label) + ": ", 1),
5360
- vue.createElementVNode("div", _hoisted_3$t, vue.toDisplayString(_ctx.filter.value), 1)
5394
+ vue.createElementVNode("div", _hoisted_3$s, vue.toDisplayString(_ctx.filter.value), 1)
5361
5395
  ]);
5362
5396
  };
5363
5397
  }
@@ -5367,7 +5401,7 @@ const _hoisted_2$B = {
5367
5401
  key: 0,
5368
5402
  class: "lupa-filter-count"
5369
5403
  };
5370
- const _hoisted_3$s = {
5404
+ const _hoisted_3$r = {
5371
5405
  key: 0,
5372
5406
  class: "filter-values"
5373
5407
  };
@@ -5436,7 +5470,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
5436
5470
  class: vue.normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
5437
5471
  }, null, 2)) : vue.createCommentVNode("", true)
5438
5472
  ]),
5439
- !_ctx.expandable || isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$s, [
5473
+ !_ctx.expandable || isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$r, [
5440
5474
  vue.createElementVNode("div", _hoisted_4$l, [
5441
5475
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(displayFilters), (filter) => {
5442
5476
  return vue.openBlock(), vue.createBlock(_sfc_main$W, {
@@ -5504,7 +5538,7 @@ const _hoisted_1$Q = {
5504
5538
  "data-cy": "lupa-category-filter"
5505
5539
  };
5506
5540
  const _hoisted_2$A = { class: "lupa-category-back" };
5507
- const _hoisted_3$r = ["href"];
5541
+ const _hoisted_3$q = ["href"];
5508
5542
  const _hoisted_4$k = ["href"];
5509
5543
  const _hoisted_5$d = { class: "lupa-child-category-list" };
5510
5544
  const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
@@ -5600,7 +5634,7 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
5600
5634
  "data-cy": "lupa-category-back",
5601
5635
  href: backUrlLink.value,
5602
5636
  onClick: handleNavigationBack
5603
- }, vue.toDisplayString(backTitle.value), 9, _hoisted_3$r)) : vue.createCommentVNode("", true)
5637
+ }, vue.toDisplayString(backTitle.value), 9, _hoisted_3$q)) : vue.createCommentVNode("", true)
5604
5638
  ]),
5605
5639
  vue.createElementVNode("div", {
5606
5640
  class: vue.normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -5630,7 +5664,7 @@ const _hoisted_1$P = {
5630
5664
  "data-cy": "lupa-search-result-facet-term-values"
5631
5665
  };
5632
5666
  const _hoisted_2$z = ["placeholder"];
5633
- const _hoisted_3$q = { class: "lupa-terms-list" };
5667
+ const _hoisted_3$p = { class: "lupa-terms-list" };
5634
5668
  const _hoisted_4$j = ["onClick"];
5635
5669
  const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
5636
5670
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
@@ -5720,7 +5754,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
5720
5754
  }, null, 8, _hoisted_2$z)), [
5721
5755
  [vue.vModelText, termFilter.value]
5722
5756
  ]) : vue.createCommentVNode("", true),
5723
- vue.createElementVNode("div", _hoisted_3$q, [
5757
+ vue.createElementVNode("div", _hoisted_3$p, [
5724
5758
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayValues.value, (item) => {
5725
5759
  return vue.openBlock(), vue.createElementBlock("div", {
5726
5760
  class: vue.normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -6733,7 +6767,7 @@ const _hoisted_2$y = {
6733
6767
  key: 0,
6734
6768
  class: "lupa-stats-facet-summary"
6735
6769
  };
6736
- const _hoisted_3$p = {
6770
+ const _hoisted_3$o = {
6737
6771
  key: 1,
6738
6772
  class: "lupa-stats-facet-summary-input"
6739
6773
  };
@@ -6919,7 +6953,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
6919
6953
  };
6920
6954
  return (_ctx, _cache) => {
6921
6955
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
6922
- !isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, vue.toDisplayString(statsSummary.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$p, [
6956
+ !isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, vue.toDisplayString(statsSummary.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$o, [
6923
6957
  vue.createElementVNode("div", null, [
6924
6958
  rangeLabelFrom.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$i, vue.toDisplayString(rangeLabelFrom.value), 1)) : vue.createCommentVNode("", true),
6925
6959
  vue.createElementVNode("div", _hoisted_5$b, [
@@ -6987,7 +7021,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
6987
7021
  });
6988
7022
  const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
6989
7023
  const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
6990
- const _hoisted_3$o = { class: "lupa-term-label" };
7024
+ const _hoisted_3$n = { class: "lupa-term-label" };
6991
7025
  const _hoisted_4$h = {
6992
7026
  key: 0,
6993
7027
  class: "lupa-term-count"
@@ -7048,7 +7082,7 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
7048
7082
  }, null, 2)
7049
7083
  ]),
7050
7084
  vue.createElementVNode("div", _hoisted_2$x, [
7051
- vue.createElementVNode("span", _hoisted_3$o, vue.toDisplayString(_ctx.item.title) + vue.toDisplayString(" "), 1),
7085
+ vue.createElementVNode("span", _hoisted_3$n, vue.toDisplayString(_ctx.item.title) + vue.toDisplayString(" "), 1),
7052
7086
  _ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$h, "(" + vue.toDisplayString(_ctx.item.count) + ")", 1)) : vue.createCommentVNode("", true)
7053
7087
  ])
7054
7088
  ]),
@@ -7073,7 +7107,7 @@ const _hoisted_1$M = {
7073
7107
  "data-cy": "lupa-search-result-facet-term-values"
7074
7108
  };
7075
7109
  const _hoisted_2$w = { key: 0 };
7076
- const _hoisted_3$n = ["placeholder"];
7110
+ const _hoisted_3$m = ["placeholder"];
7077
7111
  const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
7078
7112
  __name: "HierarchyFacet",
7079
7113
  props: {
@@ -7131,7 +7165,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
7131
7165
  "data-cy": "lupa-term-filter",
7132
7166
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
7133
7167
  placeholder: _ctx.options.labels.facetFilter
7134
- }, null, 8, _hoisted_3$n), [
7168
+ }, null, 8, _hoisted_3$m), [
7135
7169
  [vue.vModelText, termFilter.value]
7136
7170
  ])
7137
7171
  ])) : vue.createCommentVNode("", true),
@@ -7499,7 +7533,7 @@ const _hoisted_1$H = {
7499
7533
  class: "lupa-mobile-filter-sidebar"
7500
7534
  };
7501
7535
  const _hoisted_2$t = ["onClick"];
7502
- const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
7536
+ const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
7503
7537
  const _hoisted_4$g = { class: "lupa-sidebar-top" };
7504
7538
  const _hoisted_5$9 = { class: "lupa-sidebar-title" };
7505
7539
  const _hoisted_6$6 = {
@@ -7538,7 +7572,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
7538
7572
  class: "lupa-sidebar-close",
7539
7573
  onClick: vue.withModifiers(handleMobileToggle, ["stop"])
7540
7574
  }, null, 8, _hoisted_2$t),
7541
- vue.createElementVNode("div", _hoisted_3$m, [
7575
+ vue.createElementVNode("div", _hoisted_3$l, [
7542
7576
  vue.createElementVNode("div", _hoisted_4$g, [
7543
7577
  vue.createElementVNode("div", _hoisted_5$9, [
7544
7578
  vue.createTextVNode(vue.toDisplayString(sidebarTitle.value) + " ", 1),
@@ -7562,7 +7596,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
7562
7596
  });
7563
7597
  const _hoisted_1$G = { id: "lupa-search-results-breadcrumbs" };
7564
7598
  const _hoisted_2$s = ["href", "onClick"];
7565
- const _hoisted_3$l = {
7599
+ const _hoisted_3$k = {
7566
7600
  key: 1,
7567
7601
  class: "lupa-search-results-breadcrumb-text"
7568
7602
  };
@@ -7606,7 +7640,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
7606
7640
  var _a;
7607
7641
  return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
7608
7642
  }
7609
- }, vue.toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$l, vue.toDisplayString(getLabel(breadcrumb.label)), 1)),
7643
+ }, vue.toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$k, vue.toDisplayString(getLabel(breadcrumb.label)), 1)),
7610
7644
  index < breadcrumbsValue.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$f, " / ")) : vue.createCommentVNode("", true)
7611
7645
  ]);
7612
7646
  }), 128))
@@ -7707,7 +7741,7 @@ const _hoisted_2$r = {
7707
7741
  key: 0,
7708
7742
  class: "lupa-page-number-separator"
7709
7743
  };
7710
- const _hoisted_3$k = ["onClick"];
7744
+ const _hoisted_3$j = ["onClick"];
7711
7745
  const _hoisted_4$e = {
7712
7746
  key: 0,
7713
7747
  class: "lupa-page-number-separator"
@@ -7811,7 +7845,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
7811
7845
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
7812
7846
  ]),
7813
7847
  "data-cy": "lupa-page-number"
7814
- }, vue.toDisplayString(page), 11, _hoisted_3$k);
7848
+ }, vue.toDisplayString(page), 11, _hoisted_3$j);
7815
7849
  }), 128)),
7816
7850
  showLastPage.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
7817
7851
  showLastPageSeparator.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$e, "...")) : vue.createCommentVNode("", true),
@@ -7838,7 +7872,7 @@ const _hoisted_1$B = {
7838
7872
  "data-cy": "lupa-search-results-page-size"
7839
7873
  };
7840
7874
  const _hoisted_2$q = { id: "lupa-select" };
7841
- const _hoisted_3$j = { class: "lupa-select-label" };
7875
+ const _hoisted_3$i = { class: "lupa-select-label" };
7842
7876
  const _hoisted_4$d = ["aria-label"];
7843
7877
  const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
7844
7878
  __name: "SearchResultsPageSize",
@@ -7859,7 +7893,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
7859
7893
  return (_ctx, _cache) => {
7860
7894
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
7861
7895
  vue.createElementVNode("div", _hoisted_2$q, [
7862
- vue.createElementVNode("label", _hoisted_3$j, vue.toDisplayString(_ctx.label), 1),
7896
+ vue.createElementVNode("label", _hoisted_3$i, vue.toDisplayString(_ctx.label), 1),
7863
7897
  vue.createElementVNode("select", {
7864
7898
  class: "lupa-select-dropdown",
7865
7899
  "aria-label": _ctx.label,
@@ -7882,7 +7916,7 @@ const _hoisted_1$A = {
7882
7916
  class: "lupa-search-results-sort"
7883
7917
  };
7884
7918
  const _hoisted_2$p = { id: "lupa-select" };
7885
- const _hoisted_3$i = { class: "lupa-select-label" };
7919
+ const _hoisted_3$h = { class: "lupa-select-label" };
7886
7920
  const _hoisted_4$c = ["aria-label"];
7887
7921
  const _hoisted_5$8 = ["value"];
7888
7922
  const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
@@ -7935,7 +7969,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
7935
7969
  return (_ctx, _cache) => {
7936
7970
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
7937
7971
  vue.createElementVNode("div", _hoisted_2$p, [
7938
- vue.createElementVNode("label", _hoisted_3$i, vue.toDisplayString(_ctx.options.label), 1),
7972
+ vue.createElementVNode("label", _hoisted_3$h, vue.toDisplayString(_ctx.options.label), 1),
7939
7973
  vue.withDirectives(vue.createElementVNode("select", {
7940
7974
  class: "lupa-select-dropdown",
7941
7975
  "aria-label": _ctx.options.label,
@@ -7960,7 +7994,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
7960
7994
  });
7961
7995
  const _hoisted_1$z = { class: "lupa-toolbar-left" };
7962
7996
  const _hoisted_2$o = { key: 1 };
7963
- const _hoisted_3$h = { key: 3 };
7997
+ const _hoisted_3$g = { key: 3 };
7964
7998
  const _hoisted_4$b = { key: 5 };
7965
7999
  const _hoisted_5$7 = { class: "lupa-toolbar-right" };
7966
8000
  const _hoisted_6$5 = { key: 1 };
@@ -8071,7 +8105,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
8071
8105
  label: searchSummaryLabel.value,
8072
8106
  clearable: vue.unref(hasAnyFilter) && showFilterClear.value,
8073
8107
  onClear: handleClearAll
8074
- }, null, 8, ["label", "clearable"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$h)),
8108
+ }, null, 8, ["label", "clearable"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$g)),
8075
8109
  displayPageSelect.value ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
8076
8110
  key: 4,
8077
8111
  options: paginationOptions.value.pageSelect,
@@ -8101,7 +8135,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
8101
8135
  });
8102
8136
  const _hoisted_1$y = { class: "lupa-badge-title" };
8103
8137
  const _hoisted_2$n = ["src"];
8104
- const _hoisted_3$g = { key: 1 };
8138
+ const _hoisted_3$f = { key: 1 };
8105
8139
  const _hoisted_4$a = {
8106
8140
  key: 0,
8107
8141
  class: "lupa-badge-full-text"
@@ -8144,7 +8178,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
8144
8178
  key: 0,
8145
8179
  src: image.value
8146
8180
  }, null, 8, _hoisted_2$n)) : vue.createCommentVNode("", true),
8147
- hasTitleText.value && showTitle.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$g, vue.toDisplayString(_ctx.badge.titleText), 1)) : vue.createCommentVNode("", true)
8181
+ hasTitleText.value && showTitle.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$f, vue.toDisplayString(_ctx.badge.titleText), 1)) : vue.createCommentVNode("", true)
8148
8182
  ]),
8149
8183
  hasAdditionalText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$a, vue.toDisplayString(_ctx.badge.additionalText), 1)) : vue.createCommentVNode("", true)
8150
8184
  ], 6);
@@ -8371,7 +8405,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
8371
8405
  });
8372
8406
  const _hoisted_1$s = ["innerHTML"];
8373
8407
  const _hoisted_2$l = ["title"];
8374
- const _hoisted_3$f = {
8408
+ const _hoisted_3$e = {
8375
8409
  key: 0,
8376
8410
  class: "lupa-search-results-product-title-text"
8377
8411
  };
@@ -8415,7 +8449,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
8415
8449
  style: vue.normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
8416
8450
  title: title.value
8417
8451
  }, [
8418
- !_ctx.options.link ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$f, vue.toDisplayString(title.value), 1)) : vue.createCommentVNode("", true),
8452
+ !_ctx.options.link ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(title.value), 1)) : vue.createCommentVNode("", true),
8419
8453
  _ctx.options.link ? (vue.openBlock(), vue.createElementBlock("a", {
8420
8454
  key: 1,
8421
8455
  href: _ctx.link,
@@ -8461,7 +8495,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
8461
8495
  });
8462
8496
  const _hoisted_1$q = { id: "lupa-search-results-rating" };
8463
8497
  const _hoisted_2$k = { class: "lupa-ratings" };
8464
- const _hoisted_3$e = { class: "lupa-ratings-base" };
8498
+ const _hoisted_3$d = { class: "lupa-ratings-base" };
8465
8499
  const _hoisted_4$8 = ["innerHTML"];
8466
8500
  const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
8467
8501
  const _hoisted_6$4 = ["innerHTML"];
@@ -8500,7 +8534,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
8500
8534
  return (_ctx, _cache) => {
8501
8535
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
8502
8536
  vue.createElementVNode("div", _hoisted_2$k, [
8503
- vue.createElementVNode("div", _hoisted_3$e, [
8537
+ vue.createElementVNode("div", _hoisted_3$d, [
8504
8538
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(baseStars.value, (star, index) => {
8505
8539
  return vue.openBlock(), vue.createElementBlock("div", {
8506
8540
  key: index,
@@ -8588,7 +8622,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
8588
8622
  });
8589
8623
  const _hoisted_1$n = { class: "lupa-search-results-add-to-cart-wrapper" };
8590
8624
  const _hoisted_2$j = { class: "lupa-search-results-product-addtocart" };
8591
- const _hoisted_3$d = ["onClick", "disabled"];
8625
+ const _hoisted_3$c = ["onClick", "disabled"];
8592
8626
  const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8593
8627
  __name: "SearchResultsProductAddToCart",
8594
8628
  props: {
@@ -8623,7 +8657,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8623
8657
  class: vue.normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
8624
8658
  "data-cy": "lupa-add-to-cart",
8625
8659
  disabled: !inStockValue.value || loading.value
8626
- }, vue.toDisplayString(label.value), 11, _hoisted_3$d)
8660
+ }, vue.toDisplayString(label.value), 11, _hoisted_3$c)
8627
8661
  ])
8628
8662
  ]);
8629
8663
  };
@@ -8631,7 +8665,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8631
8665
  });
8632
8666
  const _hoisted_1$m = ["innerHTML"];
8633
8667
  const _hoisted_2$i = { key: 0 };
8634
- const _hoisted_3$c = { key: 1 };
8668
+ const _hoisted_3$b = { key: 1 };
8635
8669
  const _hoisted_4$7 = { class: "lupa-search-box-custom-label" };
8636
8670
  const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
8637
8671
  const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
@@ -8676,7 +8710,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
8676
8710
  key: 1,
8677
8711
  class: className.value
8678
8712
  }, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
8679
- !label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$i, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$c, [
8713
+ !label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$i, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$b, [
8680
8714
  vue.createElementVNode("div", _hoisted_4$7, vue.toDisplayString(label.value), 1),
8681
8715
  vue.createElementVNode("div", _hoisted_5$5, vue.toDisplayString(text.value), 1)
8682
8716
  ]))
@@ -8715,7 +8749,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
8715
8749
  });
8716
8750
  const _hoisted_1$k = { id: "lupa-search-results-rating" };
8717
8751
  const _hoisted_2$h = ["innerHTML"];
8718
- const _hoisted_3$b = { class: "lupa-ratings" };
8752
+ const _hoisted_3$a = { class: "lupa-ratings" };
8719
8753
  const _hoisted_4$6 = ["href"];
8720
8754
  const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
8721
8755
  __name: "SearchResultsProductSingleStarRating",
@@ -8750,7 +8784,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
8750
8784
  innerHTML: star.value,
8751
8785
  class: "lupa-rating lupa-rating-highlighted"
8752
8786
  }, null, 8, _hoisted_2$h),
8753
- vue.createElementVNode("div", _hoisted_3$b, vue.toDisplayString(rating.value), 1),
8787
+ vue.createElementVNode("div", _hoisted_3$a, vue.toDisplayString(rating.value), 1),
8754
8788
  vue.createElementVNode("a", {
8755
8789
  href: ratingLink.value,
8756
8790
  class: "lupa-total-ratings"
@@ -8848,7 +8882,7 @@ const _hoisted_2$g = {
8848
8882
  key: 0,
8849
8883
  class: "lupa-out-of-stock"
8850
8884
  };
8851
- const _hoisted_3$a = { class: "lupa-search-result-product-details-section" };
8885
+ const _hoisted_3$9 = { class: "lupa-search-result-product-details-section" };
8852
8886
  const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
8853
8887
  __name: "SearchResultsProductCard",
8854
8888
  props: {
@@ -9024,7 +9058,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
9024
9058
  }, null, 8, ["options"]),
9025
9059
  ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$g, vue.toDisplayString(labels.value.outOfStock), 1)) : vue.createCommentVNode("", true)
9026
9060
  ], 8, _hoisted_1$j),
9027
- vue.createElementVNode("div", _hoisted_3$a, [
9061
+ vue.createElementVNode("div", _hoisted_3$9, [
9028
9062
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(detailElements.value, (element) => {
9029
9063
  return vue.openBlock(), vue.createBlock(_sfc_main$l, {
9030
9064
  class: "lupa-search-results-product-element",
@@ -9067,7 +9101,7 @@ const _hoisted_1$i = {
9067
9101
  "data-cy": "lupa-search-results-similar-queries"
9068
9102
  };
9069
9103
  const _hoisted_2$f = { class: "lupa-similar-queries-label" };
9070
- const _hoisted_3$9 = {
9104
+ const _hoisted_3$8 = {
9071
9105
  class: "lupa-similar-query-label",
9072
9106
  "data-cy": "lupa-similar-query-label"
9073
9107
  };
@@ -9112,7 +9146,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
9112
9146
  vue.createElementVNode("div", _hoisted_2$f, vue.toDisplayString(_ctx.labels.similarQueries), 1),
9113
9147
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(similarQueries.value, (similarQuery, index) => {
9114
9148
  return vue.openBlock(), vue.createElementBlock("div", { key: index }, [
9115
- vue.createElementVNode("div", _hoisted_3$9, [
9149
+ vue.createElementVNode("div", _hoisted_3$8, [
9116
9150
  vue.createElementVNode("span", null, vue.toDisplayString(similarQueryLabel.value), 1),
9117
9151
  vue.createElementVNode("span", {
9118
9152
  id: "lupa-similar-query-text-component",
@@ -9301,7 +9335,7 @@ const _hoisted_1$e = {
9301
9335
  "data-cy": "lupa-search-results-similar-results"
9302
9336
  };
9303
9337
  const _hoisted_2$c = { class: "lupa-similar-results-label" };
9304
- const _hoisted_3$8 = {
9338
+ const _hoisted_3$7 = {
9305
9339
  class: "lupa-products",
9306
9340
  "data-cy": "lupa-products"
9307
9341
  };
@@ -9323,7 +9357,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
9323
9357
  return (_ctx, _cache) => {
9324
9358
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
9325
9359
  vue.createElementVNode("div", _hoisted_2$c, vue.toDisplayString(_ctx.labels.similarResultsLabel), 1),
9326
- vue.createElementVNode("div", _hoisted_3$8, [
9360
+ vue.createElementVNode("div", _hoisted_3$7, [
9327
9361
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(similarResults.value.items, (product, index) => {
9328
9362
  return vue.openBlock(), vue.createBlock(_sfc_main$k, {
9329
9363
  style: vue.normalizeStyle(_ctx.columnSize),
@@ -9342,7 +9376,7 @@ const _hoisted_2$b = {
9342
9376
  class: "lupa-products",
9343
9377
  "data-cy": "lupa-products"
9344
9378
  };
9345
- const _hoisted_3$7 = {
9379
+ const _hoisted_3$6 = {
9346
9380
  key: 0,
9347
9381
  class: "lupa-empty-results",
9348
9382
  "data-cy": "lupa-no-results-in-page"
@@ -9505,7 +9539,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
9505
9539
  }, null, 8, ["style", "product", "options"]);
9506
9540
  }), 128))
9507
9541
  ]),
9508
- vue.unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$7, [
9542
+ vue.unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
9509
9543
  vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
9510
9544
  _ctx.options.labels.backToFirstPage ? (vue.openBlock(), vue.createElementBlock("span", {
9511
9545
  key: 0,
@@ -9551,7 +9585,7 @@ const _hoisted_2$a = {
9551
9585
  key: 0,
9552
9586
  class: "lupa-category-back"
9553
9587
  };
9554
- const _hoisted_3$6 = ["href"];
9588
+ const _hoisted_3$5 = ["href"];
9555
9589
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9556
9590
  __name: "CategoryTopFilters",
9557
9591
  props: {
@@ -9590,7 +9624,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9590
9624
  "data-cy": "lupa-category-back",
9591
9625
  href: backUrlLink.value,
9592
9626
  onClick: handleNavigationBack
9593
- }, vue.toDisplayString(backTitle.value), 9, _hoisted_3$6)
9627
+ }, vue.toDisplayString(backTitle.value), 9, _hoisted_3$5)
9594
9628
  ])) : vue.createCommentVNode("", true),
9595
9629
  vue.createVNode(_sfc_main$C, {
9596
9630
  class: "lupa-toolbar-mobile",
@@ -9611,7 +9645,7 @@ const _hoisted_2$9 = {
9611
9645
  id: "lupa-search-results",
9612
9646
  class: "top-layout-wrapper"
9613
9647
  };
9614
- const _hoisted_3$5 = { class: "search-content" };
9648
+ const _hoisted_3$4 = { class: "search-content" };
9615
9649
  const _hoisted_4$3 = { id: "lupa-search-results" };
9616
9650
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
9617
9651
  __name: "SearchResults",
@@ -9850,7 +9884,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
9850
9884
  ref_key: "searchResultsFilters",
9851
9885
  ref: searchResultsFilters
9852
9886
  }, null, 8, ["options"])) : vue.createCommentVNode("", true),
9853
- vue.createElementVNode("div", _hoisted_3$5, [
9887
+ vue.createElementVNode("div", _hoisted_3$4, [
9854
9888
  vue.createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
9855
9889
  vue.createVNode(_sfc_main$X, {
9856
9890
  options: _ctx.options,
@@ -16342,12 +16376,12 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
16342
16376
  });
16343
16377
  const _hoisted_1$7 = { class: "lupa-chat-spinner" };
16344
16378
  const _hoisted_2$5 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
16345
- const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
16379
+ const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
16346
16380
  const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
16347
16381
  const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
16348
16382
  const _hoisted_6$1 = [
16349
16383
  _hoisted_2$5,
16350
- _hoisted_3$4,
16384
+ _hoisted_3$3,
16351
16385
  _hoisted_4$2,
16352
16386
  _hoisted_5$2
16353
16387
  ];
@@ -16371,7 +16405,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
16371
16405
  });
16372
16406
  const _hoisted_1$6 = { class: "lupa-chat-input-container" };
16373
16407
  const _hoisted_2$4 = { id: "lupa-search-box-input" };
16374
- const _hoisted_3$3 = {
16408
+ const _hoisted_3$2 = {
16375
16409
  key: 0,
16376
16410
  class: "lupa-chat-form-submit"
16377
16411
  };
@@ -16407,7 +16441,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
16407
16441
  [vue.vModelText, inputValue.value]
16408
16442
  ])
16409
16443
  ]),
16410
- !_ctx.disabled ? (vue.openBlock(), vue.createElementBlock("button", _hoisted_3$3, "Ask LupaChat")) : (vue.openBlock(), vue.createBlock(_sfc_main$7, {
16444
+ !_ctx.disabled ? (vue.openBlock(), vue.createElementBlock("button", _hoisted_3$2, "Ask LupaChat")) : (vue.openBlock(), vue.createBlock(_sfc_main$7, {
16411
16445
  key: 1,
16412
16446
  small: true
16413
16447
  }))
@@ -16574,7 +16608,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
16574
16608
  });
16575
16609
  const _hoisted_1$4 = { class: "lupa-chat-content-entry-phrase" };
16576
16610
  const _hoisted_2$3 = { class: "lupa-chat-phrase-title" };
16577
- const _hoisted_3$2 = {
16611
+ const _hoisted_3$1 = {
16578
16612
  key: 0,
16579
16613
  class: "alert"
16580
16614
  };
@@ -16675,7 +16709,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
16675
16709
  vue.createElementVNode("div", _hoisted_2$3, [
16676
16710
  vue.createElementVNode("h3", null, vue.toDisplayString(displayPhrase.value), 1),
16677
16711
  vue.createElementVNode("sub", null, vue.toDisplayString(usedAlternativePhrases.value.join(", ")), 1),
16678
- usedPartialResults.value ? (vue.openBlock(), vue.createElementBlock("sub", _hoisted_3$2, "Including partial matches - which might not be what you are looking for")) : vue.createCommentVNode("", true)
16712
+ usedPartialResults.value ? (vue.openBlock(), vue.createElementBlock("sub", _hoisted_3$1, "Including partial matches - which might not be what you are looking for")) : vue.createCommentVNode("", true)
16679
16713
  ]),
16680
16714
  vue.createElementVNode("div", null, [
16681
16715
  vue.createVNode(_sfc_main$5, {
@@ -16694,7 +16728,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
16694
16728
  });
16695
16729
  const _hoisted_1$3 = { class: "lupa-chat-best-matches lupa-chat-content-entry" };
16696
16730
  const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("h3", null, "Best matches", -1);
16697
- const _hoisted_3$1 = { key: 0 };
16731
+ const MAX_SOURCES_FOR_BEST_ITEM_MATCHING = 250;
16698
16732
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
16699
16733
  __name: "ChatContentEntry",
16700
16734
  props: {
@@ -16724,20 +16758,18 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
16724
16758
  return (_a = props.options.displayOptions.titleKey) != null ? _a : "title";
16725
16759
  });
16726
16760
  const loadFinalRecommendations = () => __async(this, null, function* () {
16727
- var _a;
16761
+ var _a, _b;
16728
16762
  try {
16729
- const productResultStrings = loadedResults.value.map(
16730
- (result) => {
16731
- var _a2, _b;
16732
- return (_b = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b : "";
16733
- }
16734
- );
16763
+ const productResultStrings = (_a = loadedResults.value.map((result) => {
16764
+ var _a2, _b2;
16765
+ return (_b2 = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b2 : "";
16766
+ })) == null ? void 0 : _a.slice(0, MAX_SOURCES_FOR_BEST_ITEM_MATCHING);
16735
16767
  const { products } = yield ChatService.suggestBestProductMatches(
16736
16768
  props.options.sdkOptions,
16737
16769
  {
16738
16770
  initialQuery: props.entry.userInput,
16739
16771
  productStrings: productResultStrings,
16740
- messageHistory: (_a = props.history) != null ? _a : [],
16772
+ messageHistory: (_b = props.history) != null ? _b : [],
16741
16773
  queryKey: props.options.displayOptions.queryKey
16742
16774
  },
16743
16775
  props.options.chatSettings
@@ -16750,13 +16782,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
16750
16782
  });
16751
16783
  const bestMatchProducts = vue.computed(() => {
16752
16784
  return bestMatches.value.map((productName) => {
16753
- return loadedResults.value.find((r) => r[titleKey.value] === productName);
16785
+ return findClosestStringValue(productName, loadedResults.value, titleKey.value);
16754
16786
  }).filter(Boolean);
16755
16787
  });
16756
- const explanation = vue.computed(() => {
16757
- var _a, _b;
16758
- 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] : "";
16759
- });
16760
16788
  return (_ctx, _cache) => {
16761
16789
  return vue.openBlock(), vue.createElementBlock("div", null, [
16762
16790
  vue.createElementVNode("ul", null, [
@@ -16776,13 +16804,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
16776
16804
  ]),
16777
16805
  vue.createElementVNode("section", _hoisted_1$3, [
16778
16806
  _hoisted_2$2,
16779
- explanation.value ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$1, vue.toDisplayString(explanation.value), 1)) : vue.createCommentVNode("", true),
16780
16807
  loading.value ? (vue.openBlock(), vue.createBlock(_sfc_main$7, {
16781
- key: 1,
16808
+ key: 0,
16782
16809
  message: "Selecting the best matches for you. This might take a few seconds."
16783
16810
  })) : vue.createCommentVNode("", true),
16784
16811
  bestMatches.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
16785
- key: 2,
16812
+ key: 1,
16786
16813
  "search-results": bestMatchProducts.value,
16787
16814
  options: _ctx.options.displayOptions
16788
16815
  }, null, 8, ["search-results", "options"])) : vue.createCommentVNode("", true)