@getlupa/vue 0.22.2 → 0.23.0

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.
Files changed (26) hide show
  1. package/dist/components/product-list/ProductList.vue.d.ts +2 -0
  2. package/dist/components/search-container/SearchContainer.vue.d.ts +2 -0
  3. package/dist/components/search-results/SearchResults.vue.d.ts +4 -0
  4. package/dist/components/search-results/filters/SearchResultsFilters.vue.d.ts +2 -1
  5. package/dist/components/search-results/filters/SortDrawer.vue.d.ts +2 -0
  6. package/dist/components/search-results/filters/facets/DesktopFacetToggle.vue.d.ts +2 -0
  7. package/dist/components/search-results/filters/facets/FacetDisplay.vue.d.ts +5 -1
  8. package/dist/components/search-results/filters/facets/FacetsClearButton.vue.d.ts +10 -0
  9. package/dist/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +1 -6
  10. package/dist/components/search-results/products/SearchResultsSortDrawerToggle.vue.d.ts +2 -0
  11. package/dist/components/search-results/products/sort/DesktopSortToggle.vue.d.ts +2 -0
  12. package/dist/components/search-results/products/sort/SearchResultsSort.vue.d.ts +2 -8
  13. package/dist/components/search-results/products/sort/SortList.vue.d.ts +2 -0
  14. package/dist/composables/useSidebarToggle.d.ts +11 -0
  15. package/dist/composables/useSorting.d.ts +11 -0
  16. package/dist/lupaContainerStyle.css +1 -1
  17. package/dist/lupaSearch.js +1189 -766
  18. package/dist/lupaSearch.mjs +1189 -766
  19. package/dist/stores/options.d.ts +4 -1
  20. package/dist/stores/searchResult.d.ts +20 -8
  21. package/dist/style.css +1 -1
  22. package/dist/types/search-box/SearchBoxOptions.d.ts +1 -0
  23. package/dist/types/search-results/SearchResultsOptions.d.ts +17 -1
  24. package/dist/utils/__tests__/number.utils.spec.d.ts +1 -0
  25. package/dist/utils/number.utils.d.ts +1 -0
  26. package/package.json +1 -1
@@ -11789,8 +11789,18 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
11789
11789
  );
11790
11790
  const trackingOptions = ref({});
11791
11791
  const searchResultInitialFilters = ref({});
11792
+ const expandedFacetsInner = ref([]);
11792
11793
  const productRecommendationOptions = ref({});
11793
11794
  const screenStore = useScreenStore();
11795
+ const expandedFacets = computed({
11796
+ get: () => {
11797
+ var _a25, _b25, _c, _d, _e;
11798
+ return ((_a25 = expandedFacetsInner.value) == null ? void 0 : _a25.length) ? expandedFacetsInner.value : (_e = (_d = (_c = (_b25 = searchResultOptions.value) == null ? void 0 : _b25.filters) == null ? void 0 : _c.facets) == null ? void 0 : _d.expand) != null ? _e : [];
11799
+ },
11800
+ set: (value) => {
11801
+ expandedFacetsInner.value = value;
11802
+ }
11803
+ });
11794
11804
  const envOptions = computed(
11795
11805
  () => {
11796
11806
  var _a25;
@@ -11890,6 +11900,7 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
11890
11900
  currentResolutionPageSizes,
11891
11901
  productRecommendationOptions,
11892
11902
  ariaLabels,
11903
+ expandedFacets,
11893
11904
  setSearchBoxOptions,
11894
11905
  setTrackingOptions,
11895
11906
  setSearchResultOptions,
@@ -13308,7 +13319,7 @@ const getApiUrl = (environment, customBaseUrl) => {
13308
13319
  }
13309
13320
  return Env[environment] || Env["production"];
13310
13321
  };
13311
- const _sfc_main$1A = /* @__PURE__ */ defineComponent({
13322
+ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
13312
13323
  __name: "VoiceSearchProgressCircle",
13313
13324
  props: {
13314
13325
  isRecording: { type: Boolean },
@@ -13521,15 +13532,15 @@ function useVoiceRecorder(options) {
13521
13532
  closeSocket
13522
13533
  };
13523
13534
  }
13524
- const _hoisted_1$1l = {
13535
+ const _hoisted_1$1o = {
13525
13536
  key: 0,
13526
13537
  class: "lupa-dialog-overlay"
13527
13538
  };
13528
- const _hoisted_2$W = { class: "lupa-dialog-content" };
13529
- const _hoisted_3$E = { class: "lupa-listening-text" };
13530
- const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
13531
- const _hoisted_5$l = ["aria-label"];
13532
- const _sfc_main$1z = /* @__PURE__ */ defineComponent({
13539
+ const _hoisted_2$Y = { class: "lupa-dialog-content" };
13540
+ const _hoisted_3$G = { class: "lupa-listening-text" };
13541
+ const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
13542
+ const _hoisted_5$m = ["aria-label"];
13543
+ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
13533
13544
  __name: "VoiceSearchDialog",
13534
13545
  props: {
13535
13546
  isOpen: { type: Boolean },
@@ -13634,21 +13645,21 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
13634
13645
  return (_ctx, _cache) => {
13635
13646
  var _a25, _b25;
13636
13647
  return openBlock(), createElementBlock("div", null, [
13637
- props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
13648
+ props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1o, [
13638
13649
  createElementVNode("button", {
13639
13650
  class: "lupa-dialog-box-close-button",
13640
13651
  onClick: _cache[0] || (_cache[0] = () => emit("close"))
13641
13652
  }),
13642
- createElementVNode("div", _hoisted_2$W, [
13643
- createElementVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
13644
- createElementVNode("div", _hoisted_4$u, [
13653
+ createElementVNode("div", _hoisted_2$Y, [
13654
+ createElementVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
13655
+ createElementVNode("div", _hoisted_4$w, [
13645
13656
  createElementVNode("button", {
13646
13657
  class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
13647
13658
  onClick: handleRecordingButtonClick,
13648
13659
  "aria-controls": "voice-search-microphone",
13649
13660
  "aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
13650
- }, null, 10, _hoisted_5$l),
13651
- createVNode(_sfc_main$1A, {
13661
+ }, null, 10, _hoisted_5$m),
13662
+ createVNode(_sfc_main$1G, {
13652
13663
  ref_key: "voiceSearchProgressBar",
13653
13664
  ref: voiceSearchProgressBar,
13654
13665
  class: "lupa-progress-circle",
@@ -13663,18 +13674,18 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
13663
13674
  };
13664
13675
  }
13665
13676
  });
13666
- const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
13667
- const _hoisted_2$V = { class: "lupa-input-clear" };
13668
- const _hoisted_3$D = { id: "lupa-search-box-input" };
13669
- const _hoisted_4$t = ["value"];
13670
- const _hoisted_5$k = ["aria-label", "placeholder"];
13671
- const _hoisted_6$8 = {
13677
+ const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
13678
+ const _hoisted_2$X = { class: "lupa-input-clear" };
13679
+ const _hoisted_3$F = { id: "lupa-search-box-input" };
13680
+ const _hoisted_4$v = ["value"];
13681
+ const _hoisted_5$l = ["aria-label", "placeholder"];
13682
+ const _hoisted_6$7 = {
13672
13683
  key: 0,
13673
13684
  class: "lupa-close-label"
13674
13685
  };
13675
13686
  const _hoisted_7$5 = { key: 1 };
13676
13687
  const _hoisted_8$3 = ["aria-label"];
13677
- const _sfc_main$1y = /* @__PURE__ */ defineComponent({
13688
+ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
13678
13689
  __name: "SearchBoxInput",
13679
13690
  props: {
13680
13691
  options: {},
@@ -13806,20 +13817,20 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
13806
13817
  };
13807
13818
  __expose({ focus });
13808
13819
  return (_ctx, _cache) => {
13809
- return openBlock(), createElementBlock("div", _hoisted_1$1k, [
13810
- createElementVNode("div", _hoisted_2$V, [
13820
+ return openBlock(), createElementBlock("div", _hoisted_1$1n, [
13821
+ createElementVNode("div", _hoisted_2$X, [
13811
13822
  createElementVNode("div", {
13812
13823
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
13813
13824
  onClick: clear
13814
13825
  }, null, 2)
13815
13826
  ]),
13816
- createElementVNode("div", _hoisted_3$D, [
13827
+ createElementVNode("div", _hoisted_3$F, [
13817
13828
  createElementVNode("input", {
13818
13829
  class: "lupa-hint",
13819
13830
  "aria-hidden": "true",
13820
13831
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
13821
13832
  disabled: ""
13822
- }, null, 8, _hoisted_4$t),
13833
+ }, null, 8, _hoisted_4$v),
13823
13834
  withDirectives(createElementVNode("input", mergeProps({
13824
13835
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
13825
13836
  }, inputAttributes.value, {
@@ -13833,7 +13844,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
13833
13844
  placeholder: labels.value.placeholder,
13834
13845
  onInput: handleInput,
13835
13846
  onFocus: handleFocus
13836
- }), null, 16, _hoisted_5$k), [
13847
+ }), null, 16, _hoisted_5$l), [
13837
13848
  [vModelText, inputValue.value]
13838
13849
  ]),
13839
13850
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -13848,7 +13859,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
13848
13859
  class: "lupa-close-search-container",
13849
13860
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
13850
13861
  }, [
13851
- labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
13862
+ labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
13852
13863
  ])) : createCommentVNode("", true),
13853
13864
  isVoiceSearchEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
13854
13865
  createElementVNode("button", {
@@ -13859,7 +13870,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
13859
13870
  "aria-label": voiceSearchAriaLabel.value
13860
13871
  }, null, 8, _hoisted_8$3)
13861
13872
  ])) : createCommentVNode("", true),
13862
- isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1z, {
13873
+ isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1F, {
13863
13874
  key: 2,
13864
13875
  ref_key: "voiceDialogOverlay",
13865
13876
  ref: voiceDialogOverlay,
@@ -13873,7 +13884,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
13873
13884
  };
13874
13885
  }
13875
13886
  });
13876
- const _sfc_main$1x = /* @__PURE__ */ defineComponent({
13887
+ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
13877
13888
  __name: "SearchBoxMoreResults",
13878
13889
  props: {
13879
13890
  labels: {},
@@ -13911,9 +13922,9 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
13911
13922
  };
13912
13923
  }
13913
13924
  });
13914
- const _hoisted_1$1j = { class: "lupa-search-box-history-item" };
13915
- const _hoisted_2$U = { class: "lupa-search-box-history-item-content" };
13916
- const _sfc_main$1w = /* @__PURE__ */ defineComponent({
13925
+ const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
13926
+ const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
13927
+ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
13917
13928
  __name: "SearchBoxHistoryItem",
13918
13929
  props: {
13919
13930
  item: {},
@@ -13930,8 +13941,8 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
13930
13941
  emit("click", { query: props.item });
13931
13942
  };
13932
13943
  return (_ctx, _cache) => {
13933
- return openBlock(), createElementBlock("div", _hoisted_1$1j, [
13934
- createElementVNode("div", _hoisted_2$U, [
13944
+ return openBlock(), createElementBlock("div", _hoisted_1$1m, [
13945
+ createElementVNode("div", _hoisted_2$W, [
13935
13946
  createElementVNode("div", {
13936
13947
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
13937
13948
  onClick: click2
@@ -13945,11 +13956,11 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
13945
13956
  };
13946
13957
  }
13947
13958
  });
13948
- const _hoisted_1$1i = {
13959
+ const _hoisted_1$1l = {
13949
13960
  key: 0,
13950
13961
  class: "lupa-search-box-history-panel"
13951
13962
  };
13952
- const _sfc_main$1v = /* @__PURE__ */ defineComponent({
13963
+ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
13953
13964
  __name: "SearchBoxHistoryPanel",
13954
13965
  props: {
13955
13966
  options: {}
@@ -14000,9 +14011,9 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
14000
14011
  }
14001
14012
  };
14002
14013
  return (_ctx, _cache) => {
14003
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1i, [
14014
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
14004
14015
  (openBlock(true), createElementBlock(Fragment, null, renderList(limitedHistory.value, (item, index) => {
14005
- return openBlock(), createBlock(_sfc_main$1w, {
14016
+ return openBlock(), createBlock(_sfc_main$1C, {
14006
14017
  key: item,
14007
14018
  item,
14008
14019
  highlighted: index === highlightIndex.value,
@@ -14018,15 +14029,15 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
14018
14029
  };
14019
14030
  }
14020
14031
  });
14021
- const _hoisted_1$1h = { class: "lupa-search-box-no-results" };
14022
- const _sfc_main$1u = /* @__PURE__ */ defineComponent({
14032
+ const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
14033
+ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
14023
14034
  __name: "SearchBoxNoResults",
14024
14035
  props: {
14025
14036
  labels: {}
14026
14037
  },
14027
14038
  setup(__props) {
14028
14039
  return (_ctx, _cache) => {
14029
- return openBlock(), createElementBlock("p", _hoisted_1$1h, toDisplayString(_ctx.labels.noResults), 1);
14040
+ return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
14030
14041
  };
14031
14042
  }
14032
14043
  });
@@ -14058,26 +14069,26 @@ const generateGridTemplate = (elements) => {
14058
14069
  }
14059
14070
  return gridTemplate.join(" ");
14060
14071
  };
14061
- const _hoisted_1$1g = ["innerHTML"];
14062
- const _hoisted_2$T = {
14072
+ const _hoisted_1$1j = ["innerHTML"];
14073
+ const _hoisted_2$V = {
14063
14074
  key: 1,
14064
14075
  "data-cy": "lupa-suggestion-value",
14065
14076
  class: "lupa-suggestion-value"
14066
14077
  };
14067
- const _hoisted_3$C = {
14078
+ const _hoisted_3$E = {
14068
14079
  key: 2,
14069
14080
  class: "lupa-suggestion-facet",
14070
14081
  "data-cy": "lupa-suggestion-facet"
14071
14082
  };
14072
- const _hoisted_4$s = {
14083
+ const _hoisted_4$u = {
14073
14084
  class: "lupa-suggestion-facet-label",
14074
14085
  "data-cy": "lupa-suggestion-facet-label"
14075
14086
  };
14076
- const _hoisted_5$j = {
14087
+ const _hoisted_5$k = {
14077
14088
  class: "lupa-suggestion-facet-value",
14078
14089
  "data-cy": "lupa-suggestion-facet-value"
14079
14090
  };
14080
- const _sfc_main$1t = /* @__PURE__ */ defineComponent({
14091
+ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
14081
14092
  __name: "SearchBoxSuggestion",
14082
14093
  props: {
14083
14094
  suggestion: {},
@@ -14114,20 +14125,20 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
14114
14125
  class: "lupa-suggestion-value",
14115
14126
  "data-cy": "lupa-suggestion-value",
14116
14127
  innerHTML: _ctx.suggestion.displayHighlight
14117
- }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
14118
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
14119
- createElementVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
14120
- createElementVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
14128
+ }, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
14129
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
14130
+ createElementVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
14131
+ createElementVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
14121
14132
  ])) : createCommentVNode("", true)
14122
14133
  ]);
14123
14134
  };
14124
14135
  }
14125
14136
  });
14126
- const _hoisted_1$1f = {
14137
+ const _hoisted_1$1i = {
14127
14138
  id: "lupa-search-box-suggestions",
14128
14139
  "data-cy": "lupa-search-box-suggestions"
14129
14140
  };
14130
- const _sfc_main$1s = /* @__PURE__ */ defineComponent({
14141
+ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
14131
14142
  __name: "SearchBoxSuggestions",
14132
14143
  props: {
14133
14144
  items: {},
@@ -14194,9 +14205,9 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
14194
14205
  });
14195
14206
  });
14196
14207
  return (_ctx, _cache) => {
14197
- return openBlock(), createElementBlock("div", _hoisted_1$1f, [
14208
+ return openBlock(), createElementBlock("div", _hoisted_1$1i, [
14198
14209
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
14199
- return openBlock(), createBlock(_sfc_main$1t, {
14210
+ return openBlock(), createBlock(_sfc_main$1z, {
14200
14211
  key: getSuggestionKey(item),
14201
14212
  class: normalizeClass([
14202
14213
  "lupa-suggestion",
@@ -14228,7 +14239,7 @@ const debounce = (func, timeout) => {
14228
14239
  }, timeout);
14229
14240
  };
14230
14241
  };
14231
- const _sfc_main$1r = /* @__PURE__ */ defineComponent({
14242
+ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
14232
14243
  __name: "SearchBoxSuggestionsWrapper",
14233
14244
  props: {
14234
14245
  panel: {},
@@ -14271,7 +14282,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
14271
14282
  const getSuggestionsDebounced = debounce(getSuggestions, props.debounce);
14272
14283
  watch(() => props.panel.limit, getSuggestionsDebounced);
14273
14284
  return (_ctx, _cache) => {
14274
- return openBlock(), createBlock(_sfc_main$1s, {
14285
+ return openBlock(), createBlock(_sfc_main$1y, {
14275
14286
  items: searchResult.value,
14276
14287
  highlight: _ctx.panel.highlight,
14277
14288
  queryKey: _ctx.panel.queryKey,
@@ -23611,9 +23622,9 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
23611
23622
  targetImage.src = placeholder;
23612
23623
  }
23613
23624
  };
23614
- const _hoisted_1$1e = ["src"];
23615
- const _hoisted_2$S = ["src"];
23616
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
23625
+ const _hoisted_1$1h = ["src"];
23626
+ const _hoisted_2$U = ["src"];
23627
+ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
23617
23628
  __name: "ProductImage",
23618
23629
  props: {
23619
23630
  item: {},
@@ -23755,7 +23766,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
23755
23766
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
23756
23767
  onError: replaceWithPlaceholder,
23757
23768
  key: finalUrl.value
23758
- }), null, 16, _hoisted_1$1e))
23769
+ }), null, 16, _hoisted_1$1h))
23759
23770
  ]),
23760
23771
  _: 1
23761
23772
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -23763,12 +23774,12 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
23763
23774
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
23764
23775
  style: styleOverride.value,
23765
23776
  src: finalMainImageUrl.value
23766
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$S))
23777
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$U))
23767
23778
  ], 38);
23768
23779
  };
23769
23780
  }
23770
23781
  });
23771
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
23782
+ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
23772
23783
  __name: "SearchBoxProductImage",
23773
23784
  props: {
23774
23785
  item: {},
@@ -23776,7 +23787,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
23776
23787
  },
23777
23788
  setup(__props) {
23778
23789
  return (_ctx, _cache) => {
23779
- return openBlock(), createBlock(_sfc_main$1q, {
23790
+ return openBlock(), createBlock(_sfc_main$1w, {
23780
23791
  item: _ctx.item,
23781
23792
  options: _ctx.options,
23782
23793
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -23785,12 +23796,12 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
23785
23796
  };
23786
23797
  }
23787
23798
  });
23788
- const _hoisted_1$1d = ["innerHTML"];
23789
- const _hoisted_2$R = {
23799
+ const _hoisted_1$1g = ["innerHTML"];
23800
+ const _hoisted_2$T = {
23790
23801
  key: 1,
23791
23802
  class: "lupa-search-box-product-title"
23792
23803
  };
23793
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
23804
+ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
23794
23805
  __name: "SearchBoxProductTitle",
23795
23806
  props: {
23796
23807
  item: {},
@@ -23813,18 +23824,18 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
23813
23824
  key: 0,
23814
23825
  class: "lupa-search-box-product-title",
23815
23826
  innerHTML: sanitizedTitle.value
23816
- }, null, 8, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", _hoisted_2$R, [
23827
+ }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, [
23817
23828
  createElementVNode("strong", null, toDisplayString(title.value), 1)
23818
23829
  ]));
23819
23830
  };
23820
23831
  }
23821
23832
  });
23822
- const _hoisted_1$1c = ["innerHTML"];
23823
- const _hoisted_2$Q = {
23833
+ const _hoisted_1$1f = ["innerHTML"];
23834
+ const _hoisted_2$S = {
23824
23835
  key: 1,
23825
23836
  class: "lupa-search-box-product-description"
23826
23837
  };
23827
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
23838
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
23828
23839
  __name: "SearchBoxProductDescription",
23829
23840
  props: {
23830
23841
  item: {},
@@ -23847,12 +23858,12 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
23847
23858
  key: 0,
23848
23859
  class: "lupa-search-box-product-description",
23849
23860
  innerHTML: sanitizedDescription.value
23850
- }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(description.value), 1));
23861
+ }, null, 8, _hoisted_1$1f)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(description.value), 1));
23851
23862
  };
23852
23863
  }
23853
23864
  });
23854
- const _hoisted_1$1b = { class: "lupa-search-box-product-price" };
23855
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
23865
+ const _hoisted_1$1e = { class: "lupa-search-box-product-price" };
23866
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
23856
23867
  __name: "SearchBoxProductPrice",
23857
23868
  props: {
23858
23869
  item: {},
@@ -23874,13 +23885,13 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
23874
23885
  );
23875
23886
  });
23876
23887
  return (_ctx, _cache) => {
23877
- return openBlock(), createElementBlock("div", _hoisted_1$1b, [
23888
+ return openBlock(), createElementBlock("div", _hoisted_1$1e, [
23878
23889
  createElementVNode("strong", null, toDisplayString(price.value), 1)
23879
23890
  ]);
23880
23891
  };
23881
23892
  }
23882
23893
  });
23883
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
23894
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
23884
23895
  __name: "SearchBoxProductRegularPrice",
23885
23896
  props: {
23886
23897
  item: {},
@@ -23911,12 +23922,12 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
23911
23922
  };
23912
23923
  }
23913
23924
  });
23914
- const _hoisted_1$1a = ["innerHTML"];
23915
- const _hoisted_2$P = { key: 0 };
23916
- const _hoisted_3$B = { key: 1 };
23917
- const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
23918
- const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
23919
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
23925
+ const _hoisted_1$1d = ["innerHTML"];
23926
+ const _hoisted_2$R = { key: 0 };
23927
+ const _hoisted_3$D = { key: 1 };
23928
+ const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
23929
+ const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
23930
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
23920
23931
  __name: "SearchBoxProductCustom",
23921
23932
  props: {
23922
23933
  item: {},
@@ -23942,20 +23953,20 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
23942
23953
  key: 0,
23943
23954
  class: [className.value, "lupa-search-box-product-custom"],
23944
23955
  innerHTML: text.value
23945
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", mergeProps({
23956
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", mergeProps({
23946
23957
  key: 1,
23947
23958
  class: [className.value, "lupa-search-box-product-custom"]
23948
23959
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
23949
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
23950
- createElementVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
23951
- createElementVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
23960
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
23961
+ createElementVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
23962
+ createElementVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
23952
23963
  ]))
23953
23964
  ], 16));
23954
23965
  };
23955
23966
  }
23956
23967
  });
23957
- const _hoisted_1$19 = ["innerHTML"];
23958
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
23968
+ const _hoisted_1$1c = ["innerHTML"];
23969
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
23959
23970
  __name: "SearchBoxProductCustomHtml",
