@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.
@@ -18061,8 +18061,18 @@ var __async = (__this, __arguments, generator) => {
18061
18061
  );
18062
18062
  const trackingOptions = ref({});
18063
18063
  const searchResultInitialFilters = ref({});
18064
+ const expandedFacetsInner = ref([]);
18064
18065
  const productRecommendationOptions = ref({});
18065
18066
  const screenStore = useScreenStore();
18067
+ const expandedFacets = computed({
18068
+ get: () => {
18069
+ var _a25, _b25, _c, _d, _e;
18070
+ 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 : [];
18071
+ },
18072
+ set: (value) => {
18073
+ expandedFacetsInner.value = value;
18074
+ }
18075
+ });
18066
18076
  const envOptions = computed(
18067
18077
  () => {
18068
18078
  var _a25;
@@ -18162,6 +18172,7 @@ var __async = (__this, __arguments, generator) => {
18162
18172
  currentResolutionPageSizes,
18163
18173
  productRecommendationOptions,
18164
18174
  ariaLabels,
18175
+ expandedFacets,
18165
18176
  setSearchBoxOptions,
18166
18177
  setTrackingOptions,
18167
18178
  setSearchResultOptions,
@@ -18517,12 +18528,15 @@ var __async = (__this, __arguments, generator) => {
18517
18528
  const FACET_PARAMS_TYPE = {
18518
18529
  TERMS: "f.",
18519
18530
  RANGE: "fr.",
18531
+ PARTIAL_RANGE: "fpr.",
18520
18532
  HIERARCHY: "fh."
18521
18533
  };
18522
18534
  const FACET_FILTER_MAP = {
18523
18535
  terms: FACET_PARAMS_TYPE.TERMS,
18524
18536
  range: FACET_PARAMS_TYPE.RANGE,
18525
- hierarchy: FACET_PARAMS_TYPE.HIERARCHY
18537
+ stats: FACET_PARAMS_TYPE.RANGE,
18538
+ hierarchy: FACET_PARAMS_TYPE.HIERARCHY,
18539
+ partialRange: FACET_PARAMS_TYPE.PARTIAL_RANGE
18526
18540
  };
18527
18541
  const FACET_KEY_SEPARATOR = ".";
18528
18542
  const FACET_RANGE_SEPARATOR = ":";
@@ -18676,7 +18690,7 @@ var __async = (__this, __arguments, generator) => {
18676
18690
  });
18677
18691
  });
18678
18692
  };
18679
- const isFacetKey = (key) => key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.TERMS) || key.startsWith(FACET_PARAMS_TYPE.HIERARCHY);
18693
+ 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);
18680
18694
  const getMostSpecificHierarchyTerms = (terms) => {
18681
18695
  const specificTerms = [];
18682
18696
  for (const term of terms) {
@@ -18764,8 +18778,7 @@ var __async = (__this, __arguments, generator) => {
18764
18778
  if (key.startsWith(FACET_PARAMS_TYPE.TERMS)) {
18765
18779
  return (_b25 = (_a25 = searchParams.getAll(key)) == null ? void 0 : _a25.map((v) => decodeURIComponent(v))) != null ? _b25 : [];
18766
18780
  }
18767
- if (key.startsWith(FACET_PARAMS_TYPE.RANGE)) {
18768
- const isPrice = key == null ? void 0 : key.includes(CURRENCY_KEY_INDICATOR);
18781
+ if (key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE)) {
18769
18782
  const range2 = searchParams.get(key);
18770
18783
  if (!range2) {
18771
18784
  return {};
@@ -18773,7 +18786,7 @@ var __async = (__this, __arguments, generator) => {
18773
18786
  const [min, max] = range2.split(FACET_RANGE_SEPARATOR);
18774
18787
  return {
18775
18788
  gte: min || void 0,
18776
- [isPrice ? "lte" : "lt"]: max || void 0
18789
+ [key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE) ? "lt" : "lte"]: max || void 0
18777
18790
  };
18778
18791
  }
18779
18792
  if (key.startsWith(FACET_PARAMS_TYPE.HIERARCHY)) {
@@ -18975,6 +18988,7 @@ var __async = (__this, __arguments, generator) => {
18975
18988
  };
18976
18989
  const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQueryParamName, currentFilters) => {
18977
18990
  var _a25, _b25;
18991
+ const baseFacetQueryParamName = facetAction.type === "partialRange" ? FACET_PARAMS_TYPE.PARTIAL_RANGE : FACET_PARAMS_TYPE.RANGE;
18978
18992
  const currentFilter = rangeFilterToString(
18979
18993
  currentFilters == null ? void 0 : currentFilters[facetAction.key],
18980
18994
  FACET_RANGE_SEPARATOR
@@ -18985,14 +18999,14 @@ var __async = (__this, __arguments, generator) => {
18985
18999
  if (!facetValue) {
18986
19000
  removeParameters({
18987
19001
  paramsToRemove: [
18988
- getFacetParam(facetAction.key, "", FACET_PARAMS_TYPE.RANGE).name,
19002
+ getFacetParam(facetAction.key, "", baseFacetQueryParamName).name,
18989
19003
  ...paramsToRemove
18990
19004
  ]
18991
19005
  });
18992
19006
  return;
18993
19007
  }
18994
19008
  appendParams({
18995
- params: [getFacetParam(facetAction.key, facetValue, FACET_PARAMS_TYPE.RANGE)],
19009
+ params: [getFacetParam(facetAction.key, facetValue, baseFacetQueryParamName)],
18996
19010
  paramsToRemove,
18997
19011
  encode: false
18998
19012
  });
@@ -19580,7 +19594,7 @@ var __async = (__this, __arguments, generator) => {
19580
19594
  }
19581
19595
  return Env[environment] || Env["production"];
19582
19596
  };
19583
- const _sfc_main$1A = /* @__PURE__ */ defineComponent({
19597
+ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
19584
19598
  __name: "VoiceSearchProgressCircle",
19585
19599
  props: {
19586
19600
  isRecording: { type: Boolean },
@@ -19793,15 +19807,15 @@ var __async = (__this, __arguments, generator) => {
19793
19807
  closeSocket
19794
19808
  };
19795
19809
  }
19796
- const _hoisted_1$1l = {
19810
+ const _hoisted_1$1o = {
19797
19811
  key: 0,
19798
19812
  class: "lupa-dialog-overlay"
19799
19813
  };
19800
- const _hoisted_2$W = { class: "lupa-dialog-content" };
19801
- const _hoisted_3$E = { class: "lupa-listening-text" };
19802
- const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
19803
- const _hoisted_5$l = ["aria-label"];
19804
- const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19814
+ const _hoisted_2$Y = { class: "lupa-dialog-content" };
19815
+ const _hoisted_3$G = { class: "lupa-listening-text" };
19816
+ const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
19817
+ const _hoisted_5$m = ["aria-label"];
19818
+ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
19805
19819
  __name: "VoiceSearchDialog",
19806
19820
  props: {
19807
19821
  isOpen: { type: Boolean },
@@ -19906,21 +19920,21 @@ var __async = (__this, __arguments, generator) => {
19906
19920
  return (_ctx, _cache) => {
19907
19921
  var _a25, _b25;
19908
19922
  return openBlock(), createElementBlock("div", null, [
19909
- props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
19923
+ props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1o, [
19910
19924
  createBaseVNode("button", {
19911
19925
  class: "lupa-dialog-box-close-button",
19912
19926
  onClick: _cache[0] || (_cache[0] = () => emit2("close"))
19913
19927
  }),
19914
- createBaseVNode("div", _hoisted_2$W, [
19915
- createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
19916
- createBaseVNode("div", _hoisted_4$u, [
19928
+ createBaseVNode("div", _hoisted_2$Y, [
19929
+ createBaseVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
19930
+ createBaseVNode("div", _hoisted_4$w, [
19917
19931
  createBaseVNode("button", {
19918
19932
  class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
19919
19933
  onClick: handleRecordingButtonClick,
19920
19934
  "aria-controls": "voice-search-microphone",
19921
19935
  "aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
19922
- }, null, 10, _hoisted_5$l),
19923
- createVNode(_sfc_main$1A, {
19936
+ }, null, 10, _hoisted_5$m),
19937
+ createVNode(_sfc_main$1G, {
19924
19938
  ref_key: "voiceSearchProgressBar",
19925
19939
  ref: voiceSearchProgressBar,
19926
19940
  class: "lupa-progress-circle",
@@ -19935,18 +19949,18 @@ var __async = (__this, __arguments, generator) => {
19935
19949
  };
19936
19950
  }
19937
19951
  });
19938
- const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
19939
- const _hoisted_2$V = { class: "lupa-input-clear" };
19940
- const _hoisted_3$D = { id: "lupa-search-box-input" };
19941
- const _hoisted_4$t = ["value"];
19942
- const _hoisted_5$k = ["aria-label", "placeholder"];
19943
- const _hoisted_6$8 = {
19952
+ const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
19953
+ const _hoisted_2$X = { class: "lupa-input-clear" };
19954
+ const _hoisted_3$F = { id: "lupa-search-box-input" };
19955
+ const _hoisted_4$v = ["value"];
19956
+ const _hoisted_5$l = ["aria-label", "placeholder"];
19957
+ const _hoisted_6$7 = {
19944
19958
  key: 0,
19945
19959
  class: "lupa-close-label"
19946
19960
  };
19947
19961
  const _hoisted_7$5 = { key: 1 };
19948
19962
  const _hoisted_8$3 = ["aria-label"];
19949
- const _sfc_main$1y = /* @__PURE__ */ defineComponent({
19963
+ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
19950
19964
  __name: "SearchBoxInput",
19951
19965
  props: {
19952
19966
  options: {},
@@ -20078,20 +20092,20 @@ var __async = (__this, __arguments, generator) => {
20078
20092
  };
20079
20093
  __expose({ focus });
20080
20094
  return (_ctx, _cache) => {
20081
- return openBlock(), createElementBlock("div", _hoisted_1$1k, [
20082
- createBaseVNode("div", _hoisted_2$V, [
20095
+ return openBlock(), createElementBlock("div", _hoisted_1$1n, [
20096
+ createBaseVNode("div", _hoisted_2$X, [
20083
20097
  createBaseVNode("div", {
20084
20098
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
20085
20099
  onClick: clear
20086
20100
  }, null, 2)
20087
20101
  ]),
20088
- createBaseVNode("div", _hoisted_3$D, [
20102
+ createBaseVNode("div", _hoisted_3$F, [
20089
20103
  createBaseVNode("input", {
20090
20104
  class: "lupa-hint",
20091
20105
  "aria-hidden": "true",
20092
20106
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
20093
20107
  disabled: ""
20094
- }, null, 8, _hoisted_4$t),
20108
+ }, null, 8, _hoisted_4$v),
20095
20109
  withDirectives(createBaseVNode("input", mergeProps({
20096
20110
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
20097
20111
  }, inputAttributes.value, {
@@ -20105,7 +20119,7 @@ var __async = (__this, __arguments, generator) => {
20105
20119
  placeholder: labels.value.placeholder,
20106
20120
  onInput: handleInput,
20107
20121
  onFocus: handleFocus
20108
- }), null, 16, _hoisted_5$k), [
20122
+ }), null, 16, _hoisted_5$l), [
20109
20123
  [vModelText, inputValue.value]
20110
20124
  ]),
20111
20125
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -20120,7 +20134,7 @@ var __async = (__this, __arguments, generator) => {
20120
20134
  class: "lupa-close-search-container",
20121
20135
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
20122
20136
  }, [
20123
- labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
20137
+ labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
20124
20138
  ])) : createCommentVNode("", true),
20125
20139
  isVoiceSearchEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
20126
20140
  createBaseVNode("button", {
@@ -20131,7 +20145,7 @@ var __async = (__this, __arguments, generator) => {
20131
20145
  "aria-label": voiceSearchAriaLabel.value
20132
20146
  }, null, 8, _hoisted_8$3)
20133
20147
  ])) : createCommentVNode("", true),
20134
- isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1z, {
20148
+ isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1F, {
20135
20149
  key: 2,
20136
20150
  ref_key: "voiceDialogOverlay",
20137
20151
  ref: voiceDialogOverlay,
@@ -20145,7 +20159,7 @@ var __async = (__this, __arguments, generator) => {
20145
20159
  };
20146
20160
  }
20147
20161
  });
20148
- const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20162
+ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
20149
20163
  __name: "SearchBoxMoreResults",
20150
20164
  props: {
20151
20165
  labels: {},
@@ -20183,9 +20197,9 @@ var __async = (__this, __arguments, generator) => {
20183
20197
  };
20184
20198
  }
20185
20199
  });
20186
- const _hoisted_1$1j = { class: "lupa-search-box-history-item" };
20187
- const _hoisted_2$U = { class: "lupa-search-box-history-item-content" };
20188
- const _sfc_main$1w = /* @__PURE__ */ defineComponent({
20200
+ const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
20201
+ const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
20202
+ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
20189
20203
  __name: "SearchBoxHistoryItem",
20190
20204
  props: {
20191
20205
  item: {},
@@ -20202,8 +20216,8 @@ var __async = (__this, __arguments, generator) => {
20202
20216
  emit2("click", { query: props.item });
20203
20217
  };
20204
20218
  return (_ctx, _cache) => {
20205
- return openBlock(), createElementBlock("div", _hoisted_1$1j, [
20206
- createBaseVNode("div", _hoisted_2$U, [
20219
+ return openBlock(), createElementBlock("div", _hoisted_1$1m, [
20220
+ createBaseVNode("div", _hoisted_2$W, [
20207
20221
  createBaseVNode("div", {
20208
20222
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
20209
20223
  onClick: click2
@@ -20217,11 +20231,11 @@ var __async = (__this, __arguments, generator) => {
20217
20231
  };
20218
20232
  }
20219
20233
  });
20220
- const _hoisted_1$1i = {
20234
+ const _hoisted_1$1l = {
20221
20235
  key: 0,
20222
20236
  class: "lupa-search-box-history-panel"
20223
20237
  };
20224
- const _sfc_main$1v = /* @__PURE__ */ defineComponent({
20238
+ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
20225
20239
  __name: "SearchBoxHistoryPanel",
20226
20240
  props: {
20227
20241
  options: {}
@@ -20272,9 +20286,9 @@ var __async = (__this, __arguments, generator) => {
20272
20286
  }
20273
20287
  };
20274
20288
  return (_ctx, _cache) => {
20275
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1i, [
20289
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
20276
20290
  (openBlock(true), createElementBlock(Fragment, null, renderList(limitedHistory.value, (item, index) => {
20277
- return openBlock(), createBlock(_sfc_main$1w, {
20291
+ return openBlock(), createBlock(_sfc_main$1C, {
20278
20292
  key: item,
20279
20293
  item,
20280
20294
  highlighted: index === highlightIndex.value,
@@ -20290,15 +20304,15 @@ var __async = (__this, __arguments, generator) => {
20290
20304
  };
20291
20305
  }
20292
20306
  });
20293
- const _hoisted_1$1h = { class: "lupa-search-box-no-results" };
20294
- const _sfc_main$1u = /* @__PURE__ */ defineComponent({
20307
+ const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
20308
+ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
20295
20309
  __name: "SearchBoxNoResults",
20296
20310
  props: {
20297
20311
  labels: {}
20298
20312
  },
20299
20313
  setup(__props) {
20300
20314
  return (_ctx, _cache) => {
20301
- return openBlock(), createElementBlock("p", _hoisted_1$1h, toDisplayString(_ctx.labels.noResults), 1);
20315
+ return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
20302
20316
  };
20303
20317
  }
20304
20318
  });
@@ -20330,26 +20344,26 @@ var __async = (__this, __arguments, generator) => {
20330
20344
  }
20331
20345
  return gridTemplate.join(" ");
20332
20346
  };
20333
- const _hoisted_1$1g = ["innerHTML"];
20334
- const _hoisted_2$T = {
20347
+ const _hoisted_1$1j = ["innerHTML"];
20348
+ const _hoisted_2$V = {
20335
20349
  key: 1,
20336
20350
  "data-cy": "lupa-suggestion-value",
20337
20351
  class: "lupa-suggestion-value"
20338
20352
  };
20339
- const _hoisted_3$C = {
20353
+ const _hoisted_3$E = {
20340
20354
  key: 2,
20341
20355
  class: "lupa-suggestion-facet",
20342
20356
  "data-cy": "lupa-suggestion-facet"
20343
20357
  };
20344
- const _hoisted_4$s = {
20358
+ const _hoisted_4$u = {
20345
20359
  class: "lupa-suggestion-facet-label",
20346
20360
  "data-cy": "lupa-suggestion-facet-label"
20347
20361
  };
20348
- const _hoisted_5$j = {
20362
+ const _hoisted_5$k = {
20349
20363
  class: "lupa-suggestion-facet-value",
20350
20364
  "data-cy": "lupa-suggestion-facet-value"
20351
20365
  };
20352
- const _sfc_main$1t = /* @__PURE__ */ defineComponent({
20366
+ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
20353
20367
  __name: "SearchBoxSuggestion",
20354
20368
  props: {
20355
20369
  suggestion: {},
@@ -20386,20 +20400,20 @@ var __async = (__this, __arguments, generator) => {
20386
20400
  class: "lupa-suggestion-value",
20387
20401
  "data-cy": "lupa-suggestion-value",
20388
20402
  innerHTML: _ctx.suggestion.displayHighlight
20389
- }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
20390
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
20391
- createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
20392
- createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
20403
+ }, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
20404
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
20405
+ createBaseVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
20406
+ createBaseVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
20393
20407
  ])) : createCommentVNode("", true)
20394
20408
  ]);
20395
20409
  };
20396
20410
  }
20397
20411
  });
20398
- const _hoisted_1$1f = {
20412
+ const _hoisted_1$1i = {
20399
20413
  id: "lupa-search-box-suggestions",
20400
20414
  "data-cy": "lupa-search-box-suggestions"
20401
20415
  };
20402
- const _sfc_main$1s = /* @__PURE__ */ defineComponent({
20416
+ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20403
20417
  __name: "SearchBoxSuggestions",
20404
20418
  props: {
20405
20419
  items: {},
@@ -20466,9 +20480,9 @@ var __async = (__this, __arguments, generator) => {
20466
20480
  });
20467
20481
  });
20468
20482
  return (_ctx, _cache) => {
20469
- return openBlock(), createElementBlock("div", _hoisted_1$1f, [
20483
+ return openBlock(), createElementBlock("div", _hoisted_1$1i, [
20470
20484
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
20471
- return openBlock(), createBlock(_sfc_main$1t, {
20485
+ return openBlock(), createBlock(_sfc_main$1z, {
20472
20486
  key: getSuggestionKey(item),
20473
20487
  class: normalizeClass([
20474
20488
  "lupa-suggestion",
@@ -20500,7 +20514,7 @@ var __async = (__this, __arguments, generator) => {
20500
20514
  }, timeout);
20501
20515
  };
20502
20516
  };
20503
- const _sfc_main$1r = /* @__PURE__ */ defineComponent({
20517
+ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
20504
20518
  __name: "SearchBoxSuggestionsWrapper",
20505
20519
  props: {
20506
20520
  panel: {},
@@ -20543,7 +20557,7 @@ var __async = (__this, __arguments, generator) => {
20543
20557
  const getSuggestionsDebounced = debounce(getSuggestions, props.debounce);
20544
20558
  watch(() => props.panel.limit, getSuggestionsDebounced);
20545
20559
  return (_ctx, _cache) => {
20546
- return openBlock(), createBlock(_sfc_main$1s, {
20560
+ return openBlock(), createBlock(_sfc_main$1y, {
20547
20561
  items: searchResult.value,
20548
20562
  highlight: _ctx.panel.highlight,
20549
20563
  queryKey: _ctx.panel.queryKey,
@@ -29825,9 +29839,9 @@ and ensure you are accounting for this risk.
29825
29839
  targetImage.src = placeholder;
29826
29840
  }
29827
29841
  };
29828
- const _hoisted_1$1e = ["src"];
29829
- const _hoisted_2$S = ["src"];
29830
- const _sfc_main$1q = /* @__PURE__ */ defineComponent({
29842
+ const _hoisted_1$1h = ["src"];
29843
+ const _hoisted_2$U = ["src"];
29844
+ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
29831
29845
  __name: "ProductImage",
29832
29846
  props: {
29833
29847
  item: {},
@@ -29969,7 +29983,7 @@ and ensure you are accounting for this risk.
29969
29983
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
29970
29984
  onError: replaceWithPlaceholder,
29971
29985
  key: finalUrl.value
29972
- }), null, 16, _hoisted_1$1e))
29986
+ }), null, 16, _hoisted_1$1h))
29973
29987
  ]),
29974
29988
  _: 1
29975
29989
  })) : (openBlock(), createElementBlock("img", mergeProps({
@@ -29977,12 +29991,12 @@ and ensure you are accounting for this risk.
29977
29991
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
29978
29992
  style: styleOverride.value,
29979
29993
  src: finalMainImageUrl.value
29980
- }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$S))
29994
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$U))
29981
29995
  ], 38);
29982
29996
  };
29983
29997
  }
29984
29998
  });
29985
- const _sfc_main$1p = /* @__PURE__ */ defineComponent({
29999
+ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
29986
30000
  __name: "SearchBoxProductImage",
29987
30001
  props: {
29988
30002
  item: {},
@@ -29990,7 +30004,7 @@ and ensure you are accounting for this risk.
29990
30004
  },
29991
30005
  setup(__props) {
29992
30006
  return (_ctx, _cache) => {
29993
- return openBlock(), createBlock(_sfc_main$1q, {
30007
+ return openBlock(), createBlock(_sfc_main$1w, {
29994
30008
  item: _ctx.item,
29995
30009
  options: _ctx.options,
29996
30010
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -29999,12 +30013,12 @@ and ensure you are accounting for this risk.
29999
30013
  };
30000
30014
  }
30001
30015
  });
30002
- const _hoisted_1$1d = ["innerHTML"];
30003
- const _hoisted_2$R = {
30016
+ const _hoisted_1$1g = ["innerHTML"];
30017
+ const _hoisted_2$T = {
30004
30018
  key: 1,
30005
30019
  class: "lupa-search-box-product-title"
30006
30020
  };
30007
- const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30021
+ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
30008
30022
  __name: "SearchBoxProductTitle",
30009
30023
  props: {
30010
30024
  item: {},
@@ -30027,18 +30041,18 @@ and ensure you are accounting for this risk.
30027
30041
  key: 0,
30028
30042
  class: "lupa-search-box-product-title",
30029
30043
  innerHTML: sanitizedTitle.value
30030
- }, null, 8, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", _hoisted_2$R, [
30044
+ }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, [
30031
30045
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
30032
30046
  ]));
30033
30047
  };
30034
30048
  }
30035
30049
  });
30036
- const _hoisted_1$1c = ["innerHTML"];
30037
- const _hoisted_2$Q = {
30050
+ const _hoisted_1$1f = ["innerHTML"];
30051
+ const _hoisted_2$S = {
30038
30052
  key: 1,
30039
30053
  class: "lupa-search-box-product-description"
30040
30054
  };
30041
- const _sfc_main$1n = /* @__PURE__ */ defineComponent({
30055
+ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
30042
30056
  __name: "SearchBoxProductDescription",
30043
30057
  props: {
30044
30058
  item: {},
@@ -30061,12 +30075,12 @@ and ensure you are accounting for this risk.
30061
30075
  key: 0,
30062
30076
  class: "lupa-search-box-product-description",
30063
30077
  innerHTML: sanitizedDescription.value
30064
- }, null, 8, _hoisted_1$1c)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(description.value), 1));
30078
+ }, null, 8, _hoisted_1$1f)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(description.value), 1));
30065
30079
  };
30066
30080
  }
30067
30081
  });
30068
- const _hoisted_1$1b = { class: "lupa-search-box-product-price" };
30069
- const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30082
+ const _hoisted_1$1e = { class: "lupa-search-box-product-price" };
30083
+ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
30070
30084
  __name: "SearchBoxProductPrice",
30071
30085
  props: {
30072
30086
  item: {},
@@ -30088,13 +30102,13 @@ and ensure you are accounting for this risk.
30088
30102
  );
30089
30103
  });
30090
30104
  return (_ctx, _cache) => {
30091
- return openBlock(), createElementBlock("div", _hoisted_1$1b, [
30105
+ return openBlock(), createElementBlock("div", _hoisted_1$1e, [
30092
30106
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
30093
30107
  ]);
30094
30108
  };
30095
30109
  }
30096
30110
  });
30097
- const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30111
+ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
30098
30112
  __name: "SearchBoxProductRegularPrice",
30099
30113
  props: {
30100
30114
  item: {},
@@ -30125,12 +30139,12 @@ and ensure you are accounting for this risk.
30125
30139
  };
30126
30140
  }
30127
30141
  });
30128
- const _hoisted_1$1a = ["innerHTML"];
30129
- const _hoisted_2$P = { key: 0 };
30130
- const _hoisted_3$B = { key: 1 };
30131
- const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
30132
- const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
30133
- const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30142
+ const _hoisted_1$1d = ["innerHTML"];
30143
+ const _hoisted_2$R = { key: 0 };
30144
+ const _hoisted_3$D = { key: 1 };
30145
+ const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
30146
+ const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
30147
+ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
30134
30148
  __name: "SearchBoxProductCustom",
30135
30149
  props: {
30136
30150
  item: {},
@@ -30156,20 +30170,20 @@ and ensure you are accounting for this risk.
30156
30170
  key: 0,
30157
30171
  class: [className.value, "lupa-search-box-product-custom"],
30158
30172
  innerHTML: text.value
30159
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", mergeProps({
30173
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", mergeProps({
30160
30174
  key: 1,
30161
30175
  class: [className.value, "lupa-search-box-product-custom"]
30162
30176
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
30163
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
30164
- createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
30165
- createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
30177
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
30178
+ createBaseVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
30179
+ createBaseVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
30166
30180
  ]))
30167
30181
  ], 16));
30168
30182
  };
30169
30183
  }
30170
30184
  });
30171
- const _hoisted_1$19 = ["innerHTML"];
30172
- const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30185
+ const _hoisted_1$1c = ["innerHTML"];
30186
+ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
30173
30187
  __name: "SearchBoxProductCustomHtml",
30174
30188
  props: {
30175
30189
  item: {},
@@ -30194,7 +30208,7 @@ and ensure you are accounting for this risk.
30194
30208
  return openBlock(), createElementBlock("div", mergeProps({
30195
30209
  class: className.value,
30196
30210
  innerHTML: text.value
30197
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$19);
30211
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1c);
30198
30212
  };
30199
30213
  }
30200
30214
  });
@@ -30252,7 +30266,9 @@ and ensure you are accounting for this risk.
30252
30266
  const loadingFacets = ref(false);
30253
30267
  const loadingRefiners = ref(false);
30254
30268
  const loadingRelatedQueries = ref(false);
30255
- const isMobileSidebarVisible = ref(false);
30269
+ const isFilterSidebarVisible = ref(false);
30270
+ const isSidebarClosing = ref(false);
30271
+ const isSortingSidebarVisible = ref(false);
30256
30272
  const relatedCategoryChildren = ref([]);
30257
30273
  const lastRequestId = ref("");
30258
30274
  const searchRequestResults = ref({});
@@ -30334,16 +30350,36 @@ and ensure you are accounting for this risk.
30334
30350
  return hasResults.value && ((_a25 = searchResult.value.offset) != null ? _a25 : 0) >= totalItems.value;
30335
30351
  }
30336
30352
  );
30353
+ const toggleSidebarState = ({
30354
+ visible,
30355
+ sidebar = "filter"
30356
+ }) => {
30357
+ if (sidebar === "sorting") {
30358
+ isSortingSidebarVisible.value = visible;
30359
+ return;
30360
+ }
30361
+ isFilterSidebarVisible.value = visible;
30362
+ };
30337
30363
  const setSidebarState = ({
30338
30364
  visible,
30339
- disableBodyScrolling = true
30365
+ disableBodyScrolling = true,
30366
+ sidebar = "filter"
30340
30367
  }) => {
30368
+ var _a25, _b25, _c, _d;
30341
30369
  if (visible && disableBodyScrolling) {
30342
30370
  disableBodyScroll();
30343
30371
  } else {
30344
30372
  enableBodyScroll();
30345
30373
  }
30346
- isMobileSidebarVisible.value = visible;
30374
+ 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)) {
30375
+ toggleSidebarState({ visible, sidebar });
30376
+ } else {
30377
+ isSidebarClosing.value = true;
30378
+ setTimeout(() => {
30379
+ toggleSidebarState({ visible, sidebar });
30380
+ isSidebarClosing.value = false;
30381
+ }, searchResultOptions.value.filters.facets.style.drawer.sidebarCloseDelay);
30382
+ }
30347
30383
  };
30348
30384
  const queryFacet = (_0) => __async2(null, [_0], function* ({ queryKey, facetKey }) {
30349
30385
  var _a25, _b25, _c, _d;
@@ -30445,13 +30481,28 @@ and ensure you are accounting for this risk.
30445
30481
  const setRelatedCategoryChildren = (children) => {
30446
30482
  relatedCategoryChildren.value = [...children];
30447
30483
  };
30484
+ const preconfiguredRelatedQueryKeys = computed(() => {
30485
+ var _a25, _b25, _c, _d, _e;
30486
+ 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 : [];
30487
+ });
30488
+ const relatedQueryFacetKeys = computed(() => {
30489
+ var _a25, _b25, _c;
30490
+ const keysFromRelatedResults = (_c = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.map((rq) => rq.facetKey)) != null ? _c : [];
30491
+ return Array.from(/* @__PURE__ */ new Set([...preconfiguredRelatedQueryKeys.value, ...keysFromRelatedResults]));
30492
+ });
30448
30493
  const queryRelatedQueries = (queryKey, publicQuery, result2, options) => __async2(null, null, function* () {
30449
- var _a25, _b25;
30494
+ var _a25, _b25, _c;
30450
30495
  loadingRelatedQueries.value = true;
30451
30496
  const context = getLupaTrackingContext();
30452
30497
  const searchText = (_b25 = (_a25 = result2.suggestedSearchText) != null ? _a25 : result2.searchText) != null ? _b25 : "";
30498
+ const publicQueryFiltersWithoutRelatedKeys = __spreadValues2({}, (_c = publicQuery.filters) != null ? _c : {});
30499
+ relatedQueryFacetKeys.value.forEach((facetKey) => {
30500
+ delete publicQueryFiltersWithoutRelatedKeys[facetKey];
30501
+ });
30502
+ const hasRemainingFilters = Object.keys(publicQueryFiltersWithoutRelatedKeys != null ? publicQueryFiltersWithoutRelatedKeys : {}).length > 0;
30453
30503
  const query = __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({}, publicQuery), {
30454
- searchText
30504
+ searchText,
30505
+ filters: hasRemainingFilters ? publicQueryFiltersWithoutRelatedKeys : void 0
30455
30506
  }), context), {
30456
30507
  modifiers: { facets: false, refiners: true }
30457
30508
  });
@@ -30467,7 +30518,9 @@ and ensure you are accounting for this risk.
30467
30518
  });
30468
30519
  });
30469
30520
  return {
30470
- isMobileSidebarVisible,
30521
+ isFilterSidebarVisible,
30522
+ isSortingSidebarVisible,
30523
+ isSidebarClosing,
30471
30524
  searchResult,
30472
30525
  columnCount,
30473
30526
  addToCartAmount,
@@ -30493,6 +30546,7 @@ and ensure you are accounting for this risk.
30493
30546
  relatedQueriesResult,
30494
30547
  relatedQueriesApiEnabled,
30495
30548
  lastResultsSource,
30549
+ relatedQueryFacetKeys,
30496
30550
  setSidebarState,
30497
30551
  queryFacet,
30498
30552
  setLastRequestId,
@@ -30509,12 +30563,12 @@ and ensure you are accounting for this risk.
30509
30563
  setRelatedQueriesApiEnabled
30510
30564
  };
30511
30565
  });
30512
- const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
30513
- const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
30514
- const _hoisted_3$A = ["disabled"];
30515
- const _hoisted_4$q = ["href"];
30516
- const _hoisted_5$h = ["disabled"];
30517
- const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30566
+ const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
30567
+ const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
30568
+ const _hoisted_3$C = ["disabled"];
30569
+ const _hoisted_4$s = ["href"];
30570
+ const _hoisted_5$i = ["disabled"];
30571
+ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30518
30572
  __name: "SearchBoxProductAddToCart",
30519
30573
  props: {
30520
30574
  item: {},
@@ -30560,45 +30614,45 @@ and ensure you are accounting for this risk.
30560
30614
  return Boolean(props.link && props.options.link);
30561
30615
  });
30562
30616
  return (_ctx, _cache) => {
30563
- return openBlock(), createElementBlock("div", _hoisted_1$18, [
30564
- createBaseVNode("div", _hoisted_2$O, [
30617
+ return openBlock(), createElementBlock("div", _hoisted_1$1b, [
30618
+ createBaseVNode("div", _hoisted_2$Q, [
30565
30619
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
30566
30620
  key: 0,
30567
30621
  class: addToCartButtonClass.value,
30568
30622
  "data-cy": "lupa-add-to-cart",
30569
30623
  disabled: !inStockValue.value || loading.value
30570
30624
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
30571
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
30572
- ], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
30625
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
30626
+ ], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
30573
30627
  key: 1,
30574
30628
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
30575
30629
  class: addToCartButtonClass.value,
30576
30630
  "data-cy": "lupa-add-to-cart",
30577
30631
  type: "button",
30578
30632
  disabled: !inStockValue.value || loading.value
30579
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
30633
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
30580
30634
  ])
30581
30635
  ]);
30582
30636
  };
30583
30637
  }
30584
30638
  });
30585
- const _hoisted_1$17 = {
30639
+ const _hoisted_1$1a = {
30586
30640
  key: 1,
30587
30641
  class: "lupa-search-box-element-badge-wrapper"
30588
30642
  };
30589
30643
  const __default__$4 = {
30590
30644
  components: {
30591
- SearchBoxProductImage: _sfc_main$1p,
30592
- SearchBoxProductTitle: _sfc_main$1o,
30593
- SearchBoxProductDescription: _sfc_main$1n,
30594
- SearchBoxProductPrice: _sfc_main$1m,
30595
- SearchBoxProductRegularPrice: _sfc_main$1l,
30596
- SearchBoxProductCustom: _sfc_main$1k,
30597
- SearchBoxProductCustomHtml: _sfc_main$1j,
30598
- SearchBoxProductAddToCart: _sfc_main$1i
30645
+ SearchBoxProductImage: _sfc_main$1v,
30646
+ SearchBoxProductTitle: _sfc_main$1u,
30647
+ SearchBoxProductDescription: _sfc_main$1t,
30648
+ SearchBoxProductPrice: _sfc_main$1s,
30649
+ SearchBoxProductRegularPrice: _sfc_main$1r,
30650
+ SearchBoxProductCustom: _sfc_main$1q,
30651
+ SearchBoxProductCustomHtml: _sfc_main$1p,
30652
+ SearchBoxProductAddToCart: _sfc_main$1o
30599
30653
  }
30600
30654
  };
30601
- const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
30655
+ const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
30602
30656
  __name: "SearchBoxProductElement",
30603
30657
  props: {
30604
30658
  item: {},
@@ -30670,7 +30724,7 @@ and ensure you are accounting for this risk.
30670
30724
  "dynamic-attributes": dynamicAttributes.value,
30671
30725
  link: _ctx.link
30672
30726
  }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
30673
- ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$17, [
30727
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$1a, [
30674
30728
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
30675
30729
  key: 0,
30676
30730
  item: enhancedItem.value,
@@ -30685,14 +30739,14 @@ and ensure you are accounting for this risk.
30685
30739
  };
30686
30740
  }
30687
30741
  }));
30688
- const _hoisted_1$16 = { class: "lupa-badge-title" };
30689
- const _hoisted_2$N = ["src"];
30690
- const _hoisted_3$z = { key: 1 };
30691
- const _hoisted_4$p = {
30742
+ const _hoisted_1$19 = { class: "lupa-badge-title" };
30743
+ const _hoisted_2$P = ["src"];
30744
+ const _hoisted_3$B = { key: 1 };
30745
+ const _hoisted_4$r = {
30692
30746
  key: 0,
30693
30747
  class: "lupa-badge-full-text"
30694
30748
  };
30695
- const _sfc_main$1g = /* @__PURE__ */ defineComponent({
30749
+ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30696
30750
  __name: "SearchResultGeneratedBadge",
30697
30751
  props: {
30698
30752
  options: {},
@@ -30725,20 +30779,20 @@ and ensure you are accounting for this risk.
30725
30779
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
30726
30780
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
30727
30781
  }, [
30728
- createBaseVNode("span", _hoisted_1$16, [
30782
+ createBaseVNode("span", _hoisted_1$19, [
30729
30783
  image.value ? (openBlock(), createElementBlock("img", {
30730
30784
  key: 0,
30731
30785
  src: image.value
30732
- }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
30733
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30786
+ }, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
30787
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30734
30788
  ]),
30735
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30789
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30736
30790
  ], 6);
30737
30791
  };
30738
30792
  }
30739
30793
  });
30740
- const _hoisted_1$15 = { class: "lupa-generated-badges" };
30741
- const _sfc_main$1f = /* @__PURE__ */ defineComponent({
30794
+ const _hoisted_1$18 = { class: "lupa-generated-badges" };
30795
+ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30742
30796
  __name: "SearchResultGeneratedBadges",
30743
30797
  props: {
30744
30798
  options: {}
@@ -30764,9 +30818,9 @@ and ensure you are accounting for this risk.
30764
30818
  })).filter((b) => Boolean(b.id));
30765
30819
  });
30766
30820
  return (_ctx, _cache) => {
30767
- return openBlock(), createElementBlock("div", _hoisted_1$15, [
30821
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
30768
30822
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
30769
- return openBlock(), createBlock(_sfc_main$1g, {
30823
+ return openBlock(), createBlock(_sfc_main$1m, {
30770
30824
  key: badge.id,
30771
30825
  badge,
30772
30826
  options: _ctx.options
@@ -30776,8 +30830,8 @@ and ensure you are accounting for this risk.
30776
30830
  };
30777
30831
  }
30778
30832
  });
30779
- const _hoisted_1$14 = ["innerHTML"];
30780
- const _sfc_main$1e = /* @__PURE__ */ defineComponent({
30833
+ const _hoisted_1$17 = ["innerHTML"];
30834
+ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30781
30835
  __name: "CustomBadge",
30782
30836
  props: {
30783
30837
  badge: {}
@@ -30798,12 +30852,12 @@ and ensure you are accounting for this risk.
30798
30852
  return openBlock(), createElementBlock("div", {
30799
30853
  class: normalizeClass(className.value),
30800
30854
  innerHTML: text.value
30801
- }, null, 10, _hoisted_1$14);
30855
+ }, null, 10, _hoisted_1$17);
30802
30856
  };
30803
30857
  }
30804
30858
  });
30805
- const _hoisted_1$13 = { class: "lupa-text-badges" };
30806
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
30859
+ const _hoisted_1$16 = { class: "lupa-text-badges" };
30860
+ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
30807
30861
  __name: "TextBadge",
30808
30862
  props: {
30809
30863
  badge: {}
@@ -30817,7 +30871,7 @@ and ensure you are accounting for this risk.
30817
30871
  return badges.value.slice(0, props.badge.maxItems);
30818
30872
  });
30819
30873
  return (_ctx, _cache) => {
30820
- return openBlock(), createElementBlock("div", _hoisted_1$13, [
30874
+ return openBlock(), createElementBlock("div", _hoisted_1$16, [
30821
30875
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
30822
30876
  return openBlock(), createElementBlock("div", {
30823
30877
  class: "lupa-badge lupa-text-badge",
@@ -30828,9 +30882,9 @@ and ensure you are accounting for this risk.
30828
30882
  };
30829
30883
  }
30830
30884
  });
30831
- const _hoisted_1$12 = { class: "lupa-image-badges" };
30832
- const _hoisted_2$M = ["src"];
30833
- const _sfc_main$1c = /* @__PURE__ */ defineComponent({
30885
+ const _hoisted_1$15 = { class: "lupa-image-badges" };
30886
+ const _hoisted_2$O = ["src"];
30887
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30834
30888
  __name: "ImageBadge",
30835
30889
  props: {
30836
30890
  badge: {}
@@ -30850,7 +30904,7 @@ and ensure you are accounting for this risk.
30850
30904
  return `${props.badge.rootImageUrl}${src}`;
30851
30905
  };
30852
30906
  return (_ctx, _cache) => {
30853
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
30907
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
30854
30908
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
30855
30909
  return openBlock(), createElementBlock("div", {
30856
30910
  class: "lupa-badge lupa-image-badge",
@@ -30858,14 +30912,14 @@ and ensure you are accounting for this risk.
30858
30912
  }, [
30859
30913
  createBaseVNode("img", {
30860
30914
  src: getImageUrl(item)
30861
- }, null, 8, _hoisted_2$M)
30915
+ }, null, 8, _hoisted_2$O)
30862
30916
  ]);
30863
30917
  }), 128))
30864
30918
  ]);
