@getlupa/client 1.22.1 → 1.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.
@@ -18059,8 +18059,18 @@ var __async = (__this, __arguments, generator) => {
18059
18059
  );
18060
18060
  const trackingOptions = ref({});
18061
18061
  const searchResultInitialFilters = ref({});
18062
+ const expandedFacetsInner = ref([]);
18062
18063
  const productRecommendationOptions = ref({});
18063
18064
  const screenStore = useScreenStore();
18065
+ const expandedFacets = computed({
18066
+ get: () => {
18067
+ var _a25, _b25, _c, _d, _e;
18068
+ 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 : [];
18069
+ },
18070
+ set: (value) => {
18071
+ expandedFacetsInner.value = value;
18072
+ }
18073
+ });
18064
18074
  const envOptions = computed(
18065
18075
  () => {
18066
18076
  var _a25;
@@ -18160,6 +18170,7 @@ var __async = (__this, __arguments, generator) => {
18160
18170
  currentResolutionPageSizes,
18161
18171
  productRecommendationOptions,
18162
18172
  ariaLabels,
18173
+ expandedFacets,
18163
18174
  setSearchBoxOptions,
18164
18175
  setTrackingOptions,
18165
18176
  setSearchResultOptions,
@@ -19578,7 +19589,7 @@ var __async = (__this, __arguments, generator) => {
19578
19589
  }
19579
19590
  return Env[environment] || Env["production"];
19580
19591
  };
19581
- const _sfc_main$1A = /* @__PURE__ */ defineComponent({
19592
+ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
19582
19593
  __name: "VoiceSearchProgressCircle",
19583
19594
  props: {
19584
19595
  isRecording: { type: Boolean },
@@ -19791,15 +19802,15 @@ var __async = (__this, __arguments, generator) => {
19791
19802
  closeSocket
19792
19803
  };
19793
19804
  }
19794
- const _hoisted_1$1l = {
19805
+ const _hoisted_1$1o = {
19795
19806
  key: 0,
19796
19807
  class: "lupa-dialog-overlay"
19797
19808
  };
19798
- const _hoisted_2$W = { class: "lupa-dialog-content" };
19799
- const _hoisted_3$E = { class: "lupa-listening-text" };
19800
- const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
19801
- const _hoisted_5$l = ["aria-label"];
19802
- const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19809
+ const _hoisted_2$Y = { class: "lupa-dialog-content" };
19810
+ const _hoisted_3$G = { class: "lupa-listening-text" };
19811
+ const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
19812
+ const _hoisted_5$m = ["aria-label"];
19813
+ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
19803
19814
  __name: "VoiceSearchDialog",
19804
19815
  props: {
19805
19816
  isOpen: { type: Boolean },
@@ -19904,21 +19915,21 @@ var __async = (__this, __arguments, generator) => {
19904
19915
  return (_ctx, _cache) => {
19905
19916
  var _a25, _b25;
19906
19917
  return openBlock(), createElementBlock("div", null, [
19907
- props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
19918
+ props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1o, [
19908
19919
  createBaseVNode("button", {
19909
19920
  class: "lupa-dialog-box-close-button",
19910
19921
  onClick: _cache[0] || (_cache[0] = () => emit2("close"))
19911
19922
  }),
19912
- createBaseVNode("div", _hoisted_2$W, [
19913
- createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
19914
- createBaseVNode("div", _hoisted_4$u, [
19923
+ createBaseVNode("div", _hoisted_2$Y, [
19924
+ createBaseVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
19925
+ createBaseVNode("div", _hoisted_4$w, [
19915
19926
  createBaseVNode("button", {
19916
19927
  class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
19917
19928
  onClick: handleRecordingButtonClick,
19918
19929
  "aria-controls": "voice-search-microphone",
19919
19930
  "aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
19920
- }, null, 10, _hoisted_5$l),
19921
- createVNode(_sfc_main$1A, {
19931
+ }, null, 10, _hoisted_5$m),
19932
+ createVNode(_sfc_main$1G, {
19922
19933
  ref_key: "voiceSearchProgressBar",
19923
19934
  ref: voiceSearchProgressBar,
19924
19935
  class: "lupa-progress-circle",
@@ -19933,18 +19944,18 @@ var __async = (__this, __arguments, generator) => {
19933
19944
  };
19934
19945
  }
19935
19946
  });
19936
- const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
19937
- const _hoisted_2$V = { class: "lupa-input-clear" };
19938
- const _hoisted_3$D = { id: "lupa-search-box-input" };
19939
- const _hoisted_4$t = ["value"];
19940
- const _hoisted_5$k = ["aria-label", "placeholder"];
19941
- const _hoisted_6$8 = {
19947
+ const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
19948
+ const _hoisted_2$X = { class: "lupa-input-clear" };
19949
+ const _hoisted_3$F = { id: "lupa-search-box-input" };
19950
+ const _hoisted_4$v = ["value"];
19951
+ const _hoisted_5$l = ["aria-label", "placeholder"];
19952
+ const _hoisted_6$7 = {
19942
19953
  key: 0,
19943
19954
  class: "lupa-close-label"
19944
19955
  };
19945
19956
  const _hoisted_7$5 = { key: 1 };
19946
19957
  const _hoisted_8$3 = ["aria-label"];
19947
- const _sfc_main$1y = /* @__PURE__ */ defineComponent({
19958
+ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
19948
19959
  __name: "SearchBoxInput",
19949
19960
  props: {
19950
19961
  options: {},
@@ -20076,20 +20087,20 @@ var __async = (__this, __arguments, generator) => {
20076
20087
  };
20077
20088
  __expose({ focus });
20078
20089
  return (_ctx, _cache) => {
20079
- return openBlock(), createElementBlock("div", _hoisted_1$1k, [
20080
- createBaseVNode("div", _hoisted_2$V, [
20090
+ return openBlock(), createElementBlock("div", _hoisted_1$1n, [
20091
+ createBaseVNode("div", _hoisted_2$X, [
20081
20092
  createBaseVNode("div", {
20082
20093
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
20083
20094
  onClick: clear
20084
20095
  }, null, 2)
20085
20096
  ]),
20086
- createBaseVNode("div", _hoisted_3$D, [
20097
+ createBaseVNode("div", _hoisted_3$F, [
20087
20098
  createBaseVNode("input", {
20088
20099
  class: "lupa-hint",
20089
20100
  "aria-hidden": "true",
20090
20101
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
20091
20102
  disabled: ""
20092
- }, null, 8, _hoisted_4$t),
20103
+ }, null, 8, _hoisted_4$v),
20093
20104
  withDirectives(createBaseVNode("input", mergeProps({
20094
20105
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
20095
20106
  }, inputAttributes.value, {
@@ -20103,7 +20114,7 @@ var __async = (__this, __arguments, generator) => {
20103
20114
  placeholder: labels.value.placeholder,
20104
20115
  onInput: handleInput,
20105
20116
  onFocus: handleFocus
20106
- }), null, 16, _hoisted_5$k), [
20117
+ }), null, 16, _hoisted_5$l), [
20107
20118
  [vModelText, inputValue.value]
20108
20119
  ]),
20109
20120
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -20118,7 +20129,7 @@ var __async = (__this, __arguments, generator) => {
20118
20129
  class: "lupa-close-search-container",
20119
20130
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
20120
20131
  }, [
20121
- labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
20132
+ labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
20122
20133
  ])) : createCommentVNode("", true),
20123
20134
  isVoiceSearchEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
20124
20135
  createBaseVNode("button", {
@@ -20129,7 +20140,7 @@ var __async = (__this, __arguments, generator) => {
20129
20140
  "aria-label": voiceSearchAriaLabel.value
20130
20141
  }, null, 8, _hoisted_8$3)
20131
20142
  ])) : createCommentVNode("", true),
20132
- isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1z, {
20143
+ isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1F, {
20133
20144
  key: 2,
20134
20145
  ref_key: "voiceDialogOverlay",
20135
20146
  ref: voiceDialogOverlay,
@@ -20143,7 +20154,7 @@ var __async = (__this, __arguments, generator) => {
20143
20154
  };
20144
20155
  }
20145
20156
  });
20146
- const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20157
+ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
20147
20158
  __name: "SearchBoxMoreResults",
20148
20159
  props: {
20149
20160
  labels: {},
@@ -20181,9 +20192,9 @@ var __async = (__this, __arguments, generator) => {
20181
20192
  };
20182
20193
  }
20183
20194
  });
20184
- const _hoisted_1$1j = { class: "lupa-search-box-history-item" };
20185
- const _hoisted_2$U = { class: "lupa-search-box-history-item-content" };
20186
- const _sfc_main$1w = /* @__PURE__ */ defineComponent({
20195
+ const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
20196
+ const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
20197
+ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
20187
20198
  __name: "SearchBoxHistoryItem",
20188
20199
  props: {
20189
20200
  item: {},
@@ -20200,8 +20211,8 @@ var __async = (__this, __arguments, generator) => {
20200
20211
  emit2("click", { query: props.item });
20201
20212
  };
20202
20213
  return (_ctx, _cache) => {
20203
- return openBlock(), createElementBlock("div", _hoisted_1$1j, [
20204
- createBaseVNode("div", _hoisted_2$U, [
20214
+ return openBlock(), createElementBlock("div", _hoisted_1$1m, [
20215
+ createBaseVNode("div", _hoisted_2$W, [
20205
20216
  createBaseVNode("div", {
20206
20217
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
20207
20218
  onClick: click2
@@ -20215,11 +20226,11 @@ var __async = (__this, __arguments, generator) => {
20215
20226
  };
20216
20227
  }
20217
20228
  });
20218
- const _hoisted_1$1i = {
20229
+ const _hoisted_1$1l = {
20219
20230
  key: 0,
20220
20231
  class: "lupa-search-box-history-panel"
20221
20232
  };
20222
- const _sfc_main$1v = /* @__PURE__ */ defineComponent({
20233
+ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
20223
20234
  __name: "SearchBoxHistoryPanel",
20224
20235
  props: {
20225
20236
  options: {}
@@ -20270,9 +20281,9 @@ var __async = (__this, __arguments, generator) => {
20270
20281
  }
20271
20282
  };
20272
20283
  return (_ctx, _cache) => {
20273
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1i, [
20284
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
20274
20285
  (openBlock(true), createElementBlock(Fragment, null, renderList(limitedHistory.value, (item, index) => {
20275
- return openBlock(), createBlock(_sfc_main$1w, {
20286
+ return openBlock(), createBlock(_sfc_main$1C, {
20276
20287
  key: item,
20277
20288
  item,
20278
20289
  highlighted: index === highlightIndex.value,
@@ -20288,15 +20299,15 @@ var __async = (__this, __arguments, generator) => {
20288
20299
  };
20289
20300
  }
20290
20301
  });
20291
- const _hoisted_1$1h = { class: "lupa-search-box-no-results" };
20292
- const _sfc_main$1u = /* @__PURE__ */ defineComponent({
20302
+ const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
20303
+ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
20293
20304
  __name: "SearchBoxNoResults",
20294
20305
  props: {
20295
20306
  labels: {}
20296
20307
  },
20297
20308
  setup(__props) {
20298
20309
  return (_ctx, _cache) => {
20299
- return openBlock(), createElementBlock("p", _hoisted_1$1h, toDisplayString(_ctx.labels.noResults), 1);
20310
+ return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
20300
20311
  };
20301
20312
  }
20302
20313
  });
@@ -20328,26 +20339,26 @@ var __async = (__this, __arguments, generator) => {
20328
20339
  }
20329
20340
  return gridTemplate.join(" ");
20330
20341
  };
20331
- const _hoisted_1$1g = ["innerHTML"];
20332
- const _hoisted_2$T = {
20342
+ const _hoisted_1$1j = ["innerHTML"];
20343
+ const _hoisted_2$V = {
20333
20344
  key: 1,
20334
20345
  "data-cy": "lupa-suggestion-value",
20335
20346
  class: "lupa-suggestion-value"
20336
20347
  };
20337
- const _hoisted_3$C = {
20348
+ const _hoisted_3$E = {
20338
20349
  key: 2,
20339
20350
  class: "lupa-suggestion-facet",
20340
20351
  "data-cy": "lupa-suggestion-facet"
20341
20352
  };
20342
- const _hoisted_4$s = {
20353
+ const _hoisted_4$u = {
20343
20354
  class: "lupa-suggestion-facet-label",
20344
20355
  "data-cy": "lupa-suggestion-facet-label"
20345
20356
  };
20346
- const _hoisted_5$j = {
20357
+ const _hoisted_5$k = {
20347
20358
  class: "lupa-suggestion-facet-value",
20348
20359
  "data-cy": "lupa-suggestion-facet-value"
20349
20360
  };
20350
- const _sfc_main$1t = /* @__PURE__ */ defineComponent({
20361
+ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
20351
20362
  __name: "SearchBoxSuggestion",
20352
20363
  props: {
20353
20364
  suggestion: {},
@@ -20384,20 +20395,20 @@ var __async = (__this, __arguments, generator) => {
20384
20395
  class: "lupa-suggestion-value",
20385
20396
  "data-cy": "lupa-suggestion-value",
20386
20397
  innerHTML: _ctx.suggestion.displayHighlight
20387
- }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
20388
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
20389
- createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
20390
- createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
20398
+ }, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
20399
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
20400
+ createBaseVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
20401
+ createBaseVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
20391
20402
  ])) : createCommentVNode("", true)
20392
20403
  ]);
20393
20404
  };
20394
20405
  }
20395
20406
  });
20396
- const _hoisted_1$1f = {
20407
+ const _hoisted_1$1i = {
20397
20408
  id: "lupa-search-box-suggestions",
20398
20409
  "data-cy": "lupa-search-box-suggestions"
20399
20410
  };
20400
- const _sfc_main$1s = /* @__PURE__ */ defineComponent({
20411
+ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20401
20412
  __name: "SearchBoxSuggestions",
20402
20413
  props: {
20403
20414
  items: {},
@@ -20464,9 +20475,9 @@ var __async = (__this, __arguments, generator) => {
20464
20475
  });
20465
20476
  });
20466
20477
  return (_ctx, _cache) => {
20467
- return openBlock(), createElementBlock("div", _hoisted_1$1f, [
20478
+ return openBlock(), createElementBlock("div", _hoisted_1$1i, [
20468
20479
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
20469
- return openBlock(), createBlock(_sfc_main$1t, {
20480
+ return openBlock(), createBlock(_sfc_main$1z, {
20470
20481
  key: getSuggestionKey(item),
20471
20482
  class: normalizeClass([
20472
20483
  "lupa-suggestion",
@@ -20498,7 +20509,7 @@ var __async = (__this, __arguments, generator) => {
20498
20509
  }, timeout);
20499
20510
  };
20500
20511
  };
20501
- const _sfc_main$1r = /* @__PURE__ */ defineComponent({
20512
+ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20502
20513
  __name: "SearchBoxSuggestionsWrapper",
20503
20514
  props: {
20504
20515
  panel: {},
@@ -20541,7 +20552,7 @@ var __async = (__this, __arguments, generator) => {
20541
20552
  const getSuggestionsDebounced = debounce(getSuggestions, props.debounce);
20542
20553
  watch(() => props.panel.limit, getSuggestionsDebounced);
20543
20554
  return (_ctx, _cache) => {
20544
- return openBlock(), createBlock(_sfc_main$1s, {
20555
+ return openBlock(), createBlock(_sfc_main$1y, {
20545
20556
  items: searchResult.value,
20546
20557
  highlight: _ctx.panel.highlight,
20547
20558
  queryKey: _ctx.panel.queryKey,
@@ -29823,9 +29834,9 @@ and ensure you are accounting for this risk.
29823
29834
  targetImage.src = placeholder;
29824
29835
  }
29825
29836
  };
29826
- const _hoisted_1$1e = ["src"];
29827
- const _hoisted_2$S = ["src"];
29828
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
29837
+ const _hoisted_1$1h = ["src"];
29838
+ const _hoisted_2$U = ["src"];
29839
+ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
29829
29840
  __name: "ProductImage",
29830
29841
  props: {
29831
29842
  item: {},
@@ -29967,7 +29978,7 @@ and ensure you are accounting for this risk.
29967
29978
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
29968
29979
  onError: replaceWithPlaceholder,
29969
29980
  key: finalUrl.value
29970
- }), null, 16, _hoisted_1$1e))
29981
+ }), null, 16, _hoisted_1$1h))
29971
29982
  ]),
29972
29983
  _: 1
29973
29984
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -29975,12 +29986,12 @@ and ensure you are accounting for this risk.
29975
29986
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
29976
29987
  style: styleOverride.value,
29977
29988
  src: finalMainImageUrl.value
29978
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$S))
29989
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$U))
29979
29990
  ], 38);
29980
29991
  };
29981
29992
  }
29982
29993
  });
29983
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
29994
+ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
29984
29995
  __name: "SearchBoxProductImage",
29985
29996
  props: {
29986
29997
  item: {},
@@ -29988,7 +29999,7 @@ and ensure you are accounting for this risk.
29988
29999
  },
29989
30000
  setup(__props) {
29990
30001
  return (_ctx, _cache) => {
29991
- return openBlock(), createBlock(_sfc_main$1q, {
30002
+ return openBlock(), createBlock(_sfc_main$1w, {
29992
30003
  item: _ctx.item,
29993
30004
  options: _ctx.options,
29994
30005
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -29997,12 +30008,12 @@ and ensure you are accounting for this risk.
29997
30008
  };
29998
30009
  }
29999
30010
  });
30000
- const _hoisted_1$1d = ["innerHTML"];
30001
- const _hoisted_2$R = {
30011
+ const _hoisted_1$1g = ["innerHTML"];
30012
+ const _hoisted_2$T = {
30002
30013
  key: 1,
30003
30014
  class: "lupa-search-box-product-title"
30004
30015
  };
30005
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30016
+ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
30006
30017
  __name: "SearchBoxProductTitle",
30007
30018
  props: {
30008
30019
  item: {},
@@ -30025,18 +30036,18 @@ and ensure you are accounting for this risk.
30025
30036
  key: 0,
30026
30037
  class: "lupa-search-box-product-title",
30027
30038
  innerHTML: sanitizedTitle.value
30028
- }, null, 8, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", _hoisted_2$R, [
30039
+ }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, [
30029
30040
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
30030
30041
  ]));
30031
30042
  };
30032
30043
  }
30033
30044
  });
30034
- const _hoisted_1$1c = ["innerHTML"];
30035
- const _hoisted_2$Q = {
30045
+ const _hoisted_1$1f = ["innerHTML"];
30046
+ const _hoisted_2$S = {
30036
30047
  key: 1,
30037
30048
  class: "lupa-search-box-product-description"
30038
30049
  };
30039
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
30050
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
30040
30051
  __name: "SearchBoxProductDescription",
30041
30052
  props: {
30042
30053
  item: {},
@@ -30059,12 +30070,12 @@ and ensure you are accounting for this risk.
30059
30070
  key: 0,
30060
30071
  class: "lupa-search-box-product-description",
30061
30072
  innerHTML: sanitizedDescription.value
30062
- }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(description.value), 1));
30073
+ }, null, 8, _hoisted_1$1f)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(description.value), 1));
30063
30074
  };
30064
30075
  }
30065
30076
  });
30066
- const _hoisted_1$1b = { class: "lupa-search-box-product-price" };
30067
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30077
+ const _hoisted_1$1e = { class: "lupa-search-box-product-price" };
30078
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
30068
30079
  __name: "SearchBoxProductPrice",
30069
30080
  props: {
30070
30081
  item: {},
@@ -30086,13 +30097,13 @@ and ensure you are accounting for this risk.
30086
30097
  );
30087
30098
  });
30088
30099
  return (_ctx, _cache) => {
30089
- return openBlock(), createElementBlock("div", _hoisted_1$1b, [
30100
+ return openBlock(), createElementBlock("div", _hoisted_1$1e, [
30090
30101
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
30091
30102
  ]);
30092
30103
  };
30093
30104
  }
30094
30105
  });
30095
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30106
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
30096
30107
  __name: "SearchBoxProductRegularPrice",
30097
30108
  props: {
30098
30109
  item: {},
@@ -30123,12 +30134,12 @@ and ensure you are accounting for this risk.
30123
30134
  };
30124
30135
  }
30125
30136
  });
30126
- const _hoisted_1$1a = ["innerHTML"];
30127
- const _hoisted_2$P = { key: 0 };
30128
- const _hoisted_3$B = { key: 1 };
30129
- const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
30130
- const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
30131
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30137
+ const _hoisted_1$1d = ["innerHTML"];
30138
+ const _hoisted_2$R = { key: 0 };
30139
+ const _hoisted_3$D = { key: 1 };
30140
+ const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
30141
+ const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
30142
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
30132
30143
  __name: "SearchBoxProductCustom",
30133
30144
  props: {
30134
30145
  item: {},
@@ -30154,20 +30165,20 @@ and ensure you are accounting for this risk.
30154
30165
  key: 0,
30155
30166
  class: [className.value, "lupa-search-box-product-custom"],
30156
30167
  innerHTML: text.value
30157
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", mergeProps({
30168
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", mergeProps({
30158
30169
  key: 1,
30159
30170
  class: [className.value, "lupa-search-box-product-custom"]
30160
30171
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
30161
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
30162
- createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
30163
- createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
30172
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
30173
+ createBaseVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
30174
+ createBaseVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
30164
30175
  ]))
30165
30176
  ], 16));
30166
30177
  };
30167
30178
  }
30168
30179
  });
30169
- const _hoisted_1$19 = ["innerHTML"];
30170
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30180
+ const _hoisted_1$1c = ["innerHTML"];
30181
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
30171
30182
  __name: "SearchBoxProductCustomHtml",
30172
30183
  props: {
30173
30184
  item: {},
@@ -30192,7 +30203,7 @@ and ensure you are accounting for this risk.
30192
30203
  return openBlock(), createElementBlock("div", mergeProps({
30193
30204
  class: className.value,
30194
30205
  innerHTML: text.value
30195
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$19);
30206
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1c);
30196
30207
  };
30197
30208
  }
30198
30209
  });
@@ -30250,7 +30261,9 @@ and ensure you are accounting for this risk.
30250
30261
  const loadingFacets = ref(false);
30251
30262
  const loadingRefiners = ref(false);
30252
30263
  const loadingRelatedQueries = ref(false);
30253
- const isMobileSidebarVisible = ref(false);
30264
+ const isFilterSidebarVisible = ref(false);
30265
+ const isSidebarClosing = ref(false);
30266
+ const isSortingSidebarVisible = ref(false);
30254
30267
  const relatedCategoryChildren = ref([]);
30255
30268
  const lastRequestId = ref("");
30256
30269
  const searchRequestResults = ref({});
@@ -30332,16 +30345,36 @@ and ensure you are accounting for this risk.
30332
30345
  return hasResults.value && ((_a25 = searchResult.value.offset) != null ? _a25 : 0) >= totalItems.value;
30333
30346
  }
30334
30347
  );
30348
+ const toggleSidebarState = ({
30349
+ visible,
30350
+ sidebar = "filter"
30351
+ }) => {
30352
+ if (sidebar === "sorting") {
30353
+ isSortingSidebarVisible.value = visible;
30354
+ return;
30355
+ }
30356
+ isFilterSidebarVisible.value = visible;
30357
+ };
30335
30358
  const setSidebarState = ({
30336
30359
  visible,
30337
- disableBodyScrolling = true
30360
+ disableBodyScrolling = true,
30361
+ sidebar = "filter"
30338
30362
  }) => {
30363
+ var _a25, _b25, _c, _d;
30339
30364
  if (visible && disableBodyScrolling) {
30340
30365
  disableBodyScroll();
30341
30366
  } else {
30342
30367
  enableBodyScroll();
30343
30368
  }
30344
- isMobileSidebarVisible.value = visible;
30369
+ 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)) {
30370
+ toggleSidebarState({ visible, sidebar });
30371
+ } else {
30372
+ isSidebarClosing.value = true;
30373
+ setTimeout(() => {
30374
+ toggleSidebarState({ visible, sidebar });
30375
+ isSidebarClosing.value = false;
30376
+ }, searchResultOptions.value.filters.facets.style.drawer.sidebarCloseDelay);
30377
+ }
30345
30378
  };
30346
30379
  const queryFacet = (_0) => __async2(null, [_0], function* ({ queryKey, facetKey }) {
30347
30380
  var _a25, _b25, _c, _d;
@@ -30443,13 +30476,28 @@ and ensure you are accounting for this risk.
30443
30476
  const setRelatedCategoryChildren = (children) => {
30444
30477
  relatedCategoryChildren.value = [...children];
30445
30478
  };
30479
+ const preconfiguredRelatedQueryKeys = computed(() => {
30480
+ var _a25, _b25, _c, _d, _e;
30481
+ 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 : [];
30482
+ });
30483
+ const relatedQueryFacetKeys = computed(() => {
30484
+ var _a25, _b25, _c;
30485
+ const keysFromRelatedResults = (_c = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.map((rq) => rq.facetKey)) != null ? _c : [];
30486
+ return Array.from(/* @__PURE__ */ new Set([...preconfiguredRelatedQueryKeys.value, ...keysFromRelatedResults]));
30487
+ });
30446
30488
  const queryRelatedQueries = (queryKey, publicQuery, result2, options) => __async2(null, null, function* () {
30447
- var _a25, _b25;
30489
+ var _a25, _b25, _c;
30448
30490
  loadingRelatedQueries.value = true;
30449
30491
  const context = getLupaTrackingContext();
30450
30492
  const searchText = (_b25 = (_a25 = result2.suggestedSearchText) != null ? _a25 : result2.searchText) != null ? _b25 : "";
30493
+ const publicQueryFiltersWithoutRelatedKeys = __spreadValues2({}, (_c = publicQuery.filters) != null ? _c : {});
30494
+ relatedQueryFacetKeys.value.forEach((facetKey) => {
30495
+ delete publicQueryFiltersWithoutRelatedKeys[facetKey];
30496
+ });
30497
+ const hasRemainingFilters = Object.keys(publicQueryFiltersWithoutRelatedKeys != null ? publicQueryFiltersWithoutRelatedKeys : {}).length > 0;
30451
30498
  const query = __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({}, publicQuery), {
30452
- searchText
30499
+ searchText,
30500
+ filters: hasRemainingFilters ? publicQueryFiltersWithoutRelatedKeys : void 0
30453
30501
  }), context), {
30454
30502
  modifiers: { facets: false, refiners: true }
30455
30503
  });
@@ -30465,7 +30513,9 @@ and ensure you are accounting for this risk.
30465
30513
  });
30466
30514
  });
