@getlupa/client 1.22.3 → 1.23.1

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.
@@ -18057,8 +18057,18 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
18057
18057
  );
18058
18058
  const trackingOptions = ref({});
18059
18059
  const searchResultInitialFilters = ref({});
18060
+ const expandedFacetsInner = ref([]);
18060
18061
  const productRecommendationOptions = ref({});
18061
18062
  const screenStore = useScreenStore();
18063
+ const expandedFacets = computed({
18064
+ get: () => {
18065
+ var _a25, _b25, _c, _d, _e;
18066
+ 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 : [];
18067
+ },
18068
+ set: (value) => {
18069
+ expandedFacetsInner.value = value;
18070
+ }
18071
+ });
18062
18072
  const envOptions = computed(
18063
18073
  () => {
18064
18074
  var _a25;
@@ -18158,6 +18168,7 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
18158
18168
  currentResolutionPageSizes,
18159
18169
  productRecommendationOptions,
18160
18170
  ariaLabels,
18171
+ expandedFacets,
18161
18172
  setSearchBoxOptions,
18162
18173
  setTrackingOptions,
18163
18174
  setSearchResultOptions,
@@ -18513,12 +18524,15 @@ const QUERY_PARAMS_PARSED = {
18513
18524
  const FACET_PARAMS_TYPE = {
18514
18525
  TERMS: "f.",
18515
18526
  RANGE: "fr.",
18527
+ PARTIAL_RANGE: "fpr.",
18516
18528
  HIERARCHY: "fh."
18517
18529
  };
18518
18530
  const FACET_FILTER_MAP = {
18519
18531
  terms: FACET_PARAMS_TYPE.TERMS,
18520
18532
  range: FACET_PARAMS_TYPE.RANGE,
18521
- hierarchy: FACET_PARAMS_TYPE.HIERARCHY
18533
+ stats: FACET_PARAMS_TYPE.RANGE,
18534
+ hierarchy: FACET_PARAMS_TYPE.HIERARCHY,
18535
+ partialRange: FACET_PARAMS_TYPE.PARTIAL_RANGE
18522
18536
  };
18523
18537
  const FACET_KEY_SEPARATOR = ".";
18524
18538
  const FACET_RANGE_SEPARATOR = ":";
@@ -18672,7 +18686,7 @@ const getLabeledFilters = (filters, facets2, translations) => {
18672
18686
  });
18673
18687
  });
18674
18688
  };
18675
- const isFacetKey = (key) => key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.TERMS) || key.startsWith(FACET_PARAMS_TYPE.HIERARCHY);
18689
+ const isFacetKey = (key) => key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.TERMS) || key.startsWith(FACET_PARAMS_TYPE.HIERARCHY) || key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE);
18676
18690
  const getMostSpecificHierarchyTerms = (terms) => {
18677
18691
  const specificTerms = [];
18678
18692
  for (const term of terms) {
@@ -18760,8 +18774,7 @@ const parseFacetKey = (key, searchParams) => {
18760
18774
  if (key.startsWith(FACET_PARAMS_TYPE.TERMS)) {
18761
18775
  return (_b25 = (_a25 = searchParams.getAll(key)) == null ? void 0 : _a25.map((v) => decodeURIComponent(v))) != null ? _b25 : [];
18762
18776
  }
18763
- if (key.startsWith(FACET_PARAMS_TYPE.RANGE)) {
18764
- const isPrice = key == null ? void 0 : key.includes(CURRENCY_KEY_INDICATOR);
18777
+ if (key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE)) {
18765
18778
  const range2 = searchParams.get(key);
18766
18779
  if (!range2) {
18767
18780
  return {};
@@ -18769,7 +18782,7 @@ const parseFacetKey = (key, searchParams) => {
18769
18782
  const [min, max] = range2.split(FACET_RANGE_SEPARATOR);
18770
18783
  return {
18771
18784
  gte: min || void 0,
18772
- [isPrice ? "lte" : "lt"]: max || void 0
18785
+ [key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE) ? "lt" : "lte"]: max || void 0
18773
18786
  };
18774
18787
  }
18775
18788
  if (key.startsWith(FACET_PARAMS_TYPE.HIERARCHY)) {
@@ -18971,6 +18984,7 @@ const toggleHierarchyFilter = (appendParams, facetAction, getQueryParamName, cur
18971
18984
  };
18972
18985
  const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQueryParamName, currentFilters) => {
18973
18986
  var _a25, _b25;
18987
+ const baseFacetQueryParamName = facetAction.type === "partialRange" ? FACET_PARAMS_TYPE.PARTIAL_RANGE : FACET_PARAMS_TYPE.RANGE;
18974
18988
  const currentFilter = rangeFilterToString(
18975
18989
  currentFilters == null ? void 0 : currentFilters[facetAction.key],
18976
18990
  FACET_RANGE_SEPARATOR
@@ -18981,14 +18995,14 @@ const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQuery
18981
18995
  if (!facetValue) {
18982
18996
  removeParameters({
18983
18997
  paramsToRemove: [
18984
- getFacetParam(facetAction.key, "", FACET_PARAMS_TYPE.RANGE).name,
18998
+ getFacetParam(facetAction.key, "", baseFacetQueryParamName).name,
18985
18999
  ...paramsToRemove
18986
19000
  ]
18987
19001
  });
18988
19002
  return;
18989
19003
  }
18990
19004
  appendParams({
18991
- params: [getFacetParam(facetAction.key, facetValue, FACET_PARAMS_TYPE.RANGE)],
19005
+ params: [getFacetParam(facetAction.key, facetValue, baseFacetQueryParamName)],
18992
19006
  paramsToRemove,
18993
19007
  encode: false
18994
19008
  });
@@ -19576,7 +19590,7 @@ const getApiUrl = (environment, customBaseUrl) => {
19576
19590
  }
19577
19591
  return Env[environment] || Env["production"];
19578
19592
  };
19579
- const _sfc_main$1A = /* @__PURE__ */ defineComponent({
19593
+ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
19580
19594
  __name: "VoiceSearchProgressCircle",
19581
19595
  props: {
19582
19596
  isRecording: { type: Boolean },
@@ -19789,15 +19803,15 @@ function useVoiceRecorder(options) {
19789
19803
  closeSocket
19790
19804
  };
19791
19805
  }
19792
- const _hoisted_1$1l = {
19806
+ const _hoisted_1$1o = {
19793
19807
  key: 0,
19794
19808
  class: "lupa-dialog-overlay"
19795
19809
  };
19796
- const _hoisted_2$W = { class: "lupa-dialog-content" };
19797
- const _hoisted_3$E = { class: "lupa-listening-text" };
19798
- const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
19799
- const _hoisted_5$l = ["aria-label"];
19800
- const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19810
+ const _hoisted_2$Y = { class: "lupa-dialog-content" };
19811
+ const _hoisted_3$G = { class: "lupa-listening-text" };
19812
+ const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
19813
+ const _hoisted_5$m = ["aria-label"];
19814
+ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
19801
19815
  __name: "VoiceSearchDialog",
19802
19816
  props: {
19803
19817
  isOpen: { type: Boolean },
@@ -19902,21 +19916,21 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19902
19916
  return (_ctx, _cache) => {
19903
19917
  var _a25, _b25;
19904
19918
  return openBlock(), createElementBlock("div", null, [
19905
- props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
19919
+ props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1o, [
19906
19920
  createBaseVNode("button", {
19907
19921
  class: "lupa-dialog-box-close-button",
19908
19922
  onClick: _cache[0] || (_cache[0] = () => emit2("close"))
19909
19923
  }),
19910
- createBaseVNode("div", _hoisted_2$W, [
19911
- createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
19912
- createBaseVNode("div", _hoisted_4$u, [
19924
+ createBaseVNode("div", _hoisted_2$Y, [
19925
+ createBaseVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
19926
+ createBaseVNode("div", _hoisted_4$w, [
19913
19927
  createBaseVNode("button", {
19914
19928
  class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
19915
19929
  onClick: handleRecordingButtonClick,
19916
19930
  "aria-controls": "voice-search-microphone",
19917
19931
  "aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
19918
- }, null, 10, _hoisted_5$l),
19919
- createVNode(_sfc_main$1A, {
19932
+ }, null, 10, _hoisted_5$m),
19933
+ createVNode(_sfc_main$1G, {
19920
19934
  ref_key: "voiceSearchProgressBar",
19921
19935
  ref: voiceSearchProgressBar,
19922
19936
  class: "lupa-progress-circle",
@@ -19931,18 +19945,18 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19931
19945
  };
19932
19946
  }
19933
19947
  });
19934
- const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
19935
- const _hoisted_2$V = { class: "lupa-input-clear" };
19936
- const _hoisted_3$D = { id: "lupa-search-box-input" };
19937
- const _hoisted_4$t = ["value"];
19938
- const _hoisted_5$k = ["aria-label", "placeholder"];
19939
- const _hoisted_6$8 = {
19948
+ const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
19949
+ const _hoisted_2$X = { class: "lupa-input-clear" };
19950
+ const _hoisted_3$F = { id: "lupa-search-box-input" };
19951
+ const _hoisted_4$v = ["value"];
19952
+ const _hoisted_5$l = ["aria-label", "placeholder"];
19953
+ const _hoisted_6$7 = {
19940
19954
  key: 0,
19941
19955
  class: "lupa-close-label"
19942
19956
  };
19943
19957
  const _hoisted_7$5 = { key: 1 };
19944
19958
  const _hoisted_8$3 = ["aria-label"];
19945
- const _sfc_main$1y = /* @__PURE__ */ defineComponent({
19959
+ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
19946
19960
  __name: "SearchBoxInput",
19947
19961
  props: {
19948
19962
  options: {},
@@ -20074,20 +20088,20 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20074
20088
  };
20075
20089
  __expose({ focus });
20076
20090
  return (_ctx, _cache) => {
20077
- return openBlock(), createElementBlock("div", _hoisted_1$1k, [
20078
- createBaseVNode("div", _hoisted_2$V, [
20091
+ return openBlock(), createElementBlock("div", _hoisted_1$1n, [
20092
+ createBaseVNode("div", _hoisted_2$X, [
20079
20093
  createBaseVNode("div", {
20080
20094
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
20081
20095
  onClick: clear
20082
20096
  }, null, 2)
20083
20097
  ]),
20084
- createBaseVNode("div", _hoisted_3$D, [
20098
+ createBaseVNode("div", _hoisted_3$F, [
20085
20099
  createBaseVNode("input", {
20086
20100
  class: "lupa-hint",
20087
20101
  "aria-hidden": "true",
20088
20102
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
20089
20103
  disabled: ""
20090
- }, null, 8, _hoisted_4$t),
20104
+ }, null, 8, _hoisted_4$v),
20091
20105
  withDirectives(createBaseVNode("input", mergeProps({
20092
20106
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
20093
20107
  }, inputAttributes.value, {
@@ -20101,7 +20115,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20101
20115
  placeholder: labels.value.placeholder,
20102
20116
  onInput: handleInput,
20103
20117
  onFocus: handleFocus
20104
- }), null, 16, _hoisted_5$k), [
20118
+ }), null, 16, _hoisted_5$l), [
20105
20119
  [vModelText, inputValue.value]
20106
20120
  ]),
20107
20121
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -20116,7 +20130,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20116
20130
  class: "lupa-close-search-container",
20117
20131
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
20118
20132
  }, [
20119
- labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
20133
+ labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
20120
20134
  ])) : createCommentVNode("", true),
20121
20135
  isVoiceSearchEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
20122
20136
  createBaseVNode("button", {
@@ -20127,7 +20141,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20127
20141
  "aria-label": voiceSearchAriaLabel.value
20128
20142
  }, null, 8, _hoisted_8$3)
20129
20143
  ])) : createCommentVNode("", true),
20130
- isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1z, {
20144
+ isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1F, {
20131
20145
  key: 2,
20132
20146
  ref_key: "voiceDialogOverlay",
20133
20147
  ref: voiceDialogOverlay,
@@ -20141,7 +20155,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20141
20155
  };
20142
20156
  }
20143
20157
  });
20144
- const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20158
+ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
20145
20159
  __name: "SearchBoxMoreResults",
20146
20160
  props: {
20147
20161
  labels: {},
@@ -20179,9 +20193,9 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20179
20193
  };
20180
20194
  }
20181
20195
  });
20182
- const _hoisted_1$1j = { class: "lupa-search-box-history-item" };
20183
- const _hoisted_2$U = { class: "lupa-search-box-history-item-content" };
20184
- const _sfc_main$1w = /* @__PURE__ */ defineComponent({
20196
+ const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
20197
+ const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
20198
+ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
20185
20199
  __name: "SearchBoxHistoryItem",
20186
20200
  props: {
20187
20201
  item: {},
@@ -20198,8 +20212,8 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
20198
20212
  emit2("click", { query: props.item });
20199
20213
  };
20200
20214
  return (_ctx, _cache) => {
20201
- return openBlock(), createElementBlock("div", _hoisted_1$1j, [
20202
- createBaseVNode("div", _hoisted_2$U, [
20215
+ return openBlock(), createElementBlock("div", _hoisted_1$1m, [
20216
+ createBaseVNode("div", _hoisted_2$W, [
20203
20217
  createBaseVNode("div", {
20204
20218
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
20205
20219
  onClick: click2
@@ -20213,11 +20227,11 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
20213
20227
  };
20214
20228
  }
20215
20229
  });
20216
- const _hoisted_1$1i = {
20230
+ const _hoisted_1$1l = {
20217
20231
  key: 0,
20218
20232
  class: "lupa-search-box-history-panel"
20219
20233
  };
20220
- const _sfc_main$1v = /* @__PURE__ */ defineComponent({
20234
+ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
20221
20235
  __name: "SearchBoxHistoryPanel",
20222
20236
  props: {
20223
20237
  options: {}
@@ -20268,9 +20282,9 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
20268
20282
  }
20269
20283
  };
20270
20284
  return (_ctx, _cache) => {
20271
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1i, [
20285
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
20272
20286
  (openBlock(true), createElementBlock(Fragment, null, renderList(limitedHistory.value, (item, index) => {
20273
- return openBlock(), createBlock(_sfc_main$1w, {
20287
+ return openBlock(), createBlock(_sfc_main$1C, {
20274
20288
  key: item,
20275
20289
  item,
20276
20290
  highlighted: index === highlightIndex.value,
@@ -20286,15 +20300,15 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
20286
20300
  };
20287
20301
  }
20288
20302
  });
20289
- const _hoisted_1$1h = { class: "lupa-search-box-no-results" };
20290
- const _sfc_main$1u = /* @__PURE__ */ defineComponent({
20303
+ const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
20304
+ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
20291
20305
  __name: "SearchBoxNoResults",
20292
20306
  props: {
20293
20307
  labels: {}
20294
20308
  },
20295
20309
  setup(__props) {
20296
20310
  return (_ctx, _cache) => {
20297
- return openBlock(), createElementBlock("p", _hoisted_1$1h, toDisplayString(_ctx.labels.noResults), 1);
20311
+ return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
20298
20312
  };
20299
20313
  }
20300
20314
  });
@@ -20326,26 +20340,26 @@ const generateGridTemplate = (elements) => {
20326
20340
  }
20327
20341
  return gridTemplate.join(" ");
20328
20342
  };
20329
- const _hoisted_1$1g = ["innerHTML"];
20330
- const _hoisted_2$T = {
20343
+ const _hoisted_1$1j = ["innerHTML"];
20344
+ const _hoisted_2$V = {
20331
20345
  key: 1,
20332
20346
  "data-cy": "lupa-suggestion-value",
20333
20347
  class: "lupa-suggestion-value"
20334
20348
  };
20335
- const _hoisted_3$C = {
20349
+ const _hoisted_3$E = {
20336
20350
  key: 2,
20337
20351
  class: "lupa-suggestion-facet",
20338
20352
  "data-cy": "lupa-suggestion-facet"
20339
20353
  };
20340
- const _hoisted_4$s = {
20354
+ const _hoisted_4$u = {
20341
20355
  class: "lupa-suggestion-facet-label",
20342
20356
  "data-cy": "lupa-suggestion-facet-label"
20343
20357
  };
20344
- const _hoisted_5$j = {
20358
+ const _hoisted_5$k = {
20345
20359
  class: "lupa-suggestion-facet-value",
20346
20360
  "data-cy": "lupa-suggestion-facet-value"
20347
20361
  };
20348
- const _sfc_main$1t = /* @__PURE__ */ defineComponent({
20362
+ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
20349
20363
  __name: "SearchBoxSuggestion",
20350
20364
  props: {
20351
20365
  suggestion: {},
@@ -20382,20 +20396,20 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
20382
20396
  class: "lupa-suggestion-value",
20383
20397
  "data-cy": "lupa-suggestion-value",
20384
20398
  innerHTML: _ctx.suggestion.displayHighlight
20385
- }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
20386
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
20387
- createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
20388
- createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
20399
+ }, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
20400
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
20401
+ createBaseVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
20402
+ createBaseVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
20389
20403
  ])) : createCommentVNode("", true)
20390
20404
  ]);
20391
20405
  };
20392
20406
  }
20393
20407
  });
20394
- const _hoisted_1$1f = {
20408
+ const _hoisted_1$1i = {
20395
20409
  id: "lupa-search-box-suggestions",
20396
20410
  "data-cy": "lupa-search-box-suggestions"
20397
20411
  };
20398
- const _sfc_main$1s = /* @__PURE__ */ defineComponent({
20412
+ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20399
20413
  __name: "SearchBoxSuggestions",
20400
20414
  props: {
20401
20415
  items: {},
@@ -20462,9 +20476,9 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
20462
20476
  });
20463
20477
  });
20464
20478
  return (_ctx, _cache) => {
20465
- return openBlock(), createElementBlock("div", _hoisted_1$1f, [
20479
+ return openBlock(), createElementBlock("div", _hoisted_1$1i, [
20466
20480
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
20467
- return openBlock(), createBlock(_sfc_main$1t, {
20481
+ return openBlock(), createBlock(_sfc_main$1z, {
20468
20482
  key: getSuggestionKey(item),
20469
20483
  class: normalizeClass([
20470
20484
  "lupa-suggestion",
@@ -20496,7 +20510,7 @@ const debounce = (func, timeout) => {
20496
20510
  }, timeout);
20497
20511
  };
20498
20512
  };
20499
- const _sfc_main$1r = /* @__PURE__ */ defineComponent({
20513
+ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20500
20514
  __name: "SearchBoxSuggestionsWrapper",
20501
20515
  props: {
20502
20516
  panel: {},
@@ -20539,7 +20553,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
20539
20553
  const getSuggestionsDebounced = debounce(getSuggestions, props.debounce);
20540
20554
  watch(() => props.panel.limit, getSuggestionsDebounced);
20541
20555
  return (_ctx, _cache) => {
20542
- return openBlock(), createBlock(_sfc_main$1s, {
20556
+ return openBlock(), createBlock(_sfc_main$1y, {
20543
20557
  items: searchResult.value,
20544
20558
  highlight: _ctx.panel.highlight,
20545
20559
  queryKey: _ctx.panel.queryKey,
@@ -29821,9 +29835,9 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
29821
29835
  targetImage.src = placeholder;
29822
29836
  }
29823
29837
  };
29824
- const _hoisted_1$1e = ["src"];
29825
- const _hoisted_2$S = ["src"];
29826
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
29838
+ const _hoisted_1$1h = ["src"];
29839
+ const _hoisted_2$U = ["src"];
29840
+ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
29827
29841
  __name: "ProductImage",
29828
29842
  props: {
29829
29843
  item: {},
@@ -29965,7 +29979,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
29965
29979
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
29966
29980
  onError: replaceWithPlaceholder,
29967
29981
  key: finalUrl.value
29968
- }), null, 16, _hoisted_1$1e))
29982
+ }), null, 16, _hoisted_1$1h))
29969
29983
  ]),
29970
29984
  _: 1
29971
29985
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -29973,12 +29987,12 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
29973
29987
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
29974
29988
  style: styleOverride.value,
29975
29989
  src: finalMainImageUrl.value
29976
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$S))
29990
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$U))
29977
29991
  ], 38);
29978
29992
  };
29979
29993
  }
29980
29994
  });
29981
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
29995
+ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
29982
29996
  __name: "SearchBoxProductImage",
29983
29997
  props: {
29984
29998
  item: {},
@@ -29986,7 +30000,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
29986
30000
  },
29987
30001
  setup(__props) {
29988
30002
  return (_ctx, _cache) => {
29989
- return openBlock(), createBlock(_sfc_main$1q, {
30003
+ return openBlock(), createBlock(_sfc_main$1w, {
29990
30004
  item: _ctx.item,
29991
30005
  options: _ctx.options,
29992
30006
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -29995,12 +30009,12 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
29995
30009
  };
29996
30010
  }
29997
30011
  });
29998
- const _hoisted_1$1d = ["innerHTML"];
29999
- const _hoisted_2$R = {
30012
+ const _hoisted_1$1g = ["innerHTML"];
30013
+ const _hoisted_2$T = {
30000
30014
  key: 1,
30001
30015
  class: "lupa-search-box-product-title"
30002
30016
  };
30003
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30017
+ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
30004
30018
  __name: "SearchBoxProductTitle",
30005
30019
  props: {
30006
30020
  item: {},
@@ -30023,18 +30037,18 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30023
30037
  key: 0,
30024
30038
  class: "lupa-search-box-product-title",
30025
30039
  innerHTML: sanitizedTitle.value
30026
- }, null, 8, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", _hoisted_2$R, [
30040
+ }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, [
30027
30041
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
30028
30042
  ]));
30029
30043
  };
30030
30044
  }
30031
30045
  });
30032
- const _hoisted_1$1c = ["innerHTML"];
30033
- const _hoisted_2$Q = {
30046
+ const _hoisted_1$1f = ["innerHTML"];
30047
+ const _hoisted_2$S = {
30034
30048
  key: 1,
30035
30049
  class: "lupa-search-box-product-description"
30036
30050
  };
30037
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
30051
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
30038
30052
  __name: "SearchBoxProductDescription",
30039
30053
  props: {
30040
30054
  item: {},
@@ -30057,12 +30071,12 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
30057
30071
  key: 0,
30058
30072
  class: "lupa-search-box-product-description",
30059
30073
  innerHTML: sanitizedDescription.value
30060
- }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(description.value), 1));
30074
+ }, null, 8, _hoisted_1$1f)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(description.value), 1));
30061
30075
  };
30062
30076
  }
30063
30077
  });
30064
- const _hoisted_1$1b = { class: "lupa-search-box-product-price" };
30065
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30078
+ const _hoisted_1$1e = { class: "lupa-search-box-product-price" };
30079
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
30066
30080
  __name: "SearchBoxProductPrice",
30067
30081
  props: {
30068
30082
  item: {},
@@ -30084,13 +30098,13 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30084
30098
  );
30085
30099
  });
30086
30100
  return (_ctx, _cache) => {
30087
- return openBlock(), createElementBlock("div", _hoisted_1$1b, [
30101
+ return openBlock(), createElementBlock("div", _hoisted_1$1e, [
30088
30102
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
30089
30103
  ]);
30090
30104
  };
30091
30105
  }
30092
30106
  });
30093
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30107
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
30094
30108
  __name: "SearchBoxProductRegularPrice",
30095
30109
  props: {
30096
30110
  item: {},
@@ -30121,12 +30135,12 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30121
30135
  };
30122
30136
  }
30123
30137
  });
30124
- const _hoisted_1$1a = ["innerHTML"];
30125
- const _hoisted_2$P = { key: 0 };
30126
- const _hoisted_3$B = { key: 1 };
30127
- const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
30128
- const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
30129
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30138
+ const _hoisted_1$1d = ["innerHTML"];
30139
+ const _hoisted_2$R = { key: 0 };
30140
+ const _hoisted_3$D = { key: 1 };
30141
+ const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
30142
+ const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
30143
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
30130
30144
  __name: "SearchBoxProductCustom",
30131
30145
  props: {
30132
30146
  item: {},
@@ -30152,20 +30166,20 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30152
30166
  key: 0,
30153
30167
  class: [className.value, "lupa-search-box-product-custom"],
30154
30168
  innerHTML: text.value
30155
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", mergeProps({
30169
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", mergeProps({
30156
30170
  key: 1,
30157
30171
  class: [className.value, "lupa-search-box-product-custom"]
30158
30172
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
30159
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
30160
- createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
30161
- createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
30173
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
30174
+ createBaseVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
30175
+ createBaseVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
30162
30176
  ]))
30163
30177
  ], 16));
30164
30178
  };