30865
30919
  };
30866
30920
  }
30867
30921
  });
30868
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
30922
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
30869
30923
  __name: "DiscountBadge",
30870
30924
  props: {
30871
30925
  badge: {}
@@ -30927,16 +30981,16 @@ and ensure you are accounting for this risk.
30927
30981
  };
30928
30982
  }
30929
30983
  });
30930
- const _hoisted_1$11 = { id: "lupa-search-results-badges" };
30984
+ const _hoisted_1$14 = { id: "lupa-search-results-badges" };
30931
30985
  const __default__$3 = {
30932
30986
  components: {
30933
- CustomBadge: _sfc_main$1e,
30934
- TextBadge: _sfc_main$1d,
30935
- ImageBadge: _sfc_main$1c,
30936
- DiscountBadge: _sfc_main$1b
30987
+ CustomBadge: _sfc_main$1k,
30988
+ TextBadge: _sfc_main$1j,
30989
+ ImageBadge: _sfc_main$1i,
30990
+ DiscountBadge: _sfc_main$1h
30937
30991
  }
30938
30992
  };
30939
- const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
30993
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
30940
30994
  __name: "SearchResultsBadgeWrapper",
30941
30995
  props: {
30942
30996
  position: {},
@@ -30999,7 +31053,7 @@ and ensure you are accounting for this risk.
30999
31053
  }
31000
31054
  };
31001
31055
  return (_ctx, _cache) => {
31002
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
31056
+ return openBlock(), createElementBlock("div", _hoisted_1$14, [
31003
31057
  createBaseVNode("div", {
31004
31058
  id: "lupa-badges",
31005
31059
  class: normalizeClass(anchorPosition.value)
@@ -31010,7 +31064,7 @@ and ensure you are accounting for this risk.
31010
31064
  badge
31011
31065
  }, null, 8, ["badge"]);
31012
31066
  }), 128)),
31013
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1f, {
31067
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1l, {
31014
31068
  key: 0,
31015
31069
  options: _ctx.options
31016
31070
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -31019,13 +31073,13 @@ and ensure you are accounting for this risk.
31019
31073
  };
31020
31074
  }
31021
31075
  }));
31022
- const _hoisted_1$10 = ["href"];
31023
- const _hoisted_2$L = { class: "lupa-search-box-product-details-section" };
31024
- const _hoisted_3$y = {
31076
+ const _hoisted_1$13 = ["href"];
31077
+ const _hoisted_2$N = { class: "lupa-search-box-product-details-section" };
31078
+ const _hoisted_3$A = {
31025
31079
  key: 0,
31026
31080
  class: "lupa-search-box-product-add-to-cart-section"
31027
31081
  };
31028
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31082
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
31029
31083
  __name: "SearchBoxProduct",
31030
31084
  props: {
31031
31085
  item: {},
@@ -31131,7 +31185,7 @@ and ensure you are accounting for this risk.
31131
31185
  style: normalizeStyle(imageStyleOverride.value)
31132
31186
  }, [
31133
31187
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
31134
- return openBlock(), createBlock(_sfc_main$1h, {
31188
+ return openBlock(), createBlock(_sfc_main$1n, {
31135
31189
  class: "lupa-search-box-product-element",
31136
31190
  key: element.key,
31137
31191
  item: _ctx.item,
@@ -31141,10 +31195,10 @@ and ensure you are accounting for this risk.
31141
31195
  }, null, 8, ["item", "element", "labels", "link"]);
31142
31196
  }), 128))
31143
31197
  ], 4),
31144
- createBaseVNode("div", _hoisted_2$L, [
31198
+ createBaseVNode("div", _hoisted_2$N, [
31145
31199
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
31146
31200
  var _a25;
31147
- return openBlock(), createBlock(_sfc_main$1h, {
31201
+ return openBlock(), createBlock(_sfc_main$1n, {
31148
31202
  class: "lupa-search-box-product-element",
31149
31203
  key: element.key,
31150
31204
  item: _ctx.item,
@@ -31155,7 +31209,7 @@ and ensure you are accounting for this risk.
31155
31209
  ((_a25 = badgeOptions.value) == null ? void 0 : _a25.anchorElementKey) === element.key ? {
31156
31210
  name: "badges",
31157
31211
  fn: withCtx(() => [
31158
- createVNode(_sfc_main$1a, {
31212
+ createVNode(_sfc_main$1g, {
31159
31213
  options: badgeOptions.value,
31160
31214
  position: "card"
31161
31215
  }, null, 8, ["options"])
@@ -31171,7 +31225,7 @@ and ensure you are accounting for this risk.
31171
31225
  class: normalizeClass(`lupa-search-box-group-${group}`)
31172
31226
  }, [
31173
31227
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
31174
- return openBlock(), createBlock(_sfc_main$1h, {
31228
+ return openBlock(), createBlock(_sfc_main$1n, {
31175
31229
  class: "lupa-search-box-product-element",
31176
31230
  key: element.key,
31177
31231
  item: _ctx.item,
@@ -31183,8 +31237,8 @@ and ensure you are accounting for this risk.
31183
31237
  }), 128))
31184
31238
  ], 2);
31185
31239
  }), 128)),
31186
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
31187
- createVNode(_sfc_main$1h, {
31240
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
31241
+ createVNode(_sfc_main$1n, {
31188
31242
  class: "lupa-search-box-product-element",
31189
31243
  item: _ctx.item,
31190
31244
  element: addToCartElement.value,
@@ -31193,7 +31247,7 @@ and ensure you are accounting for this risk.
31193
31247
  isInStock: isInStock.value
31194
31248
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
31195
31249
  ])) : createCommentVNode("", true)
31196
- ], 16, _hoisted_1$10);
31250
+ ], 16, _hoisted_1$13);
31197
31251
  };
31198
31252
  }
31199
31253
  });
@@ -31265,8 +31319,8 @@ and ensure you are accounting for this risk.
31265
31319
  };
31266
31320
  return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
31267
31321
  });
31268
- const _hoisted_1$$ = { id: "lupa-search-box-products" };
31269
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
31322
+ const _hoisted_1$12 = { id: "lupa-search-box-products" };
31323
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31270
31324
  __name: "SearchBoxProducts",
31271
31325
  props: {
31272
31326
  items: {},
@@ -31338,7 +31392,7 @@ and ensure you are accounting for this risk.
31338
31392
  }
31339
31393
  };