30467
30515
  return {
30468
- isMobileSidebarVisible,
30516
+ isFilterSidebarVisible,
30517
+ isSortingSidebarVisible,
30518
+ isSidebarClosing,
30469
30519
  searchResult,
30470
30520
  columnCount,
30471
30521
  addToCartAmount,
@@ -30491,6 +30541,7 @@ and ensure you are accounting for this risk.
30491
30541
  relatedQueriesResult,
30492
30542
  relatedQueriesApiEnabled,
30493
30543
  lastResultsSource,
30544
+ relatedQueryFacetKeys,
30494
30545
  setSidebarState,
30495
30546
  queryFacet,
30496
30547
  setLastRequestId,
@@ -30507,12 +30558,12 @@ and ensure you are accounting for this risk.
30507
30558
  setRelatedQueriesApiEnabled
30508
30559
  };
30509
30560
  });
30510
- const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
30511
- const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
30512
- const _hoisted_3$A = ["disabled"];
30513
- const _hoisted_4$q = ["href"];
30514
- const _hoisted_5$h = ["disabled"];
30515
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30561
+ const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
30562
+ const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
30563
+ const _hoisted_3$C = ["disabled"];
30564
+ const _hoisted_4$s = ["href"];
30565
+ const _hoisted_5$i = ["disabled"];
30566
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30516
30567
  __name: "SearchBoxProductAddToCart",
30517
30568
  props: {
30518
30569
  item: {},
@@ -30558,45 +30609,45 @@ and ensure you are accounting for this risk.
30558
30609
  return Boolean(props.link && props.options.link);
30559
30610
  });
30560
30611
  return (_ctx, _cache) => {
30561
- return openBlock(), createElementBlock("div", _hoisted_1$18, [
30562
- createBaseVNode("div", _hoisted_2$O, [
30612
+ return openBlock(), createElementBlock("div", _hoisted_1$1b, [
30613
+ createBaseVNode("div", _hoisted_2$Q, [
30563
30614
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
30564
30615
  key: 0,
30565
30616
  class: addToCartButtonClass.value,
30566
30617
  "data-cy": "lupa-add-to-cart",
30567
30618
  disabled: !inStockValue.value || loading.value
30568
30619
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
30569
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
30570
- ], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
30620
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
30621
+ ], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
30571
30622
  key: 1,
30572
30623
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
30573
30624
  class: addToCartButtonClass.value,
30574
30625
  "data-cy": "lupa-add-to-cart",
30575
30626
  type: "button",
30576
30627
  disabled: !inStockValue.value || loading.value
30577
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
30628
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
30578
30629
  ])
30579
30630
  ]);
30580
30631
  };
30581
30632
  }
30582
30633
  });
30583
- const _hoisted_1$17 = {
30634
+ const _hoisted_1$1a = {
30584
30635
  key: 1,
30585
30636
  class: "lupa-search-box-element-badge-wrapper"
30586
30637
  };
30587
30638
  const __default__$4 = {
30588
30639
  components: {
30589
- SearchBoxProductImage: _sfc_main$1p,
30590
- SearchBoxProductTitle: _sfc_main$1o,
30591
- SearchBoxProductDescription: _sfc_main$1n,
30592
- SearchBoxProductPrice: _sfc_main$1m,
30593
- SearchBoxProductRegularPrice: _sfc_main$1l,
30594
- SearchBoxProductCustom: _sfc_main$1k,
30595
- SearchBoxProductCustomHtml: _sfc_main$1j,
30596
- SearchBoxProductAddToCart: _sfc_main$1i
30640
+ SearchBoxProductImage: _sfc_main$1v,
30641
+ SearchBoxProductTitle: _sfc_main$1u,
30642
+ SearchBoxProductDescription: _sfc_main$1t,
30643
+ SearchBoxProductPrice: _sfc_main$1s,
30644
+ SearchBoxProductRegularPrice: _sfc_main$1r,
30645
+ SearchBoxProductCustom: _sfc_main$1q,
30646
+ SearchBoxProductCustomHtml: _sfc_main$1p,
30647
+ SearchBoxProductAddToCart: _sfc_main$1o
30597
30648
  }
30598
30649
  };
30599
- const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
30650
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
30600
30651
  __name: "SearchBoxProductElement",
30601
30652
  props: {
30602
30653
  item: {},
@@ -30668,7 +30719,7 @@ and ensure you are accounting for this risk.
30668
30719
  "dynamic-attributes": dynamicAttributes.value,
30669
30720
  link: _ctx.link
30670
30721
  }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
30671
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$17, [
30722
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$1a, [
30672
30723
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
30673
30724
  key: 0,
30674
30725
  item: enhancedItem.value,
@@ -30683,14 +30734,14 @@ and ensure you are accounting for this risk.
30683
30734
  };
30684
30735
  }
30685
30736
  }));
30686
- const _hoisted_1$16 = { class: "lupa-badge-title" };
30687
- const _hoisted_2$N = ["src"];
30688
- const _hoisted_3$z = { key: 1 };
30689
- const _hoisted_4$p = {
30737
+ const _hoisted_1$19 = { class: "lupa-badge-title" };
30738
+ const _hoisted_2$P = ["src"];
30739
+ const _hoisted_3$B = { key: 1 };
30740
+ const _hoisted_4$r = {
30690
30741
  key: 0,
30691
30742
  class: "lupa-badge-full-text"
30692
30743
  };
30693
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
30744
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30694
30745
  __name: "SearchResultGeneratedBadge",
30695
30746
  props: {
30696
30747
  options: {},
@@ -30723,20 +30774,20 @@ and ensure you are accounting for this risk.
30723
30774
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
30724
30775
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
30725
30776
  }, [
30726
- createBaseVNode("span", _hoisted_1$16, [
30777
+ createBaseVNode("span", _hoisted_1$19, [
30727
30778
  image.value ? (openBlock(), createElementBlock("img", {
30728
30779
  key: 0,
30729
30780
  src: image.value
30730
- }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
30731
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30781
+ }, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
30782
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30732
30783
  ]),
30733
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30784
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30734
30785
  ], 6);
30735
30786
  };
30736
30787
  }
30737
30788
  });
30738
- const _hoisted_1$15 = { class: "lupa-generated-badges" };
30739
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
30789
+ const _hoisted_1$18 = { class: "lupa-generated-badges" };
30790
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30740
30791
  __name: "SearchResultGeneratedBadges",
30741
30792
  props: {
30742
30793
  options: {}
@@ -30762,9 +30813,9 @@ and ensure you are accounting for this risk.
30762
30813
  })).filter((b) => Boolean(b.id));
30763
30814
  });
30764
30815
  return (_ctx, _cache) => {
30765
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
30816
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
30766
30817
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
30767
- return openBlock(), createBlock(_sfc_main$1g, {
30818
+ return openBlock(), createBlock(_sfc_main$1m, {
30768
30819
  key: badge.id,
30769
30820
  badge,
30770
30821
  options: _ctx.options
@@ -30774,8 +30825,8 @@ and ensure you are accounting for this risk.
30774
30825
  };
30775
30826
  }
30776
30827
  });
30777
- const _hoisted_1$14 = ["innerHTML"];
30778
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
30828
+ const _hoisted_1$17 = ["innerHTML"];
30829
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30779
30830
  __name: "CustomBadge",
30780
30831
  props: {
30781
30832
  badge: {}
@@ -30796,12 +30847,12 @@ and ensure you are accounting for this risk.
30796
30847
  return openBlock(), createElementBlock("div", {
30797
30848
  class: normalizeClass(className.value),
30798
30849
  innerHTML: text.value
30799
- }, null, 10, _hoisted_1$14);
30850
+ }, null, 10, _hoisted_1$17);
30800
30851
  };
30801
30852
  }
30802
30853
  });
30803
- const _hoisted_1$13 = { class: "lupa-text-badges" };
30804
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
30854
+ const _hoisted_1$16 = { class: "lupa-text-badges" };
30855
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30805
30856
  __name: "TextBadge",
30806
30857
  props: {
30807
30858
  badge: {}
@@ -30815,7 +30866,7 @@ and ensure you are accounting for this risk.
30815
30866
  return badges.value.slice(0, props.badge.maxItems);
30816
30867
  });
30817
30868
  return (_ctx, _cache) => {
30818
- return openBlock(), createElementBlock("div", _hoisted_1$13, [
30869
+ return openBlock(), createElementBlock("div", _hoisted_1$16, [
30819
30870
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
30820
30871
  return openBlock(), createElementBlock("div", {
30821
30872
  class: "lupa-badge lupa-text-badge",
@@ -30826,9 +30877,9 @@ and ensure you are accounting for this risk.
30826
30877
  };
30827
30878
  }
30828
30879
  });
30829
- const _hoisted_1$12 = { class: "lupa-image-badges" };
30830
- const _hoisted_2$M = ["src"];
30831
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
30880
+ const _hoisted_1$15 = { class: "lupa-image-badges" };
30881
+ const _hoisted_2$O = ["src"];
30882
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30832
30883
  __name: "ImageBadge",
30833
30884
  props: {
30834
30885
  badge: {}
@@ -30848,7 +30899,7 @@ and ensure you are accounting for this risk.
30848
30899
  return `${props.badge.rootImageUrl}${src}`;
30849
30900
  };
30850
30901
  return (_ctx, _cache) => {
30851
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
30902
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
30852
30903
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
30853
30904
  return openBlock(), createElementBlock("div", {
30854
30905
  class: "lupa-badge lupa-image-badge",
@@ -30856,14 +30907,14 @@ and ensure you are accounting for this risk.
30856
30907
  }, [
30857
30908
  createBaseVNode("img", {
30858
30909
  src: getImageUrl(item)
30859
- }, null, 8, _hoisted_2$M)
30910
+ }, null, 8, _hoisted_2$O)
30860
30911
  ]);
30861
30912
  }), 128))
30862
30913
  ]);
30863
30914
  };
30864
30915
  }
30865
30916
  });
30866
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
30917
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
30867
30918
  __name: "DiscountBadge",
30868
30919
  props: {
30869
30920
  badge: {}
@@ -30925,16 +30976,16 @@ and ensure you are accounting for this risk.
30925
30976
  };
30926
30977
  }
30927
30978
  });
30928
- const _hoisted_1$11 = { id: "lupa-search-results-badges" };
30979
+ const _hoisted_1$14 = { id: "lupa-search-results-badges" };
30929
30980
  const __default__$3 = {
30930
30981
  components: {
30931
- CustomBadge: _sfc_main$1e,
30932
- TextBadge: _sfc_main$1d,
30933
- ImageBadge: _sfc_main$1c,
30934
- DiscountBadge: _sfc_main$1b
30982
+ CustomBadge: _sfc_main$1k,
30983
+ TextBadge: _sfc_main$1j,
30984
+ ImageBadge: _sfc_main$1i,
30985
+ DiscountBadge: _sfc_main$1h
30935
30986
  }
30936
30987
  };
30937
- const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
30988
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
30938
30989
  __name: "SearchResultsBadgeWrapper",
30939
30990
  props: {
30940
30991
  position: {},
@@ -30997,7 +31048,7 @@ and ensure you are accounting for this risk.
30997
31048
  }
30998
31049
  };
30999
31050
  return (_ctx, _cache) => {
31000
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
31051
+ return openBlock(), createElementBlock("div", _hoisted_1$14, [
31001
31052
  createBaseVNode("div", {
31002
31053
  id: "lupa-badges",
31003
31054
  class: normalizeClass(anchorPosition.value)
@@ -31008,7 +31059,7 @@ and ensure you are accounting for this risk.
31008
31059
  badge
31009
31060
  }, null, 8, ["badge"]);
31010
31061
  }), 128)),
31011
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1f, {
31062
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1l, {
31012
31063
  key: 0,
31013
31064
  options: _ctx.options
31014
31065
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -31017,13 +31068,13 @@ and ensure you are accounting for this risk.
31017
31068
  };
31018
31069
  }
31019
31070
  }));
31020
- const _hoisted_1$10 = ["href"];
31021
- const _hoisted_2$L = { class: "lupa-search-box-product-details-section" };
31022
- const _hoisted_3$y = {
31071
+ const _hoisted_1$13 = ["href"];
31072
+ const _hoisted_2$N = { class: "lupa-search-box-product-details-section" };
31073
+ const _hoisted_3$A = {
31023
31074
  key: 0,
31024
31075
  class: "lupa-search-box-product-add-to-cart-section"
31025
31076
  };
31026
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31077
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
31027
31078
  __name: "SearchBoxProduct",
31028
31079
  props: {
31029
31080
  item: {},
@@ -31129,7 +31180,7 @@ and ensure you are accounting for this risk.
31129
31180
  style: normalizeStyle(imageStyleOverride.value)
31130
31181
  }, [
31131
31182
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
31132
- return openBlock(), createBlock(_sfc_main$1h, {
31183
+ return openBlock(), createBlock(_sfc_main$1n, {
31133
31184
  class: "lupa-search-box-product-element",
31134
31185
  key: element.key,
31135
31186
  item: _ctx.item,
@@ -31139,10 +31190,10 @@ and ensure you are accounting for this risk.
31139
31190
  }, null, 8, ["item", "element", "labels", "link"]);
31140
31191
  }), 128))
31141
31192
  ], 4),
31142
- createBaseVNode("div", _hoisted_2$L, [
31193
+ createBaseVNode("div", _hoisted_2$N, [
31143
31194
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
31144
31195
  var _a25;
31145
- return openBlock(), createBlock(_sfc_main$1h, {
31196
+ return openBlock(), createBlock(_sfc_main$1n, {
31146
31197
  class: "lupa-search-box-product-element",
31147
31198
  key: element.key,
31148
31199
  item: _ctx.item,
@@ -31153,7 +31204,7 @@ and ensure you are accounting for this risk.
31153
31204
  ((_a25 = badgeOptions.value) == null ? void 0 : _a25.anchorElementKey) === element.key ? {
31154
31205
  name: "badges",
31155
31206
  fn: withCtx(() => [
31156
- createVNode(_sfc_main$1a, {
31207
+ createVNode(_sfc_main$1g, {
31157
31208
  options: badgeOptions.value,
31158
31209
  position: "card"
31159
31210
  }, null, 8, ["options"])
@@ -31169,7 +31220,7 @@ and ensure you are accounting for this risk.
31169
31220
  class: normalizeClass(`lupa-search-box-group-${group}`)
31170
31221
  }, [
31171
31222
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
31172
- return openBlock(), createBlock(_sfc_main$1h, {
31223
+ return openBlock(), createBlock(_sfc_main$1n, {
31173
31224
  class: "lupa-search-box-product-element",
31174
31225
  key: element.key,
31175
31226
  item: _ctx.item,
@@ -31181,8 +31232,8 @@ and ensure you are accounting for this risk.
31181
31232
  }), 128))
31182
31233
  ], 2);
31183
31234
  }), 128)),
31184
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
31185
- createVNode(_sfc_main$1h, {
31235
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
31236
+ createVNode(_sfc_main$1n, {
31186
31237
  class: "lupa-search-box-product-element",
31187
31238
  item: _ctx.item,
31188
31239
  element: addToCartElement.value,
@@ -31191,7 +31242,7 @@ and ensure you are accounting for this risk.
31191
31242
  isInStock: isInStock.value
31192
31243
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
31193
31244
  ])) : createCommentVNode("", true)
31194
- ], 16, _hoisted_1$10);
31245
+ ], 16, _hoisted_1$13);
31195
31246
  };
31196
31247
  }
31197
31248
  });
@@ -31263,8 +31314,8 @@ and ensure you are accounting for this risk.
31263
31314
  };
31264
31315
  return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
31265
31316
  });
31266
- const _hoisted_1$$ = { id: "lupa-search-box-products" };
31267
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
31317
+ const _hoisted_1$12 = { id: "lupa-search-box-products" };
31318
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31268
31319
  __name: "SearchBoxProducts",
31269
31320
  props: {
31270
31321
  items: {},
@@ -31336,7 +31387,7 @@ and ensure you are accounting for this risk.
31336
31387
  }
31337
31388
  };
31338
31389
  return (_ctx, _cache) => {
31339
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
31390
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [
31340
31391
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
31341
31392
  return renderSlot(_ctx.$slots, "productCard", {
31342
31393
  key: index,
@@ -31348,7 +31399,7 @@ and ensure you are accounting for this risk.
31348
31399
  itemClicked: handleProductClick
31349
31400
  });
31350
31401
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
31351
- return openBlock(), createBlock(_sfc_main$19, {
31402
+ return openBlock(), createBlock(_sfc_main$1f, {
31352
31403
  key: index,
31353
31404
  item,
31354
31405
  panelOptions: _ctx.panelOptions,
@@ -31363,9 +31414,9 @@ and ensure you are accounting for this risk.
31363
31414
  };
31364
31415
  }
31365
31416
  });
31366
- const _hoisted_1$_ = { class: "lupa-search-box-documents-go-to-results-wrapper" };
31367
- const _hoisted_2$K = { key: 0 };
31368
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
31417
+ const _hoisted_1$11 = { class: "lupa-search-box-documents-go-to-results-wrapper" };
31418
+ const _hoisted_2$M = { key: 0 };
31419
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
31369
31420
  __name: "SearchBoxProductsGoToResultsButton",
31370
31421
  props: {
31371
31422
  options: {},
@@ -31396,13 +31447,13 @@ and ensure you are accounting for this risk.
31396
31447
  emit2("goToResults");
31397
31448
  };
31398
31449
  return (_ctx, _cache) => {
31399
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
31450
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
31400
31451
  createBaseVNode("button", {
31401
31452
  class: "lupa-search-box-documents-go-to-results-button",
31402
31453
  onClick: goToResults
31403
31454
  }, [
31404
31455
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
31405
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$K, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
31456
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$M, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
31406
31457
  ])
31407
31458
  ]);
31408
31459
  };
@@ -31498,7 +31549,7 @@ and ensure you are accounting for this risk.
31498
31549
  }
31499
31550
  return parsedObject;
31500
31551
  };
31501
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
31552
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
31502
31553
  __name: "SearchBoxProductsWrapper",
