@getlupa/client 1.14.6 → 1.14.9

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.
@@ -7651,12 +7651,11 @@ var SearchBoxPanelType = /* @__PURE__ */ ((SearchBoxPanelType2) => {
7651
7651
  return SearchBoxPanelType2;
7652
7652
  })(SearchBoxPanelType || {});
7653
7653
  var BadgeType = /* @__PURE__ */ ((BadgeType2) => {
7654
- BadgeType2["DISCOUNTPERCENTAGE"] = "discountPercentage";
7655
- BadgeType2["DISCOUNTAMOUNT"] = "discountAmount";
7656
7654
  BadgeType2["NEWITEM"] = "newItem";
7657
7655
  BadgeType2["TEXT"] = "text";
7658
7656
  BadgeType2["IMAGE"] = "image";
7659
7657
  BadgeType2["CUSTOM_HTML"] = "customHtml";
7658
+ BadgeType2["DISCOUNT"] = "discount";
7660
7659
  return BadgeType2;
7661
7660
  })(BadgeType || {});
7662
7661
  const retrieveHistory = () => {
@@ -8596,11 +8595,11 @@ const useSearchBoxStore = defineStore("searchBox", () => {
8596
8595
  resetHighlightIndex
8597
8596
  };
8598
8597
  });
8599
- const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
8600
- const _hoisted_2$S = { class: "lupa-input-clear" };
8601
- const _hoisted_3$B = { id: "lupa-search-box-input" };
8602
- const _hoisted_4$s = ["value"];
8603
- const _hoisted_5$i = ["aria-label", "placeholder"];
8598
+ const _hoisted_1$1g = { id: "lupa-search-box-input-container" };
8599
+ const _hoisted_2$U = { class: "lupa-input-clear" };
8600
+ const _hoisted_3$D = { id: "lupa-search-box-input" };
8601
+ const _hoisted_4$t = ["value"];
8602
+ const _hoisted_5$j = ["aria-label", "placeholder"];
8604
8603
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
8605
8604
  const _hoisted_7$7 = [
8606
8605
  _hoisted_6$9
@@ -8609,7 +8608,7 @@ const _hoisted_8$3 = {
8609
8608
  key: 0,
8610
8609
  class: "lupa-close-label"
8611
8610
  };
8612
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8611
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
8613
8612
  __name: "SearchBoxInput",
8614
8613
  props: {
8615
8614
  options: {},
@@ -8693,20 +8692,20 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8693
8692
  };
8694
8693
  __expose({ focus });
8695
8694
  return (_ctx, _cache) => {
8696
- return openBlock(), createElementBlock("div", _hoisted_1$1e, [
8697
- createBaseVNode("div", _hoisted_2$S, [
8695
+ return openBlock(), createElementBlock("div", _hoisted_1$1g, [
8696
+ createBaseVNode("div", _hoisted_2$U, [
8698
8697
  createBaseVNode("div", {
8699
8698
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
8700
8699
  onClick: clear2
8701
8700
  }, null, 2)
8702
8701
  ]),
8703
- createBaseVNode("div", _hoisted_3$B, [
8702
+ createBaseVNode("div", _hoisted_3$D, [
8704
8703
  createBaseVNode("input", {
8705
8704
  class: "lupa-hint",
8706
8705
  "aria-hidden": "true",
8707
8706
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
8708
8707
  disabled: ""
8709
- }, null, 8, _hoisted_4$s),
8708
+ }, null, 8, _hoisted_4$t),
8710
8709
  withDirectives(createBaseVNode("input", mergeProps({
8711
8710
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
8712
8711
  }, inputAttributes.value, {
@@ -8720,7 +8719,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8720
8719
  placeholder: labels.value.placeholder,
8721
8720
  onInput: handleInput,
8722
8721
  onFocus: handleFocus
8723
- }), null, 16, _hoisted_5$i), [
8722
+ }), null, 16, _hoisted_5$j), [
8724
8723
  [vModelText, inputValue.value]
8725
8724
  ]),
8726
8725
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -8739,7 +8738,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8739
8738
  };
8740
8739
  }
8741
8740
  });
8742
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8741
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
8743
8742
  __name: "SearchBoxMoreResults",
8744
8743
  props: {
8745
8744
  labels: {},
@@ -8771,9 +8770,9 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8771
8770
  };
8772
8771
  }
8773
8772
  });
8774
- const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
8775
- const _hoisted_2$R = { class: "lupa-search-box-history-item-content" };
8776
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
8773
+ const _hoisted_1$1f = { class: "lupa-search-box-history-item" };
8774
+ const _hoisted_2$T = { class: "lupa-search-box-history-item-content" };
8775
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
8777
8776
  __name: "SearchBoxHistoryItem",
8778
8777
  props: {
8779
8778
  item: {},
@@ -8789,8 +8788,8 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
8789
8788
  emit2("click", { query: props.item });
8790
8789
  };
8791
8790
  return (_ctx, _cache) => {
8792
- return openBlock(), createElementBlock("div", _hoisted_1$1d, [
8793
- createBaseVNode("div", _hoisted_2$R, [
8791
+ return openBlock(), createElementBlock("div", _hoisted_1$1f, [
8792
+ createBaseVNode("div", _hoisted_2$T, [
8794
8793
  createBaseVNode("div", {
8795
8794
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
8796
8795
  onClick: click2
@@ -8804,11 +8803,11 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
8804
8803
  };
8805
8804
  }
8806
8805
  });
8807
- const _hoisted_1$1c = {
8806
+ const _hoisted_1$1e = {
8808
8807
  key: 0,
8809
8808
  class: "lupa-search-box-history-panel"
8810
8809
  };
8811
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
8810
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
8812
8811
  __name: "SearchBoxHistoryPanel",
8813
8812
  props: {
8814
8813
  options: {}
@@ -8849,9 +8848,9 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
8849
8848
  }
8850
8849
  };
8851
8850
  return (_ctx, _cache) => {
8852
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1c, [
8851
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1e, [
8853
8852
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
8854
- return openBlock(), createBlock(_sfc_main$1n, {
8853
+ return openBlock(), createBlock(_sfc_main$1q, {
8855
8854
  key: item,
8856
8855
  item,
8857
8856
  highlighted: index === highlightIndex.value,
@@ -8867,15 +8866,15 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
8867
8866
  };
8868
8867
  }
8869
8868
  });
8870
- const _hoisted_1$1b = { class: "lupa-search-box-no-results" };
8871
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
8869
+ const _hoisted_1$1d = { class: "lupa-search-box-no-results" };
8870
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
8872
8871
  __name: "SearchBoxNoResults",
8873
8872
  props: {
8874
8873
  labels: {}
8875
8874
  },
8876
8875
  setup(__props) {
8877
8876
  return (_ctx, _cache) => {
8878
- return openBlock(), createElementBlock("p", _hoisted_1$1b, toDisplayString(_ctx.labels.noResults), 1);
8877
+ return openBlock(), createElementBlock("p", _hoisted_1$1d, toDisplayString(_ctx.labels.noResults), 1);
8879
8878
  };
8880
8879
  }
8881
8880
  });
@@ -8907,26 +8906,26 @@ const generateGridTemplate = (elements) => {
8907
8906
  }
8908
8907
  return gridTemplate.join(" ");
8909
8908
  };
8910
- const _hoisted_1$1a = ["innerHTML"];
8911
- const _hoisted_2$Q = {
8909
+ const _hoisted_1$1c = ["innerHTML"];
8910
+ const _hoisted_2$S = {
8912
8911
  key: 1,
8913
8912
  "data-cy": "lupa-suggestion-value",
8914
8913
  class: "lupa-suggestion-value"
8915
8914
  };
8916
- const _hoisted_3$A = {
8915
+ const _hoisted_3$C = {
8917
8916
  key: 2,
8918
8917
  class: "lupa-suggestion-facet",
8919
8918
  "data-cy": "lupa-suggestion-facet"
8920
8919
  };
8921
- const _hoisted_4$r = {
8920
+ const _hoisted_4$s = {
8922
8921
  class: "lupa-suggestion-facet-label",
8923
8922
  "data-cy": "lupa-suggestion-facet-label"
8924
8923
  };
8925
- const _hoisted_5$h = {
8924
+ const _hoisted_5$i = {
8926
8925
  class: "lupa-suggestion-facet-value",
8927
8926
  "data-cy": "lupa-suggestion-facet-value"
8928
8927
  };
8929
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
8928
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
8930
8929
  __name: "SearchBoxSuggestion",
8931
8930
  props: {
8932
8931
  suggestion: {},
@@ -8962,20 +8961,20 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
8962
8961
  class: "lupa-suggestion-value",
8963
8962
  "data-cy": "lupa-suggestion-value",
8964
8963
  innerHTML: _ctx.suggestion.displayHighlight
8965
- }, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(_ctx.suggestion.display), 1)),
8966
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
8967
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
8968
- createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
8964
+ }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(_ctx.suggestion.display), 1)),
8965
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
8966
+ createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
8967
+ createBaseVNode("span", _hoisted_5$i, toDisplayString(_ctx.suggestion.facet.title), 1)
8969
8968
  ])) : createCommentVNode("", true)
8970
8969
  ]);
8971
8970
  };
8972
8971
  }
8973
8972
  });
8974
- const _hoisted_1$19 = {
8973
+ const _hoisted_1$1b = {
8975
8974
  id: "lupa-search-box-suggestions",
8976
8975
  "data-cy": "lupa-search-box-suggestions"
8977
8976
  };
8978
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
8977
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
8979
8978
  __name: "SearchBoxSuggestions",
8980
8979
  props: {
8981
8980
  items: {},
@@ -9035,9 +9034,9 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
9035
9034
  });
9036
9035
  });
9037
9036
  return (_ctx, _cache) => {
9038
- return openBlock(), createElementBlock("div", _hoisted_1$19, [
9037
+ return openBlock(), createElementBlock("div", _hoisted_1$1b, [
9039
9038
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
9040
- return openBlock(), createBlock(_sfc_main$1k, {
9039
+ return openBlock(), createBlock(_sfc_main$1n, {
9041
9040
  key: getSuggestionKey(item),
9042
9041
  class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
9043
9042
  suggestion: item,
@@ -9065,7 +9064,7 @@ const debounce$1 = (func, timeout) => {
9065
9064
  }, timeout);
9066
9065
  };
9067
9066
  };
9068
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
9067
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
9069
9068
  __name: "SearchBoxSuggestionsWrapper",
9070
9069
  props: {
9071
9070
  panel: {},
@@ -9107,7 +9106,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
9107
9106
  const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
9108
9107
  watch(() => props.panel.limit, getSuggestionsDebounced);
9109
9108
  return (_ctx, _cache) => {
9110
- return openBlock(), createBlock(_sfc_main$1j, {
9109
+ return openBlock(), createBlock(_sfc_main$1m, {
9111
9110
  items: searchResult.value,
9112
9111
  highlight: _ctx.panel.highlight,
9113
9112
  queryKey: _ctx.panel.queryKey,
@@ -18106,9 +18105,13 @@ const renderHtmlTemplate = (template, document2 = {}) => {
18106
18105
  const getFieldValue = (doc2, field = "") => {
18107
18106
  var _a;
18108
18107
  if (typeof field === "number") {
18109
- return field;
18108
+ return +field;
18110
18109
  }
18111
- return (_a = field == null ? void 0 : field.split(".")) == null ? void 0 : _a.reduce((obj, key) => obj ? obj[key] : void 0, doc2);
18110
+ const value = (_a = field == null ? void 0 : field.split(".")) == null ? void 0 : _a.reduce((obj, key) => obj ? obj[key] : void 0, doc2);
18111
+ if (+value) {
18112
+ return +value;
18113
+ }
18114
+ return value;
18112
18115
  };
18113
18116
  const processDisplayCondition = (displayCondition, doc2 = {}) => {
18114
18117
  const { condition, fields } = displayCondition;
@@ -18181,9 +18184,9 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
18181
18184
  targetImage.src = placeholder;
18182
18185
  }
18183
18186
  };
18184
- const _hoisted_1$18 = ["src"];
18185
- const _hoisted_2$P = ["src"];
18186
- const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18187
+ const _hoisted_1$1a = ["src"];
18188
+ const _hoisted_2$R = ["src"];
18189
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
18187
18190
  __name: "ProductImage",
18188
18191
  props: {
18189
18192
  item: {},
@@ -18325,7 +18328,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18325
18328
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
18326
18329
  onError: replaceWithPlaceholder,
18327
18330
  key: finalUrl.value
18328
- }), null, 16, _hoisted_1$18))
18331
+ }), null, 16, _hoisted_1$1a))
18329
18332
  ]),
18330
18333
  _: 1
18331
18334
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -18333,12 +18336,12 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18333
18336
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
18334
18337
  style: styleOverride.value,
18335
18338
  src: finalMainImageUrl.value
18336
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$P))
18339
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$R))
18337
18340
  ], 38);
18338
18341
  };
18339
18342
  }
18340
18343
  });
18341
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18344
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
18342
18345
  __name: "SearchBoxProductImage",
18343
18346
  props: {
18344
18347
  item: {},
@@ -18346,7 +18349,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18346
18349
  },
18347
18350
  setup(__props) {
18348
18351
  return (_ctx, _cache) => {
18349
- return openBlock(), createBlock(_sfc_main$1h, {
18352
+ return openBlock(), createBlock(_sfc_main$1k, {
18350
18353
  item: _ctx.item,
18351
18354
  options: _ctx.options,
18352
18355
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -18355,12 +18358,12 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18355
18358
  };
18356
18359
  }
18357
18360
  });
18358
- const _hoisted_1$17 = ["innerHTML"];
18359
- const _hoisted_2$O = {
18361
+ const _hoisted_1$19 = ["innerHTML"];
18362
+ const _hoisted_2$Q = {
18360
18363
  key: 1,
18361
18364
  class: "lupa-search-box-product-title"
18362
18365
  };
18363
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18366
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
18364
18367
  __name: "SearchBoxProductTitle",
18365
18368
  props: {
18366
18369
  item: {},
@@ -18383,18 +18386,18 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18383
18386
  key: 0,
18384
18387
  class: "lupa-search-box-product-title",
18385
18388
  innerHTML: sanitizedTitle.value
18386
- }, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$O, [
18389
+ }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, [
18387
18390
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
18388
18391
  ]));
18389
18392
  };
18390
18393
  }
18391
18394
  });
18392
- const _hoisted_1$16 = ["innerHTML"];
18393
- const _hoisted_2$N = {
18395
+ const _hoisted_1$18 = ["innerHTML"];
18396
+ const _hoisted_2$P = {
18394
18397
  key: 1,
18395
18398
  class: "lupa-search-box-product-description"
18396
18399
  };
18397
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18400
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
18398
18401
  __name: "SearchBoxProductDescription",
18399
18402
  props: {
18400
18403
  item: {},
@@ -18417,12 +18420,12 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18417
18420
  key: 0,
18418
18421
  class: "lupa-search-box-product-description",
18419
18422
  innerHTML: sanitizedDescription.value
18420
- }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(description.value), 1));
18423
+ }, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(description.value), 1));
18421
18424
  };
18422
18425
  }
18423
18426
  });
18424
- const _hoisted_1$15 = { class: "lupa-search-box-product-price" };
18425
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18427
+ const _hoisted_1$17 = { class: "lupa-search-box-product-price" };
18428
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
18426
18429
  __name: "SearchBoxProductPrice",
18427
18430
  props: {
18428
18431
  item: {},
@@ -18440,13 +18443,13 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18440
18443
  );
18441
18444
  });
18442
18445
  return (_ctx, _cache) => {
18443
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
18446
+ return openBlock(), createElementBlock("div", _hoisted_1$17, [
18444
18447
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
18445
18448
  ]);
18446
18449
  };
18447
18450
  }
18448
18451
  });
18449
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
18452
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
18450
18453
  __name: "SearchBoxProductRegularPrice",
18451
18454
  props: {
18452
18455
  item: {},
@@ -18473,12 +18476,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
18473
18476
  };
18474
18477
  }
18475
18478
  });
18476
- const _hoisted_1$14 = ["innerHTML"];
18477
- const _hoisted_2$M = { key: 0 };
18478
- const _hoisted_3$z = { key: 1 };
18479
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
18480
- const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
18481
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
18479
+ const _hoisted_1$16 = ["innerHTML"];
18480
+ const _hoisted_2$O = { key: 0 };
18481
+ const _hoisted_3$B = { key: 1 };
18482
+ const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
18483
+ const _hoisted_5$h = { class: "lupa-search-box-custom-text" };
18484
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
18482
18485
  __name: "SearchBoxProductCustom",