23960
23971
  props: {
23961
23972
  item: {},
@@ -23980,7 +23991,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
23980
23991
  return openBlock(), createElementBlock("div", mergeProps({
23981
23992
  class: className.value,
23982
23993
  innerHTML: text.value
23983
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$19);
23994
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$1c);
23984
23995
  };
23985
23996
  }
23986
23997
  });
@@ -24038,7 +24049,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
24038
24049
  const loadingFacets = ref(false);
24039
24050
  const loadingRefiners = ref(false);
24040
24051
  const loadingRelatedQueries = ref(false);
24041
- const isMobileSidebarVisible = ref(false);
24052
+ const isFilterSidebarVisible = ref(false);
24053
+ const isSidebarClosing = ref(false);
24054
+ const isSortingSidebarVisible = ref(false);
24042
24055
  const relatedCategoryChildren = ref([]);
24043
24056
  const lastRequestId = ref("");
24044
24057
  const searchRequestResults = ref({});
@@ -24120,16 +24133,36 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
24120
24133
  return hasResults.value && ((_a25 = searchResult.value.offset) != null ? _a25 : 0) >= totalItems.value;
24121
24134
  }
24122
24135
  );
24136
+ const toggleSidebarState = ({
24137
+ visible,
24138
+ sidebar = "filter"
24139
+ }) => {
24140
+ if (sidebar === "sorting") {
24141
+ isSortingSidebarVisible.value = visible;
24142
+ return;
24143
+ }
24144
+ isFilterSidebarVisible.value = visible;
24145
+ };
24123
24146
  const setSidebarState = ({
24124
24147
  visible,
24125
- disableBodyScrolling = true
24148
+ disableBodyScrolling = true,
24149
+ sidebar = "filter"
24126
24150
  }) => {
24151
+ var _a25, _b25, _c, _d;
24127
24152
  if (visible && disableBodyScrolling) {
24128
24153
  disableBodyScroll();
24129
24154
  } else {
24130
24155
  enableBodyScroll();
24131
24156
  }
24132
- isMobileSidebarVisible.value = visible;
24157
+ if (visible || !((_d = (_c = (_b25 = (_a25 = searchResultOptions == null ? void 0 : searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.drawer) == null ? void 0 : _d.sidebarCloseDelay)) {
24158
+ toggleSidebarState({ visible, sidebar });
24159
+ } else {
24160
+ isSidebarClosing.value = true;
24161
+ setTimeout(() => {
24162
+ toggleSidebarState({ visible, sidebar });
24163
+ isSidebarClosing.value = false;
24164
+ }, searchResultOptions.value.filters.facets.style.drawer.sidebarCloseDelay);
24165
+ }
24133
24166
  };
24134
24167
  const queryFacet = (_0) => __async(null, [_0], function* ({ queryKey, facetKey }) {
24135
24168
  var _a25, _b25, _c, _d;
@@ -24231,13 +24264,28 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
24231
24264
  const setRelatedCategoryChildren = (children) => {
24232
24265
  relatedCategoryChildren.value = [...children];
24233
24266
  };
24267
+ const preconfiguredRelatedQueryKeys = computed(() => {
24268
+ var _a25, _b25, _c, _d, _e;
24269
+ return (_e = (_d = (_c = (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.source) == null ? void 0 : _c.queries) == null ? void 0 : _d.map((q) => q.facetKey)) != null ? _e : [];
24270
+ });
24271
+ const relatedQueryFacetKeys = computed(() => {
24272
+ var _a25, _b25, _c;
24273
+ const keysFromRelatedResults = (_c = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.map((rq) => rq.facetKey)) != null ? _c : [];
24274
+ return Array.from(/* @__PURE__ */ new Set([...preconfiguredRelatedQueryKeys.value, ...keysFromRelatedResults]));
24275
+ });
24234
24276
  const queryRelatedQueries = (queryKey, publicQuery, result2, options) => __async(null, null, function* () {
24235
- var _a25, _b25;
24277
+ var _a25, _b25, _c;
24236
24278
  loadingRelatedQueries.value = true;
24237
24279
  const context = getLupaTrackingContext();
24238
24280
  const searchText = (_b25 = (_a25 = result2.suggestedSearchText) != null ? _a25 : result2.searchText) != null ? _b25 : "";
24281
+ const publicQueryFiltersWithoutRelatedKeys = __spreadValues({}, (_c = publicQuery.filters) != null ? _c : {});
24282
+ relatedQueryFacetKeys.value.forEach((facetKey) => {
24283
+ delete publicQueryFiltersWithoutRelatedKeys[facetKey];
24284
+ });
24285
+ const hasRemainingFilters = Object.keys(publicQueryFiltersWithoutRelatedKeys != null ? publicQueryFiltersWithoutRelatedKeys : {}).length > 0;
24239
24286
  const query = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, publicQuery), {
24240
- searchText
24287
+ searchText,
24288
+ filters: hasRemainingFilters ? publicQueryFiltersWithoutRelatedKeys : void 0
24241
24289
  }), context), {
24242
24290
  modifiers: { facets: false, refiners: true }
24243
24291
  });
@@ -24253,7 +24301,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
24253
24301
  });
24254
24302
  });
24255
24303
  return {
24256
- isMobileSidebarVisible,
24304
+ isFilterSidebarVisible,
24305
+ isSortingSidebarVisible,
24306
+ isSidebarClosing,
24257
24307
  searchResult,
24258
24308
  columnCount,
24259
24309
  addToCartAmount,
@@ -24279,6 +24329,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
24279
24329
  relatedQueriesResult,
24280
24330
  relatedQueriesApiEnabled,
24281
24331
  lastResultsSource,
24332
+ relatedQueryFacetKeys,
24282
24333
  setSidebarState,
24283
24334
  queryFacet,
24284
24335
  setLastRequestId,
@@ -24295,12 +24346,12 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
24295
24346
  setRelatedQueriesApiEnabled
24296
24347
  };
24297
24348
  });
24298
- const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
24299
- const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
24300
- const _hoisted_3$A = ["disabled"];
24301
- const _hoisted_4$q = ["href"];
24302
- const _hoisted_5$h = ["disabled"];
24303
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
24349
+ const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
24350
+ const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
24351
+ const _hoisted_3$C = ["disabled"];
24352
+ const _hoisted_4$s = ["href"];
24353
+ const _hoisted_5$i = ["disabled"];
24354
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
24304
24355
  __name: "SearchBoxProductAddToCart",
24305
24356
  props: {
24306
24357
  item: {},
@@ -24346,45 +24397,45 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
24346
24397
  return Boolean(props.link && props.options.link);
24347
24398
  });
24348
24399
  return (_ctx, _cache) => {
24349
- return openBlock(), createElementBlock("div", _hoisted_1$18, [
24350
- createElementVNode("div", _hoisted_2$O, [
24400
+ return openBlock(), createElementBlock("div", _hoisted_1$1b, [
24401
+ createElementVNode("div", _hoisted_2$Q, [
24351
24402
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
24352
24403
  key: 0,
24353
24404
  class: addToCartButtonClass.value,
24354
24405
  "data-cy": "lupa-add-to-cart",
24355
24406
  disabled: !inStockValue.value || loading.value
24356
24407
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
24357
- createElementVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
24358
- ], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
24408
+ createElementVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
24409
+ ], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
24359
24410
  key: 1,
24360
24411
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
24361
24412
  class: addToCartButtonClass.value,
24362
24413
  "data-cy": "lupa-add-to-cart",
24363
24414
  type: "button",
24364
24415
  disabled: !inStockValue.value || loading.value
24365
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
24416
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
24366
24417
  ])
24367
24418
  ]);
24368
24419
  };
24369
24420
  }
24370
24421
  });
24371
- const _hoisted_1$17 = {
24422
+ const _hoisted_1$1a = {
24372
24423
  key: 1,
24373
24424
  class: "lupa-search-box-element-badge-wrapper"
24374
24425
  };
24375
24426
  const __default__$4 = {
24376
24427
  components: {
24377
- SearchBoxProductImage: _sfc_main$1p,
24378
- SearchBoxProductTitle: _sfc_main$1o,
24379
- SearchBoxProductDescription: _sfc_main$1n,
24380
- SearchBoxProductPrice: _sfc_main$1m,
24381
- SearchBoxProductRegularPrice: _sfc_main$1l,
24382
- SearchBoxProductCustom: _sfc_main$1k,
24383
- SearchBoxProductCustomHtml: _sfc_main$1j,
24384
- SearchBoxProductAddToCart: _sfc_main$1i
24428
+ SearchBoxProductImage: _sfc_main$1v,
24429
+ SearchBoxProductTitle: _sfc_main$1u,
24430
+ SearchBoxProductDescription: _sfc_main$1t,
24431
+ SearchBoxProductPrice: _sfc_main$1s,
24432
+ SearchBoxProductRegularPrice: _sfc_main$1r,
24433
+ SearchBoxProductCustom: _sfc_main$1q,
24434
+ SearchBoxProductCustomHtml: _sfc_main$1p,
24435
+ SearchBoxProductAddToCart: _sfc_main$1o
24385
24436
  }
24386
24437
  };
24387
- const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
24438
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
24388
24439
  __name: "SearchBoxProductElement",
24389
24440
  props: {
24390
24441
  item: {},
@@ -24456,7 +24507,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
24456
24507
  "dynamic-attributes": dynamicAttributes.value,
24457
24508
  link: _ctx.link
24458
24509
  }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
24459
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$17, [
24510
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$1a, [
24460
24511
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
24461
24512
  key: 0,
24462
24513
  item: enhancedItem.value,
@@ -24471,14 +24522,14 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
24471
24522
  };
24472
24523
  }
24473
24524
  }));
24474
- const _hoisted_1$16 = { class: "lupa-badge-title" };
24475
- const _hoisted_2$N = ["src"];
24476
- const _hoisted_3$z = { key: 1 };
24477
- const _hoisted_4$p = {
24525
+ const _hoisted_1$19 = { class: "lupa-badge-title" };
24526
+ const _hoisted_2$P = ["src"];
24527
+ const _hoisted_3$B = { key: 1 };
24528
+ const _hoisted_4$r = {
24478
24529
  key: 0,
24479
24530
  class: "lupa-badge-full-text"
24480
24531
  };
24481
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
24532
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
24482
24533
  __name: "SearchResultGeneratedBadge",
24483
24534
  props: {
24484
24535
  options: {},
@@ -24511,20 +24562,20 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
24511
24562
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
24512
24563
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
24513
24564
  }, [
24514
- createElementVNode("span", _hoisted_1$16, [
24565
+ createElementVNode("span", _hoisted_1$19, [
24515
24566
  image.value ? (openBlock(), createElementBlock("img", {
24516
24567
  key: 0,
24517
24568
  src: image.value
24518
- }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
24519
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
24569
+ }, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
24570
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
24520
24571
  ]),
24521
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24572
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24522
24573
  ], 6);
24523
24574
  };
24524
24575
  }
24525
24576
  });
24526
- const _hoisted_1$15 = { class: "lupa-generated-badges" };
24527
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24577
+ const _hoisted_1$18 = { class: "lupa-generated-badges" };
24578
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
24528
24579
  __name: "SearchResultGeneratedBadges",
24529
24580
  props: {
24530
24581
  options: {}
@@ -24550,9 +24601,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24550
24601
  })).filter((b) => Boolean(b.id));
24551
24602
  });
24552
24603
  return (_ctx, _cache) => {
24553
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
24604
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
24554
24605
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
24555
- return openBlock(), createBlock(_sfc_main$1g, {
24606
+ return openBlock(), createBlock(_sfc_main$1m, {
24556
24607
  key: badge.id,
24557
24608
  badge,
24558
24609
  options: _ctx.options
@@ -24562,8 +24613,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24562
24613
  };
24563
24614
  }
24564
24615
  });
24565
- const _hoisted_1$14 = ["innerHTML"];
24566
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
24616
+ const _hoisted_1$17 = ["innerHTML"];
24617
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
24567
24618
  __name: "CustomBadge",
24568
24619
  props: {
24569
24620
  badge: {}
@@ -24584,12 +24635,12 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
24584
24635
  return openBlock(), createElementBlock("div", {
24585
24636
  class: normalizeClass(className.value),
24586
24637
  innerHTML: text.value
24587
- }, null, 10, _hoisted_1$14);
24638
+ }, null, 10, _hoisted_1$17);
24588
24639
  };
24589
24640
  }
24590
24641
  });
24591
- const _hoisted_1$13 = { class: "lupa-text-badges" };
24592
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
24642
+ const _hoisted_1$16 = { class: "lupa-text-badges" };
24643
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
24593
24644
  __name: "TextBadge",
24594
24645
  props: {
24595
24646
  badge: {}
@@ -24603,7 +24654,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
24603
24654
  return badges.value.slice(0, props.badge.maxItems);
24604
24655
  });
24605
24656
  return (_ctx, _cache) => {
24606
- return openBlock(), createElementBlock("div", _hoisted_1$13, [
24657
+ return openBlock(), createElementBlock("div", _hoisted_1$16, [
24607
24658
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
24608
24659
  return openBlock(), createElementBlock("div", {
24609
24660
  class: "lupa-badge lupa-text-badge",
@@ -24614,9 +24665,9 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
24614
24665
  };
24615
24666
  }
24616
24667
  });
24617
- const _hoisted_1$12 = { class: "lupa-image-badges" };
24618
- const _hoisted_2$M = ["src"];
24619
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
24668
+ const _hoisted_1$15 = { class: "lupa-image-badges" };
24669
+ const _hoisted_2$O = ["src"];
24670
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
24620
24671
  __name: "ImageBadge",
24621
24672
  props: {
24622
24673
  badge: {}
@@ -24636,7 +24687,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
24636
24687
  return `${props.badge.rootImageUrl}${src}`;
24637
24688
  };
24638
24689
  return (_ctx, _cache) => {
24639
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
24690
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
24640
24691
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
24641
24692
  return openBlock(), createElementBlock("div", {
24642
24693
  class: "lupa-badge lupa-image-badge",
@@ -24644,14 +24695,14 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
24644
24695
  }, [
24645
24696
  createElementVNode("img", {
24646
24697
  src: getImageUrl(item)
24647
- }, null, 8, _hoisted_2$M)
24698
+ }, null, 8, _hoisted_2$O)
24648
24699
  ]);
24649
24700
  }), 128))
24650
24701
  ]);
24651
24702
  };
24652
24703
  }
24653
24704
  });
24654
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
24705
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
24655
24706
  __name: "DiscountBadge",
24656
24707
  props: {
24657
24708
  badge: {}
@@ -24713,16 +24764,16 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
24713
24764
  };
24714
24765
  }
24715
24766
  });
24716
- const _hoisted_1$11 = { id: "lupa-search-results-badges" };
24767
+ const _hoisted_1$14 = { id: "lupa-search-results-badges" };
24717
24768
  const __default__$3 = {
24718
24769
  components: {
24719
- CustomBadge: _sfc_main$1e,
24720
- TextBadge: _sfc_main$1d,
24721
- ImageBadge: _sfc_main$1c,
24722
- DiscountBadge: _sfc_main$1b
24770
+ CustomBadge: _sfc_main$1k,
24771
+ TextBadge: _sfc_main$1j,
24772
+ ImageBadge: _sfc_main$1i,
24773
+ DiscountBadge: _sfc_main$1h
24723
24774
  }
24724
24775
  };
24725
- const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$3), {
24776
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$3), {
24726
24777
  __name: "SearchResultsBadgeWrapper",
24727
24778
  props: {
24728
24779
  position: {},
@@ -24785,7 +24836,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
24785
24836
  }
24786
24837
  };
24787
24838
  return (_ctx, _cache) => {
24788
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
24839
+ return openBlock(), createElementBlock("div", _hoisted_1$14, [
24789
24840
  createElementVNode("div", {
24790
24841
  id: "lupa-badges",
24791
24842
  class: normalizeClass(anchorPosition.value)
@@ -24796,7 +24847,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
24796
24847
  badge
24797
24848
  }, null, 8, ["badge"]);
24798
24849
  }), 128)),
24799
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1f, {
24850
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1l, {
24800
24851
  key: 0,
24801
24852
  options: _ctx.options
24802
24853
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -24805,13 +24856,13 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
24805
24856
  };
24806
24857
  }
24807
24858
  }));
24808
- const _hoisted_1$10 = ["href"];
24809
- const _hoisted_2$L = { class: "lupa-search-box-product-details-section" };
24810
- const _hoisted_3$y = {
24859
+ const _hoisted_1$13 = ["href"];
24860
+ const _hoisted_2$N = { class: "lupa-search-box-product-details-section" };
24861
+ const _hoisted_3$A = {
24811
24862
  key: 0,
24812
24863
  class: "lupa-search-box-product-add-to-cart-section"
24813
24864
  };
24814
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24865
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24815
24866
  __name: "SearchBoxProduct",
24816
24867
  props: {
24817
24868
  item: {},
@@ -24917,7 +24968,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24917
24968
  style: normalizeStyle(imageStyleOverride.value)
24918
24969
  }, [
24919
24970
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
24920
- return openBlock(), createBlock(_sfc_main$1h, {
24971
+ return openBlock(), createBlock(_sfc_main$1n, {
24921
24972
  class: "lupa-search-box-product-element",
24922
24973
  key: element.key,
24923
24974
  item: _ctx.item,
@@ -24927,10 +24978,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24927
24978
  }, null, 8, ["item", "element", "labels", "link"]);
24928
24979
  }), 128))
24929
24980
  ], 4),
24930
- createElementVNode("div", _hoisted_2$L, [
24981
+ createElementVNode("div", _hoisted_2$N, [
24931
24982
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
24932
24983
  var _a25;
24933
- return openBlock(), createBlock(_sfc_main$1h, {
24984
+ return openBlock(), createBlock(_sfc_main$1n, {
24934
24985
  class: "lupa-search-box-product-element",
24935
24986
  key: element.key,
24936
24987
  item: _ctx.item,
@@ -24941,7 +24992,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24941
24992
  ((_a25 = badgeOptions.value) == null ? void 0 : _a25.anchorElementKey) === element.key ? {
24942
24993
  name: "badges",
24943
24994
  fn: withCtx(() => [
24944
- createVNode(_sfc_main$1a, {
24995
+ createVNode(_sfc_main$1g, {
24945
24996
  options: badgeOptions.value,
24946
24997
  position: "card"
24947
24998
  }, null, 8, ["options"])
@@ -24957,7 +25008,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24957
25008
  class: normalizeClass(`lupa-search-box-group-${group}`)
24958
25009
  }, [
24959
25010
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
24960
- return openBlock(), createBlock(_sfc_main$1h, {
25011
+ return openBlock(), createBlock(_sfc_main$1n, {
24961
25012
  class: "lupa-search-box-product-element",
24962
25013
  key: element.key,
24963
25014
  item: _ctx.item,
@@ -24969,8 +25020,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24969
25020
  }), 128))
24970
25021
  ], 2);
24971
25022
  }), 128)),
24972
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
24973
- createVNode(_sfc_main$1h, {
25023
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
25024
+ createVNode(_sfc_main$1n, {
24974
25025
  class: "lupa-search-box-product-element",
24975
25026
  item: _ctx.item,
24976
25027
  element: addToCartElement.value,
@@ -24979,7 +25030,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
24979
25030
  isInStock: isInStock.value
24980
25031
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
24981
25032
  ])) : createCommentVNode("", true)
24982
- ], 16, _hoisted_1$10);
25033
+ ], 16, _hoisted_1$13);
24983
25034
  };
24984
25035
  }
24985
25036
  });
@@ -25051,8 +25102,8 @@ const useTrackingStore = /* @__PURE__ */ defineStore("tracking", () => {
25051
25102
  };
25052
25103
  return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
25053
25104
  });
25054
- const _hoisted_1$$ = { id: "lupa-search-box-products" };
25055
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
25105
+ const _hoisted_1$12 = { id: "lupa-search-box-products" };
25106
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
25056
25107
  __name: "SearchBoxProducts",
25057
25108
  props: {
25058
25109
  items: {},
@@ -25124,7 +25175,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
25124
25175
  }
25125
25176
  };
25126
25177
  return (_ctx, _cache) => {
25127
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
25178
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [
25128
25179
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
25129
25180
  return renderSlot(_ctx.$slots, "productCard", {
25130
25181
  key: index,
@@ -25136,7 +25187,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
25136
25187
  itemClicked: handleProductClick
25137
25188
  });
25138
25189
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
25139
- return openBlock(), createBlock(_sfc_main$19, {
25190
+ return openBlock(), createBlock(_sfc_main$1f, {
25140
25191
  key: index,
25141
25192
  item,
25142
25193
  panelOptions: _ctx.panelOptions,
@@ -25151,9 +25202,9 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
25151
25202
  };
25152
25203
  }
25153
25204
  });
25154
- const _hoisted_1$_ = { class: "lupa-search-box-documents-go-to-results-wrapper" };
25155
- const _hoisted_2$K = { key: 0 };
25156
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
25205
+ const _hoisted_1$11 = { class: "lupa-search-box-documents-go-to-results-wrapper" };
25206
+ const _hoisted_2$M = { key: 0 };
25207
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
25157
25208
  __name: "SearchBoxProductsGoToResultsButton",
25158
25209
  props: {
25159
25210
  options: {},
@@ -25184,13 +25235,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
25184
25235
  emit("goToResults");
25185
25236
  };
25186
25237
  return (_ctx, _cache) => {
25187
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
25238
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
25188
25239
  createElementVNode("button", {
25189
25240
  class: "lupa-search-box-documents-go-to-results-button",
25190
25241
  onClick: goToResults
25191
25242
  }, [
25192
25243
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
25193
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$K, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
25244
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$M, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
25194
25245
  ])
25195
25246
  ]);
25196
25247
  };
@@ -25286,7 +25337,7 @@ const processExtractionObject = (value = {}) => {
25286
25337
  }
25287
25338
  return parsedObject;
25288
25339
  };
25289
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
25340
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
25290
25341
  __name: "SearchBoxProductsWrapper",