31503
31554
  props: {
31504
31555
  panel: {},
@@ -31568,7 +31619,7 @@ and ensure you are accounting for this risk.
31568
31619
  watch(() => props.panel.limit, getItemsDebounced);
31569
31620
  return (_ctx, _cache) => {
31570
31621
  var _a25, _b25;
31571
- return openBlock(), createBlock(_sfc_main$18, {
31622
+ return openBlock(), createBlock(_sfc_main$1e, {
31572
31623
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
31573
31624
  panelOptions: _ctx.panel,
31574
31625
  labels: _ctx.labels,
@@ -31578,7 +31629,7 @@ and ensure you are accounting for this risk.
31578
31629
  default: withCtx(() => {
31579
31630
  var _a26;
31580
31631
  return [
31581
- showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$17, {
31632
+ showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$1d, {
31582
31633
  key: 0,
31583
31634
  options: _ctx.searchBoxOptions,
31584
31635
  panel: _ctx.panel,
@@ -31599,7 +31650,7 @@ and ensure you are accounting for this risk.
31599
31650
  };
31600
31651
  }
31601
31652
  });
31602
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
31653
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
31603
31654
  __name: "SearchBoxRelatedSourceWrapper",
31604
31655
  props: {
31605
31656
  panel: {},
@@ -31671,7 +31722,7 @@ and ensure you are accounting for this risk.
31671
31722
  });
31672
31723
  return (_ctx, _cache) => {
31673
31724
  var _a25, _b25;
31674
- return openBlock(), createBlock(_sfc_main$18, {
31725
+ return openBlock(), createBlock(_sfc_main$1e, {
31675
31726
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
31676
31727
  panelOptions: documentPanelOptions.value,
31677
31728
  labels: _ctx.labels,
@@ -31689,31 +31740,31 @@ and ensure you are accounting for this risk.
31689
31740
  };
31690
31741
  }
31691
31742
  });
31692
- const _hoisted_1$Z = {
31743
+ const _hoisted_1$10 = {
31693
31744
  key: 0,
31694
31745
  id: "lupa-search-box-panel"
31695
31746
  };
31696
- const _hoisted_2$J = ["data-cy"];
31697
- const _hoisted_3$x = {
31747
+ const _hoisted_2$L = ["data-cy"];
31748
+ const _hoisted_3$z = {
31698
31749
  key: 0,
31699
31750
  class: "lupa-panel-title lupa-panel-title-top-results"
31700
31751
  };
31701
- const _hoisted_4$o = {
31752
+ const _hoisted_4$q = {
31702
31753
  key: 1,
31703
31754
  class: "lupa-panel-title"
31704
31755
  };
31705
- const _hoisted_5$g = {
31756
+ const _hoisted_5$h = {
31706
31757
  key: 1,
31707
31758
  id: "lupa-search-box-panel"
31708
31759
  };
31709
31760
  const __default__$2 = {
31710
31761
  components: {
31711
- SearchBoxSuggestionsWrapper: _sfc_main$1r,
31712
- SearchBoxProductsWrapper: _sfc_main$16,
31713
- SearchBoxRelatedSourceWrapper: _sfc_main$15
31762
+ SearchBoxSuggestionsWrapper: _sfc_main$1x,
31763
+ SearchBoxProductsWrapper: _sfc_main$1c,
31764
+ SearchBoxRelatedSourceWrapper: _sfc_main$1b
31714
31765
  }
31715
31766
  };
31716
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
31767
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
31717
31768
  __name: "SearchBoxMainPanel",
31718
31769
  props: {
31719
31770
  options: {},
@@ -31744,6 +31795,7 @@ and ensure you are accounting for this risk.
31744
31795
  const searchBoxStore = useSearchBoxStore();
31745
31796
  const { suggestionResults, hasAnyResults, panelItemCounts } = storeToRefs(searchBoxStore);
31746
31797
  const emit2 = __emit;
31798
+ const isSearchEmpty = computed(() => !props.inputValue || props.inputValue.length < 1);
31747
31799
  const displayResults = computed(() => {
31748
31800
  var _a25;
31749
31801
  return ((_a25 = props.inputValue) == null ? void 0 : _a25.length) >= props.options.minInputLength;
@@ -31754,6 +31806,12 @@ and ensure you are accounting for this risk.
31754
31806
  return Boolean(props.options.history) && ((_a25 = props.inputValue) == null ? void 0 : _a25.length) < 1 && props.options.minInputLength > 0;
31755
31807
  }
31756
31808
  );
31809
+ const displayShowMoreResultsButton = computed(() => {
31810
+ if (isSearchEmpty.value && props.options.hideMoreResultsButtonOnEmptyQuery) {
31811
+ return false;
31812
+ }
31813
+ return hasAnyResults.value || !props.options.hideMoreResultsButtonOnNoResults;
31814
+ });
31757
31815
  const displayPanels = computed(
31758
31816
  () => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
31759
31817
  );
@@ -31871,7 +31929,7 @@ and ensure you are accounting for this risk.
31871
31929
  ref_key: "panelContainer",
31872
31930
  ref: panelContainer
31873
31931
  }, [
31874
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
31932
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
31875
31933
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
31876
31934
  key: 0,
31877
31935
  class: "lupa-search-box-close-panel",
@@ -31893,8 +31951,8 @@ and ensure you are accounting for this risk.
31893
31951
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
31894
31952
  "data-cy": "lupa-panel-" + panel.type + "-index"
31895
31953
  }, [
31896
- ((_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),
31897
- ((_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),
31954
+ ((_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),
31955
+ ((_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),
31898
31956
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
31899
31957
  key: 2,
31900
31958
  panel,
@@ -31916,21 +31974,21 @@ and ensure you are accounting for this risk.
31916
31974
  key: "0"
31917
31975
  } : void 0
31918
31976
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
31919
- ], 14, _hoisted_2$J);
31977
+ ], 14, _hoisted_2$L);
31920
31978
  }), 128))
31921
31979
  ], 4),
31922
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1u, {
31980
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
31923
31981
  key: 1,
31924
31982
  labels: labels.value
31925
31983
  }, null, 8, ["labels"])) : createCommentVNode("", true),
31926
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1x, {
31984
+ displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
31927
31985
  key: 2,
31928
31986
  labels: labels.value,
31929
31987
  options: _ctx.options,
31930
31988
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
31931
31989
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
31932
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
31933
- createVNode(_sfc_main$1v, {
31990
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
31991
+ createVNode(_sfc_main$1B, {
31934
31992
  options: _ctx.options.history,
31935
31993
  history: history.value,
31936
31994
  onGoToResults: handleGoToResults,
@@ -31955,8 +32013,8 @@ and ensure you are accounting for this risk.
31955
32013
  const elements = getElements(triggers);
31956
32014
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
31957
32015
  };
31958
- const _hoisted_1$Y = { class: "lupa-search-box-wrapper" };
31959
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32016
+ const _hoisted_1$$ = { class: "lupa-search-box-wrapper" };
32017
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31960
32018
  __name: "SearchBox",
31961
32019
  props: {
31962
32020
  options: {},
@@ -32007,6 +32065,7 @@ and ensure you are accounting for this risk.
32007
32065
  "debounce",
32008
32066
  "showTotalCount",
32009
32067
  "hideMoreResultsButtonOnNoResults",
32068
+ "hideMoreResultsButtonOnEmptyQuery",
32010
32069
  "showNoResultsPanel",
32011
32070
  "expandOnSinglePanel",
32012
32071
  "showMoreResultsButton"
@@ -32278,8 +32337,8 @@ and ensure you are accounting for this risk.
32278
32337
  id: "lupa-search-box",
32279
32338
  class: normalizeClass({ "lupa-search-box-opened": opened.value })
32280
32339
  }, [
32281
- createBaseVNode("div", _hoisted_1$Y, [
32282
- createVNode(_sfc_main$1y, {
32340
+ createBaseVNode("div", _hoisted_1$$, [
32341
+ createVNode(_sfc_main$1E, {
32283
32342
  options: inputOptions.value,
32284
32343
  suggestedValue: suggestedValue.value,
32285
32344
  "can-close": (_a26 = _ctx.isSearchContainer) != null ? _a26 : false,
@@ -32292,7 +32351,7 @@ and ensure you are accounting for this risk.
32292
32351
  onSearch: handleSearch,
32293
32352
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
32294
32353
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
32295
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$14, {
32354
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$1a, {
32296
32355
  key: 0,
32297
32356
  options: panelOptions.value,
32298
32357
  inputValue: inputValue.value,
@@ -32380,20 +32439,20 @@ and ensure you are accounting for this risk.
32380
32439
  }
32381
32440
  return searchParams;
32382
32441
  };
32383
- const _hoisted_1$X = {
32442
+ const _hoisted_1$_ = {
32384
32443
  key: 0,
32385
32444
  id: "lupa-search-results-did-you-mean"
32386
32445
  };
32387
- const _hoisted_2$I = {
32446
+ const _hoisted_2$K = {
32388
32447
  key: 0,
32389
32448
  "data-cy": "suggested-search-text-label"
32390
32449
  };
32391
- const _hoisted_3$w = {
32450
+ const _hoisted_3$y = {
32392
32451
  key: 1,
32393
32452
  "data-cy": "did-you-mean-label"
32394
32453
  };
32395
- const _hoisted_4$n = { key: 1 };
32396
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32454
+ const _hoisted_4$p = { key: 1 };
32455
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
32397
32456
  __name: "SearchResultsDidYouMean",
32398
32457
  props: {
32399
32458
  labels: {}
@@ -32425,8 +32484,8 @@ and ensure you are accounting for this risk.
32425
32484
  paramStore.goToResults({ searchText, facet });
32426
32485
  };
32427
32486
  return (_ctx, _cache) => {
32428
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$X, [
32429
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
32487
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$_, [
32488
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$K, [
32430
32489
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
32431
32490
  return openBlock(), createElementBlock("span", { key: index }, [
32432
32491
  createBaseVNode("span", {
@@ -32435,7 +32494,7 @@ and ensure you are accounting for this risk.
32435
32494
  ]);
32436
32495
  }), 128))
32437
32496
  ])) : createCommentVNode("", true),
32438
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
32497
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
32439
32498
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
32440
32499
  return openBlock(), createElementBlock("span", { key: index }, [
32441
32500
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -32443,7 +32502,7 @@ and ensure you are accounting for this risk.
32443
32502
  class: "lupa-did-you-mean lupa-highlighted-search-text",
32444
32503
  "data-cy": "did-you-mean-value",
32445
32504
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
32446
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
32505
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(label) + " ", 1))
32447
32506
  ]);
32448
32507
  }), 128))
32449
32508
  ])) : createCommentVNode("", true)
@@ -32451,12 +32510,12 @@ and ensure you are accounting for this risk.
32451
32510
  };
32452
32511
  }
32453
32512
  });
32454
- const _hoisted_1$W = {
32513
+ const _hoisted_1$Z = {
32455
32514
  key: 0,
32456
32515
  class: "lupa-search-results-summary"
32457
32516
  };
32458
- const _hoisted_2$H = ["innerHTML"];
32459
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32517
+ const _hoisted_2$J = ["innerHTML"];
32518
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
32460
32519
  __name: "SearchResultsSummary",
32461
32520
  props: {
32462
32521
  label: {},
@@ -32471,8 +32530,8 @@ and ensure you are accounting for this risk.
32471
32530
  return addParamsToLabel(props.label, range2, `<span>${totalItems.value}</span>`);
32472
32531
  });
32473
32532
  return (_ctx, _cache) => {
32474
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
32475
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$H),
32533
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
32534
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$J),
32476
32535
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
32477
32536
  key: 0,
32478
32537
  class: "lupa-filter-clear",
@@ -32483,19 +32542,19 @@ and ensure you are accounting for this risk.
32483
32542
  };
32484
32543
  }
32485
32544
  });
32486
- const _hoisted_1$V = {
32545
+ const _hoisted_1$Y = {
32487
32546
  key: 0,
32488
32547
  class: "lupa-result-page-title",
32489
32548
  "data-cy": "lupa-result-page-title"
32490
32549
  };
32491
- const _hoisted_2$G = { key: 0 };
32492
- const _hoisted_3$v = {
32550
+ const _hoisted_2$I = { key: 0 };
32551
+ const _hoisted_3$x = {
32493
32552
  key: 1,
32494
32553
  class: "lupa-results-total-count"
32495
32554
  };
32496
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
32497
- const _hoisted_5$f = ["innerHTML"];
32498
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32555
+ const _hoisted_4$o = { class: "lupa-results-total-count-number" };
32556
+ const _hoisted_5$g = ["innerHTML"];
32557
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
32499
32558
  __name: "SearchResultsTitle",
32500
32559
  props: {
32501
32560
  options: {},
@@ -32538,16 +32597,16 @@ and ensure you are accounting for this risk.
32538
32597
  });
32539
32598
  return (_ctx, _cache) => {
32540
32599
  return openBlock(), createElementBlock("div", null, [
32541
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$V, [
32600
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$Y, [
32542
32601
  createTextVNode(toDisplayString(searchResultsTitleTemplate.value || _ctx.options.labels.searchResults), 1),
32543
- queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32544
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
32602
+ queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$I, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32603
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
32545
32604
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
32546
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
32605
+ createBaseVNode("span", _hoisted_4$o, toDisplayString(unref(totalItems)), 1),
32547
32606
  _cache[0] || (_cache[0] = createTextVNode(")"))
32548
32607
  ])) : createCommentVNode("", true)
32549
32608
  ])) : createCommentVNode("", true),
32550
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$11, {
32609
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$17, {
32551
32610
  key: 1,
32552
32611
  label: summaryLabel.value
32553
32612
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -32555,20 +32614,20 @@ and ensure you are accounting for this risk.
32555
32614
  key: 2,
32556
32615
  class: "lupa-result-page-description-top",
32557
32616
  innerHTML: descriptionTop.value
32558
- }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
32617
+ }, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
32559
32618
  ]);
32560
32619
  };
32561
32620
  }
32562
32621
  });
32563
- const _hoisted_1$U = {
32622
+ const _hoisted_1$X = {
32564
32623
  class: "lupa-current-filter-label",
32565
32624
  "data-cy": "lupa-current-filter-label"
32566
32625
  };
32567
- const _hoisted_2$F = {
32626
+ const _hoisted_2$H = {
32568
32627
  class: "lupa-current-filter-value",
32569
32628
  "data-cy": "lupa-current-filter-value"
32570
32629
  };
32571
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
32630
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
32572
32631
  __name: "CurrentFilterDisplay",
32573
32632
  props: {
32574
32633
  filter: {}
@@ -32610,23 +32669,23 @@ and ensure you are accounting for this risk.
32610
32669
  onClick: handleClick,
32611
32670
  "aria-label": "Remove filter"
32612
32671
  }, "⨉"),
32613
- createBaseVNode("div", _hoisted_1$U, toDisplayString(_ctx.filter.label) + ": ", 1),
32614
- createBaseVNode("div", _hoisted_2$F, toDisplayString(formatFilterValue(props.filter)), 1)
32672
+ createBaseVNode("div", _hoisted_1$X, toDisplayString(_ctx.filter.label) + ": ", 1),
32673
+ createBaseVNode("div", _hoisted_2$H, toDisplayString(formatFilterValue(props.filter)), 1)
32615
32674
  ], 2);
32616
32675
  };
32617
32676
  }
32618
32677
  });
32619
- const _hoisted_1$T = { class: "lupa-filter-title-text" };
32620
- const _hoisted_2$E = {
32678
+ const _hoisted_1$W = { class: "lupa-filter-title-text" };
32679
+ const _hoisted_2$G = {
32621
32680
  key: 0,
32622
32681
  class: "lupa-filter-count"
32623
32682
  };
32624
- const _hoisted_3$u = {
32683
+ const _hoisted_3$w = {
32625
32684
  key: 0,
32626
32685
  class: "filter-values"
32627
32686
  };
32628
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
32629
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32687
+ const _hoisted_4$n = { class: "lupa-current-filter-list" };
32688
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
32630
32689
  __name: "CurrentFilters",
32631
32690
  props: {
32632
32691
  options: {},
@@ -32707,19 +32766,19 @@ and ensure you are accounting for this risk.
32707
32766
  class: "lupa-current-filter-title",
32708
32767
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
32709
32768
  }, [
32710
- createBaseVNode("div", _hoisted_1$T, [
32769
+ createBaseVNode("div", _hoisted_1$W, [
32711
32770
  createTextVNode(toDisplayString((_c = (_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) != null ? _c : "") + " ", 1),
32712
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$E, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
32771
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$G, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
32713
32772
  ]),
32714
32773
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
32715
32774
  key: 0,
32716
32775
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
32717
32776
  }, null, 2)) : createCommentVNode("", true)
32718
32777
  ]),
32719
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
32720
- createBaseVNode("div", _hoisted_4$l, [
32778
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
32779
+ createBaseVNode("div", _hoisted_4$n, [
32721
32780
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
32722
- return openBlock(), createBlock(_sfc_main$$, {
32781
+ return openBlock(), createBlock(_sfc_main$15, {
32723
32782
  key: filter.key + "_" + filter.value,
32724
32783
  filter,
32725
32784
  units: units.value,
@@ -32737,8 +32796,8 @@ and ensure you are accounting for this risk.
32737
32796
  };
32738
32797
  }
32739
32798
  });
32740
- const _hoisted_1$S = ["href"];
32741
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
32799
+ const _hoisted_1$V = ["href"];
32800
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32742
32801
  __name: "CategoryFilterItem",
32743
32802
  props: {
32744
32803
  options: {},
@@ -32775,20 +32834,20 @@ and ensure you are accounting for this risk.
32775
32834
  "data-cy": "lupa-child-category-item",
32776
32835
  href: urlLink.value,
32777
32836
  onClick: handleNavigation
32778
- }, toDisplayString(title.value), 9, _hoisted_1$S)
32837
+ }, toDisplayString(title.value), 9, _hoisted_1$V)
32779
32838
  ], 2);
32780
32839
  };
32781
32840
  }
32782
32841
  });
32783
- const _hoisted_1$R = {
32842
+ const _hoisted_1$U = {
32784
32843
  class: "lupa-category-filter",
32785
32844
  "data-cy": "lupa-category-filter"
32786
32845
  };
32787
- const _hoisted_2$D = { class: "lupa-category-back" };
32788
- const _hoisted_3$t = ["href"];
32789
- const _hoisted_4$k = ["href"];
32790
- const _hoisted_5$e = { class: "lupa-child-category-list" };
32791
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32846
+ const _hoisted_2$F = { class: "lupa-category-back" };
32847
+ const _hoisted_3$v = ["href"];
32848
+ const _hoisted_4$m = ["href"];
32849
+ const _hoisted_5$f = { class: "lupa-child-category-list" };
32850
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32792
32851
  __name: "CategoryFilter",
32793
32852
  props: {
32794
32853
  options: {}
@@ -32876,14 +32935,14 @@ and ensure you are accounting for this risk.
32876
32935
  };
32877
32936
  __expose({ fetch: fetch2 });
32878
32937
  return (_ctx, _cache) => {
32879
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
32880
- createBaseVNode("div", _hoisted_2$D, [
32938
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
32939
+ createBaseVNode("div", _hoisted_2$F, [
32881
32940
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
32882
32941
  key: 0,
32883
32942
  "data-cy": "lupa-category-back",
32884
32943
  href: backUrlLink.value,
32885
32944
  onClick: handleNavigationBack
32886
- }, toDisplayString(backTitle.value), 9, _hoisted_3$t)) : createCommentVNode("", true)
32945
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$v)) : createCommentVNode("", true)
32887
32946
  ]),
32888
32947
  createBaseVNode("div", {
32889
32948
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -32893,11 +32952,11 @@ and ensure you are accounting for this risk.
32893
32952
  href: parentUrlLink.value,
32894
32953
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
32895
32954
  onClick: handleNavigationParent
32896
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
32955
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$m)
32897
32956
  ], 2),
32898
- createBaseVNode("div", _hoisted_5$e, [
32957
+ createBaseVNode("div", _hoisted_5$f, [
32899
32958
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
32900
- return openBlock(), createBlock(_sfc_main$Z, {
32959
+ return openBlock(), createBlock(_sfc_main$13, {
32901
32960
  key: getCategoryKey(child),
32902
32961
  item: child,
32903
32962
  options: _ctx.options
@@ -32908,22 +32967,22 @@ and ensure you are accounting for this risk.
32908
32967
  };
32909
32968
  }
32910
32969
  });
32911
- const _hoisted_1$Q = {
32970
+ const _hoisted_1$T = {
32912
32971
  class: "lupa-search-result-facet-term-values",
32913
32972
  "data-cy": "lupa-search-result-facet-term-values"
32914
32973
  };
32915
- const _hoisted_2$C = ["placeholder"];
32916
- const _hoisted_3$s = { class: "lupa-terms-list" };
32917
- const _hoisted_4$j = ["onClick"];
32918
- const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
32919
- const _hoisted_6$7 = { class: "lupa-term-label" };
32974
+ const _hoisted_2$E = ["placeholder"];
32975
+ const _hoisted_3$u = { class: "lupa-terms-list" };
32976
+ const _hoisted_4$l = ["onClick"];
32977
+ const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
32978
+ const _hoisted_6$6 = { class: "lupa-term-label" };
32920
32979
  const _hoisted_7$4 = {
32921
32980
  key: 0,
32922
32981
  class: "lupa-term-count"
32923
32982
  };
32924
32983
  const _hoisted_8$2 = { key: 0 };
32925
32984
  const _hoisted_9$2 = { key: 1 };
32926
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
32985
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32927
32986
  __name: "TermFacet",
32928
32987
  props: {
32929
32988
  options: {},
@@ -33017,17 +33076,17 @@ and ensure you are accounting for this risk.
33017
33076
  }
33018
33077
  };
33019
33078
  return (_ctx, _cache) => {
33020
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
33079
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
33021
33080
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
33022
33081
  key: 0,
33023
33082
  class: "lupa-term-filter",
33024
33083
  "data-cy": "lupa-term-filter",
33025
33084
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
33026
33085
  placeholder: _ctx.options.labels.facetFilter
33027
- }, null, 8, _hoisted_2$C)), [
33086
+ }, null, 8, _hoisted_2$E)), [
33028
33087
  [vModelText, termFilter.value]
33029
33088
  ]) : createCommentVNode("", true),
33030
- createBaseVNode("div", _hoisted_3$s, [
33089
+ createBaseVNode("div", _hoisted_3$u, [
33031
33090
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
33032
33091
  return openBlock(), createElementBlock("div", {
33033
33092
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -33035,7 +33094,7 @@ and ensure you are accounting for this risk.
33035
33094
  key: item.title,
33036
33095
  onClick: ($event) => handleFacetClick(item)
33037
33096
  }, [
33038
- createBaseVNode("div", _hoisted_5$d, [
33097
+ createBaseVNode("div", _hoisted_5$e, [
33039
33098
  createBaseVNode("span", {
33040
33099
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
33041
33100
  }, null, 2)
@@ -33043,10 +33102,10 @@ and ensure you are accounting for this risk.
33043
33102
  createBaseVNode("div", {
33044
33103
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(item)]: true }])
33045
33104
  }, [
33046
- createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
33105
+ createBaseVNode("span", _hoisted_6$6, toDisplayString(getItemLabel(item)), 1),
33047
33106
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
33048
33107
  ], 2)
33049
- ], 10, _hoisted_4$j);
33108
+ ], 10, _hoisted_4$l);
33050
33109
  }), 128))
33051
33110
  ]),
33052
33111
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -33954,21 +34013,33 @@ and ensure you are accounting for this risk.
33954
34013
  m.render = function(e2, t, r, i, n, o) {
33955
34014
  return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
33956
34015
  }, m.__file = "src/Slider.vue";
33957
- const _hoisted_1$P = { class: "lupa-search-result-facet-stats-values" };
33958
- const _hoisted_2$B = {
34016
+ const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
34017
+ if (value === void 0 || value === null || Number.isNaN(value)) return "";
34018
+ const log = Math.log10(maxPrecision);
34019
+ const decimals = log < 0 ? Math.round(-log) : 0;
34020
+ const factor = Math.pow(10, decimals);
34021
+ const rounded = Math.round((value + Number.EPSILON) * factor) / factor;
34022
+ let out = rounded.toFixed(decimals);
34023
+ if (Number.isInteger(value)) {
34024
+ out = Math.trunc(value).toString();
34025
+ }
34026
+ return out;
34027
+ };
34028
+ const _hoisted_1$S = { class: "lupa-search-result-facet-stats-values" };
34029
+ const _hoisted_2$D = {
33959
34030
  key: 0,
33960
34031
  class: "lupa-stats-facet-summary"
33961
34032
  };