31340
31394
  return (_ctx, _cache) => {
31341
- return openBlock(), createElementBlock("div", _hoisted_1$$, [
31395
+ return openBlock(), createElementBlock("div", _hoisted_1$12, [
31342
31396
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
31343
31397
  return renderSlot(_ctx.$slots, "productCard", {
31344
31398
  key: index,
@@ -31350,7 +31404,7 @@ and ensure you are accounting for this risk.
31350
31404
  itemClicked: handleProductClick
31351
31405
  });
31352
31406
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
31353
- return openBlock(), createBlock(_sfc_main$19, {
31407
+ return openBlock(), createBlock(_sfc_main$1f, {
31354
31408
  key: index,
31355
31409
  item,
31356
31410
  panelOptions: _ctx.panelOptions,
@@ -31365,9 +31419,9 @@ and ensure you are accounting for this risk.
31365
31419
  };
31366
31420
  }
31367
31421
  });
31368
- const _hoisted_1$_ = { class: "lupa-search-box-documents-go-to-results-wrapper" };
31369
- const _hoisted_2$K = { key: 0 };
31370
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
31422
+ const _hoisted_1$11 = { class: "lupa-search-box-documents-go-to-results-wrapper" };
31423
+ const _hoisted_2$M = { key: 0 };
31424
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
31371
31425
  __name: "SearchBoxProductsGoToResultsButton",
31372
31426
  props: {
31373
31427
  options: {},
@@ -31398,13 +31452,13 @@ and ensure you are accounting for this risk.
31398
31452
  emit2("goToResults");
31399
31453
  };
31400
31454
  return (_ctx, _cache) => {
31401
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
31455
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
31402
31456
  createBaseVNode("button", {
31403
31457
  class: "lupa-search-box-documents-go-to-results-button",
31404
31458
  onClick: goToResults
31405
31459
  }, [
31406
31460
  createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
31407
- totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$K, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
31461
+ totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$M, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
31408
31462
  ])
31409
31463
  ]);
31410
31464
  };
@@ -31500,7 +31554,7 @@ and ensure you are accounting for this risk.
31500
31554
  }
31501
31555
  return parsedObject;
31502
31556
  };
31503
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
31557
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
31504
31558
  __name: "SearchBoxProductsWrapper",
31505
31559
  props: {
31506
31560
  panel: {},
@@ -31570,7 +31624,7 @@ and ensure you are accounting for this risk.
31570
31624
  watch(() => props.panel.limit, getItemsDebounced);
31571
31625
  return (_ctx, _cache) => {
31572
31626
  var _a25, _b25;
31573
- return openBlock(), createBlock(_sfc_main$18, {
31627
+ return openBlock(), createBlock(_sfc_main$1e, {
31574
31628
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
31575
31629
  panelOptions: _ctx.panel,
31576
31630
  labels: _ctx.labels,
@@ -31580,7 +31634,7 @@ and ensure you are accounting for this risk.
31580
31634
  default: withCtx(() => {
31581
31635
  var _a26;
31582
31636
  return [
31583
- showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$17, {
31637
+ showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$1d, {
31584
31638
  key: 0,
31585
31639
  options: _ctx.searchBoxOptions,
31586
31640
  panel: _ctx.panel,
@@ -31601,7 +31655,7 @@ and ensure you are accounting for this risk.
31601
31655
  };
31602
31656
  }
31603
31657
  });
31604
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
31658
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
31605
31659
  __name: "SearchBoxRelatedSourceWrapper",
31606
31660
  props: {
31607
31661
  panel: {},
@@ -31673,7 +31727,7 @@ and ensure you are accounting for this risk.
31673
31727
  });
31674
31728
  return (_ctx, _cache) => {
31675
31729
  var _a25, _b25;
31676
- return openBlock(), createBlock(_sfc_main$18, {
31730
+ return openBlock(), createBlock(_sfc_main$1e, {
31677
31731
  items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
31678
31732
  panelOptions: documentPanelOptions.value,
31679
31733
  labels: _ctx.labels,
@@ -31691,31 +31745,31 @@ and ensure you are accounting for this risk.
31691
31745
  };
31692
31746
  }
31693
31747
  });
31694
- const _hoisted_1$Z = {
31748
+ const _hoisted_1$10 = {
31695
31749
  key: 0,
31696
31750
  id: "lupa-search-box-panel"
31697
31751
  };
31698
- const _hoisted_2$J = ["data-cy"];
31699
- const _hoisted_3$x = {
31752
+ const _hoisted_2$L = ["data-cy"];
31753
+ const _hoisted_3$z = {
31700
31754
  key: 0,
31701
31755
  class: "lupa-panel-title lupa-panel-title-top-results"
31702
31756
  };
31703
- const _hoisted_4$o = {
31757
+ const _hoisted_4$q = {
31704
31758
  key: 1,
31705
31759
  class: "lupa-panel-title"
31706
31760
  };
31707
- const _hoisted_5$g = {
31761
+ const _hoisted_5$h = {
31708
31762
  key: 1,
31709
31763
  id: "lupa-search-box-panel"
31710
31764
  };
31711
31765
  const __default__$2 = {
31712
31766
  components: {
31713
- SearchBoxSuggestionsWrapper: _sfc_main$1r,
31714
- SearchBoxProductsWrapper: _sfc_main$16,
31715
- SearchBoxRelatedSourceWrapper: _sfc_main$15
31767
+ SearchBoxSuggestionsWrapper: _sfc_main$1x,
31768
+ SearchBoxProductsWrapper: _sfc_main$1c,
31769
+ SearchBoxRelatedSourceWrapper: _sfc_main$1b
31716
31770
  }
31717
31771
  };
31718
- const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
31772
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
31719
31773
  __name: "SearchBoxMainPanel",
31720
31774
  props: {
31721
31775
  options: {},
@@ -31880,7 +31934,7 @@ and ensure you are accounting for this risk.
31880
31934
  ref_key: "panelContainer",
31881
31935
  ref: panelContainer
31882
31936
  }, [
31883
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
31937
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
31884
31938
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
31885
31939
  key: 0,
31886
31940
  class: "lupa-search-box-close-panel",
@@ -31902,8 +31956,8 @@ and ensure you are accounting for this risk.
31902
31956
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
31903
31957
  "data-cy": "lupa-panel-" + panel.type + "-index"
31904
31958
  }, [
31905
- ((_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),
31906
- ((_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),
31959
+ ((_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),
31960
+ ((_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),
31907
31961
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
31908
31962
  key: 2,
31909
31963
  panel,
@@ -31925,21 +31979,21 @@ and ensure you are accounting for this risk.
31925
31979
  key: "0"
31926
31980
  } : void 0
31927
31981
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
31928
- ], 14, _hoisted_2$J);
31982
+ ], 14, _hoisted_2$L);
31929
31983
  }), 128))
31930
31984
  ], 4),
31931
- !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1u, {
31985
+ !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
31932
31986
  key: 1,
31933
31987
  labels: labels.value
31934
31988
  }, null, 8, ["labels"])) : createCommentVNode("", true),
31935
- displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1x, {
31989
+ displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
31936
31990
  key: 2,
31937
31991
  labels: labels.value,
31938
31992
  options: _ctx.options,
31939
31993
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
31940
31994
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
31941
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
31942
- createVNode(_sfc_main$1v, {
31995
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
31996
+ createVNode(_sfc_main$1B, {
31943
31997
  options: _ctx.options.history,
31944
31998
  history: history.value,
31945
31999
  onGoToResults: handleGoToResults,
@@ -31964,8 +32018,8 @@ and ensure you are accounting for this risk.
31964
32018
  const elements = getElements(triggers);
31965
32019
  elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
31966
32020
  };
31967
- const _hoisted_1$Y = { class: "lupa-search-box-wrapper" };
31968
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32021
+ const _hoisted_1$$ = { class: "lupa-search-box-wrapper" };
32022
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
31969
32023
  __name: "SearchBox",
31970
32024
  props: {
31971
32025
  options: {},
@@ -32288,8 +32342,8 @@ and ensure you are accounting for this risk.
32288
32342
  id: "lupa-search-box",
32289
32343
  class: normalizeClass({ "lupa-search-box-opened": opened.value })
32290
32344
  }, [
32291
- createBaseVNode("div", _hoisted_1$Y, [
32292
- createVNode(_sfc_main$1y, {
32345
+ createBaseVNode("div", _hoisted_1$$, [
32346
+ createVNode(_sfc_main$1E, {
32293
32347
  options: inputOptions.value,
32294
32348
  suggestedValue: suggestedValue.value,
32295
32349
  "can-close": (_a26 = _ctx.isSearchContainer) != null ? _a26 : false,
@@ -32302,7 +32356,7 @@ and ensure you are accounting for this risk.
32302
32356
  onSearch: handleSearch,
32303
32357
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
32304
32358
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
32305
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$14, {
32359
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$1a, {
32306
32360
  key: 0,
32307
32361
  options: panelOptions.value,
32308
32362
  inputValue: inputValue.value,
@@ -32390,20 +32444,20 @@ and ensure you are accounting for this risk.
32390
32444
  }
32391
32445
  return searchParams;
32392
32446
  };
32393
- const _hoisted_1$X = {
32447
+ const _hoisted_1$_ = {
32394
32448
  key: 0,
32395
32449
  id: "lupa-search-results-did-you-mean"
32396
32450
  };
32397
- const _hoisted_2$I = {
32451
+ const _hoisted_2$K = {
32398
32452
  key: 0,
32399
32453
  "data-cy": "suggested-search-text-label"
32400
32454
  };
32401
- const _hoisted_3$w = {
32455
+ const _hoisted_3$y = {
32402
32456
  key: 1,
32403
32457
  "data-cy": "did-you-mean-label"
32404
32458
  };
32405
- const _hoisted_4$n = { key: 1 };
32406
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32459
+ const _hoisted_4$p = { key: 1 };
32460
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
32407
32461
  __name: "SearchResultsDidYouMean",
32408
32462
  props: {
32409
32463
  labels: {}
@@ -32435,8 +32489,8 @@ and ensure you are accounting for this risk.
32435
32489
  paramStore.goToResults({ searchText, facet });
32436
32490
  };
32437
32491
  return (_ctx, _cache) => {
32438
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$X, [
32439
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
32492
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$_, [
32493
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$K, [
32440
32494
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
32441
32495
  return openBlock(), createElementBlock("span", { key: index }, [
32442
32496
  createBaseVNode("span", {
@@ -32445,7 +32499,7 @@ and ensure you are accounting for this risk.
32445
32499
  ]);
32446
32500
  }), 128))
32447
32501
  ])) : createCommentVNode("", true),
32448
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
32502
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
32449
32503
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
32450
32504
  return openBlock(), createElementBlock("span", { key: index }, [
32451
32505
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -32453,7 +32507,7 @@ and ensure you are accounting for this risk.
32453
32507
  class: "lupa-did-you-mean lupa-highlighted-search-text",
32454
32508
  "data-cy": "did-you-mean-value",
32455
32509
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
32456
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
32510
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(label) + " ", 1))
32457
32511
  ]);
32458
32512
  }), 128))
32459
32513
  ])) : createCommentVNode("", true)
@@ -32461,12 +32515,12 @@ and ensure you are accounting for this risk.
32461
32515
  };
32462
32516
  }
32463
32517
  });
32464
- const _hoisted_1$W = {
32518
+ const _hoisted_1$Z = {
32465
32519
  key: 0,
32466
32520
  class: "lupa-search-results-summary"
32467
32521
  };
32468
- const _hoisted_2$H = ["innerHTML"];
32469
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32522
+ const _hoisted_2$J = ["innerHTML"];
32523
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
32470
32524
  __name: "SearchResultsSummary",
32471
32525
  props: {
32472
32526
  label: {},
@@ -32481,8 +32535,8 @@ and ensure you are accounting for this risk.
32481
32535
  return addParamsToLabel(props.label, range2, `<span>${totalItems.value}</span>`);
32482
32536
  });
32483
32537
  return (_ctx, _cache) => {
32484
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
32485
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$H),
32538
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
32539
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$J),
32486
32540
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
32487
32541
  key: 0,
32488
32542
  class: "lupa-filter-clear",
@@ -32493,19 +32547,19 @@ and ensure you are accounting for this risk.
32493
32547
  };
32494
32548
  }
32495
32549
  });
32496
- const _hoisted_1$V = {
32550
+ const _hoisted_1$Y = {
32497
32551
  key: 0,
32498
32552
  class: "lupa-result-page-title",
32499
32553
  "data-cy": "lupa-result-page-title"
32500
32554
  };
32501
- const _hoisted_2$G = { key: 0 };
32502
- const _hoisted_3$v = {
32555
+ const _hoisted_2$I = { key: 0 };
32556
+ const _hoisted_3$x = {
32503
32557
  key: 1,
32504
32558
  class: "lupa-results-total-count"
32505
32559
  };
32506
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
32507
- const _hoisted_5$f = ["innerHTML"];
32508
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32560
+ const _hoisted_4$o = { class: "lupa-results-total-count-number" };
32561
+ const _hoisted_5$g = ["innerHTML"];
32562
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
32509
32563
  __name: "SearchResultsTitle",
32510
32564
  props: {
32511
32565
  options: {},
@@ -32548,16 +32602,16 @@ and ensure you are accounting for this risk.
32548
32602
  });
32549
32603
  return (_ctx, _cache) => {
32550
32604
  return openBlock(), createElementBlock("div", null, [
32551
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$V, [
32605
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$Y, [
32552
32606
  createTextVNode(toDisplayString(searchResultsTitleTemplate.value || _ctx.options.labels.searchResults), 1),
32553
- queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32554
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
32607
+ queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$I, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32608
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
32555
32609
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
32556
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
32610
+ createBaseVNode("span", _hoisted_4$o, toDisplayString(unref(totalItems)), 1),
32557
32611
  _cache[0] || (_cache[0] = createTextVNode(")"))
32558
32612
  ])) : createCommentVNode("", true)
32559
32613
  ])) : createCommentVNode("", true),
32560
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$11, {
32614
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$17, {
32561
32615
  key: 1,
32562
32616
  label: summaryLabel.value
32563
32617
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -32565,20 +32619,20 @@ and ensure you are accounting for this risk.
32565
32619
  key: 2,
32566
32620
  class: "lupa-result-page-description-top",
32567
32621
  innerHTML: descriptionTop.value
32568
- }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
32622
+ }, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
32569
32623
  ]);
32570
32624
  };
32571
32625
  }
32572
32626
  });
32573
- const _hoisted_1$U = {
32627
+ const _hoisted_1$X = {
32574
32628
  class: "lupa-current-filter-label",
32575
32629
  "data-cy": "lupa-current-filter-label"
32576
32630
  };
32577
- const _hoisted_2$F = {
32631
+ const _hoisted_2$H = {
32578
32632
  class: "lupa-current-filter-value",
32579
32633
  "data-cy": "lupa-current-filter-value"
32580
32634
  };
32581
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
32635
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
32582
32636
  __name: "CurrentFilterDisplay",
32583
32637
  props: {
32584
32638
  filter: {}
@@ -32620,23 +32674,23 @@ and ensure you are accounting for this risk.
32620
32674
  onClick: handleClick,
32621
32675
  "aria-label": "Remove filter"
32622
32676
  }, "⨉"),
32623
- createBaseVNode("div", _hoisted_1$U, toDisplayString(_ctx.filter.label) + ": ", 1),
32624
- createBaseVNode("div", _hoisted_2$F, toDisplayString(formatFilterValue(props.filter)), 1)
32677
+ createBaseVNode("div", _hoisted_1$X, toDisplayString(_ctx.filter.label) + ": ", 1),
32678
+ createBaseVNode("div", _hoisted_2$H, toDisplayString(formatFilterValue(props.filter)), 1)
32625
32679
  ], 2);
32626
32680
  };
32627
32681
  }
32628
32682
  });
32629
- const _hoisted_1$T = { class: "lupa-filter-title-text" };
32630
- const _hoisted_2$E = {
32683
+ const _hoisted_1$W = { class: "lupa-filter-title-text" };
32684
+ const _hoisted_2$G = {
32631
32685
  key: 0,
32632
32686
  class: "lupa-filter-count"
32633
32687
  };
32634
- const _hoisted_3$u = {
32688
+ const _hoisted_3$w = {
32635
32689
  key: 0,
32636
32690
  class: "filter-values"
32637
32691
  };
32638
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
32639
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32692
+ const _hoisted_4$n = { class: "lupa-current-filter-list" };
32693
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
32640
32694
  __name: "CurrentFilters",
32641
32695
  props: {
32642
32696
  options: {},
@@ -32645,12 +32699,10 @@ and ensure you are accounting for this risk.
32645
32699
  setup(__props) {
32646
32700
  const optionsStore = useOptionsStore();
32647
32701
  const { searchResultOptions } = storeToRefs(optionsStore);
32648
- const units = computed(
32649
- () => {
32650
- var _a25, _b25, _c, _d, _e;
32651
- 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 : {};
32652
- }
32653
- );
32702
+ const units = computed(() => {
32703
+ var _a25, _b25, _c, _d, _e;
32704
+ 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 : {};
32705
+ });
32654
32706
  const isOpen = ref(false);
32655
32707
  const paramsStore = useParamsStore();
32656
32708
  const optionStore = useOptionsStore();
@@ -32700,7 +32752,8 @@ and ensure you are accounting for this risk.
32700
32752
  paramsStore.removeParameters({
32701
32753
  paramsToRemove: [
32702
32754
  optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE),
32703
- `${FACET_PARAMS_TYPE.RANGE}${filter.key}`
32755
+ `${FACET_PARAMS_TYPE.RANGE}${filter.key}`,
32756
+ `${FACET_PARAMS_TYPE.PARTIAL_RANGE}${filter.key}`
32704
32757
  ]
32705
32758
  });
32706
32759
  break;
@@ -32717,19 +32770,19 @@ and ensure you are accounting for this risk.
32717
32770
  class: "lupa-current-filter-title",
32718
32771
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
32719
32772
  }, [
32720
- createBaseVNode("div", _hoisted_1$T, [
32773
+ createBaseVNode("div", _hoisted_1$W, [
32721
32774
  createTextVNode(toDisplayString((_c = (_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) != null ? _c : "") + " ", 1),
32722
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$E, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
32775
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$G, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
32723
32776
  ]),
32724
32777
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
32725
32778
  key: 0,
32726
32779
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
32727
32780
  }, null, 2)) : createCommentVNode("", true)
32728
32781
  ]),
32729
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
32730
- createBaseVNode("div", _hoisted_4$l, [
32782
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
32783
+ createBaseVNode("div", _hoisted_4$n, [
32731
32784
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
32732
- return openBlock(), createBlock(_sfc_main$$, {
32785
+ return openBlock(), createBlock(_sfc_main$15, {
32733
32786
  key: filter.key + "_" + filter.value,
32734
32787
  filter,
32735
32788
  units: units.value,
@@ -32747,8 +32800,8 @@ and ensure you are accounting for this risk.
32747
32800
  };
32748
32801
  }
32749
32802
  });
32750
- const _hoisted_1$S = ["href"];
32751
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
32803
+ const _hoisted_1$V = ["href"];
32804
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
32752
32805
  __name: "CategoryFilterItem",
32753
32806
  props: {
32754
32807
  options: {},
@@ -32785,20 +32838,20 @@ and ensure you are accounting for this risk.
32785
32838
  "data-cy": "lupa-child-category-item",
32786
32839
  href: urlLink.value,
32787
32840
  onClick: handleNavigation
32788
- }, toDisplayString(title.value), 9, _hoisted_1$S)
32841
+ }, toDisplayString(title.value), 9, _hoisted_1$V)
32789
32842
  ], 2);
32790
32843
  };
32791
32844
  }
32792
32845
  });
32793
- const _hoisted_1$R = {
32846
+ const _hoisted_1$U = {
32794
32847
  class: "lupa-category-filter",
32795
32848
  "data-cy": "lupa-category-filter"
32796
32849
  };
32797
- const _hoisted_2$D = { class: "lupa-category-back" };
32798
- const _hoisted_3$t = ["href"];
32799
- const _hoisted_4$k = ["href"];
32800
- const _hoisted_5$e = { class: "lupa-child-category-list" };
32801
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32850
+ const _hoisted_2$F = { class: "lupa-category-back" };
32851
+ const _hoisted_3$v = ["href"];
32852
+ const _hoisted_4$m = ["href"];
32853
+ const _hoisted_5$f = { class: "lupa-child-category-list" };
32854
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32802
32855
  __name: "CategoryFilter",
32803
32856
  props: {
32804
32857
  options: {}
@@ -32886,14 +32939,14 @@ and ensure you are accounting for this risk.
32886
32939
  };
32887
32940
  __expose({ fetch: fetch2 });
32888
32941
  return (_ctx, _cache) => {
32889
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
32890
- createBaseVNode("div", _hoisted_2$D, [
32942
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
32943
+ createBaseVNode("div", _hoisted_2$F, [
32891
32944
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
32892
32945
  key: 0,
32893
32946
  "data-cy": "lupa-category-back",
32894
32947
  href: backUrlLink.value,
32895
32948
  onClick: handleNavigationBack
32896
- }, toDisplayString(backTitle.value), 9, _hoisted_3$t)) : createCommentVNode("", true)
32949
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$v)) : createCommentVNode("", true)
32897
32950
  ]),
32898
32951
  createBaseVNode("div", {
32899
32952
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -32903,11 +32956,11 @@ and ensure you are accounting for this risk.
32903
32956
  href: parentUrlLink.value,
32904
32957
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
32905
32958
  onClick: handleNavigationParent
32906
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
32959
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$m)
32907
32960
  ], 2),
32908
- createBaseVNode("div", _hoisted_5$e, [
32961
+ createBaseVNode("div", _hoisted_5$f, [
32909
32962
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
32910
- return openBlock(), createBlock(_sfc_main$Z, {
32963
+ return openBlock(), createBlock(_sfc_main$13, {
32911
32964
  key: getCategoryKey(child),
32912
32965
  item: child,
32913
32966
  options: _ctx.options
@@ -32918,22 +32971,22 @@ and ensure you are accounting for this risk.
32918
32971
  };
32919
32972
  }
32920
32973
  });
32921
- const _hoisted_1$Q = {
32974
+ const _hoisted_1$T = {
32922
32975
  class: "lupa-search-result-facet-term-values",
32923
32976
  "data-cy": "lupa-search-result-facet-term-values"
32924
32977
  };
32925
- const _hoisted_2$C = ["placeholder"];
32926
- const _hoisted_3$s = { class: "lupa-terms-list" };
32927
- const _hoisted_4$j = ["onClick"];
32928
- const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
32929
- const _hoisted_6$7 = { class: "lupa-term-label" };
32978
+ const _hoisted_2$E = ["placeholder"];
32979
+ const _hoisted_3$u = { class: "lupa-terms-list" };
32980
+ const _hoisted_4$l = ["onClick"];
32981
+ const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
32982
+ const _hoisted_6$6 = { class: "lupa-term-label" };
32930
32983
  const _hoisted_7$4 = {
32931
32984
  key: 0,
32932
32985
  class: "lupa-term-count"
32933
32986
  };
32934
32987
  const _hoisted_8$2 = { key: 0 };
32935
32988
  const _hoisted_9$2 = { key: 1 };
32936
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
32989
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
32937
32990
  __name: "TermFacet",
32938
32991
  props: {
32939
32992
  options: {},
@@ -32999,7 +33052,7 @@ and ensure you are accounting for this risk.
32999
33052
  emit2("select", {
33000
33053
  key: facet.value.key,
33001
33054
  value,
33002
- type: facet.value.type
33055
+ type: facet.value.type === "range" ? "partialRange" : facet.value.type
33003
33056
  });
33004
33057
  };
33005
33058
  const toggleShowAll = () => {
@@ -33027,17 +33080,17 @@ and ensure you are accounting for this risk.
33027
33080
  }
33028
33081
  };
33029
33082
  return (_ctx, _cache) => {
33030
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
33083
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
33031
33084
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
33032
33085
  key: 0,
33033
33086
  class: "lupa-term-filter",
33034
33087
  "data-cy": "lupa-term-filter",
33035
33088
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
33036
33089
  placeholder: _ctx.options.labels.facetFilter
33037
- }, null, 8, _hoisted_2$C)), [
33090
+ }, null, 8, _hoisted_2$E)), [
33038
33091
  [vModelText, termFilter.value]
33039
33092
  ]) : createCommentVNode("", true),
33040
- createBaseVNode("div", _hoisted_3$s, [
33093
+ createBaseVNode("div", _hoisted_3$u, [
33041
33094
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
33042
33095
  return openBlock(), createElementBlock("div", {
33043
33096
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -33045,7 +33098,7 @@ and ensure you are accounting for this risk.
33045
33098
  key: item.title,
33046
33099
  onClick: ($event) => handleFacetClick(item)
33047
33100
  }, [
33048
- createBaseVNode("div", _hoisted_5$d, [
33101
+ createBaseVNode("div", _hoisted_5$e, [
33049
33102
  createBaseVNode("span", {
33050
33103
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
33051
33104
  }, null, 2)
@@ -33053,10 +33106,10 @@ and ensure you are accounting for this risk.
33053
33106
  createBaseVNode("div", {
33054
33107
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(item)]: true }])
33055
33108
  }, [
33056
- createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
33109
+ createBaseVNode("span", _hoisted_6$6, toDisplayString(getItemLabel(item)), 1),
33057
33110
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
33058
33111
  ], 2)
33059
- ], 10, _hoisted_4$j);
33112
+ ], 10, _hoisted_4$l);
33060
33113
  }), 128))
33061
33114
  ]),
33062
33115
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -33976,21 +34029,21 @@ and ensure you are accounting for this risk.
33976
34029
  }
33977
34030
  return out;
33978
34031
  };