18483
18486
  props: {
18484
18487
  item: {},
@@ -18504,20 +18507,20 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
18504
18507
  key: 0,
18505
18508
  class: [className.value, "lupa-search-box-product-custom"],
18506
18509
  innerHTML: text.value
18507
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$14)) : (openBlock(), createElementBlock("div", mergeProps({
18510
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$16)) : (openBlock(), createElementBlock("div", mergeProps({
18508
18511
  key: 1,
18509
18512
  class: [className.value, "lupa-search-box-product-custom"]
18510
18513
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
18511
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
18512
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
18513
- createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
18514
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
18515
+ createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
18516
+ createBaseVNode("div", _hoisted_5$h, toDisplayString(text.value), 1)
18514
18517
  ]))
18515
18518
  ], 16));
18516
18519
  };
18517
18520
  }
18518
18521
  });
18519
- const _hoisted_1$13 = ["innerHTML"];
18520
- const _sfc_main$1a = /* @__PURE__ */ defineComponent({
18522
+ const _hoisted_1$15 = ["innerHTML"];
18523
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
18521
18524
  __name: "SearchBoxProductCustomHtml",
18522
18525
  props: {
18523
18526
  item: {},
@@ -18542,7 +18545,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
18542
18545
  return openBlock(), createElementBlock("div", mergeProps({
18543
18546
  class: className.value,
18544
18547
  innerHTML: text.value
18545
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13);
18548
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$15);
18546
18549
  };
18547
18550
  }
18548
18551
  });
@@ -18776,10 +18779,10 @@ const useSearchResultStore = defineStore("searchResult", () => {
18776
18779
  setRelatedCategoryChildren
18777
18780
  };
18778
18781
  });
18779
- const _hoisted_1$12 = { class: "lupa-search-box-add-to-cart-wrapper" };
18780
- const _hoisted_2$L = { class: "lupa-search-box-product-addtocart" };
18781
- const _hoisted_3$y = ["onClick", "disabled"];
18782
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
18782
+ const _hoisted_1$14 = { class: "lupa-search-box-add-to-cart-wrapper" };
18783
+ const _hoisted_2$N = { class: "lupa-search-box-product-addtocart" };
18784
+ const _hoisted_3$A = ["onClick", "disabled"];
18785
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
18783
18786
  __name: "SearchBoxProductAddToCart",
18784
18787
  props: {
18785
18788
  item: {},
@@ -18812,37 +18815,37 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
18812
18815
  loading.value = false;
18813
18816
  });
18814
18817
  return (_ctx, _cache) => {
18815
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
18816
- createBaseVNode("div", _hoisted_2$L, [
18818
+ return openBlock(), createElementBlock("div", _hoisted_1$14, [
18819
+ createBaseVNode("div", _hoisted_2$N, [
18817
18820
  createBaseVNode("button", {
18818
18821
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
18819
18822
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
18820
18823
  "data-cy": "lupa-add-to-cart",
18821
18824
  type: "button",
18822
18825
  disabled: !inStockValue.value || loading.value
18823
- }, toDisplayString(label.value), 11, _hoisted_3$y)
18826
+ }, toDisplayString(label.value), 11, _hoisted_3$A)
18824
18827
  ])
18825
18828
  ]);
18826
18829
  };
18827
18830
  }
18828
18831
  });
18829
- const _hoisted_1$11 = {
18832
+ const _hoisted_1$13 = {
18830
18833
  key: 1,
18831
18834
  class: "lupa-search-box-element-badge-wrapper"
18832
18835
  };
18833
18836
  const __default__$4 = {
18834
18837
  components: {
18835
- SearchBoxProductImage: _sfc_main$1g,
18836
- SearchBoxProductTitle: _sfc_main$1f,
18837
- SearchBoxProductDescription: _sfc_main$1e,
18838
- SearchBoxProductPrice: _sfc_main$1d,
18839
- SearchBoxProductRegularPrice: _sfc_main$1c,
18840
- SearchBoxProductCustom: _sfc_main$1b,
18841
- SearchBoxProductCustomHtml: _sfc_main$1a,
18842
- SearchBoxProductAddToCart: _sfc_main$19
18838
+ SearchBoxProductImage: _sfc_main$1j,
18839
+ SearchBoxProductTitle: _sfc_main$1i,
18840
+ SearchBoxProductDescription: _sfc_main$1h,
18841
+ SearchBoxProductPrice: _sfc_main$1g,
18842
+ SearchBoxProductRegularPrice: _sfc_main$1f,
18843
+ SearchBoxProductCustom: _sfc_main$1e,
18844
+ SearchBoxProductCustomHtml: _sfc_main$1d,
18845
+ SearchBoxProductAddToCart: _sfc_main$1c
18843
18846
  }
18844
18847
  };
18845
- const _sfc_main$18 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
18848
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
18846
18849
  __name: "SearchBoxProductElement",
18847
18850
  props: {
18848
18851
  item: {},
@@ -18905,7 +18908,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
18905
18908
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
18906
18909
  inStock: _ctx.isInStock
18907
18910
  }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
18908
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$11, [
18911
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$13, [
18909
18912
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
18910
18913
  key: 0,
18911
18914
  item: enhancedItem.value,
@@ -18919,14 +18922,14 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
18919
18922
  };
18920
18923
  }
18921
18924
  }));
18922
- const _hoisted_1$10 = { class: "lupa-badge-title" };
18923
- const _hoisted_2$K = ["src"];
18924
- const _hoisted_3$x = { key: 1 };
18925
- const _hoisted_4$p = {
18925
+ const _hoisted_1$12 = { class: "lupa-badge-title" };
18926
+ const _hoisted_2$M = ["src"];
18927
+ const _hoisted_3$z = { key: 1 };
18928
+ const _hoisted_4$q = {
18926
18929
  key: 0,
18927
18930
  class: "lupa-badge-full-text"
18928
18931
  };
18929
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
18932
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
18930
18933
  __name: "SearchResultGeneratedBadge",
18931
18934
  props: {
18932
18935
  options: {},
@@ -18959,20 +18962,20 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
18959
18962
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
18960
18963
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
18961
18964
  }, [
18962
- createBaseVNode("span", _hoisted_1$10, [
18965
+ createBaseVNode("span", _hoisted_1$12, [
18963
18966
  image.value ? (openBlock(), createElementBlock("img", {
18964
18967
  key: 0,
18965
18968
  src: image.value
18966
- }, null, 8, _hoisted_2$K)) : createCommentVNode("", true),
18967
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
18969
+ }, null, 8, _hoisted_2$M)) : createCommentVNode("", true),
18970
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
18968
18971
  ]),
18969
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18972
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18970
18973
  ], 6);
18971
18974
  };
18972
18975
  }
18973
18976
  });
18974
- const _hoisted_1$$ = { class: "lupa-generated-badges" };
18975
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
18977
+ const _hoisted_1$11 = { class: "lupa-generated-badges" };
18978
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
18976
18979
  __name: "SearchResultGeneratedBadges",
18977
18980
  props: {
18978
18981
  options: {}
@@ -18998,9 +19001,9 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
18998
19001
  })).filter((b) => Boolean(b.id));
18999
19002
  });
19000
19003
  return (_ctx, _cache) => {
19001
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
19004
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
19002
19005
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
19003
- return openBlock(), createBlock(_sfc_main$17, {
19006
+ return openBlock(), createBlock(_sfc_main$1a, {
19004
19007
  key: badge.id,
19005
19008
  badge,
19006
19009
  options: _ctx.options
@@ -19010,8 +19013,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
19010
19013
  };
19011
19014
  }
19012
19015
  });
19013
- const _hoisted_1$_ = ["innerHTML"];
19014
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
19016
+ const _hoisted_1$10 = ["innerHTML"];
19017
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
19015
19018
  __name: "CustomBadge",
19016
19019
  props: {
19017
19020
  badge: {}
@@ -19032,12 +19035,12 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
19032
19035
  return openBlock(), createElementBlock("div", {
19033
19036
  class: normalizeClass(className.value),
19034
19037
  innerHTML: text.value
19035
- }, null, 10, _hoisted_1$_);
19038
+ }, null, 10, _hoisted_1$10);
19036
19039
  };
19037
19040
  }
19038
19041
  });
19039
- const _hoisted_1$Z = { class: "lupa-text-badges" };
19040
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
19042
+ const _hoisted_1$$ = { class: "lupa-text-badges" };
19043
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
19041
19044
  __name: "TextBadge",
19042
19045
  props: {
19043
19046
  badge: {}
@@ -19045,14 +19048,13 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
19045
19048
  setup(__props) {
19046
19049
  const props = __props;
19047
19050
  const badges = computed(() => {
19048
- var _a, _b;
19049
- return (_b = (_a = props.badge) == null ? void 0 : _a.value) != null ? _b : [];
19051
+ return Array.isArray(props.badge.value) ? props.badge.value : [props.badge.value];
19050
19052
  });
19051
19053
  const displayBadges = computed(() => {
19052
19054
  return badges.value.slice(0, props.badge.maxItems);
19053
19055
  });
19054
19056
  return (_ctx, _cache) => {
19055
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
19057
+ return openBlock(), createElementBlock("div", _hoisted_1$$, [
19056
19058
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
19057
19059
  return openBlock(), createElementBlock("div", {
19058
19060
  class: "lupa-badge lupa-text-badge",
@@ -19063,9 +19065,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
19063
19065
  };
19064
19066
  }
19065
19067
  });
19066
- const _hoisted_1$Y = { class: "lupa-image-badges" };
19067
- const _hoisted_2$J = ["src"];
19068
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19068
+ const _hoisted_1$_ = { class: "lupa-image-badges" };
19069
+ const _hoisted_2$L = ["src"];
19070
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
19069
19071
  __name: "ImageBadge",
19070
19072
  props: {
19071
19073
  badge: {}
@@ -19073,7 +19075,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19073
19075
  setup(__props) {
19074
19076
  const props = __props;
19075
19077
  const badges = computed(() => {
19076
- return props.badge.value;
19078
+ return Array.isArray(props.badge.value) ? props.badge.value : [props.badge.value];
19077
19079
  });
19078
19080
  const displayBadges = computed(() => {
19079
19081
  return badges.value.slice(0, props.badge.maxItems);
@@ -19085,7 +19087,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19085
19087
  return `${props.badge.rootImageUrl}${src}`;
19086
19088
  };
19087
19089
  return (_ctx, _cache) => {
19088
- return openBlock(), createElementBlock("div", _hoisted_1$Y, [
19090
+ return openBlock(), createElementBlock("div", _hoisted_1$_, [
19089
19091
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
19090
19092
  return openBlock(), createElementBlock("div", {
19091
19093
  class: "lupa-badge lupa-image-badge",
@@ -19093,22 +19095,81 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19093
19095
  }, [
19094
19096
  createBaseVNode("img", {
19095
19097
  src: getImageUrl(item)
19096
- }, null, 8, _hoisted_2$J)
19098
+ }, null, 8, _hoisted_2$L)
19097
19099
  ]);
19098
19100
  }), 128))
19099
19101
  ]);
19100
19102
  };
19101
19103
  }
19102
19104
  });
19103
- const _hoisted_1$X = { id: "lupa-search-results-badges" };
19105
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
19106
+ __name: "DiscountBadge",
19107
+ props: {
19108
+ badge: {}
19109
+ },
19110
+ setup(__props) {
19111
+ const props = __props;
19112
+ const optionStore = useOptionsStore();
19113
+ const { searchResultOptions } = storeToRefs(optionStore);
19114
+ const className = computed(() => {
19115
+ var _a;
19116
+ return (_a = props.badge.className) != null ? _a : "";
19117
+ });
19118
+ const discountValue = computed(() => {
19119
+ var _a, _b, _c, _d;
19120
+ if (props.badge.discountKey) {
19121
+ return (_b = (_a = props.badge.product) == null ? void 0 : _a[props.badge.discountKey]) != null ? _b : 0;
19122
+ }
19123
+ if (props.badge.regularPriceKey && props.badge.finalPriceKey) {
19124
+ const regularPrice = +((_c = props.badge.product) == null ? void 0 : _c[props.badge.regularPriceKey]);
19125
+ const finalPrice = +((_d = props.badge.product) == null ? void 0 : _d[props.badge.finalPriceKey]);
19126
+ if (!regularPrice || !finalPrice) {
19127
+ return 0;
19128
+ }
19129
+ if (props.badge.discountType === "percentage") {
19130
+ return (regularPrice - finalPrice) / regularPrice * 100;
19131
+ } else {
19132
+ return regularPrice - finalPrice;
19133
+ }
19134
+ }
19135
+ return 0;
19136
+ });
19137
+ const discountStringValue = computed(() => {
19138
+ var _a, _b, _c, _d;
19139
+ return props.badge.discountType === "percentage" ? discountValue.value.toFixed(0) : formatPrice(
19140
+ discountValue.value,
19141
+ (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.currency,
19142
+ (_d = (_c = searchResultOptions.value) == null ? void 0 : _c.labels) == null ? void 0 : _d.priceSeparator
19143
+ );
19144
+ });
19145
+ const hasDiscount = computed(() => {
19146
+ return Boolean(discountValue.value) && discountValue.value > 0;
19147
+ });
19148
+ const discount = computed(() => {
19149
+ var _a, _b, _c, _d;
19150
+ const defaultPostfix = props.badge.discountType === "percentage" ? " %" : "";
19151
+ const prefix = (_b = (_a = props.badge.labels) == null ? void 0 : _a.prefix) != null ? _b : "- ";
19152
+ const postfix = (_d = (_c = props.badge.labels) == null ? void 0 : _c.postfix) != null ? _d : defaultPostfix;
19153
+ return `${prefix}${discountStringValue.value}${postfix}`;
19154
+ });
19155
+ return (_ctx, _cache) => {
19156
+ return hasDiscount.value ? (openBlock(), createElementBlock("div", {
19157
+ key: 0,
19158
+ class: normalizeClass([className.value, "lupa-discount-badge"])
19159
+ }, toDisplayString(discount.value), 3)) : createCommentVNode("", true);
19160
+ };
19161
+ }
19162
+ });
19163
+ const _hoisted_1$Z = { id: "lupa-search-results-badges" };
19104
19164
  const __default__$3 = {
19105
19165
  components: {
19106
- CustomBadge: _sfc_main$15,
19107
- TextBadge: _sfc_main$14,
19108
- ImageBadge: _sfc_main$13
19166
+ CustomBadge: _sfc_main$18,
19167
+ TextBadge: _sfc_main$17,
19168
+ ImageBadge: _sfc_main$16,
19169
+ DiscountBadge: _sfc_main$15
19109
19170
  }
19110
19171
  };
19111
- const _sfc_main$12 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
19172
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
19112
19173
  __name: "SearchResultsBadgeWrapper",
19113
19174
  props: {
19114
19175
  position: {},
@@ -19164,12 +19225,14 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
19164
19225
  return "ImageBadge";
19165
19226
  case BadgeType.CUSTOM_HTML:
19166
19227
  return "CustomBadge";
19228
+ case BadgeType.DISCOUNT:
19229
+ return "DiscountBadge";
19167
19230
  default:
19168
19231
  return "CustomBadge";
19169
19232
  }
19170
19233
  };
19171
19234
  return (_ctx, _cache) => {
19172
- return openBlock(), createElementBlock("div", _hoisted_1$X, [
19235
+ return openBlock(), createElementBlock("div", _hoisted_1$Z, [
19173
19236
  createBaseVNode("div", {
19174
19237
  id: "lupa-badges",
19175
19238
  class: normalizeClass(anchorPosition.value)
@@ -19180,7 +19243,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
19180
19243
  badge
19181
19244
  }, null, 8, ["badge"]);
19182
19245
  }), 128)),
19183
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$16, {
19246
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$19, {
19184
19247
  key: 0,
19185
19248
  options: _ctx.options
19186
19249
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -19189,13 +19252,13 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
19189
19252
  };
19190
19253
  }
19191
19254
  }));