33962
- const _hoisted_3$r = {
34033
+ const _hoisted_3$t = {
33963
34034
  key: 1,
33964
34035
  class: "lupa-stats-facet-summary-input"
33965
34036
  };
33966
- const _hoisted_4$i = { class: "lupa-stats-from" };
33967
- const _hoisted_5$c = {
34037
+ const _hoisted_4$k = { class: "lupa-stats-from" };
34038
+ const _hoisted_5$d = {
33968
34039
  key: 0,
33969
34040
  class: "lupa-stats-range-label"
33970
34041
  };
33971
- const _hoisted_6$6 = ["min", "max", "pattern", "aria-label"];
34042
+ const _hoisted_6$5 = ["min", "max", "pattern", "aria-label"];
33972
34043
  const _hoisted_7$3 = { key: 1 };
33973
34044
  const _hoisted_8$1 = { key: 2 };
33974
34045
  const _hoisted_9$1 = { class: "lupa-stats-to" };
@@ -33983,7 +34054,7 @@ and ensure you are accounting for this risk.
33983
34054
  key: 2,
33984
34055
  class: "lupa-stats-slider-wrapper"
33985
34056
  };
33986
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
34057
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
33987
34058
  __name: "StatsFacet",
33988
34059
  props: {
33989
34060
  options: {},
@@ -34102,7 +34173,7 @@ and ensure you are accounting for this risk.
34102
34173
  const originalSliderRange = computed(() => {
34103
34174
  return innerSliderRange.value.length === 2 && (currentFilters.value.gte || currentFilters.value.lte) ? [
34104
34175
  Math.max(+currentFilters.value.gte, facetValue.value.min),
34105
- Math.min(+currentFilters.value.lte, facetValue.value.max)
34176
+ Math.min(+(currentFilters.value.lt || currentFilters.value.lte), facetValue.value.max)
34106
34177
  ] : [facetValue.value.min, facetValue.value.max];
34107
34178
  });
34108
34179
  const fromValue = computed({
@@ -34158,6 +34229,7 @@ and ensure you are accounting for this risk.
34158
34229
  }
34159
34230
  );
34160
34231
  const statsSummary = computed(() => {
34232
+ var _a25, _b25;
34161
34233
  const [min, max] = originalSliderRange.value;
34162
34234
  if (isPrice.value) {
34163
34235
  return formatPriceSummary(
@@ -34168,10 +34240,12 @@ and ensure you are accounting for this risk.
34168
34240
  multiCurrency.value
34169
34241
  );
34170
34242
  }
34243
+ const minValue = roundToMaxDecimals(min, (_a25 = customInterval.value) != null ? _a25 : 0.1);
34244
+ const maxValue = roundToMaxDecimals(max, (_b25 = customInterval.value) != null ? _b25 : 0.1);
34171
34245
  if (unit.value) {
34172
- return `${min} ${unit.value} – ${max} ${unit.value}`;
34246
+ return `${minValue} ${unit.value} – ${maxValue} ${unit.value}`;
34173
34247
  }
34174
- return formatRange({ gte: min, lte: max });
34248
+ return formatRange({ gte: minValue, lte: maxValue });
34175
34249
  });
34176
34250
  function handleInputChange() {
34177
34251
  if (innerSliderRange.value.length < 2) return;
@@ -34199,10 +34273,10 @@ and ensure you are accounting for this risk.
34199
34273
  }
34200
34274
  );
34201
34275
  return (_ctx, _cache) => {
34202
- return openBlock(), createElementBlock("div", _hoisted_1$P, [
34203
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
34204
- createBaseVNode("div", _hoisted_4$i, [
34205
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
34276
+ return openBlock(), createElementBlock("div", _hoisted_1$S, [
34277
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$D, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$t, [
34278
+ createBaseVNode("div", _hoisted_4$k, [
34279
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$d, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
34206
34280
  withDirectives(createBaseVNode("input", {
34207
34281
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
34208
34282
  type: "text",
@@ -34211,7 +34285,7 @@ and ensure you are accounting for this risk.
34211
34285
  max: facetMax.value,
34212
34286
  pattern: sliderInputFormat.value,
34213
34287
  "aria-label": ariaLabelFrom.value
34214
- }, null, 8, _hoisted_6$6), [
34288
+ }, null, 8, _hoisted_6$5), [
34215
34289
  [
34216
34290
  vModelText,
34217
34291
  fromValue.value,
@@ -34264,17 +34338,17 @@ and ensure you are accounting for this risk.
34264
34338
  };
34265
34339
  }
34266
34340
  });
34267
- const _hoisted_1$O = { class: "lupa-term-checkbox-wrapper" };
34268
- const _hoisted_2$A = { class: "lupa-term-label" };
34269
- const _hoisted_3$q = {
34341
+ const _hoisted_1$R = { class: "lupa-term-checkbox-wrapper" };
34342
+ const _hoisted_2$C = { class: "lupa-term-label" };
34343
+ const _hoisted_3$s = {
34270
34344
  key: 0,
34271
34345
  class: "lupa-term-count"
34272
34346
  };
34273
- const _hoisted_4$h = {
34347
+ const _hoisted_4$j = {
34274
34348
  key: 0,
34275
34349
  class: "lupa-facet-level"
34276
34350
  };
34277
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
34351
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
34278
34352
  __name: "HierarchyFacetLevel",
34279
34353
  props: {
34280
34354
  options: {},
@@ -34328,7 +34402,7 @@ and ensure you are accounting for this risk.
34328
34402
  "data-cy": "lupa-facet-term",
34329
34403
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
34330
34404
  }, [
34331
- createBaseVNode("div", _hoisted_1$O, [
34405
+ createBaseVNode("div", _hoisted_1$R, [
34332
34406
  createBaseVNode("span", {
34333
34407
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
34334
34408
  }, null, 2)
@@ -34336,11 +34410,11 @@ and ensure you are accounting for this risk.
34336
34410
  createBaseVNode("div", {
34337
34411
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(_ctx.item)]: true }])
34338
34412
  }, [
34339
- createBaseVNode("span", _hoisted_2$A, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
34340
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
34413
+ createBaseVNode("span", _hoisted_2$C, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
34414
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
34341
34415
  ], 2)
34342
34416
  ]),
34343
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
34417
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, [
34344
34418
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
34345
34419
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
34346
34420
  key: itemChild.title,
@@ -34356,13 +34430,13 @@ and ensure you are accounting for this risk.
34356
34430
  };
34357
34431
  }
34358
34432
  });
34359
- const _hoisted_1$N = {
34433
+ const _hoisted_1$Q = {
34360
34434
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
34361
34435
  "data-cy": "lupa-search-result-facet-term-values"
34362
34436
  };
34363
- const _hoisted_2$z = { key: 0 };
34364
- const _hoisted_3$p = ["placeholder"];
34365
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
34437
+ const _hoisted_2$B = { key: 0 };
34438
+ const _hoisted_3$r = ["placeholder"];
34439
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
34366
34440
  __name: "HierarchyFacet",
34367
34441
  props: {
34368
34442
  options: {},
@@ -34418,19 +34492,19 @@ and ensure you are accounting for this risk.
34418
34492
  showAll.value = false;
34419
34493
  };
34420
34494
  return (_ctx, _cache) => {
34421
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
34422
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, [
34495
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
34496
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, [
34423
34497
  withDirectives(createBaseVNode("input", {
34424
34498
  class: "lupa-term-filter",
34425
34499
  "data-cy": "lupa-term-filter",
34426
34500
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
34427
34501
  placeholder: _ctx.options.labels.facetFilter
34428
- }, null, 8, _hoisted_3$p), [
34502
+ }, null, 8, _hoisted_3$r), [
34429
34503
  [vModelText, termFilter.value]
34430
34504
  ])
34431
34505
  ])) : createCommentVNode("", true),
34432
34506
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
34433
- return openBlock(), createBlock(_sfc_main$V, {
34507
+ return openBlock(), createBlock(_sfc_main$$, {
34434
34508
  key: item.title,
34435
34509
  options: _ctx.options,
34436
34510
  item,
@@ -34454,30 +34528,31 @@ and ensure you are accounting for this risk.
34454
34528
  };
34455
34529
  }
34456
34530
  });
34457
- const _hoisted_1$M = { class: "lupa-facet-label-text" };
34458
- const _hoisted_2$y = {
34531
+ const _hoisted_1$P = { class: "lupa-facet-label-text" };
34532
+ const _hoisted_2$A = {
34459
34533
  key: 0,
34460
34534
  class: "lupa-facet-content",
34461
34535
  "data-cy": "lupa-facet-content"
34462
34536
  };
34463
34537
  const __default__$1 = {
34464
34538
  components: {
34465
- TermFacet: _sfc_main$X,
34466
- StatsFacet: _sfc_main$W,
34467
- HierarchyFacet: _sfc_main$U
34539
+ TermFacet: _sfc_main$11,
34540
+ StatsFacet: _sfc_main$10,
34541
+ HierarchyFacet: _sfc_main$_
34468
34542
  }
34469
34543
  };
34470
- const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
34544
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
34471
34545
  __name: "FacetDisplay",
34472
34546
  props: {
34473
34547
  options: {},
34474
34548
  facet: {},
34475
34549
  currentFilters: {},
34476
- clearable: { type: Boolean }
34550
+ clearable: { type: Boolean },
34551
+ currentFacetStyle: {}
34477
34552
  },
34478
- emits: ["select", "clear"],
34553
+ emits: ["select", "clear", "expand"],
34479
34554
  setup(__props, { emit: __emit }) {
34480
- var _a25, _b25, _c;
34555
+ var _a25, _b25;
34481
34556
  const props = __props;
34482
34557
  const facet = computed(() => {
34483
34558
  var _a26;
@@ -34491,17 +34566,17 @@ and ensure you are accounting for this risk.
34491
34566
  const optionsStore = useOptionsStore();
34492
34567
  const screenStore = useScreenStore();
34493
34568
  const { currentFilterKeys } = storeToRefs(searchResultStore);
34494
- const { searchResultOptions } = storeToRefs(optionsStore);
34569
+ const { searchResultOptions, expandedFacets } = storeToRefs(optionsStore);
34495
34570
  const { isMobileWidth } = storeToRefs(screenStore);
34496
34571
  const emit2 = __emit;
34497
34572
  const allExpanded = computed(() => {
34498
- var _a26, _b26, _c2, _d, _e, _f;
34573
+ var _a26, _b26, _c, _d, _e, _f;
34499
34574
  if (isMobileWidth.value) {
34500
- return (_c2 = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c2 : false;
34575
+ return (_c = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c : false;
34501
34576
  }
34502
34577
  return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
34503
34578
  });
34504
- 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);
34579
+ const isOpen = ref((_b25 = ((_a25 = expandedFacets.value) == null ? void 0 : _a25.includes(props.facet.key)) || allExpanded.value) != null ? _b25 : false);
34505
34580
  const facetPanel = ref(null);
34506
34581
  const facetType = computed(() => {
34507
34582
  switch (facet.value.type) {
@@ -34543,9 +34618,16 @@ and ensure you are accounting for this risk.
34543
34618
  var _a26;
34544
34619
  return getTranslatedFacetKey(props.facet, (_a26 = searchResultOptions.value.filters) == null ? void 0 : _a26.translations);
34545
34620
  });
34621
+ const expandSidebarOnFacetClick = computed(() => {
34622
+ var _a26, _b26, _c;
34623
+ if (!props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
34624
+ return false;
34625
+ }
34626
+ return (_c = (_b26 = (_a26 = props.options.style) == null ? void 0 : _a26.drawer) == null ? void 0 : _b26.expandSidebarOnFacetClick) != null ? _c : false;
34627
+ });
34546
34628
  onMounted(() => {
34547
- var _a26;
34548
- if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown") {
34629
+ var _a26, _b26, _c;
34630
+ 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") {
34549
34631
  window.addEventListener("click", handleMouseClick);
34550
34632
  }
34551
34633
  });
@@ -34554,7 +34636,7 @@ and ensure you are accounting for this risk.
34554
34636
  });
34555
34637
  const handleMouseClick = (e2) => {
34556
34638
  const el = facetPanel.value;
34557
- if (!el) {
34639
+ if (!el || !props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
34558
34640
  return;
34559
34641
  }
34560
34642
  const isOutsideElement = el && !el.contains(e2.target);
@@ -34566,6 +34648,11 @@ and ensure you are accounting for this risk.
34566
34648
  handleFacetQueryFilter();
34567
34649
  });
34568
34650
  const toggleFacet = () => {
34651
+ if (expandSidebarOnFacetClick.value) {
34652
+ expandedFacets.value = [facet.value.key];
34653
+ emit2("expand");
34654
+ return;
34655
+ }
34569
34656
  isOpen.value = !isOpen.value;
34570
34657
  handleFacetQueryFilter();
34571
34658
  };
@@ -34598,12 +34685,12 @@ and ensure you are accounting for this risk.
34598
34685
  "data-cy": "lupa-search-result-facet-label",
34599
34686
  onClick: toggleFacet
34600
34687
  }, [
34601
- createBaseVNode("div", _hoisted_1$M, toDisplayString(facetLabel.value), 1),
34688
+ createBaseVNode("div", _hoisted_1$P, toDisplayString(facetLabel.value), 1),
34602
34689
  createBaseVNode("div", {
34603
34690
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
34604
34691
  }, null, 2)
34605
34692
  ], 2),
34606
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
34693
+ isOpen.value && !expandSidebarOnFacetClick.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
34607
34694
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
34608
34695
  facet: facet.value,
34609
34696
  currentFilters: currentFilters.value[facet.value.key],
@@ -34621,12 +34708,154 @@ and ensure you are accounting for this risk.
34621
34708
  };
34622
34709
  }
34623
34710
  }));
34624
- const _hoisted_1$L = { class: "lupa-search-result-facet-section" };
34625
- const _hoisted_2$x = {
34711
+ const useSidebarToggle = () => {
34712
+ const searchResultStore = useSearchResultStore();
34713
+ const optionsStore = useOptionsStore();
34714
+ const { currentFilterCount, isFilterSidebarVisible, isSortingSidebarVisible } = storeToRefs(searchResultStore);
34715
+ const { searchResultOptions } = storeToRefs(optionsStore);
34716
+ const labels = computed(() => {
34717
+ return searchResultOptions.value.labels;
34718
+ });
34719
+ const showMobileFilterCount = computed(
34720
+ () => {
34721
+ var _a25, _b25, _c, _d;
34722
+ 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;
34723
+ }
34724
+ );
34725
+ const disableMobileBodyScrollLock = computed(
34726
+ () => {
34727
+ var _a25, _b25, _c;
34728
+ return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
34729
+ }
34730
+ );
34731
+ const isSidebarVisible = computed(
34732
+ () => isFilterSidebarVisible.value || isSortingSidebarVisible.value
34733
+ );
34734
+ const sortLabel = computed(() => {
34735
+ var _a25, _b25;
34736
+ return (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.sortBy;
34737
+ });
34738
+ const defaultLabel = computed(() => {
34739
+ var _a25;
34740
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButton;
34741
+ });
34742
+ const activeLabel = computed(() => {
34743
+ var _a25;
34744
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonActive;
34745
+ });
34746
+ const openLabel = computed(() => {
34747
+ var _a25;
34748
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonOpen;
34749
+ });
34750
+ const label = computed(() => {
34751
+ if (isSidebarVisible.value && openLabel.value) {
34752
+ return openLabel.value;
34753
+ }
34754
+ if (hasActiveFilters.value && activeLabel.value) {
34755
+ return activeLabel.value;
34756
+ }
34757
+ return defaultLabel.value;
34758
+ });
34759
+ const sortToggleVisible = computed(() => {
34760
+ var _a25, _b25;
34761
+ return ((_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle) == null ? void 0 : _b25.type) === "drawer";
34762
+ });
34763
+ const handleFilterSidebarToggle = () => {
34764
+ searchResultStore.setSidebarState({
34765
+ visible: !isSidebarVisible.value,
34766
+ disableBodyScrolling: !disableMobileBodyScrollLock.value,
34767
+ sidebar: "filter"
34768
+ });
34769
+ };
34770
+ const handleSortSidebarToggle = () => {
34771
+ searchResultStore.setSidebarState({
34772
+ visible: !isSortingSidebarVisible.value,
34773
+ disableBodyScrolling: !disableMobileBodyScrollLock.value,
34774
+ sidebar: "sorting"
34775
+ });
34776
+ };
34777
+ const hasActiveFilters = computed(() => currentFilterCount.value > 0);
34778
+ const checkCloseOnEscape = (e2) => {
34779
+ var _a25;
34780
+ if (!["Escape", "Esc"].includes((_a25 = e2.key) != null ? _a25 : "")) {
34781
+ return;
34782
+ }
34783
+ if (isSidebarVisible.value) {
34784
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
34785
+ searchResultStore.setSidebarState({ visible: false, sidebar: "filter" });
34786
+ }
34787
+ };
34788
+ onMounted(() => {
34789
+ window.addEventListener("keydown", checkCloseOnEscape);
34790
+ });
34791
+ onBeforeUnmount(() => {
34792
+ window.removeEventListener("keydown", checkCloseOnEscape);
34793
+ });
34794
+ return {
34795
+ isSidebarVisible,
34796
+ label,
34797
+ currentFilterCount,
34798
+ hasActiveFilters,
34799
+ showMobileFilterCount,
34800
+ sortLabel,
34801
+ sortToggleVisible,
34802
+ handleFilterSidebarToggle,
34803
+ handleSortSidebarToggle
34804
+ };
34805
+ };
34806
+ const _hoisted_1$O = {
34807
+ key: 0,
34808
+ class: "lupa-desktop-toggle-filter-count"
34809
+ };
34810
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
34811
+ __name: "DesktopFacetToggle",
34812
+ setup(__props) {
34813
+ const {
34814
+ isSidebarVisible,
34815
+ label,
34816
+ currentFilterCount,
34817
+ hasActiveFilters,
34818
+ showMobileFilterCount,
34819
+ handleFilterSidebarToggle
34820
+ } = useSidebarToggle();
34821
+ return (_ctx, _cache) => {
34822
+ return openBlock(), createElementBlock("div", {
34823
+ class: normalizeClass(["lupa-desktop-toggle", {
34824
+ "lupa-desktop-toggle-filters-empty": unref(currentFilterCount) < 1,
34825
+ "lupa-desktop-toggle-has-filters": unref(hasActiveFilters),
34826
+ "lupa-sidebar-open": unref(isSidebarVisible)
34827
+ }]),
34828
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
34829
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
34830
+ }, [
34831
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
34832
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34833
+ ], 2);
34834
+ };
34835
+ }
34836
+ });
34837
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
34838
+ __name: "DesktopSortToggle",
34839
+ setup(__props) {
34840
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
34841
+ return (_ctx, _cache) => {
34842
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
34843
+ key: 0,
34844
+ class: normalizeClass(["lupa-desktop-toggle lupa-desktop-sort-toggle", {
34845
+ "lupa-sidebar-open": unref(isSidebarVisible)
34846
+ }]),
34847
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
34848
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
34849
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
34850
+ };
34851
+ }
34852
+ });
34853
+ const _hoisted_1$N = { class: "lupa-search-result-facet-section" };
34854
+ const _hoisted_2$z = {
34626
34855
  key: 0,
34627
34856
  class: "lupa-facets-title"
34628
34857
  };
34629
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
34858
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34630
34859
  __name: "FacetList",
34631
34860
  props: {
34632
34861
  options: {},
@@ -34638,6 +34867,7 @@ and ensure you are accounting for this risk.
34638
34867
  emits: ["select", "clear"],
34639
34868
  setup(__props, { emit: __emit }) {
34640
34869
  const props = __props;
34870
+ const { handleFilterSidebarToggle } = useSidebarToggle();
34641
34871
  const emit2 = __emit;
34642
34872
  const currentFiltersValue = computed(() => {
34643
34873
  var _a25;
@@ -34653,6 +34883,12 @@ and ensure you are accounting for this risk.
34653
34883
  return !((_a25 = props.options.exclude) == null ? void 0 : _a25.includes(f2.key));
34654
34884
  }) : facetsValue.value;
34655
34885
  });
34886
+ const displayFacetStyle = computed(() => {
34887
+ if (!props.facetStyle || props.facetStyle === "sidebar") {
34888
+ return "sidebar";
34889
+ }
34890
+ return "top-dropdown";
34891
+ });
34656
34892
  const handleFacetSelect = (facetAction) => {
34657
34893
  emit2("select", facetAction);
34658
34894
  };
@@ -34661,29 +34897,33 @@ and ensure you are accounting for this risk.
34661
34897
  };
34662
34898
  return (_ctx, _cache) => {
34663
34899
  var _a25;
34664
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
34665
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
34900
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
34901
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
34666
34902
  createBaseVNode("div", {
34667
- class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = _ctx.facetStyle) != null ? _a25 : "")])
34903
+ class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = displayFacetStyle.value) != null ? _a25 : "")])
34668
34904
  }, [
34669
34905
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
34670
34906
  var _a26;
34671
- return openBlock(), createBlock(_sfc_main$T, {
34907
+ return openBlock(), createBlock(_sfc_main$Z, {
34672
34908
  key: facet.key,
34673
34909
  facet,
34674
34910
  currentFilters: currentFiltersValue.value,
34675
34911
  options: _ctx.options,
34676
34912
  clearable: (_a26 = _ctx.clearable) != null ? _a26 : false,
34913
+ "current-facet-style": _ctx.facetStyle,
34677
34914
  onSelect: handleFacetSelect,
34678
- onClear: clear
34679
- }, null, 8, ["facet", "currentFilters", "options", "clearable"]);
34680
- }), 128))
34915
+ onClear: clear,
34916
+ onExpand: unref(handleFilterSidebarToggle)
34917
+ }, null, 8, ["facet", "currentFilters", "options", "clearable", "current-facet-style", "onExpand"]);
34918
+ }), 128)),
34919
+ _ctx.facetStyle === "drawer" ? (openBlock(), createBlock(_sfc_main$Y, { key: 0 })) : createCommentVNode("", true),
34920
+ _ctx.facetStyle === "drawer" || _ctx.facetStyle === "top-dropdown" ? (openBlock(), createBlock(_sfc_main$X, { key: 1 })) : createCommentVNode("", true)
34681
34921
  ], 2)
34682
34922
  ]);
34683
34923
  };
34684
34924
  }
34685
34925
  });
34686
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
34926
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34687
34927
  __name: "FacetsButton",
34688
34928
  props: {
34689
34929
  options: {}
@@ -34708,8 +34948,33 @@ and ensure you are accounting for this risk.
34708
34948
  };
34709
34949
  }
34710
34950
  });
34711
- const _hoisted_1$K = { class: "lupa-facets-filter-button-wrapper" };
34712
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34951
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
34952
+ __name: "FacetsClearButton",
34953
+ props: {
34954
+ options: {}
34955
+ },
34956
+ emits: ["clear"],
34957
+ setup(__props, { emit: __emit }) {
34958
+ const props = __props;
34959
+ const emit2 = __emit;
34960
+ const label = computed(() => {
34961
+ var _a25, _b25;
34962
+ return (_b25 = (_a25 = props.options.labels) == null ? void 0 : _a25.facetClearAllButton) != null ? _b25 : "";
34963
+ });
34964
+ const handleClick = () => {
34965
+ emit2("clear");
34966
+ };
34967
+ return (_ctx, _cache) => {
34968
+ return label.value ? (openBlock(), createElementBlock("button", {
34969
+ key: 0,
34970
+ class: "lupa-facets-button-clear",
34971
+ onClick: withModifiers(handleClick, ["stop"])
34972
+ }, toDisplayString(label.value), 1)) : createCommentVNode("", true);
34973
+ };
34974
+ }
34975
+ });
34976
+ const _hoisted_1$M = { class: "lupa-facets-filter-button-wrapper" };
34977
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
34713
34978
  __name: "Facets",
34714
34979
  props: {
34715
34980
  options: {},
@@ -34722,6 +34987,7 @@ and ensure you are accounting for this risk.
34722
34987
  const paramStore = useParamsStore();
34723
34988
  const searchResultStore = useSearchResultStore();
34724
34989
  const optionsStore = useOptionsStore();
34990
+ const { handleFilterSidebarToggle } = useSidebarToggle();
34725
34991
  const { filters } = storeToRefs(paramStore);
34726
34992
  const { facets: facets2, loadingFacets } = storeToRefs(searchResultStore);
34727
34993
  const { searchResultOptions } = storeToRefs(optionsStore);
@@ -34749,7 +35015,7 @@ and ensure you are accounting for this risk.
34749
35015
  };
34750
35016
  });
34751
35017
  const showFilterButton = computed(() => {
34752
- return props.options.filterBehavior === "withFilterButton";
35018
+ return props.options.filterBehavior === "withFilterButton" && props.facetStyle === "sidebar";
34753
35019
  });
34754
35020
  const handleFacetSelect = (facetAction) => {
34755
35021
  switch (facetAction.type) {
@@ -34790,6 +35056,10 @@ and ensure you are accounting for this risk.
34790
35056
  const param = getFacetKey(facet.key, facet.type);
34791
35057
  paramStore.removeParameters({ paramsToRemove: [param] });
34792
35058
  };
35059
+ const clearAll = () => {
35060
+ paramStore.removeAllFilters();
35061
+ handleFilterSidebarToggle();
35062
+ };
34793
35063
  const filter = () => {
34794
35064
  emit2("filter");
34795
35065
  };
@@ -34797,7 +35067,7 @@ and ensure you are accounting for this risk.
34797
35067
  return openBlock(), createElementBlock("div", {
34798
35068
  class: normalizeClass(["lupa-search-result-facets", { "lupa-search-result-facets-loading": unref(loadingFacets) }])
34799
35069
  }, [
34800
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$S, {
35070
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$W, {
34801
35071
  key: 0,
34802
35072
  options: _ctx.options,
34803
35073
  facets: regularFacets.value,
@@ -34807,10 +35077,15 @@ and ensure you are accounting for this risk.
34807
35077
  onSelect: handleFacetSelect,
34808
35078
  onClear: clear
34809
35079
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
34810
- createBaseVNode("div", _hoisted_1$K, [
34811
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$R, {
35080
+ createBaseVNode("div", _hoisted_1$M, [
35081
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$U, {
34812
35082
  key: 0,
34813
35083
  options: _ctx.options,
35084
+ onClear: clearAll
35085
+ }, null, 8, ["options"])) : createCommentVNode("", true),
35086
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$V, {
35087
+ key: 1,
35088
+ options: _ctx.options,
34814
35089
  onFilter: filter
34815
35090
  }, null, 8, ["options"])) : createCommentVNode("", true)
34816
35091
  ])
@@ -34818,16 +35093,17 @@ and ensure you are accounting for this risk.
34818
35093
  };
34819
35094
  }
34820
35095
  });