30165
30179
  }
30166
30180
  });
30167
- const _hoisted_1$19 = ["innerHTML"];
30168
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30181
+ const _hoisted_1$1c = ["innerHTML"];
30182
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
30169
30183
  __name: "SearchBoxProductCustomHtml",
30170
30184
  props: {
30171
30185
  item: {},
@@ -30190,7 +30204,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30190
30204
  return openBlock(), createElementBlock("div", mergeProps({
30191
30205
  class: className.value,
30192
30206
  innerHTML: text.value
30193
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$19);
30207
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1c);
30194
30208
  };
30195
30209
  }
30196
30210
  });
@@ -30248,7 +30262,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30248
30262
  const loadingFacets = ref(false);
30249
30263
  const loadingRefiners = ref(false);
30250
30264
  const loadingRelatedQueries = ref(false);
30251
- const isMobileSidebarVisible = ref(false);
30265
+ const isFilterSidebarVisible = ref(false);
30266
+ const isSidebarClosing = ref(false);
30267
+ const isSortingSidebarVisible = ref(false);
30252
30268
  const relatedCategoryChildren = ref([]);
30253
30269
  const lastRequestId = ref("");
30254
30270
  const searchRequestResults = ref({});
@@ -30330,16 +30346,36 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30330
30346
  return hasResults.value && ((_a25 = searchResult.value.offset) != null ? _a25 : 0) >= totalItems.value;
30331
30347
  }
30332
30348
  );
30349
+ const toggleSidebarState = ({
30350
+ visible,
30351
+ sidebar = "filter"
30352
+ }) => {
30353
+ if (sidebar === "sorting") {
30354
+ isSortingSidebarVisible.value = visible;
30355
+ return;
30356
+ }
30357
+ isFilterSidebarVisible.value = visible;
30358
+ };
30333
30359
  const setSidebarState = ({
30334
30360
  visible,
30335
- disableBodyScrolling = true
30361
+ disableBodyScrolling = true,
30362
+ sidebar = "filter"
30336
30363
  }) => {
30364
+ var _a25, _b25, _c, _d;
30337
30365
  if (visible && disableBodyScrolling) {
30338
30366
  disableBodyScroll();
30339
30367
  } else {
30340
30368
  enableBodyScroll();
30341
30369
  }
30342
- isMobileSidebarVisible.value = visible;
30370
+ 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)) {
30371
+ toggleSidebarState({ visible, sidebar });
30372
+ } else {
30373
+ isSidebarClosing.value = true;
30374
+ setTimeout(() => {
30375
+ toggleSidebarState({ visible, sidebar });
30376
+ isSidebarClosing.value = false;
30377
+ }, searchResultOptions.value.filters.facets.style.drawer.sidebarCloseDelay);
30378
+ }
30343
30379
  };
30344
30380
  const queryFacet = (_0) => __async2(null, [_0], function* ({ queryKey, facetKey }) {
30345
30381
  var _a25, _b25, _c, _d;
@@ -30441,13 +30477,28 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30441
30477
  const setRelatedCategoryChildren = (children) => {
30442
30478
  relatedCategoryChildren.value = [...children];
30443
30479
  };
30480
+ const preconfiguredRelatedQueryKeys = computed(() => {
30481
+ var _a25, _b25, _c, _d, _e;
30482
+ 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 : [];
30483
+ });
30484
+ const relatedQueryFacetKeys = computed(() => {
30485
+ var _a25, _b25, _c;
30486
+ const keysFromRelatedResults = (_c = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.map((rq) => rq.facetKey)) != null ? _c : [];
30487
+ return Array.from(/* @__PURE__ */ new Set([...preconfiguredRelatedQueryKeys.value, ...keysFromRelatedResults]));
30488
+ });
30444
30489
  const queryRelatedQueries = (queryKey, publicQuery, result2, options) => __async2(null, null, function* () {
30445
- var _a25, _b25;
30490
+ var _a25, _b25, _c;
30446
30491
  loadingRelatedQueries.value = true;
30447
30492
  const context = getLupaTrackingContext();
30448
30493
  const searchText = (_b25 = (_a25 = result2.suggestedSearchText) != null ? _a25 : result2.searchText) != null ? _b25 : "";
30494
+ const publicQueryFiltersWithoutRelatedKeys = __spreadValues2({}, (_c = publicQuery.filters) != null ? _c : {});
30495
+ relatedQueryFacetKeys.value.forEach((facetKey) => {
30496
+ delete publicQueryFiltersWithoutRelatedKeys[facetKey];
30497
+ });
30498
+ const hasRemainingFilters = Object.keys(publicQueryFiltersWithoutRelatedKeys != null ? publicQueryFiltersWithoutRelatedKeys : {}).length > 0;
30449
30499
  const query = __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({}, publicQuery), {
30450
- searchText
30500
+ searchText,
30501
+ filters: hasRemainingFilters ? publicQueryFiltersWithoutRelatedKeys : void 0
30451
30502
  }), context), {
30452
30503
  modifiers: { facets: false, refiners: true }
30453
30504
  });
@@ -30463,7 +30514,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30463
30514
  });
30464
30515
  });
30465
30516
  return {
30466
- isMobileSidebarVisible,
30517
+ isFilterSidebarVisible,
30518
+ isSortingSidebarVisible,
30519
+ isSidebarClosing,
30467
30520
  searchResult,
30468
30521
  columnCount,
30469
30522
  addToCartAmount,
@@ -30489,6 +30542,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30489
30542
  relatedQueriesResult,
30490
30543
  relatedQueriesApiEnabled,
30491
30544
  lastResultsSource,
30545
+ relatedQueryFacetKeys,
30492
30546
  setSidebarState,
30493
30547
  queryFacet,
30494
30548
  setLastRequestId,
@@ -30505,12 +30559,12 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30505
30559
  setRelatedQueriesApiEnabled
30506
30560
  };
30507
30561
  });
30508
- const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
30509
- const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
30510
- const _hoisted_3$A = ["disabled"];
30511
- const _hoisted_4$q = ["href"];
30512
- const _hoisted_5$h = ["disabled"];
30513
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30562
+ const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
30563
+ const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
30564
+ const _hoisted_3$C = ["disabled"];
30565
+ const _hoisted_4$s = ["href"];
30566
+ const _hoisted_5$i = ["disabled"];
30567
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30514
30568
  __name: "SearchBoxProductAddToCart",
30515
30569
  props: {
30516
30570
  item: {},
@@ -30556,45 +30610,45 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30556
30610
  return Boolean(props.link && props.options.link);
30557
30611
  });
30558
30612
  return (_ctx, _cache) => {
30559
- return openBlock(), createElementBlock("div", _hoisted_1$18, [
30560
- createBaseVNode("div", _hoisted_2$O, [
30613
+ return openBlock(), createElementBlock("div", _hoisted_1$1b, [
30614
+ createBaseVNode("div", _hoisted_2$Q, [
30561
30615
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
30562
30616
  key: 0,
30563
30617
  class: addToCartButtonClass.value,
30564
30618
  "data-cy": "lupa-add-to-cart",
30565
30619
  disabled: !inStockValue.value || loading.value
30566
30620
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
30567
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
30568
- ], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
30621
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
30622
+ ], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
30569
30623
  key: 1,
30570
30624
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
30571
30625
  class: addToCartButtonClass.value,
30572
30626
  "data-cy": "lupa-add-to-cart",
30573
30627
  type: "button",
30574
30628
  disabled: !inStockValue.value || loading.value
30575
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
30629
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
30576
30630
  ])
30577
30631
  ]);
30578
30632
  };
30579
30633
  }
30580
30634
  });
30581
- const _hoisted_1$17 = {
30635
+ const _hoisted_1$1a = {
30582
30636
  key: 1,
30583
30637
  class: "lupa-search-box-element-badge-wrapper"
30584
30638
  };
30585
30639
  const __default__$4 = {
30586
30640
  components: {
30587
- SearchBoxProductImage: _sfc_main$1p,
30588
- SearchBoxProductTitle: _sfc_main$1o,
30589
- SearchBoxProductDescription: _sfc_main$1n,
30590
- SearchBoxProductPrice: _sfc_main$1m,
30591
- SearchBoxProductRegularPrice: _sfc_main$1l,
30592
- SearchBoxProductCustom: _sfc_main$1k,
30593
- SearchBoxProductCustomHtml: _sfc_main$1j,
30594
- SearchBoxProductAddToCart: _sfc_main$1i
30641
+ SearchBoxProductImage: _sfc_main$1v,
30642
+ SearchBoxProductTitle: _sfc_main$1u,
30643
+ SearchBoxProductDescription: _sfc_main$1t,
30644
+ SearchBoxProductPrice: _sfc_main$1s,
30645
+ SearchBoxProductRegularPrice: _sfc_main$1r,
30646
+ SearchBoxProductCustom: _sfc_main$1q,
30647
+ SearchBoxProductCustomHtml: _sfc_main$1p,
30648
+ SearchBoxProductAddToCart: _sfc_main$1o
30595
30649
  }
30596
30650
  };
30597
- const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
30651
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
30598
30652
  __name: "SearchBoxProductElement",
30599
30653
  props: {
30600
30654
  item: {},
@@ -30666,7 +30720,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
30666
30720
  "dynamic-attributes": dynamicAttributes.value,
30667
30721
  link: _ctx.link
30668
30722
  }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
30669
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$17, [
30723
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$1a, [
30670
30724
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
30671
30725
  key: 0,
30672
30726
  item: enhancedItem.value,
@@ -30681,14 +30735,14 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
30681
30735
  };
30682
30736
  }
30683
30737
  }));
30684
- const _hoisted_1$16 = { class: "lupa-badge-title" };
30685
- const _hoisted_2$N = ["src"];
30686
- const _hoisted_3$z = { key: 1 };
30687
- const _hoisted_4$p = {
30738
+ const _hoisted_1$19 = { class: "lupa-badge-title" };
30739
+ const _hoisted_2$P = ["src"];
30740
+ const _hoisted_3$B = { key: 1 };
30741
+ const _hoisted_4$r = {
30688
30742
  key: 0,
30689
30743
  class: "lupa-badge-full-text"
30690
30744
  };
30691
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
30745
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30692
30746
  __name: "SearchResultGeneratedBadge",
30693
30747
  props: {
30694
30748
  options: {},
@@ -30721,20 +30775,20 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
30721
30775
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
30722
30776
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
30723
30777
  }, [
30724
- createBaseVNode("span", _hoisted_1$16, [
30778
+ createBaseVNode("span", _hoisted_1$19, [
30725
30779
  image.value ? (openBlock(), createElementBlock("img", {
30726
30780
  key: 0,
30727
30781
  src: image.value
30728
- }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
30729
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30782
+ }, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
30783
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30730
30784
  ]),
30731
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30785
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30732
30786
  ], 6);
30733
30787
  };
30734
30788
  }
30735
30789
  });
30736
- const _hoisted_1$15 = { class: "lupa-generated-badges" };
30737
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
30790
+ const _hoisted_1$18 = { class: "lupa-generated-badges" };
30791
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30738
30792
  __name: "SearchResultGeneratedBadges",
30739
30793
  props: {
30740
30794
  options: {}
@@ -30760,9 +30814,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
30760
30814
  })).filter((b) => Boolean(b.id));
30761
30815
  });
30762
30816
  return (_ctx, _cache) => {
30763
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
30817
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
30764
30818
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
30765
- return openBlock(), createBlock(_sfc_main$1g, {
30819
+ return openBlock(), createBlock(_sfc_main$1m, {
30766
30820
  key: badge.id,
30767
30821
  badge,
30768
30822
  options: _ctx.options
@@ -30772,8 +30826,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
30772
30826
  };
30773
30827
  }
30774
30828
  });
30775
- const _hoisted_1$14 = ["innerHTML"];
30776
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
30829
+ const _hoisted_1$17 = ["innerHTML"];
30830
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30777
30831
  __name: "CustomBadge",
30778
30832
  props: {
30779
30833
  badge: {}
@@ -30794,12 +30848,12 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
30794
30848
  return openBlock(), createElementBlock("div", {
30795
30849
  class: normalizeClass(className.value),
30796
30850
  innerHTML: text.value
30797
- }, null, 10, _hoisted_1$14);
30851
+ }, null, 10, _hoisted_1$17);
30798
30852
  };
30799
30853
  }
30800
30854
  });
30801
- const _hoisted_1$13 = { class: "lupa-text-badges" };
30802
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
30855
+ const _hoisted_1$16 = { class: "lupa-text-badges" };
30856
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30803
30857
  __name: "TextBadge",
30804
30858
  props: {
30805
30859
  badge: {}
@@ -30813,7 +30867,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
30813
30867
  return badges.value.slice(0, props.badge.maxItems);
30814
30868
  });
30815
30869
  return (_ctx, _cache) => {
30816
- return openBlock(), createElementBlock("div", _hoisted_1$13, [
30870
+ return openBlock(), createElementBlock("div", _hoisted_1$16, [
30817
30871
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
30818
30872
  return openBlock(), createElementBlock("div", {
30819
30873
  class: "lupa-badge lupa-text-badge",
@@ -30824,9 +30878,9 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
30824
30878
  };
30825
30879
  }
30826
30880
  });
30827
- const _hoisted_1$12 = { class: "lupa-image-badges" };
30828
- const _hoisted_2$M = ["src"];
30829
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
30881
+ const _hoisted_1$15 = { class: "lupa-image-badges" };
30882
+ const _hoisted_2$O = ["src"];
30883
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30830
30884
  __name: "ImageBadge",
30831
30885
  props: {
30832
30886
  badge: {}
@@ -30846,7 +30900,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
30846
30900
  return `${props.badge.rootImageUrl}${src}`;
30847
30901
  };
30848
30902
  return (_ctx, _cache) => {
30849
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
30903
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
30850
30904
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
30851
30905
  return openBlock(), createElementBlock("div", {
30852
30906
  class: "lupa-badge lupa-image-badge",
@@ -30854,14 +30908,14 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
30854
30908
  }, [
30855
30909
  createBaseVNode("img", {
30856
30910
  src: getImageUrl(item)
30857
- }, null, 8, _hoisted_2$M)
30911
+ }, null, 8, _hoisted_2$O)
30858
30912
  ]);
30859
30913
  }), 128))
30860
30914
  ]);
30861
30915
  };
30862
30916
  }
30863
30917
  });
30864
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
30918
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
30865
30919
  __name: "DiscountBadge",
30866
30920
  props: {
30867
30921
  badge: {}
@@ -30923,16 +30977,16 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
30923
30977
  };
30924
30978
  }
30925
30979
  });
30926
- const _hoisted_1$11 = { id: "lupa-search-results-badges" };
30980
+ const _hoisted_1$14 = { id: "lupa-search-results-badges" };
30927
30981
  const __default__$3 = {
30928
30982
  components: {
30929
- CustomBadge: _sfc_main$1e,
30930
- TextBadge: _sfc_main$1d,
30931
- ImageBadge: _sfc_main$1c,
30932
- DiscountBadge: _sfc_main$1b
30983
+ CustomBadge: _sfc_main$1k,
30984
+ TextBadge: _sfc_main$1j,
30985
+ ImageBadge: _sfc_main$1i,
30986
+ DiscountBadge: _sfc_main$1h
30933
30987
  }
30934
30988
  };
30935
- const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
30989
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
30936
30990
  __name: "SearchResultsBadgeWrapper",
30937
30991
  props: {
30938
30992
  position: {},
@@ -30995,7 +31049,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
30995
31049
  }
30996
31050
  };
30997
31051
  return (_ctx, _cache) => {
30998
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
31052
+ return openBlock(), createElementBlock("div", _hoisted_1$14, [
30999
31053
  createBaseVNode("div", {
31000
31054
  id: "lupa-badges",
31001
31055
  class: normalizeClass(anchorPosition.value)
@@ -31006,7 +31060,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31006
31060
  badge
31007
31061
  }, null, 8, ["badge"]);
31008
31062
  }), 128)),
31009
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1f, {
31063
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1l, {
31010
31064
  key: 0,
31011
31065
  options: _ctx.options
31012
31066
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -31015,13 +31069,13 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31015
31069
  };
31016
31070
  }
31017
31071
  }));
31018
- const _hoisted_1$10 = ["href"];
31019
- const _hoisted_2$L = { class: "lupa-search-box-product-details-section" };
31020
- const _hoisted_3$y = {
31072
+ const _hoisted_1$13 = ["href"];
31073
+ const _hoisted_2$N = { class: "lupa-search-box-product-details-section" };
31074
+ const _hoisted_3$A = {
31021
31075
  key: 0,
31022
31076
  class: "lupa-search-box-product-add-to-cart-section"
31023
31077
  };
31024
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31078
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
31025
31079
  __name: "SearchBoxProduct",
31026
31080
  props: {
31027
31081
  item: {},
@@ -31127,7 +31181,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31127
31181
  style: normalizeStyle(imageStyleOverride.value)
31128
31182
  }, [
31129
31183
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
31130
- return openBlock(), createBlock(_sfc_main$1h, {
31184
+ return openBlock(), createBlock(_sfc_main$1n, {
31131
31185
  class: "lupa-search-box-product-element",
31132
31186
  key: element.key,
31133
31187
  item: _ctx.item,
@@ -31137,10 +31191,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31137
31191
  }, null, 8, ["item", "element", "labels", "link"]);
31138
31192
  }), 128))
31139
31193
  ], 4),
31140
- createBaseVNode("div", _hoisted_2$L, [
31194
+ createBaseVNode("div", _hoisted_2$N, [
31141
31195
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
31142
31196
  var _a25;
31143
- return openBlock(), createBlock(_sfc_main$1h, {
31197
+ return openBlock(), createBlock(_sfc_main$1n, {
31144
31198
  class: "lupa-search-box-product-element",
31145
31199
  key: element.key,
31146
31200
  item: _ctx.item,
@@ -31151,7 +31205,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31151
31205
  ((_a25 = badgeOptions.value) == null ? void 0 : _a25.anchorElementKey) === element.key ? {
31152
31206
  name: "badges",
31153
31207
  fn: withCtx(() => [
31154
- createVNode(_sfc_main$1a, {
31208
+ createVNode(_sfc_main$1g, {
31155
31209
  options: badgeOptions.value,
31156
31210
  position: "card"
31157
31211
  }, null, 8, ["options"])
@@ -31167,7 +31221,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31167
31221
  class: normalizeClass(`lupa-search-box-group-${group}`)
31168
31222
  }, [
31169
31223
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
31170
- return openBlock(), createBlock(_sfc_main$1h, {
31224
+ return openBlock(), createBlock(_sfc_main$1n, {
31171
31225
  class: "lupa-search-box-product-element",
31172
31226
  key: element.key,
31173
31227
  item: _ctx.item,
@@ -31179,8 +31233,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31179
31233
  }), 128))
31180
31234
  ], 2);
31181
31235
  }), 128)),
31182
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
31183
- createVNode(_sfc_main$1h, {
31236
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
31237
+ createVNode(_sfc_main$1n, {
31184
31238
  class: "lupa-search-box-product-element",
31185
31239
  item: _ctx.item,
31186
31240
  element: addToCartElement.value,
@@ -31189,7 +31243,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31189
31243
  isInStock: isInStock.value
31190
31244
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
31191
31245
  ])) : createCommentVNode("", true)
31192
- ], 16, _hoisted_1$10);
31246
+ ], 16, _hoisted_1$13);
31193
31247
  };
31194
31248
  }
31195
31249
  });
@@ -31261,8 +31315,8 @@ const useTrackingStore = /* @__PURE__ */ defineStore("tracking", () => {
31261
31315
  };
31262
31316
  return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
31263
31317
  });
31264
- const _hoisted_1$$ = { id: "lupa-search-box-products" };
31265
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
31318
+ const _hoisted_1$12 = { id: "lupa-search-box-products" };
31319
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31266
31320
  __name: "SearchBoxProducts",
31267
31321
  props: {
31268
31322
  items: {},
@@ -31334,7 +31388,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
31334
31388
  }
31335
31389
  };