33979
- const _hoisted_1$P = { class: "lupa-search-result-facet-stats-values" };
33980
- const _hoisted_2$B = {
34032
+ const _hoisted_1$S = { class: "lupa-search-result-facet-stats-values" };
34033
+ const _hoisted_2$D = {
33981
34034
  key: 0,
33982
34035
  class: "lupa-stats-facet-summary"
33983
34036
  };
33984
- const _hoisted_3$r = {
34037
+ const _hoisted_3$t = {
33985
34038
  key: 1,
33986
34039
  class: "lupa-stats-facet-summary-input"
33987
34040
  };
33988
- const _hoisted_4$i = { class: "lupa-stats-from" };
33989
- const _hoisted_5$c = {
34041
+ const _hoisted_4$k = { class: "lupa-stats-from" };
34042
+ const _hoisted_5$d = {
33990
34043
  key: 0,
33991
34044
  class: "lupa-stats-range-label"
33992
34045
  };
33993
- const _hoisted_6$6 = ["min", "max", "pattern", "aria-label"];
34046
+ const _hoisted_6$5 = ["min", "max", "pattern", "aria-label"];
33994
34047
  const _hoisted_7$3 = { key: 1 };
33995
34048
  const _hoisted_8$1 = { key: 2 };
33996
34049
  const _hoisted_9$1 = { class: "lupa-stats-to" };
@@ -34005,7 +34058,7 @@ and ensure you are accounting for this risk.
34005
34058
  key: 2,
34006
34059
  class: "lupa-stats-slider-wrapper"
34007
34060
  };
34008
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
34061
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
34009
34062
  __name: "StatsFacet",
34010
34063
  props: {
34011
34064
  options: {},
@@ -34224,10 +34277,10 @@ and ensure you are accounting for this risk.
34224
34277
  }
34225
34278
  );
34226
34279
  return (_ctx, _cache) => {
34227
- return openBlock(), createElementBlock("div", _hoisted_1$P, [
34228
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
34229
- createBaseVNode("div", _hoisted_4$i, [
34230
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
34280
+ return openBlock(), createElementBlock("div", _hoisted_1$S, [
34281
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$D, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$t, [
34282
+ createBaseVNode("div", _hoisted_4$k, [
34283
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$d, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
34231
34284
  withDirectives(createBaseVNode("input", {
34232
34285
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
34233
34286
  type: "text",
@@ -34236,7 +34289,7 @@ and ensure you are accounting for this risk.
34236
34289
  max: facetMax.value,
34237
34290
  pattern: sliderInputFormat.value,
34238
34291
  "aria-label": ariaLabelFrom.value
34239
- }, null, 8, _hoisted_6$6), [
34292
+ }, null, 8, _hoisted_6$5), [
34240
34293
  [
34241
34294
  vModelText,
34242
34295
  fromValue.value,
@@ -34289,17 +34342,17 @@ and ensure you are accounting for this risk.
34289
34342
  };
34290
34343
  }
34291
34344
  });
34292
- const _hoisted_1$O = { class: "lupa-term-checkbox-wrapper" };
34293
- const _hoisted_2$A = { class: "lupa-term-label" };
34294
- const _hoisted_3$q = {
34345
+ const _hoisted_1$R = { class: "lupa-term-checkbox-wrapper" };
34346
+ const _hoisted_2$C = { class: "lupa-term-label" };
34347
+ const _hoisted_3$s = {
34295
34348
  key: 0,
34296
34349
  class: "lupa-term-count"
34297
34350
  };
34298
- const _hoisted_4$h = {
34351
+ const _hoisted_4$j = {
34299
34352
  key: 0,
34300
34353
  class: "lupa-facet-level"
34301
34354
  };
34302
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
34355
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
34303
34356
  __name: "HierarchyFacetLevel",
34304
34357
  props: {
34305
34358
  options: {},
@@ -34353,7 +34406,7 @@ and ensure you are accounting for this risk.
34353
34406
  "data-cy": "lupa-facet-term",
34354
34407
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
34355
34408
  }, [
34356
- createBaseVNode("div", _hoisted_1$O, [
34409
+ createBaseVNode("div", _hoisted_1$R, [
34357
34410
  createBaseVNode("span", {
34358
34411
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
34359
34412
  }, null, 2)
@@ -34361,11 +34414,11 @@ and ensure you are accounting for this risk.
34361
34414
  createBaseVNode("div", {
34362
34415
  class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(_ctx.item)]: true }])
34363
34416
  }, [
34364
- createBaseVNode("span", _hoisted_2$A, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
34365
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
34417
+ createBaseVNode("span", _hoisted_2$C, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
34418
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
34366
34419
  ], 2)
34367
34420
  ]),
34368
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
34421
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, [
34369
34422
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
34370
34423
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
34371
34424
  key: itemChild.title,
@@ -34381,13 +34434,13 @@ and ensure you are accounting for this risk.
34381
34434
  };
34382
34435
  }
34383
34436
  });
34384
- const _hoisted_1$N = {
34437
+ const _hoisted_1$Q = {
34385
34438
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
34386
34439
  "data-cy": "lupa-search-result-facet-term-values"
34387
34440
  };
34388
- const _hoisted_2$z = { key: 0 };
34389
- const _hoisted_3$p = ["placeholder"];
34390
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
34441
+ const _hoisted_2$B = { key: 0 };
34442
+ const _hoisted_3$r = ["placeholder"];
34443
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
34391
34444
  __name: "HierarchyFacet",
34392
34445
  props: {
34393
34446
  options: {},
@@ -34443,19 +34496,19 @@ and ensure you are accounting for this risk.
34443
34496
  showAll.value = false;
34444
34497
  };
34445
34498
  return (_ctx, _cache) => {
34446
- return openBlock(), createElementBlock("div", _hoisted_1$N, [
34447
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, [
34499
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
34500
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, [
34448
34501
  withDirectives(createBaseVNode("input", {
34449
34502
  class: "lupa-term-filter",
34450
34503
  "data-cy": "lupa-term-filter",
34451
34504
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
34452
34505
  placeholder: _ctx.options.labels.facetFilter
34453
- }, null, 8, _hoisted_3$p), [
34506
+ }, null, 8, _hoisted_3$r), [
34454
34507
  [vModelText, termFilter.value]
34455
34508
  ])
34456
34509
  ])) : createCommentVNode("", true),
34457
34510
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
34458
- return openBlock(), createBlock(_sfc_main$V, {
34511
+ return openBlock(), createBlock(_sfc_main$$, {
34459
34512
  key: item.title,
34460
34513
  options: _ctx.options,
34461
34514
  item,
@@ -34479,30 +34532,31 @@ and ensure you are accounting for this risk.
34479
34532
  };
34480
34533
  }
34481
34534
  });
34482
- const _hoisted_1$M = { class: "lupa-facet-label-text" };
34483
- const _hoisted_2$y = {
34535
+ const _hoisted_1$P = { class: "lupa-facet-label-text" };
34536
+ const _hoisted_2$A = {
34484
34537
  key: 0,
34485
34538
  class: "lupa-facet-content",
34486
34539
  "data-cy": "lupa-facet-content"
34487
34540
  };
34488
34541
  const __default__$1 = {
34489
34542
  components: {
34490
- TermFacet: _sfc_main$X,
34491
- StatsFacet: _sfc_main$W,
34492
- HierarchyFacet: _sfc_main$U
34543
+ TermFacet: _sfc_main$11,
34544
+ StatsFacet: _sfc_main$10,
34545
+ HierarchyFacet: _sfc_main$_
34493
34546
  }
34494
34547
  };
34495
- const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
34548
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
34496
34549
  __name: "FacetDisplay",
34497
34550
  props: {
34498
34551
  options: {},
34499
34552
  facet: {},
34500
34553
  currentFilters: {},
34501
- clearable: { type: Boolean }
34554
+ clearable: { type: Boolean },
34555
+ currentFacetStyle: {}
34502
34556
  },
34503
- emits: ["select", "clear"],
34557
+ emits: ["select", "clear", "expand"],
34504
34558
  setup(__props, { emit: __emit }) {
34505
- var _a25, _b25, _c;
34559
+ var _a25, _b25;
34506
34560
  const props = __props;
34507
34561
  const facet = computed(() => {
34508
34562
  var _a26;
@@ -34516,17 +34570,17 @@ and ensure you are accounting for this risk.
34516
34570
  const optionsStore = useOptionsStore();
34517
34571
  const screenStore = useScreenStore();
34518
34572
  const { currentFilterKeys } = storeToRefs(searchResultStore);
34519
- const { searchResultOptions } = storeToRefs(optionsStore);
34573
+ const { searchResultOptions, expandedFacets } = storeToRefs(optionsStore);
34520
34574
  const { isMobileWidth } = storeToRefs(screenStore);
34521
34575
  const emit2 = __emit;
34522
34576
  const allExpanded = computed(() => {
34523
- var _a26, _b26, _c2, _d, _e, _f;
34577
+ var _a26, _b26, _c, _d, _e, _f;
34524
34578
  if (isMobileWidth.value) {
34525
- return (_c2 = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c2 : false;
34579
+ return (_c = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c : false;
34526
34580
  }
34527
34581
  return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
34528
34582
  });
34529
- 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);
34583
+ const isOpen = ref((_b25 = ((_a25 = expandedFacets.value) == null ? void 0 : _a25.includes(props.facet.key)) || allExpanded.value) != null ? _b25 : false);
34530
34584
  const facetPanel = ref(null);
34531
34585
  const facetType = computed(() => {
34532
34586
  switch (facet.value.type) {
@@ -34568,9 +34622,16 @@ and ensure you are accounting for this risk.
34568
34622
  var _a26;
34569
34623
  return getTranslatedFacetKey(props.facet, (_a26 = searchResultOptions.value.filters) == null ? void 0 : _a26.translations);
34570
34624
  });
34625
+ const expandSidebarOnFacetClick = computed(() => {
34626
+ var _a26, _b26, _c;
34627
+ if (!props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
34628
+ return false;
34629
+ }
34630
+ return (_c = (_b26 = (_a26 = props.options.style) == null ? void 0 : _a26.drawer) == null ? void 0 : _b26.expandSidebarOnFacetClick) != null ? _c : false;
34631
+ });
34571
34632
  onMounted(() => {
34572
- var _a26;
34573
- if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown") {
34633
+ var _a26, _b26, _c;
34634
+ 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") {
34574
34635
  window.addEventListener("click", handleMouseClick);
34575
34636
  }
34576
34637
  });
@@ -34579,7 +34640,7 @@ and ensure you are accounting for this risk.
34579
34640
  });
34580
34641
  const handleMouseClick = (e2) => {
34581
34642
  const el = facetPanel.value;
34582
- if (!el) {
34643
+ if (!el || !props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
34583
34644
  return;
34584
34645
  }
34585
34646
  const isOutsideElement = el && !el.contains(e2.target);
@@ -34591,6 +34652,11 @@ and ensure you are accounting for this risk.
34591
34652
  handleFacetQueryFilter();
34592
34653
  });
34593
34654
  const toggleFacet = () => {
34655
+ if (expandSidebarOnFacetClick.value) {
34656
+ expandedFacets.value = [facet.value.key];
34657
+ emit2("expand");
34658
+ return;
34659
+ }
34594
34660
  isOpen.value = !isOpen.value;
34595
34661
  handleFacetQueryFilter();
34596
34662
  };
@@ -34623,12 +34689,12 @@ and ensure you are accounting for this risk.
34623
34689
  "data-cy": "lupa-search-result-facet-label",
34624
34690
  onClick: toggleFacet
34625
34691
  }, [
34626
- createBaseVNode("div", _hoisted_1$M, toDisplayString(facetLabel.value), 1),
34692
+ createBaseVNode("div", _hoisted_1$P, toDisplayString(facetLabel.value), 1),
34627
34693
  createBaseVNode("div", {
34628
34694
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
34629
34695
  }, null, 2)
34630
34696
  ], 2),
34631
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
34697
+ isOpen.value && !expandSidebarOnFacetClick.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
34632
34698
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
34633
34699
  facet: facet.value,
34634
34700
  currentFilters: currentFilters.value[facet.value.key],
@@ -34646,12 +34712,154 @@ and ensure you are accounting for this risk.
34646
34712
  };
34647
34713
  }
34648
34714
  }));
34649
- const _hoisted_1$L = { class: "lupa-search-result-facet-section" };
34650
- const _hoisted_2$x = {
34715
+ const useSidebarToggle = () => {
34716
+ const searchResultStore = useSearchResultStore();
34717
+ const optionsStore = useOptionsStore();
34718
+ const { currentFilterCount, isFilterSidebarVisible, isSortingSidebarVisible } = storeToRefs(searchResultStore);
34719
+ const { searchResultOptions } = storeToRefs(optionsStore);
34720
+ const labels = computed(() => {
34721
+ return searchResultOptions.value.labels;
34722
+ });
34723
+ const showMobileFilterCount = computed(
34724
+ () => {
34725
+ var _a25, _b25, _c, _d;
34726
+ 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;
34727
+ }
34728
+ );
34729
+ const disableMobileBodyScrollLock = computed(
34730
+ () => {
34731
+ var _a25, _b25, _c;
34732
+ return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
34733
+ }
34734
+ );
34735
+ const isSidebarVisible = computed(
34736
+ () => isFilterSidebarVisible.value || isSortingSidebarVisible.value
34737
+ );
34738
+ const sortLabel = computed(() => {
34739
+ var _a25, _b25;
34740
+ return (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.sortBy;
34741
+ });
34742
+ const defaultLabel = computed(() => {
34743
+ var _a25;
34744
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButton;
34745
+ });
34746
+ const activeLabel = computed(() => {
34747
+ var _a25;
34748
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonActive;
34749
+ });
34750
+ const openLabel = computed(() => {
34751
+ var _a25;
34752
+ return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonOpen;
34753
+ });
34754
+ const label = computed(() => {
34755
+ if (isSidebarVisible.value && openLabel.value) {
34756
+ return openLabel.value;
34757
+ }
34758
+ if (hasActiveFilters.value && activeLabel.value) {
34759
+ return activeLabel.value;
34760
+ }
34761
+ return defaultLabel.value;
34762
+ });
34763
+ const sortToggleVisible = computed(() => {
34764
+ var _a25, _b25;
34765
+ return ((_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle) == null ? void 0 : _b25.type) === "drawer";
34766
+ });
34767
+ const handleFilterSidebarToggle = () => {
34768
+ searchResultStore.setSidebarState({
34769
+ visible: !isSidebarVisible.value,
34770
+ disableBodyScrolling: !disableMobileBodyScrollLock.value,
34771
+ sidebar: "filter"
34772
+ });
34773
+ };
34774
+ const handleSortSidebarToggle = () => {
34775
+ searchResultStore.setSidebarState({
34776
+ visible: !isSortingSidebarVisible.value,
34777
+ disableBodyScrolling: !disableMobileBodyScrollLock.value,
34778
+ sidebar: "sorting"
34779
+ });
34780
+ };
34781
+ const hasActiveFilters = computed(() => currentFilterCount.value > 0);
34782
+ const checkCloseOnEscape = (e2) => {
34783
+ var _a25;
34784
+ if (!["Escape", "Esc"].includes((_a25 = e2.key) != null ? _a25 : "")) {
34785
+ return;
34786
+ }
34787
+ if (isSidebarVisible.value) {
34788
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
34789
+ searchResultStore.setSidebarState({ visible: false, sidebar: "filter" });
34790
+ }
34791
+ };
34792
+ onMounted(() => {
34793
+ window.addEventListener("keydown", checkCloseOnEscape);
34794
+ });
34795
+ onBeforeUnmount(() => {
34796
+ window.removeEventListener("keydown", checkCloseOnEscape);
34797
+ });
34798
+ return {
34799
+ isSidebarVisible,
34800
+ label,
34801
+ currentFilterCount,
34802
+ hasActiveFilters,
34803
+ showMobileFilterCount,
34804
+ sortLabel,
34805
+ sortToggleVisible,
34806
+ handleFilterSidebarToggle,
34807
+ handleSortSidebarToggle
34808
+ };
34809
+ };
34810
+ const _hoisted_1$O = {
34811
+ key: 0,
34812
+ class: "lupa-desktop-toggle-filter-count"
34813
+ };
34814
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
34815
+ __name: "DesktopFacetToggle",
34816
+ setup(__props) {
34817
+ const {
34818
+ isSidebarVisible,
34819
+ label,
34820
+ currentFilterCount,
34821
+ hasActiveFilters,
34822
+ showMobileFilterCount,
34823
+ handleFilterSidebarToggle
34824
+ } = useSidebarToggle();
34825
+ return (_ctx, _cache) => {
34826
+ return openBlock(), createElementBlock("div", {
34827
+ class: normalizeClass(["lupa-desktop-toggle", {
34828
+ "lupa-desktop-toggle-filters-empty": unref(currentFilterCount) < 1,
34829
+ "lupa-desktop-toggle-has-filters": unref(hasActiveFilters),
34830
+ "lupa-sidebar-open": unref(isSidebarVisible)
34831
+ }]),
34832
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
34833
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
34834
+ }, [
34835
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
34836
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34837
+ ], 2);
34838
+ };
34839
+ }
34840
+ });
34841
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
34842
+ __name: "DesktopSortToggle",
34843
+ setup(__props) {
34844
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
34845
+ return (_ctx, _cache) => {
34846
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
34847
+ key: 0,
34848
+ class: normalizeClass(["lupa-desktop-toggle lupa-desktop-sort-toggle", {
34849
+ "lupa-sidebar-open": unref(isSidebarVisible)
34850
+ }]),
34851
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
34852
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
34853
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
34854
+ };
34855
+ }
34856
+ });
34857
+ const _hoisted_1$N = { class: "lupa-search-result-facet-section" };
34858
+ const _hoisted_2$z = {
34651
34859
  key: 0,
34652
34860
  class: "lupa-facets-title"
34653
34861
  };
34654
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
34862
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34655
34863
  __name: "FacetList",
34656
34864
  props: {
34657
34865
  options: {},
@@ -34663,6 +34871,7 @@ and ensure you are accounting for this risk.
34663
34871
  emits: ["select", "clear"],
34664
34872
  setup(__props, { emit: __emit }) {
34665
34873
  const props = __props;
34874
+ const { handleFilterSidebarToggle } = useSidebarToggle();
34666
34875
  const emit2 = __emit;
34667
34876
  const currentFiltersValue = computed(() => {
34668
34877
  var _a25;
@@ -34678,6 +34887,12 @@ and ensure you are accounting for this risk.
34678
34887
  return !((_a25 = props.options.exclude) == null ? void 0 : _a25.includes(f2.key));
34679
34888
  }) : facetsValue.value;
34680
34889
  });
34890
+ const displayFacetStyle = computed(() => {
34891
+ if (!props.facetStyle || props.facetStyle === "sidebar") {
34892
+ return "sidebar";
34893
+ }
34894
+ return "top-dropdown";
34895
+ });
34681
34896
  const handleFacetSelect = (facetAction) => {
34682
34897
  emit2("select", facetAction);
34683
34898
  };
@@ -34686,29 +34901,33 @@ and ensure you are accounting for this risk.
34686
34901
  };
34687
34902
  return (_ctx, _cache) => {
34688
34903
  var _a25;
34689
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
34690
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
34904
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
34905
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
34691
34906
  createBaseVNode("div", {
34692
- class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = _ctx.facetStyle) != null ? _a25 : "")])
34907
+ class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = displayFacetStyle.value) != null ? _a25 : "")])
34693
34908
  }, [
34694
34909
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
34695
34910
  var _a26;
34696
- return openBlock(), createBlock(_sfc_main$T, {
34911
+ return openBlock(), createBlock(_sfc_main$Z, {
34697
34912
  key: facet.key,
34698
34913
  facet,
34699
34914
  currentFilters: currentFiltersValue.value,
34700
34915
  options: _ctx.options,
34701
34916
  clearable: (_a26 = _ctx.clearable) != null ? _a26 : false,
34917
+ "current-facet-style": _ctx.facetStyle,
34702
34918
  onSelect: handleFacetSelect,
34703
- onClear: clear
34704
- }, null, 8, ["facet", "currentFilters", "options", "clearable"]);
34705
- }), 128))
34919
+ onClear: clear,
34920
+ onExpand: unref(handleFilterSidebarToggle)
34921
+ }, null, 8, ["facet", "currentFilters", "options", "clearable", "current-facet-style", "onExpand"]);
34922
+ }), 128)),
34923
+ _ctx.facetStyle === "drawer" ? (openBlock(), createBlock(_sfc_main$Y, { key: 0 })) : createCommentVNode("", true),
34924
+ _ctx.facetStyle === "drawer" || _ctx.facetStyle === "top-dropdown" ? (openBlock(), createBlock(_sfc_main$X, { key: 1 })) : createCommentVNode("", true)
34706
34925
  ], 2)
34707
34926
  ]);
34708
34927
  };
34709
34928
  }
34710
34929
  });
34711
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
34930
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34712
34931
  __name: "FacetsButton",
34713
34932
  props: {
34714
34933
  options: {}
@@ -34733,8 +34952,33 @@ and ensure you are accounting for this risk.
34733
34952
  };
34734
34953
  }
34735
34954
  });
34736
- const _hoisted_1$K = { class: "lupa-facets-filter-button-wrapper" };
34737
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34955
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
34956
+ __name: "FacetsClearButton",
34957
+ props: {
34958
+ options: {}
34959
+ },
34960
+ emits: ["clear"],
34961
+ setup(__props, { emit: __emit }) {
34962
+ const props = __props;
34963
+ const emit2 = __emit;
34964
+ const label = computed(() => {
34965
+ var _a25, _b25;
34966
+ return (_b25 = (_a25 = props.options.labels) == null ? void 0 : _a25.facetClearAllButton) != null ? _b25 : "";
34967
+ });
34968
+ const handleClick = () => {
34969
+ emit2("clear");
34970
+ };
34971
+ return (_ctx, _cache) => {
34972
+ return label.value ? (openBlock(), createElementBlock("button", {
34973
+ key: 0,
34974
+ class: "lupa-facets-button-clear",
34975
+ onClick: withModifiers(handleClick, ["stop"])
34976
+ }, toDisplayString(label.value), 1)) : createCommentVNode("", true);
34977
+ };
34978
+ }
34979
+ });
34980
+ const _hoisted_1$M = { class: "lupa-facets-filter-button-wrapper" };
34981
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
34738
34982
  __name: "Facets",
34739
34983
  props: {
34740
34984
  options: {},
@@ -34747,6 +34991,7 @@ and ensure you are accounting for this risk.
34747
34991
  const paramStore = useParamsStore();
34748
34992
  const searchResultStore = useSearchResultStore();
34749
34993
  const optionsStore = useOptionsStore();
34994
+ const { handleFilterSidebarToggle } = useSidebarToggle();
34750
34995
  const { filters } = storeToRefs(paramStore);
34751
34996
  const { facets: facets2, loadingFacets } = storeToRefs(searchResultStore);
34752
34997
  const { searchResultOptions } = storeToRefs(optionsStore);
@@ -34774,7 +35019,7 @@ and ensure you are accounting for this risk.
34774
35019
  };
34775
35020
  });
34776
35021
  const showFilterButton = computed(() => {
34777
- return props.options.filterBehavior === "withFilterButton";
35022
+ return props.options.filterBehavior === "withFilterButton" && props.facetStyle === "sidebar";
34778
35023
  });