34821
- const _hoisted_1$J = {
35096
+ const _hoisted_1$L = {
34822
35097
  key: 0,
34823
35098
  id: "lupa-search-result-filters",
34824
35099
  class: "lupa-search-result-filters"
34825
35100
  };
34826
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
35101
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
34827
35102
  __name: "SearchResultsFilters",
34828
35103
  props: {
34829
35104
  options: {},
34830
- expandable: { type: Boolean }
35105
+ expandable: { type: Boolean },
35106
+ style: {}
34831
35107
  },
34832
35108
  emits: ["filter"],
34833
35109
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -34861,40 +35137,37 @@ and ensure you are accounting for this risk.
34861
35137
  __expose({ fetch: fetch2 });
34862
35138
  return (_ctx, _cache) => {
34863
35139
  var _a25;
34864
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
34865
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$_, {
35140
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
35141
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$14, {
34866
35142
  key: 0,
34867
35143
  options: _ctx.options.currentFilters,
34868
35144
  expandable: (_a25 = _ctx.expandable) != null ? _a25 : false
34869
35145
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
34870
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$Y, {
35146
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$12, {
34871
35147
  key: 1,
34872
35148
  options: _ctx.options.categories,
34873
35149
  ref_key: "categoryFilters",
34874
35150
  ref: categoryFilters
34875
35151
  }, null, 8, ["options"])) : createCommentVNode("", true),
34876
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
35152
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
34877
35153
  key: 2,
34878
35154
  options: _ctx.options.facets,
35155
+ "facet-style": _ctx.style,
34879
35156
  onFilter: filter
34880
- }, null, 8, ["options"])) : createCommentVNode("", true)
35157
+ }, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
34881
35158
  ])) : createCommentVNode("", true);
34882
35159
  };
34883
35160
  }
34884
35161
  });
34885
- const _hoisted_1$I = {
34886
- key: 0,
34887
- class: "lupa-mobile-filter-sidebar"
34888
- };
34889
- const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
34890
- const _hoisted_3$o = { class: "lupa-sidebar-top" };
34891
- const _hoisted_4$g = { class: "lupa-sidebar-title" };
34892
- const _hoisted_5$b = {
35162
+ const _hoisted_1$K = { class: "lupa-mobile-sidebar-content" };
35163
+ const _hoisted_2$y = { class: "lupa-sidebar-top" };
35164
+ const _hoisted_3$q = { class: "lupa-sidebar-title" };
35165
+ const _hoisted_4$i = {
34893
35166
  key: 0,
34894
35167
  class: "lupa-sidebar-filter-count"
34895
35168
  };
34896
- const _hoisted_6$5 = { class: "lupa-sidebar-filter-options" };
34897
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
35169
+ const _hoisted_5$c = { class: "lupa-sidebar-filter-options" };
35170
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
34898
35171
  __name: "MobileFilterSidebar",
34899
35172
  props: {
34900
35173
  options: {}
@@ -34903,7 +35176,7 @@ and ensure you are accounting for this risk.
34903
35176
  setup(__props, { emit: __emit }) {
34904
35177
  const props = __props;
34905
35178
  const searchResultStore = useSearchResultStore();
34906
- const { currentFilterCount } = storeToRefs(searchResultStore);
35179
+ const { currentFilterCount, isFilterSidebarVisible, isSidebarClosing } = storeToRefs(searchResultStore);
34907
35180
  const emit2 = __emit;
34908
35181
  const sidebarTitle = computed(() => {
34909
35182
  var _a25, _b25, _c;
@@ -34913,7 +35186,6 @@ and ensure you are accounting for this risk.
34913
35186
  var _a25, _b25;
34914
35187
  return Boolean((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.showFilterCount) && currentFilterCount.value > 0;
34915
35188
  });
34916
- const isMobileSidebarVisible = computed(() => searchResultStore.isMobileSidebarVisible);
34917
35189
  const isActiveFiltersExpanded = computed(() => {
34918
35190
  var _a25, _b25;
34919
35191
  return !((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.activeFiltersExpanded);
@@ -34926,42 +35198,46 @@ and ensure you are accounting for this risk.
34926
35198
  handleMobileToggle();
34927
35199
  };
34928
35200
  return (_ctx, _cache) => {
34929
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
35201
+ return unref(isFilterSidebarVisible) ? (openBlock(), createElementBlock("div", {
35202
+ key: 0,
35203
+ class: normalizeClass(["lupa-mobile-filter-sidebar", { "lupa-mobile-filter-sidebar-is-closing": unref(isSidebarClosing) }])
35204
+ }, [
34930
35205
  createBaseVNode("div", {
34931
35206
  class: "lupa-sidebar-close",
34932
35207
  onClick: withModifiers(handleMobileToggle, ["stop"])
34933
35208
  }),
34934
- createBaseVNode("div", _hoisted_2$w, [
34935
- createBaseVNode("div", _hoisted_3$o, [
34936
- createBaseVNode("div", _hoisted_4$g, [
35209
+ createBaseVNode("div", _hoisted_1$K, [
35210
+ createBaseVNode("div", _hoisted_2$y, [
35211
+ createBaseVNode("div", _hoisted_3$q, [
34937
35212
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
34938
- isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35213
+ isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34939
35214
  ]),
34940
35215
  createBaseVNode("div", {
34941
35216
  class: "lupa-filter-toggle-mobile",
34942
35217
  onClick: handleMobileToggle
34943
35218
  })
34944
35219
  ]),
34945
- createBaseVNode("div", _hoisted_6$5, [
34946
- createVNode(_sfc_main$P, {
35220
+ createBaseVNode("div", _hoisted_5$c, [
35221
+ createVNode(_sfc_main$S, {
34947
35222
  options: _ctx.options,
34948
35223
  expandable: isActiveFiltersExpanded.value,
35224
+ style: "sidebar",
34949
35225
  onFilter: filter
34950
35226
  }, null, 8, ["options", "expandable"])
34951
35227
  ])
34952
35228
  ])
34953
- ])) : createCommentVNode("", true);
35229
+ ], 2)) : createCommentVNode("", true);
34954
35230
  };
34955
35231
  }
34956
35232
  });
34957
- const _hoisted_1$H = { id: "lupa-search-results-breadcrumbs" };
34958
- const _hoisted_2$v = ["href", "onClick"];
34959
- const _hoisted_3$n = {
35233
+ const _hoisted_1$J = { id: "lupa-search-results-breadcrumbs" };
35234
+ const _hoisted_2$x = ["href", "onClick"];
35235
+ const _hoisted_3$p = {
34960
35236
  key: 1,
34961
35237
  class: "lupa-search-results-breadcrumb-text"
34962
35238
  };
34963
- const _hoisted_4$f = { key: 2 };
34964
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
35239
+ const _hoisted_4$h = { key: 2 };
35240
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34965
35241
  __name: "SearchResultsBreadcrumbs",
34966
35242
  props: {
34967
35243
  breadcrumbs: {}
@@ -34986,7 +35262,7 @@ and ensure you are accounting for this risk.
34986
35262
  handleRoutingEvent(link, event, hasEventRouting.value);
34987
35263
  };
34988
35264
  return (_ctx, _cache) => {
34989
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
35265
+ return openBlock(), createElementBlock("div", _hoisted_1$J, [
34990
35266
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
34991
35267
  var _a25;
34992
35268
  return openBlock(), createElementBlock("span", {
@@ -35001,20 +35277,20 @@ and ensure you are accounting for this risk.
35001
35277
  var _a26;
35002
35278
  return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
35003
35279
  }
35004
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
35005
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35280
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$x)) : (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(getLabel(breadcrumb.label)), 1)),
35281
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$h, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35006
35282
  ]);
35007
35283
  }), 128))
35008
35284
  ]);
35009
35285
  };
35010
35286
  }
35011
35287
  });
35012
- const _hoisted_1$G = {
35288
+ const _hoisted_1$I = {
35013
35289
  key: 0,
35014
35290
  id: "lupa-search-result-filters",
35015
35291
  class: "lupa-search-result-filters lupa-search-result-top-filters"
35016
35292
  };
35017
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
35293
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
35018
35294
  __name: "FiltersTopDropdown",
35019
35295
  props: {
35020
35296
  options: {}
@@ -35032,8 +35308,8 @@ and ensure you are accounting for this risk.
35032
35308
  });
35033
35309
  return (_ctx, _cache) => {
35034
35310
  var _a25;
35035
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$G, [
35036
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
35311
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
35312
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
35037
35313
  key: 0,
35038
35314
  options: _ctx.options.facets,
35039
35315
  "facet-style": (_a25 = _ctx.options.facets.style) == null ? void 0 : _a25.type,
@@ -35044,8 +35320,8 @@ and ensure you are accounting for this risk.
35044
35320
  };
35045
35321
  }
35046
35322
  });
35047
- const _hoisted_1$F = { id: "lupa-search-results-layout-selection" };
35048
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
35323
+ const _hoisted_1$H = { id: "lupa-search-results-layout-selection" };
35324
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
35049
35325
  __name: "SearchResultsLayoutSelection",
35050
35326
  setup(__props) {
35051
35327
  const searchResultStore = useSearchResultStore();
@@ -35056,7 +35332,7 @@ and ensure you are accounting for this risk.
35056
35332
  searchResultStore.setLayout(layout2);
35057
35333
  };
35058
35334
  return (_ctx, _cache) => {
35059
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
35335
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
35060
35336
  createBaseVNode("div", {
35061
35337
  class: normalizeClass([
35062
35338
  "lupa-layout-selection-grid",
@@ -35078,64 +35354,38 @@ and ensure you are accounting for this risk.
35078
35354
  };
35079
35355
  }
35080
35356
  });
35081
- const _hoisted_1$E = {
35357
+ const _hoisted_1$G = {
35082
35358
  key: 0,
35083
35359
  class: "lupa-mobile-toggle-filter-count"
35084
35360
  };
35085
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
35361
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
35086
35362
  __name: "SearchResultsMobileToggle",
35087
- props: {
35088
- labels: {},
35089
- showFilterCount: { type: Boolean }
35090
- },
35091
35363
  setup(__props) {
35092
- const props = __props;
35093
- const searchResultStore = useSearchResultStore();
35094
- const optionsStore = useOptionsStore();
35095
- const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
35096
- const { searchResultOptions } = storeToRefs(optionsStore);
35097
- const disableMobileBodyScrollLock = computed(
35098
- () => {
35099
- var _a25, _b25, _c;
35100
- return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
35101
- }
35102
- );
35103
- const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
35104
- const defaultLabel = computed(() => props.labels.mobileFilterButton);
35105
- const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
35106
- const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
35107
- const label = computed(() => {
35108
- if (isSidebarVisible.value && openLabel.value) {
35109
- return openLabel.value;
35110
- }
35111
- if (hasActiveFilters.value && activeLabel.value) {
35112
- return activeLabel.value;
35113
- }
35114
- return defaultLabel.value;
35115
- });
35116
- const handleMobileToggle = () => {
35117
- searchResultStore.setSidebarState({
35118
- visible: !isSidebarVisible.value,
35119
- disableBodyScrolling: !disableMobileBodyScrollLock.value
35120
- });
35121
- };
35122
- const hasActiveFilters = computed(() => currentFilterCount.value > 0);
35364
+ const {
35365
+ isSidebarVisible,
35366
+ label,
35367
+ currentFilterCount,
35368
+ hasActiveFilters,
35369
+ showMobileFilterCount,
35370
+ handleFilterSidebarToggle
35371
+ } = useSidebarToggle();
35123
35372
  return (_ctx, _cache) => {
35124
35373
  return openBlock(), createElementBlock("div", {
35125
35374
  class: normalizeClass(["lupa-mobile-toggle", {
35126
35375
  "lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
35127
- "lupa-mobile-toggle-has-filters": hasActiveFilters.value,
35128
- "lupa-sidebar-open": isSidebarVisible.value
35376
+ "lupa-mobile-toggle-has-filters": unref(hasActiveFilters),
35377
+ "lupa-sidebar-open": unref(isSidebarVisible)
35129
35378
  }]),
35130
- onClick: handleMobileToggle
35379
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
35380
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
35131
35381
  }, [
35132
- createTextVNode(toDisplayString(label.value) + " ", 1),
35133
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$E, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35382
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
35383
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$G, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35134
35384
  ], 2);
35135
35385
  };
35136
35386
  }
35137
35387
  });
35138
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
35388
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
35139
35389
  __name: "SearchResultsMobileFilterClose",
35140
35390
  props: {
35141
35391
  label: {}
@@ -35155,20 +35405,20 @@ and ensure you are accounting for this risk.
35155
35405
  };
35156
35406
  }
35157
35407
  });
35158
- const _hoisted_1$D = {
35408
+ const _hoisted_1$F = {
35159
35409
  key: 0,
35160
35410
  id: "lupa-search-results-page-select",
35161
35411
  "data-cy": "lupa-search-results-page-select"
35162
35412
  };
35163
- const _hoisted_2$u = {
35413
+ const _hoisted_2$w = {
35164
35414
  key: 0,
35165
35415
  class: "lupa-page-number-separator"
35166
35416
  };
35167
- const _hoisted_3$m = {
35417
+ const _hoisted_3$o = {
35168
35418
  key: 0,
35169
35419
  class: "lupa-page-number-separator"
35170
35420
  };
35171
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
35421
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
35172
35422
  __name: "SearchResultsPageSelect",
35173
35423
  props: {
35174
35424
  lastPageLabel: {},
@@ -35263,7 +35513,7 @@ and ensure you are accounting for this risk.
35263
35513
  };
35264
35514
  return (_ctx, _cache) => {
35265
35515
  var _a25;
35266
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35516
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
35267
35517
  showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35268
35518
  key: 0,
35269
35519
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -35287,7 +35537,7 @@ and ensure you are accounting for this risk.
35287
35537
  _: 1,
35288
35538
  __: [4]
35289
35539
  }, 8, ["href"])),
35290
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
35540
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, "...")) : createCommentVNode("", true)
35291
35541
  ], 64)) : createCommentVNode("", true),
35292
35542
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
35293
35543
  return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
@@ -35307,7 +35557,7 @@ and ensure you are accounting for this risk.
35307
35557
  }, 1032, ["href", "onClick", "class"]);
35308
35558
  }), 128)),
35309
35559
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
35310
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
35560
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$o, "...")) : createCommentVNode("", true),
35311
35561
  (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35312
35562
  href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
35313
35563
  class: "lupa-page-number lupa-page-number-last",
@@ -35338,18 +35588,18 @@ and ensure you are accounting for this risk.
35338
35588
  };
35339
35589
  }
35340
35590
  });
35341
- const _hoisted_1$C = {
35591
+ const _hoisted_1$E = {
35342
35592
  id: "lupa-search-results-page-size",
35343
35593
  "data-cy": "lupa-search-results-page-size"
35344
35594
  };
35345
- const _hoisted_2$t = { id: "lupa-select" };
35346
- const _hoisted_3$l = {
35595
+ const _hoisted_2$v = { id: "lupa-select" };
35596
+ const _hoisted_3$n = {
35347
35597
  class: "lupa-select-label",
35348
35598
  for: "lupa-page-size-select-dropdown"
35349
35599
  };
35350
- const _hoisted_4$e = ["aria-label"];
35351
- const _hoisted_5$a = ["value"];
35352
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
35600
+ const _hoisted_4$g = ["aria-label"];
35601
+ const _hoisted_5$b = ["value"];
35602
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
35353
35603
  __name: "SearchResultsPageSize",
35354
35604
  props: {
35355
35605
  labels: {},
@@ -35379,9 +35629,9 @@ and ensure you are accounting for this risk.
35379
35629
  };
35380
35630
  return (_ctx, _cache) => {
35381
35631
  var _a25, _b25, _c;
35382
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
35383
- createBaseVNode("div", _hoisted_2$t, [
35384
- createBaseVNode("label", _hoisted_3$l, toDisplayString(label.value), 1),
35632
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
35633
+ createBaseVNode("div", _hoisted_2$v, [
35634
+ createBaseVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
35385
35635
  createBaseVNode("select", {
35386
35636
  id: "lupa-page-size-select-dropdown",
35387
35637
  class: "lupa-select-dropdown",
@@ -35395,110 +35645,161 @@ and ensure you are accounting for this risk.
35395
35645
  return openBlock(), createElementBlock("option", {
35396
35646
  key: option,
35397
35647
  value: option
35398
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
35648
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$b);
35399
35649
  }), 128))
35400
- ], 40, _hoisted_4$e)
35650
+ ], 40, _hoisted_4$g)
35401
35651
  ])
35402
35652
  ]);
35403
35653
  };
35404
35654
  }
35405
35655
  });
35406
- const _hoisted_1$B = {
35656
+ const useSorting = () => {
35657
+ const paramStore = useParamsStore();
35658
+ const optionStore = useOptionsStore();
35659
+ const { sort } = storeToRefs(paramStore);
35660
+ const { ariaLabels, searchResultOptions } = storeToRefs(optionStore);
35661
+ const selectedKey = ref("");
35662
+ const previousKey = ref("");
35663
+ const sortStyle = computed(() => {
35664
+ return searchResultOptions.value.sortStyle;
35665
+ });
35666
+ const sortOptions = computed(() => {
35667
+ return searchResultOptions.value.sort;
35668
+ });
35669
+ const callbacks = computed(() => {
35670
+ return searchResultOptions.value.callbacks;
35671
+ });
35672
+ const sotyByTitleLabel = computed(() => {
35673
+ var _a25;
35674
+ return (_a25 = searchResultOptions.value.labels) == null ? void 0 : _a25.sortBy;
35675
+ });
35676
+ const sortItems = computed(() => {
35677
+ if (sortOptions.value && sortOptions.value.length) {
35678
+ return sortOptions.value;
35679
+ } else {
35680
+ return [];
35681
+ }
35682
+ });
35683
+ const defaultSortValue = computed(() => {
35684
+ var _a25, _b25, _c;
35685
+ return (_c = (_a25 = sortOptions.value) == null ? void 0 : _a25.find((x) => x.default)) != null ? _c : (_b25 = sortItems.value) == null ? void 0 : _b25[0];
35686
+ });
35687
+ const setSortValue = () => {
35688
+ var _a25, _b25;
35689
+ const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
35690
+ selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
35691
+ previousKey.value = selectedKey.value;
35692
+ };
35693
+ watch(sort, () => setSortValue());
35694
+ const handleSelect = () => {
35695
+ var _a25, _b25, _c;
35696
+ const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
35697
+ if (!value) {
35698
+ return;
35699
+ }
35700
+ paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
35701
+ (_c = (_b25 = callbacks.value) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
35702
+ paramStore.appendParams({
35703
+ params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
35704
+ paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
35705
+ });
35706
+ previousKey.value = selectedKey.value;
35707
+ };
35708
+ return {
35709
+ sotyByTitleLabel,
35710
+ sortItems,
35711
+ selectedKey,
35712
+ ariaLabels,
35713
+ sortOptions,
35714
+ sortStyle,
35715
+ handleSelect,
35716
+ setSortValue
35717
+ };
35718
+ };
35719
+ const _hoisted_1$D = {
35720
+ key: 0,
35407
35721
  id: "lupa-search-results-sort",
35408
35722
  class: "lupa-search-results-sort"
35409
35723
  };
35410
- const _hoisted_2$s = { id: "lupa-select" };
35411
- const _hoisted_3$k = {
35724
+ const _hoisted_2$u = { id: "lupa-select" };
35725
+ const _hoisted_3$m = {
35412
35726
  class: "lupa-select-label",
35413
35727
  for: "lupa-sort-select-dropdown"
35414
35728
  };
35415
- const _hoisted_4$d = ["aria-label"];
35416
- const _hoisted_5$9 = ["value"];
35417
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
35729
+ const _hoisted_4$f = ["aria-label"];
35730
+ const _hoisted_5$a = ["value"];
35731
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
35418
35732
  __name: "SearchResultsSort",
35419
- props: {
35420
- options: {},
35421
- callbacks: {}
35422
- },
35423
35733
  setup(__props) {
35424
- const props = __props;
35425
- const paramStore = useParamsStore();
35426
- const optionStore = useOptionsStore();
35427
- const { sort } = storeToRefs(paramStore);
35428
- const { ariaLabels } = storeToRefs(optionStore);
35429
- const selectedKey = ref("");
35430
- const previousKey = ref("");
35431
- const sortItems = computed(() => {
35432
- if (props.options.options && props.options.options.length) {
35433
- return props.options.options;
35434
- } else {
35435
- return [];
35436
- }
35437
- });
35438
- const defaultSortValue = computed(() => {
35439
- var _a25;
35440
- return (_a25 = props.options.options.find((x) => x.default)) != null ? _a25 : props.options.options[0];
35441
- });
35442
- const setSortValue = () => {
35443
- var _a25, _b25;
35444
- const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
35445
- selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
35446
- previousKey.value = selectedKey.value;
35447
- };
35448
- watch(sort, () => setSortValue());
35734
+ const {
35735
+ sortItems,
35736
+ selectedKey,
35737
+ ariaLabels,
35738
+ sotyByTitleLabel,
35739
+ sortStyle,
35740
+ handleSelect,
35741
+ setSortValue
35742
+ } = useSorting();
35449
35743
  onMounted(() => {
35450
35744
  setSortValue();
35451
35745
  });
35452
- const handleSelect = () => {
35453
- var _a25, _b25, _c;
35454
- const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
35455
- if (!value) {
35456
- return;
35457
- }
35458
- paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
35459
- (_c = (_b25 = props.callbacks) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
35460
- paramStore.appendParams({
35461
- params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
35462
- paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
35463
- });
35464
- previousKey.value = selectedKey.value;
35465
- };
35746
+ const showDefaultSort = computed(() => {
35747
+ var _a25;
35748
+ return !sortStyle.value || ((_a25 = sortStyle.value) == null ? void 0 : _a25.type) !== "drawer";
35749
+ });
35466
35750
  return (_ctx, _cache) => {
35467
35751
  var _a25, _b25;
35468
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
35469
- createBaseVNode("div", _hoisted_2$s, [
35470
- createBaseVNode("label", _hoisted_3$k, toDisplayString(_ctx.options.label), 1),
35752
+ return showDefaultSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35753
+ createBaseVNode("div", _hoisted_2$u, [
35754
+ createBaseVNode("label", _hoisted_3$m, toDisplayString(unref(sotyByTitleLabel)), 1),
35471
35755
  withDirectives(createBaseVNode("select", {
35472
35756
  id: "lupa-sort-select-dropdown",
35473
35757
  class: "lupa-select-dropdown",
35474
- "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : _ctx.options.label,
35758
+ "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : unref(sotyByTitleLabel),
35475
35759
  "data-cy": "lupa-sort-select-dropdown",
35476
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
35477
- onChange: handleSelect,
35760
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectedKey) ? selectedKey.value = $event : null),
35761
+ onChange: _cache[1] || (_cache[1] = //@ts-ignore
35762
+ (...args) => unref(handleSelect) && unref(handleSelect)(...args)),
35478
35763
  ref: "select"
35479
35764
  }, [
35480
- (openBlock(true), createElementBlock(Fragment, null, renderList(sortItems.value, (option) => {
35765
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
35481
35766
  return openBlock(), createElementBlock("option", {
35482
35767
  key: option.key,
35483
35768
  value: option.key
35484
- }, toDisplayString(option.label), 9, _hoisted_5$9);
35769
+ }, toDisplayString(option.label), 9, _hoisted_5$a);
35485
35770
  }), 128))
35486
- ], 40, _hoisted_4$d), [
35487
- [vModelSelect, selectedKey.value]
35771
+ ], 40, _hoisted_4$f), [
35772
+ [vModelSelect, unref(selectedKey)]
35488
35773
  ])
35489
35774
  ])
35490
- ]);
35775
+ ])) : createCommentVNode("", true);
35776
+ };
35777
+ }
35778
+ });
35779
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35780
+ __name: "SearchResultsSortDrawerToggle",
35781
+ setup(__props) {
35782
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
35783
+ return (_ctx, _cache) => {
35784
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
35785
+ key: 0,
35786
+ class: normalizeClass(["lupa-mobile-toggle lupa-mobile-sort-toggle", {
35787
+ "lupa-sidebar-open": unref(isSidebarVisible)
35788
+ }]),
35789
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
35790
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
35791
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
35491
35792
  };
35492
35793
  }