31336
31390
  return (_ctx, _cache) => {
31337
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
31391
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [
31338
31392
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
31339
31393
  return renderSlot(_ctx.$slots, "productCard", {
31340
31394
  key: index,
@@ -31346,7 +31400,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
31346
31400
  itemClicked: handleProductClick
31347
31401
  });
31348
31402
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
31349
- return openBlock(), createBlock(_sfc_main$19, {
31403
+ return openBlock(), createBlock(_sfc_main$1f, {
31350
31404
  key: index,
31351
31405
  item,
31352
31406
  panelOptions: _ctx.panelOptions,
@@ -31361,9 +31415,9 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
31361
31415
  };
31362
31416
  }
31363
31417
  });
31364
- const _hoisted_1$_ = { class: "lupa-search-box-documents-go-to-results-wrapper" };
31365
- const _hoisted_2$K = { key: 0 };
31366
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
31418
+ const _hoisted_1$11 = { class: "lupa-search-box-documents-go-to-results-wrapper" };
31419
+ const _hoisted_2$M = { key: 0 };
31420
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
31367
31421
  __name: "SearchBoxProductsGoToResultsButton",
31368
31422
  props: {
31369
31423
  options: {},
@@ -31394,13 +31448,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
31394
31448
  emit2("goToResults");
31395
31449
  };
31396
31450
  return (_ctx, _cache) => {
31397
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
31451
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
31398
31452
  createBaseVNode("button", {
31399
31453
  class: "lupa-search-box-documents-go-to-results-button",
31400
31454
  onClick: goToResults
31401
31455
  }, [
31402
31456
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
31403
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$K, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
31457
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$M, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
31404
31458
  ])
31405
31459
  ]);
31406
31460
  };
@@ -31496,7 +31550,7 @@ const processExtractionObject = (value = {}) => {
31496
31550
  }
31497
31551
  return parsedObject;
31498
31552
  };
31499
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
31553
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
31500
31554
  __name: "SearchBoxProductsWrapper",
31501
31555
  props: {
31502
31556
  panel: {},
@@ -31566,7 +31620,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
31566
31620
  watch(() => props.panel.limit, getItemsDebounced);
31567
31621
  return (_ctx, _cache) => {
31568
31622
  var _a25, _b25;
31569
- return openBlock(), createBlock(_sfc_main$18, {
31623
+ return openBlock(), createBlock(_sfc_main$1e, {
31570
31624
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
31571
31625
  panelOptions: _ctx.panel,
31572
31626
  labels: _ctx.labels,
@@ -31576,7 +31630,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
31576
31630
  default: withCtx(() => {
31577
31631
  var _a26;
31578
31632
  return [
31579
- showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$17, {
31633
+ showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$1d, {
31580
31634
  key: 0,
31581
31635
  options: _ctx.searchBoxOptions,
31582
31636
  panel: _ctx.panel,
@@ -31597,7 +31651,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
31597
31651
  };
31598
31652
  }
31599
31653
  });
31600
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
31654
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
31601
31655
  __name: "SearchBoxRelatedSourceWrapper",
31602
31656
  props: {
31603
31657
  panel: {},
@@ -31669,7 +31723,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
31669
31723
  });
31670
31724
  return (_ctx, _cache) => {
31671
31725
  var _a25, _b25;
31672
- return openBlock(), createBlock(_sfc_main$18, {
31726
+ return openBlock(), createBlock(_sfc_main$1e, {
31673
31727
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
31674
31728
  panelOptions: documentPanelOptions.value,
31675
31729
  labels: _ctx.labels,
@@ -31687,31 +31741,31 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
31687
31741
  };
31688
31742
  }
31689
31743
  });
31690
- const _hoisted_1$Z = {
31744
+ const _hoisted_1$10 = {
31691
31745
  key: 0,
31692
31746
  id: "lupa-search-box-panel"
31693
31747
  };
31694
- const _hoisted_2$J = ["data-cy"];
31695
- const _hoisted_3$x = {
31748
+ const _hoisted_2$L = ["data-cy"];
31749
+ const _hoisted_3$z = {
31696
31750
  key: 0,
31697
31751
  class: "lupa-panel-title lupa-panel-title-top-results"
31698
31752
  };
31699
- const _hoisted_4$o = {
31753
+ const _hoisted_4$q = {
31700
31754
  key: 1,
31701
31755
  class: "lupa-panel-title"
31702
31756
  };
31703
- const _hoisted_5$g = {
31757
+ const _hoisted_5$h = {
31704
31758
  key: 1,
31705
31759
  id: "lupa-search-box-panel"
31706
31760
  };
31707
31761
  const __default__$2 = {
31708
31762
  components: {
31709
- SearchBoxSuggestionsWrapper: _sfc_main$1r,
31710
- SearchBoxProductsWrapper: _sfc_main$16,
31711
- SearchBoxRelatedSourceWrapper: _sfc_main$15
31763
+ SearchBoxSuggestionsWrapper: _sfc_main$1x,
31764
+ SearchBoxProductsWrapper: _sfc_main$1c,
31765
+ SearchBoxRelatedSourceWrapper: _sfc_main$1b
31712
31766
  }
31713
31767
  };
31714
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
31768
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
31715
31769
  __name: "SearchBoxMainPanel",
31716
31770
  props: {
31717
31771
  options: {},
@@ -31876,7 +31930,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31876
31930
  ref_key: "panelContainer",
31877
31931
  ref: panelContainer
31878
31932
  }, [
31879
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
31933
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
31880
31934
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
31881
31935
  key: 0,
31882
31936
  class: "lupa-search-box-close-panel",
@@ -31898,8 +31952,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31898
31952
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
31899
31953
  "data-cy": "lupa-panel-" + panel.type + "-index"
31900
31954
  }, [
31901
- ((_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),
31902
- ((_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),
31955
+ ((_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),
31956
+ ((_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),
31903
31957
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
31904
31958
  key: 2,
31905
31959
  panel,
@@ -31921,21 +31975,21 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31921
31975
  key: "0"
31922
31976
  } : void 0
31923
31977
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
31924
- ], 14, _hoisted_2$J);
31978
+ ], 14, _hoisted_2$L);
31925
31979
  }), 128))
31926
31980
  ], 4),
31927
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1u, {
31981
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
31928
31982
  key: 1,
31929
31983
  labels: labels.value
31930
31984
  }, null, 8, ["labels"])) : createCommentVNode("", true),
31931
- displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1x, {
31985
+ displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
31932
31986
  key: 2,
31933
31987
  labels: labels.value,
31934
31988
  options: _ctx.options,
31935
31989
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
31936
31990
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
31937
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
31938
- createVNode(_sfc_main$1v, {
31991
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
31992
+ createVNode(_sfc_main$1B, {
31939
31993
  options: _ctx.options.history,
31940
31994
  history: history.value,
31941
31995
  onGoToResults: handleGoToResults,
@@ -31960,8 +32014,8 @@ const unbindSearchTriggers = (triggers = [], event) => {
31960
32014
  const elements = getElements(triggers);
31961
32015
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
31962
32016
  };
31963
- const _hoisted_1$Y = { class: "lupa-search-box-wrapper" };
31964
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32017
+ const _hoisted_1$$ = { class: "lupa-search-box-wrapper" };
32018
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31965
32019
  __name: "SearchBox",
31966
32020
  props: {
31967
32021
  options: {},
@@ -32284,8 +32338,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32284
32338
  id: "lupa-search-box",
32285
32339
  class: normalizeClass({ "lupa-search-box-opened": opened.value })
32286
32340
  }, [
32287
- createBaseVNode("div", _hoisted_1$Y, [
32288
- createVNode(_sfc_main$1y, {
32341
+ createBaseVNode("div", _hoisted_1$$, [
32342
+ createVNode(_sfc_main$1E, {
32289
32343
  options: inputOptions.value,
32290
32344
  suggestedValue: suggestedValue.value,
32291
32345
  "can-close": (_a26 = _ctx.isSearchContainer) != null ? _a26 : false,
@@ -32298,7 +32352,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32298
32352
  onSearch: handleSearch,
32299
32353
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
32300
32354
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
32301
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$14, {
32355
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$1a, {
32302
32356
  key: 0,
32303
32357
  options: panelOptions.value,
32304
32358
  inputValue: inputValue.value,
@@ -32386,20 +32440,20 @@ const getSearchParams = (url, params, baseUrl) => {
32386
32440
  }
32387
32441
  return searchParams;
32388
32442
  };
32389
- const _hoisted_1$X = {
32443
+ const _hoisted_1$_ = {
32390
32444
  key: 0,
32391
32445
  id: "lupa-search-results-did-you-mean"
32392
32446
  };
32393
- const _hoisted_2$I = {
32447
+ const _hoisted_2$K = {
32394
32448
  key: 0,
32395
32449
  "data-cy": "suggested-search-text-label"
32396
32450
  };
32397
- const _hoisted_3$w = {
32451
+ const _hoisted_3$y = {
32398
32452
  key: 1,
32399
32453
  "data-cy": "did-you-mean-label"
32400
32454
  };
32401
- const _hoisted_4$n = { key: 1 };
32402
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32455
+ const _hoisted_4$p = { key: 1 };
32456
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
32403
32457
  __name: "SearchResultsDidYouMean",
32404
32458
  props: {
32405
32459
  labels: {}
@@ -32431,8 +32485,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32431
32485
  paramStore.goToResults({ searchText, facet });
32432
32486
  };
32433
32487
  return (_ctx, _cache) => {
32434
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$X, [
32435
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
32488
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$_, [
32489
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$K, [
32436
32490
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
32437
32491
  return openBlock(), createElementBlock("span", { key: index }, [
32438
32492
  createBaseVNode("span", {
@@ -32441,7 +32495,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32441
32495
  ]);
32442
32496
  }), 128))
32443
32497
  ])) : createCommentVNode("", true),
32444
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
32498
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
32445
32499
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
32446
32500
  return openBlock(), createElementBlock("span", { key: index }, [
32447
32501
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -32449,7 +32503,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32449
32503
  class: "lupa-did-you-mean lupa-highlighted-search-text",
32450
32504
  "data-cy": "did-you-mean-value",
32451
32505
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
32452
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
32506
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(label) + " ", 1))
32453
32507
  ]);
32454
32508
  }), 128))
32455
32509
  ])) : createCommentVNode("", true)
@@ -32457,12 +32511,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32457
32511
  };
32458
32512
  }
32459
32513
  });
32460
- const _hoisted_1$W = {
32514
+ const _hoisted_1$Z = {
32461
32515
  key: 0,
32462
32516
  class: "lupa-search-results-summary"
32463
32517
  };
32464
- const _hoisted_2$H = ["innerHTML"];
32465
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32518
+ const _hoisted_2$J = ["innerHTML"];
32519
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
32466
32520
  __name: "SearchResultsSummary",
32467
32521
  props: {
32468
32522
  label: {},
@@ -32477,8 +32531,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32477
32531
  return addParamsToLabel(props.label, range2, `<span>${totalItems.value}</span>`);
32478
32532
  });
32479
32533
  return (_ctx, _cache) => {
32480
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
32481
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$H),
32534
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
32535
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$J),
32482
32536
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
32483
32537
  key: 0,
32484
32538
  class: "lupa-filter-clear",
@@ -32489,19 +32543,19 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32489
32543
  };
32490
32544
  }
32491
32545
  });
32492
- const _hoisted_1$V = {
32546
+ const _hoisted_1$Y = {
32493
32547
  key: 0,
32494
32548
  class: "lupa-result-page-title",
32495
32549
  "data-cy": "lupa-result-page-title"
32496
32550
  };
32497
- const _hoisted_2$G = { key: 0 };
32498
- const _hoisted_3$v = {
32551
+ const _hoisted_2$I = { key: 0 };
32552
+ const _hoisted_3$x = {
32499
32553
  key: 1,
32500
32554
  class: "lupa-results-total-count"
32501
32555
  };
32502
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
32503
- const _hoisted_5$f = ["innerHTML"];
32504
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32556
+ const _hoisted_4$o = { class: "lupa-results-total-count-number" };
32557
+ const _hoisted_5$g = ["innerHTML"];
32558
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
32505
32559
  __name: "SearchResultsTitle",
32506
32560
  props: {
32507
32561
  options: {},
@@ -32544,16 +32598,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32544
32598
  });
32545
32599
  return (_ctx, _cache) => {
32546
32600
  return openBlock(), createElementBlock("div", null, [
32547
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$V, [
32601
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$Y, [
32548
32602
  createTextVNode(toDisplayString(searchResultsTitleTemplate.value || _ctx.options.labels.searchResults), 1),
32549
- queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32550
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
32603
+ queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$I, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32604
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
32551
32605
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
32552
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
32606
+ createBaseVNode("span", _hoisted_4$o, toDisplayString(unref(totalItems)), 1),
32553
32607
  _cache[0] || (_cache[0] = createTextVNode(")"))
32554
32608
  ])) : createCommentVNode("", true)
32555
32609
  ])) : createCommentVNode("", true),
32556
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$11, {
32610
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$17, {
32557
32611
  key: 1,
32558
32612
  label: summaryLabel.value
32559
32613
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -32561,20 +32615,20 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32561
32615
  key: 2,
32562
32616
  class: "lupa-result-page-description-top",
32563
32617
  innerHTML: descriptionTop.value
32564
- }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
32618
+ }, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
32565
32619
  ]);
32566
32620
  };
32567
32621
  }
32568
32622
  });
32569
- const _hoisted_1$U = {
32623
+ const _hoisted_1$X = {
32570
32624
  class: "lupa-current-filter-label",
32571
32625
  "data-cy": "lupa-current-filter-label"
32572
32626
  };
32573
- const _hoisted_2$F = {
32627
+ const _hoisted_2$H = {
32574
32628
  class: "lupa-current-filter-value",
32575
32629
  "data-cy": "lupa-current-filter-value"
32576
32630
  };
32577
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
32631
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
32578
32632
  __name: "CurrentFilterDisplay",
32579
32633
  props: {
32580
32634
  filter: {}
@@ -32616,23 +32670,23 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
32616
32670
  onClick: handleClick,
32617
32671
  "aria-label": "Remove filter"
32618
32672
  }, "⨉"),
32619
- createBaseVNode("div", _hoisted_1$U, toDisplayString(_ctx.filter.label) + ": ", 1),
32620
- createBaseVNode("div", _hoisted_2$F, toDisplayString(formatFilterValue(props.filter)), 1)
32673
+ createBaseVNode("div", _hoisted_1$X, toDisplayString(_ctx.filter.label) + ": ", 1),
32674
+ createBaseVNode("div", _hoisted_2$H, toDisplayString(formatFilterValue(props.filter)), 1)
32621
32675
  ], 2);
32622
32676
  };
32623
32677
  }
32624
32678
  });
32625
- const _hoisted_1$T = { class: "lupa-filter-title-text" };
32626
- const _hoisted_2$E = {
32679
+ const _hoisted_1$W = { class: "lupa-filter-title-text" };
32680
+ const _hoisted_2$G = {
32627
32681
  key: 0,
32628
32682
  class: "lupa-filter-count"
32629
32683
  };
32630
- const _hoisted_3$u = {
32684
+ const _hoisted_3$w = {
32631
32685
  key: 0,
32632
32686
  class: "filter-values"
32633
32687
  };
32634
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
32635
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32688
+ const _hoisted_4$n = { class: "lupa-current-filter-list" };
32689
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
32636
32690
  __name: "CurrentFilters",
32637
32691
  props: {
32638
32692
  options: {},
@@ -32641,12 +32695,10 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32641
32695
  setup(__props) {
32642
32696
  const optionsStore = useOptionsStore();
32643
32697
  const { searchResultOptions } = storeToRefs(optionsStore);
32644
- const units = computed(
32645
- () => {
32646
- var _a25, _b25, _c, _d, _e;
32647
- return (_e = (_d = (_c = (_b25 = (_a25 = searchResultOptions == null ? void 0 : searchResultOptions.value) == null ? void 0 : _a25.filters) == null ? void 0 : _b25.facets) == null ? void 0 : _c.stats) == null ? void 0 : _d.units) != null ? _e : {};
32648
- }
32649
- );
32698
+ const units = computed(() => {
32699
+ var _a25, _b25, _c, _d, _e;
32700
+ return (_e = (_d = (_c = (_b25 = (_a25 = searchResultOptions == null ? void 0 : searchResultOptions.value) == null ? void 0 : _a25.filters) == null ? void 0 : _b25.facets) == null ? void 0 : _c.stats) == null ? void 0 : _d.units) != null ? _e : {};
32701
+ });
32650
32702
  const isOpen = ref(false);
32651
32703
  const paramsStore = useParamsStore();
32652
32704
  const optionStore = useOptionsStore();
@@ -32696,7 +32748,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32696
32748
  paramsStore.removeParameters({
32697
32749
  paramsToRemove: [
32698
32750
  optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE),
32699
- `${FACET_PARAMS_TYPE.RANGE}${filter.key}`
32751
+ `${FACET_PARAMS_TYPE.RANGE}${filter.key}`,
32752
+ `${FACET_PARAMS_TYPE.PARTIAL_RANGE}${filter.key}`
32700
32753
  ]
32701
32754
  });
32702
32755
  break;
@@ -32713,19 +32766,19 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32713
32766
  class: "lupa-current-filter-title",
32714
32767
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
32715
32768
  }, [
32716
- createBaseVNode("div", _hoisted_1$T, [
32769
+ createBaseVNode("div", _hoisted_1$W, [
32717
32770
  createTextVNode(toDisplayString((_c = (_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) != null ? _c : "") + " ", 1),
32718
- _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)
32719
32772
  ]),
32720
32773
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
32721
32774
  key: 0,
32722
32775
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
32723
32776
  }, null, 2)) : createCommentVNode("", true)
32724
32777
  ]),
32725
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
32726
- createBaseVNode("div", _hoisted_4$l, [
32778
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
32779
+ createBaseVNode("div", _hoisted_4$n, [
32727
32780
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
32728
- return openBlock(), createBlock(_sfc_main$$, {
32781
+ return openBlock(), createBlock(_sfc_main$15, {
32729
32782
  key: filter.key + "_" + filter.value,
32730
32783
  filter,
32731
32784
  units: units.value,
@@ -32743,8 +32796,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32743
32796
  };
32744
32797
  }
32745
32798
  });
32746
- const _hoisted_1$S = ["href"];
32747
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
32799
+ const _hoisted_1$V = ["href"];
32800
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32748
32801
  __name: "CategoryFilterItem",
32749
32802
  props: {
32750
32803
  options: {},
@@ -32781,20 +32834,20 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
32781
32834
  "data-cy": "lupa-child-category-item",
32782
32835
  href: urlLink.value,
32783
32836
  onClick: handleNavigation
32784
- }, toDisplayString(title.value), 9, _hoisted_1$S)
32837
+ }, toDisplayString(title.value), 9, _hoisted_1$V)
32785
32838
  ], 2);
32786
32839
  };
32787
32840
  }
32788
32841
  });
32789
- const _hoisted_1$R = {
32842
+ const _hoisted_1$U = {
32790
32843
  class: "lupa-category-filter",
32791
32844
  "data-cy": "lupa-category-filter"
32792
32845
  };
32793
- const _hoisted_2$D = { class: "lupa-category-back" };
32794
- const _hoisted_3$t = ["href"];
32795
- const _hoisted_4$k = ["href"];
32796
- const _hoisted_5$e = { class: "lupa-child-category-list" };
32797
- 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({
32798
32851
  __name: "CategoryFilter",
32799
32852
  props: {
32800
32853
  options: {}
@@ -32882,14 +32935,14 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32882
32935
  };
32883
32936
  __expose({ fetch: fetch2 });
32884
32937
  return (_ctx, _cache) => {
32885
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
32886
- createBaseVNode("div", _hoisted_2$D, [
32938
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
32939
+ createBaseVNode("div", _hoisted_2$F, [
32887
32940
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
32888
32941
  key: 0,
32889
32942
  "data-cy": "lupa-category-back",
32890
32943
  href: backUrlLink.value,
32891
32944
  onClick: handleNavigationBack
32892
- }, toDisplayString(backTitle.value), 9, _hoisted_3$t)) : createCommentVNode("", true)
32945
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$v)) : createCommentVNode("", true)
32893
32946
  ]),
32894
32947
  createBaseVNode("div", {
32895
32948
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -32899,11 +32952,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32899
32952
  href: parentUrlLink.value,
32900
32953
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
32901
32954
  onClick: handleNavigationParent
32902
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
32955
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$m)
32903
32956
  ], 2),
32904
- createBaseVNode("div", _hoisted_5$e, [
32957
+ createBaseVNode("div", _hoisted_5$f, [
32905
32958
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
32906
- return openBlock(), createBlock(_sfc_main$Z, {
32959
+ return openBlock(), createBlock(_sfc_main$13, {
32907
32960
  key: getCategoryKey(child),
32908
32961
  item: child,
32909
32962
  options: _ctx.options
@@ -32914,22 +32967,22 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32914
32967
  };
32915
32968
  }
32916
32969
  });
32917
- const _hoisted_1$Q = {
32970
+ const _hoisted_1$T = {
32918
32971
  class: "lupa-search-result-facet-term-values",
32919
32972
  "data-cy": "lupa-search-result-facet-term-values"
32920
32973
  };
32921
- const _hoisted_2$C = ["placeholder"];
32922
- const _hoisted_3$s = { class: "lupa-terms-list" };
32923
- const _hoisted_4$j = ["onClick"];
32924
- const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
32925
- 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" };
32926
32979
  const _hoisted_7$4 = {
32927
32980
  key: 0,
32928
32981
  class: "lupa-term-count"
32929
32982
  };
32930
32983
  const _hoisted_8$2 = { key: 0 };
32931
32984
  const _hoisted_9$2 = { key: 1 };
32932
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
32985
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32933
32986
  __name: "TermFacet",
32934
32987
  props: {
32935
32988
  options: {},
@@ -32995,7 +33048,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
32995
33048
  emit2("select", {
32996
33049
  key: facet.value.key,
32997
33050
  value,
32998
- type: facet.value.type
33051
+ type: facet.value.type === "range" ? "partialRange" : facet.value.type
32999
33052
  });
33000
33053
  };
33001
33054
  const toggleShowAll = () => {
@@ -33023,17 +33076,17 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
33023
33076
  }
33024
33077
  };
33025
33078
  return (_ctx, _cache) => {
33026
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
33079
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
33027
33080
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
33028
33081
  key: 0,
33029
33082
  class: "lupa-term-filter",
33030
33083
  "data-cy": "lupa-term-filter",
33031
33084
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
33032
33085
  placeholder: _ctx.options.labels.facetFilter
33033
- }, null, 8, _hoisted_2$C)), [
33086
+ }, null, 8, _hoisted_2$E)), [
33034
33087
  [vModelText, termFilter.value]
33035
33088
  ]) : createCommentVNode("", true),