19192
- const _hoisted_1$W = ["href"];
19193
- const _hoisted_2$I = { class: "lupa-search-box-product-details-section" };
19194
- const _hoisted_3$w = {
19255
+ const _hoisted_1$Y = ["href"];
19256
+ const _hoisted_2$K = { class: "lupa-search-box-product-details-section" };
19257
+ const _hoisted_3$y = {
19195
19258
  key: 0,
19196
19259
  class: "lupa-search-box-product-add-to-cart-section"
19197
19260
  };
19198
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19261
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
19199
19262
  __name: "SearchBoxProduct",
19200
19263
  props: {
19201
19264
  item: {},
@@ -19281,7 +19344,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19281
19344
  style: normalizeStyle(imageStyleOverride.value)
19282
19345
  }, [
19283
19346
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
19284
- return openBlock(), createBlock(_sfc_main$18, {
19347
+ return openBlock(), createBlock(_sfc_main$1b, {
19285
19348
  class: "lupa-search-box-product-element",
19286
19349
  item: _ctx.item,
19287
19350
  element,
@@ -19291,10 +19354,10 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19291
19354
  }, null, 8, ["item", "element", "labels", "link"]);
19292
19355
  }), 128))
19293
19356
  ], 4),
19294
- createBaseVNode("div", _hoisted_2$I, [
19357
+ createBaseVNode("div", _hoisted_2$K, [
19295
19358
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
19296
19359
  var _a;
19297
- return openBlock(), createBlock(_sfc_main$18, {
19360
+ return openBlock(), createBlock(_sfc_main$1b, {
19298
19361
  key: element.key,
19299
19362
  class: "lupa-search-box-product-element",
19300
19363
  item: _ctx.item,
@@ -19305,7 +19368,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19305
19368
  badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
19306
19369
  name: "badges",
19307
19370
  fn: withCtx(() => [
19308
- createVNode(_sfc_main$12, {
19371
+ createVNode(_sfc_main$14, {
19309
19372
  options: badgeOptions.value,
19310
19373
  position: "card"
19311
19374
  }, null, 8, ["options"])
@@ -19315,8 +19378,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19315
19378
  ]), 1032, ["item", "element", "labels", "link"]);
19316
19379
  }), 128))
19317
19380
  ]),
19318
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
19319
- createVNode(_sfc_main$18, {
19381
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
19382
+ createVNode(_sfc_main$1b, {
19320
19383
  class: "lupa-search-box-product-element",
19321
19384
  item: _ctx.item,
19322
19385
  element: addToCartElement.value,
@@ -19325,7 +19388,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19325
19388
  isInStock: isInStock.value
19326
19389
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
19327
19390
  ])) : createCommentVNode("", true)
19328
- ], 16, _hoisted_1$W);
19391
+ ], 16, _hoisted_1$Y);
19329
19392
  };
19330
19393
  }
19331
19394
  });
@@ -19386,8 +19449,8 @@ const useTrackingStore = defineStore("tracking", () => {
19386
19449
  };
19387
19450
  return { trackSearch, trackResults, trackEvent };
19388
19451
  });
19389
- const _hoisted_1$V = { id: "lupa-search-box-products" };
19390
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19452
+ const _hoisted_1$X = { id: "lupa-search-box-products" };
19453
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
19391
19454
  __name: "SearchBoxProducts",
19392
19455
  props: {
19393
19456
  items: {},
@@ -19448,7 +19511,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19448
19511
  handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
19449
19512
  };
19450
19513
  return (_ctx, _cache) => {
19451
- return openBlock(), createElementBlock("div", _hoisted_1$V, [
19514
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
19452
19515
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
19453
19516
  return renderSlot(_ctx.$slots, "productCard", {
19454
19517
  key: index,
@@ -19460,7 +19523,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19460
19523
  itemClicked: handleProductClick
19461
19524
  });
19462
19525
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
19463
- return openBlock(), createBlock(_sfc_main$11, {
19526
+ return openBlock(), createBlock(_sfc_main$13, {
19464
19527
  key: index,
19465
19528
  item,
19466
19529
  panelOptions: _ctx.panelOptions,
@@ -19475,9 +19538,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19475
19538
  };
19476
19539
  }
19477
19540
  });
19478
- const _hoisted_1$U = { class: "lupa-search-box-documents-go-to-results-wrapper" };
19479
- const _hoisted_2$H = { key: 0 };
19480
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
19541
+ const _hoisted_1$W = { class: "lupa-search-box-documents-go-to-results-wrapper" };
19542
+ const _hoisted_2$J = { key: 0 };
19543
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19481
19544
  __name: "SearchBoxProductsGoToResultsButton",
19482
19545
  props: {
19483
19546
  options: {},
@@ -19507,19 +19570,19 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
19507
19570
  emit2("goToResults");
19508
19571
  };
19509
19572
  return (_ctx, _cache) => {
19510
- return openBlock(), createElementBlock("div", _hoisted_1$U, [
19573
+ return openBlock(), createElementBlock("div", _hoisted_1$W, [
19511
19574
  createBaseVNode("button", {
19512
19575
  class: "lupa-search-box-documents-go-to-results-button",
19513
19576
  onClick: goToResults
19514
19577
  }, [
19515
19578
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
19516
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$H, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
19579
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$J, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
19517
19580
  ])
19518
19581
  ]);
19519
19582
  };
19520
19583
  }
19521
19584
  });
19522
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
19585
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
19523
19586
  __name: "SearchBoxProductsWrapper",
19524
19587
  props: {
19525
19588
  panel: {},
@@ -19576,7 +19639,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
19576
19639
  watch(() => props.panel.limit, getItemsDebounced);
19577
19640
  return (_ctx, _cache) => {
19578
19641
  var _a, _b;
19579
- return openBlock(), createBlock(_sfc_main$10, {
19642
+ return openBlock(), createBlock(_sfc_main$12, {
19580
19643
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
19581
19644
  panelOptions: _ctx.panel,
19582
19645
  labels: _ctx.labels,
@@ -19586,7 +19649,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
19586
19649
  default: withCtx(() => {
19587
19650
  var _a2;
19588
19651
  return [
19589
- showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$$, {
19652
+ showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$11, {
19590
19653
  key: 0,
19591
19654
  options: _ctx.searchBoxOptions,
19592
19655
  panel: _ctx.panel,
@@ -19607,7 +19670,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
19607
19670
  };
19608
19671
  }
19609
19672
  });
19610
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
19673
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
19611
19674
  __name: "SearchBoxRelatedSourceWrapper",
19612
19675
  props: {
19613
19676
  panel: {},
@@ -19679,7 +19742,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
19679
19742
  });
19680
19743
  return (_ctx, _cache) => {
19681
19744
  var _a, _b;
19682
- return openBlock(), createBlock(_sfc_main$10, {
19745
+ return openBlock(), createBlock(_sfc_main$12, {
19683
19746
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
19684
19747
  panelOptions: documentPanelOptions.value,
19685
19748
  labels: _ctx.labels,
@@ -19697,31 +19760,31 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
19697
19760
  };
19698
19761
  }
19699
19762
  });
19700
- const _hoisted_1$T = {
19763
+ const _hoisted_1$V = {
19701
19764
  key: 0,
19702
19765
  id: "lupa-search-box-panel"
19703
19766
  };
19704
- const _hoisted_2$G = ["data-cy"];
19705
- const _hoisted_3$v = {
19767
+ const _hoisted_2$I = ["data-cy"];
19768
+ const _hoisted_3$x = {
19706
19769
  key: 0,
19707
19770
  class: "lupa-panel-title lupa-panel-title-top-results"
19708
19771
  };
19709
- const _hoisted_4$o = {
19772
+ const _hoisted_4$p = {
19710
19773
  key: 1,
19711
19774
  class: "lupa-panel-title"
19712
19775
  };
19713
- const _hoisted_5$f = {
19776
+ const _hoisted_5$g = {
19714
19777
  key: 1,
19715
19778
  id: "lupa-search-box-panel"
19716
19779
  };
19717
19780
  const __default__$2 = {
19718
19781
  components: {
19719
- SearchBoxSuggestionsWrapper: _sfc_main$1i,
19720
- SearchBoxProductsWrapper: _sfc_main$_,
19721
- SearchBoxRelatedSourceWrapper: _sfc_main$Z
19782
+ SearchBoxSuggestionsWrapper: _sfc_main$1l,
19783
+ SearchBoxProductsWrapper: _sfc_main$10,
19784
+ SearchBoxRelatedSourceWrapper: _sfc_main$$
19722
19785
  }
19723
19786
  };
19724
- const _sfc_main$Y = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
19787
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
19725
19788
  __name: "SearchBoxMainPanel",
19726
19789
  props: {
19727
19790
  options: {},
@@ -19877,7 +19940,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
19877
19940
  ref_key: "panelContainer",
19878
19941
  ref: panelContainer
19879
19942
  }, [
19880
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
19943
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$V, [
19881
19944
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
19882
19945
  key: 0,
19883
19946
  class: "lupa-search-box-close-panel",
@@ -19899,8 +19962,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
19899
19962
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
19900
19963
  "data-cy": "lupa-panel-" + panel.type + "-index"
19901
19964
  }, [
19902
- ((_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),
19903
- ((_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),
19965
+ ((_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),
19966
+ ((_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),
19904
19967
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
19905
19968
  key: 2,
19906
19969
  panel,
@@ -19922,21 +19985,21 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
19922
19985
  key: "0"
19923
19986
  } : void 0
19924
19987
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
19925
- ], 14, _hoisted_2$G);
19988
+ ], 14, _hoisted_2$I);
19926
19989
  }), 128))
19927
19990
  ], 4),
19928
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1l, {
19991
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1o, {
19929
19992
  key: 1,
19930
19993
  labels: labels.value
19931
19994
  }, null, 8, ["labels"])) : createCommentVNode("", true),
19932
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1o, {
19995
+ unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1r, {
19933
19996
  key: 2,
19934
19997
  labels: labels.value,
19935
19998
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
19936
19999
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
19937
20000
  }, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
19938
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
19939
- createVNode(_sfc_main$1m, {
20001
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
20002
+ createVNode(_sfc_main$1p, {
19940
20003
  options: _ctx.options.history,
19941
20004
  history: history.value,
19942
20005
  onGoToResults: handleGoToResults,
@@ -19961,9 +20024,9 @@ const unbindSearchTriggers = (triggers = [], event) => {
19961
20024
  const elements = getElements(triggers);
19962
20025
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
19963
20026
  };
19964
- const _hoisted_1$S = { id: "lupa-search-box" };
19965
- const _hoisted_2$F = { class: "lupa-search-box-wrapper" };
19966
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
20027
+ const _hoisted_1$U = { id: "lupa-search-box" };
20028
+ const _hoisted_2$H = { class: "lupa-search-box-wrapper" };
20029
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
19967
20030
  __name: "SearchBox",
19968
20031
  props: {
19969
20032
  options: {},
@@ -20223,9 +20286,9 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
20223
20286
  };
20224
20287
  return (_ctx, _cache) => {
20225
20288
  var _a2;
20226
- return openBlock(), createElementBlock("div", _hoisted_1$S, [
20227
- createBaseVNode("div", _hoisted_2$F, [
20228
- createVNode(_sfc_main$1p, {
20289
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
20290
+ createBaseVNode("div", _hoisted_2$H, [
20291
+ createVNode(_sfc_main$1s, {
20229
20292
  options: inputOptions.value,
20230
20293
  suggestedValue: suggestedValue.value,
20231
20294
  "can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
@@ -20238,7 +20301,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
20238
20301
  onSearch: handleSearch,
20239
20302
  onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
20240
20303
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
20241
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$Y, {
20304
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$_, {
20242
20305
  key: 0,
20243
20306
  options: panelOptions.value,
20244
20307
  inputValue: inputValue.value,
@@ -20327,20 +20390,20 @@ const getSearchParams = (url, params, baseUrl) => {
20327
20390
  }
20328
20391
  return searchParams;
20329
20392
  };
20330
- const _hoisted_1$R = {
20393
+ const _hoisted_1$T = {
20331
20394
  key: 0,
20332
20395
  id: "lupa-search-results-did-you-mean"
20333
20396
  };
20334
- const _hoisted_2$E = {
20397
+ const _hoisted_2$G = {
20335
20398
  key: 0,
20336
20399
  "data-cy": "suggested-search-text-label"
20337
20400
  };
20338
- const _hoisted_3$u = {
20401
+ const _hoisted_3$w = {
20339
20402
  key: 1,
20340
20403
  "data-cy": "did-you-mean-label"
20341
20404
  };
20342
- const _hoisted_4$n = { key: 1 };
20343
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
20405
+ const _hoisted_4$o = { key: 1 };
20406
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
20344
20407
  __name: "SearchResultsDidYouMean",
20345
20408
  props: {
20346
20409
  labels: {}
@@ -20372,8 +20435,8 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20372
20435
  paramStore.goToResults({ searchText, facet });
20373
20436
  };
20374
20437
  return (_ctx, _cache) => {
20375
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
20376
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$E, [
20438
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
20439
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$G, [
20377
20440
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
20378
20441
  return openBlock(), createElementBlock("span", { key: index }, [
20379
20442
  createBaseVNode("span", {
@@ -20382,7 +20445,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20382
20445
  ]);
20383
20446
  }), 128))
20384
20447
  ])) : createCommentVNode("", true),
20385
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
20448
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
20386
20449
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
20387
20450
  return openBlock(), createElementBlock("span", { key: index }, [
20388
20451
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -20390,7 +20453,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20390
20453
  class: "lupa-did-you-mean lupa-highlighted-search-text",
20391
20454
  "data-cy": "did-you-mean-value",
20392
20455
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
20393
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
20456
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
20394
20457
  ]);
20395
20458
  }), 128))
20396
20459
  ])) : createCommentVNode("", true)
@@ -20398,12 +20461,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20398
20461
  };
20399
20462
  }
20400
20463
  });
20401
- const _hoisted_1$Q = {
20464
+ const _hoisted_1$S = {
20402
20465
  key: 0,
20403
20466
  class: "lupa-search-results-summary"
20404
20467
  };
20405
- const _hoisted_2$D = ["innerHTML"];
20406
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
20468
+ const _hoisted_2$F = ["innerHTML"];
20469
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
20407
20470
  __name: "SearchResultsSummary",
20408
20471
  props: {
20409
20472
  label: {},
@@ -20418,8 +20481,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
20418
20481
  return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
20419
20482
  });
20420
20483
  return (_ctx, _cache) => {
20421
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
20422
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$D),
20484
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$S, [
20485
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$F),
20423
20486
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
20424
20487
  key: 0,
20425
20488
  class: "lupa-filter-clear",
@@ -20430,19 +20493,19 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
20430
20493
  };
20431
20494
  }
20432
20495
  });
20433
- const _hoisted_1$P = {
20496
+ const _hoisted_1$R = {
20434
20497
  key: 0,
20435
20498
  class: "lupa-result-page-title",
20436
20499
  "data-cy": "lupa-result-page-title"
20437
20500
  };
20438
- const _hoisted_2$C = { key: 0 };
20439
- const _hoisted_3$t = {
20501
+ const _hoisted_2$E = { key: 0 };
20502
+ const _hoisted_3$v = {
20440
20503
  key: 1,
20441
20504
  class: "lupa-results-total-count"
20442
20505
  };
20443
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
20444
- const _hoisted_5$e = ["innerHTML"];
20445
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
20506
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
20507
+ const _hoisted_5$f = ["innerHTML"];
20508
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
20446
20509
  __name: "SearchResultsTitle",
20447
20510
  props: {
20448
20511
  options: {},
@@ -20481,16 +20544,16 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
20481
20544
  });
20482
20545
  return (_ctx, _cache) => {
20483
20546
  return openBlock(), createElementBlock("div", null, [
20484
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
20547
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$R, [
20485
20548
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
20486
- queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20487
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
20549
+ queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
20550
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
20488
20551
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
20489
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
20552
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
20490
20553
  createTextVNode(")")
20491
20554
  ])) : createCommentVNode("", true)
20492
20555
  ])) : createCommentVNode("", true),
20493
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$V, {
20556
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$X, {
20494
20557
  key: 1,
20495
20558
  label: summaryLabel.value
20496
20559
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -20498,21 +20561,21 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
20498
20561
  key: 2,
20499
20562
  class: "lupa-result-page-description-top",
20500
20563
  innerHTML: descriptionTop.value
20501
- }, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
20564
+ }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
20502
20565
  ]);
20503
20566
  };
20504
20567
  }
20505
20568
  });
20506
- const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
20507
- const _hoisted_2$B = {
20569
+ const _hoisted_1$Q = { class: "lupa-search-result-filter-value" };
20570
+ const _hoisted_2$D = {
20508
20571
  class: "lupa-current-filter-label",
20509
20572
  "data-cy": "lupa-current-filter-label"
20510
20573
  };
20511
- const _hoisted_3$s = {
20574
+ const _hoisted_3$u = {
20512
20575
  class: "lupa-current-filter-value",
20513
20576
  "data-cy": "lupa-current-filter-value"
20514
20577
  };
20515
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
20578
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
20516
20579
  __name: "CurrentFilterDisplay",
20517
20580
  props: {
20518
20581
  filter: {}
@@ -20524,28 +20587,28 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
20524
20587
  emit2("remove", { filter: props.filter });
20525
20588
  };
20526
20589
  return (_ctx, _cache) => {
20527
- return openBlock(), createElementBlock("div", _hoisted_1$O, [
20590
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
20528
20591
  createBaseVNode("div", {
20529
20592
  class: "lupa-current-filter-action",
20530
20593
  onClick: handleClick
20531
20594
  }, "⨉"),
20532
- createBaseVNode("div", _hoisted_2$B, toDisplayString(_ctx.filter.label) + ": ", 1),
20533
- createBaseVNode("div", _hoisted_3$s, toDisplayString(_ctx.filter.value), 1)
20595
+ createBaseVNode("div", _hoisted_2$D, toDisplayString(_ctx.filter.label) + ": ", 1),
20596
+ createBaseVNode("div", _hoisted_3$u, toDisplayString(_ctx.filter.value), 1)
20534
20597
  ]);
20535
20598
  };
20536
20599
  }
20537
20600
  });
20538
- const _hoisted_1$N = { class: "lupa-filter-title-text" };
20539
- const _hoisted_2$A = {
20601
+ const _hoisted_1$P = { class: "lupa-filter-title-text" };
20602
+ const _hoisted_2$C = {
20540
20603
  key: 0,
20541
20604
  class: "lupa-filter-count"
20542
20605
  };
20543
- const _hoisted_3$r = {
20606
+ const _hoisted_3$t = {
20544
20607
  key: 0,
20545
20608
  class: "filter-values"
20546
20609
  };
20547
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
20548
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
20610
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
20611
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
20549
20612
  __name: "CurrentFilters",
20550
20613
  props: {
20551
20614
  options: {},
@@ -20618,19 +20681,19 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
20618
20681
  class: "lupa-current-filter-title",
20619
20682
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
20620
20683
  }, [
20621
- createBaseVNode("div", _hoisted_1$N, [
20684
+ createBaseVNode("div", _hoisted_1$P, [
20622
20685
  createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
20623
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$A, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
20686
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$C, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
20624
20687
  ]),
20625
20688
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
20626
20689
  key: 0,
20627
20690
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
20628
20691
  }, null, 2)) : createCommentVNode("", true)
20629
20692
  ]),
20630
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
20631
- createBaseVNode("div", _hoisted_4$l, [
20693
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
20694
+ createBaseVNode("div", _hoisted_4$m, [
20632
20695
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
20633
- return openBlock(), createBlock(_sfc_main$T, {
20696
+ return openBlock(), createBlock(_sfc_main$V, {
20634
20697
  key: filter2.key + "_" + filter2.value,
20635
20698
  filter: filter2,
20636
20699
  onRemove: handleRemove
@@ -20647,8 +20710,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
20647
20710
  };
20648
20711
  }
20649
20712
  });
20650
- const _hoisted_1$M = ["href"];
20651
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
20713
+ const _hoisted_1$O = ["href"];
20714
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
20652
20715
  __name: "CategoryFilterItem",
20653
20716
  props: {
20654
20717
  options: {},
@@ -20685,20 +20748,20 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
20685
20748
  "data-cy": "lupa-child-category-item",
20686
20749
  href: urlLink.value,
20687
20750
  onClick: handleNavigation
20688
- }, toDisplayString(title.value), 9, _hoisted_1$M)
20751
+ }, toDisplayString(title.value), 9, _hoisted_1$O)
20689
20752
  ], 2);
20690
20753
  };