25291
25342
  props: {
25292
25343
  panel: {},
@@ -25356,7 +25407,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
25356
25407
  watch(() => props.panel.limit, getItemsDebounced);
25357
25408
  return (_ctx, _cache) => {
25358
25409
  var _a25, _b25;
25359
- return openBlock(), createBlock(_sfc_main$18, {
25410
+ return openBlock(), createBlock(_sfc_main$1e, {
25360
25411
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
25361
25412
  panelOptions: _ctx.panel,
25362
25413
  labels: _ctx.labels,
@@ -25366,7 +25417,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
25366
25417
  default: withCtx(() => {
25367
25418
  var _a26;
25368
25419
  return [
25369
- showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$17, {
25420
+ showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$1d, {
25370
25421
  key: 0,
25371
25422
  options: _ctx.searchBoxOptions,
25372
25423
  panel: _ctx.panel,
@@ -25387,7 +25438,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
25387
25438
  };
25388
25439
  }
25389
25440
  });
25390
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
25441
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
25391
25442
  __name: "SearchBoxRelatedSourceWrapper",
25392
25443
  props: {
25393
25444
  panel: {},
@@ -25459,7 +25510,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
25459
25510
  });
25460
25511
  return (_ctx, _cache) => {
25461
25512
  var _a25, _b25;
25462
- return openBlock(), createBlock(_sfc_main$18, {
25513
+ return openBlock(), createBlock(_sfc_main$1e, {
25463
25514
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
25464
25515
  panelOptions: documentPanelOptions.value,
25465
25516
  labels: _ctx.labels,
@@ -25477,31 +25528,31 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
25477
25528
  };
25478
25529
  }
25479
25530
  });
25480
- const _hoisted_1$Z = {
25531
+ const _hoisted_1$10 = {
25481
25532
  key: 0,
25482
25533
  id: "lupa-search-box-panel"
25483
25534
  };
25484
- const _hoisted_2$J = ["data-cy"];
25485
- const _hoisted_3$x = {
25535
+ const _hoisted_2$L = ["data-cy"];
25536
+ const _hoisted_3$z = {
25486
25537
  key: 0,
25487
25538
  class: "lupa-panel-title lupa-panel-title-top-results"
25488
25539
  };
25489
- const _hoisted_4$o = {
25540
+ const _hoisted_4$q = {
25490
25541
  key: 1,
25491
25542
  class: "lupa-panel-title"
25492
25543
  };
25493
- const _hoisted_5$g = {
25544
+ const _hoisted_5$h = {
25494
25545
  key: 1,
25495
25546
  id: "lupa-search-box-panel"
25496
25547
  };
25497
25548
  const __default__$2 = {
25498
25549
  components: {
25499
- SearchBoxSuggestionsWrapper: _sfc_main$1r,
25500
- SearchBoxProductsWrapper: _sfc_main$16,
25501
- SearchBoxRelatedSourceWrapper: _sfc_main$15
25550
+ SearchBoxSuggestionsWrapper: _sfc_main$1x,
25551
+ SearchBoxProductsWrapper: _sfc_main$1c,
25552
+ SearchBoxRelatedSourceWrapper: _sfc_main$1b
25502
25553
  }
25503
25554
  };
25504
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$2), {
25555
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$2), {
25505
25556
  __name: "SearchBoxMainPanel",
25506
25557
  props: {
25507
25558
  options: {},
@@ -25532,6 +25583,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
25532
25583
  const searchBoxStore = useSearchBoxStore();
25533
25584
  const { suggestionResults, hasAnyResults, panelItemCounts } = storeToRefs(searchBoxStore);
25534
25585
  const emit = __emit;
25586
+ const isSearchEmpty = computed(() => !props.inputValue || props.inputValue.length < 1);
25535
25587
  const displayResults = computed(() => {
25536
25588
  var _a25;
25537
25589
  return ((_a25 = props.inputValue) == null ? void 0 : _a25.length) >= props.options.minInputLength;
@@ -25542,6 +25594,12 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
25542
25594
  return Boolean(props.options.history) && ((_a25 = props.inputValue) == null ? void 0 : _a25.length) < 1 && props.options.minInputLength > 0;
25543
25595
  }
25544
25596
  );
25597
+ const displayShowMoreResultsButton = computed(() => {
25598
+ if (isSearchEmpty.value && props.options.hideMoreResultsButtonOnEmptyQuery) {
25599
+ return false;
25600
+ }
25601
+ return hasAnyResults.value || !props.options.hideMoreResultsButtonOnNoResults;
25602
+ });
25545
25603
  const displayPanels = computed(
25546
25604
  () => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
25547
25605
  );
@@ -25659,7 +25717,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
25659
25717
  ref_key: "panelContainer",
25660
25718
  ref: panelContainer
25661
25719
  }, [
25662
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
25720
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
25663
25721
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
25664
25722
  key: 0,
25665
25723
  class: "lupa-search-box-close-panel",
@@ -25681,8 +25739,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
25681
25739
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
25682
25740
  "data-cy": "lupa-panel-" + panel.type + "-index"
25683
25741
  }, [
25684
- ((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
25685
- ((_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),
25742
+ ((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$z, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
25743
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$q, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
25686
25744
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
25687
25745
  key: 2,
25688
25746
  panel,
@@ -25704,21 +25762,21 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
25704
25762
  key: "0"
25705
25763
  } : void 0
25706
25764
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
25707
- ], 14, _hoisted_2$J);
25765
+ ], 14, _hoisted_2$L);
25708
25766
  }), 128))
25709
25767
  ], 4),
25710
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1u, {
25768
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
25711
25769
  key: 1,
25712
25770
  labels: labels.value
25713
25771
  }, null, 8, ["labels"])) : createCommentVNode("", true),
25714
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1x, {
25772
+ displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
25715
25773
  key: 2,
25716
25774
  labels: labels.value,
25717
25775
  options: _ctx.options,
25718
25776
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
25719
25777
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
25720
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
25721
- createVNode(_sfc_main$1v, {
25778
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
25779
+ createVNode(_sfc_main$1B, {
25722
25780
  options: _ctx.options.history,
25723
25781
  history: history.value,
25724
25782
  onGoToResults: handleGoToResults,
@@ -25743,8 +25801,8 @@ const unbindSearchTriggers = (triggers = [], event) => {
25743
25801
  const elements = getElements(triggers);
25744
25802
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
25745
25803
  };
25746
- const _hoisted_1$Y = { class: "lupa-search-box-wrapper" };
25747
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
25804
+ const _hoisted_1$$ = { class: "lupa-search-box-wrapper" };
25805
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
25748
25806
  __name: "SearchBox",
25749
25807
  props: {
25750
25808
  options: {},
@@ -25795,6 +25853,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
25795
25853
  "debounce",
25796
25854
  "showTotalCount",
25797
25855
  "hideMoreResultsButtonOnNoResults",
25856
+ "hideMoreResultsButtonOnEmptyQuery",
25798
25857
  "showNoResultsPanel",
25799
25858
  "expandOnSinglePanel",
25800
25859
  "showMoreResultsButton"
@@ -26066,8 +26125,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
26066
26125
  id: "lupa-search-box",
26067
26126
  class: normalizeClass({ "lupa-search-box-opened": opened.value })
26068
26127
  }, [
26069
- createElementVNode("div", _hoisted_1$Y, [
26070
- createVNode(_sfc_main$1y, {
26128
+ createElementVNode("div", _hoisted_1$$, [
26129
+ createVNode(_sfc_main$1E, {
26071
26130
  options: inputOptions.value,
26072
26131
  suggestedValue: suggestedValue.value,
26073
26132
  "can-close": (_a26 = _ctx.isSearchContainer) != null ? _a26 : false,
@@ -26080,7 +26139,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
26080
26139
  onSearch: handleSearch,
26081
26140
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
26082
26141
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
26083
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$14, {
26142
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$1a, {
26084
26143
  key: 0,
26085
26144
  options: panelOptions.value,
26086
26145
  inputValue: inputValue.value,
@@ -26184,20 +26243,20 @@ const getInitialSearchResults = (options, getQueryParamName, defaultData) => __a
26184
26243
  options.options.onError(e2);
26185
26244
  }
26186
26245
  });
26187
- const _hoisted_1$X = {
26246
+ const _hoisted_1$_ = {
26188
26247
  key: 0,
26189
26248
  id: "lupa-search-results-did-you-mean"
26190
26249
  };
26191
- const _hoisted_2$I = {
26250
+ const _hoisted_2$K = {
26192
26251
  key: 0,
26193
26252
  "data-cy": "suggested-search-text-label"
26194
26253
  };
26195
- const _hoisted_3$w = {
26254
+ const _hoisted_3$y = {
26196
26255
  key: 1,
26197
26256
  "data-cy": "did-you-mean-label"
26198
26257
  };
26199
- const _hoisted_4$n = { key: 1 };
26200
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
26258
+ const _hoisted_4$p = { key: 1 };
26259
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
26201
26260
  __name: "SearchResultsDidYouMean",
26202
26261
  props: {
26203
26262
  labels: {}
@@ -26229,8 +26288,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
26229
26288
  paramStore.goToResults({ searchText, facet });
26230
26289
  };
26231
26290
  return (_ctx, _cache) => {
26232
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$X, [
26233
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
26291
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$_, [
26292
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$K, [
26234
26293
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
26235
26294
  return openBlock(), createElementBlock("span", { key: index }, [
26236
26295
  createElementVNode("span", {
@@ -26239,7 +26298,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
26239
26298
  ]);
26240
26299
  }), 128))
26241
26300
  ])) : createCommentVNode("", true),
26242
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
26301
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
26243
26302
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
26244
26303
  return openBlock(), createElementBlock("span", { key: index }, [
26245
26304
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -26247,7 +26306,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
26247
26306
  class: "lupa-did-you-mean lupa-highlighted-search-text",
26248
26307
  "data-cy": "did-you-mean-value",
26249
26308
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
26250
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
26309
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(label) + " ", 1))
26251
26310
  ]);
26252
26311
  }), 128))
26253
26312
  ])) : createCommentVNode("", true)
@@ -26255,12 +26314,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
26255
26314
  };
26256
26315
  }
26257
26316
  });
26258
- const _hoisted_1$W = {
26317
+ const _hoisted_1$Z = {
26259
26318
  key: 0,
26260
26319
  class: "lupa-search-results-summary"
26261
26320
  };
26262
- const _hoisted_2$H = ["innerHTML"];
26263
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
26321
+ const _hoisted_2$J = ["innerHTML"];
26322
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
26264
26323
  __name: "SearchResultsSummary",
26265
26324
  props: {
26266
26325
  label: {},
@@ -26275,8 +26334,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
26275
26334
  return addParamsToLabel(props.label, range2, `<span>${totalItems.value}</span>`);
26276
26335
  });
26277
26336
  return (_ctx, _cache) => {
26278
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
26279
- createElementVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$H),
26337
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
26338
+ createElementVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$J),
26280
26339
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
26281
26340
  key: 0,
26282
26341
  class: "lupa-filter-clear",
@@ -26287,19 +26346,19 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
26287
26346
  };
26288
26347
  }
26289
26348
  });
26290
- const _hoisted_1$V = {
26349
+ const _hoisted_1$Y = {
26291
26350
  key: 0,
26292
26351
  class: "lupa-result-page-title",
26293
26352
  "data-cy": "lupa-result-page-title"
26294
26353
  };
26295
- const _hoisted_2$G = { key: 0 };
26296
- const _hoisted_3$v = {
26354
+ const _hoisted_2$I = { key: 0 };
26355
+ const _hoisted_3$x = {
26297
26356
  key: 1,
26298
26357
  class: "lupa-results-total-count"
26299
26358
  };
26300
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
26301
- const _hoisted_5$f = ["innerHTML"];
26302
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
26359
+ const _hoisted_4$o = { class: "lupa-results-total-count-number" };
26360
+ const _hoisted_5$g = ["innerHTML"];
26361
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
26303
26362
  __name: "SearchResultsTitle",
26304
26363
  props: {
26305
26364
  options: {},
@@ -26342,16 +26401,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
26342
26401
  });
26343
26402
  return (_ctx, _cache) => {
26344
26403
  return openBlock(), createElementBlock("div", null, [
26345
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$V, [
26404
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$Y, [
26346
26405
  createTextVNode(toDisplayString(searchResultsTitleTemplate.value || _ctx.options.labels.searchResults), 1),
26347
- queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
26348
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
26406
+ queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$I, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
26407
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
26349
26408
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
26350
- createElementVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
26409
+ createElementVNode("span", _hoisted_4$o, toDisplayString(unref(totalItems)), 1),
26351
26410
  _cache[0] || (_cache[0] = createTextVNode(")"))
26352
26411
  ])) : createCommentVNode("", true)
26353
26412
  ])) : createCommentVNode("", true),
26354
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$11, {
26413
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$17, {
26355
26414
  key: 1,
26356
26415
  label: summaryLabel.value
26357
26416
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -26359,20 +26418,20 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
26359
26418
  key: 2,
26360
26419
  class: "lupa-result-page-description-top",
26361
26420
  innerHTML: descriptionTop.value
26362
- }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
26421
+ }, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
26363
26422
  ]);
26364
26423
  };
26365
26424
  }
26366
26425
  });
26367
- const _hoisted_1$U = {
26426
+ const _hoisted_1$X = {
26368
26427
  class: "lupa-current-filter-label",
26369
26428
  "data-cy": "lupa-current-filter-label"
26370
26429
  };
26371
- const _hoisted_2$F = {
26430
+ const _hoisted_2$H = {
26372
26431
  class: "lupa-current-filter-value",
26373
26432
  "data-cy": "lupa-current-filter-value"
26374
26433
  };
26375
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
26434
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
26376
26435
  __name: "CurrentFilterDisplay",
26377
26436
  props: {
26378
26437
  filter: {}
@@ -26414,23 +26473,23 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
26414
26473
  onClick: handleClick,
26415
26474
  "aria-label": "Remove filter"
26416
26475
  }, "⨉"),
26417
- createElementVNode("div", _hoisted_1$U, toDisplayString(_ctx.filter.label) + ": ", 1),
26418
- createElementVNode("div", _hoisted_2$F, toDisplayString(formatFilterValue(props.filter)), 1)
26476
+ createElementVNode("div", _hoisted_1$X, toDisplayString(_ctx.filter.label) + ": ", 1),
26477
+ createElementVNode("div", _hoisted_2$H, toDisplayString(formatFilterValue(props.filter)), 1)
26419
26478
  ], 2);
26420
26479
  };
26421
26480
  }
26422
26481
  });
26423
- const _hoisted_1$T = { class: "lupa-filter-title-text" };
26424
- const _hoisted_2$E = {
26482
+ const _hoisted_1$W = { class: "lupa-filter-title-text" };
26483
+ const _hoisted_2$G = {
26425
26484
  key: 0,
26426
26485
  class: "lupa-filter-count"
26427
26486
  };
26428
- const _hoisted_3$u = {
26487
+ const _hoisted_3$w = {
26429
26488
  key: 0,
26430
26489
  class: "filter-values"
26431
26490
  };
26432
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
26433
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
26491
+ const _hoisted_4$n = { class: "lupa-current-filter-list" };
26492
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
26434
26493
  __name: "CurrentFilters",
26435
26494
  props: {
26436
26495
  options: {},
@@ -26511,19 +26570,19 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
26511
26570
  class: "lupa-current-filter-title",
26512
26571
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
26513
26572
  }, [
26514
- createElementVNode("div", _hoisted_1$T, [
26573
+ createElementVNode("div", _hoisted_1$W, [
26515
26574
  createTextVNode(toDisplayString((_c = (_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) != null ? _c : "") + " ", 1),
26516
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$E, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
26575
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$G, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
26517
26576
  ]),
26518
26577
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
26519
26578
  key: 0,
26520
26579
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
26521
26580
  }, null, 2)) : createCommentVNode("", true)
26522
26581
  ]),
26523
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
26524
- createElementVNode("div", _hoisted_4$l, [
26582
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
26583
+ createElementVNode("div", _hoisted_4$n, [
26525
26584
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
26526
- return openBlock(), createBlock(_sfc_main$$, {
26585
+ return openBlock(), createBlock(_sfc_main$15, {
26527
26586
  key: filter.key + "_" + filter.value,
26528
26587
  filter,
26529
26588
  units: units.value,
@@ -26541,8 +26600,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
26541
26600
  };
26542
26601
  }
26543
26602
  });
26544
- const _hoisted_1$S = ["href"];
26545
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26603
+ const _hoisted_1$V = ["href"];
26604
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
26546
26605
  __name: "CategoryFilterItem",
26547
26606
  props: {
26548
26607
  options: {},
@@ -26579,20 +26638,20 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26579
26638
  "data-cy": "lupa-child-category-item",
26580
26639
  href: urlLink.value,
26581
26640
  onClick: handleNavigation
26582
- }, toDisplayString(title.value), 9, _hoisted_1$S)
26641
+ }, toDisplayString(title.value), 9, _hoisted_1$V)
26583
26642
  ], 2);
26584
26643
  };
26585
26644
  }
26586
26645
  });
26587
- const _hoisted_1$R = {
26646
+ const _hoisted_1$U = {
26588
26647
  class: "lupa-category-filter",
26589
26648
  "data-cy": "lupa-category-filter"
26590
26649
  };
26591
- const _hoisted_2$D = { class: "lupa-category-back" };
26592
- const _hoisted_3$t = ["href"];
26593
- const _hoisted_4$k = ["href"];
26594
- const _hoisted_5$e = { class: "lupa-child-category-list" };
26595
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
26650
+ const _hoisted_2$F = { class: "lupa-category-back" };
26651
+ const _hoisted_3$v = ["href"];
26652
+ const _hoisted_4$m = ["href"];
26653
+ const _hoisted_5$f = { class: "lupa-child-category-list" };
26654
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
26596
26655
  __name: "CategoryFilter",
26597
26656
  props: {
26598
26657
  options: {}
@@ -26680,14 +26739,14 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
26680
26739
  };
26681
26740
  __expose({ fetch: fetch2 });
26682
26741
  return (_ctx, _cache) => {
26683
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
26684
- createElementVNode("div", _hoisted_2$D, [
26742
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
26743
+ createElementVNode("div", _hoisted_2$F, [
26685
26744
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
26686
26745
  key: 0,
26687
26746
  "data-cy": "lupa-category-back",
26688
26747
  href: backUrlLink.value,
26689
26748
  onClick: handleNavigationBack
26690
- }, toDisplayString(backTitle.value), 9, _hoisted_3$t)) : createCommentVNode("", true)
26749
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$v)) : createCommentVNode("", true)
26691
26750
  ]),
26692
26751
  createElementVNode("div", {
26693
26752
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -26697,11 +26756,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
26697
26756
  href: parentUrlLink.value,
26698
26757
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
26699
26758
  onClick: handleNavigationParent
26700
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
26759
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$m)
26701
26760
  ], 2),
26702
- createElementVNode("div", _hoisted_5$e, [
26761
+ createElementVNode("div", _hoisted_5$f, [
26703
26762
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
26704
- return openBlock(), createBlock(_sfc_main$Z, {
26763
+ return openBlock(), createBlock(_sfc_main$13, {
26705
26764
  key: getCategoryKey(child),
26706
26765
  item: child,
26707
26766
  options: _ctx.options
@@ -26712,22 +26771,22 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
26712
26771
  };
26713
26772
  }
26714
26773
  });
26715
- const _hoisted_1$Q = {
26774
+ const _hoisted_1$T = {
26716
26775
  class: "lupa-search-result-facet-term-values",
26717
26776
  "data-cy": "lupa-search-result-facet-term-values"
26718
26777
  };
26719
- const _hoisted_2$C = ["placeholder"];
26720
- const _hoisted_3$s = { class: "lupa-terms-list" };
26721
- const _hoisted_4$j = ["onClick"];
26722
- const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
26723
- const _hoisted_6$7 = { class: "lupa-term-label" };
26778
+ const _hoisted_2$E = ["placeholder"];
26779
+ const _hoisted_3$u = { class: "lupa-terms-list" };
26780
+ const _hoisted_4$l = ["onClick"];
26781
+ const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
26782
+ const _hoisted_6$6 = { class: "lupa-term-label" };
26724
26783
  const _hoisted_7$4 = {
26725
26784
  key: 0,
26726
26785
  class: "lupa-term-count"
26727
26786
  };
26728
26787
  const _hoisted_8$2 = { key: 0 };
26729
26788
  const _hoisted_9$2 = { key: 1 };
26730
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
26789
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
26731
26790
  __name: "TermFacet",
26732
26791
  props: {
26733
26792
  options: {},
@@ -26821,17 +26880,17 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
26821
26880
  }
26822
26881
  };
26823
26882
  return (_ctx, _cache) => {
26824
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
26883
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
26825
26884
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
26826
26885
  key: 0,
26827
26886
  class: "lupa-term-filter",
26828
26887
  "data-cy": "lupa-term-filter",
26829
26888
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
26830
26889
  placeholder: _ctx.options.labels.facetFilter
26831
- }, null, 8, _hoisted_2$C)), [
26890
+ }, null, 8, _hoisted_2$E)), [
26832
26891
  [vModelText, termFilter.value]
26833
26892
  ]) : createCommentVNode("", true),
26834
- createElementVNode("div", _hoisted_3$s, [
26893
+ createElementVNode("div", _hoisted_3$u, [
26835
26894
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
26836
26895
  return openBlock(), createElementBlock("div", {
26837
26896
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -26839,7 +26898,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
26839
26898
  key: item.title,
26840
26899
  onClick: ($event) => handleFacetClick(item)
26841
26900
  }, [
26842
- createElementVNode("div", _hoisted_5$d, [
26901
+ createElementVNode("div", _hoisted_5$e, [
26843
26902
  createElementVNode("span", {
26844
26903
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
26845
26904
  }, null, 2)
@@ -26847,10 +26906,10 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
26847
26906
  createElementVNode("div", {
26848
26907
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(item)]: true }])
26849
26908
  }, [
26850
- createElementVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
26909
+ createElementVNode("span", _hoisted_6$6, toDisplayString(getItemLabel(item)), 1),
26851
26910
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
26852
26911
  ], 2)
26853
- ], 10, _hoisted_4$j);
26912
+ ], 10, _hoisted_4$l);
26854
26913
  }), 128))
26855
26914
  ]),
26856
26915
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -27758,21 +27817,33 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
27758
27817
  m.render = function(e2, t, r, i, n, o) {
27759
27818
  return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
27760
27819
  }, m.__file = "src/Slider.vue";
27761
- const _hoisted_1$P = { class: "lupa-search-result-facet-stats-values" };
27762
- const _hoisted_2$B = {
27820
+ const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
27821
+ if (value === void 0 || value === null || Number.isNaN(value)) return "";
27822
+ const log = Math.log10(maxPrecision);
27823
+ const decimals = log < 0 ? Math.round(-log) : 0;
27824
+ const factor = Math.pow(10, decimals);
27825
+ const rounded = Math.round((value + Number.EPSILON) * factor) / factor;
27826
+ let out = rounded.toFixed(decimals);
27827
+ if (Number.isInteger(value)) {
27828
+ out = Math.trunc(value).toString();
27829
+ }
27830
+ return out;
27831
+ };
27832
+ const _hoisted_1$S = { class: "lupa-search-result-facet-stats-values" };
27833
+ const _hoisted_2$D = {
27763
27834
  key: 0,
27764
27835
  class: "lupa-stats-facet-summary"
27765
27836
  };