33036
- createBaseVNode("div", _hoisted_3$s, [
33089
+ createBaseVNode("div", _hoisted_3$u, [
33037
33090
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
33038
33091
  return openBlock(), createElementBlock("div", {
33039
33092
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -33041,7 +33094,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
33041
33094
  key: item.title,
33042
33095
  onClick: ($event) => handleFacetClick(item)
33043
33096
  }, [
33044
- createBaseVNode("div", _hoisted_5$d, [
33097
+ createBaseVNode("div", _hoisted_5$e, [
33045
33098
  createBaseVNode("span", {
33046
33099
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
33047
33100
  }, null, 2)
@@ -33049,10 +33102,10 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
33049
33102
  createBaseVNode("div", {
33050
33103
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(item)]: true }])
33051
33104
  }, [
33052
- createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
33105
+ createBaseVNode("span", _hoisted_6$6, toDisplayString(getItemLabel(item)), 1),
33053
33106
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
33054
33107
  ], 2)
33055
- ], 10, _hoisted_4$j);
33108
+ ], 10, _hoisted_4$l);
33056
33109
  }), 128))
33057
33110
  ]),
33058
33111
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -33972,21 +34025,21 @@ const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
33972
34025
  }
33973
34026
  return out;
33974
34027
  };
33975
- const _hoisted_1$P = { class: "lupa-search-result-facet-stats-values" };
33976
- const _hoisted_2$B = {
34028
+ const _hoisted_1$S = { class: "lupa-search-result-facet-stats-values" };
34029
+ const _hoisted_2$D = {
33977
34030
  key: 0,
33978
34031
  class: "lupa-stats-facet-summary"
33979
34032
  };
33980
- const _hoisted_3$r = {
34033
+ const _hoisted_3$t = {
33981
34034
  key: 1,
33982
34035
  class: "lupa-stats-facet-summary-input"
33983
34036
  };
33984
- const _hoisted_4$i = { class: "lupa-stats-from" };
33985
- const _hoisted_5$c = {
34037
+ const _hoisted_4$k = { class: "lupa-stats-from" };
34038
+ const _hoisted_5$d = {
33986
34039
  key: 0,
33987
34040
  class: "lupa-stats-range-label"
33988
34041
  };
33989
- const _hoisted_6$6 = ["min", "max", "pattern", "aria-label"];
34042
+ const _hoisted_6$5 = ["min", "max", "pattern", "aria-label"];
33990
34043
  const _hoisted_7$3 = { key: 1 };
33991
34044
  const _hoisted_8$1 = { key: 2 };
33992
34045
  const _hoisted_9$1 = { class: "lupa-stats-to" };
@@ -34001,7 +34054,7 @@ const _hoisted_14 = {
34001
34054
  key: 2,
34002
34055
  class: "lupa-stats-slider-wrapper"
34003
34056
  };
34004
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
34057
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
34005
34058
  __name: "StatsFacet",
34006
34059
  props: {
34007
34060
  options: {},
@@ -34220,10 +34273,10 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34220
34273
  }
34221
34274
  );
34222
34275
  return (_ctx, _cache) => {
34223
- return openBlock(), createElementBlock("div", _hoisted_1$P, [
34224
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
34225
- createBaseVNode("div", _hoisted_4$i, [
34226
- 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),
34227
34280
  withDirectives(createBaseVNode("input", {
34228
34281
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
34229
34282
  type: "text",
@@ -34232,7 +34285,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34232
34285
  max: facetMax.value,
34233
34286
  pattern: sliderInputFormat.value,
34234
34287
  "aria-label": ariaLabelFrom.value
34235
- }, null, 8, _hoisted_6$6), [
34288
+ }, null, 8, _hoisted_6$5), [
34236
34289
  [
34237
34290
  vModelText,
34238
34291
  fromValue.value,
@@ -34285,17 +34338,17 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34285
34338
  };
34286
34339
  }
34287
34340
  });
34288
- const _hoisted_1$O = { class: "lupa-term-checkbox-wrapper" };
34289
- const _hoisted_2$A = { class: "lupa-term-label" };
34290
- 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 = {
34291
34344
  key: 0,
34292
34345
  class: "lupa-term-count"
34293
34346
  };
34294
- const _hoisted_4$h = {
34347
+ const _hoisted_4$j = {
34295
34348
  key: 0,
34296
34349
  class: "lupa-facet-level"
34297
34350
  };
34298
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
34351
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
34299
34352
  __name: "HierarchyFacetLevel",
34300
34353
  props: {
34301
34354
  options: {},
@@ -34349,7 +34402,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34349
34402
  "data-cy": "lupa-facet-term",
34350
34403
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
34351
34404
  }, [
34352
- createBaseVNode("div", _hoisted_1$O, [
34405
+ createBaseVNode("div", _hoisted_1$R, [
34353
34406
  createBaseVNode("span", {
34354
34407
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
34355
34408
  }, null, 2)
@@ -34357,11 +34410,11 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34357
34410
  createBaseVNode("div", {
34358
34411
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(_ctx.item)]: true }])
34359
34412
  }, [
34360
- createBaseVNode("span", _hoisted_2$A, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
34361
- _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)
34362
34415
  ], 2)
34363
34416
  ]),
34364
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
34417
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, [
34365
34418
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
34366
34419
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
34367
34420
  key: itemChild.title,
@@ -34377,13 +34430,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34377
34430
  };
34378
34431
  }
34379
34432
  });
34380
- const _hoisted_1$N = {
34433
+ const _hoisted_1$Q = {
34381
34434
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
34382
34435
  "data-cy": "lupa-search-result-facet-term-values"
34383
34436
  };
34384
- const _hoisted_2$z = { key: 0 };
34385
- const _hoisted_3$p = ["placeholder"];
34386
- 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({
34387
34440
  __name: "HierarchyFacet",
34388
34441
  props: {
34389
34442
  options: {},
@@ -34439,19 +34492,19 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
34439
34492
  showAll.value = false;
34440
34493
  };
34441
34494
  return (_ctx, _cache) => {
34442
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
34443
- 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, [
34444
34497
  withDirectives(createBaseVNode("input", {
34445
34498
  class: "lupa-term-filter",
34446
34499
  "data-cy": "lupa-term-filter",
34447
34500
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
34448
34501
  placeholder: _ctx.options.labels.facetFilter
34449
- }, null, 8, _hoisted_3$p), [
34502
+ }, null, 8, _hoisted_3$r), [
34450
34503
  [vModelText, termFilter.value]
34451
34504
  ])
34452
34505
  ])) : createCommentVNode("", true),
34453
34506
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
34454
- return openBlock(), createBlock(_sfc_main$V, {
34507
+ return openBlock(), createBlock(_sfc_main$$, {
34455
34508
  key: item.title,
34456
34509
  options: _ctx.options,
34457
34510
  item,
@@ -34475,30 +34528,31 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
34475
34528
  };
34476
34529
  }
34477
34530
  });
34478
- const _hoisted_1$M = { class: "lupa-facet-label-text" };
34479
- const _hoisted_2$y = {
34531
+ const _hoisted_1$P = { class: "lupa-facet-label-text" };
34532
+ const _hoisted_2$A = {
34480
34533
  key: 0,
34481
34534
  class: "lupa-facet-content",
34482
34535
  "data-cy": "lupa-facet-content"
34483
34536
  };
34484
34537
  const __default__$1 = {
34485
34538
  components: {
34486
- TermFacet: _sfc_main$X,
34487
- StatsFacet: _sfc_main$W,
34488
- HierarchyFacet: _sfc_main$U
34539
+ TermFacet: _sfc_main$11,
34540
+ StatsFacet: _sfc_main$10,
34541
+ HierarchyFacet: _sfc_main$_
34489
34542
  }
34490
34543
  };
34491
- const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
34544
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
34492
34545
  __name: "FacetDisplay",
34493
34546
  props: {
34494
34547
  options: {},
34495
34548
  facet: {},
34496
34549
  currentFilters: {},
34497
- clearable: { type: Boolean }
34550
+ clearable: { type: Boolean },
34551
+ currentFacetStyle: {}
34498
34552
  },
34499
- emits: ["select", "clear"],
34553
+ emits: ["select", "clear", "expand"],
34500
34554
  setup(__props, { emit: __emit }) {
34501
- var _a25, _b25, _c;
34555
+ var _a25, _b25;
34502
34556
  const props = __props;
34503
34557
  const facet = computed(() => {
34504
34558
  var _a26;
@@ -34512,17 +34566,17 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34512
34566
  const optionsStore = useOptionsStore();
34513
34567
  const screenStore = useScreenStore();
34514
34568
  const { currentFilterKeys } = storeToRefs(searchResultStore);
34515
- const { searchResultOptions } = storeToRefs(optionsStore);
34569
+ const { searchResultOptions, expandedFacets } = storeToRefs(optionsStore);
34516
34570
  const { isMobileWidth } = storeToRefs(screenStore);
34517
34571
  const emit2 = __emit;
34518
34572
  const allExpanded = computed(() => {
34519
- var _a26, _b26, _c2, _d, _e, _f;
34573
+ var _a26, _b26, _c, _d, _e, _f;
34520
34574
  if (isMobileWidth.value) {
34521
- 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;
34522
34576
  }
34523
34577
  return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
34524
34578
  });
34525
- 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);
34526
34580
  const facetPanel = ref(null);
34527
34581
  const facetType = computed(() => {
34528
34582
  switch (facet.value.type) {
@@ -34564,9 +34618,16 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34564
34618
  var _a26;
34565
34619
  return getTranslatedFacetKey(props.facet, (_a26 = searchResultOptions.value.filters) == null ? void 0 : _a26.translations);
34566
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
+ });
34567
34628
  onMounted(() => {
34568
- var _a26;
34569
- 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") {
34570
34631
  window.addEventListener("click", handleMouseClick);
34571
34632
  }
34572
34633
  });
@@ -34575,7 +34636,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34575
34636
  });
34576
34637
  const handleMouseClick = (e2) => {
34577
34638
  const el = facetPanel.value;
34578
- if (!el) {
34639
+ if (!el || !props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
34579
34640
  return;
34580
34641
  }
34581
34642
  const isOutsideElement = el && !el.contains(e2.target);
@@ -34587,6 +34648,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34587
34648
  handleFacetQueryFilter();
34588
34649
  });
34589
34650
  const toggleFacet = () => {
34651
+ if (expandSidebarOnFacetClick.value) {
34652
+ expandedFacets.value = [facet.value.key];
34653
+ emit2("expand");
34654
+ return;
34655
+ }
34590
34656
  isOpen.value = !isOpen.value;
34591
34657
  handleFacetQueryFilter();
34592
34658
  };
@@ -34619,12 +34685,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34619
34685
  "data-cy": "lupa-search-result-facet-label",
34620
34686
  onClick: toggleFacet
34621
34687
  }, [
34622
- createBaseVNode("div", _hoisted_1$M, toDisplayString(facetLabel.value), 1),
34688
+ createBaseVNode("div", _hoisted_1$P, toDisplayString(facetLabel.value), 1),
34623
34689
  createBaseVNode("div", {
34624
34690
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
34625
34691
  }, null, 2)
34626
34692
  ], 2),
34627
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
34693
+ isOpen.value && !expandSidebarOnFacetClick.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
34628
34694
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
34629
34695
  facet: facet.value,
34630
34696
  currentFilters: currentFilters.value[facet.value.key],
@@ -34642,12 +34708,154 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34642
34708
  };
34643
34709
  }
34644
34710
  }));
34645
- const _hoisted_1$L = { class: "lupa-search-result-facet-section" };
34646
- 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 = {
34647
34855
  key: 0,
34648
34856
  class: "lupa-facets-title"
34649
34857
  };
34650
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
34858
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34651
34859
  __name: "FacetList",
34652
34860
  props: {
34653
34861
  options: {},
@@ -34659,6 +34867,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
34659
34867
  emits: ["select", "clear"],
34660
34868
  setup(__props, { emit: __emit }) {
34661
34869
  const props = __props;
34870
+ const { handleFilterSidebarToggle } = useSidebarToggle();
34662
34871
  const emit2 = __emit;
34663
34872
  const currentFiltersValue = computed(() => {
34664
34873
  var _a25;
@@ -34674,6 +34883,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
34674
34883
  return !((_a25 = props.options.exclude) == null ? void 0 : _a25.includes(f2.key));
34675
34884
  }) : facetsValue.value;
34676
34885
  });
34886
+ const displayFacetStyle = computed(() => {
34887
+ if (!props.facetStyle || props.facetStyle === "sidebar") {
34888
+ return "sidebar";
34889
+ }
34890
+ return "top-dropdown";
34891
+ });
34677
34892
  const handleFacetSelect = (facetAction) => {
34678
34893
  emit2("select", facetAction);
34679
34894
  };
@@ -34682,29 +34897,33 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
34682
34897
  };
34683
34898
  return (_ctx, _cache) => {
34684
34899
  var _a25;
34685
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
34686
- _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),
34687
34902
  createBaseVNode("div", {
34688
- 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 : "")])
34689
34904
  }, [
34690
34905
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
34691
34906
  var _a26;
34692
- return openBlock(), createBlock(_sfc_main$T, {
34907
+ return openBlock(), createBlock(_sfc_main$Z, {
34693
34908
  key: facet.key,
34694
34909
  facet,
34695
34910
  currentFilters: currentFiltersValue.value,
34696
34911
  options: _ctx.options,
34697
34912
  clearable: (_a26 = _ctx.clearable) != null ? _a26 : false,
34913
+ "current-facet-style": _ctx.facetStyle,
34698
34914
  onSelect: handleFacetSelect,
34699
- onClear: clear
34700
- }, null, 8, ["facet", "currentFilters", "options", "clearable"]);
34701
- }), 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)
34702
34921
  ], 2)
34703
34922
  ]);
34704
34923
  };
34705
34924
  }
34706
34925
  });
34707
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
34926
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34708
34927
  __name: "FacetsButton",
34709
34928
  props: {
34710
34929
  options: {}
@@ -34729,8 +34948,33 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
34729
34948
  };
34730
34949
  }
34731
34950
  });
34732
- const _hoisted_1$K = { class: "lupa-facets-filter-button-wrapper" };
34733
- 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({
34734
34978
  __name: "Facets",
34735
34979
  props: {
34736
34980
  options: {},
@@ -34743,6 +34987,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34743
34987
  const paramStore = useParamsStore();
34744
34988
  const searchResultStore = useSearchResultStore();
34745
34989
  const optionsStore = useOptionsStore();
34990
+ const { handleFilterSidebarToggle } = useSidebarToggle();
34746
34991
  const { filters } = storeToRefs(paramStore);
34747
34992
  const { facets: facets2, loadingFacets } = storeToRefs(searchResultStore);
34748
34993
  const { searchResultOptions } = storeToRefs(optionsStore);
@@ -34770,7 +35015,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34770
35015
  };
34771
35016
  });
34772
35017
  const showFilterButton = computed(() => {
34773
- return props.options.filterBehavior === "withFilterButton";
35018
+ return props.options.filterBehavior === "withFilterButton" && props.facetStyle === "sidebar";
34774
35019
  });
34775
35020
  const handleFacetSelect = (facetAction) => {
34776
35021
  switch (facetAction.type) {
@@ -34791,16 +35036,25 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34791
35036
  filters.value
34792
35037
  );
34793
35038
  break;
34794
- case "hierarchy":
34795
- toggleHierarchyFilter(
35039
+ case "partialRange":
35040
+ toggleRangeFilter(
34796
35041
  paramStore.appendParams,
35042
+ paramStore.removeParameters,
34797
35043
  facetAction,
34798
35044
  optionsStore.getQueryParamName,
34799
35045
  filters.value
34800
35046
  );
34801
35047
  break;
34802
- }
34803
- if (scrollToResultsOptions.value.enabled) {
35048
+ case "hierarchy":
35049
+ toggleHierarchyFilter(
35050
+ paramStore.appendParams,
35051
+ facetAction,
35052
+ optionsStore.getQueryParamName,
35053
+ filters.value
35054
+ );
35055
+ break;
35056
+ }
35057
+ if (scrollToResultsOptions.value.enabled) {
34804
35058
  scrollToSearchResults(
34805
35059
  scrollToResultsOptions.value.timeout,
34806
35060
  scrollToResultsOptions.value.container
@@ -34808,8 +35062,18 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34808
35062
  }
34809
35063
  };
34810
35064
  const clear = (facet) => {
34811
- const param = getFacetKey(facet.key, facet.type);
34812
- paramStore.removeParameters({ paramsToRemove: [param] });
35065
+ if (facet.type === "range") {
35066
+ paramStore.removeParameters({
35067
+ paramsToRemove: [getFacetKey(facet.key, "range"), getFacetKey(facet.key, "partialRange")]
35068
+ });
35069
+ } else {
35070
+ const param = getFacetKey(facet.key, facet.type);
35071
+ paramStore.removeParameters({ paramsToRemove: [param] });
35072
+ }
35073
+ };
35074
+ const clearAll = () => {
35075
+ paramStore.removeAllFilters();
35076
+ handleFilterSidebarToggle();
34813
35077
  };
34814
35078
  const filter = () => {
34815
35079
  emit2("filter");
@@ -34818,7 +35082,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34818
35082
  return openBlock(), createElementBlock("div", {
34819
35083
  class: normalizeClass(["lupa-search-result-facets", { "lupa-search-result-facets-loading": unref(loadingFacets) }])
34820
35084
  }, [
34821
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$S, {
35085
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$W, {
34822
35086
  key: 0,
34823
35087
  options: _ctx.options,
34824
35088
  facets: regularFacets.value,
@@ -34828,10 +35092,15 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34828
35092
  onSelect: handleFacetSelect,
34829
35093
  onClear: clear
34830
35094
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
34831
- createBaseVNode("div", _hoisted_1$K, [
34832
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$R, {
35095
+ createBaseVNode("div", _hoisted_1$M, [
35096
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$U, {
34833
35097
  key: 0,
34834
35098
  options: _ctx.options,
35099
+ onClear: clearAll
35100
+ }, null, 8, ["options"])) : createCommentVNode("", true),
35101
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$V, {
35102
+ key: 1,
35103
+ options: _ctx.options,
34835
35104
  onFilter: filter
34836
35105
  }, null, 8, ["options"])) : createCommentVNode("", true)
34837
35106
  ])
@@ -34839,16 +35108,17 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34839
35108
  };
34840
35109
  }
34841
35110
  });
34842
- const _hoisted_1$J = {
35111
+ const _hoisted_1$L = {
34843
35112
  key: 0,
34844
35113
  id: "lupa-search-result-filters",
34845
35114
  class: "lupa-search-result-filters"
34846
35115
  };
34847
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
35116
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
34848
35117
  __name: "SearchResultsFilters",
34849
35118
  props: {
34850
35119
  options: {},
34851
- expandable: { type: Boolean }
35120
+ expandable: { type: Boolean },
35121
+ style: {}
34852
35122
  },
34853
35123
  emits: ["filter"],
34854
35124
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -34882,40 +35152,37 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
34882
35152
  __expose({ fetch: fetch2 });
34883
35153
  return (_ctx, _cache) => {
34884
35154
  var _a25;
34885
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
34886
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$_, {
35155
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
35156
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$14, {
34887
35157
  key: 0,
34888
35158
  options: _ctx.options.currentFilters,
34889
35159
  expandable: (_a25 = _ctx.expandable) != null ? _a25 : false
34890
35160
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
34891
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$Y, {
35161
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$12, {
34892
35162
  key: 1,
34893
35163
  options: _ctx.options.categories,
34894
35164
  ref_key: "categoryFilters",
34895
35165
  ref: categoryFilters
34896
35166
  }, null, 8, ["options"])) : createCommentVNode("", true),
34897
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
35167
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
34898
35168
  key: 2,
34899
35169
  options: _ctx.options.facets,
35170
+ "facet-style": _ctx.style,
34900
35171
  onFilter: filter
34901
- }, null, 8, ["options"])) : createCommentVNode("", true)
35172
+ }, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
34902
35173
  ])) : createCommentVNode("", true);
34903
35174
  };
34904
35175
  }
34905
35176
  });