20691
20754
  }
20692
20755
  });
20693
- const _hoisted_1$L = {
20756
+ const _hoisted_1$N = {
20694
20757
  class: "lupa-category-filter",
20695
20758
  "data-cy": "lupa-category-filter"
20696
20759
  };
20697
- const _hoisted_2$z = { class: "lupa-category-back" };
20698
- const _hoisted_3$q = ["href"];
20699
- const _hoisted_4$k = ["href"];
20700
- const _hoisted_5$d = { class: "lupa-child-category-list" };
20701
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
20760
+ const _hoisted_2$B = { class: "lupa-category-back" };
20761
+ const _hoisted_3$s = ["href"];
20762
+ const _hoisted_4$l = ["href"];
20763
+ const _hoisted_5$e = { class: "lupa-child-category-list" };
20764
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
20702
20765
  __name: "CategoryFilter",
20703
20766
  props: {
20704
20767
  options: {}
@@ -20786,14 +20849,14 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
20786
20849
  };
20787
20850
  __expose({ fetch: fetch2 });
20788
20851
  return (_ctx, _cache) => {
20789
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
20790
- createBaseVNode("div", _hoisted_2$z, [
20852
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
20853
+ createBaseVNode("div", _hoisted_2$B, [
20791
20854
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
20792
20855
  key: 0,
20793
20856
  "data-cy": "lupa-category-back",
20794
20857
  href: backUrlLink.value,
20795
20858
  onClick: handleNavigationBack
20796
- }, toDisplayString(backTitle.value), 9, _hoisted_3$q)) : createCommentVNode("", true)
20859
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$s)) : createCommentVNode("", true)
20797
20860
  ]),
20798
20861
  createBaseVNode("div", {
20799
20862
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -20803,11 +20866,11 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
20803
20866
  href: parentUrlLink.value,
20804
20867
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
20805
20868
  onClick: handleNavigationParent
20806
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
20869
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
20807
20870
  ], 2),