34779
35024
  const handleFacetSelect = (facetAction) => {
34780
35025
  switch (facetAction.type) {
@@ -34795,16 +35040,25 @@ and ensure you are accounting for this risk.
34795
35040
  filters.value
34796
35041
  );
34797
35042
  break;
34798
- case "hierarchy":
34799
- toggleHierarchyFilter(
35043
+ case "partialRange":
35044
+ toggleRangeFilter(
34800
35045
  paramStore.appendParams,
35046
+ paramStore.removeParameters,
34801
35047
  facetAction,
34802
35048
  optionsStore.getQueryParamName,
34803
35049
  filters.value
34804
35050
  );
34805
35051
  break;
34806
- }
34807
- if (scrollToResultsOptions.value.enabled) {
35052
+ case "hierarchy":
35053
+ toggleHierarchyFilter(
35054
+ paramStore.appendParams,
35055
+ facetAction,
35056
+ optionsStore.getQueryParamName,
35057
+ filters.value
35058
+ );
35059
+ break;
35060
+ }
35061
+ if (scrollToResultsOptions.value.enabled) {
34808
35062
  scrollToSearchResults(
34809
35063
  scrollToResultsOptions.value.timeout,
34810
35064
  scrollToResultsOptions.value.container
@@ -34812,8 +35066,18 @@ and ensure you are accounting for this risk.
34812
35066
  }
34813
35067
  };
34814
35068
  const clear = (facet) => {
34815
- const param = getFacetKey(facet.key, facet.type);
34816
- paramStore.removeParameters({ paramsToRemove: [param] });
35069
+ if (facet.type === "range") {
35070
+ paramStore.removeParameters({
35071
+ paramsToRemove: [getFacetKey(facet.key, "range"), getFacetKey(facet.key, "partialRange")]
35072
+ });
35073
+ } else {
35074
+ const param = getFacetKey(facet.key, facet.type);
35075
+ paramStore.removeParameters({ paramsToRemove: [param] });
35076
+ }
35077
+ };
35078
+ const clearAll = () => {
35079
+ paramStore.removeAllFilters();
35080
+ handleFilterSidebarToggle();
34817
35081
  };
34818
35082
  const filter = () => {
34819
35083
  emit2("filter");
@@ -34822,7 +35086,7 @@ and ensure you are accounting for this risk.
34822
35086
  return openBlock(), createElementBlock("div", {
34823
35087
  class: normalizeClass(["lupa-search-result-facets", { "lupa-search-result-facets-loading": unref(loadingFacets) }])
34824
35088
  }, [
34825
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$S, {
35089
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$W, {
34826
35090
  key: 0,
34827
35091
  options: _ctx.options,
34828
35092
  facets: regularFacets.value,
@@ -34832,10 +35096,15 @@ and ensure you are accounting for this risk.
34832
35096
  onSelect: handleFacetSelect,
34833
35097
  onClear: clear
34834
35098
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
34835
- createBaseVNode("div", _hoisted_1$K, [
34836
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$R, {
35099
+ createBaseVNode("div", _hoisted_1$M, [
35100
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$U, {
34837
35101
  key: 0,
34838
35102
  options: _ctx.options,
35103
+ onClear: clearAll
35104
+ }, null, 8, ["options"])) : createCommentVNode("", true),
35105
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$V, {
35106
+ key: 1,
35107
+ options: _ctx.options,
34839
35108
  onFilter: filter
34840
35109
  }, null, 8, ["options"])) : createCommentVNode("", true)
34841
35110
  ])
@@ -34843,16 +35112,17 @@ and ensure you are accounting for this risk.
34843
35112
  };
34844
35113
  }
34845
35114
  });
34846
- const _hoisted_1$J = {
35115
+ const _hoisted_1$L = {
34847
35116
  key: 0,
34848
35117
  id: "lupa-search-result-filters",
34849
35118
  class: "lupa-search-result-filters"
34850
35119
  };
34851
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
35120
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
34852
35121
  __name: "SearchResultsFilters",
34853
35122
  props: {
34854
35123
  options: {},
34855
- expandable: { type: Boolean }
35124
+ expandable: { type: Boolean },
35125
+ style: {}
34856
35126
  },
34857
35127
  emits: ["filter"],
34858
35128
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -34886,40 +35156,37 @@ and ensure you are accounting for this risk.
34886
35156
  __expose({ fetch: fetch2 });
34887
35157
  return (_ctx, _cache) => {
34888
35158
  var _a25;
34889
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
34890
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$_, {
35159
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
35160
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$14, {
34891
35161
  key: 0,
34892
35162
  options: _ctx.options.currentFilters,
34893
35163
  expandable: (_a25 = _ctx.expandable) != null ? _a25 : false
34894
35164
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
34895
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$Y, {
35165
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$12, {
34896
35166
  key: 1,
34897
35167
  options: _ctx.options.categories,
34898
35168
  ref_key: "categoryFilters",
34899
35169
  ref: categoryFilters
34900
35170
  }, null, 8, ["options"])) : createCommentVNode("", true),
34901
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
35171
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
34902
35172
  key: 2,
34903
35173
  options: _ctx.options.facets,
35174
+ "facet-style": _ctx.style,
34904
35175
  onFilter: filter
34905
- }, null, 8, ["options"])) : createCommentVNode("", true)
35176
+ }, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
34906
35177
  ])) : createCommentVNode("", true);
34907
35178
  };
34908
35179
  }
34909
35180
  });
34910
- const _hoisted_1$I = {
34911
- key: 0,
34912
- class: "lupa-mobile-filter-sidebar"
34913
- };
34914
- const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
34915
- const _hoisted_3$o = { class: "lupa-sidebar-top" };
34916
- const _hoisted_4$g = { class: "lupa-sidebar-title" };
34917
- const _hoisted_5$b = {
35181
+ const _hoisted_1$K = { class: "lupa-mobile-sidebar-content" };
35182
+ const _hoisted_2$y = { class: "lupa-sidebar-top" };
35183
+ const _hoisted_3$q = { class: "lupa-sidebar-title" };
35184
+ const _hoisted_4$i = {
34918
35185
  key: 0,
34919
35186
  class: "lupa-sidebar-filter-count"
34920
35187
  };
34921
- const _hoisted_6$5 = { class: "lupa-sidebar-filter-options" };
34922
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
35188
+ const _hoisted_5$c = { class: "lupa-sidebar-filter-options" };
35189
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
34923
35190
  __name: "MobileFilterSidebar",
34924
35191
  props: {
34925
35192
  options: {}
@@ -34928,7 +35195,7 @@ and ensure you are accounting for this risk.
34928
35195
  setup(__props, { emit: __emit }) {
34929
35196
  const props = __props;
34930
35197
  const searchResultStore = useSearchResultStore();
34931
- const { currentFilterCount } = storeToRefs(searchResultStore);
35198
+ const { currentFilterCount, isFilterSidebarVisible, isSidebarClosing } = storeToRefs(searchResultStore);
34932
35199
  const emit2 = __emit;
34933
35200
  const sidebarTitle = computed(() => {
34934
35201
  var _a25, _b25, _c;
@@ -34938,7 +35205,6 @@ and ensure you are accounting for this risk.
34938
35205
  var _a25, _b25;
34939
35206
  return Boolean((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.showFilterCount) && currentFilterCount.value > 0;
34940
35207
  });
34941
- const isMobileSidebarVisible = computed(() => searchResultStore.isMobileSidebarVisible);
34942
35208
  const isActiveFiltersExpanded = computed(() => {
34943
35209
  var _a25, _b25;
34944
35210
  return !((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.activeFiltersExpanded);
@@ -34951,42 +35217,46 @@ and ensure you are accounting for this risk.
34951
35217
  handleMobileToggle();
34952
35218
  };
34953
35219
  return (_ctx, _cache) => {
34954
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
35220
+ return unref(isFilterSidebarVisible) ? (openBlock(), createElementBlock("div", {
35221
+ key: 0,
35222
+ class: normalizeClass(["lupa-mobile-filter-sidebar", { "lupa-mobile-filter-sidebar-is-closing": unref(isSidebarClosing) }])
35223
+ }, [
34955
35224
  createBaseVNode("div", {
34956
35225
  class: "lupa-sidebar-close",
34957
35226
  onClick: withModifiers(handleMobileToggle, ["stop"])
34958
35227
  }),
34959
- createBaseVNode("div", _hoisted_2$w, [
34960
- createBaseVNode("div", _hoisted_3$o, [
34961
- createBaseVNode("div", _hoisted_4$g, [
35228
+ createBaseVNode("div", _hoisted_1$K, [
35229
+ createBaseVNode("div", _hoisted_2$y, [
35230
+ createBaseVNode("div", _hoisted_3$q, [
34962
35231
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
34963
- isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35232
+ isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34964
35233
  ]),
34965
35234
  createBaseVNode("div", {
34966
35235
  class: "lupa-filter-toggle-mobile",
34967
35236
  onClick: handleMobileToggle
34968
35237
  })
34969
35238
  ]),
34970
- createBaseVNode("div", _hoisted_6$5, [
34971
- createVNode(_sfc_main$P, {
35239
+ createBaseVNode("div", _hoisted_5$c, [
35240
+ createVNode(_sfc_main$S, {
34972
35241
  options: _ctx.options,
34973
35242
  expandable: isActiveFiltersExpanded.value,
35243
+ style: "sidebar",
34974
35244
  onFilter: filter
34975
35245
  }, null, 8, ["options", "expandable"])
34976
35246
  ])
34977
35247
  ])
34978
- ])) : createCommentVNode("", true);
35248
+ ], 2)) : createCommentVNode("", true);
34979
35249
  };
34980
35250
  }
34981
35251
  });
34982
- const _hoisted_1$H = { id: "lupa-search-results-breadcrumbs" };
34983
- const _hoisted_2$v = ["href", "onClick"];
34984
- const _hoisted_3$n = {
35252
+ const _hoisted_1$J = { id: "lupa-search-results-breadcrumbs" };
35253
+ const _hoisted_2$x = ["href", "onClick"];
35254
+ const _hoisted_3$p = {
34985
35255
  key: 1,
34986
35256
  class: "lupa-search-results-breadcrumb-text"
34987
35257
  };
34988
- const _hoisted_4$f = { key: 2 };
34989
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
35258
+ const _hoisted_4$h = { key: 2 };
35259
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34990
35260
  __name: "SearchResultsBreadcrumbs",
34991
35261
  props: {
34992
35262
  breadcrumbs: {}
@@ -35011,7 +35281,7 @@ and ensure you are accounting for this risk.
35011
35281
  handleRoutingEvent(link, event, hasEventRouting.value);
35012
35282
  };
35013
35283
  return (_ctx, _cache) => {
35014
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
35284
+ return openBlock(), createElementBlock("div", _hoisted_1$J, [
35015
35285
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
35016
35286
  var _a25;
35017
35287
  return openBlock(), createElementBlock("span", {
@@ -35026,20 +35296,20 @@ and ensure you are accounting for this risk.
35026
35296
  var _a26;
35027
35297
  return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
35028
35298
  }
35029
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
35030
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35299
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$x)) : (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(getLabel(breadcrumb.label)), 1)),
35300
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$h, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35031
35301
  ]);
35032
35302
  }), 128))
35033
35303
  ]);
35034
35304
  };
35035
35305
  }
35036
35306
  });
35037
- const _hoisted_1$G = {
35307
+ const _hoisted_1$I = {
35038
35308
  key: 0,
35039
35309
  id: "lupa-search-result-filters",
35040
35310
  class: "lupa-search-result-filters lupa-search-result-top-filters"
35041
35311
  };
35042
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
35312
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
35043
35313
  __name: "FiltersTopDropdown",
35044
35314
  props: {
35045
35315
  options: {}
@@ -35057,8 +35327,8 @@ and ensure you are accounting for this risk.
35057
35327
  });
35058
35328
  return (_ctx, _cache) => {
35059
35329
  var _a25;
35060
- return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$G, [
35061
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$Q, {
35330
+ return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
35331
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
35062
35332
  key: 0,
35063
35333
  options: _ctx.options.facets,
35064
35334
  "facet-style": (_a25 = _ctx.options.facets.style) == null ? void 0 : _a25.type,
@@ -35069,8 +35339,8 @@ and ensure you are accounting for this risk.
35069
35339
  };
35070
35340
  }
35071
35341
  });
35072
- const _hoisted_1$F = { id: "lupa-search-results-layout-selection" };
35073
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
35342
+ const _hoisted_1$H = { id: "lupa-search-results-layout-selection" };
35343
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
35074
35344
  __name: "SearchResultsLayoutSelection",
35075
35345
  setup(__props) {
35076
35346
  const searchResultStore = useSearchResultStore();
@@ -35081,7 +35351,7 @@ and ensure you are accounting for this risk.
35081
35351
  searchResultStore.setLayout(layout2);
35082
35352
  };
35083
35353
  return (_ctx, _cache) => {
35084
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
35354
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
35085
35355
  createBaseVNode("div", {
35086
35356
  class: normalizeClass([
35087
35357
  "lupa-layout-selection-grid",
@@ -35103,64 +35373,38 @@ and ensure you are accounting for this risk.
35103
35373
  };
35104
35374
  }
35105
35375
  });
35106
- const _hoisted_1$E = {
35376
+ const _hoisted_1$G = {
35107
35377
  key: 0,
35108
35378
  class: "lupa-mobile-toggle-filter-count"
35109
35379
  };
35110
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
35380
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
35111
35381
  __name: "SearchResultsMobileToggle",
35112
- props: {
35113
- labels: {},
35114
- showFilterCount: { type: Boolean }
35115
- },
35116
35382
  setup(__props) {
35117
- const props = __props;
35118
- const searchResultStore = useSearchResultStore();
35119
- const optionsStore = useOptionsStore();
35120
- const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
35121
- const { searchResultOptions } = storeToRefs(optionsStore);
35122
- const disableMobileBodyScrollLock = computed(
35123
- () => {
35124
- var _a25, _b25, _c;
35125
- return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
35126
- }
35127
- );
35128
- const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
35129
- const defaultLabel = computed(() => props.labels.mobileFilterButton);
35130
- const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
35131
- const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
35132
- const label = computed(() => {
35133
- if (isSidebarVisible.value && openLabel.value) {
35134
- return openLabel.value;
35135
- }
35136
- if (hasActiveFilters.value && activeLabel.value) {
35137
- return activeLabel.value;
35138
- }
35139
- return defaultLabel.value;
35140
- });
35141
- const handleMobileToggle = () => {
35142
- searchResultStore.setSidebarState({
35143
- visible: !isSidebarVisible.value,
35144
- disableBodyScrolling: !disableMobileBodyScrollLock.value
35145
- });
35146
- };
35147
- const hasActiveFilters = computed(() => currentFilterCount.value > 0);
35383
+ const {
35384
+ isSidebarVisible,
35385
+ label,
35386
+ currentFilterCount,
35387
+ hasActiveFilters,
35388
+ showMobileFilterCount,
35389
+ handleFilterSidebarToggle
35390
+ } = useSidebarToggle();
35148
35391
  return (_ctx, _cache) => {
35149
35392
  return openBlock(), createElementBlock("div", {
35150
35393
  class: normalizeClass(["lupa-mobile-toggle", {
35151
35394
  "lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
35152
- "lupa-mobile-toggle-has-filters": hasActiveFilters.value,
35153
- "lupa-sidebar-open": isSidebarVisible.value
35395
+ "lupa-mobile-toggle-has-filters": unref(hasActiveFilters),
35396
+ "lupa-sidebar-open": unref(isSidebarVisible)
35154
35397
  }]),
35155
- onClick: handleMobileToggle
35398
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
35399
+ (...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
35156
35400
  }, [
35157
- createTextVNode(toDisplayString(label.value) + " ", 1),
35158
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$E, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35401
+ createTextVNode(toDisplayString(unref(label)) + " ", 1),
35402
+ unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$G, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
35159
35403
  ], 2);
35160
35404
  };
35161
35405
  }
35162
35406
  });
35163
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
35407
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
35164
35408
  __name: "SearchResultsMobileFilterClose",
35165
35409
  props: {
35166
35410
  label: {}
@@ -35180,20 +35424,20 @@ and ensure you are accounting for this risk.
35180
35424
  };
35181
35425
  }
35182
35426
  });
35183
- const _hoisted_1$D = {
35427
+ const _hoisted_1$F = {
35184
35428
  key: 0,
35185
35429
  id: "lupa-search-results-page-select",
35186
35430
  "data-cy": "lupa-search-results-page-select"
35187
35431
  };
35188
- const _hoisted_2$u = {
35432
+ const _hoisted_2$w = {
35189
35433
  key: 0,
35190
35434
  class: "lupa-page-number-separator"
35191
35435
  };
35192
- const _hoisted_3$m = {
35436
+ const _hoisted_3$o = {
35193
35437
  key: 0,
35194
35438
  class: "lupa-page-number-separator"
35195
35439
  };
35196
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
35440
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
35197
35441
  __name: "SearchResultsPageSelect",
35198
35442
  props: {
35199
35443
  lastPageLabel: {},
@@ -35288,7 +35532,7 @@ and ensure you are accounting for this risk.
35288
35532
  };
35289
35533
  return (_ctx, _cache) => {
35290
35534
  var _a25;
35291
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35535
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
35292
35536
  showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35293
35537
  key: 0,
35294
35538
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -35312,7 +35556,7 @@ and ensure you are accounting for this risk.
35312
35556
  _: 1,
35313
35557
  __: [4]
35314
35558
  }, 8, ["href"])),
35315
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
35559
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, "...")) : createCommentVNode("", true)
35316
35560
  ], 64)) : createCommentVNode("", true),
35317
35561
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
35318
35562
  return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
@@ -35332,7 +35576,7 @@ and ensure you are accounting for this risk.
35332
35576
  }, 1032, ["href", "onClick", "class"]);
35333
35577
  }), 128)),
35334
35578
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
35335
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
35579
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$o, "...")) : createCommentVNode("", true),
35336
35580
  (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35337
35581
  href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
35338
35582
  class: "lupa-page-number lupa-page-number-last",
@@ -35363,18 +35607,18 @@ and ensure you are accounting for this risk.
35363
35607
  };
35364
35608
  }
35365
35609
  });
35366
- const _hoisted_1$C = {
35610
+ const _hoisted_1$E = {
35367
35611
  id: "lupa-search-results-page-size",
35368
35612
  "data-cy": "lupa-search-results-page-size"
35369
35613
  };
35370
- const _hoisted_2$t = { id: "lupa-select" };
35371
- const _hoisted_3$l = {
35614
+ const _hoisted_2$v = { id: "lupa-select" };
35615
+ const _hoisted_3$n = {
35372
35616
  class: "lupa-select-label",
35373
35617
  for: "lupa-page-size-select-dropdown"
35374
35618
  };
35375
- const _hoisted_4$e = ["aria-label"];
35376
- const _hoisted_5$a = ["value"];
35377
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
35619
+ const _hoisted_4$g = ["aria-label"];
35620
+ const _hoisted_5$b = ["value"];
35621
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
35378
35622
  __name: "SearchResultsPageSize",
35379
35623
  props: {
35380
35624
  labels: {},
@@ -35404,9 +35648,9 @@ and ensure you are accounting for this risk.
35404
35648
  };
35405
35649
  return (_ctx, _cache) => {
35406
35650
  var _a25, _b25, _c;
35407
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
35408
- createBaseVNode("div", _hoisted_2$t, [
35409
- createBaseVNode("label", _hoisted_3$l, toDisplayString(label.value), 1),
35651
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
35652
+ createBaseVNode("div", _hoisted_2$v, [
35653
+ createBaseVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
35410
35654
  createBaseVNode("select", {
35411
35655
  id: "lupa-page-size-select-dropdown",
35412
35656
  class: "lupa-select-dropdown",
@@ -35420,110 +35664,161 @@ and ensure you are accounting for this risk.
35420
35664
  return openBlock(), createElementBlock("option", {
35421
35665
  key: option,
35422
35666
  value: option
35423
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
35667
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$b);
35424
35668
  }), 128))
35425
- ], 40, _hoisted_4$e)
35669
+ ], 40, _hoisted_4$g)
35426
35670
  ])
35427
35671
  ]);
35428
35672
  };
35429
35673
  }
35430
35674
  });
35431
- const _hoisted_1$B = {
35675
+ const useSorting = () => {
35676
+ const paramStore = useParamsStore();
35677
+ const optionStore = useOptionsStore();
35678
+ const { sort } = storeToRefs(paramStore);
35679
+ const { ariaLabels, searchResultOptions } = storeToRefs(optionStore);
35680
+ const selectedKey = ref("");
35681
+ const previousKey = ref("");
35682
+ const sortStyle = computed(() => {
35683
+ return searchResultOptions.value.sortStyle;
35684
+ });
35685
+ const sortOptions = computed(() => {
35686
+ return searchResultOptions.value.sort;
35687
+ });
35688
+ const callbacks = computed(() => {
35689
+ return searchResultOptions.value.callbacks;
35690
+ });
35691
+ const sotyByTitleLabel = computed(() => {
35692
+ var _a25;
35693
+ return (_a25 = searchResultOptions.value.labels) == null ? void 0 : _a25.sortBy;
35694
+ });
35695
+ const sortItems = computed(() => {
35696
+ if (sortOptions.value && sortOptions.value.length) {
35697
+ return sortOptions.value;
35698
+ } else {
35699
+ return [];
35700
+ }
35701
+ });
35702
+ const defaultSortValue = computed(() => {
35703
+ var _a25, _b25, _c;
35704
+ return (_c = (_a25 = sortOptions.value) == null ? void 0 : _a25.find((x) => x.default)) != null ? _c : (_b25 = sortItems.value) == null ? void 0 : _b25[0];
35705
+ });
35706
+ const setSortValue = () => {
35707
+ var _a25, _b25;
35708
+ const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
35709
+ selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
35710
+ previousKey.value = selectedKey.value;
35711
+ };
35712
+ watch(sort, () => setSortValue());
35713
+ const handleSelect = () => {
35714
+ var _a25, _b25, _c;
35715
+ const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
35716
+ if (!value) {
35717
+ return;
35718
+ }
35719
+ paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
35720
+ (_c = (_b25 = callbacks.value) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
35721
+ paramStore.appendParams({
35722
+ params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
35723
+ paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
35724
+ });
35725
+ previousKey.value = selectedKey.value;
35726
+ };
35727
+ return {
35728
+ sotyByTitleLabel,
35729
+ sortItems,
35730
+ selectedKey,
35731
+ ariaLabels,
35732
+ sortOptions,
35733
+ sortStyle,
35734
+ handleSelect,
35735
+ setSortValue
35736
+ };
35737
+ };
35738
+ const _hoisted_1$D = {
35739
+ key: 0,
35432
35740
  id: "lupa-search-results-sort",
35433
35741
  class: "lupa-search-results-sort"
35434
35742
  };
35435
- const _hoisted_2$s = { id: "lupa-select" };
35436
- const _hoisted_3$k = {
35743
+ const _hoisted_2$u = { id: "lupa-select" };
35744
+ const _hoisted_3$m = {
35437
35745
  class: "lupa-select-label",
35438
35746
  for: "lupa-sort-select-dropdown"
35439
35747
  };
35440
- const _hoisted_4$d = ["aria-label"];
35441
- const _hoisted_5$9 = ["value"];
35442
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
35748
+ const _hoisted_4$f = ["aria-label"];
35749
+ const _hoisted_5$a = ["value"];
35750
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
35443
35751
  __name: "SearchResultsSort",
35444
- props: {
35445
- options: {},
35446
- callbacks: {}
35447
- },
35448
35752
  setup(__props) {
35449
- const props = __props;
35450
- const paramStore = useParamsStore();
35451
- const optionStore = useOptionsStore();
35452
- const { sort } = storeToRefs(paramStore);
35453
- const { ariaLabels } = storeToRefs(optionStore);
35454
- const selectedKey = ref("");
35455
- const previousKey = ref("");
35456
- const sortItems = computed(() => {
35457
- if (props.options.options && props.options.options.length) {
35458
- return props.options.options;
35459
- } else {
35460
- return [];
35461
- }
35462
- });
35463
- const defaultSortValue = computed(() => {
35464
- var _a25;
35465
- return (_a25 = props.options.options.find((x) => x.default)) != null ? _a25 : props.options.options[0];
35466
- });
35467
- const setSortValue = () => {
35468
- var _a25, _b25;
35469
- const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
35470
- selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
35471
- previousKey.value = selectedKey.value;
35472
- };
35473
- watch(sort, () => setSortValue());
35753
+ const {
35754
+ sortItems,
35755
+ selectedKey,
35756
+ ariaLabels,
35757
+ sotyByTitleLabel,
35758
+ sortStyle,
35759
+ handleSelect,
35760
+ setSortValue
35761
+ } = useSorting();
35474
35762
  onMounted(() => {
35475
35763
  setSortValue();
35476
35764
  });
35477
- const handleSelect = () => {
35478
- var _a25, _b25, _c;
35479
- const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
35480
- if (!value) {
35481
- return;
35482
- }
35483
- paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
35484
- (_c = (_b25 = props.callbacks) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
35485
- paramStore.appendParams({
35486
- params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
35487
- paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
35488
- });
35489
- previousKey.value = selectedKey.value;
35490
- };
35765
+ const showDefaultSort = computed(() => {
35766
+ var _a25;
35767
+ return !sortStyle.value || ((_a25 = sortStyle.value) == null ? void 0 : _a25.type) !== "drawer";
35768
+ });
35491
35769
  return (_ctx, _cache) => {
35492
35770
  var _a25, _b25;
35493
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
35494
- createBaseVNode("div", _hoisted_2$s, [
35495
- createBaseVNode("label", _hoisted_3$k, toDisplayString(_ctx.options.label), 1),
35771
+ return showDefaultSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35772
+ createBaseVNode("div", _hoisted_2$u, [
35773
+ createBaseVNode("label", _hoisted_3$m, toDisplayString(unref(sotyByTitleLabel)), 1),
35496
35774
  withDirectives(createBaseVNode("select", {
35497
35775
  id: "lupa-sort-select-dropdown",
35498
35776
  class: "lupa-select-dropdown",
35499
- "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : _ctx.options.label,
35777
+ "aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : unref(sotyByTitleLabel),
35500
35778
  "data-cy": "lupa-sort-select-dropdown",
35501
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
35502
- onChange: handleSelect,
35779
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectedKey) ? selectedKey.value = $event : null),
35780
+ onChange: _cache[1] || (_cache[1] = //@ts-ignore
35781
+ (...args) => unref(handleSelect) && unref(handleSelect)(...args)),
35503
35782
  ref: "select"
35504
35783
  }, [
35505
- (openBlock(true), createElementBlock(Fragment, null, renderList(sortItems.value, (option) => {
35784
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
35506
35785
  return openBlock(), createElementBlock("option", {
35507
35786
  key: option.key,
35508
35787
  value: option.key
35509
- }, toDisplayString(option.label), 9, _hoisted_5$9);
35788
+ }, toDisplayString(option.label), 9, _hoisted_5$a);
35510
35789
  }), 128))
35511
- ], 40, _hoisted_4$d), [
35512
- [vModelSelect, selectedKey.value]
35790
+ ], 40, _hoisted_4$f), [
35791
+ [vModelSelect, unref(selectedKey)]
35513
35792
  ])
35514
35793
  ])
35515
- ]);
35794
+ ])) : createCommentVNode("", true);
35795
+ };
35796
+ }
35797
+ });
35798
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35799
+ __name: "SearchResultsSortDrawerToggle",
35800
+ setup(__props) {
35801
+ const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
35802
+ return (_ctx, _cache) => {
35803
+ return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
35804
+ key: 0,
35805
+ class: normalizeClass(["lupa-mobile-toggle lupa-mobile-sort-toggle", {
35806
+ "lupa-sidebar-open": unref(isSidebarVisible)
35807
+ }]),
35808
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
35809
+ (...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
35810
+ }, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
35516
35811
  };
35517
35812
  }