27766
- const _hoisted_3$r = {
27837
+ const _hoisted_3$t = {
27767
27838
  key: 1,
27768
27839
  class: "lupa-stats-facet-summary-input"
27769
27840
  };
27770
- const _hoisted_4$i = { class: "lupa-stats-from" };
27771
- const _hoisted_5$c = {
27841
+ const _hoisted_4$k = { class: "lupa-stats-from" };
27842
+ const _hoisted_5$d = {
27772
27843
  key: 0,
27773
27844
  class: "lupa-stats-range-label"
27774
27845
  };
27775
- const _hoisted_6$6 = ["min", "max", "pattern", "aria-label"];
27846
+ const _hoisted_6$5 = ["min", "max", "pattern", "aria-label"];
27776
27847
  const _hoisted_7$3 = { key: 1 };
27777
27848
  const _hoisted_8$1 = { key: 2 };
27778
27849
  const _hoisted_9$1 = { class: "lupa-stats-to" };
@@ -27787,7 +27858,7 @@ const _hoisted_14 = {
27787
27858
  key: 2,
27788
27859
  class: "lupa-stats-slider-wrapper"
27789
27860
  };
27790
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
27861
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
27791
27862
  __name: "StatsFacet",
27792
27863
  props: {
27793
27864
  options: {},
@@ -27906,7 +27977,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
27906
27977
  const originalSliderRange = computed(() => {
27907
27978
  return innerSliderRange.value.length === 2 && (currentFilters.value.gte || currentFilters.value.lte) ? [
27908
27979
  Math.max(+currentFilters.value.gte, facetValue.value.min),
27909
- Math.min(+currentFilters.value.lte, facetValue.value.max)
27980
+ Math.min(+(currentFilters.value.lt || currentFilters.value.lte), facetValue.value.max)
27910
27981
  ] : [facetValue.value.min, facetValue.value.max];
27911
27982
  });
27912
27983
  const fromValue = computed({
@@ -27962,6 +28033,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
27962
28033
  }
27963
28034
  );
27964
28035
  const statsSummary = computed(() => {
28036
+ var _a25, _b25;
27965
28037
  const [min, max] = originalSliderRange.value;
27966
28038
  if (isPrice.value) {
27967
28039
  return formatPriceSummary(
@@ -27972,10 +28044,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
27972
28044
  multiCurrency.value
27973
28045
  );
27974
28046
  }
28047
+ const minValue = roundToMaxDecimals(min, (_a25 = customInterval.value) != null ? _a25 : 0.1);
28048
+ const maxValue = roundToMaxDecimals(max, (_b25 = customInterval.value) != null ? _b25 : 0.1);
27975
28049
  if (unit.value) {
27976
- return `${min} ${unit.value} – ${max} ${unit.value}`;
28050
+ return `${minValue} ${unit.value} – ${maxValue} ${unit.value}`;
27977
28051
  }
27978
- return formatRange({ gte: min, lte: max });
28052
+ return formatRange({ gte: minValue, lte: maxValue });
27979
28053
  });
27980
28054
  function handleInputChange() {
27981
28055
  if (innerSliderRange.value.length < 2) return;
@@ -28003,10 +28077,10 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
28003
28077
  }
28004
28078
  );
28005
28079
  return (_ctx, _cache) => {
28006
- return openBlock(), createElementBlock("div", _hoisted_1$P, [
28007
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
28008
- createElementVNode("div", _hoisted_4$i, [
28009
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28080
+ return openBlock(), createElementBlock("div", _hoisted_1$S, [
28081
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$D, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$t, [
28082
+ createElementVNode("div", _hoisted_4$k, [
28083
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$d, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28010
28084
  withDirectives(createElementVNode("input", {
28011
28085
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
28012
28086
  type: "text",
@@ -28015,7 +28089,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
28015
28089
  max: facetMax.value,
28016
28090
  pattern: sliderInputFormat.value,
28017
28091
  "aria-label": ariaLabelFrom.value
28018
- }, null, 8, _hoisted_6$6), [
28092
+ }, null, 8, _hoisted_6$5), [
28019
28093
  [
28020
28094
  vModelText,
28021
28095
  fromValue.value,
@@ -28068,17 +28142,17 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
28068
28142
  };
28069
28143
  }
28070
28144
  });
28071
- const _hoisted_1$O = { class: "lupa-term-checkbox-wrapper" };
28072
- const _hoisted_2$A = { class: "lupa-term-label" };
28073
- const _hoisted_3$q = {
28145
+ const _hoisted_1$R = { class: "lupa-term-checkbox-wrapper" };
28146
+ const _hoisted_2$C = { class: "lupa-term-label" };
28147
+ const _hoisted_3$s = {
28074
28148
  key: 0,
28075
28149
  class: "lupa-term-count"
28076
28150
  };
28077
- const _hoisted_4$h = {
28151
+ const _hoisted_4$j = {
28078
28152
  key: 0,
28079
28153
  class: "lupa-facet-level"
28080
28154
  };
28081
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
28155
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
28082
28156
  __name: "HierarchyFacetLevel",
28083
28157
  props: {
28084
28158
  options: {},
@@ -28132,7 +28206,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
28132
28206
  "data-cy": "lupa-facet-term",
28133
28207
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
28134
28208
  }, [
28135
- createElementVNode("div", _hoisted_1$O, [
28209
+ createElementVNode("div", _hoisted_1$R, [
28136
28210
  createElementVNode("span", {
28137
28211
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
28138
28212
  }, null, 2)
@@ -28140,11 +28214,11 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
28140
28214
  createElementVNode("div", {
28141
28215
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(_ctx.item)]: true }])
28142
28216
  }, [
28143
- createElementVNode("span", _hoisted_2$A, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
28144
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
28217
+ createElementVNode("span", _hoisted_2$C, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
28218
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
28145
28219
  ], 2)
28146
28220
  ]),
28147
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
28221
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, [
28148
28222
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
28149
28223
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
28150
28224
  key: itemChild.title,
@@ -28160,13 +28234,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
28160
28234
  };
28161
28235
  }
28162
28236
  });
28163
- const _hoisted_1$N = {
28237
+ const _hoisted_1$Q = {
28164
28238
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
28165
28239
  "data-cy": "lupa-search-result-facet-term-values"
28166
28240
  };
28167
- const _hoisted_2$z = { key: 0 };
28168
- const _hoisted_3$p = ["placeholder"];
28169
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
28241
+ const _hoisted_2$B = { key: 0 };
28242
+ const _hoisted_3$r = ["placeholder"];
28243
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
28170
28244
  __name: "HierarchyFacet",
28171
28245
  props: {
28172
28246
  options: {},
@@ -28222,19 +28296,19 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
28222
28296
  showAll.value = false;
28223
28297
  };
28224
28298
  return (_ctx, _cache) => {
28225
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
28226
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, [
28299
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
28300
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, [
28227
28301
  withDirectives(createElementVNode("input", {
28228
28302
  class: "lupa-term-filter",
28229
28303
  "data-cy": "lupa-term-filter",
28230
28304
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
28231
28305
  placeholder: _ctx.options.labels.facetFilter
28232
- }, null, 8, _hoisted_3$p), [
28306
+ }, null, 8, _hoisted_3$r), [
28233
28307
  [vModelText, termFilter.value]
28234
28308
  ])
28235
28309
  ])) : createCommentVNode("", true),
28236
28310
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
28237
- return openBlock(), createBlock(_sfc_main$V, {
28311
+ return openBlock(), createBlock(_sfc_main$$, {
28238
28312
  key: item.title,
28239
28313
  options: _ctx.options,
28240
28314
  item,
@@ -28258,30 +28332,31 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
28258
28332
  };
28259
28333
  }
28260
28334
  });
28261
- const _hoisted_1$M = { class: "lupa-facet-label-text" };
28262
- const _hoisted_2$y = {
28335
+ const _hoisted_1$P = { class: "lupa-facet-label-text" };
28336
+ const _hoisted_2$A = {
28263
28337
  key: 0,
28264
28338
  class: "lupa-facet-content",
28265
28339
  "data-cy": "lupa-facet-content"
28266
28340
  };
28267
28341
  const __default__$1 = {
28268
28342
  components: {
28269
- TermFacet: _sfc_main$X,
28270
- StatsFacet: _sfc_main$W,
28271
- HierarchyFacet: _sfc_main$U
28343
+ TermFacet: _sfc_main$11,
28344
+ StatsFacet: _sfc_main$10,
28345
+ HierarchyFacet: _sfc_main$_
28272
28346
  }
28273
28347
  };
28274
- const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
28348
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
28275
28349
  __name: "FacetDisplay",
28276
28350
  props: {
28277
28351
  options: {},
28278
28352
  facet: {},
28279
28353
  currentFilters: {},
28280
- clearable: { type: Boolean }
28354
+ clearable: { type: Boolean },
28355
+ currentFacetStyle: {}
28281
28356
  },
28282
- emits: ["select", "clear"],
28357
+ emits: ["select", "clear", "expand"],
28283
28358
  setup(__props, { emit: __emit }) {
28284
- var _a25, _b25, _c;
28359
+ var _a25, _b25;
28285
28360
  const props = __props;
28286
28361
  const facet = computed(() => {
28287
28362
  var _a26;
@@ -28295,17 +28370,17 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
28295
28370
  const optionsStore = useOptionsStore();
28296
28371
  const screenStore = useScreenStore();
28297
28372
  const { currentFilterKeys } = storeToRefs(searchResultStore);
28298
- const { searchResultOptions } = storeToRefs(optionsStore);
28373
+ const { searchResultOptions, expandedFacets } = storeToRefs(optionsStore);
28299
28374
  const { isMobileWidth } = storeToRefs(screenStore);
28300
28375
  const emit = __emit;
28301
28376
  const allExpanded = computed(() => {
28302
- var _a26, _b26, _c2, _d, _e, _f;
28377
+ var _a26, _b26, _c, _d, _e, _f;
28303
28378
  if (isMobileWidth.value) {
28304
- return (_c2 = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c2 : false;
28379
+ return (_c = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c : false;
28305
28380
  }
28306
28381
  return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
28307
28382
  });
28308
- const isOpen = ref((_c = ((_b25 = (_a25 = props.options) == null ? void 0 : _a25.expand) == null ? void 0 : _b25.includes(props.facet.key)) || allExpanded.value) != null ? _c : false);
28383
+ const isOpen = ref((_b25 = ((_a25 = expandedFacets.value) == null ? void 0 : _a25.includes(props.facet.key)) || allExpanded.value) != null ? _b25 : false);
28309
28384
  const facetPanel = ref(null);
28310
28385
  const facetType = computed(() => {
28311
28386
  switch (facet.value.type) {
@@ -28347,9 +28422,16 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
28347
28422
  var _a26;
28348
28423
  return getTranslatedFacetKey(props.facet, (_a26 = searchResultOptions.value.filters) == null ? void 0 : _a26.translations);
28349
28424
  });
28425
+ const expandSidebarOnFacetClick = computed(() => {
28426
+ var _a26, _b26, _c;
28427
+ if (!props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
28428
+ return false;
28429
+ }
28430
+ return (_c = (_b26 = (_a26 = props.options.style) == null ? void 0 : _a26.drawer) == null ? void 0 : _b26.expandSidebarOnFacetClick) != null ? _c : false;
28431
+ });
28350
28432
  onMounted(() => {
28351
- var _a26;
28352
- if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown") {
28433
+ var _a26, _b26, _c;
28434
+ if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown" || ((_c = (_b26 = props.options) == null ? void 0 : _b26.style) == null ? void 0 : _c.type) === "drawer") {
28353
28435
  window.addEventListener("click", handleMouseClick);
28354
28436
  }
28355
28437
  });
@@ -28358,7 +28440,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
28358
28440
  });
28359
28441
  const handleMouseClick = (e2) => {
28360
28442
  const el = facetPanel.value;
28361
- if (!el) {
28443
+ if (!el || !props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
28362
28444
  return;
28363
28445
  }
28364
28446
  const isOutsideElement = el && !el.contains(e2.target);
@@ -28370,6 +28452,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
28370
28452
  handleFacetQueryFilter();
28371
28453
  });
28372
28454
  const toggleFacet = () => {
28455
+ if (expandSidebarOnFacetClick.value) {
28456
+ expandedFacets.value = [facet.value.key];
28457
+ emit("expand");
28458
+ return;
28459
+ }
28373
28460
  isOpen.value = !isOpen.value;
28374
28461
  handleFacetQueryFilter();
28375
28462
  };
@@ -28402,12 +28489,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
28402
28489
  "data-cy": "lupa-search-result-facet-label",
28403
28490
  onClick: toggleFacet
28404
28491
  }, [
28405
- createElementVNode("div", _hoisted_1$M, toDisplayString(facetLabel.value), 1),
28492
+ createElementVNode("div", _hoisted_1$P, toDisplayString(facetLabel.value), 1),
28406
28493
  createElementVNode("div", {
28407
28494
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
28408
28495
  }, null, 2)
28409
28496
  ], 2),
28410
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
28497
+ isOpen.value && !expandSidebarOnFacetClick.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
28411
28498
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
28412
28499
  facet: facet.value,
28413
28500
  currentFilters: currentFilters.value[facet.value.key],
@@ -28425,12 +28512,154 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
28425
28512
  };
28426
28513
  }
28427
28514
  }));
28428
- const _hoisted_1$L = { class: "lupa-search-result-facet-section" };
28429
- const _hoisted_2$x = {
28515
+ const useSidebarToggle = () => {
28516
+ const searchResultStore = useSearchResultStore();
28517
+ const optionsStore = useOptionsStore();
28518
+ const { currentFilterCount, isFilterSidebarVisible, isSortingSidebarVisible } = storeToRefs(searchResultStore);
28519
+ const { searchResultOptions } = storeToRefs(optionsStore);
28520
+ const labels = computed(() => {
28521
+ return searchResultOptions.value.labels;
28522
+ });
28523
+ const showMobileFilterCount = computed(
28524
+ () => {
28525
+ var _a25, _b25, _c, _d;
28526
+ return (_d = (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount) != null ? _d : false;
28527
+ }
28528
+ );
28529
+ const disableMobileBodyScrollLock = computed(
28530
+ () => {
28531
+ var _a25, _b25, _c;
28532
+ return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
28533
+ }
28534
+ );
28535
+ const isSidebarVisible = computed(
28536
+ () => isFilterSidebarVisible.value || isSortingSidebarVisible.value
28537
+ );
28538
+ const sortLabel = computed(() => {
28539
+ var _a25, _b25;
28540
+ return (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.sortBy;
28541
+ });
28542
+ const defaultLabel = computed(() => {
28543
+ var _a25;
28544
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButton;
28545
+ });
28546
+ const activeLabel = computed(() => {
28547
+ var _a25;
28548
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonActive;
28549
+ });
28550
+ const openLabel = computed(() => {
28551
+ var _a25;
28552
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonOpen;
28553
+ });
28554
+ const label = computed(() => {
28555
+ if (isSidebarVisible.value && openLabel.value) {
28556
+ return openLabel.value;
28557
+ }
28558
+ if (hasActiveFilters.value && activeLabel.value) {
28559
+ return activeLabel.value;
28560
+ }
28561
+ return defaultLabel.value;
28562
+ });
28563
+ const sortToggleVisible = computed(() => {
28564
+ var _a25, _b25;
28565
+ return ((_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle) == null ? void 0 : _b25.type) === "drawer";
28566
+ });
28567
+ const handleFilterSidebarToggle = () => {
28568
+ searchResultStore.setSidebarState({
28569
+ visible: !isSidebarVisible.value,
28570
+ disableBodyScrolling: !disableMobileBodyScrollLock.value,
28571
+ sidebar: "filter"
28572
+ });
28573
+ };
28574
+ const handleSortSidebarToggle = () => {
28575
+ searchResultStore.setSidebarState({
28576
+ visible: !isSortingSidebarVisible.value,
28577
+ disableBodyScrolling: !disableMobileBodyScrollLock.value,
28578
+ sidebar: "sorting"
28579
+ });
28580
+ };
28581
+ const hasActiveFilters = computed(() => currentFilterCount.value > 0);
28582
+ const checkCloseOnEscape = (e2) => {
28583
+ var _a25;
28584
+ if (!["Escape", "Esc"].includes((_a25 = e2.key) != null ? _a25 : "")) {
28585
+ return;
28586
+ }
28587
+ if (isSidebarVisible.value) {
28588
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
28589
+ searchResultStore.setSidebarState({ visible: false, sidebar: "filter" });
28590
+ }
28591
+ };
28592
+ onMounted(() => {
28593
+ window.addEventListener("keydown", checkCloseOnEscape);
28594
+ });
28595
+ onBeforeUnmount(() => {
28596
+ window.removeEventListener("keydown", checkCloseOnEscape);
28597
+ });
28598
+ return {
28599
+ isSidebarVisible,
28600
+ label,
28601
+ currentFilterCount,
28602
+ hasActiveFilters,
28603
+ showMobileFilterCount,
28604
+ sortLabel,
28605
+ sortToggleVisible,
28606
+ handleFilterSidebarToggle,
28607
+ handleSortSidebarToggle
28608
+ };
28609
+ };
28610
+ const _hoisted_1$O = {
28611
+ key: 0,
28612
+ class: "lupa-desktop-toggle-filter-count"
28613
+ };
28614
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
28615
+ __name: "DesktopFacetToggle",
28616
+ setup(__props) {
28617
+ const {
28618
+ isSidebarVisible,
28619
+ label,
28620
+ currentFilterCount,
28621
+ hasActiveFilters,
28622
+ showMobileFilterCount,
28623
+ handleFilterSidebarToggle
28624
+ } = useSidebarToggle();
28625
+ return (_ctx, _cache) => {
28626
+ return openBlock(), createElementBlock("div", {
28627
+ class: normalizeClass(["lupa-desktop-toggle", {
28628
+ "lupa-desktop-toggle-filters-empty": unref(currentFilterCount) < 1,
28629
+ "lupa-desktop-toggle-has-filters": unref(hasActiveFilters),
28630
+ "lupa-sidebar-open": unref(isSidebarVisible)
28631
+ }]),
28632
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
28633
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
28634
+ }, [
28635
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
28636
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
28637
+ ], 2);
28638
+ };
28639
+ }
28640
+ });
28641
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
28642
+ __name: "DesktopSortToggle",
28643
+ setup(__props) {
28644
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
28645
+ return (_ctx, _cache) => {
28646
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
28647
+ key: 0,
28648
+ class: normalizeClass(["lupa-desktop-toggle lupa-desktop-sort-toggle", {
28649
+ "lupa-sidebar-open": unref(isSidebarVisible)
28650
+ }]),
28651
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
28652
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
28653
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
28654
+ };
28655
+ }
28656
+ });
28657
+ const _hoisted_1$N = { class: "lupa-search-result-facet-section" };
28658
+ const _hoisted_2$z = {
28430
28659
  key: 0,
28431
28660
  class: "lupa-facets-title"
28432
28661
  };
28433
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
28662
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
28434
28663
  __name: "FacetList",
28435
28664
  props: {
28436
28665
  options: {},
@@ -28442,6 +28671,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
28442
28671
  emits: ["select", "clear"],
28443
28672
  setup(__props, { emit: __emit }) {
28444
28673
  const props = __props;
28674
+ const { handleFilterSidebarToggle } = useSidebarToggle();
28445
28675
  const emit = __emit;
28446
28676
  const currentFiltersValue = computed(() => {
28447
28677
  var _a25;
@@ -28457,6 +28687,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
28457
28687
  return !((_a25 = props.options.exclude) == null ? void 0 : _a25.includes(f2.key));
28458
28688
  }) : facetsValue.value;
28459
28689
  });
28690
+ const displayFacetStyle = computed(() => {
28691
+ if (!props.facetStyle || props.facetStyle === "sidebar") {
28692
+ return "sidebar";
28693
+ }
28694
+ return "top-dropdown";
28695
+ });
28460
28696
  const handleFacetSelect = (facetAction) => {
28461
28697
  emit("select", facetAction);
28462
28698
  };
@@ -28465,29 +28701,33 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
28465
28701
  };
28466
28702
  return (_ctx, _cache) => {
28467
28703
  var _a25;
28468
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
28469
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
28704
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
28705
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
28470
28706
  createElementVNode("div", {
28471
- class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = _ctx.facetStyle) != null ? _a25 : "")])
28707
+ class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = displayFacetStyle.value) != null ? _a25 : "")])
28472
28708
  }, [
28473
28709
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
28474
28710
  var _a26;
28475
- return openBlock(), createBlock(_sfc_main$T, {
28711
+ return openBlock(), createBlock(_sfc_main$Z, {
28476
28712
  key: facet.key,
28477
28713
  facet,
28478
28714
  currentFilters: currentFiltersValue.value,
28479
28715
  options: _ctx.options,
28480
28716
  clearable: (_a26 = _ctx.clearable) != null ? _a26 : false,
28717
+ "current-facet-style": _ctx.facetStyle,
28481
28718
  onSelect: handleFacetSelect,
28482
- onClear: clear
28483
- }, null, 8, ["facet", "currentFilters", "options", "clearable"]);
28484
- }), 128))
28719
+ onClear: clear,
28720
+ onExpand: unref(handleFilterSidebarToggle)
28721
+ }, null, 8, ["facet", "currentFilters", "options", "clearable", "current-facet-style", "onExpand"]);
28722
+ }), 128)),
28723
+ _ctx.facetStyle === "drawer" ? (openBlock(), createBlock(_sfc_main$Y, { key: 0 })) : createCommentVNode("", true),
28724
+ _ctx.facetStyle === "drawer" || _ctx.facetStyle === "top-dropdown" ? (openBlock(), createBlock(_sfc_main$X, { key: 1 })) : createCommentVNode("", true)
28485
28725
  ], 2)
28486
28726
  ]);
28487
28727
  };
28488
28728
  }
28489
28729
  });
28490
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
28730
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
28491
28731
  __name: "FacetsButton",
28492
28732
  props: {
28493
28733
  options: {}
@@ -28512,8 +28752,33 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
28512
28752
  };
28513
28753
  }
28514
28754
  });
28515
- const _hoisted_1$K = { class: "lupa-facets-filter-button-wrapper" };
28516
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28755
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
28756
+ __name: "FacetsClearButton",
28757
+ props: {
28758
+ options: {}
28759
+ },
28760
+ emits: ["clear"],
28761
+ setup(__props, { emit: __emit }) {
28762
+ const props = __props;
28763
+ const emit = __emit;
28764
+ const label = computed(() => {
28765
+ var _a25, _b25;
28766
+ return (_b25 = (_a25 = props.options.labels) == null ? void 0 : _a25.facetClearAllButton) != null ? _b25 : "";
28767
+ });
28768
+ const handleClick = () => {
28769
+ emit("clear");
28770
+ };
28771
+ return (_ctx, _cache) => {
28772
+ return label.value ? (openBlock(), createElementBlock("button", {
28773
+ key: 0,
28774
+ class: "lupa-facets-button-clear",
28775
+ onClick: withModifiers(handleClick, ["stop"])
28776
+ }, toDisplayString(label.value), 1)) : createCommentVNode("", true);
28777
+ };
28778
+ }
28779
+ });
28780
+ const _hoisted_1$M = { class: "lupa-facets-filter-button-wrapper" };
28781
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
28517
28782
  __name: "Facets",