20808
- createBaseVNode("div", _hoisted_5$d, [
20871
+ createBaseVNode("div", _hoisted_5$e, [
20809
20872
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
20810
- return openBlock(), createBlock(_sfc_main$R, {
20873
+ return openBlock(), createBlock(_sfc_main$T, {
20811
20874
  key: getCategoryKey(child),
20812
20875
  item: child,
20813
20876
  options: _ctx.options
@@ -20818,14 +20881,14 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
20818
20881
  };
20819
20882
  }
20820
20883
  });
20821
- const _hoisted_1$K = {
20884
+ const _hoisted_1$M = {
20822
20885
  class: "lupa-search-result-facet-term-values",
20823
20886
  "data-cy": "lupa-search-result-facet-term-values"
20824
20887
  };
20825
- const _hoisted_2$y = ["placeholder"];
20826
- const _hoisted_3$p = { class: "lupa-terms-list" };
20827
- const _hoisted_4$j = ["onClick"];
20828
- const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
20888
+ const _hoisted_2$A = ["placeholder"];
20889
+ const _hoisted_3$r = { class: "lupa-terms-list" };
20890
+ const _hoisted_4$k = ["onClick"];
20891
+ const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
20829
20892
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
20830
20893
  const _hoisted_7$6 = { class: "lupa-term-label" };
20831
20894
  const _hoisted_8$2 = {
@@ -20834,7 +20897,7 @@ const _hoisted_8$2 = {
20834
20897
  };
20835
20898
  const _hoisted_9$2 = { key: 0 };
20836
20899
  const _hoisted_10$1 = { key: 1 };
20837
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
20900
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
20838
20901
  __name: "TermFacet",
20839
20902
  props: {
20840
20903
  options: {},
@@ -20905,17 +20968,17 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
20905
20968
  return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
20906
20969
  };
20907
20970
  return (_ctx, _cache) => {
20908
- return openBlock(), createElementBlock("div", _hoisted_1$K, [
20971
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [
20909
20972
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
20910
20973
  key: 0,
20911
20974
  class: "lupa-term-filter",
20912
20975
  "data-cy": "lupa-term-filter",
20913
20976
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
20914
20977
  placeholder: _ctx.options.labels.facetFilter
20915
- }, null, 8, _hoisted_2$y)), [
20978
+ }, null, 8, _hoisted_2$A)), [
20916
20979
  [vModelText, termFilter.value]
20917
20980
  ]) : createCommentVNode("", true),
20918
- createBaseVNode("div", _hoisted_3$p, [
20981
+ createBaseVNode("div", _hoisted_3$r, [
20919
20982
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
20920
20983
  return openBlock(), createElementBlock("div", {
20921
20984
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -20923,7 +20986,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
20923
20986
  key: item.title,
20924
20987
  onClick: ($event) => handleFacetClick(item)
20925
20988
  }, [
20926
- createBaseVNode("div", _hoisted_5$c, [
20989
+ createBaseVNode("div", _hoisted_5$d, [
20927
20990
  createBaseVNode("span", {
20928
20991
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
20929
20992
  }, null, 2)
@@ -20932,7 +20995,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
20932
20995
  createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
20933
20996
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
20934
20997
  ])
20935
- ], 10, _hoisted_4$j);
20998
+ ], 10, _hoisted_4$k);
20936
20999
  }), 128))
20937
21000
  ]),
20938
21001
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -21923,20 +21986,20 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
21923
21986
  m.render = function(e2, t, r, i, n, o) {
21924
21987
  return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
21925
21988
  }, m.__file = "src/Slider.vue";
21926
- const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
21927
- const _hoisted_2$x = {
21989
+ const _hoisted_1$L = { class: "lupa-search-result-facet-stats-values" };
21990
+ const _hoisted_2$z = {
21928
21991
  key: 0,
21929
21992
  class: "lupa-stats-facet-summary"
21930
21993
  };
21931
- const _hoisted_3$o = {
21994
+ const _hoisted_3$q = {
21932
21995
  key: 1,
21933
21996
  class: "lupa-stats-facet-summary-input"
21934
21997
  };
21935
- const _hoisted_4$i = {
21998
+ const _hoisted_4$j = {
21936
21999
  key: 0,
21937
22000
  class: "lupa-stats-range-label"
21938
22001
  };
21939
- const _hoisted_5$b = { class: "lupa-stats-from" };
22002
+ const _hoisted_5$c = { class: "lupa-stats-from" };
21940
22003
  const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
21941
22004
  const _hoisted_7$5 = { key: 0 };
21942
22005
  const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
@@ -21951,7 +22014,7 @@ const _hoisted_13 = {
21951
22014
  key: 2,
21952
22015
  class: "lupa-stats-slider-wrapper"
21953
22016
  };
21954
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
22017
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
21955
22018
  __name: "StatsFacet",
21956
22019
  props: {
21957
22020
  options: {},
@@ -22124,11 +22187,11 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
22124
22187
  innerSliderRange.value = value;
22125
22188
  };
22126
22189
  return (_ctx, _cache) => {
22127
- return openBlock(), createElementBlock("div", _hoisted_1$J, [
22128
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
22190
+ return openBlock(), createElementBlock("div", _hoisted_1$L, [
22191
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
22129
22192
  createBaseVNode("div", null, [
22130
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22131
- createBaseVNode("div", _hoisted_5$b, [
22193
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
22194
+ createBaseVNode("div", _hoisted_5$c, [
22132
22195
  withDirectives(createBaseVNode("input", {
22133
22196
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
22134
22197
  type: "text",
@@ -22191,18 +22254,18 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
22191
22254
  };
22192
22255
  }
22193
22256
  });
22194
- const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
22195
- const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
22196
- const _hoisted_3$n = { class: "lupa-term-label" };
22197
- const _hoisted_4$h = {
22257
+ const _hoisted_1$K = { class: "lupa-term-checkbox-wrapper" };
22258
+ const _hoisted_2$y = { class: "lupa-term-checkbox-label" };
22259
+ const _hoisted_3$p = { class: "lupa-term-label" };
22260
+ const _hoisted_4$i = {
22198
22261
  key: 0,
22199
22262
  class: "lupa-term-count"
22200
22263
  };
22201
- const _hoisted_5$a = {
22264
+ const _hoisted_5$b = {
22202
22265
  key: 0,
22203
22266
  class: "lupa-facet-level"
22204
22267
  };
22205
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
22268
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
22206
22269
  __name: "HierarchyFacetLevel",
22207
22270
  props: {
22208
22271
  options: {},
@@ -22248,17 +22311,17 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
22248
22311
  "data-cy": "lupa-facet-term",
22249
22312
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
22250
22313
  }, [
22251
- createBaseVNode("div", _hoisted_1$I, [
22314
+ createBaseVNode("div", _hoisted_1$K, [
22252
22315
  createBaseVNode("span", {
22253
22316
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
22254
22317
  }, null, 2)
22255
22318
  ]),
22256
- createBaseVNode("div", _hoisted_2$w, [
22257
- createBaseVNode("span", _hoisted_3$n, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22258
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22319
+ createBaseVNode("div", _hoisted_2$y, [
22320
+ createBaseVNode("span", _hoisted_3$p, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
22321
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$i, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22259
22322
  ])
22260
22323
  ]),
22261
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
22324
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$b, [
22262
22325
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
22263
22326
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
22264
22327
  key: itemChild.title,
@@ -22274,13 +22337,13 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
22274
22337
  };
22275
22338
  }
22276
22339
  });
22277
- const _hoisted_1$H = {
22340
+ const _hoisted_1$J = {
22278
22341
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
22279
22342
  "data-cy": "lupa-search-result-facet-term-values"
22280
22343
  };
22281
- const _hoisted_2$v = { key: 0 };
22282
- const _hoisted_3$m = ["placeholder"];
22283
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
22344
+ const _hoisted_2$x = { key: 0 };
22345
+ const _hoisted_3$o = ["placeholder"];
22346
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
22284
22347
  __name: "HierarchyFacet",
22285
22348
  props: {
22286
22349
  options: {},
@@ -22330,19 +22393,19 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
22330
22393
  showAll.value = true;
22331
22394
  };
22332
22395
  return (_ctx, _cache) => {
22333
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
22334
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$v, [
22396
+ return openBlock(), createElementBlock("div", _hoisted_1$J, [
22397
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
22335
22398
  withDirectives(createBaseVNode("input", {
22336
22399
  class: "lupa-term-filter",
22337
22400
  "data-cy": "lupa-term-filter",
22338
22401
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
22339
22402
  placeholder: _ctx.options.labels.facetFilter
22340
- }, null, 8, _hoisted_3$m), [
22403
+ }, null, 8, _hoisted_3$o), [
22341
22404
  [vModelText, termFilter.value]
22342
22405
  ])
22343
22406
  ])) : createCommentVNode("", true),
22344
22407
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
22345
- return openBlock(), createBlock(_sfc_main$N, {
22408
+ return openBlock(), createBlock(_sfc_main$P, {
22346
22409
  key: item.title,
22347
22410
  options: _ctx.options,
22348
22411
  item,
@@ -22362,20 +22425,20 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
22362
22425
  };
22363
22426
  }
22364
22427
  });
22365
- const _hoisted_1$G = { class: "lupa-facet-label-text" };
22366
- const _hoisted_2$u = {
22428
+ const _hoisted_1$I = { class: "lupa-facet-label-text" };
22429
+ const _hoisted_2$w = {
22367
22430
  key: 0,
22368
22431
  class: "lupa-facet-content",
22369
22432
  "data-cy": "lupa-facet-content"
22370
22433
  };
22371
22434
  const __default__$1 = {
22372
22435
  components: {
22373
- TermFacet: _sfc_main$P,
22374
- StatsFacet: _sfc_main$O,
22375
- HierarchyFacet: _sfc_main$M
22436
+ TermFacet: _sfc_main$R,
22437
+ StatsFacet: _sfc_main$Q,
22438
+ HierarchyFacet: _sfc_main$O
22376
22439
  }
22377
22440
  };
22378
- const _sfc_main$L = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
22441
+ const _sfc_main$N = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
22379
22442
  __name: "FacetDisplay",
22380
22443
  props: {
22381
22444
  options: {},
@@ -22487,12 +22550,12 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
22487
22550
  "data-cy": "lupa-search-result-facet-label",
22488
22551
  onClick: toggleFacet
22489
22552
  }, [
22490
- createBaseVNode("div", _hoisted_1$G, toDisplayString(facet.value.label), 1),
22553
+ createBaseVNode("div", _hoisted_1$I, toDisplayString(facet.value.label), 1),
22491
22554
  createBaseVNode("div", {
22492
22555
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
22493
22556
  }, null, 2)
22494
22557
  ], 2),
22495
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
22558
+ isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, [
22496
22559
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
22497
22560
  facet: facet.value,
22498
22561
  currentFilters: currentFilters.value[facet.value.key],
@@ -22510,12 +22573,12 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
22510
22573
  };
22511
22574
  }
22512
22575
  }));
22513
- const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
22514
- const _hoisted_2$t = {
22576
+ const _hoisted_1$H = { class: "lupa-search-result-facet-section" };
22577
+ const _hoisted_2$v = {
22515
22578
  key: 0,
22516
22579
  class: "lupa-facets-title"
22517
22580
  };
22518
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
22581
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
22519
22582
  __name: "FacetList",
22520
22583
  props: {
22521
22584
  options: {},
@@ -22549,14 +22612,14 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
22549
22612
  };
22550
22613
  return (_ctx, _cache) => {
22551
22614
  var _a;
22552
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
22553
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
22615
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
22616
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$v, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
22554
22617
  createBaseVNode("div", {
22555
22618
  class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
22556
22619
  }, [
22557
22620
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
22558
22621
  var _a2;
22559
- return openBlock(), createBlock(_sfc_main$L, {
22622
+ return openBlock(), createBlock(_sfc_main$N, {
22560
22623
  key: facet.key,
22561
22624
  facet,
22562
22625
  currentFilters: currentFiltersValue.value,
@@ -22571,8 +22634,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
22571
22634
  };
22572
22635
  }
22573
22636
  });
22574
- const _hoisted_1$E = ["onClick"];
22575
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
22637
+ const _hoisted_1$G = ["onClick"];
22638
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
22576
22639
  __name: "FacetsButton",
22577
22640
  props: {
22578
22641
  options: {}
@@ -22592,13 +22655,13 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
22592
22655
  key: 0,
22593
22656
  class: "lupa-facets-button-filter",
22594
22657
  onClick: withModifiers(handleClick, ["stop"])
22595
- }, toDisplayString(label.value), 9, _hoisted_1$E)) : createCommentVNode("", true);
22658
+ }, toDisplayString(label.value), 9, _hoisted_1$G)) : createCommentVNode("", true);
22596
22659
  };
22597
22660
  }
22598
22661
  });
22599
- const _hoisted_1$D = { class: "lupa-search-result-facets" };
22600
- const _hoisted_2$s = { class: "lupa-facets-filter-button-wrapper" };
22601
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
22662
+ const _hoisted_1$F = { class: "lupa-search-result-facets" };
22663
+ const _hoisted_2$u = { class: "lupa-facets-filter-button-wrapper" };
22664
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
22602
22665
  __name: "Facets",
22603
22666
  props: {
22604
22667
  options: {},
@@ -22681,8 +22744,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
22681
22744
  emit2("filter");
22682
22745
  };
22683
22746
  return (_ctx, _cache) => {
22684
- return openBlock(), createElementBlock("div", _hoisted_1$D, [
22685
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$K, {
22747
+ return openBlock(), createElementBlock("div", _hoisted_1$F, [
22748
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$M, {
22686
22749
  key: 0,
22687
22750
  options: _ctx.options,
22688
22751
  facets: regularFacets.value,
@@ -22692,8 +22755,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
22692
22755
  onSelect: handleFacetSelect,
22693
22756
  onClear: clear2
22694
22757
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
22695
- createBaseVNode("div", _hoisted_2$s, [
22696
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$J, {
22758
+ createBaseVNode("div", _hoisted_2$u, [
22759
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$L, {
22697
22760
  key: 0,
22698
22761
  options: _ctx.options,
22699
22762
  onFilter: filter2
@@ -22703,11 +22766,11 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
22703
22766
  };
22704
22767
  }
22705
22768
  });
22706
- const _hoisted_1$C = {
22769
+ const _hoisted_1$E = {
22707
22770
  id: "lupa-search-result-filters",
22708
22771
  class: "lupa-search-result-filters"
22709
22772
  };
22710
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
22773
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
22711
22774
  __name: "SearchResultsFilters",
22712
22775
  props: {
22713
22776
  options: {},
@@ -22740,19 +22803,19 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
22740
22803
  __expose({ fetch: fetch2 });
22741
22804
  return (_ctx, _cache) => {
22742
22805
  var _a;
22743
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
22744
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$S, {
22806
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
22807
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$U, {
22745
22808
  key: 0,
22746
22809
  options: _ctx.options.currentFilters,
22747
22810
  expandable: (_a = _ctx.expandable) != null ? _a : false
22748
22811
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
22749
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$Q, {
22812
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$S, {
22750
22813
  key: 1,
22751
22814
  options: _ctx.options.categories,
22752
22815
  ref_key: "categoryFilters",
22753
22816
  ref: categoryFilters
22754
22817
  }, null, 8, ["options"])) : createCommentVNode("", true),
22755
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$I, {
22818
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
22756
22819
  key: 2,
22757
22820
  options: _ctx.options.facets,
22758
22821
  onFilter: filter2
@@ -22761,20 +22824,20 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
22761
22824
  };
22762
22825
  }
22763
22826
  });
22764
- const _hoisted_1$B = {
22827
+ const _hoisted_1$D = {
22765
22828
  key: 0,
22766
22829
  class: "lupa-mobile-filter-sidebar"
22767
22830
  };
22768
- const _hoisted_2$r = ["onClick"];
22769
- const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
22770
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
22771
- const _hoisted_5$9 = { class: "lupa-sidebar-title" };
22831
+ const _hoisted_2$t = ["onClick"];
22832
+ const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
22833
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
22834
+ const _hoisted_5$a = { class: "lupa-sidebar-title" };
22772
22835
  const _hoisted_6$6 = {
22773
22836
  key: 0,
22774
22837
  class: "lupa-sidebar-filter-count"
22775
22838
  };
22776
22839
  const _hoisted_7$4 = { class: "lupa-sidebar-filter-options" };
22777
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
22840
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
22778
22841
  __name: "MobileFilterSidebar",
22779
22842
  props: {
22780
22843
  options: {}
@@ -22805,14 +22868,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
22805
22868
  handleMobileToggle();
22806
22869
  };
22807
22870
  return (_ctx, _cache) => {
22808
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
22871
+ return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
22809
22872
  createBaseVNode("div", {
22810
22873
  class: "lupa-sidebar-close",
22811
22874
  onClick: withModifiers(handleMobileToggle, ["stop"])
22812
- }, null, 8, _hoisted_2$r),
22813
- createBaseVNode("div", _hoisted_3$l, [
22814
- createBaseVNode("div", _hoisted_4$g, [
22815
- createBaseVNode("div", _hoisted_5$9, [
22875
+ }, null, 8, _hoisted_2$t),
22876
+ createBaseVNode("div", _hoisted_3$n, [
22877
+ createBaseVNode("div", _hoisted_4$h, [
22878
+ createBaseVNode("div", _hoisted_5$a, [
22816
22879
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
22817
22880
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
22818
22881
  ]),
@@ -22822,7 +22885,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
22822
22885
  })
22823
22886
  ]),
22824
22887
  createBaseVNode("div", _hoisted_7$4, [
22825
- createVNode(_sfc_main$H, {
22888
+ createVNode(_sfc_main$J, {
22826
22889
  options: _ctx.options,
22827
22890
  expandable: isActiveFiltersExpanded.value,
22828
22891
  onFilter: filter2
@@ -22833,14 +22896,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
22833
22896
  };
22834
22897
  }
22835
22898
  });
22836
- const _hoisted_1$A = { id: "lupa-search-results-breadcrumbs" };
22837
- const _hoisted_2$q = ["href", "onClick"];
22838
- const _hoisted_3$k = {
22899
+ const _hoisted_1$C = { id: "lupa-search-results-breadcrumbs" };
22900
+ const _hoisted_2$s = ["href", "onClick"];
22901
+ const _hoisted_3$m = {
22839
22902
  key: 1,
22840
22903
  class: "lupa-search-results-breadcrumb-text"
22841
22904
  };
22842
- const _hoisted_4$f = { key: 2 };
22843
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
22905
+ const _hoisted_4$g = { key: 2 };
22906
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
22844
22907
  __name: "SearchResultsBreadcrumbs",
22845
22908
  props: {
22846
22909
  breadcrumbs: {}
@@ -22865,7 +22928,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
22865
22928
  handleRoutingEvent(link, event, hasEventRouting.value);
22866
22929
  };
22867
22930
  return (_ctx, _cache) => {
22868
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
22931
+ return openBlock(), createElementBlock("div", _hoisted_1$C, [
22869
22932
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
22870
22933
  return openBlock(), createElementBlock("span", {
22871
22934
  class: "lupa-search-results-breadcrumb",
@@ -22879,19 +22942,19 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
22879
22942
  var _a;
22880
22943
  return handleNavigation(e2, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
22881
22944
  }
22882
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$q)) : (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString(getLabel(breadcrumb.label)), 1)),
22883
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
22945
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
22946
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, " / ")) : createCommentVNode("", true)
22884
22947
  ]);
22885
22948
  }), 128))
22886
22949
  ]);
22887
22950
  };
22888
22951
  }
22889
22952
  });
22890
- const _hoisted_1$z = {
22953
+ const _hoisted_1$B = {
22891
22954
  id: "lupa-search-result-filters",
22892
22955
  class: "lupa-search-result-filters lupa-search-result-top-filters"
22893
22956
  };
22894
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
22957
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
22895
22958
  __name: "FiltersTopDropdown",
22896
22959
  props: {
22897
22960
  options: {}
@@ -22903,8 +22966,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
22903
22966
  };
22904
22967
  return (_ctx, _cache) => {
22905
22968
  var _a;
22906
- return openBlock(), createElementBlock("div", _hoisted_1$z, [
22907
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$I, {
22969
+ return openBlock(), createElementBlock("div", _hoisted_1$B, [
22970
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
22908
22971
  key: 0,
22909
22972
  options: _ctx.options.facets,
22910
22973
  "facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
@@ -22915,8 +22978,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
22915
22978
  };
22916
22979
  }
22917
22980
  });
22918
- const _hoisted_1$y = { id: "lupa-search-results-layout-selection" };
22919
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
22981
+ const _hoisted_1$A = { id: "lupa-search-results-layout-selection" };
22982
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
22920
22983
  __name: "SearchResultsLayoutSelection",
22921
22984
  setup(__props) {
22922
22985
  const searchResultStore = useSearchResultStore();
@@ -22927,7 +22990,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
22927
22990
  searchResultStore.setLayout(layout2);
22928
22991
  };
22929
22992
  return (_ctx, _cache) => {
22930
- return openBlock(), createElementBlock("div", _hoisted_1$y, [
22993
+ return openBlock(), createElementBlock("div", _hoisted_1$A, [
22931
22994
  createBaseVNode("div", {
22932
22995
  class: normalizeClass([
22933
22996
  "lupa-layout-selection-grid",
@@ -22949,11 +23012,11 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
22949
23012
  };
22950
23013
  }
22951
23014
  });
22952
- const _hoisted_1$x = {
23015
+ const _hoisted_1$z = {
22953
23016
  key: 0,
22954
23017
  class: "lupa-mobile-toggle-filter-count"
22955
23018
  };
22956
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
23019
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
22957
23020
  __name: "SearchResultsMobileToggle",
22958
23021
  props: {
22959
23022
  label: {},
@@ -22971,26 +23034,26 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
22971
23034
  onClick: handleMobileToggle
22972
23035
  }, [
22973
23036
  createTextVNode(toDisplayString(_ctx.label) + " ", 1),
22974
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$x, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
23037
+ _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$z, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
22975
23038
  ], 2);
22976
23039
  };
22977
23040
  }
22978
23041
  });
22979
- const _hoisted_1$w = {
23042
+ const _hoisted_1$y = {
22980
23043
  key: 0,
22981
23044
  id: "lupa-search-results-page-select",
22982
23045
  "data-cy": "lupa-search-results-page-select"
22983
23046
  };
22984
- const _hoisted_2$p = {
23047
+ const _hoisted_2$r = {
22985
23048
  key: 0,
22986
23049
  class: "lupa-page-number-separator"
22987
23050
  };
22988
- const _hoisted_3$j = ["onClick"];
22989
- const _hoisted_4$e = {
23051
+ const _hoisted_3$l = ["onClick"];
23052
+ const _hoisted_4$f = {
22990
23053
  key: 0,
22991
23054
  class: "lupa-page-number-separator"
22992
23055
  };
22993
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
23056
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
22994
23057
  __name: "SearchResultsPageSelect",
22995
23058
  props: {
22996
23059
  lastPageLabel: {},
@@ -23067,7 +23130,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23067
23130
  }
23068
23131
  };
23069
23132
  return (_ctx, _cache) => {
23070
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$w, [
23133
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
23071
23134
  showBack.value ? (openBlock(), createElementBlock("div", {
23072
23135
  key: 0,
23073
23136
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -23078,7 +23141,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23078
23141
  class: "lupa-page-number lupa-page-number-first",
23079
23142
  onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
23080
23143
  }, " 1 "),
23081
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, "...")) : createCommentVNode("", true)
23144
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, "...")) : createCommentVNode("", true)
23082
23145
  ], 64)) : createCommentVNode("", true),
23083
23146
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
23084
23147
  return openBlock(), createElementBlock("div", {
@@ -23089,10 +23152,10 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23089
23152
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
23090
23153
  ]),
23091
23154
  "data-cy": "lupa-page-number"
23092
- }, toDisplayString(page), 11, _hoisted_3$j);
23155
+ }, toDisplayString(page), 11, _hoisted_3$l);
23093
23156
  }), 128)),
23094
23157
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
23095
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
23158
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
23096
23159
  createBaseVNode("div", {
23097
23160
  class: "lupa-page-number lupa-page-number-last",
23098
23161
  onClick: _cache[2] || (_cache[2] = () => {
@@ -23111,15 +23174,15 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23111
23174
  };
23112
23175
  }
23113
23176
  });
23114
- const _hoisted_1$v = {
23177
+ const _hoisted_1$x = {
23115
23178
  id: "lupa-search-results-page-size",
23116
23179
  "data-cy": "lupa-search-results-page-size"
23117
23180
  };
23118
- const _hoisted_2$o = { id: "lupa-select" };
23119
- const _hoisted_3$i = { class: "lupa-select-label" };
23120
- const _hoisted_4$d = ["aria-label"];
23121
- const _hoisted_5$8 = ["value"];
23122
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
23181
+ const _hoisted_2$q = { id: "lupa-select" };
23182
+ const _hoisted_3$k = { class: "lupa-select-label" };
23183
+ const _hoisted_4$e = ["aria-label"];
23184
+ const _hoisted_5$9 = ["value"];
23185
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
23123
23186
  __name: "SearchResultsPageSize",
23124
23187
  props: {
23125
23188
  labels: {},
@@ -23147,9 +23210,9 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
23147
23210
  });
23148
23211
  };
23149
23212
  return (_ctx, _cache) => {
23150
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
23151
- createBaseVNode("div", _hoisted_2$o, [
23152
- createBaseVNode("label", _hoisted_3$i, toDisplayString(label.value), 1),
23213
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
23214
+ createBaseVNode("div", _hoisted_2$q, [
23215
+ createBaseVNode("label", _hoisted_3$k, toDisplayString(label.value), 1),
23153
23216
  createBaseVNode("select", {
23154
23217
  class: "lupa-select-dropdown",
23155
23218
  "aria-label": label.value,
@@ -23162,23 +23225,23 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
23162
23225
  return openBlock(), createElementBlock("option", {
23163
23226
  key: option,
23164
23227
  value: option
23165
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$8);
23228
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
23166
23229
  }), 128))
23167
- ], 40, _hoisted_4$d)
23230
+ ], 40, _hoisted_4$e)
23168
23231
  ])
23169
23232
  ]);
23170
23233
  };
23171
23234
  }
23172
23235
  });
23173
- const _hoisted_1$u = {
23236
+ const _hoisted_1$w = {
23174
23237
  id: "lupa-search-results-sort",
23175
23238
  class: "lupa-search-results-sort"
23176
23239
  };
23177
- const _hoisted_2$n = { id: "lupa-select" };
23178
- const _hoisted_3$h = { class: "lupa-select-label" };
23179
- const _hoisted_4$c = ["aria-label"];
23180
- const _hoisted_5$7 = ["value"];
23181
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
23240
+ const _hoisted_2$p = { id: "lupa-select" };
23241
+ const _hoisted_3$j = { class: "lupa-select-label" };
23242
+ const _hoisted_4$d = ["aria-label"];
23243
+ const _hoisted_5$8 = ["value"];
23244
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
23182
23245
  __name: "SearchResultsSort",
23183
23246
  props: {
23184
23247
  options: {},
@@ -23227,9 +23290,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
23227
23290
  previousKey.value = selectedKey.value;
23228
23291
  };
23229
23292
  return (_ctx, _cache) => {
23230
- return openBlock(), createElementBlock("div", _hoisted_1$u, [
23231
- createBaseVNode("div", _hoisted_2$n, [
23232
- createBaseVNode("label", _hoisted_3$h, toDisplayString(_ctx.options.label), 1),
23293
+ return openBlock(), createElementBlock("div", _hoisted_1$w, [
23294
+ createBaseVNode("div", _hoisted_2$p, [
23295
+ createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.options.label), 1),
23233
23296
  withDirectives(createBaseVNode("select", {
23234
23297
  class: "lupa-select-dropdown",
23235
23298
  "aria-label": _ctx.options.label,
@@ -23242,9 +23305,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
23242
23305
  return openBlock(), createElementBlock("option", {
23243
23306
  key: option.key,
23244
23307
  value: option.key
23245
- }, toDisplayString(option.label), 9, _hoisted_5$7);
23308
+ }, toDisplayString(option.label), 9, _hoisted_5$8);
23246
23309
  }), 128))
23247
- ], 40, _hoisted_4$c), [
23310
+ ], 40, _hoisted_4$d), [
23248
23311
  [vModelSelect, selectedKey.value]
23249
23312
  ])
23250
23313
  ])
@@ -23252,14 +23315,14 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
23252
23315
  };
23253
23316
  }