34906
- const _hoisted_1$I = {
34907
- key: 0,
34908
- class: "lupa-mobile-filter-sidebar"
34909
- };
34910
- const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
34911
- const _hoisted_3$o = { class: "lupa-sidebar-top" };
34912
- const _hoisted_4$g = { class: "lupa-sidebar-title" };
34913
- const _hoisted_5$b = {
35177
+ const _hoisted_1$K = { class: "lupa-mobile-sidebar-content" };
35178
+ const _hoisted_2$y = { class: "lupa-sidebar-top" };
35179
+ const _hoisted_3$q = { class: "lupa-sidebar-title" };
35180
+ const _hoisted_4$i = {
34914
35181
  key: 0,
34915
35182
  class: "lupa-sidebar-filter-count"
34916
35183
  };
34917
- const _hoisted_6$5 = { class: "lupa-sidebar-filter-options" };
34918
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
35184
+ const _hoisted_5$c = { class: "lupa-sidebar-filter-options" };
35185
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
34919
35186
  __name: "MobileFilterSidebar",
34920
35187
  props: {
34921
35188
  options: {}
@@ -34924,7 +35191,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
34924
35191
  setup(__props, { emit: __emit }) {
34925
35192
  const props = __props;
34926
35193
  const searchResultStore = useSearchResultStore();
34927
- const { currentFilterCount } = storeToRefs(searchResultStore);
35194
+ const { currentFilterCount, isFilterSidebarVisible, isSidebarClosing } = storeToRefs(searchResultStore);
34928
35195
  const emit2 = __emit;
34929
35196
  const sidebarTitle = computed(() => {
34930
35197
  var _a25, _b25, _c;
@@ -34934,7 +35201,6 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
34934
35201
  var _a25, _b25;
34935
35202
  return Boolean((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.showFilterCount) && currentFilterCount.value > 0;
34936
35203
  });
34937
- const isMobileSidebarVisible = computed(() => searchResultStore.isMobileSidebarVisible);
34938
35204
  const isActiveFiltersExpanded = computed(() => {
34939
35205
  var _a25, _b25;
34940
35206
  return !((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.activeFiltersExpanded);
@@ -34947,42 +35213,46 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
34947
35213
  handleMobileToggle();
34948
35214
  };
34949
35215
  return (_ctx, _cache) => {
34950
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
35216
+ return unref(isFilterSidebarVisible) ? (openBlock(), createElementBlock("div", {
35217
+ key: 0,
35218
+ class: normalizeClass(["lupa-mobile-filter-sidebar", { "lupa-mobile-filter-sidebar-is-closing": unref(isSidebarClosing) }])
35219
+ }, [
34951
35220
  createBaseVNode("div", {
34952
35221
  class: "lupa-sidebar-close",
34953
35222
  onClick: withModifiers(handleMobileToggle, ["stop"])
34954
35223
  }),
34955
- createBaseVNode("div", _hoisted_2$w, [
34956
- createBaseVNode("div", _hoisted_3$o, [
34957
- createBaseVNode("div", _hoisted_4$g, [
35224
+ createBaseVNode("div", _hoisted_1$K, [
35225
+ createBaseVNode("div", _hoisted_2$y, [
35226
+ createBaseVNode("div", _hoisted_3$q, [
34958
35227
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
34959
- isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35228
+ isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34960
35229
  ]),
34961
35230
  createBaseVNode("div", {
34962
35231
  class: "lupa-filter-toggle-mobile",
34963
35232
  onClick: handleMobileToggle
34964
35233
  })
34965
35234
  ]),
34966
- createBaseVNode("div", _hoisted_6$5, [
34967
- createVNode(_sfc_main$P, {
35235
+ createBaseVNode("div", _hoisted_5$c, [
35236
+ createVNode(_sfc_main$S, {
34968
35237
  options: _ctx.options,
34969
35238
  expandable: isActiveFiltersExpanded.value,
35239
+ style: "sidebar",
34970
35240
  onFilter: filter
34971
35241
  }, null, 8, ["options", "expandable"])
34972
35242
  ])
34973
35243
  ])
34974
- ])) : createCommentVNode("", true);
35244
+ ], 2)) : createCommentVNode("", true);
34975
35245
  };
34976
35246
  }
34977
35247
  });
34978
- const _hoisted_1$H = { id: "lupa-search-results-breadcrumbs" };
34979
- const _hoisted_2$v = ["href", "onClick"];
34980
- const _hoisted_3$n = {
35248
+ const _hoisted_1$J = { id: "lupa-search-results-breadcrumbs" };
35249
+ const _hoisted_2$x = ["href", "onClick"];
35250
+ const _hoisted_3$p = {
34981
35251
  key: 1,
34982
35252
  class: "lupa-search-results-breadcrumb-text"
34983
35253
  };
34984
- const _hoisted_4$f = { key: 2 };
34985
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
35254
+ const _hoisted_4$h = { key: 2 };
35255
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34986
35256
  __name: "SearchResultsBreadcrumbs",
34987
35257
  props: {
34988
35258
  breadcrumbs: {}
@@ -35007,7 +35277,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
35007
35277
  handleRoutingEvent(link, event, hasEventRouting.value);
35008
35278
  };
35009
35279
  return (_ctx, _cache) => {
35010
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
35280
+ return openBlock(), createElementBlock("div", _hoisted_1$J, [
35011
35281
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
35012
35282
  var _a25;
35013
35283
  return openBlock(), createElementBlock("span", {
@@ -35022,20 +35292,20 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
35022
35292
  var _a26;
35023
35293
  return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
35024
35294
  }
35025
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
35026
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35295
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$x)) : (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(getLabel(breadcrumb.label)), 1)),
35296
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$h, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35027
35297
  ]);
35028
35298
  }), 128))
35029
35299
  ]);
35030
35300
  };
35031
35301
  }
35032
35302
  });
35033
- const _hoisted_1$G = {
35303
+ const _hoisted_1$I = {
35034
35304
  key: 0,
35035
35305
  id: "lupa-search-result-filters",
35036
35306
  class: "lupa-search-result-filters lupa-search-result-top-filters"
35037
35307
  };
35038
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
35308
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
35039
35309
  __name: "FiltersTopDropdown",
35040
35310
  props: {
35041
35311
  options: {}
@@ -35053,8 +35323,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
35053
35323
  });
35054
35324
  return (_ctx, _cache) => {
35055
35325
  var _a25;
35056
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$G, [
35057
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
35326
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
35327
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
35058
35328
  key: 0,
35059
35329
  options: _ctx.options.facets,
35060
35330
  "facet-style": (_a25 = _ctx.options.facets.style) == null ? void 0 : _a25.type,
@@ -35065,8 +35335,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
35065
35335
  };
35066
35336
  }
35067
35337
  });
35068
- const _hoisted_1$F = { id: "lupa-search-results-layout-selection" };
35069
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
35338
+ const _hoisted_1$H = { id: "lupa-search-results-layout-selection" };
35339
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
35070
35340
  __name: "SearchResultsLayoutSelection",
35071
35341
  setup(__props) {
35072
35342
  const searchResultStore = useSearchResultStore();
@@ -35077,7 +35347,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
35077
35347
  searchResultStore.setLayout(layout2);
35078
35348
  };
35079
35349
  return (_ctx, _cache) => {
35080
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
35350
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
35081
35351
  createBaseVNode("div", {
35082
35352
  class: normalizeClass([
35083
35353
  "lupa-layout-selection-grid",
@@ -35099,64 +35369,38 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
35099
35369
  };
35100
35370
  }
35101
35371
  });
35102
- const _hoisted_1$E = {
35372
+ const _hoisted_1$G = {
35103
35373
  key: 0,
35104
35374
  class: "lupa-mobile-toggle-filter-count"
35105
35375
  };
35106
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
35376
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
35107
35377
  __name: "SearchResultsMobileToggle",
35108
- props: {
35109
- labels: {},
35110
- showFilterCount: { type: Boolean }
35111
- },
35112
35378
  setup(__props) {
35113
- const props = __props;
35114
- const searchResultStore = useSearchResultStore();
35115
- const optionsStore = useOptionsStore();
35116
- const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
35117
- const { searchResultOptions } = storeToRefs(optionsStore);
35118
- const disableMobileBodyScrollLock = computed(
35119
- () => {
35120
- var _a25, _b25, _c;
35121
- return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
35122
- }
35123
- );
35124
- const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
35125
- const defaultLabel = computed(() => props.labels.mobileFilterButton);
35126
- const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
35127
- const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
35128
- const label = computed(() => {
35129
- if (isSidebarVisible.value && openLabel.value) {
35130
- return openLabel.value;
35131
- }
35132
- if (hasActiveFilters.value && activeLabel.value) {
35133
- return activeLabel.value;
35134
- }
35135
- return defaultLabel.value;
35136
- });
35137
- const handleMobileToggle = () => {
35138
- searchResultStore.setSidebarState({
35139
- visible: !isSidebarVisible.value,
35140
- disableBodyScrolling: !disableMobileBodyScrollLock.value
35141
- });
35142
- };
35143
- const hasActiveFilters = computed(() => currentFilterCount.value > 0);
35379
+ const {
35380
+ isSidebarVisible,
35381
+ label,
35382
+ currentFilterCount,
35383
+ hasActiveFilters,
35384
+ showMobileFilterCount,
35385
+ handleFilterSidebarToggle
35386
+ } = useSidebarToggle();
35144
35387
  return (_ctx, _cache) => {
35145
35388
  return openBlock(), createElementBlock("div", {
35146
35389
  class: normalizeClass(["lupa-mobile-toggle", {
35147
35390
  "lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
35148
- "lupa-mobile-toggle-has-filters": hasActiveFilters.value,
35149
- "lupa-sidebar-open": isSidebarVisible.value
35391
+ "lupa-mobile-toggle-has-filters": unref(hasActiveFilters),
35392
+ "lupa-sidebar-open": unref(isSidebarVisible)
35150
35393
  }]),
35151
- onClick: handleMobileToggle
35394
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
35395
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
35152
35396
  }, [
35153
- createTextVNode(toDisplayString(label.value) + " ", 1),
35154
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$E, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35397
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
35398
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$G, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35155
35399
  ], 2);
35156
35400
  };
35157
35401
  }
35158
35402
  });
35159
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
35403
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
35160
35404
  __name: "SearchResultsMobileFilterClose",
35161
35405
  props: {
35162
35406
  label: {}
@@ -35176,20 +35420,20 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
35176
35420
  };
35177
35421
  }
35178
35422
  });
35179
- const _hoisted_1$D = {
35423
+ const _hoisted_1$F = {
35180
35424
  key: 0,
35181
35425
  id: "lupa-search-results-page-select",
35182
35426
  "data-cy": "lupa-search-results-page-select"
35183
35427
  };
35184
- const _hoisted_2$u = {
35428
+ const _hoisted_2$w = {
35185
35429
  key: 0,
35186
35430
  class: "lupa-page-number-separator"
35187
35431
  };
35188
- const _hoisted_3$m = {
35432
+ const _hoisted_3$o = {
35189
35433
  key: 0,
35190
35434
  class: "lupa-page-number-separator"
35191
35435
  };
35192
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
35436
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
35193
35437
  __name: "SearchResultsPageSelect",
35194
35438
  props: {
35195
35439
  lastPageLabel: {},
@@ -35284,7 +35528,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35284
35528
  };
35285
35529
  return (_ctx, _cache) => {
35286
35530
  var _a25;
35287
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35531
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
35288
35532
  showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35289
35533
  key: 0,
35290
35534
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -35308,7 +35552,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35308
35552
  _: 1,
35309
35553
  __: [4]
35310
35554
  }, 8, ["href"])),
35311
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
35555
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, "...")) : createCommentVNode("", true)
35312
35556
  ], 64)) : createCommentVNode("", true),
35313
35557
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
35314
35558
  return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
@@ -35328,7 +35572,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35328
35572
  }, 1032, ["href", "onClick", "class"]);
35329
35573
  }), 128)),
35330
35574
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
35331
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
35575
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$o, "...")) : createCommentVNode("", true),
35332
35576
  (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35333
35577
  href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
35334
35578
  class: "lupa-page-number lupa-page-number-last",
@@ -35359,18 +35603,18 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35359
35603
  };
35360
35604
  }
35361
35605
  });
35362
- const _hoisted_1$C = {
35606
+ const _hoisted_1$E = {
35363
35607
  id: "lupa-search-results-page-size",
35364
35608
  "data-cy": "lupa-search-results-page-size"
35365
35609
  };
35366
- const _hoisted_2$t = { id: "lupa-select" };
35367
- const _hoisted_3$l = {
35610
+ const _hoisted_2$v = { id: "lupa-select" };
35611
+ const _hoisted_3$n = {
35368
35612
  class: "lupa-select-label",
35369
35613
  for: "lupa-page-size-select-dropdown"
35370
35614
  };
35371
- const _hoisted_4$e = ["aria-label"];
35372
- const _hoisted_5$a = ["value"];
35373
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
35615
+ const _hoisted_4$g = ["aria-label"];
35616
+ const _hoisted_5$b = ["value"];
35617
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
35374
35618
  __name: "SearchResultsPageSize",
35375
35619
  props: {
35376
35620
  labels: {},
@@ -35400,9 +35644,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
35400
35644
  };
35401
35645
  return (_ctx, _cache) => {
35402
35646
  var _a25, _b25, _c;
35403
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
35404
- createBaseVNode("div", _hoisted_2$t, [
35405
- createBaseVNode("label", _hoisted_3$l, toDisplayString(label.value), 1),
35647
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
35648
+ createBaseVNode("div", _hoisted_2$v, [
35649
+ createBaseVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
35406
35650
  createBaseVNode("select", {
35407
35651
  id: "lupa-page-size-select-dropdown",
35408
35652
  class: "lupa-select-dropdown",
@@ -35416,110 +35660,161 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
35416
35660
  return openBlock(), createElementBlock("option", {
35417
35661
  key: option,
35418
35662
  value: option
35419
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
35663
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$b);
35420
35664
  }), 128))
35421
- ], 40, _hoisted_4$e)
35665
+ ], 40, _hoisted_4$g)
35422
35666
  ])
35423
35667
  ]);
35424
35668
  };
35425
35669
  }
35426
35670
  });
35427
- const _hoisted_1$B = {
35671
+ const useSorting = () => {
35672
+ const paramStore = useParamsStore();
35673
+ const optionStore = useOptionsStore();
35674
+ const { sort } = storeToRefs(paramStore);
35675
+ const { ariaLabels, searchResultOptions } = storeToRefs(optionStore);
35676
+ const selectedKey = ref("");
35677
+ const previousKey = ref("");
35678
+ const sortStyle = computed(() => {
35679
+ return searchResultOptions.value.sortStyle;
35680
+ });
35681
+ const sortOptions = computed(() => {
35682
+ return searchResultOptions.value.sort;
35683
+ });
35684
+ const callbacks = computed(() => {
35685
+ return searchResultOptions.value.callbacks;
35686
+ });
35687
+ const sotyByTitleLabel = computed(() => {
35688
+ var _a25;
35689
+ return (_a25 = searchResultOptions.value.labels) == null ? void 0 : _a25.sortBy;
35690
+ });
35691
+ const sortItems = computed(() => {
35692
+ if (sortOptions.value && sortOptions.value.length) {
35693
+ return sortOptions.value;
35694
+ } else {
35695
+ return [];
35696
+ }
35697
+ });
35698
+ const defaultSortValue = computed(() => {
35699
+ var _a25, _b25, _c;
35700
+ return (_c = (_a25 = sortOptions.value) == null ? void 0 : _a25.find((x) => x.default)) != null ? _c : (_b25 = sortItems.value) == null ? void 0 : _b25[0];
35701
+ });
35702
+ const setSortValue = () => {
35703
+ var _a25, _b25;
35704
+ const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
35705
+ selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
35706
+ previousKey.value = selectedKey.value;
35707
+ };
35708
+ watch(sort, () => setSortValue());
35709
+ const handleSelect = () => {
35710
+ var _a25, _b25, _c;
35711
+ const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
35712
+ if (!value) {
35713
+ return;
35714
+ }
35715
+ paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
35716
+ (_c = (_b25 = callbacks.value) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
35717
+ paramStore.appendParams({
35718
+ params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
35719
+ paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
35720
+ });
35721
+ previousKey.value = selectedKey.value;
35722
+ };
35723
+ return {
35724
+ sotyByTitleLabel,
35725
+ sortItems,
35726
+ selectedKey,
35727
+ ariaLabels,
35728
+ sortOptions,
35729
+ sortStyle,
35730
+ handleSelect,
35731
+ setSortValue
35732
+ };
35733
+ };
35734
+ const _hoisted_1$D = {
35735
+ key: 0,
35428
35736
  id: "lupa-search-results-sort",
35429
35737
  class: "lupa-search-results-sort"
35430
35738
  };
35431
- const _hoisted_2$s = { id: "lupa-select" };
35432
- const _hoisted_3$k = {
35739
+ const _hoisted_2$u = { id: "lupa-select" };
35740
+ const _hoisted_3$m = {
35433
35741
  class: "lupa-select-label",
35434
35742
  for: "lupa-sort-select-dropdown"
35435
35743
  };
35436
- const _hoisted_4$d = ["aria-label"];
35437
- const _hoisted_5$9 = ["value"];
35438
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
35744
+ const _hoisted_4$f = ["aria-label"];
35745
+ const _hoisted_5$a = ["value"];
35746
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
35439
35747
  __name: "SearchResultsSort",
35440
- props: {
35441
- options: {},
35442
- callbacks: {}
35443
- },
35444
35748
  setup(__props) {
35445
- const props = __props;
35446
- const paramStore = useParamsStore();
35447
- const optionStore = useOptionsStore();
35448
- const { sort } = storeToRefs(paramStore);
35449
- const { ariaLabels } = storeToRefs(optionStore);
35450
- const selectedKey = ref("");
35451
- const previousKey = ref("");
35452
- const sortItems = computed(() => {
35453
- if (props.options.options && props.options.options.length) {
35454
- return props.options.options;
35455
- } else {
35456
- return [];
35457
- }
35458
- });
35459
- const defaultSortValue = computed(() => {
35460
- var _a25;
35461
- return (_a25 = props.options.options.find((x) => x.default)) != null ? _a25 : props.options.options[0];
35462
- });
35463
- const setSortValue = () => {
35464
- var _a25, _b25;
35465
- const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
35466
- selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
35467
- previousKey.value = selectedKey.value;
35468
- };
35469
- watch(sort, () => setSortValue());
35749
+ const {
35750
+ sortItems,
35751
+ selectedKey,
35752
+ ariaLabels,
35753
+ sotyByTitleLabel,
35754
+ sortStyle,
35755
+ handleSelect,
35756
+ setSortValue
35757
+ } = useSorting();
35470
35758
  onMounted(() => {
35471
35759
  setSortValue();
35472
35760
  });
35473
- const handleSelect = () => {
35474
- var _a25, _b25, _c;
35475
- const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
35476
- if (!value) {
35477
- return;
35478
- }
35479
- paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
35480
- (_c = (_b25 = props.callbacks) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
35481
- paramStore.appendParams({
35482
- params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
35483
- paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
35484
- });
35485
- previousKey.value = selectedKey.value;
35486
- };
35761
+ const showDefaultSort = computed(() => {
35762
+ var _a25;
35763
+ return !sortStyle.value || ((_a25 = sortStyle.value) == null ? void 0 : _a25.type) !== "drawer";
35764
+ });
35487
35765
  return (_ctx, _cache) => {
35488
35766
  var _a25, _b25;
35489
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
35490
- createBaseVNode("div", _hoisted_2$s, [
35491
- createBaseVNode("label", _hoisted_3$k, toDisplayString(_ctx.options.label), 1),
35767
+ return showDefaultSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35768
+ createBaseVNode("div", _hoisted_2$u, [
35769
+ createBaseVNode("label", _hoisted_3$m, toDisplayString(unref(sotyByTitleLabel)), 1),
35492
35770
  withDirectives(createBaseVNode("select", {
35493
35771
  id: "lupa-sort-select-dropdown",
35494
35772
  class: "lupa-select-dropdown",
35495
- "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : _ctx.options.label,
35773
+ "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : unref(sotyByTitleLabel),
35496
35774
  "data-cy": "lupa-sort-select-dropdown",
35497
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
35498
- onChange: handleSelect,
35775
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectedKey) ? selectedKey.value = $event : null),
35776
+ onChange: _cache[1] || (_cache[1] = //@ts-ignore
35777
+ (...args) => unref(handleSelect) && unref(handleSelect)(...args)),
35499
35778
  ref: "select"
35500
35779
  }, [
35501
- (openBlock(true), createElementBlock(Fragment, null, renderList(sortItems.value, (option) => {
35780
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
35502
35781
  return openBlock(), createElementBlock("option", {
35503
35782
  key: option.key,
35504
35783
  value: option.key
35505
- }, toDisplayString(option.label), 9, _hoisted_5$9);
35784
+ }, toDisplayString(option.label), 9, _hoisted_5$a);
35506
35785
  }), 128))
35507
- ], 40, _hoisted_4$d), [
35508
- [vModelSelect, selectedKey.value]
35786
+ ], 40, _hoisted_4$f), [
35787
+ [vModelSelect, unref(selectedKey)]
35509
35788
  ])
35510
35789
  ])
35511
- ]);
35790
+ ])) : createCommentVNode("", true);
35791
+ };
35792
+ }
35793
+ });
35794
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35795
+ __name: "SearchResultsSortDrawerToggle",
35796
+ setup(__props) {
35797
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
35798
+ return (_ctx, _cache) => {
35799
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
35800
+ key: 0,
35801
+ class: normalizeClass(["lupa-mobile-toggle lupa-mobile-sort-toggle", {
35802
+ "lupa-sidebar-open": unref(isSidebarVisible)
35803
+ }]),
35804
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
35805
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
35806
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
35512
35807
  };
35513
35808
  }
35514
35809
  });