28518
28783
  props: {
28519
28784
  options: {},
@@ -28526,6 +28791,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28526
28791
  const paramStore = useParamsStore();
28527
28792
  const searchResultStore = useSearchResultStore();
28528
28793
  const optionsStore = useOptionsStore();
28794
+ const { handleFilterSidebarToggle } = useSidebarToggle();
28529
28795
  const { filters } = storeToRefs(paramStore);
28530
28796
  const { facets: facets2, loadingFacets } = storeToRefs(searchResultStore);
28531
28797
  const { searchResultOptions } = storeToRefs(optionsStore);
@@ -28553,7 +28819,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28553
28819
  };
28554
28820
  });
28555
28821
  const showFilterButton = computed(() => {
28556
- return props.options.filterBehavior === "withFilterButton";
28822
+ return props.options.filterBehavior === "withFilterButton" && props.facetStyle === "sidebar";
28557
28823
  });
28558
28824
  const handleFacetSelect = (facetAction) => {
28559
28825
  switch (facetAction.type) {
@@ -28594,6 +28860,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28594
28860
  const param = getFacetKey(facet.key, facet.type);
28595
28861
  paramStore.removeParameters({ paramsToRemove: [param] });
28596
28862
  };
28863
+ const clearAll = () => {
28864
+ paramStore.removeAllFilters();
28865
+ handleFilterSidebarToggle();
28866
+ };
28597
28867
  const filter = () => {
28598
28868
  emit("filter");
28599
28869
  };
@@ -28601,7 +28871,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28601
28871
  return openBlock(), createElementBlock("div", {
28602
28872
  class: normalizeClass(["lupa-search-result-facets", { "lupa-search-result-facets-loading": unref(loadingFacets) }])
28603
28873
  }, [
28604
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$S, {
28874
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$W, {
28605
28875
  key: 0,
28606
28876
  options: _ctx.options,
28607
28877
  facets: regularFacets.value,
@@ -28611,10 +28881,15 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28611
28881
  onSelect: handleFacetSelect,
28612
28882
  onClear: clear
28613
28883
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
28614
- createElementVNode("div", _hoisted_1$K, [
28615
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$R, {
28884
+ createElementVNode("div", _hoisted_1$M, [
28885
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$U, {
28616
28886
  key: 0,
28617
28887
  options: _ctx.options,
28888
+ onClear: clearAll
28889
+ }, null, 8, ["options"])) : createCommentVNode("", true),
28890
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$V, {
28891
+ key: 1,
28892
+ options: _ctx.options,
28618
28893
  onFilter: filter
28619
28894
  }, null, 8, ["options"])) : createCommentVNode("", true)
28620
28895
  ])
@@ -28622,16 +28897,17 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28622
28897
  };
28623
28898
  }
28624
28899
  });
28625
- const _hoisted_1$J = {
28900
+ const _hoisted_1$L = {
28626
28901
  key: 0,
28627
28902
  id: "lupa-search-result-filters",
28628
28903
  class: "lupa-search-result-filters"
28629
28904
  };
28630
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
28905
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
28631
28906
  __name: "SearchResultsFilters",
28632
28907
  props: {
28633
28908
  options: {},
28634
- expandable: { type: Boolean }
28909
+ expandable: { type: Boolean },
28910
+ style: {}
28635
28911
  },
28636
28912
  emits: ["filter"],
28637
28913
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -28665,40 +28941,37 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
28665
28941
  __expose({ fetch: fetch2 });
28666
28942
  return (_ctx, _cache) => {
28667
28943
  var _a25;
28668
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
28669
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$_, {
28944
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
28945
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$14, {
28670
28946
  key: 0,
28671
28947
  options: _ctx.options.currentFilters,
28672
28948
  expandable: (_a25 = _ctx.expandable) != null ? _a25 : false
28673
28949
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
28674
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$Y, {
28950
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$12, {
28675
28951
  key: 1,
28676
28952
  options: _ctx.options.categories,
28677
28953
  ref_key: "categoryFilters",
28678
28954
  ref: categoryFilters
28679
28955
  }, null, 8, ["options"])) : createCommentVNode("", true),
28680
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
28956
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
28681
28957
  key: 2,
28682
28958
  options: _ctx.options.facets,
28959
+ "facet-style": _ctx.style,
28683
28960
  onFilter: filter
28684
- }, null, 8, ["options"])) : createCommentVNode("", true)
28961
+ }, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
28685
28962
  ])) : createCommentVNode("", true);
28686
28963
  };
28687
28964
  }
28688
28965
  });
28689
- const _hoisted_1$I = {
28690
- key: 0,
28691
- class: "lupa-mobile-filter-sidebar"
28692
- };
28693
- const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
28694
- const _hoisted_3$o = { class: "lupa-sidebar-top" };
28695
- const _hoisted_4$g = { class: "lupa-sidebar-title" };
28696
- const _hoisted_5$b = {
28966
+ const _hoisted_1$K = { class: "lupa-mobile-sidebar-content" };
28967
+ const _hoisted_2$y = { class: "lupa-sidebar-top" };
28968
+ const _hoisted_3$q = { class: "lupa-sidebar-title" };
28969
+ const _hoisted_4$i = {
28697
28970
  key: 0,
28698
28971
  class: "lupa-sidebar-filter-count"
28699
28972
  };
28700
- const _hoisted_6$5 = { class: "lupa-sidebar-filter-options" };
28701
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
28973
+ const _hoisted_5$c = { class: "lupa-sidebar-filter-options" };
28974
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
28702
28975
  __name: "MobileFilterSidebar",
28703
28976
  props: {
28704
28977
  options: {}
@@ -28707,7 +28980,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
28707
28980
  setup(__props, { emit: __emit }) {
28708
28981
  const props = __props;
28709
28982
  const searchResultStore = useSearchResultStore();
28710
- const { currentFilterCount } = storeToRefs(searchResultStore);
28983
+ const { currentFilterCount, isFilterSidebarVisible, isSidebarClosing } = storeToRefs(searchResultStore);
28711
28984
  const emit = __emit;
28712
28985
  const sidebarTitle = computed(() => {
28713
28986
  var _a25, _b25, _c;
@@ -28717,7 +28990,6 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
28717
28990
  var _a25, _b25;
28718
28991
  return Boolean((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.showFilterCount) && currentFilterCount.value > 0;
28719
28992
  });
28720
- const isMobileSidebarVisible = computed(() => searchResultStore.isMobileSidebarVisible);
28721
28993
  const isActiveFiltersExpanded = computed(() => {
28722
28994
  var _a25, _b25;
28723
28995
  return !((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.activeFiltersExpanded);
@@ -28730,42 +29002,46 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
28730
29002
  handleMobileToggle();
28731
29003
  };
28732
29004
  return (_ctx, _cache) => {
28733
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
29005
+ return unref(isFilterSidebarVisible) ? (openBlock(), createElementBlock("div", {
29006
+ key: 0,
29007
+ class: normalizeClass(["lupa-mobile-filter-sidebar", { "lupa-mobile-filter-sidebar-is-closing": unref(isSidebarClosing) }])
29008
+ }, [
28734
29009
  createElementVNode("div", {
28735
29010
  class: "lupa-sidebar-close",
28736
29011
  onClick: withModifiers(handleMobileToggle, ["stop"])
28737
29012
  }),
28738
- createElementVNode("div", _hoisted_2$w, [
28739
- createElementVNode("div", _hoisted_3$o, [
28740
- createElementVNode("div", _hoisted_4$g, [
29013
+ createElementVNode("div", _hoisted_1$K, [
29014
+ createElementVNode("div", _hoisted_2$y, [
29015
+ createElementVNode("div", _hoisted_3$q, [
28741
29016
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
28742
- isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
29017
+ isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
28743
29018
  ]),
28744
29019
  createElementVNode("div", {
28745
29020
  class: "lupa-filter-toggle-mobile",
28746
29021
  onClick: handleMobileToggle
28747
29022
  })
28748
29023
  ]),
28749
- createElementVNode("div", _hoisted_6$5, [
28750
- createVNode(_sfc_main$P, {
29024
+ createElementVNode("div", _hoisted_5$c, [
29025
+ createVNode(_sfc_main$S, {
28751
29026
  options: _ctx.options,
28752
29027
  expandable: isActiveFiltersExpanded.value,
29028
+ style: "sidebar",
28753
29029
  onFilter: filter
28754
29030
  }, null, 8, ["options", "expandable"])
28755
29031
  ])
28756
29032
  ])
28757
- ])) : createCommentVNode("", true);
29033
+ ], 2)) : createCommentVNode("", true);
28758
29034
  };
28759
29035
  }
28760
29036
  });
28761
- const _hoisted_1$H = { id: "lupa-search-results-breadcrumbs" };
28762
- const _hoisted_2$v = ["href", "onClick"];
28763
- const _hoisted_3$n = {
29037
+ const _hoisted_1$J = { id: "lupa-search-results-breadcrumbs" };
29038
+ const _hoisted_2$x = ["href", "onClick"];
29039
+ const _hoisted_3$p = {
28764
29040
  key: 1,
28765
29041
  class: "lupa-search-results-breadcrumb-text"
28766
29042
  };
28767
- const _hoisted_4$f = { key: 2 };
28768
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
29043
+ const _hoisted_4$h = { key: 2 };
29044
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
28769
29045
  __name: "SearchResultsBreadcrumbs",
28770
29046
  props: {
28771
29047
  breadcrumbs: {}
@@ -28790,7 +29066,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
28790
29066
  handleRoutingEvent(link, event, hasEventRouting.value);
28791
29067
  };
28792
29068
  return (_ctx, _cache) => {
28793
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
29069
+ return openBlock(), createElementBlock("div", _hoisted_1$J, [
28794
29070
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
28795
29071
  var _a25;
28796
29072
  return openBlock(), createElementBlock("span", {
@@ -28805,20 +29081,20 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
28805
29081
  var _a26;
28806
29082
  return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
28807
29083
  }
28808
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
28809
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
29084
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$x)) : (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(getLabel(breadcrumb.label)), 1)),
29085
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$h, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
28810
29086
  ]);
28811
29087
  }), 128))
28812
29088
  ]);
28813
29089
  };
28814
29090
  }
28815
29091
  });
28816
- const _hoisted_1$G = {
29092
+ const _hoisted_1$I = {
28817
29093
  key: 0,
28818
29094
  id: "lupa-search-result-filters",
28819
29095
  class: "lupa-search-result-filters lupa-search-result-top-filters"
28820
29096
  };
28821
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
29097
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
28822
29098
  __name: "FiltersTopDropdown",
28823
29099
  props: {
28824
29100
  options: {}
@@ -28836,8 +29112,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
28836
29112
  });
28837
29113
  return (_ctx, _cache) => {
28838
29114
  var _a25;
28839
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$G, [
28840
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
29115
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
29116
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
28841
29117
  key: 0,
28842
29118
  options: _ctx.options.facets,
28843
29119
  "facet-style": (_a25 = _ctx.options.facets.style) == null ? void 0 : _a25.type,
@@ -28848,8 +29124,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
28848
29124
  };
28849
29125
  }
28850
29126
  });
28851
- const _hoisted_1$F = { id: "lupa-search-results-layout-selection" };
28852
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
29127
+ const _hoisted_1$H = { id: "lupa-search-results-layout-selection" };
29128
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
28853
29129
  __name: "SearchResultsLayoutSelection",
28854
29130
  setup(__props) {
28855
29131
  const searchResultStore = useSearchResultStore();
@@ -28860,7 +29136,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
28860
29136
  searchResultStore.setLayout(layout2);
28861
29137
  };
28862
29138
  return (_ctx, _cache) => {
28863
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
29139
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
28864
29140
  createElementVNode("div", {
28865
29141
  class: normalizeClass([
28866
29142
  "lupa-layout-selection-grid",
@@ -28882,64 +29158,38 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
28882
29158
  };
28883
29159
  }
28884
29160
  });
28885
- const _hoisted_1$E = {
29161
+ const _hoisted_1$G = {
28886
29162
  key: 0,
28887
29163
  class: "lupa-mobile-toggle-filter-count"
28888
29164
  };
28889
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
29165
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
28890
29166
  __name: "SearchResultsMobileToggle",
28891
- props: {
28892
- labels: {},
28893
- showFilterCount: { type: Boolean }
28894
- },
28895
29167
  setup(__props) {
28896
- const props = __props;
28897
- const searchResultStore = useSearchResultStore();
28898
- const optionsStore = useOptionsStore();
28899
- const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
28900
- const { searchResultOptions } = storeToRefs(optionsStore);
28901
- const disableMobileBodyScrollLock = computed(
28902
- () => {
28903
- var _a25, _b25, _c;
28904
- return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
28905
- }
28906
- );
28907
- const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
28908
- const defaultLabel = computed(() => props.labels.mobileFilterButton);
28909
- const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
28910
- const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
28911
- const label = computed(() => {
28912
- if (isSidebarVisible.value && openLabel.value) {
28913
- return openLabel.value;
28914
- }
28915
- if (hasActiveFilters.value && activeLabel.value) {
28916
- return activeLabel.value;
28917
- }
28918
- return defaultLabel.value;
28919
- });
28920
- const handleMobileToggle = () => {
28921
- searchResultStore.setSidebarState({
28922
- visible: !isSidebarVisible.value,
28923
- disableBodyScrolling: !disableMobileBodyScrollLock.value
28924
- });
28925
- };
28926
- const hasActiveFilters = computed(() => currentFilterCount.value > 0);
29168
+ const {
29169
+ isSidebarVisible,
29170
+ label,
29171
+ currentFilterCount,
29172
+ hasActiveFilters,
29173
+ showMobileFilterCount,
29174
+ handleFilterSidebarToggle
29175
+ } = useSidebarToggle();
28927
29176
  return (_ctx, _cache) => {
28928
29177
  return openBlock(), createElementBlock("div", {
28929
29178
  class: normalizeClass(["lupa-mobile-toggle", {
28930
29179
  "lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
28931
- "lupa-mobile-toggle-has-filters": hasActiveFilters.value,
28932
- "lupa-sidebar-open": isSidebarVisible.value
29180
+ "lupa-mobile-toggle-has-filters": unref(hasActiveFilters),
29181
+ "lupa-sidebar-open": unref(isSidebarVisible)
28933
29182
  }]),
28934
- onClick: handleMobileToggle
29183
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
29184
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
28935
29185
  }, [
28936
- createTextVNode(toDisplayString(label.value) + " ", 1),
28937
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$E, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
29186
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
29187
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$G, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
28938
29188
  ], 2);
28939
29189
  };
28940
29190
  }
28941
29191
  });
28942
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
29192
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
28943
29193
  __name: "SearchResultsMobileFilterClose",
28944
29194
  props: {
28945
29195
  label: {}
@@ -28959,20 +29209,20 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
28959
29209
  };
28960
29210
  }
28961
29211
  });
28962
- const _hoisted_1$D = {
29212
+ const _hoisted_1$F = {
28963
29213
  key: 0,
28964
29214
  id: "lupa-search-results-page-select",
28965
29215
  "data-cy": "lupa-search-results-page-select"
28966
29216
  };
28967
- const _hoisted_2$u = {
29217
+ const _hoisted_2$w = {
28968
29218
  key: 0,
28969
29219
  class: "lupa-page-number-separator"
28970
29220
  };
28971
- const _hoisted_3$m = {
29221
+ const _hoisted_3$o = {
28972
29222
  key: 0,
28973
29223
  class: "lupa-page-number-separator"
28974
29224
  };
28975
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
29225
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
28976
29226
  __name: "SearchResultsPageSelect",
28977
29227
  props: {
28978
29228
  lastPageLabel: {},
@@ -29067,7 +29317,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
29067
29317
  };
29068
29318
  return (_ctx, _cache) => {
29069
29319
  var _a25;
29070
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
29320
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
29071
29321
  showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
29072
29322
  key: 0,
29073
29323
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -29091,7 +29341,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
29091
29341
  _: 1,
29092
29342
  __: [4]
29093
29343
  }, 8, ["href"])),
29094
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
29344
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, "...")) : createCommentVNode("", true)
29095
29345
  ], 64)) : createCommentVNode("", true),
29096
29346
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
29097
29347
  return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
@@ -29111,7 +29361,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
29111
29361
  }, 1032, ["href", "onClick", "class"]);
29112
29362
  }), 128)),
29113
29363
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
29114
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
29364
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$o, "...")) : createCommentVNode("", true),
29115
29365
  (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
29116
29366
  href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
29117
29367
  class: "lupa-page-number lupa-page-number-last",
@@ -29142,18 +29392,18 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
29142
29392
  };
29143
29393
  }
29144
29394
  });
29145
- const _hoisted_1$C = {
29395
+ const _hoisted_1$E = {
29146
29396
  id: "lupa-search-results-page-size",
29147
29397
  "data-cy": "lupa-search-results-page-size"
29148
29398
  };
29149
- const _hoisted_2$t = { id: "lupa-select" };
29150
- const _hoisted_3$l = {
29399
+ const _hoisted_2$v = { id: "lupa-select" };
29400
+ const _hoisted_3$n = {
29151
29401
  class: "lupa-select-label",
29152
29402
  for: "lupa-page-size-select-dropdown"
29153
29403
  };
29154
- const _hoisted_4$e = ["aria-label"];
29155
- const _hoisted_5$a = ["value"];
29156
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
29404
+ const _hoisted_4$g = ["aria-label"];
29405
+ const _hoisted_5$b = ["value"];
29406
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
29157
29407
  __name: "SearchResultsPageSize",
29158
29408
  props: {
29159
29409
  labels: {},
@@ -29183,9 +29433,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
29183
29433
  };
29184
29434
  return (_ctx, _cache) => {
29185
29435
  var _a25, _b25, _c;
29186
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
29187
- createElementVNode("div", _hoisted_2$t, [
29188
- createElementVNode("label", _hoisted_3$l, toDisplayString(label.value), 1),
29436
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
29437
+ createElementVNode("div", _hoisted_2$v, [
29438
+ createElementVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
29189
29439
  createElementVNode("select", {
29190
29440
  id: "lupa-page-size-select-dropdown",
29191
29441
  class: "lupa-select-dropdown",
@@ -29199,110 +29449,161 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
29199
29449
  return openBlock(), createElementBlock("option", {
29200
29450
  key: option,
29201
29451
  value: option
29202
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
29452
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$b);
29203
29453
  }), 128))
29204
- ], 40, _hoisted_4$e)
29454
+ ], 40, _hoisted_4$g)
29205
29455
  ])
29206
29456
  ]);
29207
29457
  };
29208
29458
  }
29209
29459
  });
29210
- const _hoisted_1$B = {
29460
+ const useSorting = () => {
29461
+ const paramStore = useParamsStore();
29462
+ const optionStore = useOptionsStore();
29463
+ const { sort } = storeToRefs(paramStore);
29464
+ const { ariaLabels, searchResultOptions } = storeToRefs(optionStore);
29465
+ const selectedKey = ref("");
29466
+ const previousKey = ref("");
29467
+ const sortStyle = computed(() => {
29468
+ return searchResultOptions.value.sortStyle;
29469
+ });
29470
+ const sortOptions = computed(() => {
29471
+ return searchResultOptions.value.sort;
29472
+ });
29473
+ const callbacks = computed(() => {
29474
+ return searchResultOptions.value.callbacks;
29475
+ });
29476
+ const sotyByTitleLabel = computed(() => {
29477
+ var _a25;
29478
+ return (_a25 = searchResultOptions.value.labels) == null ? void 0 : _a25.sortBy;
29479
+ });
29480
+ const sortItems = computed(() => {
29481
+ if (sortOptions.value && sortOptions.value.length) {
29482
+ return sortOptions.value;
29483
+ } else {
29484
+ return [];
29485
+ }
29486
+ });
29487
+ const defaultSortValue = computed(() => {
29488
+ var _a25, _b25, _c;
29489
+ return (_c = (_a25 = sortOptions.value) == null ? void 0 : _a25.find((x) => x.default)) != null ? _c : (_b25 = sortItems.value) == null ? void 0 : _b25[0];
29490
+ });
29491
+ const setSortValue = () => {
29492
+ var _a25, _b25;
29493
+ const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
29494
+ selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
29495
+ previousKey.value = selectedKey.value;
29496
+ };
29497
+ watch(sort, () => setSortValue());
29498
+ const handleSelect = () => {
29499
+ var _a25, _b25, _c;
29500
+ const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
29501
+ if (!value) {
29502
+ return;
29503
+ }
29504
+ paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
29505
+ (_c = (_b25 = callbacks.value) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
29506
+ paramStore.appendParams({
29507
+ params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS.SORT), value }],
29508
+ paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS.PAGE)]
29509
+ });
29510
+ previousKey.value = selectedKey.value;
29511
+ };
29512
+ return {
29513
+ sotyByTitleLabel,
29514
+ sortItems,
29515
+ selectedKey,
29516
+ ariaLabels,
29517
+ sortOptions,
29518
+ sortStyle,
29519
+ handleSelect,
29520
+ setSortValue
29521
+ };
29522
+ };
29523
+ const _hoisted_1$D = {
29524
+ key: 0,
29211
29525
  id: "lupa-search-results-sort",
29212
29526
  class: "lupa-search-results-sort"
29213
29527
  };