35493
35794
  });
35494
- const _hoisted_1$A = { class: "lupa-toolbar-left" };
35495
- const _hoisted_2$r = {
35795
+ const _hoisted_1$C = { class: "lupa-toolbar-left" };
35796
+ const _hoisted_2$t = {
35496
35797
  key: 0,
35497
35798
  class: "lupa-toolbar-right-title"
35498
35799
  };
35499
- const _hoisted_3$j = { key: 2 };
35500
- const _hoisted_4$c = { key: 4 };
35501
- const _hoisted_5$8 = { key: 6 };
35800
+ const _hoisted_3$l = { key: 2 };
35801
+ const _hoisted_4$e = { key: 4 };
35802
+ const _hoisted_5$9 = { key: 6 };
35502
35803
  const _hoisted_6$4 = { class: "lupa-toolbar-right" };
35503
35804
  const _hoisted_7$2 = {
35504
35805
  key: 0,
@@ -35506,7 +35807,7 @@ and ensure you are accounting for this risk.
35506
35807
  };
35507
35808
  const _hoisted_8 = { key: 2 };
35508
35809
  const _hoisted_9 = { key: 4 };
35509
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
35810
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
35510
35811
  __name: "SearchResultsToolbar",
35511
35812
  props: {
35512
35813
  options: {},
@@ -35522,7 +35823,7 @@ and ensure you are accounting for this risk.
35522
35823
  const searchResultStore = useSearchResultStore();
35523
35824
  const optionsStore = useOptionsStore();
35524
35825
  const { page, limit } = storeToRefs(paramStore);
35525
- const { hasAnyFilter, searchResult, isMobileSidebarVisible } = storeToRefs(searchResultStore);
35826
+ const { hasAnyFilter, searchResult, isFilterSidebarVisible } = storeToRefs(searchResultStore);
35526
35827
  const { currentResolutionPageSizes } = storeToRefs(optionsStore);
35527
35828
  const isBottomLocation = computed(() => {
35528
35829
  return props.paginationLocation === "bottom";
@@ -35600,7 +35901,7 @@ and ensure you are accounting for this risk.
35600
35901
  var _a25;
35601
35902
  return (_a25 = optionsValue.value.labels.toolbarRightLabel) != null ? _a25 : "";
35602
35903
  });
35603
- const showMobileFilterCount = computed(() => {
35904
+ computed(() => {
35604
35905
  var _a25, _b25, _c;
35605
35906
  return Boolean((_c = (_b25 = (_a25 = optionsValue.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount);
35606
35907
  });
@@ -35619,39 +35920,37 @@ and ensure you are accounting for this risk.
35619
35920
  id: "lupa-search-results-toolbar",
35620
35921
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
35621
35922
  }, [
35622
- createBaseVNode("div", _hoisted_1$A, [
35623
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
35624
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$L, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$j)),
35625
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$11, {
35923
+ createBaseVNode("div", _hoisted_1$C, [
35924
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
35925
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$O, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$l)),
35926
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$17, {
35626
35927
  key: 3,
35627
35928
  label: searchSummaryLabel.value,
35628
35929
  clearable: unref(hasAnyFilter) && showFilterClear.value,
35629
35930
  onClear: handleClearAll
35630
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
35631
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
35931
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$e)),
35932
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$L, {
35632
35933
  key: 5,
35633
35934
  options: paginationOptions.value.pageSelect,
35634
35935
  "last-page-label": paginationOptions.value.labels.showMore,
35635
35936
  "first-page-label": paginationOptions.value.labels.showLess
35636
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
35937
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$9))
35637
35938
  ]),
35638
35939
  createBaseVNode("div", _hoisted_6$4, [
35639
35940
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
35640
- createVNode(_sfc_main$K, {
35641
- labels: optionsValue.value.labels,
35642
- "show-filter-count": showMobileFilterCount.value
35643
- }, null, 8, ["labels", "show-filter-count"]),
35644
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$H, {
35941
+ createVNode(_sfc_main$N),
35942
+ createVNode(_sfc_main$I),
35943
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$K, {
35645
35944
  key: 1,
35646
35945
  options: paginationOptions.value.pageSize,
35647
35946
  labels: paginationOptions.value.labels
35648
35947
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
35649
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$G, {
35948
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$J, {
35650
35949
  key: 3,
35651
35950
  options: sortOptions.value,
35652
35951
  callbacks: callbacks.value
35653
35952
  }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9)),
35654
- showFiltersCloseButton.value && unref(isMobileSidebarVisible) ? (openBlock(), createBlock(_sfc_main$J, {
35953
+ showFiltersCloseButton.value && unref(isFilterSidebarVisible) ? (openBlock(), createBlock(_sfc_main$M, {
35655
35954
  key: 5,
35656
35955
  label: optionsValue.value.labels.mobileFilterCloseButton
35657
35956
  }, null, 8, ["label"])) : createCommentVNode("", true)
@@ -35660,7 +35959,7 @@ and ensure you are accounting for this risk.
35660
35959
  };
35661
35960
  }
35662
35961
  });
35663
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
35962
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
35664
35963
  __name: "SearchResultsProductImage",
35665
35964
  props: {
35666
35965
  item: {},
@@ -35668,7 +35967,7 @@ and ensure you are accounting for this risk.
35668
35967
  },
35669
35968
  setup(__props) {
35670
35969
  return (_ctx, _cache) => {
35671
- return openBlock(), createBlock(_sfc_main$1q, {
35970
+ return openBlock(), createBlock(_sfc_main$1w, {
35672
35971
  item: _ctx.item,
35673
35972
  options: _ctx.options,
35674
35973
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -35677,16 +35976,16 @@ and ensure you are accounting for this risk.
35677
35976
  };
35678
35977
  }
35679
35978
  });
35680
- const _hoisted_1$z = ["title", "innerHTML"];
35681
- const _hoisted_2$q = ["title"];
35682
- const _hoisted_3$i = ["href", "innerHTML"];
35683
- const _hoisted_4$b = ["title"];
35684
- const _hoisted_5$7 = {
35979
+ const _hoisted_1$B = ["title", "innerHTML"];
35980
+ const _hoisted_2$s = ["title"];
35981
+ const _hoisted_3$k = ["href", "innerHTML"];
35982
+ const _hoisted_4$d = ["title"];
35983
+ const _hoisted_5$8 = {
35685
35984
  key: 0,
35686
35985
  class: "lupa-search-results-product-title-text"
35687
35986
  };
35688
35987
  const _hoisted_6$3 = ["href"];
35689
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
35988
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35690
35989
  __name: "SearchResultsProductTitle",
35691
35990
  props: {
35692
35991
  item: {},
@@ -35723,7 +36022,7 @@ and ensure you are accounting for this risk.
35723
36022
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35724
36023
  title: sanitizedTitle.value,
35725
36024
  innerHTML: sanitizedTitle.value
35726
- }, null, 12, _hoisted_1$z)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
36025
+ }, null, 12, _hoisted_1$B)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
35727
36026
  key: 1,
35728
36027
  class: "lupa-search-results-product-title",
35729
36028
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -35734,26 +36033,26 @@ and ensure you are accounting for this risk.
35734
36033
  class: "lupa-search-results-product-title-text lupa-title-link",
35735
36034
  innerHTML: sanitizedTitle.value,
35736
36035
  onClick: handleNavigation
35737
- }, null, 8, _hoisted_3$i)
35738
- ], 12, _hoisted_2$q)) : (openBlock(), createElementBlock("div", {
36036
+ }, null, 8, _hoisted_3$k)
36037
+ ], 12, _hoisted_2$s)) : (openBlock(), createElementBlock("div", {
35739
36038
  key: 2,
35740
36039
  class: "lupa-search-results-product-title",
35741
36040
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35742
36041
  title: title.value
35743
36042
  }, [
35744
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
36043
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(title.value), 1)) : createCommentVNode("", true),
35745
36044
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
35746
36045
  key: 1,
35747
36046
  href: _ctx.link,
35748
36047
  class: "lupa-search-results-product-title-text lupa-title-link",
35749
36048
  onClick: handleNavigation
35750
36049
  }, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
35751
- ], 12, _hoisted_4$b));
36050
+ ], 12, _hoisted_4$d));
35752
36051
  };
35753
36052
  }
35754
36053
  });
35755
- const _hoisted_1$y = ["innerHTML"];
35756
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
36054
+ const _hoisted_1$A = ["innerHTML"];
36055
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
35757
36056
  __name: "SearchResultsProductDescription",
35758
36057
  props: {
35759
36058
  item: {},
@@ -35780,7 +36079,7 @@ and ensure you are accounting for this risk.
35780
36079
  class: "lupa-search-results-product-description",
35781
36080
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35782
36081
  innerHTML: sanitizedDescription.value
35783
- }, null, 12, _hoisted_1$y)) : (openBlock(), createElementBlock("div", {
36082
+ }, null, 12, _hoisted_1$A)) : (openBlock(), createElementBlock("div", {
35784
36083
  key: 1,
35785
36084
  class: "lupa-search-results-product-description",
35786
36085
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -35788,15 +36087,15 @@ and ensure you are accounting for this risk.
35788
36087
  };
35789
36088
  }
35790
36089
  });
35791
- const _hoisted_1$x = { id: "lupa-search-results-rating" };
35792
- const _hoisted_2$p = { class: "lupa-ratings" };
35793
- const _hoisted_3$h = { class: "lupa-ratings-base" };
35794
- const _hoisted_4$a = ["innerHTML"];
35795
- const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
36090
+ const _hoisted_1$z = { id: "lupa-search-results-rating" };
36091
+ const _hoisted_2$r = { class: "lupa-ratings" };
36092
+ const _hoisted_3$j = { class: "lupa-ratings-base" };
36093
+ const _hoisted_4$c = ["innerHTML"];
36094
+ const _hoisted_5$7 = { class: "lupa-rating-wrapper" };
35796
36095
  const _hoisted_6$2 = ["innerHTML"];
35797
36096
  const _hoisted_7$1 = ["href"];
35798
36097
  const STAR_COUNT = 5;
35799
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
36098
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
35800
36099
  __name: "SearchResultsProductRating",
35801
36100
  props: {
35802
36101
  item: {},
@@ -35833,18 +36132,18 @@ and ensure you are accounting for this risk.
35833
36132
  return generateLink(props.options.links.ratingDetails, props.item);
35834
36133
  });
35835
36134
  return (_ctx, _cache) => {
35836
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
35837
- createBaseVNode("div", _hoisted_2$p, [
35838
- createBaseVNode("div", _hoisted_3$h, [
36135
+ return openBlock(), createElementBlock("div", _hoisted_1$z, [
36136
+ createBaseVNode("div", _hoisted_2$r, [
36137
+ createBaseVNode("div", _hoisted_3$j, [
35839
36138
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
35840
36139
  return openBlock(), createElementBlock("div", {
35841
36140
  key: index,
35842
36141
  innerHTML: star,
35843
36142
  class: "lupa-rating lupa-rating-not-highlighted"
35844
- }, null, 8, _hoisted_4$a);
36143
+ }, null, 8, _hoisted_4$c);
35845
36144
  }), 128))
35846
36145
  ]),
35847
- createBaseVNode("div", _hoisted_5$6, [
36146
+ createBaseVNode("div", _hoisted_5$7, [
35848
36147
  createBaseVNode("div", {
35849
36148
  class: "lupa-ratings-highlighted",
35850
36149
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -35867,11 +36166,11 @@ and ensure you are accounting for this risk.
35867
36166
  };
35868
36167
  }
35869
36168
  });
35870
- const _hoisted_1$w = {
36169
+ const _hoisted_1$y = {
35871
36170
  class: "lupa-search-results-product-regular-price",
35872
36171
  "data-cy": "lupa-search-results-product-regular-price"
35873
36172
  };
35874
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
36173
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
35875
36174
  __name: "SearchResultsProductRegularPrice",
35876
36175
  props: {
35877
36176
  item: {},
@@ -35893,11 +36192,11 @@ and ensure you are accounting for this risk.
35893
36192
  );
35894
36193
  });
35895
36194
  return (_ctx, _cache) => {
35896
- return openBlock(), createElementBlock("div", _hoisted_1$w, toDisplayString(price.value), 1);
36195
+ return openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(price.value), 1);
35897
36196
  };
35898
36197
  }
35899
36198
  });
35900
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
36199
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
35901
36200
  __name: "SearchResultsProductPrice",
35902
36201
  props: {
35903
36202
  item: {},
@@ -35931,12 +36230,12 @@ and ensure you are accounting for this risk.
35931
36230
  };
35932
36231
  }
35933
36232
  });
35934
- const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
35935
- const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
35936
- const _hoisted_3$g = ["disabled"];
35937
- const _hoisted_4$9 = ["href"];
35938
- const _hoisted_5$5 = ["id", "disabled"];
35939
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
36233
+ const _hoisted_1$x = { class: "lupa-search-results-add-to-cart-wrapper" };
36234
+ const _hoisted_2$q = { class: "lupa-search-results-product-addtocart" };
36235
+ const _hoisted_3$i = ["disabled"];
36236
+ const _hoisted_4$b = ["href"];
36237
+ const _hoisted_5$6 = ["id", "disabled"];
36238
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
35940
36239
  __name: "SearchResultsProductAddToCart",
35941
36240
  props: {
35942
36241
  item: {},
@@ -35995,16 +36294,16 @@ and ensure you are accounting for this risk.
35995
36294
  loading.value = false;
35996
36295
  });
35997
36296
  return (_ctx, _cache) => {
35998
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
35999
- createBaseVNode("div", _hoisted_2$o, [
36297
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
36298
+ createBaseVNode("div", _hoisted_2$q, [
36000
36299
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
36001
36300
  key: 0,
36002
36301
  class: addToCartButtonClass.value,
36003
36302
  "data-cy": "lupa-add-to-cart",
36004
36303
  disabled: !inStockValue.value || loading.value
36005
36304
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
36006
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
36007
- ], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
36305
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$b)
36306
+ ], 16, _hoisted_3$i)) : (openBlock(), createElementBlock("button", mergeProps({
36008
36307
  key: 1,
36009
36308
  id: id.value,
36010
36309
  class: addToCartButtonClass.value,
@@ -36012,18 +36311,18 @@ and ensure you are accounting for this risk.
36012
36311
  disabled: !inStockValue.value || loading.value
36013
36312
  }, _ctx.dynamicAttributes, {
36014
36313
  onClick: withModifiers(handleClick, ["stop"])
36015
- }), toDisplayString(label.value), 17, _hoisted_5$5))
36314
+ }), toDisplayString(label.value), 17, _hoisted_5$6))
36016
36315
  ])
36017
36316
  ]);
36018
36317
  };
36019
36318
  }
36020
36319
  });
36021
- const _hoisted_1$u = ["innerHTML"];
36022
- const _hoisted_2$n = { key: 0 };
36023
- const _hoisted_3$f = { key: 1 };
36024
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
36025
- const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
36026
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
36320
+ const _hoisted_1$w = ["innerHTML"];
36321
+ const _hoisted_2$p = { key: 0 };
36322
+ const _hoisted_3$h = { key: 1 };
36323
+ const _hoisted_4$a = { class: "lupa-search-box-custom-label" };
36324
+ const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
36325
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
36027
36326
  __name: "SearchResultsProductCustom",
36028
36327
  props: {
36029
36328
  item: {},
@@ -36065,20 +36364,20 @@ and ensure you are accounting for this risk.
36065
36364
  key: 0,
36066
36365
  class: className.value,
36067
36366
  innerHTML: text.value
36068
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$u)) : (openBlock(), createElementBlock("div", mergeProps({
36367
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$w)) : (openBlock(), createElementBlock("div", mergeProps({
36069
36368
  key: 1,
36070
36369
  class: className.value
36071
36370
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
36072
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
36073
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
36074
- createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
36371
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$h, [
36372
+ createBaseVNode("div", _hoisted_4$a, toDisplayString(label.value), 1),
36373
+ createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
36075
36374
  ]))
36076
36375
  ], 16));
36077
36376
  };
36078
36377
  }
36079
36378
  });
36080
- const _hoisted_1$t = ["innerHTML"];
36081
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
36379
+ const _hoisted_1$v = ["innerHTML"];
36380
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
36082
36381
  __name: "SearchResultsProductCustomHtmlElement",
36083
36382
  props: {
36084
36383
  item: {},
@@ -36114,15 +36413,15 @@ and ensure you are accounting for this risk.
36114
36413
  return openBlock(), createElementBlock("div", mergeProps({
36115
36414
  class: className.value,
36116
36415
  innerHTML: text.value
36117
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$t);
36416
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$v);
36118
36417
  };
36119
36418
  }
36120
36419
  });
36121
- const _hoisted_1$s = { id: "lupa-search-results-rating" };
36122
- const _hoisted_2$m = ["innerHTML"];
36123
- const _hoisted_3$e = { class: "lupa-ratings" };
36124
- const _hoisted_4$7 = ["href"];
36125
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
36420
+ const _hoisted_1$u = { id: "lupa-search-results-rating" };
36421
+ const _hoisted_2$o = ["innerHTML"];
36422
+ const _hoisted_3$g = { class: "lupa-ratings" };
36423
+ const _hoisted_4$9 = ["href"];
36424
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
36126
36425
  __name: "SearchResultsProductSingleStarRating",
36127
36426
  props: {
36128
36427
  item: {},
@@ -36150,35 +36449,35 @@ and ensure you are accounting for this risk.
36150
36449
  return RATING_STAR_HTML;
36151
36450
  });
36152
36451
  return (_ctx, _cache) => {
36153
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
36452
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
36154
36453
  createBaseVNode("div", {
36155
36454
  innerHTML: star.value,
36156
36455
  class: "lupa-rating lupa-rating-highlighted"
36157
- }, null, 8, _hoisted_2$m),
36158
- createBaseVNode("div", _hoisted_3$e, toDisplayString(rating.value), 1),
36456
+ }, null, 8, _hoisted_2$o),
36457
+ createBaseVNode("div", _hoisted_3$g, toDisplayString(rating.value), 1),
36159
36458
  createBaseVNode("a", {
36160
36459
  href: ratingLink.value,
36161
36460
  class: "lupa-total-ratings"
36162
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
36461
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$9)
36163
36462
  ]);
36164
36463
  };
36165
36464
  }
36166
36465
  });
36167
36466
  const __default__ = {
36168
36467
  components: {
36169
- SearchResultsProductImage: _sfc_main$E,
36170
- SearchResultsProductTitle: _sfc_main$D,
36171
- SearchResultsProductDescription: _sfc_main$C,
36172
- SearchResultsProductRating: _sfc_main$B,
36173
- SearchResultsProductRegularPrice: _sfc_main$A,
36174
- SearchResultsProductPrice: _sfc_main$z,
36175
- SearchResultsProductAddToCart: _sfc_main$y,
36176
- SearchResultsProductCustom: _sfc_main$x,
36177
- SearchResultsProductCustomHtmlElement: _sfc_main$w,
36178
- SearchResultsProductSingleStarRating: _sfc_main$v
36179
- }
36180
- };
36181
- const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
36468
+ SearchResultsProductImage: _sfc_main$G,
36469
+ SearchResultsProductTitle: _sfc_main$F,
36470
+ SearchResultsProductDescription: _sfc_main$E,
36471
+ SearchResultsProductRating: _sfc_main$D,
36472
+ SearchResultsProductRegularPrice: _sfc_main$C,
36473
+ SearchResultsProductPrice: _sfc_main$B,
36474
+ SearchResultsProductAddToCart: _sfc_main$A,
36475
+ SearchResultsProductCustom: _sfc_main$z,
36476
+ SearchResultsProductCustomHtmlElement: _sfc_main$y,
36477
+ SearchResultsProductSingleStarRating: _sfc_main$x
36478
+ }
36479
+ };
36480
+ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
36182
36481
  __name: "SearchResultsProductCardElement",
36183
36482
  props: {
36184
36483
  item: {},
@@ -36256,13 +36555,13 @@ and ensure you are accounting for this risk.
36256
36555
  };
36257
36556
  }
36258
36557
  }));