23254
23317
  });
23255
- const _hoisted_1$t = { class: "lupa-toolbar-left" };
23256
- const _hoisted_2$m = {
23318
+ const _hoisted_1$v = { class: "lupa-toolbar-left" };
23319
+ const _hoisted_2$o = {
23257
23320
  key: 0,
23258
23321
  class: "lupa-toolbar-right-title"
23259
23322
  };
23260
- const _hoisted_3$g = { key: 2 };
23261
- const _hoisted_4$b = { key: 4 };
23262
- const _hoisted_5$6 = { key: 6 };
23323
+ const _hoisted_3$i = { key: 2 };
23324
+ const _hoisted_4$c = { key: 4 };
23325
+ const _hoisted_5$7 = { key: 6 };
23263
23326
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
23264
23327
  const _hoisted_7$3 = {
23265
23328
  key: 0,
@@ -23267,7 +23330,7 @@ const _hoisted_7$3 = {
23267
23330
  };
23268
23331
  const _hoisted_8 = { key: 2 };
23269
23332
  const _hoisted_9 = { key: 4 };
23270
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
23333
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
23271
23334
  __name: "SearchResultsToolbar",
23272
23335
  props: {
23273
23336
  options: {},
@@ -23374,34 +23437,34 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23374
23437
  id: "lupa-search-results-toolbar",
23375
23438
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
23376
23439
  }, [
23377
- createBaseVNode("div", _hoisted_1$t, [
23378
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$m, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
23379
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$D, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$g)),
23380
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$V, {
23440
+ createBaseVNode("div", _hoisted_1$v, [
23441
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
23442
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$F, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$i)),
23443
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$X, {
23381
23444
  key: 3,
23382
23445
  label: searchSummaryLabel.value,
23383
23446
  clearable: unref(hasAnyFilter) && showFilterClear.value,
23384
23447
  onClear: handleClearAll
23385
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
23386
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$B, {
23448
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
23449
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$D, {
23387
23450
  key: 5,
23388
23451
  options: paginationOptions.value.pageSelect,
23389
23452
  "last-page-label": paginationOptions.value.labels.showMore,
23390
23453
  "first-page-label": paginationOptions.value.labels.showLess
23391
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$6))
23454
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$7))
23392
23455
  ]),
23393
23456
  createBaseVNode("div", _hoisted_6$5, [
23394
23457
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
23395
- createVNode(_sfc_main$C, {
23458
+ createVNode(_sfc_main$E, {
23396
23459
  label: optionsValue.value.labels.mobileFilterButton,
23397
23460
  "show-filter-count": showMobileFilterCount.value
23398
23461
  }, null, 8, ["label", "show-filter-count"]),
23399
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$A, {
23462
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$C, {
23400
23463
  key: 1,
23401
23464
  options: paginationOptions.value.pageSize,
23402
23465
  labels: paginationOptions.value.labels
23403
23466
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
23404
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$z, {
23467
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$B, {
23405
23468
  key: 3,
23406
23469
  options: sortOptions.value,
23407
23470
  callbacks: callbacks.value
@@ -23411,7 +23474,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23411
23474
  };
23412
23475
  }
23413
23476
  });
23414
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
23477
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
23415
23478
  __name: "SearchResultsProductImage",
23416
23479
  props: {
23417
23480
  item: {},
@@ -23419,7 +23482,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
23419
23482
  },
23420
23483
  setup(__props) {
23421
23484
  return (_ctx, _cache) => {
23422
- return openBlock(), createBlock(_sfc_main$1h, {
23485
+ return openBlock(), createBlock(_sfc_main$1k, {
23423
23486
  item: _ctx.item,
23424
23487
  options: _ctx.options,
23425
23488
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -23428,16 +23491,16 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
23428
23491
  };
23429
23492
  }
23430
23493
  });
23431
- const _hoisted_1$s = ["title", "innerHTML"];
23432
- const _hoisted_2$l = ["title"];
23433
- const _hoisted_3$f = ["href", "innerHTML"];
23434
- const _hoisted_4$a = ["title"];
23435
- const _hoisted_5$5 = {
23494
+ const _hoisted_1$u = ["title", "innerHTML"];
23495
+ const _hoisted_2$n = ["title"];
23496
+ const _hoisted_3$h = ["href", "innerHTML"];
23497
+ const _hoisted_4$b = ["title"];
23498
+ const _hoisted_5$6 = {
23436
23499
  key: 0,
23437
23500
  class: "lupa-search-results-product-title-text"
23438
23501
  };
23439
23502
  const _hoisted_6$4 = ["href"];
23440
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
23503
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
23441
23504
  __name: "SearchResultsProductTitle",
23442
23505
  props: {
23443
23506
  item: {},
@@ -23474,7 +23537,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
23474
23537
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23475
23538
  title: sanitizedTitle.value,
23476
23539
  innerHTML: sanitizedTitle.value
23477
- }, null, 12, _hoisted_1$s)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23540
+ }, null, 12, _hoisted_1$u)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23478
23541
  key: 1,
23479
23542
  class: "lupa-search-results-product-title",
23480
23543
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -23485,26 +23548,26 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
23485
23548
  class: "lupa-search-results-product-title-text lupa-title-link",
23486
23549
  innerHTML: sanitizedTitle.value,
23487
23550
  onClick: handleNavigation
23488
- }, null, 8, _hoisted_3$f)
23489
- ], 12, _hoisted_2$l)) : (openBlock(), createElementBlock("div", {
23551
+ }, null, 8, _hoisted_3$h)
23552
+ ], 12, _hoisted_2$n)) : (openBlock(), createElementBlock("div", {
23490
23553
  key: 2,
23491
23554
  class: "lupa-search-results-product-title",
23492
23555
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23493
23556
  title: title.value
23494
23557
  }, [
23495
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$5, toDisplayString(title.value), 1)) : createCommentVNode("", true),
23558
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(title.value), 1)) : createCommentVNode("", true),
23496
23559
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
23497
23560
  key: 1,
23498
23561
  href: _ctx.link,
23499
23562
  class: "lupa-search-results-product-title-text lupa-title-link",
23500
23563
  onClick: handleNavigation
23501
23564
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
23502
- ], 12, _hoisted_4$a));
23565
+ ], 12, _hoisted_4$b));
23503
23566
  };
23504
23567
  }
23505
23568
  });
23506
- const _hoisted_1$r = ["innerHTML"];
23507
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
23569
+ const _hoisted_1$t = ["innerHTML"];
23570
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
23508
23571
  __name: "SearchResultsProductDescription",
23509
23572
  props: {
23510
23573
  item: {},
@@ -23531,7 +23594,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
23531
23594
  class: "lupa-search-results-product-description",
23532
23595
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23533
23596
  innerHTML: sanitizedDescription.value
23534
- }, null, 12, _hoisted_1$r)) : (openBlock(), createElementBlock("div", {
23597
+ }, null, 12, _hoisted_1$t)) : (openBlock(), createElementBlock("div", {
23535
23598
  key: 1,
23536
23599
  class: "lupa-search-results-product-description",
23537
23600
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -23539,15 +23602,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
23539
23602
  };
23540
23603
  }
23541
23604
  });
23542
- const _hoisted_1$q = { id: "lupa-search-results-rating" };
23543
- const _hoisted_2$k = { class: "lupa-ratings" };
23544
- const _hoisted_3$e = { class: "lupa-ratings-base" };
23545
- const _hoisted_4$9 = ["innerHTML"];
23546
- const _hoisted_5$4 = { class: "lupa-rating-wrapper" };
23605
+ const _hoisted_1$s = { id: "lupa-search-results-rating" };
23606
+ const _hoisted_2$m = { class: "lupa-ratings" };
23607
+ const _hoisted_3$g = { class: "lupa-ratings-base" };
23608
+ const _hoisted_4$a = ["innerHTML"];
23609
+ const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
23547
23610
  const _hoisted_6$3 = ["innerHTML"];
23548
23611
  const _hoisted_7$2 = ["href"];
23549
23612
  const STAR_COUNT = 5;
23550
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
23613
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
23551
23614
  __name: "SearchResultsProductRating",
23552
23615
  props: {
23553
23616
  item: {},
@@ -23568,7 +23631,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
23568
23631
  return new Array(STAR_COUNT).fill(RATING_STAR_HTML);
23569
23632
  });
23570
23633
  const ratingPercentage = computed(() => {
23571
- return props.options.getRatingPercentage ? props.options.getRatingPercentage(props.item) : currentRating.value;
23634
+ if (props.options.getRatingPercentage) {
23635
+ return props.options.getRatingPercentage(props.item);
23636
+ }
23637
+ if (props.options.maxRating) {
23638
+ return currentRating.value / props.options.maxRating * 100;
23639
+ }
23640
+ return currentRating.value;
23572
23641
  });
23573
23642
  const ratingLink = computed(() => {
23574
23643
  var _a;
@@ -23578,18 +23647,18 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
23578
23647
  return generateLink(props.options.links.ratingDetails, props.item);
23579
23648
  });
23580
23649
  return (_ctx, _cache) => {
23581
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
23582
- createBaseVNode("div", _hoisted_2$k, [
23583
- createBaseVNode("div", _hoisted_3$e, [
23650
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
23651
+ createBaseVNode("div", _hoisted_2$m, [
23652
+ createBaseVNode("div", _hoisted_3$g, [
23584
23653
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
23585
23654
  return openBlock(), createElementBlock("div", {
23586
23655
  key: index,
23587
23656
  innerHTML: star,
23588
23657
  class: "lupa-rating lupa-rating-not-highlighted"
23589
- }, null, 8, _hoisted_4$9);
23658
+ }, null, 8, _hoisted_4$a);
23590
23659
  }), 128))
23591
23660
  ]),
23592
- createBaseVNode("div", _hoisted_5$4, [
23661
+ createBaseVNode("div", _hoisted_5$5, [
23593
23662
  createBaseVNode("div", {
23594
23663
  class: "lupa-ratings-highlighted",
23595
23664
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -23612,11 +23681,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
23612
23681
  };
23613
23682
  }
23614
23683
  });
23615
- const _hoisted_1$p = {
23684
+ const _hoisted_1$r = {
23616
23685
  class: "lupa-search-results-product-regular-price",
23617
23686
  "data-cy": "lupa-search-results-product-regular-price"
23618
23687
  };
23619
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
23688
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
23620
23689
  __name: "SearchResultsProductRegularPrice",
23621
23690
  props: {
23622
23691
  item: {},
@@ -23634,11 +23703,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
23634
23703
  );
23635
23704
  });
23636
23705
  return (_ctx, _cache) => {
23637
- return openBlock(), createElementBlock("div", _hoisted_1$p, toDisplayString(price.value), 1);
23706
+ return openBlock(), createElementBlock("div", _hoisted_1$r, toDisplayString(price.value), 1);
23638
23707
  };
23639
23708
  }
23640
23709
  });
23641
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
23710
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
23642
23711
  __name: "SearchResultsProductPrice",
23643
23712
  props: {
23644
23713
  item: {},
@@ -23668,10 +23737,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
23668
23737
  };
23669
23738
  }
23670
23739
  });
23671
- const _hoisted_1$o = { class: "lupa-search-results-add-to-cart-wrapper" };
23672
- const _hoisted_2$j = { class: "lupa-search-results-product-addtocart" };
23673
- const _hoisted_3$d = ["onClick", "disabled"];
23674
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
23740
+ const _hoisted_1$q = { class: "lupa-search-results-add-to-cart-wrapper" };
23741
+ const _hoisted_2$l = { class: "lupa-search-results-product-addtocart" };
23742
+ const _hoisted_3$f = ["id", "disabled", "onClick"];
23743
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
23675
23744
  __name: "SearchResultsProductAddToCart",
23676
23745
  props: {
23677
23746
  item: {},
@@ -23691,11 +23760,16 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
23691
23760
  const label = computed(() => {
23692
23761
  return props.options.labels.addToCart;
23693
23762
  });
23763
+ const id = computed(() => {
23764
+ var _a;
23765
+ const id2 = (_a = props.item.id) != null ? _a : "";
23766
+ return `lupa-add-to-cart-${id2}`;
23767
+ });
23694
23768
  const handleClick = () => __async2(this, null, function* () {
23695
23769
  loading.value = true;
23696
23770
  if (props.options.emitEvent) {
23697
23771
  const event = new CustomEvent(props.options.emitEvent, { detail: { item: props.item } });
23698
- window.dispatchEvent(event);
23772
+ document.dispatchEvent(event);
23699
23773
  }
23700
23774
  if (props.options.action) {
23701
23775
  yield props.options.action(props.item, addToCartAmount.value);
@@ -23704,25 +23778,26 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
23704
23778
  loading.value = false;
23705
23779
  });
23706
23780
  return (_ctx, _cache) => {
23707
- return openBlock(), createElementBlock("div", _hoisted_1$o, [
23708
- createBaseVNode("div", _hoisted_2$j, [
23781
+ return openBlock(), createElementBlock("div", _hoisted_1$q, [
23782
+ createBaseVNode("div", _hoisted_2$l, [
23709
23783
  createBaseVNode("button", {
23710
- onClick: withModifiers(handleClick, ["stop"]),
23784
+ id: id.value,
23711
23785
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
23712
23786
  "data-cy": "lupa-add-to-cart",
23713
- disabled: !inStockValue.value || loading.value
23714
- }, toDisplayString(label.value), 11, _hoisted_3$d)
23787
+ disabled: !inStockValue.value || loading.value,
23788
+ onClick: withModifiers(handleClick, ["stop"])
23789
+ }, toDisplayString(label.value), 11, _hoisted_3$f)
23715
23790
  ])
23716
23791
  ]);
23717
23792
  };
23718
23793
  }
23719
23794
  });
23720
- const _hoisted_1$n = ["innerHTML"];
23721
- const _hoisted_2$i = { key: 0 };
23722
- const _hoisted_3$c = { key: 1 };
23723
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
23724
- const _hoisted_5$3 = { class: "lupa-search-box-custom-text" };
23725
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
23795
+ const _hoisted_1$p = ["innerHTML"];
23796
+ const _hoisted_2$k = { key: 0 };
23797
+ const _hoisted_3$e = { key: 1 };
23798
+ const _hoisted_4$9 = { class: "lupa-search-box-custom-label" };
23799
+ const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
23800
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
23726
23801
  __name: "SearchResultsProductCustom",
23727
23802
  props: {
23728
23803
  item: {},
@@ -23760,20 +23835,20 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
23760
23835
  key: 0,
23761
23836
  class: className.value,
23762
23837
  innerHTML: text.value
23763
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$n)) : (openBlock(), createElementBlock("div", mergeProps({
23838
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$p)) : (openBlock(), createElementBlock("div", mergeProps({
23764
23839
  key: 1,
23765
23840
  class: className.value
23766
23841
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
23767
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$c, [
23768
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
23769
- createBaseVNode("div", _hoisted_5$3, toDisplayString(text.value), 1)
23842
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$k, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$e, [
23843
+ createBaseVNode("div", _hoisted_4$9, toDisplayString(label.value), 1),
23844
+ createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
23770
23845
  ]))
23771
23846
  ], 16));
23772
23847
  };
23773
23848
  }
23774
23849
  });
23775
- const _hoisted_1$m = ["innerHTML"];
23776
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
23850
+ const _hoisted_1$o = ["innerHTML"];
23851
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
23777
23852
  __name: "SearchResultsProductCustomHtmlElement",