35515
- const _hoisted_1$A = { class: "lupa-toolbar-left" };
35516
- const _hoisted_2$r = {
35810
+ const _hoisted_1$C = { class: "lupa-toolbar-left" };
35811
+ const _hoisted_2$t = {
35517
35812
  key: 0,
35518
35813
  class: "lupa-toolbar-right-title"
35519
35814
  };
35520
- const _hoisted_3$j = { key: 2 };
35521
- const _hoisted_4$c = { key: 4 };
35522
- const _hoisted_5$8 = { key: 6 };
35815
+ const _hoisted_3$l = { key: 2 };
35816
+ const _hoisted_4$e = { key: 4 };
35817
+ const _hoisted_5$9 = { key: 6 };
35523
35818
  const _hoisted_6$4 = { class: "lupa-toolbar-right" };
35524
35819
  const _hoisted_7$2 = {
35525
35820
  key: 0,
@@ -35527,7 +35822,7 @@ const _hoisted_7$2 = {
35527
35822
  };
35528
35823
  const _hoisted_8 = { key: 2 };
35529
35824
  const _hoisted_9 = { key: 4 };
35530
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
35825
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
35531
35826
  __name: "SearchResultsToolbar",
35532
35827
  props: {
35533
35828
  options: {},
@@ -35543,7 +35838,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35543
35838
  const searchResultStore = useSearchResultStore();
35544
35839
  const optionsStore = useOptionsStore();
35545
35840
  const { page, limit } = storeToRefs(paramStore);
35546
- const { hasAnyFilter, searchResult, isMobileSidebarVisible } = storeToRefs(searchResultStore);
35841
+ const { hasAnyFilter, searchResult, isFilterSidebarVisible } = storeToRefs(searchResultStore);
35547
35842
  const { currentResolutionPageSizes } = storeToRefs(optionsStore);
35548
35843
  const isBottomLocation = computed(() => {
35549
35844
  return props.paginationLocation === "bottom";
@@ -35621,7 +35916,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35621
35916
  var _a25;
35622
35917
  return (_a25 = optionsValue.value.labels.toolbarRightLabel) != null ? _a25 : "";
35623
35918
  });
35624
- const showMobileFilterCount = computed(() => {
35919
+ computed(() => {
35625
35920
  var _a25, _b25, _c;
35626
35921
  return Boolean((_c = (_b25 = (_a25 = optionsValue.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount);
35627
35922
  });
@@ -35640,39 +35935,37 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35640
35935
  id: "lupa-search-results-toolbar",
35641
35936
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
35642
35937
  }, [
35643
- createBaseVNode("div", _hoisted_1$A, [
35644
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
35645
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$L, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$j)),
35646
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$11, {
35938
+ createBaseVNode("div", _hoisted_1$C, [
35939
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
35940
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$O, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$l)),
35941
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$17, {
35647
35942
  key: 3,
35648
35943
  label: searchSummaryLabel.value,
35649
35944
  clearable: unref(hasAnyFilter) && showFilterClear.value,
35650
35945
  onClear: handleClearAll
35651
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
35652
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
35946
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$e)),
35947
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$L, {
35653
35948
  key: 5,
35654
35949
  options: paginationOptions.value.pageSelect,
35655
35950
  "last-page-label": paginationOptions.value.labels.showMore,
35656
35951
  "first-page-label": paginationOptions.value.labels.showLess
35657
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
35952
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$9))
35658
35953
  ]),
35659
35954
  createBaseVNode("div", _hoisted_6$4, [
35660
35955
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
35661
- createVNode(_sfc_main$K, {
35662
- labels: optionsValue.value.labels,
35663
- "show-filter-count": showMobileFilterCount.value
35664
- }, null, 8, ["labels", "show-filter-count"]),
35665
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$H, {
35956
+ createVNode(_sfc_main$N),
35957
+ createVNode(_sfc_main$I),
35958
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$K, {
35666
35959
  key: 1,
35667
35960
  options: paginationOptions.value.pageSize,
35668
35961
  labels: paginationOptions.value.labels
35669
35962
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
35670
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$G, {
35963
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$J, {
35671
35964
  key: 3,
35672
35965
  options: sortOptions.value,
35673
35966
  callbacks: callbacks.value
35674
35967
  }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9)),
35675
- showFiltersCloseButton.value && unref(isMobileSidebarVisible) ? (openBlock(), createBlock(_sfc_main$J, {
35968
+ showFiltersCloseButton.value && unref(isFilterSidebarVisible) ? (openBlock(), createBlock(_sfc_main$M, {
35676
35969
  key: 5,
35677
35970
  label: optionsValue.value.labels.mobileFilterCloseButton
35678
35971
  }, null, 8, ["label"])) : createCommentVNode("", true)
@@ -35681,7 +35974,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35681
35974
  };
35682
35975
  }
35683
35976
  });
35684
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
35977
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
35685
35978
  __name: "SearchResultsProductImage",
35686
35979
  props: {
35687
35980
  item: {},
@@ -35689,7 +35982,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
35689
35982
  },
35690
35983
  setup(__props) {
35691
35984
  return (_ctx, _cache) => {
35692
- return openBlock(), createBlock(_sfc_main$1q, {
35985
+ return openBlock(), createBlock(_sfc_main$1w, {
35693
35986
  item: _ctx.item,
35694
35987
  options: _ctx.options,
35695
35988
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -35698,16 +35991,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
35698
35991
  };
35699
35992
  }
35700
35993
  });
35701
- const _hoisted_1$z = ["title", "innerHTML"];
35702
- const _hoisted_2$q = ["title"];
35703
- const _hoisted_3$i = ["href", "innerHTML"];
35704
- const _hoisted_4$b = ["title"];
35705
- const _hoisted_5$7 = {
35994
+ const _hoisted_1$B = ["title", "innerHTML"];
35995
+ const _hoisted_2$s = ["title"];
35996
+ const _hoisted_3$k = ["href", "innerHTML"];
35997
+ const _hoisted_4$d = ["title"];
35998
+ const _hoisted_5$8 = {
35706
35999
  key: 0,
35707
36000
  class: "lupa-search-results-product-title-text"
35708
36001
  };
35709
36002
  const _hoisted_6$3 = ["href"];
35710
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
36003
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35711
36004
  __name: "SearchResultsProductTitle",
35712
36005
  props: {
35713
36006
  item: {},
@@ -35744,7 +36037,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
35744
36037
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35745
36038
  title: sanitizedTitle.value,
35746
36039
  innerHTML: sanitizedTitle.value
35747
- }, null, 12, _hoisted_1$z)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
36040
+ }, null, 12, _hoisted_1$B)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
35748
36041
  key: 1,
35749
36042
  class: "lupa-search-results-product-title",
35750
36043
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -35755,26 +36048,26 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
35755
36048
  class: "lupa-search-results-product-title-text lupa-title-link",
35756
36049
  innerHTML: sanitizedTitle.value,
35757
36050
  onClick: handleNavigation
35758
- }, null, 8, _hoisted_3$i)
35759
- ], 12, _hoisted_2$q)) : (openBlock(), createElementBlock("div", {
36051
+ }, null, 8, _hoisted_3$k)
36052
+ ], 12, _hoisted_2$s)) : (openBlock(), createElementBlock("div", {
35760
36053
  key: 2,
35761
36054
  class: "lupa-search-results-product-title",
35762
36055
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35763
36056
  title: title.value
35764
36057
  }, [
35765
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
36058
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(title.value), 1)) : createCommentVNode("", true),
35766
36059
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
35767
36060
  key: 1,
35768
36061
  href: _ctx.link,
35769
36062
  class: "lupa-search-results-product-title-text lupa-title-link",
35770
36063
  onClick: handleNavigation
35771
36064
  }, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
35772
- ], 12, _hoisted_4$b));
36065
+ ], 12, _hoisted_4$d));
35773
36066
  };
35774
36067
  }
35775
36068
  });
35776
- const _hoisted_1$y = ["innerHTML"];
35777
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
36069
+ const _hoisted_1$A = ["innerHTML"];
36070
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
35778
36071
  __name: "SearchResultsProductDescription",
35779
36072
  props: {
35780
36073
  item: {},
@@ -35801,7 +36094,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
35801
36094
  class: "lupa-search-results-product-description",
35802
36095
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35803
36096
  innerHTML: sanitizedDescription.value
35804
- }, null, 12, _hoisted_1$y)) : (openBlock(), createElementBlock("div", {
36097
+ }, null, 12, _hoisted_1$A)) : (openBlock(), createElementBlock("div", {
35805
36098
  key: 1,
35806
36099
  class: "lupa-search-results-product-description",
35807
36100
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -35809,15 +36102,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
35809
36102
  };
35810
36103
  }
35811
36104
  });
35812
- const _hoisted_1$x = { id: "lupa-search-results-rating" };
35813
- const _hoisted_2$p = { class: "lupa-ratings" };
35814
- const _hoisted_3$h = { class: "lupa-ratings-base" };
35815
- const _hoisted_4$a = ["innerHTML"];
35816
- const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
36105
+ const _hoisted_1$z = { id: "lupa-search-results-rating" };
36106
+ const _hoisted_2$r = { class: "lupa-ratings" };
36107
+ const _hoisted_3$j = { class: "lupa-ratings-base" };
36108
+ const _hoisted_4$c = ["innerHTML"];
36109
+ const _hoisted_5$7 = { class: "lupa-rating-wrapper" };
35817
36110
  const _hoisted_6$2 = ["innerHTML"];
35818
36111
  const _hoisted_7$1 = ["href"];
35819
36112
  const STAR_COUNT = 5;
35820
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
36113
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
35821
36114
  __name: "SearchResultsProductRating",
35822
36115
  props: {
35823
36116
  item: {},
@@ -35854,18 +36147,18 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
35854
36147
  return generateLink(props.options.links.ratingDetails, props.item);
35855
36148
  });
35856
36149
  return (_ctx, _cache) => {
35857
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
35858
- createBaseVNode("div", _hoisted_2$p, [
35859
- createBaseVNode("div", _hoisted_3$h, [
36150
+ return openBlock(), createElementBlock("div", _hoisted_1$z, [
36151
+ createBaseVNode("div", _hoisted_2$r, [
36152
+ createBaseVNode("div", _hoisted_3$j, [
35860
36153
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
35861
36154
  return openBlock(), createElementBlock("div", {
35862
36155
  key: index,
35863
36156
  innerHTML: star,
35864
36157
  class: "lupa-rating lupa-rating-not-highlighted"
35865
- }, null, 8, _hoisted_4$a);
36158
+ }, null, 8, _hoisted_4$c);
35866
36159
  }), 128))
35867
36160
  ]),
35868
- createBaseVNode("div", _hoisted_5$6, [
36161
+ createBaseVNode("div", _hoisted_5$7, [
35869
36162
  createBaseVNode("div", {
35870
36163
  class: "lupa-ratings-highlighted",
35871
36164
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -35888,11 +36181,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
35888
36181
  };
35889
36182
  }
35890
36183
  });
35891
- const _hoisted_1$w = {
36184
+ const _hoisted_1$y = {
35892
36185
  class: "lupa-search-results-product-regular-price",
35893
36186
  "data-cy": "lupa-search-results-product-regular-price"
35894
36187
  };
35895
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
36188
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
35896
36189
  __name: "SearchResultsProductRegularPrice",
35897
36190
  props: {
35898
36191
  item: {},
@@ -35914,11 +36207,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
35914
36207
  );
35915
36208
  });
35916
36209
  return (_ctx, _cache) => {
35917
- return openBlock(), createElementBlock("div", _hoisted_1$w, toDisplayString(price.value), 1);
36210
+ return openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(price.value), 1);
35918
36211
  };
35919
36212
  }
35920
36213
  });
35921
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
36214
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
35922
36215
  __name: "SearchResultsProductPrice",
35923
36216
  props: {
35924
36217
  item: {},
@@ -35952,12 +36245,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
35952
36245
  };
35953
36246
  }
35954
36247
  });
35955
- const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
35956
- const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
35957
- const _hoisted_3$g = ["disabled"];
35958
- const _hoisted_4$9 = ["href"];
35959
- const _hoisted_5$5 = ["id", "disabled"];
35960
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
36248
+ const _hoisted_1$x = { class: "lupa-search-results-add-to-cart-wrapper" };
36249
+ const _hoisted_2$q = { class: "lupa-search-results-product-addtocart" };
36250
+ const _hoisted_3$i = ["disabled"];
36251
+ const _hoisted_4$b = ["href"];
36252
+ const _hoisted_5$6 = ["id", "disabled"];
36253
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
35961
36254
  __name: "SearchResultsProductAddToCart",
35962
36255
  props: {
35963
36256
  item: {},
@@ -36016,16 +36309,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
36016
36309
  loading.value = false;
36017
36310
  });
36018
36311
  return (_ctx, _cache) => {
36019
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
36020
- createBaseVNode("div", _hoisted_2$o, [
36312
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
36313
+ createBaseVNode("div", _hoisted_2$q, [
36021
36314
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
36022
36315
  key: 0,
36023
36316
  class: addToCartButtonClass.value,
36024
36317
  "data-cy": "lupa-add-to-cart",
36025
36318
  disabled: !inStockValue.value || loading.value
36026
36319
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
36027
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
36028
- ], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
36320
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$b)
36321
+ ], 16, _hoisted_3$i)) : (openBlock(), createElementBlock("button", mergeProps({
36029
36322
  key: 1,
36030
36323
  id: id.value,
36031
36324
  class: addToCartButtonClass.value,
@@ -36033,18 +36326,18 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
36033
36326
  disabled: !inStockValue.value || loading.value
36034
36327
  }, _ctx.dynamicAttributes, {
36035
36328
  onClick: withModifiers(handleClick, ["stop"])
36036
- }), toDisplayString(label.value), 17, _hoisted_5$5))
36329
+ }), toDisplayString(label.value), 17, _hoisted_5$6))
36037
36330
  ])
36038
36331
  ]);
36039
36332
  };
36040
36333
  }
36041
36334
  });
36042
- const _hoisted_1$u = ["innerHTML"];
36043
- const _hoisted_2$n = { key: 0 };
36044
- const _hoisted_3$f = { key: 1 };
36045
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
36046
- const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
36047
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
36335
+ const _hoisted_1$w = ["innerHTML"];
36336
+ const _hoisted_2$p = { key: 0 };
36337
+ const _hoisted_3$h = { key: 1 };
36338
+ const _hoisted_4$a = { class: "lupa-search-box-custom-label" };
36339
+ const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
36340
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
36048
36341
  __name: "SearchResultsProductCustom",
36049
36342
  props: {
36050
36343
  item: {},
@@ -36086,20 +36379,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
36086
36379
  key: 0,
36087
36380
  class: className.value,
36088
36381
  innerHTML: text.value
36089
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$u)) : (openBlock(), createElementBlock("div", mergeProps({
36382
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$w)) : (openBlock(), createElementBlock("div", mergeProps({
36090
36383
  key: 1,
36091
36384
  class: className.value
36092
36385
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
36093
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
36094
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
36095
- createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
36386
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$h, [
36387
+ createBaseVNode("div", _hoisted_4$a, toDisplayString(label.value), 1),
36388
+ createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
36096
36389
  ]))
36097
36390
  ], 16));
36098
36391
  };
36099
36392
  }
36100
36393
  });
36101
- const _hoisted_1$t = ["innerHTML"];
36102
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
36394
+ const _hoisted_1$v = ["innerHTML"];
36395
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
36103
36396
  __name: "SearchResultsProductCustomHtmlElement",
36104
36397
  props: {
36105
36398
  item: {},
@@ -36135,15 +36428,15 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
36135
36428
  return openBlock(), createElementBlock("div", mergeProps({
36136
36429
  class: className.value,
36137
36430
  innerHTML: text.value
36138
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$t);
36431
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$v);
36139
36432
  };
36140
36433
  }
36141
36434
  });
36142
- const _hoisted_1$s = { id: "lupa-search-results-rating" };
36143
- const _hoisted_2$m = ["innerHTML"];
36144
- const _hoisted_3$e = { class: "lupa-ratings" };
36145
- const _hoisted_4$7 = ["href"];
36146
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
36435
+ const _hoisted_1$u = { id: "lupa-search-results-rating" };
36436
+ const _hoisted_2$o = ["innerHTML"];
36437
+ const _hoisted_3$g = { class: "lupa-ratings" };
36438
+ const _hoisted_4$9 = ["href"];
36439
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
36147
36440
  __name: "SearchResultsProductSingleStarRating",
36148
36441
  props: {
36149
36442
  item: {},
@@ -36171,35 +36464,35 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
36171
36464
  return RATING_STAR_HTML;
36172
36465
  });
36173
36466
  return (_ctx, _cache) => {
36174
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
36467
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
36175
36468
  createBaseVNode("div", {
36176
36469
  innerHTML: star.value,
36177
36470
  class: "lupa-rating lupa-rating-highlighted"
36178
- }, null, 8, _hoisted_2$m),
36179
- createBaseVNode("div", _hoisted_3$e, toDisplayString(rating.value), 1),
36471
+ }, null, 8, _hoisted_2$o),
36472
+ createBaseVNode("div", _hoisted_3$g, toDisplayString(rating.value), 1),
36180
36473
  createBaseVNode("a", {
36181
36474
  href: ratingLink.value,
36182
36475
  class: "lupa-total-ratings"
36183
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
36476
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$9)
36184
36477
  ]);
36185
36478
  };
36186
36479
  }
36187
36480
  });
36188
36481
  const __default__ = {
36189
36482
  components: {
36190
- SearchResultsProductImage: _sfc_main$E,
36191
- SearchResultsProductTitle: _sfc_main$D,
36192
- SearchResultsProductDescription: _sfc_main$C,
36193
- SearchResultsProductRating: _sfc_main$B,
36194
- SearchResultsProductRegularPrice: _sfc_main$A,
36195
- SearchResultsProductPrice: _sfc_main$z,
36196
- SearchResultsProductAddToCart: _sfc_main$y,
36197
- SearchResultsProductCustom: _sfc_main$x,
36198
- SearchResultsProductCustomHtmlElement: _sfc_main$w,
36199
- SearchResultsProductSingleStarRating: _sfc_main$v
36200
- }
36201
- };
36202
- const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
36483
+ SearchResultsProductImage: _sfc_main$G,
36484
+ SearchResultsProductTitle: _sfc_main$F,
36485
+ SearchResultsProductDescription: _sfc_main$E,
36486
+ SearchResultsProductRating: _sfc_main$D,
36487
+ SearchResultsProductRegularPrice: _sfc_main$C,
36488
+ SearchResultsProductPrice: _sfc_main$B,
36489
+ SearchResultsProductAddToCart: _sfc_main$A,
36490
+ SearchResultsProductCustom: _sfc_main$z,
36491
+ SearchResultsProductCustomHtmlElement: _sfc_main$y,
36492
+ SearchResultsProductSingleStarRating: _sfc_main$x
36493
+ }
36494
+ };
36495
+ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
36203
36496
  __name: "SearchResultsProductCardElement",
36204
36497
  props: {
36205
36498
  item: {},
@@ -36277,13 +36570,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
36277
36570
  };
36278
36571
  }
36279
36572
  }));