35518
35813
  });
35519
- const _hoisted_1$A = { class: "lupa-toolbar-left" };
35520
- const _hoisted_2$r = {
35814
+ const _hoisted_1$C = { class: "lupa-toolbar-left" };
35815
+ const _hoisted_2$t = {
35521
35816
  key: 0,
35522
35817
  class: "lupa-toolbar-right-title"
35523
35818
  };
35524
- const _hoisted_3$j = { key: 2 };
35525
- const _hoisted_4$c = { key: 4 };
35526
- const _hoisted_5$8 = { key: 6 };
35819
+ const _hoisted_3$l = { key: 2 };
35820
+ const _hoisted_4$e = { key: 4 };
35821
+ const _hoisted_5$9 = { key: 6 };
35527
35822
  const _hoisted_6$4 = { class: "lupa-toolbar-right" };
35528
35823
  const _hoisted_7$2 = {
35529
35824
  key: 0,
@@ -35531,7 +35826,7 @@ and ensure you are accounting for this risk.
35531
35826
  };
35532
35827
  const _hoisted_8 = { key: 2 };
35533
35828
  const _hoisted_9 = { key: 4 };
35534
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
35829
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
35535
35830
  __name: "SearchResultsToolbar",
35536
35831
  props: {
35537
35832
  options: {},
@@ -35547,7 +35842,7 @@ and ensure you are accounting for this risk.
35547
35842
  const searchResultStore = useSearchResultStore();
35548
35843
  const optionsStore = useOptionsStore();
35549
35844
  const { page, limit } = storeToRefs(paramStore);
35550
- const { hasAnyFilter, searchResult, isMobileSidebarVisible } = storeToRefs(searchResultStore);
35845
+ const { hasAnyFilter, searchResult, isFilterSidebarVisible } = storeToRefs(searchResultStore);
35551
35846
  const { currentResolutionPageSizes } = storeToRefs(optionsStore);
35552
35847
  const isBottomLocation = computed(() => {
35553
35848
  return props.paginationLocation === "bottom";
@@ -35625,7 +35920,7 @@ and ensure you are accounting for this risk.
35625
35920
  var _a25;
35626
35921
  return (_a25 = optionsValue.value.labels.toolbarRightLabel) != null ? _a25 : "";
35627
35922
  });
35628
- const showMobileFilterCount = computed(() => {
35923
+ computed(() => {
35629
35924
  var _a25, _b25, _c;
35630
35925
  return Boolean((_c = (_b25 = (_a25 = optionsValue.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount);
35631
35926
  });
@@ -35644,39 +35939,37 @@ and ensure you are accounting for this risk.
35644
35939
  id: "lupa-search-results-toolbar",
35645
35940
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
35646
35941
  }, [
35647
- createBaseVNode("div", _hoisted_1$A, [
35648
- toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
35649
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$L, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$j)),
35650
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$11, {
35942
+ createBaseVNode("div", _hoisted_1$C, [
35943
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
35944
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$O, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$l)),
35945
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$17, {
35651
35946
  key: 3,
35652
35947
  label: searchSummaryLabel.value,
35653
35948
  clearable: unref(hasAnyFilter) && showFilterClear.value,
35654
35949
  onClear: handleClearAll
35655
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
35656
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
35950
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$e)),
35951
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$L, {
35657
35952
  key: 5,
35658
35953
  options: paginationOptions.value.pageSelect,
35659
35954
  "last-page-label": paginationOptions.value.labels.showMore,
35660
35955
  "first-page-label": paginationOptions.value.labels.showLess
35661
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
35956
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$9))
35662
35957
  ]),
35663
35958
  createBaseVNode("div", _hoisted_6$4, [
35664
35959
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
35665
- createVNode(_sfc_main$K, {
35666
- labels: optionsValue.value.labels,
35667
- "show-filter-count": showMobileFilterCount.value
35668
- }, null, 8, ["labels", "show-filter-count"]),
35669
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$H, {
35960
+ createVNode(_sfc_main$N),
35961
+ createVNode(_sfc_main$I),
35962
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$K, {
35670
35963
  key: 1,
35671
35964
  options: paginationOptions.value.pageSize,
35672
35965
  labels: paginationOptions.value.labels
35673
35966
  }, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
35674
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$G, {
35967
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$J, {
35675
35968
  key: 3,
35676
35969
  options: sortOptions.value,
35677
35970
  callbacks: callbacks.value
35678
35971
  }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9)),
35679
- showFiltersCloseButton.value && unref(isMobileSidebarVisible) ? (openBlock(), createBlock(_sfc_main$J, {
35972
+ showFiltersCloseButton.value && unref(isFilterSidebarVisible) ? (openBlock(), createBlock(_sfc_main$M, {
35680
35973
  key: 5,
35681
35974
  label: optionsValue.value.labels.mobileFilterCloseButton
35682
35975
  }, null, 8, ["label"])) : createCommentVNode("", true)
@@ -35685,7 +35978,7 @@ and ensure you are accounting for this risk.
35685
35978
  };
35686
35979
  }
35687
35980
  });
35688
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
35981
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
35689
35982
  __name: "SearchResultsProductImage",
35690
35983
  props: {
35691
35984
  item: {},
@@ -35693,7 +35986,7 @@ and ensure you are accounting for this risk.
35693
35986
  },
35694
35987
  setup(__props) {
35695
35988
  return (_ctx, _cache) => {
35696
- return openBlock(), createBlock(_sfc_main$1q, {
35989
+ return openBlock(), createBlock(_sfc_main$1w, {
35697
35990
  item: _ctx.item,
35698
35991
  options: _ctx.options,
35699
35992
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -35702,16 +35995,16 @@ and ensure you are accounting for this risk.
35702
35995
  };
35703
35996
  }
35704
35997
  });
35705
- const _hoisted_1$z = ["title", "innerHTML"];
35706
- const _hoisted_2$q = ["title"];
35707
- const _hoisted_3$i = ["href", "innerHTML"];
35708
- const _hoisted_4$b = ["title"];
35709
- const _hoisted_5$7 = {
35998
+ const _hoisted_1$B = ["title", "innerHTML"];
35999
+ const _hoisted_2$s = ["title"];
36000
+ const _hoisted_3$k = ["href", "innerHTML"];
36001
+ const _hoisted_4$d = ["title"];
36002
+ const _hoisted_5$8 = {
35710
36003
  key: 0,
35711
36004
  class: "lupa-search-results-product-title-text"
35712
36005
  };
35713
36006
  const _hoisted_6$3 = ["href"];
35714
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
36007
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35715
36008
  __name: "SearchResultsProductTitle",
35716
36009
  props: {
35717
36010
  item: {},
@@ -35748,7 +36041,7 @@ and ensure you are accounting for this risk.
35748
36041
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35749
36042
  title: sanitizedTitle.value,
35750
36043
  innerHTML: sanitizedTitle.value
35751
- }, null, 12, _hoisted_1$z)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
36044
+ }, null, 12, _hoisted_1$B)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
35752
36045
  key: 1,
35753
36046
  class: "lupa-search-results-product-title",
35754
36047
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
@@ -35759,26 +36052,26 @@ and ensure you are accounting for this risk.
35759
36052
  class: "lupa-search-results-product-title-text lupa-title-link",
35760
36053
  innerHTML: sanitizedTitle.value,
35761
36054
  onClick: handleNavigation
35762
- }, null, 8, _hoisted_3$i)
35763
- ], 12, _hoisted_2$q)) : (openBlock(), createElementBlock("div", {
36055
+ }, null, 8, _hoisted_3$k)
36056
+ ], 12, _hoisted_2$s)) : (openBlock(), createElementBlock("div", {
35764
36057
  key: 2,
35765
36058
  class: "lupa-search-results-product-title",
35766
36059
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35767
36060
  title: title.value
35768
36061
  }, [
35769
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
36062
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(title.value), 1)) : createCommentVNode("", true),
35770
36063
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
35771
36064
  key: 1,
35772
36065
  href: _ctx.link,
35773
36066
  class: "lupa-search-results-product-title-text lupa-title-link",
35774
36067
  onClick: handleNavigation
35775
36068
  }, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
35776
- ], 12, _hoisted_4$b));
36069
+ ], 12, _hoisted_4$d));
35777
36070
  };
35778
36071
  }
35779
36072
  });
35780
- const _hoisted_1$y = ["innerHTML"];
35781
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
36073
+ const _hoisted_1$A = ["innerHTML"];
36074
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
35782
36075
  __name: "SearchResultsProductDescription",
35783
36076
  props: {
35784
36077
  item: {},
@@ -35805,7 +36098,7 @@ and ensure you are accounting for this risk.
35805
36098
  class: "lupa-search-results-product-description",
35806
36099
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
35807
36100
  innerHTML: sanitizedDescription.value
35808
- }, null, 12, _hoisted_1$y)) : (openBlock(), createElementBlock("div", {
36101
+ }, null, 12, _hoisted_1$A)) : (openBlock(), createElementBlock("div", {
35809
36102
  key: 1,
35810
36103
  class: "lupa-search-results-product-description",
35811
36104
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -35813,15 +36106,15 @@ and ensure you are accounting for this risk.
35813
36106
  };
35814
36107
  }
35815
36108
  });
35816
- const _hoisted_1$x = { id: "lupa-search-results-rating" };
35817
- const _hoisted_2$p = { class: "lupa-ratings" };
35818
- const _hoisted_3$h = { class: "lupa-ratings-base" };
35819
- const _hoisted_4$a = ["innerHTML"];
35820
- const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
36109
+ const _hoisted_1$z = { id: "lupa-search-results-rating" };
36110
+ const _hoisted_2$r = { class: "lupa-ratings" };
36111
+ const _hoisted_3$j = { class: "lupa-ratings-base" };
36112
+ const _hoisted_4$c = ["innerHTML"];
36113
+ const _hoisted_5$7 = { class: "lupa-rating-wrapper" };
35821
36114
  const _hoisted_6$2 = ["innerHTML"];
35822
36115
  const _hoisted_7$1 = ["href"];
35823
36116
  const STAR_COUNT = 5;
35824
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
36117
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
35825
36118
  __name: "SearchResultsProductRating",
35826
36119
  props: {
35827
36120
  item: {},
@@ -35858,18 +36151,18 @@ and ensure you are accounting for this risk.
35858
36151
  return generateLink(props.options.links.ratingDetails, props.item);
35859
36152
  });
35860
36153
  return (_ctx, _cache) => {
35861
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
35862
- createBaseVNode("div", _hoisted_2$p, [
35863
- createBaseVNode("div", _hoisted_3$h, [
36154
+ return openBlock(), createElementBlock("div", _hoisted_1$z, [
36155
+ createBaseVNode("div", _hoisted_2$r, [
36156
+ createBaseVNode("div", _hoisted_3$j, [
35864
36157
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
35865
36158
  return openBlock(), createElementBlock("div", {
35866
36159
  key: index,
35867
36160
  innerHTML: star,
35868
36161
  class: "lupa-rating lupa-rating-not-highlighted"
35869
- }, null, 8, _hoisted_4$a);
36162
+ }, null, 8, _hoisted_4$c);
35870
36163
  }), 128))
35871
36164
  ]),
35872
- createBaseVNode("div", _hoisted_5$6, [
36165
+ createBaseVNode("div", _hoisted_5$7, [
35873
36166
  createBaseVNode("div", {
35874
36167
  class: "lupa-ratings-highlighted",
35875
36168
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -35892,11 +36185,11 @@ and ensure you are accounting for this risk.
35892
36185
  };
35893
36186
  }
35894
36187
  });
35895
- const _hoisted_1$w = {
36188
+ const _hoisted_1$y = {
35896
36189
  class: "lupa-search-results-product-regular-price",
35897
36190
  "data-cy": "lupa-search-results-product-regular-price"
35898
36191
  };
35899
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
36192
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
35900
36193
  __name: "SearchResultsProductRegularPrice",
35901
36194
  props: {
35902
36195
  item: {},
@@ -35918,11 +36211,11 @@ and ensure you are accounting for this risk.
35918
36211
  );
35919
36212
  });
35920
36213
  return (_ctx, _cache) => {
35921
- return openBlock(), createElementBlock("div", _hoisted_1$w, toDisplayString(price.value), 1);
36214
+ return openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(price.value), 1);
35922
36215
  };
35923
36216
  }
35924
36217
  });
35925
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
36218
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
35926
36219
  __name: "SearchResultsProductPrice",
35927
36220
  props: {
35928
36221
  item: {},
@@ -35956,12 +36249,12 @@ and ensure you are accounting for this risk.
35956
36249
  };
35957
36250
  }
35958
36251
  });
35959
- const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
35960
- const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
35961
- const _hoisted_3$g = ["disabled"];
35962
- const _hoisted_4$9 = ["href"];
35963
- const _hoisted_5$5 = ["id", "disabled"];
35964
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
36252
+ const _hoisted_1$x = { class: "lupa-search-results-add-to-cart-wrapper" };
36253
+ const _hoisted_2$q = { class: "lupa-search-results-product-addtocart" };
36254
+ const _hoisted_3$i = ["disabled"];
36255
+ const _hoisted_4$b = ["href"];
36256
+ const _hoisted_5$6 = ["id", "disabled"];
36257
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
35965
36258
  __name: "SearchResultsProductAddToCart",
35966
36259
  props: {
35967
36260
  item: {},
@@ -36020,16 +36313,16 @@ and ensure you are accounting for this risk.
36020
36313
  loading.value = false;
36021
36314
  });
36022
36315
  return (_ctx, _cache) => {
36023
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
36024
- createBaseVNode("div", _hoisted_2$o, [
36316
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
36317
+ createBaseVNode("div", _hoisted_2$q, [
36025
36318
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
36026
36319
  key: 0,
36027
36320
  class: addToCartButtonClass.value,
36028
36321
  "data-cy": "lupa-add-to-cart",
36029
36322
  disabled: !inStockValue.value || loading.value
36030
36323
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
36031
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
36032
- ], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
36324
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$b)
36325
+ ], 16, _hoisted_3$i)) : (openBlock(), createElementBlock("button", mergeProps({
36033
36326
  key: 1,
36034
36327
  id: id.value,
36035
36328
  class: addToCartButtonClass.value,
@@ -36037,18 +36330,18 @@ and ensure you are accounting for this risk.
36037
36330
  disabled: !inStockValue.value || loading.value
36038
36331
  }, _ctx.dynamicAttributes, {
36039
36332
  onClick: withModifiers(handleClick, ["stop"])
36040
- }), toDisplayString(label.value), 17, _hoisted_5$5))
36333
+ }), toDisplayString(label.value), 17, _hoisted_5$6))
36041
36334
  ])
36042
36335
  ]);
36043
36336
  };
36044
36337
  }
36045
36338
  });
36046
- const _hoisted_1$u = ["innerHTML"];
36047
- const _hoisted_2$n = { key: 0 };
36048
- const _hoisted_3$f = { key: 1 };
36049
- const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
36050
- const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
36051
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
36339
+ const _hoisted_1$w = ["innerHTML"];
36340
+ const _hoisted_2$p = { key: 0 };
36341
+ const _hoisted_3$h = { key: 1 };
36342
+ const _hoisted_4$a = { class: "lupa-search-box-custom-label" };
36343
+ const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
36344
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
36052
36345
  __name: "SearchResultsProductCustom",
36053
36346
  props: {
36054
36347
  item: {},
@@ -36090,20 +36383,20 @@ and ensure you are accounting for this risk.
36090
36383
  key: 0,
36091
36384
  class: className.value,
36092
36385
  innerHTML: text.value
36093
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$u)) : (openBlock(), createElementBlock("div", mergeProps({
36386
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$w)) : (openBlock(), createElementBlock("div", mergeProps({
36094
36387
  key: 1,
36095
36388
  class: className.value
36096
36389
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
36097
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
36098
- createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
36099
- createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
36390
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$h, [
36391
+ createBaseVNode("div", _hoisted_4$a, toDisplayString(label.value), 1),
36392
+ createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
36100
36393
  ]))
36101
36394
  ], 16));
36102
36395
  };
36103
36396
  }
36104
36397
  });
36105
- const _hoisted_1$t = ["innerHTML"];
36106
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
36398
+ const _hoisted_1$v = ["innerHTML"];
36399
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
36107
36400
  __name: "SearchResultsProductCustomHtmlElement",
36108
36401
  props: {
36109
36402
  item: {},
@@ -36139,15 +36432,15 @@ and ensure you are accounting for this risk.
36139
36432
  return openBlock(), createElementBlock("div", mergeProps({
36140
36433
  class: className.value,
36141
36434
  innerHTML: text.value
36142
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$t);
36435
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$v);
36143
36436
  };
36144
36437
  }
36145
36438
  });
36146
- const _hoisted_1$s = { id: "lupa-search-results-rating" };
36147
- const _hoisted_2$m = ["innerHTML"];
36148
- const _hoisted_3$e = { class: "lupa-ratings" };
36149
- const _hoisted_4$7 = ["href"];
36150
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
36439
+ const _hoisted_1$u = { id: "lupa-search-results-rating" };
36440
+ const _hoisted_2$o = ["innerHTML"];
36441
+ const _hoisted_3$g = { class: "lupa-ratings" };
36442
+ const _hoisted_4$9 = ["href"];
36443
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
36151
36444
  __name: "SearchResultsProductSingleStarRating",
36152
36445
  props: {
36153
36446
  item: {},
@@ -36175,35 +36468,35 @@ and ensure you are accounting for this risk.
36175
36468
  return RATING_STAR_HTML;
36176
36469
  });
36177
36470
  return (_ctx, _cache) => {
36178
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
36471
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
36179
36472
  createBaseVNode("div", {
36180
36473
  innerHTML: star.value,
36181
36474
  class: "lupa-rating lupa-rating-highlighted"
36182
- }, null, 8, _hoisted_2$m),
36183
- createBaseVNode("div", _hoisted_3$e, toDisplayString(rating.value), 1),
36475
+ }, null, 8, _hoisted_2$o),
36476
+ createBaseVNode("div", _hoisted_3$g, toDisplayString(rating.value), 1),
36184
36477
  createBaseVNode("a", {
36185
36478
  href: ratingLink.value,
36186
36479
  class: "lupa-total-ratings"
36187
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
36480
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$9)
36188
36481
  ]);
36189
36482
  };
36190
36483
  }
36191
36484
  });
36192
36485
  const __default__ = {
36193
36486
  components: {
36194
- SearchResultsProductImage: _sfc_main$E,
36195
- SearchResultsProductTitle: _sfc_main$D,
36196
- SearchResultsProductDescription: _sfc_main$C,
36197
- SearchResultsProductRating: _sfc_main$B,
36198
- SearchResultsProductRegularPrice: _sfc_main$A,
36199
- SearchResultsProductPrice: _sfc_main$z,
36200
- SearchResultsProductAddToCart: _sfc_main$y,
36201
- SearchResultsProductCustom: _sfc_main$x,
36202
- SearchResultsProductCustomHtmlElement: _sfc_main$w,
36203
- SearchResultsProductSingleStarRating: _sfc_main$v
36204
- }
36205
- };
36206
- const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
36487
+ SearchResultsProductImage: _sfc_main$G,
36488
+ SearchResultsProductTitle: _sfc_main$F,
36489
+ SearchResultsProductDescription: _sfc_main$E,
36490
+ SearchResultsProductRating: _sfc_main$D,
36491
+ SearchResultsProductRegularPrice: _sfc_main$C,
36492
+ SearchResultsProductPrice: _sfc_main$B,
36493
+ SearchResultsProductAddToCart: _sfc_main$A,
36494
+ SearchResultsProductCustom: _sfc_main$z,
36495
+ SearchResultsProductCustomHtmlElement: _sfc_main$y,
36496
+ SearchResultsProductSingleStarRating: _sfc_main$x
36497
+ }
36498
+ };
36499
+ const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
36207
36500
  __name: "SearchResultsProductCardElement",
36208
36501
  props: {
36209
36502
  item: {},
@@ -36281,13 +36574,13 @@ and ensure you are accounting for this risk.
36281
36574
  };
36282
36575
  }
36283
36576
  }));