23778
23853
  props: {
23779
23854
  item: {},
@@ -23804,15 +23879,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
23804
23879
  return openBlock(), createElementBlock("div", mergeProps({
23805
23880
  class: className.value,
23806
23881
  innerHTML: text.value
23807
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$m);
23882
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$o);
23808
23883
  };
23809
23884
  }
23810
23885
  });
23811
- const _hoisted_1$l = { id: "lupa-search-results-rating" };
23812
- const _hoisted_2$h = ["innerHTML"];
23813
- const _hoisted_3$b = { class: "lupa-ratings" };
23814
- const _hoisted_4$7 = ["href"];
23815
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
23886
+ const _hoisted_1$n = { id: "lupa-search-results-rating" };
23887
+ const _hoisted_2$j = ["innerHTML"];
23888
+ const _hoisted_3$d = { class: "lupa-ratings" };
23889
+ const _hoisted_4$8 = ["href"];
23890
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
23816
23891
  __name: "SearchResultsProductSingleStarRating",
23817
23892
  props: {
23818
23893
  item: {},
@@ -23840,35 +23915,35 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
23840
23915
  return RATING_STAR_HTML;
23841
23916
  });
23842
23917
  return (_ctx, _cache) => {
23843
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
23918
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
23844
23919
  createBaseVNode("div", {
23845
23920
  innerHTML: star.value,
23846
23921
  class: "lupa-rating lupa-rating-highlighted"
23847
- }, null, 8, _hoisted_2$h),
23848
- createBaseVNode("div", _hoisted_3$b, toDisplayString(rating.value), 1),
23922
+ }, null, 8, _hoisted_2$j),
23923
+ createBaseVNode("div", _hoisted_3$d, toDisplayString(rating.value), 1),
23849
23924
  createBaseVNode("a", {
23850
23925
  href: ratingLink.value,
23851
23926
  class: "lupa-total-ratings"
23852
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
23927
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$8)
23853
23928
  ]);
23854
23929
  };
23855
23930
  }
23856
23931
  });
23857
23932
  const __default__ = {
23858
23933
  components: {
23859
- SearchResultsProductImage: _sfc_main$x,
23860
- SearchResultsProductTitle: _sfc_main$w,
23861
- SearchResultsProductDescription: _sfc_main$v,
23862
- SearchResultsProductRating: _sfc_main$u,
23863
- SearchResultsProductRegularPrice: _sfc_main$t,
23864
- SearchResultsProductPrice: _sfc_main$s,
23865
- SearchResultsProductAddToCart: _sfc_main$r,
23866
- SearchResultsProductCustom: _sfc_main$q,
23867
- SearchResultsProductCustomHtmlElement: _sfc_main$p,
23868
- SearchResultsProductSingleStarRating: _sfc_main$o
23869
- }
23870
- };
23871
- const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
23934
+ SearchResultsProductImage: _sfc_main$z,
23935
+ SearchResultsProductTitle: _sfc_main$y,
23936
+ SearchResultsProductDescription: _sfc_main$x,
23937
+ SearchResultsProductRating: _sfc_main$w,
23938
+ SearchResultsProductRegularPrice: _sfc_main$v,
23939
+ SearchResultsProductPrice: _sfc_main$u,
23940
+ SearchResultsProductAddToCart: _sfc_main$t,
23941
+ SearchResultsProductCustom: _sfc_main$s,
23942
+ SearchResultsProductCustomHtmlElement: _sfc_main$r,
23943
+ SearchResultsProductSingleStarRating: _sfc_main$q
23944
+ }
23945
+ };
23946
+ const _sfc_main$p = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
23872
23947
  __name: "SearchResultsProductCardElement",
23873
23948
  props: {
23874
23949
  item: {},
@@ -23944,13 +24019,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
23944
24019
  };
23945
24020
  }
23946
24021
  }));