36280
- const _hoisted_1$r = ["href"];
36281
- const _hoisted_2$l = {
36573
+ const _hoisted_1$t = ["href"];
36574
+ const _hoisted_2$n = {
36282
36575
  key: 0,
36283
36576
  class: "lupa-out-of-stock"
36284
36577
  };
36285
- const _hoisted_3$d = { class: "lupa-search-result-product-details-section" };
36286
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
36578
+ const _hoisted_3$f = { class: "lupa-search-result-product-details-section" };
36579
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
36287
36580
  __name: "SearchResultsProductCard",
36288
36581
  props: {
36289
36582
  product: {},
@@ -36459,7 +36752,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36459
36752
  default: withCtx(() => {
36460
36753
  var _a25;
36461
36754
  return [
36462
- createVNode(_sfc_main$1a, { options: badgesOptions.value }, null, 8, ["options"]),
36755
+ createVNode(_sfc_main$1g, { options: badgesOptions.value }, null, 8, ["options"]),
36463
36756
  createBaseVNode("div", {
36464
36757
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
36465
36758
  }, [
@@ -36469,7 +36762,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36469
36762
  onClick: handleNavigation
36470
36763
  }, [
36471
36764
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
36472
- return openBlock(), createBlock(_sfc_main$u, {
36765
+ return openBlock(), createBlock(_sfc_main$w, {
36473
36766
  class: "lupa-search-results-product-element",
36474
36767
  item: _ctx.product,
36475
36768
  element,
@@ -36480,16 +36773,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36480
36773
  onProductEvent: handleProductEvent
36481
36774
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
36482
36775
  }), 128)),
36483
- createVNode(_sfc_main$1a, {
36776
+ createVNode(_sfc_main$1g, {
36484
36777
  options: badgesOptions.value,
36485
36778
  position: "image",
36486
36779
  class: "lupa-image-badges"
36487
36780
  }, null, 8, ["options"]),
36488
- ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
36489
- ], 8, _hoisted_1$r),
36490
- createBaseVNode("div", _hoisted_3$d, [
36781
+ ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
36782
+ ], 8, _hoisted_1$t),
36783
+ createBaseVNode("div", _hoisted_3$f, [
36491
36784
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
36492
- return openBlock(), createBlock(_sfc_main$u, {
36785
+ return openBlock(), createBlock(_sfc_main$w, {
36493
36786
  class: "lupa-search-results-product-element",
36494
36787
  item: _ctx.product,
36495
36788
  element,
@@ -36507,7 +36800,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36507
36800
  class: normalizeClass("lupa-element-group-" + group)
36508
36801
  }, [
36509
36802
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
36510
- return openBlock(), createBlock(_sfc_main$u, {
36803
+ return openBlock(), createBlock(_sfc_main$w, {
36511
36804
  class: "lupa-search-results-product-element",
36512
36805
  item: _ctx.product,
36513
36806
  element,
@@ -36528,23 +36821,23 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36528
36821
  };
36529
36822
  }
36530
36823
  });
36531
- const _hoisted_1$q = {
36824
+ const _hoisted_1$s = {
36532
36825
  id: "lupa-search-results-similar-queries",
36533
36826
  "data-cy": "lupa-search-results-similar-queries"
36534
36827
  };
36535
- const _hoisted_2$k = { class: "lupa-similar-queries-label" };
36536
- const _hoisted_3$c = {
36828
+ const _hoisted_2$m = { class: "lupa-similar-queries-label" };
36829
+ const _hoisted_3$e = {
36537
36830
  class: "lupa-similar-query-label",
36538
36831
  "data-cy": "lupa-similar-query-label"
36539
36832
  };
36540
- const _hoisted_4$6 = ["onClick"];
36541
- const _hoisted_5$3 = ["innerHTML"];
36833
+ const _hoisted_4$8 = ["onClick"];
36834
+ const _hoisted_5$4 = ["innerHTML"];
36542
36835
  const _hoisted_6$1 = { key: 0 };
36543
36836
  const _hoisted_7 = {
36544
36837
  class: "lupa-products",
36545
36838
  "data-cy": "lupa-products"
36546
36839
  };
36547
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
36840
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
36548
36841
  __name: "SearchResultsSimilarQueries",
36549
36842
  props: {
36550
36843
  labels: {},
@@ -36582,11 +36875,11 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36582
36875
  };
36583
36876
  };
36584
36877
  return (_ctx, _cache) => {
36585
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
36586
- createBaseVNode("div", _hoisted_2$k, toDisplayString(_ctx.labels.similarQueries), 1),
36878
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
36879
+ createBaseVNode("div", _hoisted_2$m, toDisplayString(_ctx.labels.similarQueries), 1),
36587
36880
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
36588
36881
  return openBlock(), createElementBlock("div", { key: index }, [
36589
- createBaseVNode("div", _hoisted_3$c, [
36882
+ createBaseVNode("div", _hoisted_3$e, [
36590
36883
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
36591
36884
  createBaseVNode("span", {
36592
36885
  id: "lupa-similar-query-text-component",
@@ -36596,13 +36889,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36596
36889
  }, [
36597
36890
  createBaseVNode("span", {
36598
36891
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
36599
- }, null, 8, _hoisted_5$3),
36892
+ }, null, 8, _hoisted_5$4),
36600
36893
  similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
36601
- ], 8, _hoisted_4$6)
36894
+ ], 8, _hoisted_4$8)
36602
36895
  ]),
36603
36896
  createBaseVNode("div", _hoisted_7, [
36604
36897
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
36605
- return openBlock(), createBlock(_sfc_main$t, {
36898
+ return openBlock(), createBlock(_sfc_main$v, {
36606
36899
  style: normalizeStyle(_ctx.columnSize),
36607
36900
  key: getDocumentKey(index2, product),
36608
36901
  product,
@@ -36617,15 +36910,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36617
36910
  };
36618
36911
  }
36619
36912
  });
36620
- const _hoisted_1$p = {
36913
+ const _hoisted_1$r = {
36621
36914
  key: 0,
36622
36915
  class: "lupa-results-additional-panel"
36623
36916
  };
36624
- const _hoisted_2$j = {
36917
+ const _hoisted_2$l = {
36625
36918
  class: "lupa-results-additional-panel-items",
36626
36919
  "data-cy": "lupa-results-additional-panel-items"
36627
36920
  };
36628
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
36921
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36629
36922
  __name: "AdditionalPanel",
36630
36923
  props: {
36631
36924
  panel: {},
@@ -36698,10 +36991,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
36698
36991
  handleQueryChange();
36699
36992
  });
36700
36993
  return (_ctx, _cache) => {
36701
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
36702
- createBaseVNode("div", _hoisted_2$j, [
36994
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
36995
+ createBaseVNode("div", _hoisted_2$l, [
36703
36996
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
36704
- return openBlock(), createBlock(_sfc_main$t, {
36997
+ return openBlock(), createBlock(_sfc_main$v, {
36705
36998
  key: index,
36706
36999
  product: item,
36707
37000
  options: _ctx.panel,
@@ -36719,11 +37012,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
36719
37012
  };
36720
37013
  }
36721
37014
  });
36722
- const _hoisted_1$o = {
37015
+ const _hoisted_1$q = {
36723
37016
  key: 0,
36724
37017
  class: "lupa-results-additional-panels"
36725
37018
  };
36726
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
37019
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36727
37020
  __name: "AdditionalPanels",
36728
37021
  props: {
36729
37022
  options: {},
@@ -36740,9 +37033,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
36740
37033
  return locationPanels.value.length > 0;
36741
37034
  });
36742
37035
  return (_ctx, _cache) => {
36743
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
37036
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
36744
37037
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
36745
- return openBlock(), createBlock(_sfc_main$r, {
37038
+ return openBlock(), createBlock(_sfc_main$t, {
36746
37039
  key: panel.queryKey,
36747
37040
  panel,
36748
37041
  options: _ctx.sdkOptions
@@ -36759,29 +37052,29 @@ const _export_sfc = (sfc, props) => {
36759
37052
  }
36760
37053
  return target2;
36761
37054
  };
36762
- const _sfc_main$p = {};
36763
- const _hoisted_1$n = { class: "lupa-spinner-wrapper" };
36764
- const _hoisted_2$i = { class: "lupa-spinner" };
37055
+ const _sfc_main$r = {};
37056
+ const _hoisted_1$p = { class: "lupa-spinner-wrapper" };
37057
+ const _hoisted_2$k = { class: "lupa-spinner" };
36765
37058
  function _sfc_render(_ctx, _cache) {
36766
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
36767
- createBaseVNode("div", _hoisted_2$i, [
37059
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
37060
+ createBaseVNode("div", _hoisted_2$k, [
36768
37061
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
36769
37062
  return createBaseVNode("div", { key: x });
36770
37063
  }), 64))
36771
37064
  ])
36772
37065
  ]);
36773
37066
  }
36774
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render]]);
36775
- const _hoisted_1$m = {
37067
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
37068
+ const _hoisted_1$o = {
36776
37069
  id: "lupa-search-results-similar-results",
36777
37070
  "data-cy": "lupa-search-results-similar-results"
36778
37071
  };
36779
- const _hoisted_2$h = { class: "lupa-similar-results-label" };
36780
- const _hoisted_3$b = {
37072
+ const _hoisted_2$j = { class: "lupa-similar-results-label" };
37073
+ const _hoisted_3$d = {
36781
37074
  class: "lupa-products",
36782
37075
  "data-cy": "lupa-products"
36783
37076
  };
36784
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
37077
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
36785
37078
  __name: "SearchResultsSimilarResults",
36786
37079
  props: {
36787
37080
  columnSize: {},
@@ -36802,11 +37095,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
36802
37095
  };
36803
37096
  });
36804
37097
  return (_ctx, _cache) => {
36805
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
36806
- createBaseVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarResultsLabel), 1),
36807
- createBaseVNode("div", _hoisted_3$b, [
37098
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
37099
+ createBaseVNode("div", _hoisted_2$j, toDisplayString(_ctx.labels.similarResultsLabel), 1),
37100
+ createBaseVNode("div", _hoisted_3$d, [
36808
37101
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
36809
- return openBlock(), createBlock(_sfc_main$t, {
37102
+ return openBlock(), createBlock(_sfc_main$v, {
36810
37103
  style: normalizeStyle(_ctx.columnSize),
36811
37104
  key: getDocumentKey(index, product),
36812
37105
  product,
@@ -36927,15 +37220,15 @@ const extractRelatedSource = (source, searchResults2, options, activeFilters) =>
36927
37220
  return extractFacetsRelatedSource(source, searchResults2, options, activeFilters);
36928
37221
  }
36929
37222
  });
36930
- const _hoisted_1$l = { class: "lupa-related-query-item" };
36931
- const _hoisted_2$g = { class: "lupa-related-query-image" };
36932
- const _hoisted_3$a = { class: "lupa-related-query-label" };
36933
- const _hoisted_4$5 = { class: "lupa-related-query-title" };
36934
- const _hoisted_5$2 = {
37223
+ const _hoisted_1$n = { class: "lupa-related-query-item" };
37224
+ const _hoisted_2$i = { class: "lupa-related-query-image" };
37225
+ const _hoisted_3$c = { class: "lupa-related-query-label" };
37226
+ const _hoisted_4$7 = { class: "lupa-related-query-title" };
37227
+ const _hoisted_5$3 = {
36935
37228
  key: 0,
36936
37229
  class: "lupa-related-query-count"
36937
37230
  };
36938
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
37231
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
36939
37232
  __name: "RelatedQueryPanel",
36940
37233
  props: {
36941
37234
  query: {},
@@ -37031,9 +37324,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
37031
37324
  });
37032
37325
  return (_ctx, _cache) => {
37033
37326
  var _a25;
37034
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
37035
- createBaseVNode("div", _hoisted_2$g, [
37036
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
37327
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
37328
+ createBaseVNode("div", _hoisted_2$i, [
37329
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
37037
37330
  key: 0,
37038
37331
  "wrapper-class": "lupa-related-query-image-wrapper",
37039
37332
  "image-class": "lupa-related-query-image",
@@ -37041,24 +37334,24 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
37041
37334
  options: image.value
37042
37335
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37043
37336
  ]),
37044
- createBaseVNode("div", _hoisted_3$a, [
37045
- createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
37046
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37337
+ createBaseVNode("div", _hoisted_3$c, [
37338
+ createBaseVNode("span", _hoisted_4$7, toDisplayString(_ctx.query), 1),
37339
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37047
37340
  ])
37048
37341
  ]);
37049
37342
  };
37050
37343
  }
37051
37344
  });
37052
- const _hoisted_1$k = {
37345
+ const _hoisted_1$m = {
37053
37346
  key: 0,
37054
37347
  class: "lupa-related-queries"
37055
37348
  };
37056
- const _hoisted_2$f = {
37349
+ const _hoisted_2$h = {
37057
37350
  key: 0,
37058
37351
  class: "lupa-related-queries-title"
37059
37352
  };
37060
- const _hoisted_3$9 = ["onClick"];
37061
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
37353
+ const _hoisted_3$b = ["onClick"];
37354
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
37062
37355
  __name: "RelatedQueries",
37063
37356
  props: {
37064
37357
  options: {}
@@ -37152,8 +37445,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
37152
37445
  };
37153
37446
  return (_ctx, _cache) => {
37154
37447
  var _a25, _b25, _c, _d;
37155
- return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
37156
- ((_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),
37448
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
37449
+ ((_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),
37157
37450
  createBaseVNode("ul", null, [
37158
37451
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
37159
37452
  return withDirectives((openBlock(), createElementBlock("li", {
@@ -37163,14 +37456,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
37163
37456
  createBaseVNode("a", {
37164
37457
  onClick: ($event) => handleRelatedQueryClick(query)
37165
37458
  }, [
37166
- createVNode(_sfc_main$n, {
37459
+ createVNode(_sfc_main$p, {
37167
37460
  "source-key": query.key,
37168
37461
  options: _ctx.options,
37169
37462
  query: query.value,
37170
37463
  "existing-items-from-other-queries": allDisplayItems.value,
37171
37464
  onLoaded: (item) => processLoadedItem(query, item)
37172
37465
  }, null, 8, ["source-key", "options", "query", "existing-items-from-other-queries", "onLoaded"])
37173
- ], 8, _hoisted_3$9)
37466
+ ], 8, _hoisted_3$b)
37174
37467
  ], 2)), [
37175
37468
  [vShow, querySourceResultMap.value[query.value] !== false]
37176
37469
  ]);
@@ -37207,13 +37500,13 @@ const extractRedirectionSuggestion = (searchText = "", options) => {
37207
37500
  }
37208
37501
  return null;
37209
37502
  };
37210
- const _hoisted_1$j = {
37503
+ const _hoisted_1$l = {
37211
37504
  key: 0,
37212
37505
  class: "lupa-redirection-suggestion"
37213
37506
  };
37214
- const _hoisted_2$e = { class: "lupa-redirections-suggestion-label" };
37215
- const _hoisted_3$8 = ["href"];
37216
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
37507
+ const _hoisted_2$g = { class: "lupa-redirections-suggestion-label" };
37508
+ const _hoisted_3$a = ["href"];
37509
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
37217
37510
  __name: "RedirectionSuggestions",
37218
37511
  props: {
37219
37512
  options: {}
@@ -37236,19 +37529,19 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
37236
37529
  )
37237
37530
  );
37238
37531
  return (_ctx, _cache) => {
37239
- return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
37240
- createBaseVNode("h4", _hoisted_2$e, [
37241
- createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$8)
37532
+ return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
37533
+ createBaseVNode("h4", _hoisted_2$g, [
37534
+ createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$a)
37242
37535
  ])
37243
37536
  ])) : createCommentVNode("", true);
37244
37537
  };
37245
37538
  }
37246
37539
  });
37247
- const _hoisted_1$i = {
37540
+ const _hoisted_1$k = {
37248
37541
  key: 0,
37249
37542
  class: "lupa-refiners-loading-notice"
37250
37543
  };
37251
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
37544
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
37252
37545
  __name: "RefinersLoadingNotice",
37253
37546
  props: {
37254
37547
  labels: {}
@@ -37259,22 +37552,22 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
37259
37552
  const props = __props;
37260
37553
  const label = computed(() => props.labels.refinersLoadingNotice);
37261
37554
  return (_ctx, _cache) => {
37262
- return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
37555
+ return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
37263
37556
  createBaseVNode("p", null, toDisplayString(label.value), 1),
37264
37557
  createVNode(Spinner)
37265
37558
  ])) : createCommentVNode("", true);
37266
37559
  };
37267
37560
  }
37268
37561
  });
37269
- const _hoisted_1$h = { class: "lupa-related-query-item" };
37270
- const _hoisted_2$d = { class: "lupa-related-query-image" };
37271
- const _hoisted_3$7 = { class: "lupa-related-query-label" };
37272
- const _hoisted_4$4 = { class: "lupa-related-query-title" };
37273
- const _hoisted_5$1 = {
37562
+ const _hoisted_1$j = { class: "lupa-related-query-item" };
37563
+ const _hoisted_2$f = { class: "lupa-related-query-image" };
37564
+ const _hoisted_3$9 = { class: "lupa-related-query-label" };
37565
+ const _hoisted_4$6 = { class: "lupa-related-query-title" };
37566
+ const _hoisted_5$2 = {
37274
37567
  key: 0,
37275
37568
  class: "lupa-related-query-count"
37276
37569
  };
37277
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
37570
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
37278
37571
  __name: "RelatedQueryPanelApi",
37279
37572
  props: {
37280
37573
  relatedQuery: {},
@@ -37306,9 +37599,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
37306
37599
  });
37307
37600
  return (_ctx, _cache) => {
37308
37601
  var _a25;
37309
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
37310
- createBaseVNode("div", _hoisted_2$d, [
37311
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
37602
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
37603
+ createBaseVNode("div", _hoisted_2$f, [
37604
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
37312
37605
  key: 0,
37313
37606
  "wrapper-class": "lupa-related-query-image-wrapper",
37314
37607
  "image-class": "lupa-related-query-image",
@@ -37316,24 +37609,24 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
37316
37609
  options: image.value
37317
37610
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37318
37611
  ]),
37319
- createBaseVNode("div", _hoisted_3$7, [
37320
- createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
37321
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37612
+ createBaseVNode("div", _hoisted_3$9, [
37613
+ createBaseVNode("span", _hoisted_4$6, toDisplayString(query.value), 1),
37614
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37322
37615
  ])
37323
37616
  ]);
37324
37617
  };
37325
37618
  }
37326
37619
  });
37327
- const _hoisted_1$g = {
37620
+ const _hoisted_1$i = {
37328
37621
  key: 0,
37329
37622
  class: "lupa-related-queries"
37330
37623
  };
37331
- const _hoisted_2$c = {
37624
+ const _hoisted_2$e = {
37332
37625
  key: 0,
37333
37626
  class: "lupa-related-queries-title"
37334
37627
  };
37335
- const _hoisted_3$6 = ["onClick"];
37336
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
37628
+ const _hoisted_3$8 = ["onClick"];
37629
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
37337
37630
  __name: "RelatedQueriesApi",
37338
37631
  props: {
37339
37632
  options: {}
@@ -37343,7 +37636,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37343
37636
  const searchResultStore = useSearchResultStore();
37344
37637
  const paramsStore = useParamsStore();
37345
37638
  const optionsStore = useOptionsStore();
37346
- const { searchResult, relatedQueriesResult } = storeToRefs(searchResultStore);
37639
+ const { searchResult, relatedQueriesResult, relatedQueryFacetKeys } = storeToRefs(searchResultStore);
37347
37640
  const relatedQueries2 = computed(() => {
37348
37641
  var _a25, _b25, _c, _d;
37349
37642
  const allQueries = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) != null ? _b25 : [];
@@ -37371,7 +37664,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37371
37664
  { key: query.key, value: query.value },
37372
37665
  optionsStore.getQueryParamName,
37373
37666
  {},
37374
- (_a25 = relatedQueries2.value) == null ? void 0 : _a25.map((q) => `f.${q.facetKey}`)
37667
+ (_a25 = relatedQueryFacetKeys.value) == null ? void 0 : _a25.map((key) => `f.${key}`)
37375
37668
  );
37376
37669
  };
37377
37670
  const getSelectedFilterClass = (relatedQuery) => {
@@ -37385,8 +37678,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37385
37678
  };
37386
37679
  return (_ctx, _cache) => {
37387
37680
  var _a25, _b25, _c, _d;
37388
- return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
37389
- ((_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),
37681
+ return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
37682
+ ((_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),
37390
37683
  createBaseVNode("ul", null, [
37391
37684
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
37392
37685
  return openBlock(), createElementBlock("li", {
@@ -37396,11 +37689,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37396
37689
  createBaseVNode("a", {
37397
37690
  onClick: ($event) => handleRelatedQueryClick(query)
37398
37691
  }, [
37399
- createVNode(_sfc_main$j, {
37692
+ createVNode(_sfc_main$l, {
37400
37693
  relatedQuery: query,
37401
37694
  options: _ctx.options
37402
37695
  }, null, 8, ["relatedQuery", "options"])
37403
- ], 8, _hoisted_3$6)
37696
+ ], 8, _hoisted_3$8)
37404
37697
  ], 2);
37405
37698
  }), 128))
37406
37699
  ])
@@ -37408,9 +37701,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37408
37701
  };
37409
37702
  }
37410
37703
  });
37411
- const _hoisted_1$f = { key: 0 };
37412
- const _hoisted_2$b = ["innerHTML"];
37413
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
37704
+ const _hoisted_1$h = { key: 0 };
37705
+ const _hoisted_2$d = ["innerHTML"];
37706
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
37414
37707
  __name: "ZeroResults",
37415
37708
  props: {
37416
37709
  emptyResultsLabel: {},
@@ -37439,36 +37732,36 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
37439
37732
  });
37440
37733
  return (_ctx, _cache) => {
37441
37734
  return openBlock(), createElementBlock(Fragment, null, [
37442
- showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
37735
+ showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
37443
37736
  createTextVNode(toDisplayString(_ctx.emptyResultsLabel) + " ", 1),
37444
37737
  createBaseVNode("span", null, toDisplayString(_ctx.currentQueryText), 1)
37445
37738
  ])) : createCommentVNode("", true),
37446
37739
  showCustomZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", {
37447
37740
  key: 1,
37448
37741
  innerHTML: htmlTemplate.value
37449
- }, null, 8, _hoisted_2$b)) : createCommentVNode("", true)
37742
+ }, null, 8, _hoisted_2$d)) : createCommentVNode("", true)
37450
37743
  ], 64);
37451
37744
  };
37452
37745
  }
37453
37746
  });
37454
- const _hoisted_1$e = { id: "lupa-search-results-products" };
37455
- const _hoisted_2$a = {
37747
+ const _hoisted_1$g = { id: "lupa-search-results-products" };
37748
+ const _hoisted_2$c = {
37456
37749
  class: "lupa-products",
37457
37750
  "data-cy": "lupa-products"
37458
37751
  };
37459
- const _hoisted_3$5 = {
37752
+ const _hoisted_3$7 = {
37460
37753
  key: 1,
37461
37754
  class: "lupa-empty-results",
37462
37755
  "data-cy": "lupa-no-results-in-page"
37463
37756
  };
37464
- const _hoisted_4$3 = {
37757
+ const _hoisted_4$5 = {
37465
37758
  key: 5,
37466
37759
  class: "lupa-empty-results",
37467
37760
  "data-cy": "lupa-no-results"
37468
37761
  };
37469
- const _hoisted_5 = { key: 6 };
37762
+ const _hoisted_5$1 = { key: 6 };
37470
37763
  const _hoisted_6 = { key: 7 };
37471
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
37764
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37472
37765
  __name: "SearchResultsProducts",
37473
37766
  props: {
37474
37767
  options: {},
@@ -37484,7 +37777,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37484
37777
  hasResults,
37485
37778
  currentQueryText,
37486
37779
  isPageEmpty,
37487
- isMobileSidebarVisible,
37780
+ isFilterSidebarVisible,
37488
37781
  columnCount,
37489
37782
  searchResult,
37490
37783
  layout,
@@ -37515,7 +37808,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37515
37808
  });
37516
37809
  const showTopFilters = computed(() => {
37517
37810
  var _a25, _b25, _c;
37518
- return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) === "top-dropdown";
37811
+ return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
37519
37812
  });
37520
37813
  const showMobileFilters = computed(() => {
37521
37814
  return props.options.searchTitlePosition !== "search-results-top";
@@ -37592,40 +37885,40 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37592
37885
  };
37593
37886
  return (_ctx, _cache) => {
37594
37887
  var _a25, _b25, _c;
37595
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
37596
- unref(loading) && !unref(isMobileSidebarVisible) ? (openBlock(), createBlock(Spinner, {
37888
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
37889
+ unref(loading) && !unref(isFilterSidebarVisible) ? (openBlock(), createBlock(Spinner, {
37597
37890
  key: 0,
37598
37891
  class: "lupa-loader"
37599
37892
  })) : createCommentVNode("", true),
37600
- createVNode(_sfc_main$l, {
37893
+ createVNode(_sfc_main$n, {
37601
37894
  options: _ctx.options.redirectionSuggestions
37602
37895
  }, null, 8, ["options"]),
37603
- createVNode(_sfc_main$q, {
37896
+ createVNode(_sfc_main$s, {
37604
37897
  options: _ctx.options,
37605
37898
  location: "top",
37606
37899
  sdkOptions: _ctx.options.options
37607
37900
  }, null, 8, ["options", "sdkOptions"]),
37608
- showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$m, {
37901
+ showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$o, {
37609
37902
  key: 1,
37610
37903
  options: _ctx.options.relatedQueries
37611
37904
  }, null, 8, ["options"])) : createCommentVNode("", true),
37612
- showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$i, {
37905
+ showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$k, {
37613
37906
  key: 2,
37614
37907
  options: _ctx.options.relatedQueries
37615
37908
  }, null, 8, ["options"])) : createCommentVNode("", true),
37616
37909
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
37617
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$M, {
37910
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
37618
37911
  key: 0,
37619
37912
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
37620
37913
  }, null, 8, ["options"])) : createCommentVNode("", true),
37621
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$F, {
37914
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
37622
37915
  key: 1,
37623
37916
  class: "lupa-toolbar-mobile",
37624
37917
  options: _ctx.options,
37625
37918
  "pagination-location": "top",
37626
37919
  onFilter: filter
37627
37920
  }, null, 8, ["options"])) : createCommentVNode("", true),
37628
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$_, {
37921
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
37629
37922
  key: 2,
37630
37923
  class: normalizeClass(currentFiltersClass.value),
37631
37924
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -37634,19 +37927,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37634
37927
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
37635
37928
  ], 64)) : createCommentVNode("", true),
37636
37929
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
37637
- createVNode(_sfc_main$F, {
37930
+ createVNode(_sfc_main$H, {
37638
37931
  class: "lupa-toolbar-top",
37639
37932
  options: _ctx.options,
37640
37933
  "pagination-location": "top"
37641
37934
  }, null, 8, ["options"]),
37642
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$_, {
37935
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$14, {
37643
37936
  key: 0,
37644
37937
  class: normalizeClass(currentFiltersClass.value),
37645
37938
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
37646
37939
  options: currentFilterOptions.value,
37647
37940
  expandable: !desktopFiltersExpanded.value
37648
37941
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
37649
- createBaseVNode("div", _hoisted_2$a, [
37942
+ createBaseVNode("div", _hoisted_2$c, [
37650
37943
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
37651
37944
  return renderSlot(_ctx.$slots, "productCard", {
37652
37945
  style: normalizeStyle(columnSize.value),
@@ -37655,7 +37948,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37655
37948
  options: productCardOptions.value
37656
37949
  });
37657
37950
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
37658
- return openBlock(), createBlock(_sfc_main$t, {
37951
+ return openBlock(), createBlock(_sfc_main$v, {
37659
37952
  style: normalizeStyle(columnSize.value),
37660
37953
  key: getProductKeyAction(index, product),
37661
37954
  product,
@@ -37664,7 +37957,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37664
37957
  }, null, 8, ["style", "product", "options", "analytics-metadata"]);
37665
37958
  }), 128))
37666
37959
  ]),
37667
- unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
37960
+ unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
37668
37961
  createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
37669
37962
  _ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
37670
37963
  key: 0,
@@ -37672,36 +37965,36 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37672
37965
  onClick: goToFirstPage
37673
37966
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
37674
37967
  ])) : createCommentVNode("", true),
37675
- createVNode(_sfc_main$F, {
37968
+ createVNode(_sfc_main$H, {
37676
37969
  class: "lupa-toolbar-bottom",
37677
37970
  options: _ctx.options,
37678
37971
  "pagination-location": "bottom"
37679
37972
  }, null, 8, ["options"]),
37680
- createVNode(_sfc_main$q, {
37973
+ createVNode(_sfc_main$s, {
37681
37974
  options: _ctx.options,
37682
37975
  location: "bottom",
37683
37976
  sdkOptions: _ctx.options.options
37684
37977
  }, null, 8, ["options", "sdkOptions"])
37685
- ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
37686
- createVNode(_sfc_main$h, {
37978
+ ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
37979
+ createVNode(_sfc_main$j, {
37687
37980
  emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
37688
37981
  currentQueryText: unref(currentQueryText),
37689
37982
  hasSimilarQueries: hasSimilarQueries.value || hasSimilarResults.value,
37690
37983
  zeroResults: (_c = _ctx.options) == null ? void 0 : _c.zeroResults
37691
37984
  }, null, 8, ["emptyResultsLabel", "currentQueryText", "hasSimilarQueries", "zeroResults"])
37692
37985
  ])) : createCommentVNode("", true),
37693
- createVNode(_sfc_main$k, {
37986
+ createVNode(_sfc_main$m, {
37694
37987
  labels: _ctx.options.labels
37695
37988
  }, null, 8, ["labels"]),
37696
- hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
37697
- createVNode(_sfc_main$s, {
37989
+ hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
37990
+ createVNode(_sfc_main$u, {
37698
37991
  labels: similarQueriesLabels.value,
37699
37992
  columnSize: columnSize.value,
37700
37993
  productCardOptions: productCardOptions.value
37701
37994
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
37702
37995
  ])) : createCommentVNode("", true),
37703
37996
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
37704
- createVNode(_sfc_main$o, {
37997
+ createVNode(_sfc_main$q, {
37705
37998
  labels: similarResultsLabels.value,
37706
37999
  columnSize: columnSize.value,
37707
38000
  productCardOptions: productCardOptions.value
@@ -37712,17 +38005,17 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37712
38005
  };
37713
38006
  }
37714
38007
  });
37715
- const _hoisted_1$d = { class: "lupa-top-mobile-filter-wrapper" };
37716
- const _hoisted_2$9 = {
38008
+ const _hoisted_1$f = { class: "lupa-top-mobile-filter-wrapper" };
38009
+ const _hoisted_2$b = {
37717
38010
  key: 0,
37718
38011
  class: "lupa-category-back"
37719
38012
  };
37720
- const _hoisted_3$4 = ["href"];
37721
- const _hoisted_4$2 = {
38013
+ const _hoisted_3$6 = ["href"];
38014
+ const _hoisted_4$4 = {
37722
38015
  key: 1,
37723
38016
  class: "lupa-child-category-list"
37724
38017
  };
37725
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
38018
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
37726
38019
  __name: "CategoryTopFilters",
37727
38020
  props: {
37728
38021
  options: {}
@@ -37770,24 +38063,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
37770
38063
  "has-related-category-children": hasRelatedCategoryChildren.value
37771
38064
  }])
37772
38065
  }, [
37773
- createBaseVNode("div", _hoisted_1$d, [
37774
- hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
38066
+ createBaseVNode("div", _hoisted_1$f, [
38067
+ hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
37775
38068
  createBaseVNode("a", {
37776
38069
  "data-cy": "lupa-category-back",
37777
38070
  href: backUrlLink.value,
37778
38071
  onClick: handleNavigationBack
37779
- }, toDisplayString(backTitle.value), 9, _hoisted_3$4)
38072
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$6)
37780
38073
  ])) : createCommentVNode("", true),
37781
- hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
38074
+ hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
37782
38075
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
37783
- return openBlock(), createBlock(_sfc_main$Z, {
38076
+ return openBlock(), createBlock(_sfc_main$13, {
37784
38077
  key: getCategoryKey(child),
37785
38078
  item: child,
37786
38079
  options: categoryOptions.value
37787
38080
  }, null, 8, ["item", "options"]);
37788
38081
  }), 128))
37789
38082
  ])) : createCommentVNode("", true),
37790
- createVNode(_sfc_main$F, {
38083
+ createVNode(_sfc_main$H, {
37791
38084
  class: "lupa-toolbar-mobile",
37792
38085
  "pagination-location": "top",
37793
38086
  options: _ctx.options
@@ -37797,6 +38090,129 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
37797
38090
  };
37798
38091
  }
37799
38092
  });
38093
+ const _hoisted_1$e = {
38094
+ id: "lupa-search-results-sort-list",
38095
+ class: "lupa-search-results-sort-list"
38096
+ };
38097
+ const _hoisted_2$a = ["onClick"];
38098
+ const _hoisted_3$5 = ["for"];
38099
+ const _hoisted_4$3 = ["id", "checked"];
38100
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
38101
+ __name: "SortList",
38102
+ setup(__props) {
38103
+ const { sortItems, selectedKey, handleSelect, setSortValue } = useSorting();
38104
+ onMounted(() => {
38105
+ setSortValue();
38106
+ });
38107
+ const selectValue = (key) => {
38108
+ selectedKey.value = key;
38109
+ handleSelect();
38110
+ };
38111
+ return (_ctx, _cache) => {
38112
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
38113
+ createBaseVNode("ul", null, [
38114
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
38115
+ return openBlock(), createElementBlock("li", {
38116
+ key: option.key,
38117
+ class: normalizeClass({ "lupa-sort-item-selected": option.key === unref(selectedKey) }),
38118
+ onClick: ($event) => selectValue(option.key)
38119
+ }, [
38120
+ createBaseVNode("label", {
38121
+ for: "lupa-sort-list-" + option.key
38122
+ }, toDisplayString(option.label), 9, _hoisted_3$5),
38123
+ createBaseVNode("input", {
38124
+ id: "lupa-sort-list-" + option.key,
38125
+ type: "radio",
38126
+ checked: option.key === unref(selectedKey)
38127
+ }, null, 8, _hoisted_4$3)
38128
+ ], 10, _hoisted_2$a);
38129
+ }), 128))
38130
+ ])
38131
+ ]);
38132
+ };
38133
+ }
38134
+ });
38135
+ const _hoisted_1$d = { class: "lupa-sort-sidebar-content" };
38136
+ const _hoisted_2$9 = { class: "lupa-sidebar-top" };
38137
+ const _hoisted_3$4 = { class: "lupa-sidebar-title" };
38138
+ const _hoisted_4$2 = { class: "lupa-sidebar-sort-options" };
38139
+ const _hoisted_5 = { class: "lupa-sidebar-sort-actions" };
38140
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
38141
+ __name: "SortDrawer",
38142
+ setup(__props) {
38143
+ const optionsStore = useOptionsStore();
38144
+ const searchResultStore = useSearchResultStore();
38145
+ const paramStore = useParamsStore();
38146
+ const { searchResultOptions } = storeToRefs(optionsStore);
38147
+ const { isSidebarClosing, isSortingSidebarVisible } = storeToRefs(searchResultStore);
38148
+ const { handleSortSidebarToggle } = useSidebarToggle();
38149
+ const sortStyleOptions = computed(() => {
38150
+ var _a25;
38151
+ return (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle;
38152
+ });
38153
+ const sidebarTitle = computed(() => {
38154
+ var _a25, _b25, _c, _d;
38155
+ 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 : "";
38156
+ });
38157
+ const clearSortLabel = computed(() => {
38158
+ var _a25, _b25, _c, _d;
38159
+ 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 : "";
38160
+ });
38161
+ const applySortLabel = computed(() => {
38162
+ var _a25, _b25, _c, _d;
38163
+ 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 : "";
38164
+ });
38165
+ const handleDrawerToggle = () => {
38166
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
38167
+ };
38168
+ const clearSort = () => {
38169
+ paramStore.removeParameters({
38170
+ paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS$1.SORT)]
38171
+ });
38172
+ handleSortSidebarToggle();
38173
+ };
38174
+ const applySort = () => {
38175
+ handleSortSidebarToggle();
38176
+ };
38177
+ return (_ctx, _cache) => {
38178
+ return unref(isSortingSidebarVisible) ? (openBlock(), createElementBlock("div", {
38179
+ key: 0,
38180
+ class: normalizeClass(["lupa-sort-sidebar", { "lupa-sort-is-closing": unref(isSidebarClosing) }])
38181
+ }, [
38182
+ createBaseVNode("div", {
38183
+ class: "lupa-sidebar-close",
38184
+ onClick: withModifiers(handleDrawerToggle, ["stop"])
38185
+ }),
38186
+ createBaseVNode("div", _hoisted_1$d, [
38187
+ createBaseVNode("div", _hoisted_2$9, [
38188
+ createBaseVNode("div", _hoisted_3$4, toDisplayString(sidebarTitle.value), 1),
38189
+ createBaseVNode("div", {
38190
+ class: "lupa-filter-toggle-mobile",
38191
+ onClick: handleDrawerToggle
38192
+ })
38193
+ ]),
38194
+ createBaseVNode("div", _hoisted_4$2, [
38195
+ createVNode(_sfc_main$g)
38196
+ ]),
38197
+ createBaseVNode("div", _hoisted_5, [
38198
+ clearSortLabel.value ? (openBlock(), createElementBlock("button", {
38199
+ key: 0,
38200
+ type: "button",
38201
+ class: "lupa-sidebar-sort-clear",
38202
+ onClick: withModifiers(clearSort, ["stop"])
38203
+ }, toDisplayString(clearSortLabel.value), 1)) : createCommentVNode("", true),
38204
+ applySortLabel.value ? (openBlock(), createElementBlock("button", {
38205
+ key: 1,
38206
+ type: "button",
38207
+ class: "lupa-sidebar-sort-apply",
38208
+ onClick: withModifiers(applySort, ["stop"])
38209
+ }, toDisplayString(applySortLabel.value), 1)) : createCommentVNode("", true)
38210
+ ])
38211
+ ])
38212
+ ], 2)) : createCommentVNode("", true);
38213
+ };
38214
+ }
38215
+ });
37800
38216
  const _hoisted_1$c = {
37801
38217
  key: 0,
37802
38218
  class: "lupa-container-title-summary-mobile"
@@ -37831,7 +38247,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
37831
38247
  currentQueryText,
37832
38248
  hasResults,
37833
38249
  currentFilterCount,
37834
- isMobileSidebarVisible,
38250
+ isFilterSidebarVisible,
37835
38251
  layout,
37836
38252
  loadingFacets,
37837
38253
  loadingRefiners
@@ -37853,7 +38269,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
37853
38269
  });