36284
- const _hoisted_1$r = ["href"];
36285
- const _hoisted_2$l = {
36577
+ const _hoisted_1$t = ["href"];
36578
+ const _hoisted_2$n = {
36286
36579
  key: 0,
36287
36580
  class: "lupa-out-of-stock"
36288
36581
  };
36289
- const _hoisted_3$d = { class: "lupa-search-result-product-details-section" };
36290
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
36582
+ const _hoisted_3$f = { class: "lupa-search-result-product-details-section" };
36583
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
36291
36584
  __name: "SearchResultsProductCard",
36292
36585
  props: {
36293
36586
  product: {},
@@ -36463,7 +36756,7 @@ and ensure you are accounting for this risk.
36463
36756
  default: withCtx(() => {
36464
36757
  var _a25;
36465
36758
  return [
36466
- createVNode(_sfc_main$1a, { options: badgesOptions.value }, null, 8, ["options"]),
36759
+ createVNode(_sfc_main$1g, { options: badgesOptions.value }, null, 8, ["options"]),
36467
36760
  createBaseVNode("div", {
36468
36761
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
36469
36762
  }, [
@@ -36473,7 +36766,7 @@ and ensure you are accounting for this risk.
36473
36766
  onClick: handleNavigation
36474
36767
  }, [
36475
36768
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
36476
- return openBlock(), createBlock(_sfc_main$u, {
36769
+ return openBlock(), createBlock(_sfc_main$w, {
36477
36770
  class: "lupa-search-results-product-element",
36478
36771
  item: _ctx.product,
36479
36772
  element,
@@ -36484,16 +36777,16 @@ and ensure you are accounting for this risk.
36484
36777
  onProductEvent: handleProductEvent
36485
36778
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
36486
36779
  }), 128)),
36487
- createVNode(_sfc_main$1a, {
36780
+ createVNode(_sfc_main$1g, {
36488
36781
  options: badgesOptions.value,
36489
36782
  position: "image",
36490
36783
  class: "lupa-image-badges"
36491
36784
  }, null, 8, ["options"]),
36492
- ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
36493
- ], 8, _hoisted_1$r),
36494
- createBaseVNode("div", _hoisted_3$d, [
36785
+ ((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
36786
+ ], 8, _hoisted_1$t),
36787
+ createBaseVNode("div", _hoisted_3$f, [
36495
36788
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
36496
- return openBlock(), createBlock(_sfc_main$u, {
36789
+ return openBlock(), createBlock(_sfc_main$w, {
36497
36790
  class: "lupa-search-results-product-element",
36498
36791
  item: _ctx.product,
36499
36792
  element,
@@ -36511,7 +36804,7 @@ and ensure you are accounting for this risk.
36511
36804
  class: normalizeClass("lupa-element-group-" + group)
36512
36805
  }, [
36513
36806
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
36514
- return openBlock(), createBlock(_sfc_main$u, {
36807
+ return openBlock(), createBlock(_sfc_main$w, {
36515
36808
  class: "lupa-search-results-product-element",
36516
36809
  item: _ctx.product,
36517
36810
  element,
@@ -36532,23 +36825,23 @@ and ensure you are accounting for this risk.
36532
36825
  };
36533
36826
  }
36534
36827
  });
36535
- const _hoisted_1$q = {
36828
+ const _hoisted_1$s = {
36536
36829
  id: "lupa-search-results-similar-queries",
36537
36830
  "data-cy": "lupa-search-results-similar-queries"
36538
36831
  };
36539
- const _hoisted_2$k = { class: "lupa-similar-queries-label" };
36540
- const _hoisted_3$c = {
36832
+ const _hoisted_2$m = { class: "lupa-similar-queries-label" };
36833
+ const _hoisted_3$e = {
36541
36834
  class: "lupa-similar-query-label",
36542
36835
  "data-cy": "lupa-similar-query-label"
36543
36836
  };
36544
- const _hoisted_4$6 = ["onClick"];
36545
- const _hoisted_5$3 = ["innerHTML"];
36837
+ const _hoisted_4$8 = ["onClick"];
36838
+ const _hoisted_5$4 = ["innerHTML"];
36546
36839
  const _hoisted_6$1 = { key: 0 };
36547
36840
  const _hoisted_7 = {
36548
36841
  class: "lupa-products",
36549
36842
  "data-cy": "lupa-products"
36550
36843
  };
36551
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
36844
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
36552
36845
  __name: "SearchResultsSimilarQueries",
36553
36846
  props: {
36554
36847
  labels: {},
@@ -36586,11 +36879,11 @@ and ensure you are accounting for this risk.
36586
36879
  };
36587
36880
  };
36588
36881
  return (_ctx, _cache) => {
36589
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
36590
- createBaseVNode("div", _hoisted_2$k, toDisplayString(_ctx.labels.similarQueries), 1),
36882
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
36883
+ createBaseVNode("div", _hoisted_2$m, toDisplayString(_ctx.labels.similarQueries), 1),
36591
36884
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
36592
36885
  return openBlock(), createElementBlock("div", { key: index }, [
36593
- createBaseVNode("div", _hoisted_3$c, [
36886
+ createBaseVNode("div", _hoisted_3$e, [
36594
36887
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
36595
36888
  createBaseVNode("span", {
36596
36889
  id: "lupa-similar-query-text-component",
@@ -36600,13 +36893,13 @@ and ensure you are accounting for this risk.
36600
36893
  }, [
36601
36894
  createBaseVNode("span", {
36602
36895
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
36603
- }, null, 8, _hoisted_5$3),
36896
+ }, null, 8, _hoisted_5$4),
36604
36897
  similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
36605
- ], 8, _hoisted_4$6)
36898
+ ], 8, _hoisted_4$8)
36606
36899
  ]),
36607
36900
  createBaseVNode("div", _hoisted_7, [
36608
36901
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
36609
- return openBlock(), createBlock(_sfc_main$t, {
36902
+ return openBlock(), createBlock(_sfc_main$v, {
36610
36903
  style: normalizeStyle(_ctx.columnSize),
36611
36904
  key: getDocumentKey(index2, product),
36612
36905
  product,
@@ -36621,15 +36914,15 @@ and ensure you are accounting for this risk.
36621
36914
  };
36622
36915
  }
36623
36916
  });
36624
- const _hoisted_1$p = {
36917
+ const _hoisted_1$r = {
36625
36918
  key: 0,
36626
36919
  class: "lupa-results-additional-panel"
36627
36920
  };
36628
- const _hoisted_2$j = {
36921
+ const _hoisted_2$l = {
36629
36922
  class: "lupa-results-additional-panel-items",
36630
36923
  "data-cy": "lupa-results-additional-panel-items"
36631
36924
  };
36632
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
36925
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
36633
36926
  __name: "AdditionalPanel",
36634
36927
  props: {
36635
36928
  panel: {},
@@ -36702,10 +36995,10 @@ and ensure you are accounting for this risk.
36702
36995
  handleQueryChange();
36703
36996
  });
36704
36997
  return (_ctx, _cache) => {
36705
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
36706
- createBaseVNode("div", _hoisted_2$j, [
36998
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
36999
+ createBaseVNode("div", _hoisted_2$l, [
36707
37000
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
36708
- return openBlock(), createBlock(_sfc_main$t, {
37001
+ return openBlock(), createBlock(_sfc_main$v, {
36709
37002
  key: index,
36710
37003
  product: item,
36711
37004
  options: _ctx.panel,
@@ -36723,11 +37016,11 @@ and ensure you are accounting for this risk.
36723
37016
  };
36724
37017
  }
36725
37018
  });
36726
- const _hoisted_1$o = {
37019
+ const _hoisted_1$q = {
36727
37020
  key: 0,
36728
37021
  class: "lupa-results-additional-panels"
36729
37022
  };
36730
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
37023
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36731
37024
  __name: "AdditionalPanels",
36732
37025
  props: {
36733
37026
  options: {},
@@ -36744,9 +37037,9 @@ and ensure you are accounting for this risk.
36744
37037
  return locationPanels.value.length > 0;
36745
37038
  });
36746
37039
  return (_ctx, _cache) => {
36747
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
37040
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
36748
37041
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
36749
- return openBlock(), createBlock(_sfc_main$r, {
37042
+ return openBlock(), createBlock(_sfc_main$t, {
36750
37043
  key: panel.queryKey,
36751
37044
  panel,
36752
37045
  options: _ctx.sdkOptions
@@ -36763,29 +37056,29 @@ and ensure you are accounting for this risk.
36763
37056
  }
36764
37057
  return target2;
36765
37058
  };
36766
- const _sfc_main$p = {};
36767
- const _hoisted_1$n = { class: "lupa-spinner-wrapper" };
36768
- const _hoisted_2$i = { class: "lupa-spinner" };
37059
+ const _sfc_main$r = {};
37060
+ const _hoisted_1$p = { class: "lupa-spinner-wrapper" };
37061
+ const _hoisted_2$k = { class: "lupa-spinner" };
36769
37062
  function _sfc_render(_ctx, _cache) {
36770
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
36771
- createBaseVNode("div", _hoisted_2$i, [
37063
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
37064
+ createBaseVNode("div", _hoisted_2$k, [
36772
37065
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
36773
37066
  return createBaseVNode("div", { key: x });
36774
37067
  }), 64))
36775
37068
  ])
36776
37069
  ]);
36777
37070
  }
36778
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render]]);
36779
- const _hoisted_1$m = {
37071
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
37072
+ const _hoisted_1$o = {
36780
37073
  id: "lupa-search-results-similar-results",
36781
37074
  "data-cy": "lupa-search-results-similar-results"
36782
37075
  };
36783
- const _hoisted_2$h = { class: "lupa-similar-results-label" };
36784
- const _hoisted_3$b = {
37076
+ const _hoisted_2$j = { class: "lupa-similar-results-label" };
37077
+ const _hoisted_3$d = {
36785
37078
  class: "lupa-products",
36786
37079
  "data-cy": "lupa-products"
36787
37080
  };
36788
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
37081
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
36789
37082
  __name: "SearchResultsSimilarResults",
36790
37083
  props: {
36791
37084
  columnSize: {},
@@ -36806,11 +37099,11 @@ and ensure you are accounting for this risk.
36806
37099
  };
36807
37100
  });
36808
37101
  return (_ctx, _cache) => {
36809
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
36810
- createBaseVNode("div", _hoisted_2$h, toDisplayString(_ctx.labels.similarResultsLabel), 1),
36811
- createBaseVNode("div", _hoisted_3$b, [
37102
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
37103
+ createBaseVNode("div", _hoisted_2$j, toDisplayString(_ctx.labels.similarResultsLabel), 1),
37104
+ createBaseVNode("div", _hoisted_3$d, [
36812
37105
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
36813
- return openBlock(), createBlock(_sfc_main$t, {
37106
+ return openBlock(), createBlock(_sfc_main$v, {
36814
37107
  style: normalizeStyle(_ctx.columnSize),
36815
37108
  key: getDocumentKey(index, product),
36816
37109
  product,
@@ -36931,15 +37224,15 @@ and ensure you are accounting for this risk.
36931
37224
  return extractFacetsRelatedSource(source, searchResults2, options, activeFilters);
36932
37225
  }
36933
37226
  });
36934
- const _hoisted_1$l = { class: "lupa-related-query-item" };
36935
- const _hoisted_2$g = { class: "lupa-related-query-image" };
36936
- const _hoisted_3$a = { class: "lupa-related-query-label" };
36937
- const _hoisted_4$5 = { class: "lupa-related-query-title" };
36938
- const _hoisted_5$2 = {
37227
+ const _hoisted_1$n = { class: "lupa-related-query-item" };
37228
+ const _hoisted_2$i = { class: "lupa-related-query-image" };
37229
+ const _hoisted_3$c = { class: "lupa-related-query-label" };
37230
+ const _hoisted_4$7 = { class: "lupa-related-query-title" };
37231
+ const _hoisted_5$3 = {
36939
37232
  key: 0,
36940
37233
  class: "lupa-related-query-count"
36941
37234
  };
36942
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
37235
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
36943
37236
  __name: "RelatedQueryPanel",
36944
37237
  props: {
36945
37238
  query: {},
@@ -37035,9 +37328,9 @@ and ensure you are accounting for this risk.
37035
37328
  });
37036
37329
  return (_ctx, _cache) => {
37037
37330
  var _a25;
37038
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
37039
- createBaseVNode("div", _hoisted_2$g, [
37040
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
37331
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
37332
+ createBaseVNode("div", _hoisted_2$i, [
37333
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
37041
37334
  key: 0,
37042
37335
  "wrapper-class": "lupa-related-query-image-wrapper",
37043
37336
  "image-class": "lupa-related-query-image",
@@ -37045,24 +37338,24 @@ and ensure you are accounting for this risk.
37045
37338
  options: image.value
37046
37339
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37047
37340
  ]),
37048
- createBaseVNode("div", _hoisted_3$a, [
37049
- createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
37050
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37341
+ createBaseVNode("div", _hoisted_3$c, [
37342
+ createBaseVNode("span", _hoisted_4$7, toDisplayString(_ctx.query), 1),
37343
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37051
37344
  ])
37052
37345
  ]);
37053
37346
  };
37054
37347
  }
37055
37348
  });
37056
- const _hoisted_1$k = {
37349
+ const _hoisted_1$m = {
37057
37350
  key: 0,
37058
37351
  class: "lupa-related-queries"
37059
37352
  };
37060
- const _hoisted_2$f = {
37353
+ const _hoisted_2$h = {
37061
37354
  key: 0,
37062
37355
  class: "lupa-related-queries-title"
37063
37356
  };
37064
- const _hoisted_3$9 = ["onClick"];
37065
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
37357
+ const _hoisted_3$b = ["onClick"];
37358
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
37066
37359
  __name: "RelatedQueries",
37067
37360
  props: {
37068
37361
  options: {}
@@ -37156,8 +37449,8 @@ and ensure you are accounting for this risk.
37156
37449
  };
37157
37450
  return (_ctx, _cache) => {
37158
37451
  var _a25, _b25, _c, _d;
37159
- return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
37160
- ((_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),
37452
+ return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
37453
+ ((_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),
37161
37454
  createBaseVNode("ul", null, [
37162
37455
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
37163
37456
  return withDirectives((openBlock(), createElementBlock("li", {
@@ -37167,14 +37460,14 @@ and ensure you are accounting for this risk.
37167
37460
  createBaseVNode("a", {
37168
37461
  onClick: ($event) => handleRelatedQueryClick(query)
37169
37462
  }, [
37170
- createVNode(_sfc_main$n, {
37463
+ createVNode(_sfc_main$p, {
37171
37464
  "source-key": query.key,
37172
37465
  options: _ctx.options,
37173
37466
  query: query.value,
37174
37467
  "existing-items-from-other-queries": allDisplayItems.value,
37175
37468
  onLoaded: (item) => processLoadedItem(query, item)
37176
37469
  }, null, 8, ["source-key", "options", "query", "existing-items-from-other-queries", "onLoaded"])
37177
- ], 8, _hoisted_3$9)
37470
+ ], 8, _hoisted_3$b)
37178
37471
  ], 2)), [
37179
37472
  [vShow, querySourceResultMap.value[query.value] !== false]
37180
37473
  ]);
@@ -37211,13 +37504,13 @@ and ensure you are accounting for this risk.
37211
37504
  }
37212
37505
  return null;
37213
37506
  };
37214
- const _hoisted_1$j = {
37507
+ const _hoisted_1$l = {
37215
37508
  key: 0,
37216
37509
  class: "lupa-redirection-suggestion"
37217
37510
  };
37218
- const _hoisted_2$e = { class: "lupa-redirections-suggestion-label" };
37219
- const _hoisted_3$8 = ["href"];
37220
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
37511
+ const _hoisted_2$g = { class: "lupa-redirections-suggestion-label" };
37512
+ const _hoisted_3$a = ["href"];
37513
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
37221
37514
  __name: "RedirectionSuggestions",
37222
37515
  props: {
37223
37516
  options: {}
@@ -37240,19 +37533,19 @@ and ensure you are accounting for this risk.
37240
37533
  )
37241
37534
  );
37242
37535
  return (_ctx, _cache) => {
37243
- return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
37244
- createBaseVNode("h4", _hoisted_2$e, [
37245
- createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$8)
37536
+ return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
37537
+ createBaseVNode("h4", _hoisted_2$g, [
37538
+ createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$a)
37246
37539
  ])
37247
37540
  ])) : createCommentVNode("", true);
37248
37541
  };
37249
37542
  }
37250
37543
  });
37251
- const _hoisted_1$i = {
37544
+ const _hoisted_1$k = {
37252
37545
  key: 0,
37253
37546
  class: "lupa-refiners-loading-notice"
37254
37547
  };
37255
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
37548
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
37256
37549
  __name: "RefinersLoadingNotice",
37257
37550
  props: {
37258
37551
  labels: {}
@@ -37263,22 +37556,22 @@ and ensure you are accounting for this risk.
37263
37556
  const props = __props;
37264
37557
  const label = computed(() => props.labels.refinersLoadingNotice);
37265
37558
  return (_ctx, _cache) => {
37266
- return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
37559
+ return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
37267
37560
  createBaseVNode("p", null, toDisplayString(label.value), 1),
37268
37561
  createVNode(Spinner)
37269
37562
  ])) : createCommentVNode("", true);
37270
37563
  };
37271
37564
  }
37272
37565
  });
37273
- const _hoisted_1$h = { class: "lupa-related-query-item" };
37274
- const _hoisted_2$d = { class: "lupa-related-query-image" };
37275
- const _hoisted_3$7 = { class: "lupa-related-query-label" };
37276
- const _hoisted_4$4 = { class: "lupa-related-query-title" };
37277
- const _hoisted_5$1 = {
37566
+ const _hoisted_1$j = { class: "lupa-related-query-item" };
37567
+ const _hoisted_2$f = { class: "lupa-related-query-image" };
37568
+ const _hoisted_3$9 = { class: "lupa-related-query-label" };
37569
+ const _hoisted_4$6 = { class: "lupa-related-query-title" };
37570
+ const _hoisted_5$2 = {
37278
37571
  key: 0,
37279
37572
  class: "lupa-related-query-count"
37280
37573
  };
37281
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
37574
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
37282
37575
  __name: "RelatedQueryPanelApi",
37283
37576
  props: {
37284
37577
  relatedQuery: {},
@@ -37310,9 +37603,9 @@ and ensure you are accounting for this risk.
37310
37603
  });
37311
37604
  return (_ctx, _cache) => {
37312
37605
  var _a25;
37313
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
37314
- createBaseVNode("div", _hoisted_2$d, [
37315
- itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1q, {
37606
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
37607
+ createBaseVNode("div", _hoisted_2$f, [
37608
+ itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
37316
37609
  key: 0,
37317
37610
  "wrapper-class": "lupa-related-query-image-wrapper",
37318
37611
  "image-class": "lupa-related-query-image",
@@ -37320,24 +37613,24 @@ and ensure you are accounting for this risk.
37320
37613
  options: image.value
37321
37614
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37322
37615
  ]),
37323
- createBaseVNode("div", _hoisted_3$7, [
37324
- createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
37325
- ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37616
+ createBaseVNode("div", _hoisted_3$9, [
37617
+ createBaseVNode("span", _hoisted_4$6, toDisplayString(query.value), 1),
37618
+ ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37326
37619
  ])
37327
37620
  ]);
37328
37621
  };
37329
37622
  }
37330
37623
  });
37331
- const _hoisted_1$g = {
37624
+ const _hoisted_1$i = {
37332
37625
  key: 0,
37333
37626
  class: "lupa-related-queries"
37334
37627
  };
37335
- const _hoisted_2$c = {
37628
+ const _hoisted_2$e = {
37336
37629
  key: 0,
37337
37630
  class: "lupa-related-queries-title"
37338
37631
  };
37339
- const _hoisted_3$6 = ["onClick"];
37340
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
37632
+ const _hoisted_3$8 = ["onClick"];
37633
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
37341
37634
  __name: "RelatedQueriesApi",
37342
37635
  props: {
37343
37636
  options: {}
@@ -37347,7 +37640,7 @@ and ensure you are accounting for this risk.
37347
37640
  const searchResultStore = useSearchResultStore();
37348
37641
  const paramsStore = useParamsStore();
37349
37642
  const optionsStore = useOptionsStore();
37350
- const { searchResult, relatedQueriesResult } = storeToRefs(searchResultStore);
37643
+ const { searchResult, relatedQueriesResult, relatedQueryFacetKeys } = storeToRefs(searchResultStore);
37351
37644
  const relatedQueries2 = computed(() => {
37352
37645
  var _a25, _b25, _c, _d;
37353
37646
  const allQueries = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) != null ? _b25 : [];
@@ -37375,7 +37668,7 @@ and ensure you are accounting for this risk.
37375
37668
  { key: query.key, value: query.value },
37376
37669
  optionsStore.getQueryParamName,
37377
37670
  {},
37378
- (_a25 = relatedQueries2.value) == null ? void 0 : _a25.map((q) => `f.${q.facetKey}`)
37671
+ (_a25 = relatedQueryFacetKeys.value) == null ? void 0 : _a25.map((key) => `f.${key}`)
37379
37672
  );
37380
37673
  };
37381
37674
  const getSelectedFilterClass = (relatedQuery) => {
@@ -37389,8 +37682,8 @@ and ensure you are accounting for this risk.
37389
37682
  };
37390
37683
  return (_ctx, _cache) => {
37391
37684
  var _a25, _b25, _c, _d;
37392
- return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
37393
- ((_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),
37685
+ return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
37686
+ ((_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),
37394
37687
  createBaseVNode("ul", null, [
37395
37688
  (openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
37396
37689
  return openBlock(), createElementBlock("li", {
@@ -37400,11 +37693,11 @@ and ensure you are accounting for this risk.
37400
37693
  createBaseVNode("a", {
37401
37694
  onClick: ($event) => handleRelatedQueryClick(query)
37402
37695
  }, [
37403
- createVNode(_sfc_main$j, {
37696
+ createVNode(_sfc_main$l, {
37404
37697
  relatedQuery: query,
37405
37698
  options: _ctx.options
37406
37699
  }, null, 8, ["relatedQuery", "options"])
37407
- ], 8, _hoisted_3$6)
37700
+ ], 8, _hoisted_3$8)
37408
37701
  ], 2);
37409
37702
  }), 128))
37410
37703
  ])
@@ -37412,9 +37705,9 @@ and ensure you are accounting for this risk.
37412
37705
  };
37413
37706
  }
37414
37707
  });
37415
- const _hoisted_1$f = { key: 0 };
37416
- const _hoisted_2$b = ["innerHTML"];
37417
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
37708
+ const _hoisted_1$h = { key: 0 };
37709
+ const _hoisted_2$d = ["innerHTML"];
37710
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
37418
37711
  __name: "ZeroResults",
37419
37712
  props: {
37420
37713
  emptyResultsLabel: {},
@@ -37443,36 +37736,36 @@ and ensure you are accounting for this risk.
37443
37736
  });
37444
37737
  return (_ctx, _cache) => {
37445
37738
  return openBlock(), createElementBlock(Fragment, null, [
37446
- showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
37739
+ showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
37447
37740
  createTextVNode(toDisplayString(_ctx.emptyResultsLabel) + " ", 1),
37448
37741
  createBaseVNode("span", null, toDisplayString(_ctx.currentQueryText), 1)
37449
37742
  ])) : createCommentVNode("", true),
37450
37743
  showCustomZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", {
37451
37744
  key: 1,
37452
37745
  innerHTML: htmlTemplate.value
37453
- }, null, 8, _hoisted_2$b)) : createCommentVNode("", true)
37746
+ }, null, 8, _hoisted_2$d)) : createCommentVNode("", true)
37454
37747
  ], 64);
37455
37748
  };
37456
37749
  }
37457
37750
  });
37458
- const _hoisted_1$e = { id: "lupa-search-results-products" };
37459
- const _hoisted_2$a = {
37751
+ const _hoisted_1$g = { id: "lupa-search-results-products" };
37752
+ const _hoisted_2$c = {
37460
37753
  class: "lupa-products",
37461
37754
  "data-cy": "lupa-products"
37462
37755
  };
37463
- const _hoisted_3$5 = {
37756
+ const _hoisted_3$7 = {
37464
37757
  key: 1,
37465
37758
  class: "lupa-empty-results",
37466
37759
  "data-cy": "lupa-no-results-in-page"
37467
37760
  };
37468
- const _hoisted_4$3 = {
37761
+ const _hoisted_4$5 = {
37469
37762
  key: 5,
37470
37763
  class: "lupa-empty-results",
37471
37764
  "data-cy": "lupa-no-results"
37472
37765
  };
37473
- const _hoisted_5 = { key: 6 };
37766
+ const _hoisted_5$1 = { key: 6 };
37474
37767
  const _hoisted_6 = { key: 7 };
37475
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
37768
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
37476
37769
  __name: "SearchResultsProducts",
37477
37770
  props: {
37478
37771
  options: {},
@@ -37488,7 +37781,7 @@ and ensure you are accounting for this risk.
37488
37781
  hasResults,
37489
37782
  currentQueryText,
37490
37783
  isPageEmpty,
37491
- isMobileSidebarVisible,
37784
+ isFilterSidebarVisible,
37492
37785
  columnCount,
37493
37786
  searchResult,
37494
37787
  layout,
@@ -37519,7 +37812,7 @@ and ensure you are accounting for this risk.
37519
37812
  });
37520
37813
  const showTopFilters = computed(() => {
37521
37814
  var _a25, _b25, _c;
37522
- return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) === "top-dropdown";
37815
+ return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
37523
37816
  });
37524
37817
  const showMobileFilters = computed(() => {
37525
37818
  return props.options.searchTitlePosition !== "search-results-top";
@@ -37596,40 +37889,40 @@ and ensure you are accounting for this risk.
37596
37889
  };
37597
37890
  return (_ctx, _cache) => {
37598
37891
  var _a25, _b25, _c;
37599
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
37600
- unref(loading) && !unref(isMobileSidebarVisible) ? (openBlock(), createBlock(Spinner, {
37892
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
37893
+ unref(loading) && !unref(isFilterSidebarVisible) ? (openBlock(), createBlock(Spinner, {
37601
37894
  key: 0,
37602
37895
  class: "lupa-loader"
37603
37896
  })) : createCommentVNode("", true),
37604
- createVNode(_sfc_main$l, {
37897
+ createVNode(_sfc_main$n, {
37605
37898
  options: _ctx.options.redirectionSuggestions
37606
37899
  }, null, 8, ["options"]),
37607
- createVNode(_sfc_main$q, {
37900
+ createVNode(_sfc_main$s, {
37608
37901
  options: _ctx.options,
37609
37902
  location: "top",
37610
37903
  sdkOptions: _ctx.options.options
37611
37904
  }, null, 8, ["options", "sdkOptions"]),
37612
- showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$m, {
37905
+ showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$o, {
37613
37906
  key: 1,
37614
37907
  options: _ctx.options.relatedQueries
37615
37908
  }, null, 8, ["options"])) : createCommentVNode("", true),
37616
- showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$i, {
37909
+ showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$k, {
37617
37910
  key: 2,
37618
37911
  options: _ctx.options.relatedQueries
37619
37912
  }, null, 8, ["options"])) : createCommentVNode("", true),
37620
37913
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
37621
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$M, {
37914
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
37622
37915
  key: 0,
37623
37916
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
37624
37917
  }, null, 8, ["options"])) : createCommentVNode("", true),
37625
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$F, {
37918
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
37626
37919
  key: 1,
37627
37920
  class: "lupa-toolbar-mobile",
37628
37921
  options: _ctx.options,
37629
37922
  "pagination-location": "top",
37630
37923
  onFilter: filter
37631
37924
  }, null, 8, ["options"])) : createCommentVNode("", true),
37632
- currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$_, {
37925
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
37633
37926
  key: 2,
37634
37927
  class: normalizeClass(currentFiltersClass.value),
37635
37928
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -37638,19 +37931,19 @@ and ensure you are accounting for this risk.
37638
37931
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
37639
37932
  ], 64)) : createCommentVNode("", true),
37640
37933
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
37641
- createVNode(_sfc_main$F, {
37934
+ createVNode(_sfc_main$H, {
37642
37935
  class: "lupa-toolbar-top",
37643
37936
  options: _ctx.options,
37644
37937
  "pagination-location": "top"
37645
37938
  }, null, 8, ["options"]),
37646
- currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$_, {
37939
+ currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$14, {
37647
37940
  key: 0,
37648
37941
  class: normalizeClass(currentFiltersClass.value),
37649
37942
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
37650
37943
  options: currentFilterOptions.value,
37651
37944
  expandable: !desktopFiltersExpanded.value
37652
37945
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
37653
- createBaseVNode("div", _hoisted_2$a, [
37946
+ createBaseVNode("div", _hoisted_2$c, [
37654
37947
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
37655
37948
  return renderSlot(_ctx.$slots, "productCard", {
37656
37949
  style: normalizeStyle(columnSize.value),
@@ -37659,7 +37952,7 @@ and ensure you are accounting for this risk.
37659
37952
  options: productCardOptions.value
37660
37953
  });
37661
37954
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
37662
- return openBlock(), createBlock(_sfc_main$t, {
37955
+ return openBlock(), createBlock(_sfc_main$v, {
37663
37956
  style: normalizeStyle(columnSize.value),
37664
37957
  key: getProductKeyAction(index, product),
37665
37958
  product,
@@ -37668,7 +37961,7 @@ and ensure you are accounting for this risk.
37668
37961
  }, null, 8, ["style", "product", "options", "analytics-metadata"]);
37669
37962
  }), 128))
37670
37963
  ]),
37671
- unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
37964
+ unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
37672
37965
  createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
37673
37966
  _ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
37674
37967
  key: 0,
@@ -37676,36 +37969,36 @@ and ensure you are accounting for this risk.
37676
37969
  onClick: goToFirstPage
37677
37970
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
37678
37971
  ])) : createCommentVNode("", true),
37679
- createVNode(_sfc_main$F, {
37972
+ createVNode(_sfc_main$H, {
37680
37973
  class: "lupa-toolbar-bottom",
37681
37974
  options: _ctx.options,
37682
37975
  "pagination-location": "bottom"
37683
37976
  }, null, 8, ["options"]),
37684
- createVNode(_sfc_main$q, {
37977
+ createVNode(_sfc_main$s, {
37685
37978
  options: _ctx.options,
37686
37979
  location: "bottom",
37687
37980
  sdkOptions: _ctx.options.options
37688
37981
  }, null, 8, ["options", "sdkOptions"])
37689
- ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
37690
- createVNode(_sfc_main$h, {
37982
+ ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
37983
+ createVNode(_sfc_main$j, {
37691
37984
  emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
37692
37985
  currentQueryText: unref(currentQueryText),
37693
37986
  hasSimilarQueries: hasSimilarQueries.value || hasSimilarResults.value,
37694
37987
  zeroResults: (_c = _ctx.options) == null ? void 0 : _c.zeroResults
37695
37988
  }, null, 8, ["emptyResultsLabel", "currentQueryText", "hasSimilarQueries", "zeroResults"])
37696
37989
  ])) : createCommentVNode("", true),
37697
- createVNode(_sfc_main$k, {
37990
+ createVNode(_sfc_main$m, {
37698
37991
  labels: _ctx.options.labels
37699
37992
  }, null, 8, ["labels"]),
37700
- hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
37701
- createVNode(_sfc_main$s, {
37993
+ hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
37994
+ createVNode(_sfc_main$u, {
37702
37995
  labels: similarQueriesLabels.value,
37703
37996
  columnSize: columnSize.value,
37704
37997
  productCardOptions: productCardOptions.value
37705
37998
  }, null, 8, ["labels", "columnSize", "productCardOptions"])
37706
37999
  ])) : createCommentVNode("", true),
37707
38000
  hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
37708
- createVNode(_sfc_main$o, {
38001
+ createVNode(_sfc_main$q, {
37709
38002
  labels: similarResultsLabels.value,
37710
38003
  columnSize: columnSize.value,
37711
38004
  productCardOptions: productCardOptions.value
@@ -37716,17 +38009,17 @@ and ensure you are accounting for this risk.
37716
38009
  };
37717
38010
  }
37718
38011
  });
37719
- const _hoisted_1$d = { class: "lupa-top-mobile-filter-wrapper" };
37720
- const _hoisted_2$9 = {
38012
+ const _hoisted_1$f = { class: "lupa-top-mobile-filter-wrapper" };
38013
+ const _hoisted_2$b = {
37721
38014
  key: 0,
37722
38015
  class: "lupa-category-back"
37723
38016
  };
37724
- const _hoisted_3$4 = ["href"];
37725
- const _hoisted_4$2 = {
38017
+ const _hoisted_3$6 = ["href"];
38018
+ const _hoisted_4$4 = {
37726
38019
  key: 1,
37727
38020
  class: "lupa-child-category-list"
37728
38021
  };
37729
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
38022
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
37730
38023
  __name: "CategoryTopFilters",
37731
38024
  props: {
37732
38025
  options: {}
@@ -37774,24 +38067,24 @@ and ensure you are accounting for this risk.
37774
38067
  "has-related-category-children": hasRelatedCategoryChildren.value
37775
38068
  }])
37776
38069
  }, [
37777
- createBaseVNode("div", _hoisted_1$d, [
37778
- hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
38070
+ createBaseVNode("div", _hoisted_1$f, [
38071
+ hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
37779
38072
  createBaseVNode("a", {
37780
38073
  "data-cy": "lupa-category-back",
37781
38074
  href: backUrlLink.value,
37782
38075
  onClick: handleNavigationBack
37783
- }, toDisplayString(backTitle.value), 9, _hoisted_3$4)
38076
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$6)
37784
38077
  ])) : createCommentVNode("", true),
37785
- hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
38078
+ hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
37786
38079
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
37787
- return openBlock(), createBlock(_sfc_main$Z, {
38080
+ return openBlock(), createBlock(_sfc_main$13, {
37788
38081
  key: getCategoryKey(child),
37789
38082
  item: child,
37790
38083
  options: categoryOptions.value
37791
38084
  }, null, 8, ["item", "options"]);
37792
38085
  }), 128))
37793
38086
  ])) : createCommentVNode("", true),
37794
- createVNode(_sfc_main$F, {
38087
+ createVNode(_sfc_main$H, {
37795
38088
  class: "lupa-toolbar-mobile",
37796
38089
  "pagination-location": "top",
37797
38090
  options: _ctx.options
@@ -37801,6 +38094,129 @@ and ensure you are accounting for this risk.
37801
38094
  };
37802
38095
  }
37803
38096
  });
38097
+ const _hoisted_1$e = {
38098
+ id: "lupa-search-results-sort-list",
38099
+ class: "lupa-search-results-sort-list"
38100
+ };
38101
+ const _hoisted_2$a = ["onClick"];
38102
+ const _hoisted_3$5 = ["for"];
38103
+ const _hoisted_4$3 = ["id", "checked"];
38104
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
38105
+ __name: "SortList",
38106
+ setup(__props) {
38107
+ const { sortItems, selectedKey, handleSelect, setSortValue } = useSorting();
38108
+ onMounted(() => {
38109
+ setSortValue();
38110
+ });
38111
+ const selectValue = (key) => {
38112
+ selectedKey.value = key;
38113
+ handleSelect();
38114
+ };
38115
+ return (_ctx, _cache) => {
38116
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
38117
+ createBaseVNode("ul", null, [
38118
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
38119
+ return openBlock(), createElementBlock("li", {
38120
+ key: option.key,
38121
+ class: normalizeClass({ "lupa-sort-item-selected": option.key === unref(selectedKey) }),
38122
+ onClick: ($event) => selectValue(option.key)
38123
+ }, [
38124
+ createBaseVNode("label", {
38125
+ for: "lupa-sort-list-" + option.key
38126
+ }, toDisplayString(option.label), 9, _hoisted_3$5),
38127
+ createBaseVNode("input", {
38128
+ id: "lupa-sort-list-" + option.key,
38129
+ type: "radio",
38130
+ checked: option.key === unref(selectedKey)
38131
+ }, null, 8, _hoisted_4$3)
38132
+ ], 10, _hoisted_2$a);
38133
+ }), 128))
38134
+ ])
38135
+ ]);
38136
+ };
38137
+ }
38138
+ });
38139
+ const _hoisted_1$d = { class: "lupa-sort-sidebar-content" };
38140
+ const _hoisted_2$9 = { class: "lupa-sidebar-top" };
38141
+ const _hoisted_3$4 = { class: "lupa-sidebar-title" };
38142
+ const _hoisted_4$2 = { class: "lupa-sidebar-sort-options" };
38143
+ const _hoisted_5 = { class: "lupa-sidebar-sort-actions" };
38144
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
38145
+ __name: "SortDrawer",
38146
+ setup(__props) {
38147
+ const optionsStore = useOptionsStore();
38148
+ const searchResultStore = useSearchResultStore();
38149
+ const paramStore = useParamsStore();
38150
+ const { searchResultOptions } = storeToRefs(optionsStore);
38151
+ const { isSidebarClosing, isSortingSidebarVisible } = storeToRefs(searchResultStore);
38152
+ const { handleSortSidebarToggle } = useSidebarToggle();
38153
+ const sortStyleOptions = computed(() => {
38154
+ var _a25;
38155
+ return (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle;
38156
+ });
38157
+ const sidebarTitle = 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.title) != null ? _d : "";
38160
+ });
38161
+ const clearSortLabel = 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.clearLabel) != null ? _d : "";
38164
+ });
38165
+ const applySortLabel = computed(() => {
38166
+ var _a25, _b25, _c, _d;
38167
+ 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 : "";
38168
+ });
38169
+ const handleDrawerToggle = () => {
38170
+ searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
38171
+ };
38172
+ const clearSort = () => {
38173
+ paramStore.removeParameters({
38174
+ paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS$1.SORT)]
38175
+ });
38176
+ handleSortSidebarToggle();
38177
+ };
38178
+ const applySort = () => {
38179
+ handleSortSidebarToggle();
38180
+ };
38181
+ return (_ctx, _cache) => {
38182
+ return unref(isSortingSidebarVisible) ? (openBlock(), createElementBlock("div", {
38183
+ key: 0,
38184
+ class: normalizeClass(["lupa-sort-sidebar", { "lupa-sort-is-closing": unref(isSidebarClosing) }])
38185
+ }, [
38186
+ createBaseVNode("div", {
38187
+ class: "lupa-sidebar-close",
38188
+ onClick: withModifiers(handleDrawerToggle, ["stop"])
38189
+ }),
38190
+ createBaseVNode("div", _hoisted_1$d, [
38191
+ createBaseVNode("div", _hoisted_2$9, [
38192
+ createBaseVNode("div", _hoisted_3$4, toDisplayString(sidebarTitle.value), 1),
38193
+ createBaseVNode("div", {
38194
+ class: "lupa-filter-toggle-mobile",
38195
+ onClick: handleDrawerToggle
38196
+ })
38197
+ ]),
38198
+ createBaseVNode("div", _hoisted_4$2, [
38199
+ createVNode(_sfc_main$g)
38200
+ ]),
38201
+ createBaseVNode("div", _hoisted_5, [
38202
+ clearSortLabel.value ? (openBlock(), createElementBlock("button", {
38203
+ key: 0,
38204
+ type: "button",
38205
+ class: "lupa-sidebar-sort-clear",
38206
+ onClick: withModifiers(clearSort, ["stop"])
38207
+ }, toDisplayString(clearSortLabel.value), 1)) : createCommentVNode("", true),
38208
+ applySortLabel.value ? (openBlock(), createElementBlock("button", {
38209
+ key: 1,
38210
+ type: "button",
38211
+ class: "lupa-sidebar-sort-apply",
38212
+ onClick: withModifiers(applySort, ["stop"])
38213
+ }, toDisplayString(applySortLabel.value), 1)) : createCommentVNode("", true)
38214
+ ])
38215
+ ])
38216
+ ], 2)) : createCommentVNode("", true);
38217
+ };
38218
+ }
38219
+ });
37804
38220
  const _hoisted_1$c = {
37805
38221
  key: 0,
37806
38222
  class: "lupa-container-title-summary-mobile"
@@ -37835,7 +38251,7 @@ and ensure you are accounting for this risk.
37835
38251
  currentQueryText,
37836
38252
  hasResults,
37837
38253
  currentFilterCount,
37838
- isMobileSidebarVisible,
38254
+ isFilterSidebarVisible,
37839
38255
  layout,
37840
38256
  loadingFacets,
37841
38257
  loadingRefiners
@@ -37857,7 +38273,7 @@ and ensure you are accounting for this risk.
37857
38273
  });