29214
- const _hoisted_2$s = { id: "lupa-select" };
29215
- const _hoisted_3$k = {
29528
+ const _hoisted_2$u = { id: "lupa-select" };
29529
+ const _hoisted_3$m = {
29216
29530
  class: "lupa-select-label",
29217
29531
  for: "lupa-sort-select-dropdown"
29218
29532
  };
29219
- const _hoisted_4$d = ["aria-label"];
29220
- const _hoisted_5$9 = ["value"];
29221
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
29533
+ const _hoisted_4$f = ["aria-label"];
29534
+ const _hoisted_5$a = ["value"];
29535
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
29222
29536
  __name: "SearchResultsSort",
29223
- props: {
29224
- options: {},
29225
- callbacks: {}
29226
- },
29227
29537
  setup(__props) {
29228
- const props = __props;
29229
- const paramStore = useParamsStore();
29230
- const optionStore = useOptionsStore();
29231
- const { sort } = storeToRefs(paramStore);
29232
- const { ariaLabels } = storeToRefs(optionStore);
29233
- const selectedKey = ref("");
29234
- const previousKey = ref("");
29235
- const sortItems = computed(() => {
29236
- if (props.options.options && props.options.options.length) {
29237
- return props.options.options;
29238
- } else {
29239
- return [];
29240
- }
29241
- });
29242
- const defaultSortValue = computed(() => {
29243
- var _a25;
29244
- return (_a25 = props.options.options.find((x) => x.default)) != null ? _a25 : props.options.options[0];
29245
- });
29246
- const setSortValue = () => {
29247
- var _a25, _b25;
29248
- const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
29249
- selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
29250
- previousKey.value = selectedKey.value;
29251
- };
29252
- watch(sort, () => setSortValue());
29538
+ const {
29539
+ sortItems,
29540
+ selectedKey,
29541
+ ariaLabels,
29542
+ sotyByTitleLabel,
29543
+ sortStyle,
29544
+ handleSelect,
29545
+ setSortValue
29546
+ } = useSorting();
29253
29547
  onMounted(() => {
29254
29548
  setSortValue();
29255
29549
  });
29256
- const handleSelect = () => {
29257
- var _a25, _b25, _c;
29258
- const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
29259
- if (!value) {
29260
- return;
29261
- }
29262
- paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
29263
- (_c = (_b25 = props.callbacks) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
29264
- paramStore.appendParams({
29265
- params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS.SORT), value }],
29266
- paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS.PAGE)]
29267
- });
29268
- previousKey.value = selectedKey.value;
29269
- };
29550
+ const showDefaultSort = computed(() => {
29551
+ var _a25;
29552
+ return !sortStyle.value || ((_a25 = sortStyle.value) == null ? void 0 : _a25.type) !== "drawer";
29553
+ });
29270
29554
  return (_ctx, _cache) => {
29271
29555
  var _a25, _b25;
29272
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
29273
- createElementVNode("div", _hoisted_2$s, [
29274
- createElementVNode("label", _hoisted_3$k, toDisplayString(_ctx.options.label), 1),
29556
+ return showDefaultSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
29557
+ createElementVNode("div", _hoisted_2$u, [
29558
+ createElementVNode("label", _hoisted_3$m, toDisplayString(unref(sotyByTitleLabel)), 1),
29275
29559
  withDirectives(createElementVNode("select", {
29276
29560
  id: "lupa-sort-select-dropdown",
29277
29561
  class: "lupa-select-dropdown",
29278
- "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : _ctx.options.label,
29562
+ "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : unref(sotyByTitleLabel),
29279
29563
  "data-cy": "lupa-sort-select-dropdown",
29280
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
29281
- onChange: handleSelect,
29564
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectedKey) ? selectedKey.value = $event : null),
29565
+ onChange: _cache[1] || (_cache[1] = //@ts-ignore
29566
+ (...args) => unref(handleSelect) && unref(handleSelect)(...args)),
29282
29567
  ref: "select"
29283
29568
  }, [
29284
- (openBlock(true), createElementBlock(Fragment, null, renderList(sortItems.value, (option) => {
29569
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
29285
29570
  return openBlock(), createElementBlock("option", {
29286
29571
  key: option.key,
29287
29572
  value: option.key
29288
- }, toDisplayString(option.label), 9, _hoisted_5$9);
29573
+ }, toDisplayString(option.label), 9, _hoisted_5$a);
29289
29574
  }), 128))
29290
- ], 40, _hoisted_4$d), [
29291
- [vModelSelect, selectedKey.value]
29575
+ ], 40, _hoisted_4$f), [
29576
+ [vModelSelect, unref(selectedKey)]
29292
29577
  ])
29293
29578
  ])
29294
- ]);
29579
+ ])) : createCommentVNode("", true);
29580
+ };
29581
+ }
29582
+ });
29583
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
29584
+ __name: "SearchResultsSortDrawerToggle",
29585
+ setup(__props) {
29586
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
29587
+ return (_ctx, _cache) => {
29588
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
29589
+ key: 0,
29590
+ class: normalizeClass(["lupa-mobile-toggle lupa-mobile-sort-toggle", {
29591
+ "lupa-sidebar-open": unref(isSidebarVisible)
29592
+ }]),
29593
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
29594
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
29595
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
29295
29596
  };
29296
29597
  }
29297
29598
  });
29298
- const _hoisted_1$A = { class: "lupa-toolbar-left" };
29299
- const _hoisted_2$r = {
29599
+ const _hoisted_1$C = { class: "lupa-toolbar-left" };
29600
+ const _hoisted_2$t = {
29300
29601
  key: 0,
29301
29602
  class: "lupa-toolbar-right-title"
29302
29603
  };
29303
- const _hoisted_3$j = { key: 2 };
29304
- const _hoisted_4$c = { key: 4 };
29305
- const _hoisted_5$8 = { key: 6 };
29604
+ const _hoisted_3$l = { key: 2 };
29605
+ const _hoisted_4$e = { key: 4 };
29606
+ const _hoisted_5$9 = { key: 6 };
29306
29607
  const _hoisted_6$4 = { class: "lupa-toolbar-right" };
29307
29608
  const _hoisted_7$2 = {
29308
29609
  key: 0,
@@ -29310,7 +29611,7 @@ const _hoisted_7$2 = {
29310
29611
  };
29311
29612
  const _hoisted_8 = { key: 2 };
29312
29613
  const _hoisted_9 = { key: 4 };
29313
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
29614
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
29314
29615
  __name: "SearchResultsToolbar",
29315
29616
  props: {
29316
29617
  options: {},
@@ -29326,7 +29627,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
29326
29627
  const searchResultStore = useSearchResultStore();
29327
29628
  const optionsStore = useOptionsStore();
29328
29629
  const { page, limit } = storeToRefs(paramStore);
29329
- const { hasAnyFilter, searchResult, isMobileSidebarVisible } = storeToRefs(searchResultStore);
29630
+ const { hasAnyFilter, searchResult, isFilterSidebarVisible } = storeToRefs(searchResultStore);
29330
29631
  const { currentResolutionPageSizes } = storeToRefs(optionsStore);
29331
29632
  const isBottomLocation = computed(() => {
29332
29633
  return props.paginationLocation === "bottom";
@@ -29404,7 +29705,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
29404
29705
  var _a25;
29405
29706
  return (_a25 = optionsValue.value.labels.toolbarRightLabel) != null ? _a25 : "";
29406
29707
  });
29407
- const showMobileFilterCount = computed(() => {
29708
+ computed(() => {
29408
29709
  var _a25, _b25, _c;
29409
29710
  return Boolean((_c = (_b25 = (_a25 = optionsValue.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount);
29410
29711
  });
@@ -29423,39 +29724,37 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
29423
29724
  id: "lupa-search-results-toolbar",
29424
29725
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
29425
29726
  }, [
29426
- createElementVNode("div", _hoisted_1$A, [
29427
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
29428
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$L, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$j)),
29429
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$11, {
29727
+ createElementVNode("div", _hoisted_1$C, [
29728
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
29729
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$O, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$l)),
29730
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$17, {
29430
29731
  key: 3,
29431
29732
  label: searchSummaryLabel.value,
29432
29733
  clearable: unref(hasAnyFilter) && showFilterClear.value,
29433
29734
  onClear: handleClearAll
29434
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
29435
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
29735
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$e)),
29736
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$L, {
29436
29737
  key: 5,
29437
29738
  options: paginationOptions.value.pageSelect,
29438
29739
  "last-page-label": paginationOptions.value.labels.showMore,
29439
29740
  "first-page-label": paginationOptions.value.labels.showLess
29440
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
29741
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$9))
29441
29742
  ]),
29442
29743
  createElementVNode("div", _hoisted_6$4, [
29443
29744
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
29444
- createVNode(_sfc_main$K, {
29445
- labels: optionsValue.value.labels,
29446
- "show-filter-count": showMobileFilterCount.value
29447
- }, null, 8, ["labels", "show-filter-count"]),
29448
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$H, {
29745
+ createVNode(_sfc_main$N),
29746
+ createVNode(_sfc_main$I),
29747
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$K, {
29449
29748
  key: 1,
29450
29749
  options: paginationOptions.value.pageSize,
29451
29750
  labels: paginationOptions.value.labels
29452
29751
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
29453
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$G, {
29752
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$J, {
29454
29753
  key: 3,
29455
29754
  options: sortOptions.value,
29456
29755
  callbacks: callbacks.value
29457
29756
  }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9)),
29458
- showFiltersCloseButton.value && unref(isMobileSidebarVisible) ? (openBlock(), createBlock(_sfc_main$J, {
29757
+ showFiltersCloseButton.value && unref(isFilterSidebarVisible) ? (openBlock(), createBlock(_sfc_main$M, {
29459
29758
  key: 5,
29460
29759
  label: optionsValue.value.labels.mobileFilterCloseButton
29461
29760
  }, null, 8, ["label"])) : createCommentVNode("", true)
@@ -29464,7 +29763,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
29464
29763
  };
29465
29764
  }
29466
29765
  });
29467
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
29766
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
29468
29767
  __name: "SearchResultsProductImage",
29469
29768
  props: {
29470
29769
  item: {},
@@ -29472,7 +29771,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
29472
29771
  },
29473
29772
  setup(__props) {
29474
29773
  return (_ctx, _cache) => {
29475
- return openBlock(), createBlock(_sfc_main$1q, {
29774
+ return openBlock(), createBlock(_sfc_main$1w, {
29476
29775
  item: _ctx.item,
29477
29776
  options: _ctx.options,
29478
29777
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -29481,16 +29780,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
29481
29780
  };
29482
29781
  }
29483
29782
  });
29484
- const _hoisted_1$z = ["title", "innerHTML"];
29485
- const _hoisted_2$q = ["title"];
29486
- const _hoisted_3$i = ["href", "innerHTML"];
29487
- const _hoisted_4$b = ["title"];
29488
- const _hoisted_5$7 = {
29783
+ const _hoisted_1$B = ["title", "innerHTML"];
29784
+ const _hoisted_2$s = ["title"];
29785
+ const _hoisted_3$k = ["href", "innerHTML"];
29786
+ const _hoisted_4$d = ["title"];
29787
+ const _hoisted_5$8 = {
29489
29788
  key: 0,
29490
29789
  class: "lupa-search-results-product-title-text"
29491
29790
  };
29492
29791
  const _hoisted_6$3 = ["href"];
29493
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
29792
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
29494
29793
  __name: "SearchResultsProductTitle",
29495
29794
  props: {
29496
29795
  item: {},
@@ -29527,7 +29826,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
29527
29826
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
29528
29827
  title: sanitizedTitle.value,
29529
29828
  innerHTML: sanitizedTitle.value
29530
- }, null, 12, _hoisted_1$z)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
29829
+ }, null, 12, _hoisted_1$B)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
29531
29830
  key: 1,
29532
29831
  class: "lupa-search-results-product-title",
29533
29832
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -29538,26 +29837,26 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
29538
29837
  class: "lupa-search-results-product-title-text lupa-title-link",
29539
29838
  innerHTML: sanitizedTitle.value,
29540
29839
  onClick: handleNavigation
29541
- }, null, 8, _hoisted_3$i)
29542
- ], 12, _hoisted_2$q)) : (openBlock(), createElementBlock("div", {
29840
+ }, null, 8, _hoisted_3$k)
29841
+ ], 12, _hoisted_2$s)) : (openBlock(), createElementBlock("div", {
29543
29842
  key: 2,
29544
29843
  class: "lupa-search-results-product-title",
29545
29844
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
29546
29845
  title: title.value
29547
29846
  }, [
29548
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29847
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29549
29848
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
29550
29849
  key: 1,
29551
29850
  href: _ctx.link,
29552
29851
  class: "lupa-search-results-product-title-text lupa-title-link",
29553
29852
  onClick: handleNavigation
29554
29853
  }, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
29555
- ], 12, _hoisted_4$b));
29854
+ ], 12, _hoisted_4$d));
29556
29855
  };
29557
29856
  }
29558
29857
  });
29559
- const _hoisted_1$y = ["innerHTML"];
29560
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
29858
+ const _hoisted_1$A = ["innerHTML"];
29859
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
29561
29860
  __name: "SearchResultsProductDescription",
29562
29861
  props: {
29563
29862
  item: {},
@@ -29584,7 +29883,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
29584
29883
  class: "lupa-search-results-product-description",
29585
29884
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
29586
29885
  innerHTML: sanitizedDescription.value
29587
- }, null, 12, _hoisted_1$y)) : (openBlock(), createElementBlock("div", {
29886
+ }, null, 12, _hoisted_1$A)) : (openBlock(), createElementBlock("div", {
29588
29887
  key: 1,
29589
29888
  class: "lupa-search-results-product-description",
29590
29889
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -29592,15 +29891,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
29592
29891
  };
29593
29892
  }
29594
29893
  });
29595
- const _hoisted_1$x = { id: "lupa-search-results-rating" };
29596
- const _hoisted_2$p = { class: "lupa-ratings" };
29597
- const _hoisted_3$h = { class: "lupa-ratings-base" };
29598
- const _hoisted_4$a = ["innerHTML"];
29599
- const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
29894
+ const _hoisted_1$z = { id: "lupa-search-results-rating" };
29895
+ const _hoisted_2$r = { class: "lupa-ratings" };
29896
+ const _hoisted_3$j = { class: "lupa-ratings-base" };
29897
+ const _hoisted_4$c = ["innerHTML"];
29898
+ const _hoisted_5$7 = { class: "lupa-rating-wrapper" };
29600
29899
  const _hoisted_6$2 = ["innerHTML"];
29601
29900
  const _hoisted_7$1 = ["href"];
29602
29901
  const STAR_COUNT = 5;
29603
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
29902
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
29604
29903
  __name: "SearchResultsProductRating",
29605
29904
  props: {
29606
29905
  item: {},
@@ -29637,18 +29936,18 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29637
29936
  return generateLink(props.options.links.ratingDetails, props.item);
29638
29937
  });
29639
29938
  return (_ctx, _cache) => {
29640
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
29641
- createElementVNode("div", _hoisted_2$p, [
29642
- createElementVNode("div", _hoisted_3$h, [
29939
+ return openBlock(), createElementBlock("div", _hoisted_1$z, [
29940
+ createElementVNode("div", _hoisted_2$r, [
29941
+ createElementVNode("div", _hoisted_3$j, [
29643
29942
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
29644
29943
  return openBlock(), createElementBlock("div", {
29645
29944
  key: index,
29646
29945
  innerHTML: star,
29647
29946
  class: "lupa-rating lupa-rating-not-highlighted"
29648
- }, null, 8, _hoisted_4$a);
29947
+ }, null, 8, _hoisted_4$c);
29649
29948
  }), 128))
29650
29949
  ]),
29651
- createElementVNode("div", _hoisted_5$6, [
29950
+ createElementVNode("div", _hoisted_5$7, [
29652
29951
  createElementVNode("div", {
29653
29952
  class: "lupa-ratings-highlighted",
29654
29953
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -29671,11 +29970,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29671
29970
  };
29672
29971
  }
29673
29972
  });
29674
- const _hoisted_1$w = {
29973
+ const _hoisted_1$y = {
29675
29974
  class: "lupa-search-results-product-regular-price",
29676
29975
  "data-cy": "lupa-search-results-product-regular-price"
29677
29976
  };
29678
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
29977
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
29679
29978
  __name: "SearchResultsProductRegularPrice",
29680
29979
  props: {
29681
29980
  item: {},
@@ -29697,11 +29996,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
29697
29996
  );
29698
29997
  });
29699
29998
  return (_ctx, _cache) => {
29700
- return openBlock(), createElementBlock("div", _hoisted_1$w, toDisplayString(price.value), 1);
29999
+ return openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(price.value), 1);
29701
30000
  };
29702
30001
  }
29703
30002
  });
29704
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
30003
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29705
30004
  __name: "SearchResultsProductPrice",
29706
30005
  props: {
29707
30006
  item: {},
@@ -29735,12 +30034,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
29735
30034
  };
29736
30035
  }
29737
30036
  });
29738
- const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
29739
- const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
29740
- const _hoisted_3$g = ["disabled"];
29741
- const _hoisted_4$9 = ["href"];
29742
- const _hoisted_5$5 = ["id", "disabled"];
29743
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
30037
+ const _hoisted_1$x = { class: "lupa-search-results-add-to-cart-wrapper" };
30038
+ const _hoisted_2$q = { class: "lupa-search-results-product-addtocart" };
30039
+ const _hoisted_3$i = ["disabled"];
30040
+ const _hoisted_4$b = ["href"];
30041
+ const _hoisted_5$6 = ["id", "disabled"];
30042
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
29744
30043
  __name: "SearchResultsProductAddToCart",
29745
30044
  props: {
29746
30045
  item: {},
@@ -29799,16 +30098,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
29799
30098
  loading.value = false;
29800
30099
  });
29801
30100
  return (_ctx, _cache) => {
29802
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
29803
- createElementVNode("div", _hoisted_2$o, [
30101
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
30102
+ createElementVNode("div", _hoisted_2$q, [
29804
30103
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
29805
30104
  key: 0,
29806
30105
  class: addToCartButtonClass.value,
29807
30106
  "data-cy": "lupa-add-to-cart",
29808
30107
  disabled: !inStockValue.value || loading.value
29809
30108
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
29810
- createElementVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
29811
- ], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
30109
+ createElementVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$b)
30110
+ ], 16, _hoisted_3$i)) : (openBlock(), createElementBlock("button", mergeProps({
29812
30111
  key: 1,
29813
30112
  id: id.value,
29814
30113
  class: addToCartButtonClass.value,
@@ -29816,18 +30115,18 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
29816
30115
  disabled: !inStockValue.value || loading.value
29817
30116
  }, _ctx.dynamicAttributes, {
29818
30117
  onClick: withModifiers(handleClick, ["stop"])
29819
- }), toDisplayString(label.value), 17, _hoisted_5$5))
30118
+ }), toDisplayString(label.value), 17, _hoisted_5$6))
29820
30119
  ])
29821
30120
  ]);
29822
30121
  };
29823
30122
  }
29824
30123
  });
29825
- const _hoisted_1$u = ["innerHTML"];
29826
- const _hoisted_2$n = { key: 0 };
29827
- const _hoisted_3$f = { key: 1 };
29828
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
29829
- const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
29830
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
30124
+ const _hoisted_1$w = ["innerHTML"];
30125
+ const _hoisted_2$p = { key: 0 };
30126
+ const _hoisted_3$h = { key: 1 };
30127
+ const _hoisted_4$a = { class: "lupa-search-box-custom-label" };
30128
+ const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
30129
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
29831
30130
  __name: "SearchResultsProductCustom",
29832
30131
  props: {
29833
30132
  item: {},
@@ -29869,20 +30168,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
29869
30168
  key: 0,
29870
30169
  class: className.value,
29871
30170
  innerHTML: text.value
29872
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$u)) : (openBlock(), createElementBlock("div", mergeProps({
30171
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$w)) : (openBlock(), createElementBlock("div", mergeProps({
29873
30172
  key: 1,
29874
30173
  class: className.value
29875
30174
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
29876
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
29877
- createElementVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
29878
- createElementVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
30175
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$h, [
30176
+ createElementVNode("div", _hoisted_4$a, toDisplayString(label.value), 1),
30177
+ createElementVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
29879
30178
  ]))
29880
30179
  ], 16));
29881
30180
  };
29882
30181
  }
29883
30182
  });
29884
- const _hoisted_1$t = ["innerHTML"];
29885
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
30183
+ const _hoisted_1$v = ["innerHTML"];
30184
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
29886
30185
  __name: "SearchResultsProductCustomHtmlElement",
29887
30186
  props: {
29888
30187
  item: {},
@@ -29918,15 +30217,15 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
29918
30217
  return openBlock(), createElementBlock("div", mergeProps({
29919
30218
  class: className.value,
29920
30219
  innerHTML: text.value
29921
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$t);
30220
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$v);
29922
30221
  };
29923
30222
  }
29924
30223
  });
29925
- const _hoisted_1$s = { id: "lupa-search-results-rating" };
29926
- const _hoisted_2$m = ["innerHTML"];
29927
- const _hoisted_3$e = { class: "lupa-ratings" };
29928
- const _hoisted_4$7 = ["href"];
29929
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
30224
+ const _hoisted_1$u = { id: "lupa-search-results-rating" };
30225
+ const _hoisted_2$o = ["innerHTML"];
30226
+ const _hoisted_3$g = { class: "lupa-ratings" };
30227
+ const _hoisted_4$9 = ["href"];
30228
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
29930
30229
  __name: "SearchResultsProductSingleStarRating",
29931
30230
  props: {
29932
30231
  item: {},
@@ -29954,35 +30253,35 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
29954
30253
  return RATING_STAR_HTML;
29955
30254
  });
29956
30255
  return (_ctx, _cache) => {
29957
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
30256
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
29958
30257
  createElementVNode("div", {
29959
30258
  innerHTML: star.value,
29960
30259
  class: "lupa-rating lupa-rating-highlighted"
29961
- }, null, 8, _hoisted_2$m),
29962
- createElementVNode("div", _hoisted_3$e, toDisplayString(rating.value), 1),
30260
+ }, null, 8, _hoisted_2$o),
30261
+ createElementVNode("div", _hoisted_3$g, toDisplayString(rating.value), 1),
29963
30262
  createElementVNode("a", {
29964
30263
  href: ratingLink.value,
29965
30264
  class: "lupa-total-ratings"
29966
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
30265
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$9)
29967
30266
  ]);
29968
30267
  };
29969
30268
  }
29970
30269
  });
29971
30270
  const __default__ = {
29972
30271
  components: {
29973
- SearchResultsProductImage: _sfc_main$E,
29974
- SearchResultsProductTitle: _sfc_main$D,
29975
- SearchResultsProductDescription: _sfc_main$C,
29976
- SearchResultsProductRating: _sfc_main$B,
29977
- SearchResultsProductRegularPrice: _sfc_main$A,
29978
- SearchResultsProductPrice: _sfc_main$z,
29979
- SearchResultsProductAddToCart: _sfc_main$y,
29980
- SearchResultsProductCustom: _sfc_main$x,
29981
- SearchResultsProductCustomHtmlElement: _sfc_main$w,
29982
- SearchResultsProductSingleStarRating: _sfc_main$v
29983
- }
29984
- };
29985
- const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
30272
+ SearchResultsProductImage: _sfc_main$G,
30273
+ SearchResultsProductTitle: _sfc_main$F,
30274
+ SearchResultsProductDescription: _sfc_main$E,
30275
+ SearchResultsProductRating: _sfc_main$D,
30276
+ SearchResultsProductRegularPrice: _sfc_main$C,
30277
+ SearchResultsProductPrice: _sfc_main$B,
30278
+ SearchResultsProductAddToCart: _sfc_main$A,
30279
+ SearchResultsProductCustom: _sfc_main$z,
30280
+ SearchResultsProductCustomHtmlElement: _sfc_main$y,
30281
+ SearchResultsProductSingleStarRating: _sfc_main$x
30282
+ }
30283
+ };
30284
+ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
29986
30285
  __name: "SearchResultsProductCardElement",
29987
30286
  props: {
29988
30287
  item: {},
@@ -30060,13 +30359,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
30060
30359
  };
30061
30360
  }
30062
30361
  }));