37854
38270
  const indicatorClasses = computed(() => {
37855
38271
  return {
37856
- "lupa-mobile-sidebar-visible": isMobileSidebarVisible.value,
38272
+ "lupa-mobile-sidebar-visible": isFilterSidebarVisible.value,
37857
38273
  "lupa-layout-grid": !layout.value || layout.value === ResultsLayoutEnum.GRID,
37858
38274
  "lupa-layout-list": layout.value === ResultsLayoutEnum.LIST
37859
38275
  };
@@ -38095,32 +38511,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
38095
38511
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
38096
38512
  }, [
38097
38513
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
38098
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38099
- createVNode(_sfc_main$10, {
38514
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38515
+ createVNode(_sfc_main$16, {
38100
38516
  "show-summary": true,
38101
38517
  options: _ctx.options,
38102
38518
  "is-product-list": (_a25 = _ctx.isProductList) != null ? _a25 : false
38103
38519
  }, null, 8, ["options", "is-product-list"])
38104
38520
  ])) : createCommentVNode("", true),
38105
- isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$f, {
38521
+ isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$h, {
38106
38522
  key: 1,
38107
38523
  options: _ctx.options
38108
38524
  }, null, 8, ["options"])) : createCommentVNode("", true),
38109
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$O, {
38525
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$R, {
38110
38526
  key: 2,
38111
38527
  options: _ctx.options.filters,
38112
38528
  onFilter: handleParamsChange
38113
38529
  }, null, 8, ["options"])) : createCommentVNode("", true),
38114
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$N, {
38115
- key: 3,
38530
+ _ctx.options.sort ? (openBlock(), createBlock(_sfc_main$f, { key: 3 })) : createCommentVNode("", true),
38531
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$Q, {
38532
+ key: 4,
38116
38533
  breadcrumbs: _ctx.options.breadcrumbs
38117
38534
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
38118
38535
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", {
38119
- key: 4,
38536
+ key: 5,
38120
38537
  id: "lupa-search-results",
38121
38538
  class: normalizeClass(["top-layout-wrapper", indicatorClasses.value])
38122
38539
  }, [
38123
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
38540
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
38124
38541
  key: 0,
38125
38542
  options: (_b25 = _ctx.options.filters) != null ? _b25 : {},
38126
38543
  ref_key: "searchResultsFilters",
@@ -38128,12 +38545,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
38128
38545
  onFilter: handleParamsChange
38129
38546
  }, null, 8, ["options"])) : createCommentVNode("", true),
38130
38547
  createBaseVNode("div", _hoisted_2$8, [
38131
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38132
- createVNode(_sfc_main$10, {
38548
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38549
+ createVNode(_sfc_main$16, {
38133
38550
  options: _ctx.options,
38134
38551
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
38135
38552
  }, null, 8, ["options", "is-product-list"]),
38136
- createVNode(_sfc_main$g, {
38553
+ createVNode(_sfc_main$i, {
38137
38554
  options: _ctx.options,
38138
38555
  ssr: ssrEnabled.value,
38139
38556
  onFilter: handleParamsChange
@@ -38144,9 +38561,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
38144
38561
  _: 3
38145
38562
  }, 8, ["options", "ssr"])
38146
38563
  ])
38147
- ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
38148
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38149
- createVNode(_sfc_main$10, {
38564
+ ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [
38565
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38566
+ createVNode(_sfc_main$16, {
38150
38567
  options: _ctx.options,
38151
38568
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
38152
38569
  }, null, 8, ["options", "is-product-list"]),
@@ -38154,14 +38571,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
38154
38571
  id: "lupa-search-results",
38155
38572
  class: normalizeClass(indicatorClasses.value)
38156
38573
  }, [
38157
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
38574
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
38158
38575
  key: 0,
38159
38576
  options: (_e = _ctx.options.filters) != null ? _e : {},
38160
38577
  ref_key: "searchResultsFilters",
38161
38578
  ref: searchResultsFilters,
38162
38579
  onFilter: handleParamsChange
38163
38580
  }, null, 8, ["options"])) : createCommentVNode("", true),
38164
- createVNode(_sfc_main$g, {
38581
+ createVNode(_sfc_main$i, {
38165
38582
  options: _ctx.options,
38166
38583
  ssr: ssrEnabled.value,
38167
38584
  onFilter: handleParamsChange
@@ -38305,7 +38722,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
38305
38722
  onClick: withModifiers(innerClick, ["stop"])
38306
38723
  }, [
38307
38724
  createBaseVNode("div", _hoisted_1$a, [
38308
- createVNode(_sfc_main$13, {
38725
+ createVNode(_sfc_main$19, {
38309
38726
  options: fullSearchBoxOptions.value,
38310
38727
  "is-search-container": true,
38311
38728
  ref_key: "searchBox",
@@ -39893,7 +40310,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39893
40310
  key: getProductKeyAction(index, product)
39894
40311
  }, {
39895
40312
  default: withCtx(() => [
39896
- createVNode(_sfc_main$t, {
40313
+ createVNode(_sfc_main$v, {
39897
40314
  product,
39898
40315
  options: _ctx.options,
39899
40316
  "click-tracking-settings": clickTrackingSettings.value,
@@ -39908,7 +40325,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39908
40325
  _: 1
39909
40326
  }, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
39910
40327
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
39911
- return openBlock(), createBlock(_sfc_main$t, {
40328
+ return openBlock(), createBlock(_sfc_main$v, {
39912
40329
  style: normalizeStyle(columnSize.value),
39913
40330
  key: getProductKeyAction(index, product),
39914
40331
  product,
@@ -40154,7 +40571,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
40154
40571
  createBaseVNode("a", {
40155
40572
  href: getLink(product)
40156
40573
  }, [
40157
- createVNode(_sfc_main$E, {
40574
+ createVNode(_sfc_main$G, {
40158
40575
  item: product,
40159
40576
  options: image.value
40160
40577
  }, null, 8, ["item", "options"])
@@ -40319,7 +40736,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
40319
40736
  return (_ctx, _cache) => {
40320
40737
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
40321
40738
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
40322
- return openBlock(), createBlock(_sfc_main$t, {
40739
+ return openBlock(), createBlock(_sfc_main$v, {
40323
40740
  class: "lupa-chat-product-card",
40324
40741
  key: getProductKeyAction(index, product),
40325
40742
  product,
@@ -40515,7 +40932,7 @@ const _hoisted_4 = {
40515
40932
  key: 0,
40516
40933
  class: "lupasearch-chat-content"
40517
40934
  };
40518
- const _sfc_main$1B = /* @__PURE__ */ defineComponent({
40935
+ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
40519
40936
  __name: "ChatContainer",
40520
40937
  props: {
40521
40938
  options: {}
@@ -46539,7 +46956,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46539
46956
  };
46540
46957
  __expose({ fetch: fetch2 });
46541
46958
  return (_ctx, _cache) => {
46542
- return openBlock(), createBlock(unref(_sfc_main$13), {
46959
+ return openBlock(), createBlock(unref(_sfc_main$19), {
46543
46960
  ref_key: "searchBox",
46544
46961
  ref: searchBox2,
46545
46962
  options: fullSearchBoxOptions.value
@@ -47199,7 +47616,7 @@ const chat = (options, mountOptions) => {
47199
47616
  const instance = createVue(
47200
47617
  options.displayOptions.containerSelector,
47201
47618
  mountOptions == null ? void 0 : mountOptions.mountingBehavior,
47202
- _sfc_main$1B,
47619
+ _sfc_main$1H,
47203
47620
  {
47204
47621
  options
47205
47622
  }
@@ -47473,13 +47890,14 @@ const applyStyles = (configuration) => __async(null, null, function* () {
47473
47890
  document.head.appendChild(styleElement);
47474
47891
  });
47475
47892
  const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47476
- var _a25;
47893
+ var _a25, _b25;
47477
47894
  if (!configuration.searchBox) {
47478
47895
  return;
47479
47896
  }
47480
47897
  const resolvedConfiguration = JSON.parse(configuration.searchBox);
47481
47898
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47482
47899
  const domPing = resolvedConfiguration.domPing;
47900
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47483
47901
  const visible = yield waitForElementToBeVisible(
47484
47902
  resolvedConfiguration.inputSelector,
47485
47903
  0,
@@ -47493,18 +47911,19 @@ const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true,
47493
47911
  }
47494
47912
  const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
47495
47913
  resolvedConfiguration,
47496
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a25 : {}
47914
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _b25 : {}
47497
47915
  );
47498
- searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
47916
+ searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior });
47499
47917
  });
47500
47918
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47501
- var _a25;
47919
+ var _a25, _b25;
47502
47920
  if (!configuration.searchResults) {
47503
47921
  return;
47504
47922
  }
47505
47923
  const resolvedConfiguration = JSON.parse(configuration.searchResults);
47506
47924
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47507
47925
  const domPing = resolvedConfiguration.domPing;
47926
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47508
47927
  const visible = yield waitForElementToBeVisible(
47509
47928
  resolvedConfiguration.containerSelector,
47510
47929
  0,
@@ -47518,12 +47937,15 @@ const mountSearchResults = (configuration, options, optionOverrides, fetch2 = tr
47518
47937
  }
47519
47938
  const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
47520
47939
  resolvedConfiguration,
47521
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a25 : {}
47940
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _b25 : {}
47941
+ );
47942
+ searchResults(
47943
+ __spreadProps(__spreadValues({}, mergedOptions), { options }),
47944
+ { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior }
47522
47945
  );
47523
- searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
47524
47946
  });
47525
47947
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47526
- var _a25;
47948
+ var _a25, _b25;
47527
47949
  if (!configuration.productList) {
47528
47950
  return;
47529
47951
  }
@@ -47532,6 +47954,7 @@ const mountProductList = (configuration, options, optionOverrides, fetch2 = true
47532
47954
  );
47533
47955
  const resolvedConfiguration = JSON.parse(configuration.productList);
47534
47956
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47957
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47535
47958
  const visible = yield waitForElementToBeVisible(
47536
47959
  resolvedConfiguration.containerSelector,
47537
47960
  0,
@@ -47545,13 +47968,14 @@ const mountProductList = (configuration, options, optionOverrides, fetch2 = true
47545
47968
  }
47546
47969
  const mergedOptions = merge(
47547
47970
  __spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
47548
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _a25 : {}
47971
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _b25 : {}
47549
47972
  );
47550
- productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
47973
+ productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
47551
47974
  });
47552
47975
  const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfiguration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47553
- var _a25;
47976
+ var _a25, _b25;
47554
47977
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47978
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47555
47979
  const visible = yield waitForElementToBeVisible(
47556
47980
  resolvedConfiguration.containerSelector,
47557
47981
  0,
@@ -47565,9 +47989,9 @@ const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfig
47565
47989
  }
47566
47990
  const mergedOptions = merge(
47567
47991
  __spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
47568
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _a25 : {}
47992
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _b25 : {}
47569
47993
  );
47570
- recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
47994
+ recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
47571
47995
  });
47572
47996
  const mountAllRecommendations = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47573
47997
  if (!configuration.recommendations) {