36259
- const _hoisted_1$r = ["href"];
36260
- const _hoisted_2$l = {
36558
+ const _hoisted_1$t = ["href"];
36559
+ const _hoisted_2$n = {
36261
36560
  key: 0,
36262
36561
  class: "lupa-out-of-stock"
36263
36562
  };
36264
- const _hoisted_3$d = { class: "lupa-search-result-product-details-section" };
36265
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
36563
+ const _hoisted_3$f = { class: "lupa-search-result-product-details-section" };
36564
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
36266
36565
  __name: "SearchResultsProductCard",
36267
36566
  props: {
36268
36567
  product: {},
@@ -36438,7 +36737,7 @@ and ensure you are accounting for this risk.
36438
36737
  default: withCtx(() => {
36439
36738
  var _a25;
36440
36739
  return [
36441
- createVNode(_sfc_main$1a, { options: badgesOptions.value }, null, 8, ["options"]),
36740
+ createVNode(_sfc_main$1g, { options: badgesOptions.value }, null, 8, ["options"]),
36442
36741
  createBaseVNode("div", {
36443
36742
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
36444
36743
  }, [
@@ -36448,7 +36747,7 @@ and ensure you are accounting for this risk.
36448
36747
  onClick: handleNavigation
36449
36748
  }, [
36450
36749
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
36451
- return openBlock(), createBlock(_sfc_main$u, {
36750
+ return openBlock(), createBlock(_sfc_main$w, {
36452
36751
  class: "lupa-search-results-product-element",
36453
36752
  item: _ctx.product,
36454
36753
  element,
@@ -36459,16 +36758,16 @@ and ensure you are accounting for this risk.
36459
36758
  onProductEvent: handleProductEvent
36460
36759
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
36461
36760
  }), 128)),
36462
- createVNode(_sfc_main$1a, {
36761
+ createVNode(_sfc_main$1g, {
36463
36762
  options: badgesOptions.value,
36464
36763
  position: "image",
36465
36764
  class: "lupa-image-badges"
36466
36765
  }, null, 8, ["options"]),
36467
- ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
36468
- ], 8, _hoisted_1$r),
36469
- createBaseVNode("div", _hoisted_3$d, [
36766
+ ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
36767
+ ], 8, _hoisted_1$t),
36768
+ createBaseVNode("div", _hoisted_3$f, [
36470
36769
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
36471
- return openBlock(), createBlock(_sfc_main$u, {
36770
+ return openBlock(), createBlock(_sfc_main$w, {
36472
36771
  class: "lupa-search-results-product-element",
36473
36772
  item: _ctx.product,
36474
36773
  element,
@@ -36486,7 +36785,7 @@ and ensure you are accounting for this risk.
36486
36785
  class: normalizeClass("lupa-element-group-" + group)
36487
36786
  }, [
36488
36787
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
36489
- return openBlock(), createBlock(_sfc_main$u, {
36788
+ return openBlock(), createBlock(_sfc_main$w, {
36490
36789
  class: "lupa-search-results-product-element",
36491
36790
  item: _ctx.product,
36492
36791
  element,
@@ -36507,23 +36806,23 @@ and ensure you are accounting for this risk.
36507
36806
  };
36508
36807
  }
36509
36808
  });
36510
- const _hoisted_1$q = {
36809
+ const _hoisted_1$s = {
36511
36810
  id: "lupa-search-results-similar-queries",
36512
36811
  "data-cy": "lupa-search-results-similar-queries"
36513
36812
  };
36514
- const _hoisted_2$k = { class: "lupa-similar-queries-label" };
36515
- const _hoisted_3$c = {
36813
+ const _hoisted_2$m = { class: "lupa-similar-queries-label" };
36814
+ const _hoisted_3$e = {
36516
36815
  class: "lupa-similar-query-label",
36517
36816
  "data-cy": "lupa-similar-query-label"
36518
36817
  };
36519
- const _hoisted_4$6 = ["onClick"];
36520
- const _hoisted_5$3 = ["innerHTML"];
36818
+ const _hoisted_4$8 = ["onClick"];
36819
+ const _hoisted_5$4 = ["innerHTML"];
36521
36820
  const _hoisted_6$1 = { key: 0 };
36522
36821
  const _hoisted_7 = {
36523
36822
  class: "lupa-products",
36524
36823
  "data-cy": "lupa-products"
36525
36824
  };
36526
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
36825
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
36527
36826
  __name: "SearchResultsSimilarQueries",
36528
36827
  props: {
36529
36828
  labels: {},
@@ -36561,11 +36860,11 @@ and ensure you are accounting for this risk.
36561
36860
  };
36562
36861
  };
36563
36862
  return (_ctx, _cache) => {
36564
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
36565
- createBaseVNode("div", _hoisted_2$k, toDisplayString(_ctx.labels.similarQueries), 1),
36863
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
36864
+ createBaseVNode("div", _hoisted_2$m, toDisplayString(_ctx.labels.similarQueries), 1),
36566
36865
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
36567
36866
  return openBlock(), createElementBlock("div", { key: index }, [
36568
- createBaseVNode("div", _hoisted_3$c, [
36867
+ createBaseVNode("div", _hoisted_3$e, [
36569
36868
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
36570
36869
  createBaseVNode("span", {
36571
36870
  id: "lupa-similar-query-text-component",
@@ -36575,13 +36874,13 @@ and ensure you are accounting for this risk.
36575
36874
  }, [
36576
36875
  createBaseVNode("span", {
36577
36876
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
36578
- }, null, 8, _hoisted_5$3),
36877
+ }, null, 8, _hoisted_5$4),
36579
36878
  similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
36580
- ], 8, _hoisted_4$6)
36879
+ ], 8, _hoisted_4$8)
36581
36880
  ]),
36582
36881
  createBaseVNode("div", _hoisted_7, [
36583
36882
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
36584
- return openBlock(), createBlock(_sfc_main$t, {
36883
+ return openBlock(), createBlock(_sfc_main$v, {
36585
36884
  style: normalizeStyle(_ctx.columnSize),
36586
36885
  key: getDocumentKey(index2, product),
36587
36886
  product,
@@ -36596,15 +36895,15 @@ and ensure you are accounting for this risk.
36596
36895
  };
36597
36896
  }
36598
36897
  });
36599
- const _hoisted_1$p = {
36898
+ const _hoisted_1$r = {
36600
36899
  key: 0,
36601
36900
  class: "lupa-results-additional-panel"
36602
36901
  };
36603
- const _hoisted_2$j = {
36902
+ const _hoisted_2$l = {
36604
36903
  class: "lupa-results-additional-panel-items",
36605
36904
  "data-cy": "lupa-results-additional-panel-items"
36606
36905
  };
36607
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
36906
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36608
36907
  __name: "AdditionalPanel",
36609
36908
  props: {
36610
36909
  panel: {},
@@ -36677,10 +36976,10 @@ and ensure you are accounting for this risk.
36677
36976
  handleQueryChange();
36678
36977
  });
36679
36978
  return (_ctx, _cache) => {
36680
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
36681
- createBaseVNode("div", _hoisted_2$j, [
36979
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
36980
+ createBaseVNode("div", _hoisted_2$l, [
36682
36981
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
36683
- return openBlock(), createBlock(_sfc_main$t, {
36982
+ return openBlock(), createBlock(_sfc_main$v, {
36684
36983
  key: index,
36685
36984
  product: item,
36686
36985
  options: _ctx.panel,
@@ -36698,11 +36997,11 @@ and ensure you are accounting for this risk.
36698
36997
  };
36699
36998
  }
36700
36999
  });
36701
- const _hoisted_1$o = {
37000
+ const _hoisted_1$q = {
36702
37001
  key: 0,
36703
37002
  class: "lupa-results-additional-panels"
36704
37003
  };
36705
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
37004
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36706
37005
  __name: "AdditionalPanels",
36707
37006
  props: {
36708
37007
  options: {},
@@ -36719,9 +37018,9 @@ and ensure you are accounting for this risk.
36719
37018
  return locationPanels.value.length > 0;
36720
37019
  });
36721
37020
  return (_ctx, _cache) => {
36722
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
37021
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
36723
37022
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
36724
- return openBlock(), createBlock(_sfc_main$r, {
37023
+ return openBlock(), createBlock(_sfc_main$t, {
36725
37024
  key: panel.queryKey,
36726
37025
  panel,
36727
37026
  options: _ctx.sdkOptions
@@ -36738,29 +37037,29 @@ and ensure you are accounting for this risk.
36738
37037
  }
36739
37038
  return target2;
36740
37039
  };
36741
- const _sfc_main$p = {};
36742
- const _hoisted_1$n = { class: "lupa-spinner-wrapper" };
36743
- const _hoisted_2$i = { class: "lupa-spinner" };
37040
+ const _sfc_main$r = {};
37041
+ const _hoisted_1$p = { class: "lupa-spinner-wrapper" };
37042
+ const _hoisted_2$k = { class: "lupa-spinner" };
36744
37043
  function _sfc_render(_ctx, _cache) {
36745
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
36746
- createBaseVNode("div", _hoisted_2$i, [
37044
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
37045
+ createBaseVNode("div", _hoisted_2$k, [
36747
37046
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
36748
37047
  return createBaseVNode("div", { key: x });
36749
37048
  }), 64))
36750
37049
  ])
36751
37050
  ]);
36752
37051
  }
36753
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render]]);
36754
- const _hoisted_1$m = {
37052
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
37053
+ const _hoisted_1$o = {
36755
37054
  id: "lupa-search-results-similar-results",
36756
37055
  "data-cy": "lupa-search-results-similar-results"
36757
37056
  };
36758
- const _hoisted_2$h = { class: "lupa-similar-results-label" };
36759
- const _hoisted_3$b = {
37057
+ const _hoisted_2$j = { class: "lupa-similar-results-label" };
37058
+ const _hoisted_3$d = {
36760
37059
  class: "lupa-products",
36761
37060
  "data-cy": "lupa-products"
36762
37061
  };
36763
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
37062
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
36764
37063
  __name: "SearchResultsSimilarResults",
36765
37064
  props: {
36766
37065
  columnSize: {},
@@ -36781,11 +37080,11 @@ and ensure you are accounting for this risk.
36781
37080
  };
36782
37081
  });
36783
37082
  return (_ctx, _cache) => {
36784
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
36785
- createBaseVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarResultsLabel), 1),
36786
- createBaseVNode("div", _hoisted_3$b, [
37083
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
37084
+ createBaseVNode("div", _hoisted_2$j, toDisplayString(_ctx.labels.similarResultsLabel), 1),
37085
+ createBaseVNode("div", _hoisted_3$d, [
36787
37086
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
36788
- return openBlock(), createBlock(_sfc_main$t, {
37087
+ return openBlock(), createBlock(_sfc_main$v, {
36789
37088
  style: normalizeStyle(_ctx.columnSize),
36790
37089
  key: getDocumentKey(index, product),
36791
37090
  product,
@@ -36906,15 +37205,15 @@ and ensure you are accounting for this risk.
36906
37205
  return extractFacetsRelatedSource(source, searchResults2, options, activeFilters);
36907
37206
  }
36908
37207
  });
36909
- const _hoisted_1$l = { class: "lupa-related-query-item" };
36910
- const _hoisted_2$g = { class: "lupa-related-query-image" };
36911
- const _hoisted_3$a = { class: "lupa-related-query-label" };
36912
- const _hoisted_4$5 = { class: "lupa-related-query-title" };
36913
- const _hoisted_5$2 = {
37208
+ const _hoisted_1$n = { class: "lupa-related-query-item" };
37209
+ const _hoisted_2$i = { class: "lupa-related-query-image" };
37210
+ const _hoisted_3$c = { class: "lupa-related-query-label" };
37211
+ const _hoisted_4$7 = { class: "lupa-related-query-title" };
37212
+ const _hoisted_5$3 = {
36914
37213
  key: 0,
36915
37214
  class: "lupa-related-query-count"
36916
37215
  };
36917
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
37216
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
36918
37217
  __name: "RelatedQueryPanel",
36919
37218
  props: {
36920
37219
  query: {},
@@ -37010,9 +37309,9 @@ and ensure you are accounting for this risk.
37010
37309
  });
37011
37310
  return (_ctx, _cache) => {
37012
37311
  var _a25;
37013
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
37014
- createBaseVNode("div", _hoisted_2$g, [
37015
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
37312
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
37313
+ createBaseVNode("div", _hoisted_2$i, [
37314
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
37016
37315
  key: 0,
37017
37316
  "wrapper-class": "lupa-related-query-image-wrapper",
37018
37317
  "image-class": "lupa-related-query-image",
@@ -37020,24 +37319,24 @@ and ensure you are accounting for this risk.
37020
37319
  options: image.value
37021
37320
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37022
37321
  ]),
37023
- createBaseVNode("div", _hoisted_3$a, [
37024
- createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
37025
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37322
+ createBaseVNode("div", _hoisted_3$c, [
37323
+ createBaseVNode("span", _hoisted_4$7, toDisplayString(_ctx.query), 1),
37324
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37026
37325
  ])
37027
37326
  ]);
37028
37327
  };
37029
37328
  }
37030
37329
  });
37031
- const _hoisted_1$k = {
37330
+ const _hoisted_1$m = {
37032
37331
  key: 0,
37033
37332
  class: "lupa-related-queries"
37034
37333
  };
37035
- const _hoisted_2$f = {
37334
+ const _hoisted_2$h = {
37036
37335
  key: 0,
37037
37336
  class: "lupa-related-queries-title"
37038
37337
  };
37039
- const _hoisted_3$9 = ["onClick"];
37040
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
37338
+ const _hoisted_3$b = ["onClick"];
37339
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
37041
37340
  __name: "RelatedQueries",
37042
37341
  props: {
37043
37342
  options: {}
@@ -37131,8 +37430,8 @@ and ensure you are accounting for this risk.
37131
37430
  };
37132
37431
  return (_ctx, _cache) => {
37133
37432
  var _a25, _b25, _c, _d;
37134
- return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
37135
- ((_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),
37433
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
37434
+ ((_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),
37136
37435
  createBaseVNode("ul", null, [
37137
37436
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
37138
37437
  return withDirectives((openBlock(), createElementBlock("li", {
@@ -37142,14 +37441,14 @@ and ensure you are accounting for this risk.
37142
37441
  createBaseVNode("a", {
37143
37442
  onClick: ($event) => handleRelatedQueryClick(query)
37144
37443
  }, [
37145
- createVNode(_sfc_main$n, {
37444
+ createVNode(_sfc_main$p, {
37146
37445
  "source-key": query.key,
37147
37446
  options: _ctx.options,
37148
37447
  query: query.value,
37149
37448
  "existing-items-from-other-queries": allDisplayItems.value,
37150
37449
  onLoaded: (item) => processLoadedItem(query, item)
37151
37450
  }, null, 8, ["source-key", "options", "query", "existing-items-from-other-queries", "onLoaded"])
37152
- ], 8, _hoisted_3$9)
37451
+ ], 8, _hoisted_3$b)
37153
37452
  ], 2)), [
37154
37453
  [vShow, querySourceResultMap.value[query.value] !== false]
37155
37454
  ]);
@@ -37186,13 +37485,13 @@ and ensure you are accounting for this risk.
37186
37485
  }
37187
37486
  return null;
37188
37487
  };
37189
- const _hoisted_1$j = {
37488
+ const _hoisted_1$l = {
37190
37489
  key: 0,
37191
37490
  class: "lupa-redirection-suggestion"
37192
37491
  };
37193
- const _hoisted_2$e = { class: "lupa-redirections-suggestion-label" };
37194
- const _hoisted_3$8 = ["href"];
37195
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
37492
+ const _hoisted_2$g = { class: "lupa-redirections-suggestion-label" };
37493
+ const _hoisted_3$a = ["href"];
37494
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
37196
37495
  __name: "RedirectionSuggestions",
37197
37496
  props: {
37198
37497
  options: {}
@@ -37215,19 +37514,19 @@ and ensure you are accounting for this risk.
37215
37514
  )
37216
37515
  );
37217
37516
  return (_ctx, _cache) => {
37218
- return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
37219
- createBaseVNode("h4", _hoisted_2$e, [
37220
- createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$8)
37517
+ return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
37518
+ createBaseVNode("h4", _hoisted_2$g, [
37519
+ createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$a)
37221
37520
  ])
37222
37521
  ])) : createCommentVNode("", true);
37223
37522
  };
37224
37523
  }
37225
37524
  });
37226
- const _hoisted_1$i = {
37525
+ const _hoisted_1$k = {
37227
37526
  key: 0,
37228
37527
  class: "lupa-refiners-loading-notice"
37229
37528
  };
37230
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
37529
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
37231
37530
  __name: "RefinersLoadingNotice",
37232
37531
  props: {
37233
37532
  labels: {}
@@ -37238,22 +37537,22 @@ and ensure you are accounting for this risk.
37238
37537
  const props = __props;
37239
37538
  const label = computed(() => props.labels.refinersLoadingNotice);
37240
37539
  return (_ctx, _cache) => {
37241
- return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
37540
+ return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
37242
37541
  createBaseVNode("p", null, toDisplayString(label.value), 1),
37243
37542
  createVNode(Spinner)
37244
37543
  ])) : createCommentVNode("", true);
37245
37544
  };
37246
37545
  }
37247
37546
  });
37248
- const _hoisted_1$h = { class: "lupa-related-query-item" };
37249
- const _hoisted_2$d = { class: "lupa-related-query-image" };
37250
- const _hoisted_3$7 = { class: "lupa-related-query-label" };
37251
- const _hoisted_4$4 = { class: "lupa-related-query-title" };
37252
- const _hoisted_5$1 = {
37547
+ const _hoisted_1$j = { class: "lupa-related-query-item" };
37548
+ const _hoisted_2$f = { class: "lupa-related-query-image" };
37549
+ const _hoisted_3$9 = { class: "lupa-related-query-label" };
37550
+ const _hoisted_4$6 = { class: "lupa-related-query-title" };
37551
+ const _hoisted_5$2 = {
37253
37552
  key: 0,
37254
37553
  class: "lupa-related-query-count"
37255
37554
  };
37256
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
37555
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
37257
37556
  __name: "RelatedQueryPanelApi",
37258
37557
  props: {
37259
37558
  relatedQuery: {},
@@ -37285,9 +37584,9 @@ and ensure you are accounting for this risk.
37285
37584
  });
37286
37585
  return (_ctx, _cache) => {
37287
37586
  var _a25;
37288
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
37289
- createBaseVNode("div", _hoisted_2$d, [
37290
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
37587
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
37588
+ createBaseVNode("div", _hoisted_2$f, [
37589
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
37291
37590
  key: 0,
37292
37591
  "wrapper-class": "lupa-related-query-image-wrapper",
37293
37592
  "image-class": "lupa-related-query-image",
@@ -37295,24 +37594,24 @@ and ensure you are accounting for this risk.
37295
37594
  options: image.value
37296
37595
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37297
37596
  ]),
37298
- createBaseVNode("div", _hoisted_3$7, [
37299
- createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
37300
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37597
+ createBaseVNode("div", _hoisted_3$9, [
37598
+ createBaseVNode("span", _hoisted_4$6, toDisplayString(query.value), 1),
37599
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37301
37600
  ])
37302
37601
  ]);
37303
37602
  };
37304
37603
  }
37305
37604
  });
37306
- const _hoisted_1$g = {
37605
+ const _hoisted_1$i = {
37307
37606
  key: 0,
37308
37607
  class: "lupa-related-queries"
37309
37608
  };
37310
- const _hoisted_2$c = {
37609
+ const _hoisted_2$e = {
37311
37610
  key: 0,
37312
37611
  class: "lupa-related-queries-title"
37313
37612
  };
37314
- const _hoisted_3$6 = ["onClick"];
37315
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
37613
+ const _hoisted_3$8 = ["onClick"];
37614
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
37316
37615
  __name: "RelatedQueriesApi",
37317
37616
  props: {
37318
37617
  options: {}
@@ -37322,7 +37621,7 @@ and ensure you are accounting for this risk.
37322
37621
  const searchResultStore = useSearchResultStore();
37323
37622
  const paramsStore = useParamsStore();
37324
37623
  const optionsStore = useOptionsStore();
37325
- const { searchResult, relatedQueriesResult } = storeToRefs(searchResultStore);
37624
+ const { searchResult, relatedQueriesResult, relatedQueryFacetKeys } = storeToRefs(searchResultStore);
37326
37625
  const relatedQueries2 = computed(() => {
37327
37626
  var _a25, _b25, _c, _d;
37328
37627
  const allQueries = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) != null ? _b25 : [];
@@ -37350,7 +37649,7 @@ and ensure you are accounting for this risk.
37350
37649
  { key: query.key, value: query.value },
37351
37650
  optionsStore.getQueryParamName,
37352
37651
  {},
37353
- (_a25 = relatedQueries2.value) == null ? void 0 : _a25.map((q) => `f.${q.facetKey}`)
37652
+ (_a25 = relatedQueryFacetKeys.value) == null ? void 0 : _a25.map((key) => `f.${key}`)
37354
37653
  );
37355
37654
  };
37356
37655
  const getSelectedFilterClass = (relatedQuery) => {
@@ -37364,8 +37663,8 @@ and ensure you are accounting for this risk.
37364
37663
  };
37365
37664
  return (_ctx, _cache) => {
37366
37665
  var _a25, _b25, _c, _d;
37367
- return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
37368
- ((_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),
37666
+ return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
37667
+ ((_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),
37369
37668
  createBaseVNode("ul", null, [
37370
37669
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
37371
37670
  return openBlock(), createElementBlock("li", {
@@ -37375,11 +37674,11 @@ and ensure you are accounting for this risk.
37375
37674
  createBaseVNode("a", {
37376
37675
  onClick: ($event) => handleRelatedQueryClick(query)
37377
37676
  }, [
37378
- createVNode(_sfc_main$j, {
37677
+ createVNode(_sfc_main$l, {
37379
37678
  relatedQuery: query,
37380
37679
  options: _ctx.options
37381
37680
  }, null, 8, ["relatedQuery", "options"])
37382
- ], 8, _hoisted_3$6)
37681
+ ], 8, _hoisted_3$8)
37383
37682
  ], 2);
37384
37683
  }), 128))
37385
37684
  ])
@@ -37387,9 +37686,9 @@ and ensure you are accounting for this risk.
37387
37686
  };
37388
37687
  }
37389
37688
  });
37390
- const _hoisted_1$f = { key: 0 };
37391
- const _hoisted_2$b = ["innerHTML"];
37392
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
37689
+ const _hoisted_1$h = { key: 0 };
37690
+ const _hoisted_2$d = ["innerHTML"];
37691
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
37393
37692
  __name: "ZeroResults",
37394
37693
  props: {
37395
37694
  emptyResultsLabel: {},
@@ -37418,36 +37717,36 @@ and ensure you are accounting for this risk.
37418
37717
  });
37419
37718
  return (_ctx, _cache) => {
37420
37719
  return openBlock(), createElementBlock(Fragment, null, [
37421
- showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
37720
+ showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
37422
37721
  createTextVNode(toDisplayString(_ctx.emptyResultsLabel) + " ", 1),
37423
37722
  createBaseVNode("span", null, toDisplayString(_ctx.currentQueryText), 1)
37424
37723
  ])) : createCommentVNode("", true),
37425
37724
  showCustomZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", {
37426
37725
  key: 1,
37427
37726
  innerHTML: htmlTemplate.value
37428
- }, null, 8, _hoisted_2$b)) : createCommentVNode("", true)
37727
+ }, null, 8, _hoisted_2$d)) : createCommentVNode("", true)
37429
37728
  ], 64);
37430
37729
  };
37431
37730
  }
37432
37731
  });