30063
- const _hoisted_1$r = ["href"];
30064
- const _hoisted_2$l = {
30362
+ const _hoisted_1$t = ["href"];
30363
+ const _hoisted_2$n = {
30065
30364
  key: 0,
30066
30365
  class: "lupa-out-of-stock"
30067
30366
  };
30068
- const _hoisted_3$d = { class: "lupa-search-result-product-details-section" };
30069
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
30367
+ const _hoisted_3$f = { class: "lupa-search-result-product-details-section" };
30368
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
30070
30369
  __name: "SearchResultsProductCard",
30071
30370
  props: {
30072
30371
  product: {},
@@ -30242,7 +30541,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30242
30541
  default: withCtx(() => {
30243
30542
  var _a25;
30244
30543
  return [
30245
- createVNode(_sfc_main$1a, { options: badgesOptions.value }, null, 8, ["options"]),
30544
+ createVNode(_sfc_main$1g, { options: badgesOptions.value }, null, 8, ["options"]),
30246
30545
  createElementVNode("div", {
30247
30546
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
30248
30547
  }, [
@@ -30252,7 +30551,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30252
30551
  onClick: handleNavigation
30253
30552
  }, [
30254
30553
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
30255
- return openBlock(), createBlock(_sfc_main$u, {
30554
+ return openBlock(), createBlock(_sfc_main$w, {
30256
30555
  class: "lupa-search-results-product-element",
30257
30556
  item: _ctx.product,
30258
30557
  element,
@@ -30263,16 +30562,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30263
30562
  onProductEvent: handleProductEvent
30264
30563
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
30265
30564
  }), 128)),
30266
- createVNode(_sfc_main$1a, {
30565
+ createVNode(_sfc_main$1g, {
30267
30566
  options: badgesOptions.value,
30268
30567
  position: "image",
30269
30568
  class: "lupa-image-badges"
30270
30569
  }, null, 8, ["options"]),
30271
- ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
30272
- ], 8, _hoisted_1$r),
30273
- createElementVNode("div", _hoisted_3$d, [
30570
+ ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
30571
+ ], 8, _hoisted_1$t),
30572
+ createElementVNode("div", _hoisted_3$f, [
30274
30573
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
30275
- return openBlock(), createBlock(_sfc_main$u, {
30574
+ return openBlock(), createBlock(_sfc_main$w, {
30276
30575
  class: "lupa-search-results-product-element",
30277
30576
  item: _ctx.product,
30278
30577
  element,
@@ -30290,7 +30589,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30290
30589
  class: normalizeClass("lupa-element-group-" + group)
30291
30590
  }, [
30292
30591
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
30293
- return openBlock(), createBlock(_sfc_main$u, {
30592
+ return openBlock(), createBlock(_sfc_main$w, {
30294
30593
  class: "lupa-search-results-product-element",
30295
30594
  item: _ctx.product,
30296
30595
  element,
@@ -30311,23 +30610,23 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30311
30610
  };
30312
30611
  }
30313
30612
  });
30314
- const _hoisted_1$q = {
30613
+ const _hoisted_1$s = {
30315
30614
  id: "lupa-search-results-similar-queries",
30316
30615
  "data-cy": "lupa-search-results-similar-queries"
30317
30616
  };
30318
- const _hoisted_2$k = { class: "lupa-similar-queries-label" };
30319
- const _hoisted_3$c = {
30617
+ const _hoisted_2$m = { class: "lupa-similar-queries-label" };
30618
+ const _hoisted_3$e = {
30320
30619
  class: "lupa-similar-query-label",
30321
30620
  "data-cy": "lupa-similar-query-label"
30322
30621
  };
30323
- const _hoisted_4$6 = ["onClick"];
30324
- const _hoisted_5$3 = ["innerHTML"];
30622
+ const _hoisted_4$8 = ["onClick"];
30623
+ const _hoisted_5$4 = ["innerHTML"];
30325
30624
  const _hoisted_6$1 = { key: 0 };
30326
30625
  const _hoisted_7 = {
30327
30626
  class: "lupa-products",
30328
30627
  "data-cy": "lupa-products"
30329
30628
  };
30330
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
30629
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
30331
30630
  __name: "SearchResultsSimilarQueries",
30332
30631
  props: {
30333
30632
  labels: {},
@@ -30365,11 +30664,11 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30365
30664
  };
30366
30665
  };
30367
30666
  return (_ctx, _cache) => {
30368
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
30369
- createElementVNode("div", _hoisted_2$k, toDisplayString(_ctx.labels.similarQueries), 1),
30667
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
30668
+ createElementVNode("div", _hoisted_2$m, toDisplayString(_ctx.labels.similarQueries), 1),
30370
30669
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
30371
30670
  return openBlock(), createElementBlock("div", { key: index }, [
30372
- createElementVNode("div", _hoisted_3$c, [
30671
+ createElementVNode("div", _hoisted_3$e, [
30373
30672
  createElementVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
30374
30673
  createElementVNode("span", {
30375
30674
  id: "lupa-similar-query-text-component",
@@ -30379,13 +30678,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30379
30678
  }, [
30380
30679
  createElementVNode("span", {
30381
30680
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
30382
- }, null, 8, _hoisted_5$3),
30681
+ }, null, 8, _hoisted_5$4),
30383
30682
  similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
30384
- ], 8, _hoisted_4$6)
30683
+ ], 8, _hoisted_4$8)
30385
30684
  ]),
30386
30685
  createElementVNode("div", _hoisted_7, [
30387
30686
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
30388
- return openBlock(), createBlock(_sfc_main$t, {
30687
+ return openBlock(), createBlock(_sfc_main$v, {
30389
30688
  style: normalizeStyle(_ctx.columnSize),
30390
30689
  key: getDocumentKey(index2, product),
30391
30690
  product,
@@ -30400,15 +30699,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30400
30699
  };
30401
30700
  }
30402
30701
  });
30403
- const _hoisted_1$p = {
30702
+ const _hoisted_1$r = {
30404
30703
  key: 0,
30405
30704
  class: "lupa-results-additional-panel"
30406
30705
  };
30407
- const _hoisted_2$j = {
30706
+ const _hoisted_2$l = {
30408
30707
  class: "lupa-results-additional-panel-items",
30409
30708
  "data-cy": "lupa-results-additional-panel-items"
30410
30709
  };
30411
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
30710
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30412
30711
  __name: "AdditionalPanel",
30413
30712
  props: {
30414
30713
  panel: {},
@@ -30481,10 +30780,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
30481
30780
  handleQueryChange();
30482
30781
  });
30483
30782
  return (_ctx, _cache) => {
30484
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
30485
- createElementVNode("div", _hoisted_2$j, [
30783
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
30784
+ createElementVNode("div", _hoisted_2$l, [
30486
30785
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
30487
- return openBlock(), createBlock(_sfc_main$t, {
30786
+ return openBlock(), createBlock(_sfc_main$v, {
30488
30787
  key: index,
30489
30788
  product: item,
30490
30789
  options: _ctx.panel,
@@ -30502,11 +30801,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
30502
30801
  };
30503
30802
  }
30504
30803
  });
30505
- const _hoisted_1$o = {
30804
+ const _hoisted_1$q = {
30506
30805
  key: 0,
30507
30806
  class: "lupa-results-additional-panels"
30508
30807
  };
30509
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
30808
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30510
30809
  __name: "AdditionalPanels",
30511
30810
  props: {
30512
30811
  options: {},
@@ -30523,9 +30822,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
30523
30822
  return locationPanels.value.length > 0;
30524
30823
  });
30525
30824
  return (_ctx, _cache) => {
30526
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
30825
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
30527
30826
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
30528
- return openBlock(), createBlock(_sfc_main$r, {
30827
+ return openBlock(), createBlock(_sfc_main$t, {
30529
30828
  key: panel.queryKey,
30530
30829
  panel,
30531
30830
  options: _ctx.sdkOptions
@@ -30542,29 +30841,29 @@ const _export_sfc = (sfc, props) => {
30542
30841
  }
30543
30842
  return target2;
30544
30843
  };
30545
- const _sfc_main$p = {};
30546
- const _hoisted_1$n = { class: "lupa-spinner-wrapper" };
30547
- const _hoisted_2$i = { class: "lupa-spinner" };
30844
+ const _sfc_main$r = {};
30845
+ const _hoisted_1$p = { class: "lupa-spinner-wrapper" };
30846
+ const _hoisted_2$k = { class: "lupa-spinner" };
30548
30847
  function _sfc_render(_ctx, _cache) {
30549
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
30550
- createElementVNode("div", _hoisted_2$i, [
30848
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
30849
+ createElementVNode("div", _hoisted_2$k, [
30551
30850
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
30552
30851
  return createElementVNode("div", { key: x });
30553
30852
  }), 64))
30554
30853
  ])
30555
30854
  ]);
30556
30855
  }
30557
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render]]);
30558
- const _hoisted_1$m = {
30856
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
30857
+ const _hoisted_1$o = {
30559
30858
  id: "lupa-search-results-similar-results",
30560
30859
  "data-cy": "lupa-search-results-similar-results"
30561
30860
  };
30562
- const _hoisted_2$h = { class: "lupa-similar-results-label" };
30563
- const _hoisted_3$b = {
30861
+ const _hoisted_2$j = { class: "lupa-similar-results-label" };
30862
+ const _hoisted_3$d = {
30564
30863
  class: "lupa-products",
30565
30864
  "data-cy": "lupa-products"
30566
30865
  };
30567
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
30866
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
30568
30867
  __name: "SearchResultsSimilarResults",
30569
30868
  props: {
30570
30869
  columnSize: {},
@@ -30585,11 +30884,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
30585
30884
  };
30586
30885
  });
30587
30886
  return (_ctx, _cache) => {
30588
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
30589
- createElementVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarResultsLabel), 1),
30590
- createElementVNode("div", _hoisted_3$b, [
30887
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
30888
+ createElementVNode("div", _hoisted_2$j, toDisplayString(_ctx.labels.similarResultsLabel), 1),
30889
+ createElementVNode("div", _hoisted_3$d, [
30591
30890
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
30592
- return openBlock(), createBlock(_sfc_main$t, {
30891
+ return openBlock(), createBlock(_sfc_main$v, {
30593
30892
  style: normalizeStyle(_ctx.columnSize),
30594
30893
  key: getDocumentKey(index, product),
30595
30894
  product,
@@ -30710,15 +31009,15 @@ const extractRelatedSource = (source, searchResults, options, activeFilters) =>
30710
31009
  return extractFacetsRelatedSource(source, searchResults, options, activeFilters);
30711
31010
  }
30712
31011
  });
30713
- const _hoisted_1$l = { class: "lupa-related-query-item" };
30714
- const _hoisted_2$g = { class: "lupa-related-query-image" };
30715
- const _hoisted_3$a = { class: "lupa-related-query-label" };
30716
- const _hoisted_4$5 = { class: "lupa-related-query-title" };
30717
- const _hoisted_5$2 = {
31012
+ const _hoisted_1$n = { class: "lupa-related-query-item" };
31013
+ const _hoisted_2$i = { class: "lupa-related-query-image" };
31014
+ const _hoisted_3$c = { class: "lupa-related-query-label" };
31015
+ const _hoisted_4$7 = { class: "lupa-related-query-title" };
31016
+ const _hoisted_5$3 = {
30718
31017
  key: 0,
30719
31018
  class: "lupa-related-query-count"
30720
31019
  };
30721
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
31020
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
30722
31021
  __name: "RelatedQueryPanel",
30723
31022
  props: {
30724
31023
  query: {},
@@ -30814,9 +31113,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
30814
31113
  });
30815
31114
  return (_ctx, _cache) => {
30816
31115
  var _a25;
30817
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
30818
- createElementVNode("div", _hoisted_2$g, [
30819
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
31116
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
31117
+ createElementVNode("div", _hoisted_2$i, [
31118
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
30820
31119
  key: 0,
30821
31120
  "wrapper-class": "lupa-related-query-image-wrapper",
30822
31121
  "image-class": "lupa-related-query-image",
@@ -30824,24 +31123,24 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
30824
31123
  options: image.value
30825
31124
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
30826
31125
  ]),
30827
- createElementVNode("div", _hoisted_3$a, [
30828
- createElementVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
30829
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
31126
+ createElementVNode("div", _hoisted_3$c, [
31127
+ createElementVNode("span", _hoisted_4$7, toDisplayString(_ctx.query), 1),
31128
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
30830
31129
  ])
30831
31130
  ]);
30832
31131
  };
30833
31132
  }
30834
31133
  });
30835
- const _hoisted_1$k = {
31134
+ const _hoisted_1$m = {
30836
31135
  key: 0,
30837
31136
  class: "lupa-related-queries"
30838
31137
  };
30839
- const _hoisted_2$f = {
31138
+ const _hoisted_2$h = {
30840
31139
  key: 0,
30841
31140
  class: "lupa-related-queries-title"
30842
31141
  };
30843
- const _hoisted_3$9 = ["onClick"];
30844
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
31142
+ const _hoisted_3$b = ["onClick"];
31143
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
30845
31144
  __name: "RelatedQueries",
30846
31145
  props: {
30847
31146
  options: {}
@@ -30935,8 +31234,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
30935
31234
  };
30936
31235
  return (_ctx, _cache) => {
30937
31236
  var _a25, _b25, _c, _d;
30938
- return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
30939
- ((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$f, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
31237
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
31238
+ ((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$h, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
30940
31239
  createElementVNode("ul", null, [
30941
31240
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
30942
31241
  return withDirectives((openBlock(), createElementBlock("li", {
@@ -30946,14 +31245,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
30946
31245
  createElementVNode("a", {
30947
31246
  onClick: ($event) => handleRelatedQueryClick(query)
30948
31247
  }, [
30949
- createVNode(_sfc_main$n, {
31248
+ createVNode(_sfc_main$p, {
30950
31249
  "source-key": query.key,
30951
31250
  options: _ctx.options,
30952
31251
  query: query.value,
30953
31252
  "existing-items-from-other-queries": allDisplayItems.value,
30954
31253
  onLoaded: (item) => processLoadedItem(query, item)
30955
31254
  }, null, 8, ["source-key", "options", "query", "existing-items-from-other-queries", "onLoaded"])
30956
- ], 8, _hoisted_3$9)
31255
+ ], 8, _hoisted_3$b)
30957
31256
  ], 2)), [
30958
31257
  [vShow, querySourceResultMap.value[query.value] !== false]
30959
31258
  ]);
@@ -30990,13 +31289,13 @@ const extractRedirectionSuggestion = (searchText = "", options) => {
30990
31289
  }
30991
31290
  return null;
30992
31291
  };
30993
- const _hoisted_1$j = {
31292
+ const _hoisted_1$l = {
30994
31293
  key: 0,
30995
31294
  class: "lupa-redirection-suggestion"
30996
31295
  };
30997
- const _hoisted_2$e = { class: "lupa-redirections-suggestion-label" };
30998
- const _hoisted_3$8 = ["href"];
30999
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
31296
+ const _hoisted_2$g = { class: "lupa-redirections-suggestion-label" };
31297
+ const _hoisted_3$a = ["href"];
31298
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
31000
31299
  __name: "RedirectionSuggestions",
31001
31300
  props: {
31002
31301
  options: {}
@@ -31019,19 +31318,19 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
31019
31318
  )
31020
31319
  );
31021
31320
  return (_ctx, _cache) => {
31022
- return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
31023
- createElementVNode("h4", _hoisted_2$e, [
31024
- createElementVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$8)
31321
+ return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
31322
+ createElementVNode("h4", _hoisted_2$g, [
31323
+ createElementVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$a)
31025
31324
  ])
31026
31325
  ])) : createCommentVNode("", true);
31027
31326
  };
31028
31327
  }
31029
31328
  });
31030
- const _hoisted_1$i = {
31329
+ const _hoisted_1$k = {
31031
31330
  key: 0,
31032
31331
  class: "lupa-refiners-loading-notice"
31033
31332
  };
31034
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
31333
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
31035
31334
  __name: "RefinersLoadingNotice",
31036
31335
  props: {
31037
31336
  labels: {}
@@ -31042,22 +31341,22 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
31042
31341
  const props = __props;
31043
31342
  const label = computed(() => props.labels.refinersLoadingNotice);
31044
31343
  return (_ctx, _cache) => {
31045
- return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
31344
+ return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
31046
31345
  createElementVNode("p", null, toDisplayString(label.value), 1),
31047
31346
  createVNode(Spinner)
31048
31347
  ])) : createCommentVNode("", true);
31049
31348
  };
31050
31349
  }
31051
31350
  });
31052
- const _hoisted_1$h = { class: "lupa-related-query-item" };
31053
- const _hoisted_2$d = { class: "lupa-related-query-image" };
31054
- const _hoisted_3$7 = { class: "lupa-related-query-label" };
31055
- const _hoisted_4$4 = { class: "lupa-related-query-title" };
31056
- const _hoisted_5$1 = {
31351
+ const _hoisted_1$j = { class: "lupa-related-query-item" };
31352
+ const _hoisted_2$f = { class: "lupa-related-query-image" };
31353
+ const _hoisted_3$9 = { class: "lupa-related-query-label" };
31354
+ const _hoisted_4$6 = { class: "lupa-related-query-title" };
31355
+ const _hoisted_5$2 = {
31057
31356
  key: 0,
31058
31357
  class: "lupa-related-query-count"
31059
31358
  };
31060
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
31359
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
31061
31360
  __name: "RelatedQueryPanelApi",
31062
31361
  props: {
31063
31362
  relatedQuery: {},
@@ -31089,9 +31388,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
31089
31388
  });
31090
31389
  return (_ctx, _cache) => {
31091
31390
  var _a25;
31092
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
31093
- createElementVNode("div", _hoisted_2$d, [
31094
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
31391
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
31392
+ createElementVNode("div", _hoisted_2$f, [
31393
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
31095
31394
  key: 0,
31096
31395
  "wrapper-class": "lupa-related-query-image-wrapper",
31097
31396
  "image-class": "lupa-related-query-image",
@@ -31099,24 +31398,24 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
31099
31398
  options: image.value
31100
31399
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
31101
31400
  ]),
31102
- createElementVNode("div", _hoisted_3$7, [
31103
- createElementVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
31104
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
31401
+ createElementVNode("div", _hoisted_3$9, [
31402
+ createElementVNode("span", _hoisted_4$6, toDisplayString(query.value), 1),
31403
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
31105
31404
  ])
31106
31405
  ]);
31107
31406
  };
31108
31407
  }
31109
31408
  });
31110
- const _hoisted_1$g = {
31409
+ const _hoisted_1$i = {
31111
31410
  key: 0,
31112
31411
  class: "lupa-related-queries"
31113
31412
  };
31114
- const _hoisted_2$c = {
31413
+ const _hoisted_2$e = {
31115
31414
  key: 0,
31116
31415
  class: "lupa-related-queries-title"
31117
31416
  };
31118
- const _hoisted_3$6 = ["onClick"];
31119
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
31417
+ const _hoisted_3$8 = ["onClick"];
31418
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
31120
31419
  __name: "RelatedQueriesApi",
31121
31420
  props: {
31122
31421
  options: {}
@@ -31126,7 +31425,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
31126
31425
  const searchResultStore = useSearchResultStore();
31127
31426
  const paramsStore = useParamsStore();
31128
31427
  const optionsStore = useOptionsStore();
31129
- const { searchResult, relatedQueriesResult } = storeToRefs(searchResultStore);
31428
+ const { searchResult, relatedQueriesResult, relatedQueryFacetKeys } = storeToRefs(searchResultStore);
31130
31429
  const relatedQueries2 = computed(() => {
31131
31430
  var _a25, _b25, _c, _d;
31132
31431
  const allQueries = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) != null ? _b25 : [];
@@ -31154,7 +31453,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
31154
31453
  { key: query.key, value: query.value },
31155
31454
  optionsStore.getQueryParamName,
31156
31455
  {},
31157
- (_a25 = relatedQueries2.value) == null ? void 0 : _a25.map((q) => `f.${q.facetKey}`)
31456
+ (_a25 = relatedQueryFacetKeys.value) == null ? void 0 : _a25.map((key) => `f.${key}`)
31158
31457
  );
31159
31458
  };
31160
31459
  const getSelectedFilterClass = (relatedQuery) => {
@@ -31168,8 +31467,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
31168
31467
  };
31169
31468
  return (_ctx, _cache) => {
31170
31469
  var _a25, _b25, _c, _d;
31171
- return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
31172
- ((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.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),
31470
+ return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
31471
+ ((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$e, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
31173
31472
  createElementVNode("ul", null, [
31174
31473
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
31175
31474
  return openBlock(), createElementBlock("li", {
@@ -31179,11 +31478,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
31179
31478
  createElementVNode("a", {
31180
31479
  onClick: ($event) => handleRelatedQueryClick(query)
31181
31480
  }, [
31182
- createVNode(_sfc_main$j, {
31481
+ createVNode(_sfc_main$l, {
31183
31482
  relatedQuery: query,
31184
31483
  options: _ctx.options
31185
31484
  }, null, 8, ["relatedQuery", "options"])
31186
- ], 8, _hoisted_3$6)
31485
+ ], 8, _hoisted_3$8)
31187
31486
  ], 2);
31188
31487
  }), 128))
31189
31488
  ])
@@ -31191,9 +31490,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
31191
31490
  };
31192
31491
  }
31193
31492
  });
31194
- const _hoisted_1$f = { key: 0 };
31195
- const _hoisted_2$b = ["innerHTML"];
31196
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
31493
+ const _hoisted_1$h = { key: 0 };
31494
+ const _hoisted_2$d = ["innerHTML"];
31495
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
31197
31496
  __name: "ZeroResults",
31198
31497
  props: {
31199
31498
  emptyResultsLabel: {},
@@ -31222,36 +31521,36 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
31222
31521
  });
31223
31522
  return (_ctx, _cache) => {
31224
31523
  return openBlock(), createElementBlock(Fragment, null, [
31225
- showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
31524
+ showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
31226
31525
  createTextVNode(toDisplayString(_ctx.emptyResultsLabel) + " ", 1),
31227
31526
  createElementVNode("span", null, toDisplayString(_ctx.currentQueryText), 1)
31228
31527
  ])) : createCommentVNode("", true),
31229
31528
  showCustomZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", {
31230
31529
  key: 1,
31231
31530
  innerHTML: htmlTemplate.value
31232
- }, null, 8, _hoisted_2$b)) : createCommentVNode("", true)
31531
+ }, null, 8, _hoisted_2$d)) : createCommentVNode("", true)
31233
31532
  ], 64);
31234
31533
  };
31235
31534
  }
31236
31535
  });
31237
- const _hoisted_1$e = { id: "lupa-search-results-products" };
31238
- const _hoisted_2$a = {
31536
+ const _hoisted_1$g = { id: "lupa-search-results-products" };
31537
+ const _hoisted_2$c = {
31239
31538
  class: "lupa-products",
31240
31539
  "data-cy": "lupa-products"
31241
31540
  };
31242
- const _hoisted_3$5 = {
31541
+ const _hoisted_3$7 = {
31243
31542
  key: 1,
31244
31543
  class: "lupa-empty-results",
31245
31544
  "data-cy": "lupa-no-results-in-page"
31246
31545
  };
31247
- const _hoisted_4$3 = {
31546
+ const _hoisted_4$5 = {
31248
31547
  key: 5,
31249
31548
  class: "lupa-empty-results",
31250
31549
  "data-cy": "lupa-no-results"
31251
31550
  };
31252
- const _hoisted_5 = { key: 6 };
31551
+ const _hoisted_5$1 = { key: 6 };
31253
31552
  const _hoisted_6 = { key: 7 };
31254
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
31553
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
31255
31554
  __name: "SearchResultsProducts",
31256
31555
  props: {
31257
31556
  options: {},
@@ -31267,7 +31566,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31267
31566
  hasResults,
31268
31567
  currentQueryText,
31269
31568
  isPageEmpty,
31270
- isMobileSidebarVisible,
31569
+ isFilterSidebarVisible,
31271
31570
  columnCount,
31272
31571
  searchResult,
31273
31572
  layout,
@@ -31298,7 +31597,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31298
31597
  });
31299
31598
  const showTopFilters = computed(() => {
31300
31599
  var _a25, _b25, _c;
31301
- return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) === "top-dropdown";
31600
+ return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
31302
31601
  });
31303
31602
  const showMobileFilters = computed(() => {
31304
31603
  return props.options.searchTitlePosition !== "search-results-top";
@@ -31375,40 +31674,40 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31375
31674
  };
31376
31675
  return (_ctx, _cache) => {
31377
31676
  var _a25, _b25, _c;
31378
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
31379
- unref(loading) && !unref(isMobileSidebarVisible) ? (openBlock(), createBlock(Spinner, {
31677
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
31678
+ unref(loading) && !unref(isFilterSidebarVisible) ? (openBlock(), createBlock(Spinner, {
31380
31679
  key: 0,
31381
31680
  class: "lupa-loader"
31382
31681
  })) : createCommentVNode("", true),
31383
- createVNode(_sfc_main$l, {
31682
+ createVNode(_sfc_main$n, {
31384
31683
  options: _ctx.options.redirectionSuggestions
31385
31684
  }, null, 8, ["options"]),
31386
- createVNode(_sfc_main$q, {
31685
+ createVNode(_sfc_main$s, {
31387
31686
  options: _ctx.options,
31388
31687
  location: "top",
31389
31688
  sdkOptions: _ctx.options.options
31390
31689
  }, null, 8, ["options", "sdkOptions"]),
31391
- showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$m, {
31690
+ showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$o, {
31392
31691
  key: 1,
31393
31692
  options: _ctx.options.relatedQueries
31394
31693
  }, null, 8, ["options"])) : createCommentVNode("", true),
31395
- showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$i, {
31694
+ showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$k, {
31396
31695
  key: 2,
31397
31696
  options: _ctx.options.relatedQueries
31398
31697
  }, null, 8, ["options"])) : createCommentVNode("", true),
31399
31698
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
31400
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$M, {
31699
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
31401
31700
  key: 0,
31402
31701
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
31403
31702
  }, null, 8, ["options"])) : createCommentVNode("", true),
31404
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$F, {
31703
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
31405
31704
  key: 1,
31406
31705
  class: "lupa-toolbar-mobile",
31407
31706
  options: _ctx.options,
31408
31707
  "pagination-location": "top",
31409
31708
  onFilter: filter
31410
31709
  }, null, 8, ["options"])) : createCommentVNode("", true),
31411
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$_, {
31710
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
31412
31711
  key: 2,
31413
31712
  class: normalizeClass(currentFiltersClass.value),
31414
31713
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -31417,19 +31716,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31417
31716
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
31418
31717
  ], 64)) : createCommentVNode("", true),
31419
31718
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
31420
- createVNode(_sfc_main$F, {
31719
+ createVNode(_sfc_main$H, {
31421
31720
  class: "lupa-toolbar-top",
31422
31721
  options: _ctx.options,
31423
31722
  "pagination-location": "top"
31424
31723
  }, null, 8, ["options"]),
31425
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$_, {
31724
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$14, {
31426
31725
  key: 0,
31427
31726
  class: normalizeClass(currentFiltersClass.value),
31428
31727
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
31429
31728
  options: currentFilterOptions.value,
31430
31729
  expandable: !desktopFiltersExpanded.value
31431
31730
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
31432
- createElementVNode("div", _hoisted_2$a, [
31731
+ createElementVNode("div", _hoisted_2$c, [
31433
31732
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
31434
31733
  return renderSlot(_ctx.$slots, "productCard", {
31435
31734
  style: normalizeStyle(columnSize.value),
@@ -31438,7 +31737,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31438
31737
  options: productCardOptions.value
31439
31738
  });
31440
31739
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
31441
- return openBlock(), createBlock(_sfc_main$t, {
31740
+ return openBlock(), createBlock(_sfc_main$v, {
31442
31741
  style: normalizeStyle(columnSize.value),
31443
31742
  key: getProductKeyAction(index, product),
31444
31743
  product,
@@ -31447,7 +31746,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31447
31746
  }, null, 8, ["style", "product", "options", "analytics-metadata"]);
31448
31747
  }), 128))
31449
31748
  ]),
31450
- unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
31749
+ unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
31451
31750
  createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
31452
31751
  _ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
31453
31752
  key: 0,
@@ -31455,36 +31754,36 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31455
31754
  onClick: goToFirstPage
31456
31755
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
31457
31756
  ])) : createCommentVNode("", true),
31458
- createVNode(_sfc_main$F, {
31757
+ createVNode(_sfc_main$H, {
31459
31758
  class: "lupa-toolbar-bottom",
31460
31759
  options: _ctx.options,
31461
31760
  "pagination-location": "bottom"
31462
31761
  }, null, 8, ["options"]),
31463
- createVNode(_sfc_main$q, {
31762
+ createVNode(_sfc_main$s, {
31464
31763
  options: _ctx.options,
31465
31764
  location: "bottom",
31466
31765
  sdkOptions: _ctx.options.options
31467
31766
  }, null, 8, ["options", "sdkOptions"])
31468
- ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
31469
- createVNode(_sfc_main$h, {
31767
+ ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
31768
+ createVNode(_sfc_main$j, {
31470
31769
  emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
31471
31770
  currentQueryText: unref(currentQueryText),
31472
31771
  hasSimilarQueries: hasSimilarQueries.value || hasSimilarResults.value,
31473
31772
  zeroResults: (_c = _ctx.options) == null ? void 0 : _c.zeroResults
31474
31773
  }, null, 8, ["emptyResultsLabel", "currentQueryText", "hasSimilarQueries", "zeroResults"])
31475
31774
  ])) : createCommentVNode("", true),
31476
- createVNode(_sfc_main$k, {
31775
+ createVNode(_sfc_main$m, {
31477
31776
  labels: _ctx.options.labels
31478
31777
  }, null, 8, ["labels"]),
31479
- hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
31480
- createVNode(_sfc_main$s, {
31778
+ hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
31779
+ createVNode(_sfc_main$u, {
31481
31780
  labels: similarQueriesLabels.value,
31482
31781
  columnSize: columnSize.value,
31483
31782
  productCardOptions: productCardOptions.value
31484
31783
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
31485
31784
  ])) : createCommentVNode("", true),
31486
31785
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
31487
- createVNode(_sfc_main$o, {
31786
+ createVNode(_sfc_main$q, {
31488
31787
  labels: similarResultsLabels.value,
31489
31788
  columnSize: columnSize.value,
31490
31789
  productCardOptions: productCardOptions.value
@@ -31495,17 +31794,17 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31495
31794
  };
31496
31795
  }
31497
31796
  });
31498
- const _hoisted_1$d = { class: "lupa-top-mobile-filter-wrapper" };
31499
- const _hoisted_2$9 = {
31797
+ const _hoisted_1$f = { class: "lupa-top-mobile-filter-wrapper" };
31798
+ const _hoisted_2$b = {
31500
31799
  key: 0,
31501
31800
  class: "lupa-category-back"
31502
31801
  };
31503
- const _hoisted_3$4 = ["href"];
31504
- const _hoisted_4$2 = {
31802
+ const _hoisted_3$6 = ["href"];
31803
+ const _hoisted_4$4 = {
31505
31804
  key: 1,
31506
31805
  class: "lupa-child-category-list"
31507
31806
  };
31508
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
31807
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
31509
31808
  __name: "CategoryTopFilters",
31510
31809
  props: {
31511
31810
  options: {}
@@ -31553,24 +31852,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
31553
31852
  "has-related-category-children": hasRelatedCategoryChildren.value
31554
31853
  }])
31555
31854
  }, [
31556
- createElementVNode("div", _hoisted_1$d, [
31557
- hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
31855
+ createElementVNode("div", _hoisted_1$f, [
31856
+ hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
31558
31857
  createElementVNode("a", {
31559
31858
  "data-cy": "lupa-category-back",
31560
31859
  href: backUrlLink.value,
31561
31860
  onClick: handleNavigationBack
31562
- }, toDisplayString(backTitle.value), 9, _hoisted_3$4)
31861
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$6)
31563
31862
  ])) : createCommentVNode("", true),
31564
- hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
31863
+ hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
31565
31864
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
31566
- return openBlock(), createBlock(_sfc_main$Z, {
31865
+ return openBlock(), createBlock(_sfc_main$13, {
31567
31866
  key: getCategoryKey(child),
31568
31867
  item: child,
31569
31868
  options: categoryOptions.value
31570
31869
  }, null, 8, ["item", "options"]);
31571
31870
  }), 128))
31572
31871
  ])) : createCommentVNode("", true),
31573
- createVNode(_sfc_main$F, {
31872
+ createVNode(_sfc_main$H, {
31574
31873
  class: "lupa-toolbar-mobile",
31575
31874
  "pagination-location": "top",
31576
31875
  options: _ctx.options
@@ -31580,6 +31879,129 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
31580
31879
  };
31581
31880
  }
31582
31881
  });
31882
+ const _hoisted_1$e = {
31883
+ id: "lupa-search-results-sort-list",
31884
+ class: "lupa-search-results-sort-list"
31885
+ };
31886
+ const _hoisted_2$a = ["onClick"];
31887
+ const _hoisted_3$5 = ["for"];
31888
+ const _hoisted_4$3 = ["id", "checked"];
31889
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
31890
+ __name: "SortList",
31891
+ setup(__props) {
31892
+ const { sortItems, selectedKey, handleSelect, setSortValue } = useSorting();
31893
+ onMounted(() => {
31894
+ setSortValue();
31895
+ });
31896
+ const selectValue = (key) => {
31897
+ selectedKey.value = key;
31898
+ handleSelect();
31899
+ };
31900
+ return (_ctx, _cache) => {
31901
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
31902
+ createElementVNode("ul", null, [
31903
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
31904
+ return openBlock(), createElementBlock("li", {
31905
+ key: option.key,
31906
+ class: normalizeClass({ "lupa-sort-item-selected": option.key === unref(selectedKey) }),
31907
+ onClick: ($event) => selectValue(option.key)
31908
+ }, [
31909
+ createElementVNode("label", {
31910
+ for: "lupa-sort-list-" + option.key
31911
+ }, toDisplayString(option.label), 9, _hoisted_3$5),
31912
+ createElementVNode("input", {
31913
+ id: "lupa-sort-list-" + option.key,
31914
+ type: "radio",
31915
+ checked: option.key === unref(selectedKey)
31916
+ }, null, 8, _hoisted_4$3)
31917
+ ], 10, _hoisted_2$a);
31918
+ }), 128))
31919
+ ])
31920
+ ]);
31921
+ };
31922
+ }
31923
+ });
31924
+ const _hoisted_1$d = { class: "lupa-sort-sidebar-content" };
31925
+ const _hoisted_2$9 = { class: "lupa-sidebar-top" };
31926
+ const _hoisted_3$4 = { class: "lupa-sidebar-title" };
31927
+ const _hoisted_4$2 = { class: "lupa-sidebar-sort-options" };
31928
+ const _hoisted_5 = { class: "lupa-sidebar-sort-actions" };
31929
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
31930
+ __name: "SortDrawer",
31931
+ setup(__props) {
31932
+ const optionsStore = useOptionsStore();
31933
+ const searchResultStore = useSearchResultStore();
31934
+ const paramStore = useParamsStore();
31935
+ const { searchResultOptions } = storeToRefs(optionsStore);
31936
+ const { isSidebarClosing, isSortingSidebarVisible } = storeToRefs(searchResultStore);
31937
+ const { handleSortSidebarToggle } = useSidebarToggle();
31938
+ const sortStyleOptions = computed(() => {
31939
+ var _a25;
31940
+ return (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle;
31941
+ });
31942
+ const sidebarTitle = computed(() => {
31943
+ var _a25, _b25, _c, _d;
31944
+ return (_d = (_c = (_b25 = (_a25 = sortStyleOptions == null ? void 0 : sortStyleOptions.value) == null ? void 0 : _a25.drawer) == null ? void 0 : _b25.labels) == null ? void 0 : _c.title) != null ? _d : "";
31945
+ });
31946
+ const clearSortLabel = computed(() => {
31947
+ var _a25, _b25, _c, _d;
31948
+ return (_d = (_c = (_b25 = (_a25 = sortStyleOptions == null ? void 0 : sortStyleOptions.value) == null ? void 0 : _a25.drawer) == null ? void 0 : _b25.labels) == null ? void 0 : _c.clearLabel) != null ? _d : "";
31949
+ });
31950
+ const applySortLabel = computed(() => {
31951
+ var _a25, _b25, _c, _d;
31952
+ return (_d = (_c = (_b25 = (_a25 = sortStyleOptions == null ? void 0 : sortStyleOptions.value) == null ? void 0 : _a25.drawer) == null ? void 0 : _b25.labels) == null ? void 0 : _c.applyLabel) != null ? _d : "";
31953
+ });
31954
+ const handleDrawerToggle = () => {
31955
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
31956
+ };
31957
+ const clearSort = () => {
31958
+ paramStore.removeParameters({
31959
+ paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS.SORT)]
31960
+ });
31961
+ handleSortSidebarToggle();
31962
+ };
31963
+ const applySort = () => {
31964
+ handleSortSidebarToggle();
31965
+ };
31966
+ return (_ctx, _cache) => {
31967
+ return unref(isSortingSidebarVisible) ? (openBlock(), createElementBlock("div", {
31968
+ key: 0,
31969
+ class: normalizeClass(["lupa-sort-sidebar", { "lupa-sort-is-closing": unref(isSidebarClosing) }])
31970
+ }, [
31971
+ createElementVNode("div", {
31972
+ class: "lupa-sidebar-close",
31973
+ onClick: withModifiers(handleDrawerToggle, ["stop"])
31974
+ }),
31975
+ createElementVNode("div", _hoisted_1$d, [
31976
+ createElementVNode("div", _hoisted_2$9, [
31977
+ createElementVNode("div", _hoisted_3$4, toDisplayString(sidebarTitle.value), 1),
31978
+ createElementVNode("div", {
31979
+ class: "lupa-filter-toggle-mobile",
31980
+ onClick: handleDrawerToggle
31981
+ })
31982
+ ]),
31983
+ createElementVNode("div", _hoisted_4$2, [
31984
+ createVNode(_sfc_main$g)
31985
+ ]),
31986
+ createElementVNode("div", _hoisted_5, [
31987
+ clearSortLabel.value ? (openBlock(), createElementBlock("button", {
31988
+ key: 0,
31989
+ type: "button",
31990
+ class: "lupa-sidebar-sort-clear",
31991
+ onClick: withModifiers(clearSort, ["stop"])
31992
+ }, toDisplayString(clearSortLabel.value), 1)) : createCommentVNode("", true),
31993
+ applySortLabel.value ? (openBlock(), createElementBlock("button", {
31994
+ key: 1,
31995
+ type: "button",
31996
+ class: "lupa-sidebar-sort-apply",
31997
+ onClick: withModifiers(applySort, ["stop"])
31998
+ }, toDisplayString(applySortLabel.value), 1)) : createCommentVNode("", true)
31999
+ ])
32000
+ ])
32001
+ ], 2)) : createCommentVNode("", true);
32002
+ };
32003
+ }
32004
+ });
31583
32005
  const _hoisted_1$c = {
31584
32006
  key: 0,
31585
32007
  class: "lupa-container-title-summary-mobile"
@@ -31614,7 +32036,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31614
32036
  currentQueryText,
31615
32037
  hasResults,
31616
32038
  currentFilterCount,
31617
- isMobileSidebarVisible,
32039
+ isFilterSidebarVisible,
31618
32040
  layout,
31619
32041
  loadingFacets,
31620
32042
  loadingRefiners
@@ -31636,7 +32058,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31636
32058
  });