23947
- const _hoisted_1$k = ["href"];
23948
- const _hoisted_2$g = {
24022
+ const _hoisted_1$m = ["href"];
24023
+ const _hoisted_2$i = {
23949
24024
  key: 0,
23950
24025
  class: "lupa-out-of-stock"
23951
24026
  };
23952
- const _hoisted_3$a = { class: "lupa-search-result-product-details-section" };
23953
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
24027
+ const _hoisted_3$c = { class: "lupa-search-result-product-details-section" };
24028
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
23954
24029
  __name: "SearchResultsProductCard",
23955
24030
  props: {
23956
24031
  product: {},
@@ -24102,7 +24177,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24102
24177
  "data-cy": "lupa-search-result-product-card",
24103
24178
  class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
24104
24179
  }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
24105
- createVNode(_sfc_main$12, { options: badgesOptions.value }, null, 8, ["options"]),
24180
+ createVNode(_sfc_main$14, { options: badgesOptions.value }, null, 8, ["options"]),
24106
24181
  createBaseVNode("div", {
24107
24182
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
24108
24183
  }, [
@@ -24112,7 +24187,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24112
24187
  onClick: handleNavigation
24113
24188
  }, [
24114
24189
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
24115
- return openBlock(), createBlock(_sfc_main$n, {
24190
+ return openBlock(), createBlock(_sfc_main$p, {
24116
24191
  class: "lupa-search-results-product-element",
24117
24192
  item: _ctx.product,
24118
24193
  element,
@@ -24123,16 +24198,16 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24123
24198
  onProductEvent: handleProductEvent
24124
24199
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
24125
24200
  }), 128)),
24126
- createVNode(_sfc_main$12, {
24201
+ createVNode(_sfc_main$14, {
24127
24202
  options: badgesOptions.value,
24128
24203
  position: "image",
24129
24204
  class: "lupa-image-badges"
24130
24205
  }, null, 8, ["options"]),
24131
- ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$g, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24132
- ], 8, _hoisted_1$k),
24133
- createBaseVNode("div", _hoisted_3$a, [
24206
+ ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
24207
+ ], 8, _hoisted_1$m),
24208
+ createBaseVNode("div", _hoisted_3$c, [
24134
24209
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
24135
- return openBlock(), createBlock(_sfc_main$n, {
24210
+ return openBlock(), createBlock(_sfc_main$p, {
24136
24211
  class: "lupa-search-results-product-element",
24137
24212
  item: _ctx.product,
24138
24213
  element,
@@ -24150,7 +24225,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24150
24225
  class: normalizeClass("lupa-element-group-" + group)
24151
24226
  }, [
24152
24227
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
24153
- return openBlock(), createBlock(_sfc_main$n, {
24228
+ return openBlock(), createBlock(_sfc_main$p, {
24154
24229
  class: "lupa-search-results-product-element",
24155
24230
  item: _ctx.product,
24156
24231
  element,
@@ -24168,23 +24243,23 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24168
24243
  };
24169
24244
  }
24170
24245
  });
24171
- const _hoisted_1$j = {
24246
+ const _hoisted_1$l = {
24172
24247
  id: "lupa-search-results-similar-queries",
24173
24248
  "data-cy": "lupa-search-results-similar-queries"
24174
24249
  };
24175
- const _hoisted_2$f = { class: "lupa-similar-queries-label" };
24176
- const _hoisted_3$9 = {
24250
+ const _hoisted_2$h = { class: "lupa-similar-queries-label" };
24251
+ const _hoisted_3$b = {
24177
24252
  class: "lupa-similar-query-label",
24178
24253
  "data-cy": "lupa-similar-query-label"
24179
24254
  };
24180
- const _hoisted_4$6 = ["onClick"];
24181
- const _hoisted_5$2 = ["innerHTML"];
24255
+ const _hoisted_4$7 = ["onClick"];
24256
+ const _hoisted_5$3 = ["innerHTML"];
24182
24257
  const _hoisted_6$2 = { key: 0 };
24183
24258
  const _hoisted_7$1 = {
24184
24259
  class: "lupa-products",
24185
24260
  "data-cy": "lupa-products"
24186
24261
  };
24187
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
24262
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
24188
24263
  __name: "SearchResultsSimilarQueries",
24189
24264
  props: {
24190
24265
  labels: {},
@@ -24214,11 +24289,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
24214
24289
  paramsStore.goToResults({ searchText, facet });
24215
24290
  };
24216
24291
  return (_ctx, _cache) => {
24217
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
24218
- createBaseVNode("div", _hoisted_2$f, toDisplayString(_ctx.labels.similarQueries), 1),
24292
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
24293
+ createBaseVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarQueries), 1),
24219
24294
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
24220
24295
  return openBlock(), createElementBlock("div", { key: index }, [
24221
- createBaseVNode("div", _hoisted_3$9, [
24296
+ createBaseVNode("div", _hoisted_3$b, [
24222
24297
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
24223
24298
  createBaseVNode("span", {
24224
24299
  id: "lupa-similar-query-text-component",
@@ -24228,13 +24303,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
24228
24303
  }, [
24229
24304
  createBaseVNode("span", {
24230
24305
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
24231
- }, null, 8, _hoisted_5$2),
24306
+ }, null, 8, _hoisted_5$3),
24232
24307
  similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$2, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
24233
- ], 8, _hoisted_4$6)
24308
+ ], 8, _hoisted_4$7)
24234
24309
  ]),
24235
24310
  createBaseVNode("div", _hoisted_7$1, [
24236
24311
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
24237
- return openBlock(), createBlock(_sfc_main$m, {
24312
+ return openBlock(), createBlock(_sfc_main$o, {
24238
24313
  style: normalizeStyle(_ctx.columnSize),
24239
24314
  key: getDocumentKey(index2, product),
24240
24315
  product,
@@ -24248,15 +24323,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
24248
24323
  };
24249
24324
  }
24250
24325
  });
24251
- const _hoisted_1$i = {
24326
+ const _hoisted_1$k = {
24252
24327
  key: 0,
24253
24328
  class: "lupa-results-additional-panel"
24254
24329
  };
24255
- const _hoisted_2$e = {
24330
+ const _hoisted_2$g = {
24256
24331
  class: "lupa-results-additional-panel-items",
24257
24332
  "data-cy": "lupa-results-additional-panel-items"
24258
24333
  };
24259
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
24334
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
24260
24335
  __name: "AdditionalPanel",
24261
24336
  props: {
24262
24337
  panel: {},
@@ -24328,10 +24403,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
24328
24403
  handleQueryChange();
24329
24404
  });
24330
24405
  return (_ctx, _cache) => {
24331
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
24332
- createBaseVNode("div", _hoisted_2$e, [
24406
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
24407
+ createBaseVNode("div", _hoisted_2$g, [
24333
24408
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
24334
- return openBlock(), createBlock(_sfc_main$m, {
24409
+ return openBlock(), createBlock(_sfc_main$o, {
24335
24410
  key: index,
24336
24411
  product: item,
24337
24412
  options: _ctx.panel,
@@ -24349,11 +24424,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
24349
24424
  };
24350
24425
  }
24351
24426
  });
24352
- const _hoisted_1$h = {
24427
+ const _hoisted_1$j = {
24353
24428
  key: 0,
24354
24429
  class: "lupa-results-additional-panels"
24355
24430
  };
24356
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
24431
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
24357
24432
  __name: "AdditionalPanels",
24358
24433
  props: {
24359
24434
  options: {},
@@ -24370,9 +24445,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
24370
24445
  return locationPanels.value.length > 0;
24371
24446
  });
24372
24447
  return (_ctx, _cache) => {
24373
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
24448
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
24374
24449
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
24375
- return openBlock(), createBlock(_sfc_main$k, {
24450
+ return openBlock(), createBlock(_sfc_main$m, {
24376
24451
  key: panel.queryKey,
24377
24452
  panel,
24378
24453
  options: _ctx.sdkOptions
@@ -24389,29 +24464,29 @@ const _export_sfc = (sfc, props) => {
24389
24464
  }
24390
24465
  return target;
24391
24466
  };
24392
- const _sfc_main$i = {};
24393
- const _hoisted_1$g = { class: "lupa-spinner-wrapper" };
24394
- const _hoisted_2$d = { class: "lupa-spinner" };
24467
+ const _sfc_main$k = {};
24468
+ const _hoisted_1$i = { class: "lupa-spinner-wrapper" };
24469
+ const _hoisted_2$f = { class: "lupa-spinner" };
24395
24470
  function _sfc_render(_ctx, _cache) {
24396
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
24397
- createBaseVNode("div", _hoisted_2$d, [
24471
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
24472
+ createBaseVNode("div", _hoisted_2$f, [
24398
24473
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x2) => {
24399
24474
  return createBaseVNode("div", { key: x2 });
24400
24475
  }), 64))
24401
24476
  ])
24402
24477
  ]);
24403
24478
  }
24404
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render]]);
24405
- const _hoisted_1$f = {
24479
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render]]);
24480
+ const _hoisted_1$h = {
24406
24481
  id: "lupa-search-results-similar-results",
24407
24482
  "data-cy": "lupa-search-results-similar-results"
24408
24483
  };
24409
- const _hoisted_2$c = { class: "lupa-similar-results-label" };
24410
- const _hoisted_3$8 = {
24484
+ const _hoisted_2$e = { class: "lupa-similar-results-label" };
24485
+ const _hoisted_3$a = {
24411
24486
  class: "lupa-products",
24412
24487
  "data-cy": "lupa-products"
24413
24488
  };
24414
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
24489
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
24415
24490
  __name: "SearchResultsSimilarResults",
24416
24491
  props: {
24417
24492
  columnSize: {},
@@ -24427,11 +24502,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
24427
24502
  return getProductKey(`${index}`, product, props.productCardOptions.idKey);
24428
24503
  };
24429
24504
  return (_ctx, _cache) => {
24430
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
24431
- createBaseVNode("div", _hoisted_2$c, toDisplayString(_ctx.labels.similarResultsLabel), 1),
24432
- createBaseVNode("div", _hoisted_3$8, [
24505
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
24506
+ createBaseVNode("div", _hoisted_2$e, toDisplayString(_ctx.labels.similarResultsLabel), 1),
24507
+ createBaseVNode("div", _hoisted_3$a, [
24433
24508
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
24434
- return openBlock(), createBlock(_sfc_main$m, {
24509
+ return openBlock(), createBlock(_sfc_main$o, {
24435
24510
  style: normalizeStyle(_ctx.columnSize),
24436
24511
  key: getDocumentKey(index, product),
24437
24512
  product,
@@ -24443,6 +24518,179 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
24443
24518
  };
24444
24519
  }
24445
24520
  });
24521
+ var RelatedQuerySourceType = /* @__PURE__ */ ((RelatedQuerySourceType2) => {
24522
+ RelatedQuerySourceType2["FACETS"] = "facets";
24523
+ return RelatedQuerySourceType2;
24524
+ })(RelatedQuerySourceType || {});
24525
+ const extractFacetsRelatedSource = (source, searchResults2) => {
24526
+ var _a, _b, _c, _d, _e;
24527
+ const facet = (_a = searchResults2.facets) == null ? void 0 : _a.find((facet2) => facet2.key === source.key);
24528
+ if (!facet) {
24529
+ return [];
24530
+ }
24531
+ if (facet.type === "terms") {
24532
+ return (_c = (_b = facet.items) == null ? void 0 : _b.slice(0, source.count)) == null ? void 0 : _c.map((item) => item.title);
24533
+ }
24534
+ if (facet.type === "hierarchy") {
24535
+ return (_e = (_d = facet.items) == null ? void 0 : _d.slice(0, source.count)) == null ? void 0 : _e.map((item) => item.title);
24536
+ }
24537
+ return [];
24538
+ };
24539
+ const extractRelatedSource = (source, searchResults2) => {
24540
+ switch (source.type) {
24541
+ case RelatedQuerySourceType.FACETS:
24542
+ return extractFacetsRelatedSource(source, searchResults2);
24543
+ }
24544
+ };
24545
+ const _hoisted_1$g = { class: "lupa-related-query-item" };
24546
+ const _hoisted_2$d = { class: "lupa-related-query-image" };
24547
+ const _hoisted_3$9 = { class: "lupa-related-query-label" };
24548
+ const _hoisted_4$6 = { class: "lupa-related-query-title" };
24549
+ const _hoisted_5$2 = {
24550
+ key: 0,
24551
+ class: "lupa-related-query-count"
24552
+ };
24553
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
24554
+ __name: "RelatedQueryPanel",
24555
+ props: {
24556
+ query: {},
24557
+ options: {}
24558
+ },
24559
+ setup(__props) {
24560
+ const props = __props;
24561
+ const loading = ref(false);
24562
+ const relatedQueryResult = ref(null);
24563
+ const optionsStore = useOptionsStore();
24564
+ const { searchResultOptions } = storeToRefs(optionsStore);
24565
+ const mainImage = computed(() => {
24566
+ var _a, _b, _c;
24567
+ return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.elements) == null ? void 0 : _b.find((e2) => e2.type === DocumentElementType.IMAGE)) != null ? _c : "";
24568
+ });
24569
+ const image = computed(() => {
24570
+ var _a, _b, _c;
24571
+ return (_c = (_b = (_a = props.options) == null ? void 0 : _a.image) != null ? _b : mainImage == null ? void 0 : mainImage.value) != null ? _c : "";
24572
+ });
24573
+ const queryKey = computed(() => {
24574
+ var _a, _b;
24575
+ return (_b = (_a = props.options) == null ? void 0 : _a.queryKey) != null ? _b : searchResultOptions.value.queryKey;
24576
+ });
24577
+ computed(() => {
24578
+ var _a, _b;
24579
+ return ((_b = (_a = relatedQueryResult.value) == null ? void 0 : _a.items) == null ? void 0 : _b.length) > 0;
24580
+ });
24581
+ const firstResultItem = computed(() => {
24582
+ var _a, _b;
24583
+ return (_b = (_a = relatedQueryResult.value) == null ? void 0 : _a.items) == null ? void 0 : _b[0];
24584
+ });
24585
+ const totalItemCount = computed(() => {
24586
+ var _a, _b;
24587
+ return (_b = (_a = relatedQueryResult.value) == null ? void 0 : _a.total) != null ? _b : 0;
24588
+ });
24589
+ const searchForRelatedQuery = () => __async2(this, null, function* () {
24590
+ var _a, _b, _c, _d;
24591
+ if (!props.query) {
24592
+ return;
24593
+ }
24594
+ const lupaQuery = { searchText: (_a = props.query) == null ? void 0 : _a.toLowerCase(), limit: 1 };
24595
+ try {
24596
+ loading.value = true;
24597
+ const result2 = yield LupaSearchSdk.query(
24598
+ queryKey.value,
24599
+ lupaQuery,
24600
+ (_b = searchResultOptions.value) == null ? void 0 : _b.options
24601
+ );
24602
+ if (result2.success) {
24603
+ relatedQueryResult.value = result2;
24604
+ }
24605
+ } catch (error) {
24606
+ (_d = (_c = searchResultOptions.value) == null ? void 0 : _c.options) == null ? void 0 : _d.onError(error);
24607
+ } finally {
24608
+ loading.value = false;
24609
+ }
24610
+ });
24611
+ watch(
24612
+ () => props.query,
24613
+ () => {
24614
+ console.log("query changed", props.query);
24615
+ searchForRelatedQuery();
24616
+ }
24617
+ );
24618
+ onMounted(() => {
24619
+ searchForRelatedQuery();
24620
+ });
24621
+ return (_ctx, _cache) => {
24622
+ var _a;
24623
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
24624
+ createBaseVNode("div", _hoisted_2$d, [
24625
+ firstResultItem.value && image.value ? (openBlock(), createBlock(_sfc_main$1k, {
24626
+ key: 0,
24627
+ "wrapper-class": "lupa-related-query-image-wrapper",
24628
+ "image-class": "lupa-related-query-image",
24629
+ item: firstResultItem.value,
24630
+ options: image.value
24631
+ }, null, 8, ["item", "options"])) : createCommentVNode("", true)
24632
+ ]),
24633
+ createBaseVNode("div", _hoisted_3$9, [
24634
+ createBaseVNode("span", _hoisted_4$6, toDisplayString(_ctx.query), 1),
24635
+ ((_a = _ctx.options) == null ? void 0 : _a.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
24636
+ ])
24637
+ ]);
24638
+ };
24639
+ }
24640
+ });
24641
+ const _hoisted_1$f = {
24642
+ key: 0,
24643
+ class: "lupa-related-queries"
24644
+ };
24645
+ const _hoisted_2$c = {
24646
+ key: 0,
24647
+ class: "lupa-related-queries-title"
24648
+ };
24649
+ const _hoisted_3$8 = ["onClick"];
24650
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
24651
+ __name: "RelatedQueries",
24652
+ props: {
24653
+ options: {}
24654
+ },
24655
+ setup(__props) {
24656
+ const props = __props;
24657
+ const searchResultStore = useSearchResultStore();
24658
+ const paramsStore = useParamsStore();
24659
+ const { searchResult } = storeToRefs(searchResultStore);
24660
+ const relatedQueries = computed(() => {
24661
+ if (!props.options || !searchResult.value) {
24662
+ return [];
24663
+ }
24664
+ return extractRelatedSource(props.options.source, searchResult.value);
24665
+ });
24666
+ const hasEnoughRelatedQueries = computed(() => {
24667
+ return relatedQueries.value.length > 1;
24668
+ });
24669
+ const goToResults = ({ searchText }) => {
24670
+ paramsStore.goToResults({ searchText });
24671
+ };
24672
+ return (_ctx, _cache) => {
24673
+ var _a, _b, _c, _d;
24674
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
24675
+ ((_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$c, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
24676
+ createBaseVNode("ul", null, [
24677
+ (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries.value, (query) => {
24678
+ return openBlock(), createElementBlock("li", { key: query }, [
24679
+ createBaseVNode("a", {
24680
+ onClick: ($event) => goToResults({ searchText: query })
24681
+ }, [
24682
+ createVNode(_sfc_main$i, {
24683
+ options: _ctx.options,
24684
+ query
24685
+ }, null, 8, ["options", "query"])
24686
+ ], 8, _hoisted_3$8)
24687
+ ]);
24688
+ }), 128))
24689
+ ])
24690
+ ])) : createCommentVNode("", true);
24691
+ };
24692
+ }
24693
+ });
24446
24694
  const _hoisted_1$e = { id: "lupa-search-results-products" };
24447
24695
  const _hoisted_2$b = {
24448
24696
  class: "lupa-products",
@@ -24572,19 +24820,27 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
24572
24820
  key: 0,
24573
24821
  class: "lupa-loader"
24574
24822
  })) : createCommentVNode("", true),
24823
+ createVNode(_sfc_main$l, {
24824
+ options: _ctx.options,
24825
+ location: "top",
24826
+ sdkOptions: _ctx.options.options
24827
+ }, null, 8, ["options", "sdkOptions"]),
24828
+ createVNode(_sfc_main$h, {
24829
+ options: _ctx.options.relatedQueries
24830
+ }, null, 8, ["options"]),
24575
24831
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
24576
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$E, {
24832
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$G, {
24577
24833
  key: 0,
24578
24834
  options: (_a = _ctx.options.filters) != null ? _a : {}
24579
24835
  }, null, 8, ["options"])) : createCommentVNode("", true),
24580
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$y, {
24836
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$A, {
24581
24837
  key: 1,
24582
24838
  class: "lupa-toolbar-mobile",
24583
24839
  options: _ctx.options,
24584
24840
  "pagination-location": "top",
24585
24841
  onFilter: filter2
24586
24842
  }, null, 8, ["options"])) : createCommentVNode("", true),
24587
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$S, {
24843
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$U, {
24588
24844
  key: 2,
24589
24845
  class: normalizeClass(currentFiltersClass.value),
24590
24846
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -24592,18 +24848,13 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
24592
24848
  expandable: !desktopFiltersExpanded.value
24593
24849
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
24594
24850
  ], 64)) : createCommentVNode("", true),
24595
- createVNode(_sfc_main$j, {
24596
- options: _ctx.options,
24597
- location: "top",
24598
- sdkOptions: _ctx.options.options
24599
- }, null, 8, ["options", "sdkOptions"]),
24600
24851
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
24601
- createVNode(_sfc_main$y, {
24852
+ createVNode(_sfc_main$A, {
24602
24853
  class: "lupa-toolbar-top",
24603
24854
  options: _ctx.options,
24604
24855
  "pagination-location": "top"
24605
24856
  }, null, 8, ["options"]),
24606
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$S, {
24857
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$U, {
24607
24858
  key: 0,
24608
24859
  class: normalizeClass(currentFiltersClass.value),
24609
24860
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -24619,7 +24870,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
24619
24870
  options: productCardOptions.value
24620
24871
  });
24621
24872
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
24622
- return openBlock(), createBlock(_sfc_main$m, {
24873
+ return openBlock(), createBlock(_sfc_main$o, {
24623
24874
  style: normalizeStyle(columnSize.value),
24624
24875
  key: getProductKeyAction(index, product),
24625
24876
  product,
@@ -24635,12 +24886,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
24635
24886
  onClick: goToFirstPage
24636
24887
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
24637
24888
  ])) : createCommentVNode("", true),
24638
- createVNode(_sfc_main$y, {
24889
+ createVNode(_sfc_main$A, {
24639
24890
  class: "lupa-toolbar-bottom",
24640
24891
  options: _ctx.options,
24641
24892
  "pagination-location": "bottom"
24642
24893
  }, null, 8, ["options"]),
24643
- createVNode(_sfc_main$j, {
24894
+ createVNode(_sfc_main$l, {
24644
24895
  options: _ctx.options,
24645
24896
  location: "bottom",
24646
24897
  sdkOptions: _ctx.options.options
@@ -24650,14 +24901,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
24650
24901
  createBaseVNode("span", null, toDisplayString(unref(currentQueryText)), 1)
24651
24902
  ])) : createCommentVNode("", true),
24652
24903
  hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
24653
- createVNode(_sfc_main$l, {
24904
+ createVNode(_sfc_main$n, {
24654
24905
  labels: similarQueriesLabels.value,
24655
24906
  columnSize: columnSize.value,
24656
24907
  productCardOptions: productCardOptions.value
24657
24908
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
24658
24909
  ])) : createCommentVNode("", true),
24659
24910
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
24660
- createVNode(_sfc_main$h, {
24911
+ createVNode(_sfc_main$j, {
24661
24912
  labels: similarResultsLabels.value,
24662
24913
  columnSize: columnSize.value,
24663
24914
  productCardOptions: productCardOptions.value
@@ -24726,14 +24977,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
24726
24977
  ])) : createCommentVNode("", true),
24727
24978
  createBaseVNode("div", _hoisted_4$4, [
24728
24979
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
24729
- return openBlock(), createBlock(_sfc_main$R, {
24980
+ return openBlock(), createBlock(_sfc_main$T, {
24730
24981
  key: getCategoryKey(child),
24731
24982
  item: child,
24732
24983
  options: categoryOptions.value
24733
24984
  }, null, 8, ["item", "options"]);
24734
24985
  }), 128))
24735
24986
  ]),
24736
- createVNode(_sfc_main$y, {
24987
+ createVNode(_sfc_main$A, {
24737
24988
  class: "lupa-toolbar-mobile",
24738
24989
  "pagination-location": "top",
24739
24990
  options: _ctx.options
@@ -24965,8 +25216,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
24965
25216
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
24966
25217
  }, [
24967
25218
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
24968
- createVNode(_sfc_main$W, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
24969
- createVNode(_sfc_main$U, {
25219
+ createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25220
+ createVNode(_sfc_main$W, {
24970
25221
  "show-summary": true,
24971
25222
  options: _ctx.options,
24972
25223
  "is-product-list": (_a = _ctx.isProductList) != null ? _a : false
@@ -24976,17 +25227,17 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
24976
25227
  key: 1,
24977
25228
  options: _ctx.options
24978
25229
  }, null, 8, ["options"])) : createCommentVNode("", true),
24979
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$G, {
25230
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$I, {
24980
25231
  key: 2,
24981
25232
  options: _ctx.options.filters,
24982
25233
  onFilter: handleParamsChange
24983
25234
  }, null, 8, ["options"])) : createCommentVNode("", true),
24984
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$F, {
25235
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$H, {
24985
25236
  key: 3,
24986
25237
  breadcrumbs: _ctx.options.breadcrumbs
24987
25238
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
24988
25239
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
24989
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$H, {
25240
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
24990
25241
  key: 0,
24991
25242
  options: (_b = _ctx.options.filters) != null ? _b : {},
24992
25243
  ref_key: "searchResultsFilters",
@@ -24994,8 +25245,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
24994
25245
  onFilter: handleParamsChange
24995
25246
  }, null, 8, ["options"])) : createCommentVNode("", true),
24996
25247
  createBaseVNode("div", _hoisted_3$5, [
24997
- createVNode(_sfc_main$W, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
24998
- createVNode(_sfc_main$U, {
25248
+ createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25249
+ createVNode(_sfc_main$W, {
24999
25250
  options: _ctx.options,
25000
25251
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
25001
25252
  }, null, 8, ["options", "is-product-list"]),
@@ -25011,13 +25262,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
25011
25262
  }, 8, ["options", "ssr"])
25012
25263
  ])
25013
25264
  ])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
25014
- createVNode(_sfc_main$W, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25015
- createVNode(_sfc_main$U, {
25265
+ createVNode(_sfc_main$Y, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
25266
+ createVNode(_sfc_main$W, {
25016
25267
  options: _ctx.options,
25017
25268
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
25018
25269
  }, null, 8, ["options", "is-product-list"]),
25019
25270
  createBaseVNode("div", _hoisted_4$3, [
25020
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$H, {
25271
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
25021
25272
  key: 0,
25022
25273
  options: (_e = _ctx.options.filters) != null ? _e : {},
25023
25274
  ref_key: "searchResultsFilters",
@@ -30707,7 +30958,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
30707
30958
  onClick: withModifiers(innerClick, ["stop"])
30708
30959
  }, [
30709
30960
  createBaseVNode("div", _hoisted_2$7, [
30710
- createVNode(_sfc_main$X, {
30961
+ createVNode(_sfc_main$Z, {
30711
30962
  options: fullSearchBoxOptions.value,
30712
30963
  "is-search-container": true,
30713
30964
  ref_key: "searchBox",
@@ -31571,7 +31822,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31571
31822
  key: getProductKeyAction(index, product)
31572
31823
  }, {
31573
31824
  default: withCtx(() => [
31574
- createVNode(_sfc_main$m, {
31825
+ createVNode(_sfc_main$o, {
31575
31826
  product,
31576
31827
  options: _ctx.options,
31577
31828
  "click-tracking-settings": clickTrackingSettings.value
@@ -31584,7 +31835,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31584
31835
  _: 1
31585
31836
  }, 16)) : (openBlock(), createElementBlock("div", _hoisted_4$2, [
31586
31837
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
31587
- return openBlock(), createBlock(_sfc_main$m, {
31838
+ return openBlock(), createBlock(_sfc_main$o, {
31588
31839
  style: normalizeStyle(columnSize.value),
31589
31840
  key: getProductKeyAction(index, product),
31590
31841
  product,
@@ -31847,7 +32098,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
31847
32098
  createBaseVNode("a", {
31848
32099
  href: getLink(product)
31849
32100
  }, [
31850
- createVNode(_sfc_main$x, {
32101
+ createVNode(_sfc_main$z, {
31851
32102
  item: product,
31852
32103
  options: image.value
31853
32104
  }, null, 8, ["item", "options"])
@@ -32011,7 +32262,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
32011
32262
  return (_ctx, _cache) => {
32012
32263
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
32013
32264
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
32014
- return openBlock(), createBlock(_sfc_main$m, {
32265
+ return openBlock(), createBlock(_sfc_main$o, {
32015
32266
  class: "lupa-chat-product-card",
32016
32267
  key: getProductKeyAction(index, product),
32017
32268
  product,
@@ -32204,7 +32455,7 @@ const _hoisted_4 = {
32204
32455
  key: 0,
32205
32456
  class: "lupasearch-chat-content"
32206
32457
  };
32207
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
32458
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
32208
32459
  __name: "ChatContainer",
32209
32460
  props: {
32210
32461
  options: {}
@@ -38222,7 +38473,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
38222
38473
  };
38223
38474
  __expose({ fetch: fetch2 });
38224
38475
  return (_ctx, _cache) => {
38225
- return openBlock(), createBlock(unref(_sfc_main$X), {
38476
+ return openBlock(), createBlock(unref(_sfc_main$Z), {
38226
38477
  options: fullSearchBoxOptions.value,
38227
38478
  ref_key: "searchBox",
38228
38479
  ref: searchBox2
@@ -38749,7 +39000,7 @@ const chat = (options, mountOptions) => {
38749
39000
  const instance = createVue(
38750
39001
  options.displayOptions.containerSelector,
38751
39002
  mountOptions == null ? void 0 : mountOptions.mountingBehavior,
38752
- _sfc_main$1q,
39003
+ _sfc_main$1t,
38753
39004
  {
38754
39005
  options
38755
39006
  }