37433
- const _hoisted_1$e = { id: "lupa-search-results-products" };
37434
- const _hoisted_2$a = {
37732
+ const _hoisted_1$g = { id: "lupa-search-results-products" };
37733
+ const _hoisted_2$c = {
37435
37734
  class: "lupa-products",
37436
37735
  "data-cy": "lupa-products"
37437
37736
  };
37438
- const _hoisted_3$5 = {
37737
+ const _hoisted_3$7 = {
37439
37738
  key: 1,
37440
37739
  class: "lupa-empty-results",
37441
37740
  "data-cy": "lupa-no-results-in-page"
37442
37741
  };
37443
- const _hoisted_4$3 = {
37742
+ const _hoisted_4$5 = {
37444
37743
  key: 5,
37445
37744
  class: "lupa-empty-results",
37446
37745
  "data-cy": "lupa-no-results"
37447
37746
  };
37448
- const _hoisted_5 = { key: 6 };
37747
+ const _hoisted_5$1 = { key: 6 };
37449
37748
  const _hoisted_6 = { key: 7 };
37450
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
37749
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37451
37750
  __name: "SearchResultsProducts",
37452
37751
  props: {
37453
37752
  options: {},
@@ -37463,7 +37762,7 @@ and ensure you are accounting for this risk.
37463
37762
  hasResults,
37464
37763
  currentQueryText,
37465
37764
  isPageEmpty,
37466
- isMobileSidebarVisible,
37765
+ isFilterSidebarVisible,
37467
37766
  columnCount,
37468
37767
  searchResult,
37469
37768
  layout,
@@ -37494,7 +37793,7 @@ and ensure you are accounting for this risk.
37494
37793
  });
37495
37794
  const showTopFilters = computed(() => {
37496
37795
  var _a25, _b25, _c;
37497
- return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) === "top-dropdown";
37796
+ return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
37498
37797
  });
37499
37798
  const showMobileFilters = computed(() => {
37500
37799
  return props.options.searchTitlePosition !== "search-results-top";
@@ -37571,40 +37870,40 @@ and ensure you are accounting for this risk.
37571
37870
  };
37572
37871
  return (_ctx, _cache) => {
37573
37872
  var _a25, _b25, _c;
37574
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
37575
- unref(loading) && !unref(isMobileSidebarVisible) ? (openBlock(), createBlock(Spinner, {
37873
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
37874
+ unref(loading) && !unref(isFilterSidebarVisible) ? (openBlock(), createBlock(Spinner, {
37576
37875
  key: 0,
37577
37876
  class: "lupa-loader"
37578
37877
  })) : createCommentVNode("", true),
37579
- createVNode(_sfc_main$l, {
37878
+ createVNode(_sfc_main$n, {
37580
37879
  options: _ctx.options.redirectionSuggestions
37581
37880
  }, null, 8, ["options"]),
37582
- createVNode(_sfc_main$q, {
37881
+ createVNode(_sfc_main$s, {
37583
37882
  options: _ctx.options,
37584
37883
  location: "top",
37585
37884
  sdkOptions: _ctx.options.options
37586
37885
  }, null, 8, ["options", "sdkOptions"]),
37587
- showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$m, {
37886
+ showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$o, {
37588
37887
  key: 1,
37589
37888
  options: _ctx.options.relatedQueries
37590
37889
  }, null, 8, ["options"])) : createCommentVNode("", true),
37591
- showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$i, {
37890
+ showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$k, {
37592
37891
  key: 2,
37593
37892
  options: _ctx.options.relatedQueries
37594
37893
  }, null, 8, ["options"])) : createCommentVNode("", true),
37595
37894
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
37596
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$M, {
37895
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
37597
37896
  key: 0,
37598
37897
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
37599
37898
  }, null, 8, ["options"])) : createCommentVNode("", true),
37600
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$F, {
37899
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
37601
37900
  key: 1,
37602
37901
  class: "lupa-toolbar-mobile",
37603
37902
  options: _ctx.options,
37604
37903
  "pagination-location": "top",
37605
37904
  onFilter: filter
37606
37905
  }, null, 8, ["options"])) : createCommentVNode("", true),
37607
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$_, {
37906
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
37608
37907
  key: 2,
37609
37908
  class: normalizeClass(currentFiltersClass.value),
37610
37909
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -37613,19 +37912,19 @@ and ensure you are accounting for this risk.
37613
37912
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
37614
37913
  ], 64)) : createCommentVNode("", true),
37615
37914
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
37616
- createVNode(_sfc_main$F, {
37915
+ createVNode(_sfc_main$H, {
37617
37916
  class: "lupa-toolbar-top",
37618
37917
  options: _ctx.options,
37619
37918
  "pagination-location": "top"
37620
37919
  }, null, 8, ["options"]),
37621
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$_, {
37920
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$14, {
37622
37921
  key: 0,
37623
37922
  class: normalizeClass(currentFiltersClass.value),
37624
37923
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
37625
37924
  options: currentFilterOptions.value,
37626
37925
  expandable: !desktopFiltersExpanded.value
37627
37926
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
37628
- createBaseVNode("div", _hoisted_2$a, [
37927
+ createBaseVNode("div", _hoisted_2$c, [
37629
37928
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
37630
37929
  return renderSlot(_ctx.$slots, "productCard", {
37631
37930
  style: normalizeStyle(columnSize.value),
@@ -37634,7 +37933,7 @@ and ensure you are accounting for this risk.
37634
37933
  options: productCardOptions.value
37635
37934
  });
37636
37935
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
37637
- return openBlock(), createBlock(_sfc_main$t, {
37936
+ return openBlock(), createBlock(_sfc_main$v, {
37638
37937
  style: normalizeStyle(columnSize.value),
37639
37938
  key: getProductKeyAction(index, product),
37640
37939
  product,
@@ -37643,7 +37942,7 @@ and ensure you are accounting for this risk.
37643
37942
  }, null, 8, ["style", "product", "options", "analytics-metadata"]);
37644
37943
  }), 128))
37645
37944
  ]),
37646
- unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
37945
+ unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
37647
37946
  createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
37648
37947
  _ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
37649
37948
  key: 0,
@@ -37651,36 +37950,36 @@ and ensure you are accounting for this risk.
37651
37950
  onClick: goToFirstPage
37652
37951
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
37653
37952
  ])) : createCommentVNode("", true),
37654
- createVNode(_sfc_main$F, {
37953
+ createVNode(_sfc_main$H, {
37655
37954
  class: "lupa-toolbar-bottom",
37656
37955
  options: _ctx.options,
37657
37956
  "pagination-location": "bottom"
37658
37957
  }, null, 8, ["options"]),
37659
- createVNode(_sfc_main$q, {
37958
+ createVNode(_sfc_main$s, {
37660
37959
  options: _ctx.options,
37661
37960
  location: "bottom",
37662
37961
  sdkOptions: _ctx.options.options
37663
37962
  }, null, 8, ["options", "sdkOptions"])
37664
- ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
37665
- createVNode(_sfc_main$h, {
37963
+ ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
37964
+ createVNode(_sfc_main$j, {
37666
37965
  emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
37667
37966
  currentQueryText: unref(currentQueryText),
37668
37967
  hasSimilarQueries: hasSimilarQueries.value || hasSimilarResults.value,
37669
37968
  zeroResults: (_c = _ctx.options) == null ? void 0 : _c.zeroResults
37670
37969
  }, null, 8, ["emptyResultsLabel", "currentQueryText", "hasSimilarQueries", "zeroResults"])
37671
37970
  ])) : createCommentVNode("", true),
37672
- createVNode(_sfc_main$k, {
37971
+ createVNode(_sfc_main$m, {
37673
37972
  labels: _ctx.options.labels
37674
37973
  }, null, 8, ["labels"]),
37675
- hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
37676
- createVNode(_sfc_main$s, {
37974
+ hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
37975
+ createVNode(_sfc_main$u, {
37677
37976
  labels: similarQueriesLabels.value,
37678
37977
  columnSize: columnSize.value,
37679
37978
  productCardOptions: productCardOptions.value
37680
37979
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
37681
37980
  ])) : createCommentVNode("", true),
37682
37981
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
37683
- createVNode(_sfc_main$o, {
37982
+ createVNode(_sfc_main$q, {
37684
37983
  labels: similarResultsLabels.value,
37685
37984
  columnSize: columnSize.value,
37686
37985
  productCardOptions: productCardOptions.value
@@ -37691,17 +37990,17 @@ and ensure you are accounting for this risk.
37691
37990
  };
37692
37991
  }
37693
37992
  });
37694
- const _hoisted_1$d = { class: "lupa-top-mobile-filter-wrapper" };
37695
- const _hoisted_2$9 = {
37993
+ const _hoisted_1$f = { class: "lupa-top-mobile-filter-wrapper" };
37994
+ const _hoisted_2$b = {
37696
37995
  key: 0,
37697
37996
  class: "lupa-category-back"
37698
37997
  };
37699
- const _hoisted_3$4 = ["href"];
37700
- const _hoisted_4$2 = {
37998
+ const _hoisted_3$6 = ["href"];
37999
+ const _hoisted_4$4 = {
37701
38000
  key: 1,
37702
38001
  class: "lupa-child-category-list"
37703
38002
  };
37704
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
38003
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
37705
38004
  __name: "CategoryTopFilters",
37706
38005
  props: {
37707
38006
  options: {}
@@ -37749,24 +38048,24 @@ and ensure you are accounting for this risk.
37749
38048
  "has-related-category-children": hasRelatedCategoryChildren.value
37750
38049
  }])
37751
38050
  }, [
37752
- createBaseVNode("div", _hoisted_1$d, [
37753
- hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
38051
+ createBaseVNode("div", _hoisted_1$f, [
38052
+ hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
37754
38053
  createBaseVNode("a", {
37755
38054
  "data-cy": "lupa-category-back",
37756
38055
  href: backUrlLink.value,
37757
38056
  onClick: handleNavigationBack
37758
- }, toDisplayString(backTitle.value), 9, _hoisted_3$4)
38057
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$6)
37759
38058
  ])) : createCommentVNode("", true),
37760
- hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
38059
+ hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
37761
38060
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
37762
- return openBlock(), createBlock(_sfc_main$Z, {
38061
+ return openBlock(), createBlock(_sfc_main$13, {
37763
38062
  key: getCategoryKey(child),
37764
38063
  item: child,
37765
38064
  options: categoryOptions.value
37766
38065
  }, null, 8, ["item", "options"]);
37767
38066
  }), 128))
37768
38067
  ])) : createCommentVNode("", true),
37769
- createVNode(_sfc_main$F, {
38068
+ createVNode(_sfc_main$H, {
37770
38069
  class: "lupa-toolbar-mobile",
37771
38070
  "pagination-location": "top",
37772
38071
  options: _ctx.options
@@ -37776,6 +38075,129 @@ and ensure you are accounting for this risk.
37776
38075
  };
37777
38076
  }
37778
38077
  });
38078
+ const _hoisted_1$e = {
38079
+ id: "lupa-search-results-sort-list",
38080
+ class: "lupa-search-results-sort-list"
38081
+ };
38082
+ const _hoisted_2$a = ["onClick"];
38083
+ const _hoisted_3$5 = ["for"];
38084
+ const _hoisted_4$3 = ["id", "checked"];
38085
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
38086
+ __name: "SortList",
38087
+ setup(__props) {
38088
+ const { sortItems, selectedKey, handleSelect, setSortValue } = useSorting();
38089
+ onMounted(() => {
38090
+ setSortValue();
38091
+ });
38092
+ const selectValue = (key) => {
38093
+ selectedKey.value = key;
38094
+ handleSelect();
38095
+ };
38096
+ return (_ctx, _cache) => {
38097
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
38098
+ createBaseVNode("ul", null, [
38099
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
38100
+ return openBlock(), createElementBlock("li", {
38101
+ key: option.key,
38102
+ class: normalizeClass({ "lupa-sort-item-selected": option.key === unref(selectedKey) }),
38103
+ onClick: ($event) => selectValue(option.key)
38104
+ }, [
38105
+ createBaseVNode("label", {
38106
+ for: "lupa-sort-list-" + option.key
38107
+ }, toDisplayString(option.label), 9, _hoisted_3$5),
38108
+ createBaseVNode("input", {
38109
+ id: "lupa-sort-list-" + option.key,
38110
+ type: "radio",
38111
+ checked: option.key === unref(selectedKey)
38112
+ }, null, 8, _hoisted_4$3)
38113
+ ], 10, _hoisted_2$a);
38114
+ }), 128))
38115
+ ])
38116
+ ]);
38117
+ };
38118
+ }
38119
+ });
38120
+ const _hoisted_1$d = { class: "lupa-sort-sidebar-content" };
38121
+ const _hoisted_2$9 = { class: "lupa-sidebar-top" };
38122
+ const _hoisted_3$4 = { class: "lupa-sidebar-title" };
38123
+ const _hoisted_4$2 = { class: "lupa-sidebar-sort-options" };
38124
+ const _hoisted_5 = { class: "lupa-sidebar-sort-actions" };
38125
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
38126
+ __name: "SortDrawer",
38127
+ setup(__props) {
38128
+ const optionsStore = useOptionsStore();
38129
+ const searchResultStore = useSearchResultStore();
38130
+ const paramStore = useParamsStore();
38131
+ const { searchResultOptions } = storeToRefs(optionsStore);
38132
+ const { isSidebarClosing, isSortingSidebarVisible } = storeToRefs(searchResultStore);
38133
+ const { handleSortSidebarToggle } = useSidebarToggle();
38134
+ const sortStyleOptions = computed(() => {
38135
+ var _a25;
38136
+ return (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle;
38137
+ });
38138
+ const sidebarTitle = computed(() => {
38139
+ var _a25, _b25, _c, _d;
38140
+ 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 : "";
38141
+ });
38142
+ const clearSortLabel = computed(() => {
38143
+ var _a25, _b25, _c, _d;
38144
+ 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 : "";
38145
+ });
38146
+ const applySortLabel = computed(() => {
38147
+ var _a25, _b25, _c, _d;
38148
+ 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 : "";
38149
+ });
38150
+ const handleDrawerToggle = () => {
38151
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
38152
+ };
38153
+ const clearSort = () => {
38154
+ paramStore.removeParameters({
38155
+ paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS$1.SORT)]
38156
+ });
38157
+ handleSortSidebarToggle();
38158
+ };
38159
+ const applySort = () => {
38160
+ handleSortSidebarToggle();
38161
+ };
38162
+ return (_ctx, _cache) => {
38163
+ return unref(isSortingSidebarVisible) ? (openBlock(), createElementBlock("div", {
38164
+ key: 0,
38165
+ class: normalizeClass(["lupa-sort-sidebar", { "lupa-sort-is-closing": unref(isSidebarClosing) }])
38166
+ }, [
38167
+ createBaseVNode("div", {
38168
+ class: "lupa-sidebar-close",
38169
+ onClick: withModifiers(handleDrawerToggle, ["stop"])
38170
+ }),
38171
+ createBaseVNode("div", _hoisted_1$d, [
38172
+ createBaseVNode("div", _hoisted_2$9, [
38173
+ createBaseVNode("div", _hoisted_3$4, toDisplayString(sidebarTitle.value), 1),
38174
+ createBaseVNode("div", {
38175
+ class: "lupa-filter-toggle-mobile",
38176
+ onClick: handleDrawerToggle
38177
+ })
38178
+ ]),
38179
+ createBaseVNode("div", _hoisted_4$2, [
38180
+ createVNode(_sfc_main$g)
38181
+ ]),
38182
+ createBaseVNode("div", _hoisted_5, [
38183
+ clearSortLabel.value ? (openBlock(), createElementBlock("button", {
38184
+ key: 0,
38185
+ type: "button",
38186
+ class: "lupa-sidebar-sort-clear",
38187
+ onClick: withModifiers(clearSort, ["stop"])
38188
+ }, toDisplayString(clearSortLabel.value), 1)) : createCommentVNode("", true),
38189
+ applySortLabel.value ? (openBlock(), createElementBlock("button", {
38190
+ key: 1,
38191
+ type: "button",
38192
+ class: "lupa-sidebar-sort-apply",
38193
+ onClick: withModifiers(applySort, ["stop"])
38194
+ }, toDisplayString(applySortLabel.value), 1)) : createCommentVNode("", true)
38195
+ ])
38196
+ ])
38197
+ ], 2)) : createCommentVNode("", true);
38198
+ };
38199
+ }
38200
+ });
37779
38201
  const _hoisted_1$c = {
37780
38202
  key: 0,
37781
38203
  class: "lupa-container-title-summary-mobile"
@@ -37810,7 +38232,7 @@ and ensure you are accounting for this risk.
37810
38232
  currentQueryText,
37811
38233
  hasResults,
37812
38234
  currentFilterCount,
37813
- isMobileSidebarVisible,
38235
+ isFilterSidebarVisible,
37814
38236
  layout,
37815
38237
  loadingFacets,
37816
38238
  loadingRefiners
@@ -37832,7 +38254,7 @@ and ensure you are accounting for this risk.
37832
38254
  });
37833
38255
  const indicatorClasses = computed(() => {
37834
38256
  return {
37835
- "lupa-mobile-sidebar-visible": isMobileSidebarVisible.value,
38257
+ "lupa-mobile-sidebar-visible": isFilterSidebarVisible.value,
37836
38258
  "lupa-layout-grid": !layout.value || layout.value === ResultsLayoutEnum.GRID,
37837
38259
  "lupa-layout-list": layout.value === ResultsLayoutEnum.LIST
37838
38260
  };
@@ -38074,32 +38496,33 @@ and ensure you are accounting for this risk.
38074
38496
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
38075
38497
  }, [
38076
38498
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
38077
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38078
- createVNode(_sfc_main$10, {
38499
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38500
+ createVNode(_sfc_main$16, {
38079
38501
  "show-summary": true,
38080
38502
  options: _ctx.options,
38081
38503
  "is-product-list": (_a25 = _ctx.isProductList) != null ? _a25 : false
38082
38504
  }, null, 8, ["options", "is-product-list"])
38083
38505
  ])) : createCommentVNode("", true),
38084
- isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$f, {
38506
+ isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$h, {
38085
38507
  key: 1,
38086
38508
  options: _ctx.options
38087
38509
  }, null, 8, ["options"])) : createCommentVNode("", true),
38088
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$O, {
38510
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$R, {
38089
38511
  key: 2,
38090
38512
  options: _ctx.options.filters,
38091
38513
  onFilter: handleParamsChange
38092
38514
  }, null, 8, ["options"])) : createCommentVNode("", true),
38093
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$N, {
38094
- key: 3,
38515
+ _ctx.options.sort ? (openBlock(), createBlock(_sfc_main$f, { key: 3 })) : createCommentVNode("", true),
38516
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$Q, {
38517
+ key: 4,
38095
38518
  breadcrumbs: _ctx.options.breadcrumbs
38096
38519
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
38097
38520
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", {
38098
- key: 4,
38521
+ key: 5,
38099
38522
  id: "lupa-search-results",
38100
38523
  class: normalizeClass(["top-layout-wrapper", indicatorClasses.value])
38101
38524
  }, [
38102
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
38525
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
38103
38526
  key: 0,
38104
38527
  options: (_b25 = _ctx.options.filters) != null ? _b25 : {},
38105
38528
  ref_key: "searchResultsFilters",
@@ -38107,12 +38530,12 @@ and ensure you are accounting for this risk.
38107
38530
  onFilter: handleParamsChange
38108
38531
  }, null, 8, ["options"])) : createCommentVNode("", true),
38109
38532
  createBaseVNode("div", _hoisted_2$8, [
38110
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38111
- createVNode(_sfc_main$10, {
38533
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38534
+ createVNode(_sfc_main$16, {
38112
38535
  options: _ctx.options,
38113
38536
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
38114
38537
  }, null, 8, ["options", "is-product-list"]),
38115
- createVNode(_sfc_main$g, {
38538
+ createVNode(_sfc_main$i, {
38116
38539
  options: _ctx.options,
38117
38540
  ssr: ssrEnabled.value,
38118
38541
  onFilter: handleParamsChange
@@ -38123,9 +38546,9 @@ and ensure you are accounting for this risk.
38123
38546
  _: 3
38124
38547
  }, 8, ["options", "ssr"])
38125
38548
  ])
38126
- ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
38127
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38128
- createVNode(_sfc_main$10, {
38549
+ ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [
38550
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38551
+ createVNode(_sfc_main$16, {
38129
38552
  options: _ctx.options,
38130
38553
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
38131
38554
  }, null, 8, ["options", "is-product-list"]),
@@ -38133,14 +38556,14 @@ and ensure you are accounting for this risk.
38133
38556
  id: "lupa-search-results",
38134
38557
  class: normalizeClass(indicatorClasses.value)
38135
38558
  }, [
38136
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
38559
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
38137
38560
  key: 0,
38138
38561
  options: (_e = _ctx.options.filters) != null ? _e : {},
38139
38562
  ref_key: "searchResultsFilters",
38140
38563
  ref: searchResultsFilters,
38141
38564
  onFilter: handleParamsChange
38142
38565
  }, null, 8, ["options"])) : createCommentVNode("", true),
38143
- createVNode(_sfc_main$g, {
38566
+ createVNode(_sfc_main$i, {
38144
38567
  options: _ctx.options,
38145
38568
  ssr: ssrEnabled.value,
38146
38569
  onFilter: handleParamsChange
@@ -38284,7 +38707,7 @@ and ensure you are accounting for this risk.
38284
38707
  onClick: withModifiers(innerClick, ["stop"])
38285
38708
  }, [
38286
38709
  createBaseVNode("div", _hoisted_1$a, [
38287
- createVNode(_sfc_main$13, {
38710
+ createVNode(_sfc_main$19, {
38288
38711
  options: fullSearchBoxOptions.value,
38289
38712
  "is-search-container": true,
38290
38713
  ref_key: "searchBox",
@@ -39872,7 +40295,7 @@ and ensure you are accounting for this risk.
39872
40295
  key: getProductKeyAction(index, product)
39873
40296
  }, {
39874
40297
  default: withCtx(() => [
39875
- createVNode(_sfc_main$t, {
40298
+ createVNode(_sfc_main$v, {
39876
40299
  product,
39877
40300
  options: _ctx.options,
39878
40301
  "click-tracking-settings": clickTrackingSettings.value,
@@ -39887,7 +40310,7 @@ and ensure you are accounting for this risk.
39887
40310
  _: 1
39888
40311
  }, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
39889
40312
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
39890
- return openBlock(), createBlock(_sfc_main$t, {
40313
+ return openBlock(), createBlock(_sfc_main$v, {
39891
40314
  style: normalizeStyle(columnSize.value),
39892
40315
  key: getProductKeyAction(index, product),
39893
40316
  product,
@@ -40133,7 +40556,7 @@ and ensure you are accounting for this risk.
40133
40556
  createBaseVNode("a", {
40134
40557
  href: getLink(product)
40135
40558
  }, [
40136
- createVNode(_sfc_main$E, {
40559
+ createVNode(_sfc_main$G, {
40137
40560
  item: product,
40138
40561
  options: image.value
40139
40562
  }, null, 8, ["item", "options"])
@@ -40298,7 +40721,7 @@ and ensure you are accounting for this risk.
40298
40721
  return (_ctx, _cache) => {
40299
40722
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
40300
40723
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
40301
- return openBlock(), createBlock(_sfc_main$t, {
40724
+ return openBlock(), createBlock(_sfc_main$v, {
40302
40725
  class: "lupa-chat-product-card",
40303
40726
  key: getProductKeyAction(index, product),
40304
40727
  product,
@@ -40494,7 +40917,7 @@ and ensure you are accounting for this risk.
40494
40917
  key: 0,
40495
40918
  class: "lupasearch-chat-content"
40496
40919
  };
40497
- const _sfc_main$1B = /* @__PURE__ */ defineComponent({
40920
+ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
40498
40921
  __name: "ChatContainer",
40499
40922
  props: {
40500
40923
  options: {}
@@ -46518,7 +46941,7 @@ and ensure you are accounting for this risk.
46518
46941
  };
46519
46942
  __expose({ fetch: fetch2 });
46520
46943
  return (_ctx, _cache) => {
46521
- return openBlock(), createBlock(unref(_sfc_main$13), {
46944
+ return openBlock(), createBlock(unref(_sfc_main$19), {
46522
46945
  ref_key: "searchBox",
46523
46946
  ref: searchBox2,
46524
46947
  options: fullSearchBoxOptions.value
@@ -47178,7 +47601,7 @@ and ensure you are accounting for this risk.
47178
47601
  const instance = createVue(
47179
47602
  options.displayOptions.containerSelector,
47180
47603
  mountOptions == null ? void 0 : mountOptions.mountingBehavior,
47181
- _sfc_main$1B,
47604
+ _sfc_main$1H,
47182
47605
  {
47183
47606
  options
47184
47607
  }
@@ -47452,13 +47875,14 @@ and ensure you are accounting for this risk.
47452
47875
  document.head.appendChild(styleElement);
47453
47876
  });
47454
47877
  const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47455
- var _a25;
47878
+ var _a25, _b25;
47456
47879
  if (!configuration.searchBox) {
47457
47880
  return;
47458
47881
  }
47459
47882
  const resolvedConfiguration = JSON.parse(configuration.searchBox);
47460
47883
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47461
47884
  const domPing = resolvedConfiguration.domPing;
47885
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47462
47886
  const visible = yield waitForElementToBeVisible(
47463
47887
  resolvedConfiguration.inputSelector,
47464
47888
  0,
@@ -47472,18 +47896,19 @@ and ensure you are accounting for this risk.
47472
47896
  }
47473
47897
  const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
47474
47898
  resolvedConfiguration,
47475
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a25 : {}
47899
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _b25 : {}
47476
47900
  );
47477
- searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
47901
+ searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior });
47478
47902
  });
47479
47903
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47480
- var _a25;
47904
+ var _a25, _b25;
47481
47905
  if (!configuration.searchResults) {
47482
47906
  return;
47483
47907
  }
47484
47908
  const resolvedConfiguration = JSON.parse(configuration.searchResults);
47485
47909
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47486
47910
  const domPing = resolvedConfiguration.domPing;
47911
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47487
47912
  const visible = yield waitForElementToBeVisible(
47488
47913
  resolvedConfiguration.containerSelector,
47489
47914
  0,
@@ -47497,12 +47922,15 @@ and ensure you are accounting for this risk.
47497
47922
  }
47498
47923
  const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
47499
47924
  resolvedConfiguration,
47500
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a25 : {}
47925
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _b25 : {}
47926
+ );
47927
+ searchResults(
47928
+ __spreadProps(__spreadValues({}, mergedOptions), { options }),
47929
+ { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior }
47501
47930
  );
47502
- searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
47503
47931
  });
47504
47932
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47505
- var _a25;
47933
+ var _a25, _b25;
47506
47934
  if (!configuration.productList) {
47507
47935
  return;
47508
47936
  }
@@ -47511,6 +47939,7 @@ and ensure you are accounting for this risk.
47511
47939
  );
47512
47940
  const resolvedConfiguration = JSON.parse(configuration.productList);
47513
47941
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47942
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47514
47943
  const visible = yield waitForElementToBeVisible(
47515
47944
  resolvedConfiguration.containerSelector,
47516
47945
  0,
@@ -47524,13 +47953,14 @@ and ensure you are accounting for this risk.
47524
47953
  }
47525
47954
  const mergedOptions = merge(
47526
47955
  __spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
47527
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _a25 : {}
47956
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _b25 : {}
47528
47957
  );
47529
- productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
47958
+ productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
47530
47959
  });
47531
47960
  const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfiguration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47532
- var _a25;
47961
+ var _a25, _b25;
47533
47962
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47963
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47534
47964
  const visible = yield waitForElementToBeVisible(
47535
47965
  resolvedConfiguration.containerSelector,
47536
47966
  0,
@@ -47544,9 +47974,9 @@ and ensure you are accounting for this risk.
47544
47974
  }
47545
47975
  const mergedOptions = merge(
47546
47976
  __spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
47547
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _a25 : {}
47977
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _b25 : {}
47548
47978
  );
47549
- recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
47979
+ recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
47550
47980
  });
47551
47981
  const mountAllRecommendations = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47552
47982
  if (!configuration.recommendations) {