31637
32059
  const indicatorClasses = computed(() => {
31638
32060
  return {
31639
- "lupa-mobile-sidebar-visible": isMobileSidebarVisible.value,
32061
+ "lupa-mobile-sidebar-visible": isFilterSidebarVisible.value,
31640
32062
  "lupa-layout-grid": !layout.value || layout.value === ResultsLayoutEnum.GRID,
31641
32063
  "lupa-layout-list": layout.value === ResultsLayoutEnum.LIST
31642
32064
  };
@@ -31878,32 +32300,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31878
32300
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
31879
32301
  }, [
31880
32302
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
31881
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
31882
- createVNode(_sfc_main$10, {
32303
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
32304
+ createVNode(_sfc_main$16, {
31883
32305
  "show-summary": true,
31884
32306
  options: _ctx.options,
31885
32307
  "is-product-list": (_a25 = _ctx.isProductList) != null ? _a25 : false
31886
32308
  }, null, 8, ["options", "is-product-list"])
31887
32309
  ])) : createCommentVNode("", true),
31888
- isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$f, {
32310
+ isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$h, {
31889
32311
  key: 1,
31890
32312
  options: _ctx.options
31891
32313
  }, null, 8, ["options"])) : createCommentVNode("", true),
31892
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$O, {
32314
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$R, {
31893
32315
  key: 2,
31894
32316
  options: _ctx.options.filters,
31895
32317
  onFilter: handleParamsChange
31896
32318
  }, null, 8, ["options"])) : createCommentVNode("", true),
31897
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$N, {
31898
- key: 3,
32319
+ _ctx.options.sort ? (openBlock(), createBlock(_sfc_main$f, { key: 3 })) : createCommentVNode("", true),
32320
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$Q, {
32321
+ key: 4,
31899
32322
  breadcrumbs: _ctx.options.breadcrumbs
31900
32323
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
31901
32324
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", {
31902
- key: 4,
32325
+ key: 5,
31903
32326
  id: "lupa-search-results",
31904
32327
  class: normalizeClass(["top-layout-wrapper", indicatorClasses.value])
31905
32328
  }, [
31906
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
32329
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
31907
32330
  key: 0,
31908
32331
  options: (_b25 = _ctx.options.filters) != null ? _b25 : {},
31909
32332
  ref_key: "searchResultsFilters",
@@ -31911,12 +32334,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31911
32334
  onFilter: handleParamsChange
31912
32335
  }, null, 8, ["options"])) : createCommentVNode("", true),
31913
32336
  createElementVNode("div", _hoisted_2$8, [
31914
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
31915
- createVNode(_sfc_main$10, {
32337
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
32338
+ createVNode(_sfc_main$16, {
31916
32339
  options: _ctx.options,
31917
32340
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
31918
32341
  }, null, 8, ["options", "is-product-list"]),
31919
- createVNode(_sfc_main$g, {
32342
+ createVNode(_sfc_main$i, {
31920
32343
  options: _ctx.options,
31921
32344
  ssr: ssrEnabled.value,
31922
32345
  onFilter: handleParamsChange
@@ -31927,9 +32350,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31927
32350
  _: 3
31928
32351
  }, 8, ["options", "ssr"])
31929
32352
  ])
31930
- ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
31931
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
31932
- createVNode(_sfc_main$10, {
32353
+ ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [
32354
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
32355
+ createVNode(_sfc_main$16, {
31933
32356
  options: _ctx.options,
31934
32357
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
31935
32358
  }, null, 8, ["options", "is-product-list"]),
@@ -31937,14 +32360,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31937
32360
  id: "lupa-search-results",
31938
32361
  class: normalizeClass(indicatorClasses.value)
31939
32362
  }, [
31940
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
32363
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
31941
32364
  key: 0,
31942
32365
  options: (_e = _ctx.options.filters) != null ? _e : {},
31943
32366
  ref_key: "searchResultsFilters",
31944
32367
  ref: searchResultsFilters,
31945
32368
  onFilter: handleParamsChange
31946
32369
  }, null, 8, ["options"])) : createCommentVNode("", true),
31947
- createVNode(_sfc_main$g, {
32370
+ createVNode(_sfc_main$i, {
31948
32371
  options: _ctx.options,
31949
32372
  ssr: ssrEnabled.value,
31950
32373
  onFilter: handleParamsChange
@@ -32088,7 +32511,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
32088
32511
  onClick: withModifiers(innerClick, ["stop"])
32089
32512
  }, [
32090
32513
  createElementVNode("div", _hoisted_1$a, [
32091
- createVNode(_sfc_main$13, {
32514
+ createVNode(_sfc_main$19, {
32092
32515
  options: fullSearchBoxOptions.value,
32093
32516
  "is-search-container": true,
32094
32517
  ref_key: "searchBox",
@@ -33743,7 +34166,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
33743
34166
  key: getProductKeyAction(index, product)
33744
34167
  }, {
33745
34168
  default: withCtx(() => [
33746
- createVNode(_sfc_main$t, {
34169
+ createVNode(_sfc_main$v, {
33747
34170
  product,
33748
34171
  options: _ctx.options,
33749
34172
  "click-tracking-settings": clickTrackingSettings.value,
@@ -33758,7 +34181,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
33758
34181
  _: 1
33759
34182
  }, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
33760
34183
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations.value, (product, index) => {
33761
- return openBlock(), createBlock(_sfc_main$t, {
34184
+ return openBlock(), createBlock(_sfc_main$v, {
33762
34185
  style: normalizeStyle(columnSize.value),
33763
34186
  key: getProductKeyAction(index, product),
33764
34187
  product,
@@ -34004,7 +34427,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
34004
34427
  createElementVNode("a", {
34005
34428
  href: getLink(product)
34006
34429
  }, [
34007
- createVNode(_sfc_main$E, {
34430
+ createVNode(_sfc_main$G, {
34008
34431
  item: product,
34009
34432
  options: image.value
34010
34433
  }, null, 8, ["item", "options"])
@@ -34169,7 +34592,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
34169
34592
  return (_ctx, _cache) => {
34170
34593
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
34171
34594
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
34172
- return openBlock(), createBlock(_sfc_main$t, {
34595
+ return openBlock(), createBlock(_sfc_main$v, {
34173
34596
  class: "lupa-chat-product-card",
34174
34597
  key: getProductKeyAction(index, product),
34175
34598
  product,
@@ -34504,7 +34927,7 @@ export {
34504
34927
  LupaSearch,
34505
34928
  _sfc_main$c as ProductList,
34506
34929
  _sfc_main$a as Recommendations,
34507
- _sfc_main$13 as SearchBox,
34930
+ _sfc_main$19 as SearchBox,
34508
34931
  SearchBoxPanelType,
34509
34932
  _sfc_main$b as SearchContainer,
34510
34933
  _sfc_main$e as SearchResults,