37858
38274
  const indicatorClasses = computed(() => {
37859
38275
  return {
37860
- "lupa-mobile-sidebar-visible": isMobileSidebarVisible.value,
38276
+ "lupa-mobile-sidebar-visible": isFilterSidebarVisible.value,
37861
38277
  "lupa-layout-grid": !layout.value || layout.value === ResultsLayoutEnum.GRID,
37862
38278
  "lupa-layout-list": layout.value === ResultsLayoutEnum.LIST
37863
38279
  };
@@ -38099,32 +38515,33 @@ and ensure you are accounting for this risk.
38099
38515
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
38100
38516
  }, [
38101
38517
  _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
38102
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38103
- createVNode(_sfc_main$10, {
38518
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38519
+ createVNode(_sfc_main$16, {
38104
38520
  "show-summary": true,
38105
38521
  options: _ctx.options,
38106
38522
  "is-product-list": (_a25 = _ctx.isProductList) != null ? _a25 : false
38107
38523
  }, null, 8, ["options", "is-product-list"])
38108
38524
  ])) : createCommentVNode("", true),
38109
- isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$f, {
38525
+ isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$h, {
38110
38526
  key: 1,
38111
38527
  options: _ctx.options
38112
38528
  }, null, 8, ["options"])) : createCommentVNode("", true),
38113
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$O, {
38529
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$R, {
38114
38530
  key: 2,
38115
38531
  options: _ctx.options.filters,
38116
38532
  onFilter: handleParamsChange
38117
38533
  }, null, 8, ["options"])) : createCommentVNode("", true),
38118
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$N, {
38119
- key: 3,
38534
+ _ctx.options.sort ? (openBlock(), createBlock(_sfc_main$f, { key: 3 })) : createCommentVNode("", true),
38535
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$Q, {
38536
+ key: 4,
38120
38537
  breadcrumbs: _ctx.options.breadcrumbs
38121
38538
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
38122
38539
  isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", {
38123
- key: 4,
38540
+ key: 5,
38124
38541
  id: "lupa-search-results",
38125
38542
  class: normalizeClass(["top-layout-wrapper", indicatorClasses.value])
38126
38543
  }, [
38127
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
38544
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
38128
38545
  key: 0,
38129
38546
  options: (_b25 = _ctx.options.filters) != null ? _b25 : {},
38130
38547
  ref_key: "searchResultsFilters",
@@ -38132,12 +38549,12 @@ and ensure you are accounting for this risk.
38132
38549
  onFilter: handleParamsChange
38133
38550
  }, null, 8, ["options"])) : createCommentVNode("", true),
38134
38551
  createBaseVNode("div", _hoisted_2$8, [
38135
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38136
- createVNode(_sfc_main$10, {
38552
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38553
+ createVNode(_sfc_main$16, {
38137
38554
  options: _ctx.options,
38138
38555
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
38139
38556
  }, null, 8, ["options", "is-product-list"]),
38140
- createVNode(_sfc_main$g, {
38557
+ createVNode(_sfc_main$i, {
38141
38558
  options: _ctx.options,
38142
38559
  ssr: ssrEnabled.value,
38143
38560
  onFilter: handleParamsChange
@@ -38148,9 +38565,9 @@ and ensure you are accounting for this risk.
38148
38565
  _: 3
38149
38566
  }, 8, ["options", "ssr"])
38150
38567
  ])
38151
- ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
38152
- createVNode(_sfc_main$12, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38153
- createVNode(_sfc_main$10, {
38568
+ ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [
38569
+ createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
38570
+ createVNode(_sfc_main$16, {
38154
38571
  options: _ctx.options,
38155
38572
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
38156
38573
  }, null, 8, ["options", "is-product-list"]),
@@ -38158,14 +38575,14 @@ and ensure you are accounting for this risk.
38158
38575
  id: "lupa-search-results",
38159
38576
  class: normalizeClass(indicatorClasses.value)
38160
38577
  }, [
38161
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$P, {
38578
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
38162
38579
  key: 0,
38163
38580
  options: (_e = _ctx.options.filters) != null ? _e : {},
38164
38581
  ref_key: "searchResultsFilters",
38165
38582
  ref: searchResultsFilters,
38166
38583
  onFilter: handleParamsChange
38167
38584
  }, null, 8, ["options"])) : createCommentVNode("", true),
38168
- createVNode(_sfc_main$g, {
38585
+ createVNode(_sfc_main$i, {
38169
38586
  options: _ctx.options,
38170
38587
  ssr: ssrEnabled.value,
38171
38588
  onFilter: handleParamsChange
@@ -38309,7 +38726,7 @@ and ensure you are accounting for this risk.
38309
38726
  onClick: withModifiers(innerClick, ["stop"])
38310
38727
  }, [
38311
38728
  createBaseVNode("div", _hoisted_1$a, [
38312
- createVNode(_sfc_main$13, {
38729
+ createVNode(_sfc_main$19, {
38313
38730
  options: fullSearchBoxOptions.value,
38314
38731
  "is-search-container": true,
38315
38732
  ref_key: "searchBox",
@@ -39897,7 +40314,7 @@ and ensure you are accounting for this risk.
39897
40314
  key: getProductKeyAction(index, product)
39898
40315
  }, {
39899
40316
  default: withCtx(() => [
39900
- createVNode(_sfc_main$t, {
40317
+ createVNode(_sfc_main$v, {
39901
40318
  product,
39902
40319
  options: _ctx.options,
39903
40320
  "click-tracking-settings": clickTrackingSettings.value,
@@ -39912,7 +40329,7 @@ and ensure you are accounting for this risk.
39912
40329
  _: 1
39913
40330
  }, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
39914
40331
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
39915
- return openBlock(), createBlock(_sfc_main$t, {
40332
+ return openBlock(), createBlock(_sfc_main$v, {
39916
40333
  style: normalizeStyle(columnSize.value),
39917
40334
  key: getProductKeyAction(index, product),
39918
40335
  product,
@@ -40158,7 +40575,7 @@ and ensure you are accounting for this risk.
40158
40575
  createBaseVNode("a", {
40159
40576
  href: getLink(product)
40160
40577
  }, [
40161
- createVNode(_sfc_main$E, {
40578
+ createVNode(_sfc_main$G, {
40162
40579
  item: product,
40163
40580
  options: image.value
40164
40581
  }, null, 8, ["item", "options"])
@@ -40323,7 +40740,7 @@ and ensure you are accounting for this risk.
40323
40740
  return (_ctx, _cache) => {
40324
40741
  return openBlock(), createElementBlock("section", _hoisted_1$3, [
40325
40742
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
40326
- return openBlock(), createBlock(_sfc_main$t, {
40743
+ return openBlock(), createBlock(_sfc_main$v, {
40327
40744
  class: "lupa-chat-product-card",
40328
40745
  key: getProductKeyAction(index, product),
40329
40746
  product,
@@ -40519,7 +40936,7 @@ and ensure you are accounting for this risk.
40519
40936
  key: 0,
40520
40937
  class: "lupasearch-chat-content"
40521
40938
  };
40522
- const _sfc_main$1B = /* @__PURE__ */ defineComponent({
40939
+ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
40523
40940
  __name: "ChatContainer",
40524
40941
  props: {
40525
40942
  options: {}
@@ -46543,7 +46960,7 @@ and ensure you are accounting for this risk.
46543
46960
  };
46544
46961
  __expose({ fetch: fetch2 });
46545
46962
  return (_ctx, _cache) => {
46546
- return openBlock(), createBlock(unref(_sfc_main$13), {
46963
+ return openBlock(), createBlock(unref(_sfc_main$19), {
46547
46964
  ref_key: "searchBox",
46548
46965
  ref: searchBox2,
46549
46966
  options: fullSearchBoxOptions.value
@@ -47203,7 +47620,7 @@ and ensure you are accounting for this risk.
47203
47620
  const instance = createVue(
47204
47621
  options.displayOptions.containerSelector,
47205
47622
  mountOptions == null ? void 0 : mountOptions.mountingBehavior,
47206
- _sfc_main$1B,
47623
+ _sfc_main$1H,
47207
47624
  {
47208
47625
  options
47209
47626
  }
@@ -47477,13 +47894,14 @@ and ensure you are accounting for this risk.
47477
47894
  document.head.appendChild(styleElement);
47478
47895
  });
47479
47896
  const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47480
- var _a25;
47897
+ var _a25, _b25;
47481
47898
  if (!configuration.searchBox) {
47482
47899
  return;
47483
47900
  }
47484
47901
  const resolvedConfiguration = JSON.parse(configuration.searchBox);
47485
47902
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47486
47903
  const domPing = resolvedConfiguration.domPing;
47904
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47487
47905
  const visible = yield waitForElementToBeVisible(
47488
47906
  resolvedConfiguration.inputSelector,
47489
47907
  0,
@@ -47497,18 +47915,19 @@ and ensure you are accounting for this risk.
47497
47915
  }
47498
47916
  const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
47499
47917
  resolvedConfiguration,
47500
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a25 : {}
47918
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _b25 : {}
47501
47919
  );
47502
- searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
47920
+ searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior });
47503
47921
  });
47504
47922
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47505
- var _a25;
47923
+ var _a25, _b25;
47506
47924
  if (!configuration.searchResults) {
47507
47925
  return;
47508
47926
  }
47509
47927
  const resolvedConfiguration = JSON.parse(configuration.searchResults);
47510
47928
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47511
47929
  const domPing = resolvedConfiguration.domPing;
47930
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47512
47931
  const visible = yield waitForElementToBeVisible(
47513
47932
  resolvedConfiguration.containerSelector,
47514
47933
  0,
@@ -47522,12 +47941,15 @@ and ensure you are accounting for this risk.
47522
47941
  }
47523
47942
  const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
47524
47943
  resolvedConfiguration,
47525
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a25 : {}
47944
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _b25 : {}
47945
+ );
47946
+ searchResults(
47947
+ __spreadProps(__spreadValues({}, mergedOptions), { options }),
47948
+ { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior }
47526
47949
  );
47527
- searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
47528
47950
  });
47529
47951
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47530
- var _a25;
47952
+ var _a25, _b25;
47531
47953
  if (!configuration.productList) {
47532
47954
  return;
47533
47955
  }
@@ -47536,6 +47958,7 @@ and ensure you are accounting for this risk.
47536
47958
  );
47537
47959
  const resolvedConfiguration = JSON.parse(configuration.productList);
47538
47960
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47961
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47539
47962
  const visible = yield waitForElementToBeVisible(
47540
47963
  resolvedConfiguration.containerSelector,
47541
47964
  0,
@@ -47549,13 +47972,14 @@ and ensure you are accounting for this risk.
47549
47972
  }
47550
47973
  const mergedOptions = merge(
47551
47974
  __spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
47552
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _a25 : {}
47975
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _b25 : {}
47553
47976
  );
47554
- productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
47977
+ productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
47555
47978
  });
47556
47979
  const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfiguration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47557
- var _a25;
47980
+ var _a25, _b25;
47558
47981
  const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
47982
+ const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
47559
47983
  const visible = yield waitForElementToBeVisible(
47560
47984
  resolvedConfiguration.containerSelector,
47561
47985
  0,
@@ -47569,9 +47993,9 @@ and ensure you are accounting for this risk.
47569
47993
  }
47570
47994
  const mergedOptions = merge(
47571
47995
  __spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
47572
- (_a25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _a25 : {}
47996
+ (_b25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _b25 : {}
47573
47997
  );
47574
- recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
47998
+ recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
47575
47999
  });
47576
48000
  const mountAllRecommendations = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
47577
48001
  if (!configuration.recommendations) {