@getlupa/client 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1537,6 +1537,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1537
1537
  currentScopeId = instance && instance.type.__scopeId || null;
1538
1538
  return prev;
1539
1539
  }
1540
+ function pushScopeId(id) {
1541
+ currentScopeId = id;
1542
+ }
1543
+ function popScopeId() {
1544
+ currentScopeId = null;
1545
+ }
1540
1546
  function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
1541
1547
  if (!ctx)
1542
1548
  return fn;
@@ -6168,15 +6174,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6168
6174
  const RATING_STAR_HTML = "☆";
6169
6175
  const production = "https://api.lupasearch.com/v1/";
6170
6176
  const staging = "https://api.staging.lupasearch.com/v1/";
6171
- const Env = {
6177
+ const Env$1 = {
6172
6178
  production,
6173
6179
  staging
6174
6180
  };
6175
- const getApiUrl = (environment, customBaseUrl) => {
6181
+ const getApiUrl$1 = (environment, customBaseUrl) => {
6176
6182
  if (customBaseUrl) {
6177
6183
  return customBaseUrl;
6178
6184
  }
6179
- return Env[environment] || Env["production"];
6185
+ return Env$1[environment] || Env$1["production"];
6180
6186
  };
6181
6187
  var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
6182
6188
  function adopt(value) {
@@ -6205,14 +6211,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6205
6211
  step((generator = generator.apply(thisArg, _arguments || [])).next());
6206
6212
  });
6207
6213
  };
6208
- const defaultConfig = {
6214
+ const defaultConfig$1 = {
6209
6215
  method: "POST",
6210
6216
  headers: { "Content-Type": "application/json" }
6211
6217
  };
6212
6218
  const customRequestConfig = ({ customHeaders }) => {
6213
6219
  return {
6214
- method: defaultConfig.method,
6215
- headers: Object.assign(Object.assign({}, defaultConfig.headers), customHeaders !== null && customHeaders !== void 0 ? customHeaders : {})
6220
+ method: defaultConfig$1.method,
6221
+ headers: Object.assign(Object.assign({}, defaultConfig$1.headers), customHeaders !== null && customHeaders !== void 0 ? customHeaders : {})
6216
6222
  };
6217
6223
  };
6218
6224
  const searchCustom = (query, options) => __awaiter(void 0, void 0, void 0, function* () {
@@ -6236,7 +6242,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6236
6242
  return { success: false, errors };
6237
6243
  });
6238
6244
  const search = (queryKey, query, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6239
- const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}query/${queryKey}`, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
6245
+ const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}`, Object.assign(Object.assign({}, defaultConfig$1), { body: JSON.stringify(query) }));
6240
6246
  if (res.status < 400) {
6241
6247
  const data = yield res.json();
6242
6248
  return Object.assign(Object.assign({}, data), { success: true });
@@ -6246,7 +6252,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6246
6252
  });
6247
6253
  const queryByIds = (queryKey, ids, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6248
6254
  const idParam = ids.map((id) => `ids=${id}`).join("&");
6249
- const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}query/${queryKey}/ids?${idParam}`, Object.assign(Object.assign({}, defaultConfig), { method: "GET" }));
6255
+ const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}/ids?${idParam}`, Object.assign(Object.assign({}, defaultConfig$1), { method: "GET" }));
6250
6256
  if (res.status < 400) {
6251
6257
  const data = yield res.json();
6252
6258
  return Object.assign(Object.assign({}, data), { success: true });
@@ -6255,7 +6261,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6255
6261
  return { success: false, errors };
6256
6262
  });
6257
6263
  const recommend = (queryKey, recommendForId, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6258
- const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}recommendations/document/${recommendForId}?queryKey=${queryKey}`, Object.assign(Object.assign({}, defaultConfig), { method: "GET" }));
6264
+ const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}recommendations/document/${recommendForId}?queryKey=${queryKey}`, Object.assign(Object.assign({}, defaultConfig$1), { method: "GET" }));
6259
6265
  if (res.status < 400) {
6260
6266
  const data = yield res.json();
6261
6267
  return Object.assign(Object.assign({}, data), { success: true });
@@ -6264,7 +6270,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6264
6270
  return { success: false, errors };
6265
6271
  });
6266
6272
  const suggest = (queryKey, query, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6267
- const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}query/${queryKey}`, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
6273
+ const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}`, Object.assign(Object.assign({}, defaultConfig$1), { body: JSON.stringify(query) }));
6268
6274
  if (res.status < 400) {
6269
6275
  const items = yield res.json();
6270
6276
  return { items, success: true };
@@ -6273,7 +6279,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6273
6279
  return { success: false, errors };
6274
6280
  });
6275
6281
  const track$1 = (queryKey, event, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6276
- const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}events`, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(Object.assign({ queryKey }, event)) }));
6282
+ const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}events`, Object.assign(Object.assign({}, defaultConfig$1), { body: JSON.stringify(Object.assign({ queryKey }, event)) }));
6277
6283
  if (res.status < 400) {
6278
6284
  return { success: false };
6279
6285
  }
@@ -7656,16 +7662,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7656
7662
  resetHighlightIndex
7657
7663
  };
7658
7664
  });
7659
- const _hoisted_1$12 = { id: "lupa-search-box-input-container" };
7660
- const _hoisted_2$I = { class: "lupa-input-clear" };
7661
- const _hoisted_3$v = { id: "lupa-search-box-input" };
7662
- const _hoisted_4$o = ["value"];
7663
- const _hoisted_5$c = ["placeholder"];
7664
- const _hoisted_6$6 = {
7665
+ const _hoisted_1$19 = { id: "lupa-search-box-input-container" };
7666
+ const _hoisted_2$N = { class: "lupa-input-clear" };
7667
+ const _hoisted_3$A = { id: "lupa-search-box-input" };
7668
+ const _hoisted_4$r = ["value"];
7669
+ const _hoisted_5$f = ["placeholder"];
7670
+ const _hoisted_6$8 = {
7665
7671
  key: 0,
7666
7672
  class: "lupa-close-label"
7667
7673
  };
7668
- const _sfc_main$1a = /* @__PURE__ */ defineComponent({
7674
+ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
7669
7675
  __name: "SearchBoxInput",
7670
7676
  props: {
7671
7677
  options: {},
@@ -7742,19 +7748,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7742
7748
  };
7743
7749
  __expose({ focus });
7744
7750
  return (_ctx, _cache) => {
7745
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
7746
- createBaseVNode("div", _hoisted_2$I, [
7751
+ return openBlock(), createElementBlock("div", _hoisted_1$19, [
7752
+ createBaseVNode("div", _hoisted_2$N, [
7747
7753
  createBaseVNode("div", {
7748
7754
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
7749
7755
  onClick: clear2
7750
7756
  }, null, 2)
7751
7757
  ]),
7752
- createBaseVNode("div", _hoisted_3$v, [
7758
+ createBaseVNode("div", _hoisted_3$A, [
7753
7759
  createBaseVNode("input", {
7754
7760
  class: "lupa-hint",
7755
7761
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
7756
7762
  disabled: ""
7757
- }, null, 8, _hoisted_4$o),
7763
+ }, null, 8, _hoisted_4$r),
7758
7764
  withDirectives(createBaseVNode("input", mergeProps({
7759
7765
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
7760
7766
  }, inputAttributes.value, {
@@ -7767,7 +7773,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7767
7773
  placeholder: labels.value.placeholder,
7768
7774
  onInput: handleInput,
7769
7775
  onFocus: handleFocus
7770
- }), null, 16, _hoisted_5$c), [
7776
+ }), null, 16, _hoisted_5$f), [
7771
7777
  [vModelText, inputValue.value]
7772
7778
  ])
7773
7779
  ]),
@@ -7776,13 +7782,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7776
7782
  class: "lupa-close-search-container",
7777
7783
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
7778
7784
  }, [
7779
- labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
7785
+ labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
7780
7786
  ])) : createCommentVNode("", true)
7781
7787
  ]);
7782
7788
  };
7783
7789
  }
7784
7790
  });
7785
- const _sfc_main$19 = /* @__PURE__ */ defineComponent({
7791
+ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
7786
7792
  __name: "SearchBoxMoreResults",
7787
7793
  props: {
7788
7794
  labels: {},
@@ -7814,9 +7820,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7814
7820
  };
7815
7821
  }
7816
7822
  });
7817
- const _hoisted_1$11 = { class: "lupa-search-box-history-item" };
7818
- const _hoisted_2$H = { class: "lupa-search-box-history-item-content" };
7819
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
7823
+ const _hoisted_1$18 = { class: "lupa-search-box-history-item" };
7824
+ const _hoisted_2$M = { class: "lupa-search-box-history-item-content" };
7825
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
7820
7826
  __name: "SearchBoxHistoryItem",
7821
7827
  props: {
7822
7828
  item: {},
@@ -7832,8 +7838,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7832
7838
  emit2("click", { query: props.item });
7833
7839
  };
7834
7840
  return (_ctx, _cache) => {
7835
- return openBlock(), createElementBlock("div", _hoisted_1$11, [
7836
- createBaseVNode("div", _hoisted_2$H, [
7841
+ return openBlock(), createElementBlock("div", _hoisted_1$18, [
7842
+ createBaseVNode("div", _hoisted_2$M, [
7837
7843
  createBaseVNode("div", {
7838
7844
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
7839
7845
  onClick: click2
@@ -7847,11 +7853,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7847
7853
  };
7848
7854
  }
7849
7855
  });
7850
- const _hoisted_1$10 = {
7856
+ const _hoisted_1$17 = {
7851
7857
  key: 0,
7852
7858
  class: "lupa-search-box-history-panel"
7853
7859
  };
7854
- const _sfc_main$17 = /* @__PURE__ */ defineComponent({
7860
+ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
7855
7861
  __name: "SearchBoxHistoryPanel",
7856
7862
  props: {
7857
7863
  options: {}
@@ -7892,9 +7898,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7892
7898
  }
7893
7899
  };
7894
7900
  return (_ctx, _cache) => {
7895
- return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
7901
+ return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$17, [
7896
7902
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
7897
- return openBlock(), createBlock(_sfc_main$18, {
7903
+ return openBlock(), createBlock(_sfc_main$1f, {
7898
7904
  key: item,
7899
7905
  item,
7900
7906
  highlighted: index === highlightIndex.value,
@@ -7910,26 +7916,26 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7910
7916
  };
7911
7917
  }
7912
7918
  });
7913
- const _hoisted_1$$ = ["innerHTML"];
7914
- const _hoisted_2$G = {
7919
+ const _hoisted_1$16 = ["innerHTML"];
7920
+ const _hoisted_2$L = {
7915
7921
  key: 1,
7916
7922
  "data-cy": "lupa-suggestion-value",
7917
7923
  class: "lupa-suggestion-value"
7918
7924
  };
7919
- const _hoisted_3$u = {
7925
+ const _hoisted_3$z = {
7920
7926
  key: 2,
7921
7927
  class: "lupa-suggestion-facet",
7922
7928
  "data-cy": "lupa-suggestion-facet"
7923
7929
  };
7924
- const _hoisted_4$n = {
7930
+ const _hoisted_4$q = {
7925
7931
  class: "lupa-suggestion-facet-label",
7926
7932
  "data-cy": "lupa-suggestion-facet-label"
7927
7933
  };
7928
- const _hoisted_5$b = {
7934
+ const _hoisted_5$e = {
7929
7935
  class: "lupa-suggestion-facet-value",
7930
7936
  "data-cy": "lupa-suggestion-facet-value"
7931
7937
  };
7932
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
7938
+ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
7933
7939
  __name: "SearchBoxSuggestion",
7934
7940
  props: {
7935
7941
  suggestion: {},
@@ -7965,20 +7971,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7965
7971
  class: "lupa-suggestion-value",
7966
7972
  "data-cy": "lupa-suggestion-value",
7967
7973
  innerHTML: _ctx.suggestion.displayHighlight
7968
- }, null, 8, _hoisted_1$$)) : (openBlock(), createElementBlock("div", _hoisted_2$G, toDisplayString(_ctx.suggestion.display), 1)),
7969
- _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
7970
- createBaseVNode("span", _hoisted_4$n, toDisplayString(facetLabel.value), 1),
7971
- createBaseVNode("span", _hoisted_5$b, toDisplayString(_ctx.suggestion.facet.title), 1)
7974
+ }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(_ctx.suggestion.display), 1)),
7975
+ _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
7976
+ createBaseVNode("span", _hoisted_4$q, toDisplayString(facetLabel.value), 1),
7977
+ createBaseVNode("span", _hoisted_5$e, toDisplayString(_ctx.suggestion.facet.title), 1)
7972
7978
  ])) : createCommentVNode("", true)
7973
7979
  ]);
7974
7980
  };
7975
7981
  }
7976
7982
  });
7977
- const _hoisted_1$_ = {
7983
+ const _hoisted_1$15 = {
7978
7984
  id: "lupa-search-box-suggestions",
7979
7985
  "data-cy": "lupa-search-box-suggestions"
7980
7986
  };
7981
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7987
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
7982
7988
  __name: "SearchBoxSuggestions",
7983
7989
  props: {
7984
7990
  items: {},
@@ -8038,9 +8044,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8038
8044
  });
8039
8045
  });
8040
8046
  return (_ctx, _cache) => {
8041
- return openBlock(), createElementBlock("div", _hoisted_1$_, [
8047
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
8042
8048
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
8043
- return openBlock(), createBlock(_sfc_main$16, {
8049
+ return openBlock(), createBlock(_sfc_main$1d, {
8044
8050
  key: getSuggestionKey(item),
8045
8051
  class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
8046
8052
  suggestion: item,
@@ -8068,7 +8074,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8068
8074
  }, timeout);
8069
8075
  };
8070
8076
  };
8071
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8077
+ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
8072
8078
  __name: "SearchBoxSuggestionsWrapper",
8073
8079
  props: {
8074
8080
  panel: {},
@@ -8109,7 +8115,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8109
8115
  };
8110
8116
  const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
8111
8117
  return (_ctx, _cache) => {
8112
- return openBlock(), createBlock(_sfc_main$15, {
8118
+ return openBlock(), createBlock(_sfc_main$1c, {
8113
8119
  items: searchResult.value,
8114
8120
  highlight: _ctx.panel.highlight,
8115
8121
  queryKey: _ctx.panel.queryKey,
@@ -8187,8 +8193,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8187
8193
  });
8188
8194
  return { dynamicDataIdMap, loading, enhanceSearchResultsWithDynamicData };
8189
8195
  });
8190
- const _hoisted_1$Z = ["src"];
8191
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
8196
+ const _hoisted_1$14 = ["src"];
8197
+ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
8192
8198
  __name: "ProductImage",
8193
8199
  props: {
8194
8200
  item: {},
@@ -8236,12 +8242,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8236
8242
  class: normalizeClass((_b = _ctx.imageClass) != null ? _b : ""),
8237
8243
  src: finalUrl.value,
8238
8244
  onError: replaceWithPlaceholder
8239
- }, null, 42, _hoisted_1$Z)
8245
+ }, null, 42, _hoisted_1$14)
8240
8246
  ], 2);
8241
8247
  };
8242
8248
  }
8243
8249
  });
8244
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8250
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
8245
8251
  __name: "SearchBoxProductImage",
8246
8252
  props: {
8247
8253
  item: {},
@@ -8249,7 +8255,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8249
8255
  },
8250
8256
  setup(__props) {
8251
8257
  return (_ctx, _cache) => {
8252
- return openBlock(), createBlock(_sfc_main$13, {
8258
+ return openBlock(), createBlock(_sfc_main$1a, {
8253
8259
  item: _ctx.item,
8254
8260
  options: _ctx.options,
8255
8261
  "wrapper-class": "lupa-search-box-image-wrapper",
@@ -8258,12 +8264,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8258
8264
  };
8259
8265
  }
8260
8266
  });
8261
- const _hoisted_1$Y = ["innerHTML"];
8262
- const _hoisted_2$F = {
8267
+ const _hoisted_1$13 = ["innerHTML"];
8268
+ const _hoisted_2$K = {
8263
8269
  key: 1,
8264
8270
  class: "lupa-search-box-product-title"
8265
8271
  };
8266
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
8272
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
8267
8273
  __name: "SearchBoxProductTitle",
8268
8274
  props: {
8269
8275
  item: {},
@@ -8283,18 +8289,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8283
8289
  key: 0,
8284
8290
  class: "lupa-search-box-product-title",
8285
8291
  innerHTML: title.value
8286
- }, null, 8, _hoisted_1$Y)) : (openBlock(), createElementBlock("div", _hoisted_2$F, [
8292
+ }, null, 8, _hoisted_1$13)) : (openBlock(), createElementBlock("div", _hoisted_2$K, [
8287
8293
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
8288
8294
  ]));
8289
8295
  };
8290
8296
  }
8291
8297
  });
8292
- const _hoisted_1$X = ["innerHTML"];
8293
- const _hoisted_2$E = {
8298
+ const _hoisted_1$12 = ["innerHTML"];
8299
+ const _hoisted_2$J = {
8294
8300
  key: 1,
8295
8301
  class: "lupa-search-box-product-description"
8296
8302
  };
8297
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8303
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
8298
8304
  __name: "SearchBoxProductDescription",
8299
8305
  props: {
8300
8306
  item: {},
@@ -8314,12 +8320,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8314
8320
  key: 0,
8315
8321
  class: "lupa-search-box-product-description",
8316
8322
  innerHTML: description.value
8317
- }, null, 8, _hoisted_1$X)) : (openBlock(), createElementBlock("div", _hoisted_2$E, toDisplayString(description.value), 1));
8323
+ }, null, 8, _hoisted_1$12)) : (openBlock(), createElementBlock("div", _hoisted_2$J, toDisplayString(description.value), 1));
8318
8324
  };
8319
8325
  }
8320
8326
  });
8321
- const _hoisted_1$W = { class: "lupa-search-box-product-price" };
8322
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
8327
+ const _hoisted_1$11 = { class: "lupa-search-box-product-price" };
8328
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
8323
8329
  __name: "SearchBoxProductPrice",
8324
8330
  props: {
8325
8331
  item: {},
@@ -8337,14 +8343,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8337
8343
  );
8338
8344
  });
8339
8345
  return (_ctx, _cache) => {
8340
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
8346
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
8341
8347
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
8342
8348
  ]);
8343
8349
  };
8344
8350
  }
8345
8351
  });
8346
- const _hoisted_1$V = { class: "lupa-search-box-product-regular-price" };
8347
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
8352
+ const _hoisted_1$10 = { class: "lupa-search-box-product-regular-price" };
8353
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
8348
8354
  __name: "SearchBoxProductRegularPrice",
8349
8355
  props: {
8350
8356
  item: {},
@@ -8362,16 +8368,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8362
8368
  );
8363
8369
  });
8364
8370
  return (_ctx, _cache) => {
8365
- return openBlock(), createElementBlock("div", _hoisted_1$V, toDisplayString(price.value), 1);
8371
+ return openBlock(), createElementBlock("div", _hoisted_1$10, toDisplayString(price.value), 1);
8366
8372
  };
8367
8373
  }
8368
8374
  });
8369
- const _hoisted_1$U = ["innerHTML"];
8370
- const _hoisted_2$D = { key: 0 };
8371
- const _hoisted_3$t = { key: 1 };
8372
- const _hoisted_4$m = { class: "lupa-search-box-custom-label" };
8373
- const _hoisted_5$a = { class: "lupa-search-box-custom-text" };
8374
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
8375
+ const _hoisted_1$$ = ["innerHTML"];
8376
+ const _hoisted_2$I = { key: 0 };
8377
+ const _hoisted_3$y = { key: 1 };
8378
+ const _hoisted_4$p = { class: "lupa-search-box-custom-label" };
8379
+ const _hoisted_5$d = { class: "lupa-search-box-custom-text" };
8380
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8375
8381
  __name: "SearchBoxProductCustom",
8376
8382
  props: {
8377
8383
  item: {},
@@ -8397,20 +8403,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8397
8403
  key: 0,
8398
8404
  class: [className.value, "lupa-search-box-product-custom"],
8399
8405
  innerHTML: text.value
8400
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$U)) : (openBlock(), createElementBlock("div", mergeProps({
8406
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$$)) : (openBlock(), createElementBlock("div", mergeProps({
8401
8407
  key: 1,
8402
8408
  class: [className.value, "lupa-search-box-product-custom"]
8403
8409
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
8404
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$D, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$t, [
8405
- createBaseVNode("div", _hoisted_4$m, toDisplayString(label.value), 1),
8406
- createBaseVNode("div", _hoisted_5$a, toDisplayString(text.value), 1)
8410
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$I, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
8411
+ createBaseVNode("div", _hoisted_4$p, toDisplayString(label.value), 1),
8412
+ createBaseVNode("div", _hoisted_5$d, toDisplayString(text.value), 1)
8407
8413
  ]))
8408
8414
  ], 16));
8409
8415
  };
8410
8416
  }
8411
8417
  });
8412
- const _hoisted_1$T = ["innerHTML"];
8413
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
8418
+ const _hoisted_1$_ = ["innerHTML"];
8419
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
8414
8420
  __name: "SearchBoxProductCustomHtml",
8415
8421
  props: {
8416
8422
  item: {},
@@ -8430,7 +8436,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8430
8436
  return openBlock(), createElementBlock("div", mergeProps({
8431
8437
  class: className.value,
8432
8438
  innerHTML: text.value
8433
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$T);
8439
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$_);
8434
8440
  };
8435
8441
  }
8436
8442
  });
@@ -8625,10 +8631,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8625
8631
  setLoading
8626
8632
  };
8627
8633
  });
8628
- const _hoisted_1$S = { class: "lupa-search-box-add-to-cart-wrapper" };
8629
- const _hoisted_2$C = { class: "lupa-search-box-product-addtocart" };
8630
- const _hoisted_3$s = ["onClick", "disabled"];
8631
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
8634
+ const _hoisted_1$Z = { class: "lupa-search-box-add-to-cart-wrapper" };
8635
+ const _hoisted_2$H = { class: "lupa-search-box-product-addtocart" };
8636
+ const _hoisted_3$x = ["onClick", "disabled"];
8637
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8632
8638
  __name: "SearchBoxProductAddToCart",
8633
8639
  props: {
8634
8640
  item: {},
@@ -8655,15 +8661,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8655
8661
  loading.value = false;
8656
8662
  });
8657
8663
  return (_ctx, _cache) => {
8658
- return openBlock(), createElementBlock("div", _hoisted_1$S, [
8659
- createBaseVNode("div", _hoisted_2$C, [
8664
+ return openBlock(), createElementBlock("div", _hoisted_1$Z, [
8665
+ createBaseVNode("div", _hoisted_2$H, [
8660
8666
  createBaseVNode("button", {
8661
8667
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
8662
8668
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
8663
8669
  "data-cy": "lupa-add-to-cart",
8664
8670
  type: "button",
8665
8671
  disabled: !inStockValue.value || loading.value
8666
- }, toDisplayString(label.value), 11, _hoisted_3$s)
8672
+ }, toDisplayString(label.value), 11, _hoisted_3$x)
8667
8673
  ])
8668
8674
  ]);
8669
8675
  };
@@ -8671,17 +8677,17 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8671
8677
  });
8672
8678
  const __default__$4 = {
8673
8679
  components: {
8674
- SearchBoxProductImage: _sfc_main$12,
8675
- SearchBoxProductTitle: _sfc_main$11,
8676
- SearchBoxProductDescription: _sfc_main$10,
8677
- SearchBoxProductPrice: _sfc_main$$,
8678
- SearchBoxProductRegularPrice: _sfc_main$_,
8679
- SearchBoxProductCustom: _sfc_main$Z,
8680
- SearchBoxProductCustomHtml: _sfc_main$Y,
8681
- SearchBoxProductAddToCart: _sfc_main$X
8680
+ SearchBoxProductImage: _sfc_main$19,
8681
+ SearchBoxProductTitle: _sfc_main$18,
8682
+ SearchBoxProductDescription: _sfc_main$17,
8683
+ SearchBoxProductPrice: _sfc_main$16,
8684
+ SearchBoxProductRegularPrice: _sfc_main$15,
8685
+ SearchBoxProductCustom: _sfc_main$14,
8686
+ SearchBoxProductCustomHtml: _sfc_main$13,
8687
+ SearchBoxProductAddToCart: _sfc_main$12
8682
8688
  }
8683
8689
  };
8684
- const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
8690
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
8685
8691
  __name: "SearchBoxProductElement",
8686
8692
  props: {
8687
8693
  item: {},
@@ -8795,14 +8801,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8795
8801
  };
8796
8802
  return { trackSearch, trackResults, trackEvent };
8797
8803
  });
8798
- const _hoisted_1$R = ["href"];
8799
- const _hoisted_2$B = { class: "lupa-search-box-product-image-section" };
8800
- const _hoisted_3$r = { class: "lupa-search-box-product-details-section" };
8801
- const _hoisted_4$l = {
8804
+ const _hoisted_1$Y = ["href"];
8805
+ const _hoisted_2$G = { class: "lupa-search-box-product-image-section" };
8806
+ const _hoisted_3$w = { class: "lupa-search-box-product-details-section" };
8807
+ const _hoisted_4$o = {
8802
8808
  key: 0,
8803
8809
  class: "lupa-search-box-product-add-to-cart-section"
8804
8810
  };
8805
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
8811
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8806
8812
  __name: "SearchBoxProduct",
8807
8813
  props: {
8808
8814
  item: {},
@@ -8895,9 +8901,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8895
8901
  href: link.value,
8896
8902
  onClick: handleClick
8897
8903
  }, [
8898
- createBaseVNode("div", _hoisted_2$B, [
8904
+ createBaseVNode("div", _hoisted_2$G, [
8899
8905
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
8900
- return openBlock(), createBlock(_sfc_main$W, {
8906
+ return openBlock(), createBlock(_sfc_main$11, {
8901
8907
  class: "lupa-search-box-product-element",
8902
8908
  item: _ctx.item,
8903
8909
  element,
@@ -8907,9 +8913,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8907
8913
  }, null, 8, ["item", "element", "labels", "link"]);
8908
8914
  }), 128))
8909
8915
  ]),
8910
- createBaseVNode("div", _hoisted_3$r, [
8916
+ createBaseVNode("div", _hoisted_3$w, [
8911
8917
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
8912
- return openBlock(), createBlock(_sfc_main$W, {
8918
+ return openBlock(), createBlock(_sfc_main$11, {
8913
8919
  class: "lupa-search-box-product-element",
8914
8920
  item: _ctx.item,
8915
8921
  element,
@@ -8919,8 +8925,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8919
8925
  }, null, 8, ["item", "element", "labels", "link"]);
8920
8926
  }), 128))
8921
8927
  ]),
8922
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$l, [
8923
- createVNode(_sfc_main$W, {
8928
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
8929
+ createVNode(_sfc_main$11, {
8924
8930
  class: "lupa-search-box-product-element",
8925
8931
  item: _ctx.item,
8926
8932
  element: addToCartElement.value,
@@ -8929,12 +8935,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8929
8935
  isInStock: isInStock.value
8930
8936
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
8931
8937
  ])) : createCommentVNode("", true)
8932
- ], 10, _hoisted_1$R);
8938
+ ], 10, _hoisted_1$Y);
8933
8939
  };
8934
8940
  }
8935
8941
  });
8936
- const _hoisted_1$Q = { id: "lupa-search-box-products" };
8937
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
8942
+ const _hoisted_1$X = { id: "lupa-search-box-products" };
8943
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
8938
8944
  __name: "SearchBoxProducts",
8939
8945
  props: {
8940
8946
  items: {},
@@ -8954,7 +8960,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8954
8960
  return (_c = (_b = highlightedItem.value) == null ? void 0 : _b.index) != null ? _c : -1;
8955
8961
  });
8956
8962
  return (_ctx, _cache) => {
8957
- return openBlock(), createElementBlock("div", _hoisted_1$Q, [
8963
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
8958
8964
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
8959
8965
  return renderSlot(_ctx.$slots, "productCard", {
8960
8966
  key: index,
@@ -8966,7 +8972,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8966
8972
  onProductClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("product-click"))
8967
8973
  });
8968
8974
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
8969
- return openBlock(), createBlock(_sfc_main$V, {
8975
+ return openBlock(), createBlock(_sfc_main$10, {
8970
8976
  key: index,
8971
8977
  item,
8972
8978
  panelOptions: _ctx.panelOptions,
@@ -8980,7 +8986,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8980
8986
  };
8981
8987
  }
8982
8988
  });
8983
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
8989
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
8984
8990
  __name: "SearchBoxProductsWrapper",
8985
8991
  props: {
8986
8992
  panel: {},
@@ -9032,7 +9038,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9032
9038
  const getItemsDebounced = debounce$1(getItems, props.debounce);
9033
9039
  return (_ctx, _cache) => {
9034
9040
  var _a, _b;
9035
- return openBlock(), createBlock(_sfc_main$U, {
9041
+ return openBlock(), createBlock(_sfc_main$$, {
9036
9042
  items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
9037
9043
  panelOptions: _ctx.panel,
9038
9044
  labels: _ctx.labels,
@@ -9050,26 +9056,26 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9050
9056
  };
9051
9057
  }
9052
9058
  });
9053
- const _hoisted_1$P = {
9059
+ const _hoisted_1$W = {
9054
9060
  key: 0,
9055
9061
  id: "lupa-search-box-panel"
9056
9062
  };
9057
- const _hoisted_2$A = {
9063
+ const _hoisted_2$F = {
9058
9064
  class: "lupa-main-panel",
9059
9065
  "data-cy": "lupa-main-panel"
9060
9066
  };
9061
- const _hoisted_3$q = ["data-cy"];
9062
- const _hoisted_4$k = {
9067
+ const _hoisted_3$v = ["data-cy"];
9068
+ const _hoisted_4$n = {
9063
9069
  key: 1,
9064
9070
  id: "lupa-search-box-panel"
9065
9071
  };
9066
9072
  const __default__$3 = {
9067
9073
  components: {
9068
- SearchBoxSuggestionsWrapper: _sfc_main$14,
9069
- SearchBoxProductsWrapper: _sfc_main$T
9074
+ SearchBoxSuggestionsWrapper: _sfc_main$1b,
9075
+ SearchBoxProductsWrapper: _sfc_main$_
9070
9076
  }
9071
9077
  };
9072
- const _sfc_main$S = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
9078
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
9073
9079
  __name: "SearchBoxMainPanel",
9074
9080
  props: {
9075
9081
  options: {},
@@ -9183,8 +9189,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9183
9189
  ref_key: "panelContainer",
9184
9190
  ref: panelContainer
9185
9191
  }, [
9186
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$P, [
9187
- createBaseVNode("div", _hoisted_2$A, [
9192
+ displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$W, [
9193
+ createBaseVNode("div", _hoisted_2$F, [
9188
9194
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayPanels.value, (panel, index) => {
9189
9195
  return openBlock(), createElementBlock("div", {
9190
9196
  key: index,
@@ -9213,16 +9219,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9213
9219
  key: "0"
9214
9220
  } : void 0
9215
9221
  ]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
9216
- ], 10, _hoisted_3$q);
9222
+ ], 10, _hoisted_3$v);
9217
9223
  }), 128))
9218
9224
  ]),
9219
- createVNode(_sfc_main$19, {
9225
+ createVNode(_sfc_main$1g, {
9220
9226
  labels: labels.value,
9221
9227
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
9222
9228
  onGoToResults: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("go-to-results"))
9223
9229
  }, null, 8, ["labels", "showTotalCount"])
9224
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$k, [
9225
- createVNode(_sfc_main$17, {
9230
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$n, [
9231
+ createVNode(_sfc_main$1e, {
9226
9232
  options: _ctx.options.history,
9227
9233
  history: history.value,
9228
9234
  onGoToResults: handleGoToResults,
@@ -9247,9 +9253,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9247
9253
  const elements = getElements(triggers);
9248
9254
  elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
9249
9255
  };
9250
- const _hoisted_1$O = { id: "lupa-search-box" };
9251
- const _hoisted_2$z = { class: "lupa-search-box-wrapper" };
9252
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
9256
+ const _hoisted_1$V = { id: "lupa-search-box" };
9257
+ const _hoisted_2$E = { class: "lupa-search-box-wrapper" };
9258
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9253
9259
  __name: "SearchBox",
9254
9260
  props: {
9255
9261
  options: {},
@@ -9482,9 +9488,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9482
9488
  };
9483
9489
  return (_ctx, _cache) => {
9484
9490
  var _a2;
9485
- return openBlock(), createElementBlock("div", _hoisted_1$O, [
9486
- createBaseVNode("div", _hoisted_2$z, [
9487
- createVNode(_sfc_main$1a, {
9491
+ return openBlock(), createElementBlock("div", _hoisted_1$V, [
9492
+ createBaseVNode("div", _hoisted_2$E, [
9493
+ createVNode(_sfc_main$1h, {
9488
9494
  options: inputOptions.value,
9489
9495
  suggestedValue: suggestedValue.value,
9490
9496
  "can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
@@ -9495,7 +9501,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9495
9501
  onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
9496
9502
  onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
9497
9503
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
9498
- opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$S, {
9504
+ opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$Z, {
9499
9505
  key: 0,
9500
9506
  options: panelOptions.value,
9501
9507
  inputValue: inputValue.value,
@@ -9582,20 +9588,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9582
9588
  }
9583
9589
  return searchParams;
9584
9590
  };
9585
- const _hoisted_1$N = {
9591
+ const _hoisted_1$U = {
9586
9592
  key: 0,
9587
9593
  id: "lupa-search-results-did-you-mean"
9588
9594
  };
9589
- const _hoisted_2$y = {
9595
+ const _hoisted_2$D = {
9590
9596
  key: 0,
9591
9597
  "data-cy": "suggested-search-text-label"
9592
9598
  };
9593
- const _hoisted_3$p = {
9599
+ const _hoisted_3$u = {
9594
9600
  key: 1,
9595
9601
  "data-cy": "did-you-mean-label"
9596
9602
  };
9597
- const _hoisted_4$j = { key: 1 };
9598
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
9603
+ const _hoisted_4$m = { key: 1 };
9604
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
9599
9605
  __name: "SearchResultsDidYouMean",
9600
9606
  props: {
9601
9607
  labels: {}
@@ -9627,8 +9633,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9627
9633
  paramStore.goToResults({ searchText, facet });
9628
9634
  };
9629
9635
  return (_ctx, _cache) => {
9630
- return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
9631
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
9636
+ return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$U, [
9637
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
9632
9638
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
9633
9639
  return openBlock(), createElementBlock("span", { key: index }, [
9634
9640
  createBaseVNode("span", {
@@ -9637,7 +9643,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9637
9643
  ]);
9638
9644
  }), 128))
9639
9645
  ])) : createCommentVNode("", true),
9640
- didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$p, [
9646
+ didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
9641
9647
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
9642
9648
  return openBlock(), createElementBlock("span", { key: index }, [
9643
9649
  label.includes("{1}") ? (openBlock(), createElementBlock("span", {
@@ -9645,7 +9651,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9645
9651
  class: "lupa-did-you-mean lupa-highlighted-search-text",
9646
9652
  "data-cy": "did-you-mean-value",
9647
9653
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
9648
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$j, toDisplayString(label) + " ", 1))
9654
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$m, toDisplayString(label) + " ", 1))
9649
9655
  ]);
9650
9656
  }), 128))
9651
9657
  ])) : createCommentVNode("", true)
@@ -9653,12 +9659,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9653
9659
  };
9654
9660
  }
9655
9661
  });
9656
- const _hoisted_1$M = {
9662
+ const _hoisted_1$T = {
9657
9663
  key: 0,
9658
9664
  class: "lupa-search-results-summary"
9659
9665
  };
9660
- const _hoisted_2$x = ["innerHTML"];
9661
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
9666
+ const _hoisted_2$C = ["innerHTML"];
9667
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9662
9668
  __name: "SearchResultsSummary",
9663
9669
  props: {
9664
9670
  label: {},
@@ -9673,8 +9679,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9673
9679
  return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
9674
9680
  });
9675
9681
  return (_ctx, _cache) => {
9676
- return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$M, [
9677
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$x),
9682
+ return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
9683
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$C),
9678
9684
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
9679
9685
  key: 0,
9680
9686
  class: "lupa-filter-clear",
@@ -9685,18 +9691,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9685
9691
  };
9686
9692
  }
9687
9693
  });
9688
- const _hoisted_1$L = {
9694
+ const _hoisted_1$S = {
9689
9695
  key: 0,
9690
9696
  class: "lupa-result-page-title",
9691
9697
  "data-cy": "lupa-result-page-title"
9692
9698
  };
9693
- const _hoisted_2$w = { key: 0 };
9694
- const _hoisted_3$o = {
9699
+ const _hoisted_2$B = { key: 0 };
9700
+ const _hoisted_3$t = {
9695
9701
  key: 1,
9696
9702
  class: "lupa-results-total-count"
9697
9703
  };
9698
- const _hoisted_4$i = ["innerHTML"];
9699
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
9704
+ const _hoisted_4$l = ["innerHTML"];
9705
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9700
9706
  __name: "SearchResultsTitle",
9701
9707
  props: {
9702
9708
  options: {},
@@ -9731,12 +9737,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9731
9737
  });
9732
9738
  return (_ctx, _cache) => {
9733
9739
  return openBlock(), createElementBlock("div", null, [
9734
- showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$L, [
9740
+ showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$S, [
9735
9741
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
9736
- queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$w, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
9737
- showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$o, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
9742
+ queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$B, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
9743
+ showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$t, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
9738
9744
  ])) : createCommentVNode("", true),
9739
- _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$P, {
9745
+ _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$W, {
9740
9746
  key: 1,
9741
9747
  label: summaryLabel.value
9742
9748
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -9744,21 +9750,21 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9744
9750
  key: 2,
9745
9751
  class: "lupa-result-page-description-top",
9746
9752
  innerHTML: descriptionTop.value
9747
- }, null, 8, _hoisted_4$i)) : createCommentVNode("", true)
9753
+ }, null, 8, _hoisted_4$l)) : createCommentVNode("", true)
9748
9754
  ]);
9749
9755
  };
9750
9756
  }
9751
9757
  });
9752
- const _hoisted_1$K = { class: "lupa-search-result-filter-value" };
9753
- const _hoisted_2$v = {
9758
+ const _hoisted_1$R = { class: "lupa-search-result-filter-value" };
9759
+ const _hoisted_2$A = {
9754
9760
  class: "lupa-current-filter-label",
9755
9761
  "data-cy": "lupa-current-filter-label"
9756
9762
  };
9757
- const _hoisted_3$n = {
9763
+ const _hoisted_3$s = {
9758
9764
  class: "lupa-current-filter-value",
9759
9765
  "data-cy": "lupa-current-filter-value"
9760
9766
  };
9761
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
9767
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
9762
9768
  __name: "CurrentFilterDisplay",
9763
9769
  props: {
9764
9770
  filter: {}
@@ -9770,28 +9776,28 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9770
9776
  emit2("remove", { filter: props.filter });
9771
9777
  };
9772
9778
  return (_ctx, _cache) => {
9773
- return openBlock(), createElementBlock("div", _hoisted_1$K, [
9779
+ return openBlock(), createElementBlock("div", _hoisted_1$R, [
9774
9780
  createBaseVNode("div", {
9775
9781
  class: "lupa-current-filter-action",
9776
9782
  onClick: handleClick
9777
9783
  }, "⨉"),
9778
- createBaseVNode("div", _hoisted_2$v, toDisplayString(_ctx.filter.label) + ": ", 1),
9779
- createBaseVNode("div", _hoisted_3$n, toDisplayString(_ctx.filter.value), 1)
9784
+ createBaseVNode("div", _hoisted_2$A, toDisplayString(_ctx.filter.label) + ": ", 1),
9785
+ createBaseVNode("div", _hoisted_3$s, toDisplayString(_ctx.filter.value), 1)
9780
9786
  ]);
9781
9787
  };
9782
9788
  }
9783
9789
  });
9784
- const _hoisted_1$J = { class: "lupa-filter-title-text" };
9785
- const _hoisted_2$u = {
9790
+ const _hoisted_1$Q = { class: "lupa-filter-title-text" };
9791
+ const _hoisted_2$z = {
9786
9792
  key: 0,
9787
9793
  class: "lupa-filter-count"
9788
9794
  };
9789
- const _hoisted_3$m = {
9795
+ const _hoisted_3$r = {
9790
9796
  key: 0,
9791
9797
  class: "filter-values"
9792
9798
  };
9793
- const _hoisted_4$h = { class: "lupa-current-filter-list" };
9794
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
9799
+ const _hoisted_4$k = { class: "lupa-current-filter-list" };
9800
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
9795
9801
  __name: "CurrentFilters",
9796
9802
  props: {
9797
9803
  options: {},
@@ -9846,19 +9852,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9846
9852
  class: "lupa-current-filter-title",
9847
9853
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
9848
9854
  }, [
9849
- createBaseVNode("div", _hoisted_1$J, [
9855
+ createBaseVNode("div", _hoisted_1$Q, [
9850
9856
  createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
9851
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$u, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
9857
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$z, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
9852
9858
  ]),
9853
9859
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
9854
9860
  key: 0,
9855
9861
  class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
9856
9862
  }, null, 2)) : createCommentVNode("", true)
9857
9863
  ]),
9858
- !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, [
9859
- createBaseVNode("div", _hoisted_4$h, [
9864
+ !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
9865
+ createBaseVNode("div", _hoisted_4$k, [
9860
9866
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
9861
- return openBlock(), createBlock(_sfc_main$N, {
9867
+ return openBlock(), createBlock(_sfc_main$U, {
9862
9868
  key: filter.key + "_" + filter.value,
9863
9869
  filter,
9864
9870
  onRemove: handleRemove
@@ -9875,8 +9881,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9875
9881
  };
9876
9882
  }
9877
9883
  });
9878
- const _hoisted_1$I = ["href"];
9879
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
9884
+ const _hoisted_1$P = ["href"];
9885
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9880
9886
  __name: "CategoryFilterItem",
9881
9887
  props: {
9882
9888
  options: {},
@@ -9913,20 +9919,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9913
9919
  "data-cy": "lupa-child-category-item",
9914
9920
  href: urlLink.value,
9915
9921
  onClick: handleNavigation
9916
- }, toDisplayString(title.value), 9, _hoisted_1$I)
9922
+ }, toDisplayString(title.value), 9, _hoisted_1$P)
9917
9923
  ], 2);
9918
9924
  };
9919
9925
  }
9920
9926
  });
9921
- const _hoisted_1$H = {
9927
+ const _hoisted_1$O = {
9922
9928
  class: "lupa-category-filter",
9923
9929
  "data-cy": "lupa-category-filter"
9924
9930
  };
9925
- const _hoisted_2$t = { class: "lupa-category-back" };
9926
- const _hoisted_3$l = ["href"];
9927
- const _hoisted_4$g = ["href"];
9928
- const _hoisted_5$9 = { class: "lupa-child-category-list" };
9929
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
9931
+ const _hoisted_2$y = { class: "lupa-category-back" };
9932
+ const _hoisted_3$q = ["href"];
9933
+ const _hoisted_4$j = ["href"];
9934
+ const _hoisted_5$c = { class: "lupa-child-category-list" };
9935
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
9930
9936
  __name: "CategoryFilter",
9931
9937
  props: {
9932
9938
  options: {}
@@ -10012,14 +10018,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10012
10018
  };
10013
10019
  __expose({ fetch: fetch2 });
10014
10020
  return (_ctx, _cache) => {
10015
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
10016
- createBaseVNode("div", _hoisted_2$t, [
10021
+ return openBlock(), createElementBlock("div", _hoisted_1$O, [
10022
+ createBaseVNode("div", _hoisted_2$y, [
10017
10023
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
10018
10024
  key: 0,
10019
10025
  "data-cy": "lupa-category-back",
10020
10026
  href: backUrlLink.value,
10021
10027
  onClick: handleNavigationBack
10022
- }, toDisplayString(backTitle.value), 9, _hoisted_3$l)) : createCommentVNode("", true)
10028
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$q)) : createCommentVNode("", true)
10023
10029
  ]),
10024
10030
  createBaseVNode("div", {
10025
10031
  class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
@@ -10029,11 +10035,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10029
10035
  href: parentUrlLink.value,
10030
10036
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
10031
10037
  onClick: handleNavigationParent
10032
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$g)
10038
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$j)
10033
10039
  ], 2),
10034
- createBaseVNode("div", _hoisted_5$9, [
10040
+ createBaseVNode("div", _hoisted_5$c, [
10035
10041
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
10036
- return openBlock(), createBlock(_sfc_main$L, {
10042
+ return openBlock(), createBlock(_sfc_main$S, {
10037
10043
  key: getCategoryKey(child),
10038
10044
  item: child,
10039
10045
  options: _ctx.options
@@ -10044,23 +10050,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10044
10050
  };
10045
10051
  }
10046
10052
  });
10047
- const _hoisted_1$G = {
10053
+ const _hoisted_1$N = {
10048
10054
  class: "lupa-search-result-facet-term-values",
10049
10055
  "data-cy": "lupa-search-result-facet-term-values"
10050
10056
  };
10051
- const _hoisted_2$s = ["placeholder"];
10052
- const _hoisted_3$k = { class: "lupa-terms-list" };
10053
- const _hoisted_4$f = ["onClick"];
10054
- const _hoisted_5$8 = { class: "lupa-term-checkbox-wrapper" };
10055
- const _hoisted_6$5 = { class: "lupa-term-checkbox-label" };
10056
- const _hoisted_7$5 = { class: "lupa-term-label" };
10057
+ const _hoisted_2$x = ["placeholder"];
10058
+ const _hoisted_3$p = { class: "lupa-terms-list" };
10059
+ const _hoisted_4$i = ["onClick"];
10060
+ const _hoisted_5$b = { class: "lupa-term-checkbox-wrapper" };
10061
+ const _hoisted_6$7 = { class: "lupa-term-checkbox-label" };
10062
+ const _hoisted_7$6 = { class: "lupa-term-label" };
10057
10063
  const _hoisted_8$1 = {
10058
10064
  key: 0,
10059
10065
  class: "lupa-term-count"
10060
10066
  };
10061
10067
  const _hoisted_9$1 = { key: 0 };
10062
10068
  const _hoisted_10$1 = { key: 1 };
10063
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
10069
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
10064
10070
  __name: "TermFacet",
10065
10071
  props: {
10066
10072
  options: {},
@@ -10129,17 +10135,17 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10129
10135
  return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
10130
10136
  };
10131
10137
  return (_ctx, _cache) => {
10132
- return openBlock(), createElementBlock("div", _hoisted_1$G, [
10138
+ return openBlock(), createElementBlock("div", _hoisted_1$N, [
10133
10139
  isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
10134
10140
  key: 0,
10135
10141
  class: "lupa-term-filter",
10136
10142
  "data-cy": "lupa-term-filter",
10137
10143
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
10138
10144
  placeholder: _ctx.options.labels.facetFilter
10139
- }, null, 8, _hoisted_2$s)), [
10145
+ }, null, 8, _hoisted_2$x)), [
10140
10146
  [vModelText, termFilter.value]
10141
10147
  ]) : createCommentVNode("", true),
10142
- createBaseVNode("div", _hoisted_3$k, [
10148
+ createBaseVNode("div", _hoisted_3$p, [
10143
10149
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
10144
10150
  return openBlock(), createElementBlock("div", {
10145
10151
  class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
@@ -10147,16 +10153,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10147
10153
  key: item.title,
10148
10154
  onClick: ($event) => handleFacetClick(item)
10149
10155
  }, [
10150
- createBaseVNode("div", _hoisted_5$8, [
10156
+ createBaseVNode("div", _hoisted_5$b, [
10151
10157
  createBaseVNode("span", {
10152
10158
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
10153
10159
  }, null, 2)
10154
10160
  ]),
10155
- createBaseVNode("div", _hoisted_6$5, [
10156
- createBaseVNode("span", _hoisted_7$5, toDisplayString(item.title), 1),
10161
+ createBaseVNode("div", _hoisted_6$7, [
10162
+ createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
10157
10163
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
10158
10164
  ])
10159
- ], 10, _hoisted_4$f);
10165
+ ], 10, _hoisted_4$i);
10160
10166
  }), 128))
10161
10167
  ]),
10162
10168
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -11147,22 +11153,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11147
11153
  m.render = function(e, t, r, i, n, o) {
11148
11154
  return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
11149
11155
  }, m.__file = "src/Slider.vue";
11150
- const _hoisted_1$F = { class: "lupa-search-result-facet-stats-values" };
11151
- const _hoisted_2$r = {
11156
+ const _hoisted_1$M = { class: "lupa-search-result-facet-stats-values" };
11157
+ const _hoisted_2$w = {
11152
11158
  key: 0,
11153
11159
  class: "lupa-stats-facet-summary"
11154
11160
  };
11155
- const _hoisted_3$j = {
11161
+ const _hoisted_3$o = {
11156
11162
  key: 1,
11157
11163
  class: "lupa-stats-facet-summary-input"
11158
11164
  };
11159
- const _hoisted_4$e = {
11165
+ const _hoisted_4$h = {
11160
11166
  key: 0,
11161
11167
  class: "lupa-stats-range-label"
11162
11168
  };
11163
- const _hoisted_5$7 = { class: "lupa-stats-from" };
11164
- const _hoisted_6$4 = ["max", "min", "pattern"];
11165
- const _hoisted_7$4 = { key: 0 };
11169
+ const _hoisted_5$a = { class: "lupa-stats-from" };
11170
+ const _hoisted_6$6 = ["max", "min", "pattern"];
11171
+ const _hoisted_7$5 = { key: 0 };
11166
11172
  const _hoisted_8 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
11167
11173
  const _hoisted_9 = {
11168
11174
  key: 0,
@@ -11175,7 +11181,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11175
11181
  key: 2,
11176
11182
  class: "lupa-stats-slider-wrapper"
11177
11183
  };
11178
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
11184
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
11179
11185
  __name: "StatsFacet",
11180
11186
  props: {
11181
11187
  options: {},
@@ -11323,11 +11329,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11323
11329
  innerSliderRange.value = value;
11324
11330
  };
11325
11331
  return (_ctx, _cache) => {
11326
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
11327
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$j, [
11332
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [
11333
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
11328
11334
  createBaseVNode("div", null, [
11329
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
11330
- createBaseVNode("div", _hoisted_5$7, [
11335
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
11336
+ createBaseVNode("div", _hoisted_5$a, [
11331
11337
  withDirectives(createBaseVNode("input", {
11332
11338
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
11333
11339
  type: "text",
@@ -11335,7 +11341,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11335
11341
  max: facetMax.value,
11336
11342
  min: facetMin.value,
11337
11343
  pattern: sliderInputFormat.value
11338
- }, null, 8, _hoisted_6$4), [
11344
+ }, null, 8, _hoisted_6$6), [
11339
11345
  [
11340
11346
  vModelText,
11341
11347
  fromValue.value,
@@ -11343,7 +11349,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11343
11349
  { lazy: true }
11344
11350
  ]
11345
11351
  ]),
11346
- isPrice.value ? (openBlock(), createElementBlock("span", _hoisted_7$4, toDisplayString(currency.value), 1)) : createCommentVNode("", true)
11352
+ isPrice.value ? (openBlock(), createElementBlock("span", _hoisted_7$5, toDisplayString(currency.value), 1)) : createCommentVNode("", true)
11347
11353
  ])
11348
11354
  ]),
11349
11355
  _hoisted_8,
@@ -11387,18 +11393,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11387
11393
  };
11388
11394
  }
11389
11395
  });
11390
- const _hoisted_1$E = { class: "lupa-term-checkbox-wrapper" };
11391
- const _hoisted_2$q = { class: "lupa-term-checkbox-label" };
11392
- const _hoisted_3$i = { class: "lupa-term-label" };
11393
- const _hoisted_4$d = {
11396
+ const _hoisted_1$L = { class: "lupa-term-checkbox-wrapper" };
11397
+ const _hoisted_2$v = { class: "lupa-term-checkbox-label" };
11398
+ const _hoisted_3$n = { class: "lupa-term-label" };
11399
+ const _hoisted_4$g = {
11394
11400
  key: 0,
11395
11401
  class: "lupa-term-count"
11396
11402
  };
11397
- const _hoisted_5$6 = {
11403
+ const _hoisted_5$9 = {
11398
11404
  key: 0,
11399
11405
  class: "lupa-facet-level"
11400
11406
  };
11401
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
11407
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
11402
11408
  __name: "HierarchyFacetLevel",
11403
11409
  props: {
11404
11410
  options: {},
@@ -11444,17 +11450,17 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11444
11450
  "data-cy": "lupa-facet-term",
11445
11451
  onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
11446
11452
  }, [
11447
- createBaseVNode("div", _hoisted_1$E, [
11453
+ createBaseVNode("div", _hoisted_1$L, [
11448
11454
  createBaseVNode("span", {
11449
11455
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
11450
11456
  }, null, 2)
11451
11457
  ]),
11452
- createBaseVNode("div", _hoisted_2$q, [
11453
- createBaseVNode("span", _hoisted_3$i, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
11454
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$d, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
11458
+ createBaseVNode("div", _hoisted_2$v, [
11459
+ createBaseVNode("span", _hoisted_3$n, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
11460
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$g, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
11455
11461
  ])
11456
11462
  ]),
11457
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
11463
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$9, [
11458
11464
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
11459
11465
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
11460
11466
  key: itemChild.title,
@@ -11470,13 +11476,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11470
11476
  };
11471
11477
  }
11472
11478
  });
11473
- const _hoisted_1$D = {
11479
+ const _hoisted_1$K = {
11474
11480
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
11475
11481
  "data-cy": "lupa-search-result-facet-term-values"
11476
11482
  };
11477
- const _hoisted_2$p = { key: 0 };
11478
- const _hoisted_3$h = ["placeholder"];
11479
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
11483
+ const _hoisted_2$u = { key: 0 };
11484
+ const _hoisted_3$m = ["placeholder"];
11485
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
11480
11486
  __name: "HierarchyFacet",
11481
11487
  props: {
11482
11488
  options: {},
@@ -11526,19 +11532,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11526
11532
  showAll.value = true;
11527
11533
  };
11528
11534
  return (_ctx, _cache) => {
11529
- return openBlock(), createElementBlock("div", _hoisted_1$D, [
11530
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, [
11535
+ return openBlock(), createElementBlock("div", _hoisted_1$K, [
11536
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
11531
11537
  withDirectives(createBaseVNode("input", {
11532
11538
  class: "lupa-term-filter",
11533
11539
  "data-cy": "lupa-term-filter",
11534
11540
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
11535
11541
  placeholder: _ctx.options.labels.facetFilter
11536
- }, null, 8, _hoisted_3$h), [
11542
+ }, null, 8, _hoisted_3$m), [
11537
11543
  [vModelText, termFilter.value]
11538
11544
  ])
11539
11545
  ])) : createCommentVNode("", true),
11540
11546
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
11541
- return openBlock(), createBlock(_sfc_main$H, {
11547
+ return openBlock(), createBlock(_sfc_main$O, {
11542
11548
  key: item.title,
11543
11549
  options: _ctx.options,
11544
11550
  item,
@@ -11558,20 +11564,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11558
11564
  };
11559
11565
  }
11560
11566
  });
11561
- const _hoisted_1$C = { class: "lupa-facet-label-text" };
11562
- const _hoisted_2$o = {
11567
+ const _hoisted_1$J = { class: "lupa-facet-label-text" };
11568
+ const _hoisted_2$t = {
11563
11569
  key: 0,
11564
11570
  class: "lupa-facet-content",
11565
11571
  "data-cy": "lupa-facet-content"
11566
11572
  };
11567
11573
  const __default__$2 = {
11568
11574
  components: {
11569
- TermFacet: _sfc_main$J,
11570
- StatsFacet: _sfc_main$I,
11571
- HierarchyFacet: _sfc_main$G
11575
+ TermFacet: _sfc_main$Q,
11576
+ StatsFacet: _sfc_main$P,
11577
+ HierarchyFacet: _sfc_main$N
11572
11578
  }
11573
11579
  };
11574
- const _sfc_main$F = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
11580
+ const _sfc_main$M = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
11575
11581
  __name: "FacetDisplay",
11576
11582
  props: {
11577
11583
  options: {},
@@ -11682,12 +11688,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11682
11688
  "data-cy": "lupa-search-result-facet-label",
11683
11689
  onClick: toggleFacet
11684
11690
  }, [
11685
- createBaseVNode("div", _hoisted_1$C, toDisplayString(facet.value.label), 1),
11691
+ createBaseVNode("div", _hoisted_1$J, toDisplayString(facet.value.label), 1),
11686
11692
  createBaseVNode("div", {
11687
11693
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
11688
11694
  }, null, 2)
11689
11695
  ], 2),
11690
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
11696
+ isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, [
11691
11697
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
11692
11698
  facet: facet.value,
11693
11699
  currentFilters: currentFilters.value[facet.value.key],
@@ -11705,12 +11711,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11705
11711
  };
11706
11712
  }
11707
11713
  }));
11708
- const _hoisted_1$B = { class: "lupa-search-result-facet-section" };
11709
- const _hoisted_2$n = {
11714
+ const _hoisted_1$I = { class: "lupa-search-result-facet-section" };
11715
+ const _hoisted_2$s = {
11710
11716
  key: 0,
11711
11717
  class: "lupa-facets-title"
11712
11718
  };
11713
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
11719
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
11714
11720
  __name: "FacetList",
11715
11721
  props: {
11716
11722
  options: {},
@@ -11744,14 +11750,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11744
11750
  };
11745
11751
  return (_ctx, _cache) => {
11746
11752
  var _a;
11747
- return openBlock(), createElementBlock("div", _hoisted_1$B, [
11748
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
11753
+ return openBlock(), createElementBlock("div", _hoisted_1$I, [
11754
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$s, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
11749
11755
  createBaseVNode("div", {
11750
11756
  class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
11751
11757
  }, [
11752
11758
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
11753
11759
  var _a2;
11754
- return openBlock(), createBlock(_sfc_main$F, {
11760
+ return openBlock(), createBlock(_sfc_main$M, {
11755
11761
  key: facet.key,
11756
11762
  facet,
11757
11763
  currentFilters: currentFiltersValue.value,
@@ -11766,8 +11772,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11766
11772
  };
11767
11773
  }
11768
11774
  });
11769
- const _hoisted_1$A = { class: "lupa-search-result-facets" };
11770
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
11775
+ const _hoisted_1$H = { class: "lupa-search-result-facets" };
11776
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
11771
11777
  __name: "Facets",
11772
11778
  props: {
11773
11779
  options: {},
@@ -11813,8 +11819,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11813
11819
  paramStore.removeParameters({ paramsToRemove: [param] });
11814
11820
  };
11815
11821
  return (_ctx, _cache) => {
11816
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
11817
- regularFacets.value ? (openBlock(), createBlock(_sfc_main$E, {
11822
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
11823
+ regularFacets.value ? (openBlock(), createBlock(_sfc_main$L, {
11818
11824
  key: 0,
11819
11825
  options: _ctx.options,
11820
11826
  facets: regularFacets.value,
@@ -11828,11 +11834,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11828
11834
  };
11829
11835
  }
11830
11836
  });
11831
- const _hoisted_1$z = {
11837
+ const _hoisted_1$G = {
11832
11838
  id: "lupa-search-result-filters",
11833
11839
  class: "lupa-search-result-filters"
11834
11840
  };
11835
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
11841
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
11836
11842
  __name: "SearchResultsFilters",
11837
11843
  props: {
11838
11844
  options: {},
@@ -11861,19 +11867,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11861
11867
  __expose({ fetch: fetch2 });
11862
11868
  return (_ctx, _cache) => {
11863
11869
  var _a;
11864
- return openBlock(), createElementBlock("div", _hoisted_1$z, [
11865
- showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$M, {
11870
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
11871
+ showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$T, {
11866
11872
  key: 0,
11867
11873
  options: _ctx.options.currentFilters,
11868
11874
  expandable: (_a = _ctx.expandable) != null ? _a : false
11869
11875
  }, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
11870
- _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$K, {
11876
+ _ctx.options.categories ? (openBlock(), createBlock(_sfc_main$R, {
11871
11877
  key: 1,
11872
11878
  options: _ctx.options.categories,
11873
11879
  ref_key: "categoryFilters",
11874
11880
  ref: categoryFilters
11875
11881
  }, null, 8, ["options"])) : createCommentVNode("", true),
11876
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$D, {
11882
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
11877
11883
  key: 2,
11878
11884
  options: _ctx.options.facets
11879
11885
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -11881,20 +11887,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11881
11887
  };
11882
11888
  }
11883
11889
  });
11884
- const _hoisted_1$y = {
11890
+ const _hoisted_1$F = {
11885
11891
  key: 0,
11886
11892
  class: "lupa-mobile-filter-sidebar"
11887
11893
  };
11888
- const _hoisted_2$m = ["onClick"];
11889
- const _hoisted_3$g = { class: "lupa-mobile-sidebar-content" };
11890
- const _hoisted_4$c = { class: "lupa-sidebar-top" };
11891
- const _hoisted_5$5 = { class: "lupa-sidebar-title" };
11892
- const _hoisted_6$3 = {
11894
+ const _hoisted_2$r = ["onClick"];
11895
+ const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
11896
+ const _hoisted_4$f = { class: "lupa-sidebar-top" };
11897
+ const _hoisted_5$8 = { class: "lupa-sidebar-title" };
11898
+ const _hoisted_6$5 = {
11893
11899
  key: 0,
11894
11900
  class: "lupa-sidebar-filter-count"
11895
11901
  };
11896
- const _hoisted_7$3 = { class: "lupa-sidebar-filter-options" };
11897
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
11902
+ const _hoisted_7$4 = { class: "lupa-sidebar-filter-options" };
11903
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
11898
11904
  __name: "MobileFilterSidebar",
11899
11905
  props: {
11900
11906
  options: {}
@@ -11920,24 +11926,24 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11920
11926
  searchResultStore.setSidebarState({ visible: false });
11921
11927
  };
11922
11928
  return (_ctx, _cache) => {
11923
- return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
11929
+ return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
11924
11930
  createBaseVNode("div", {
11925
11931
  class: "lupa-sidebar-close",
11926
11932
  onClick: withModifiers(handleMobileToggle, ["stop"])
11927
- }, null, 8, _hoisted_2$m),
11928
- createBaseVNode("div", _hoisted_3$g, [
11929
- createBaseVNode("div", _hoisted_4$c, [
11930
- createBaseVNode("div", _hoisted_5$5, [
11933
+ }, null, 8, _hoisted_2$r),
11934
+ createBaseVNode("div", _hoisted_3$l, [
11935
+ createBaseVNode("div", _hoisted_4$f, [
11936
+ createBaseVNode("div", _hoisted_5$8, [
11931
11937
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
11932
- isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$3, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
11938
+ isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$5, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
11933
11939
  ]),
11934
11940
  createBaseVNode("div", {
11935
11941
  class: "lupa-filter-toggle-mobile",
11936
11942
  onClick: handleMobileToggle
11937
11943
  })
11938
11944
  ]),
11939
- createBaseVNode("div", _hoisted_7$3, [
11940
- createVNode(_sfc_main$C, {
11945
+ createBaseVNode("div", _hoisted_7$4, [
11946
+ createVNode(_sfc_main$J, {
11941
11947
  options: _ctx.options,
11942
11948
  expandable: isActiveFiltersExpanded.value
11943
11949
  }, null, 8, ["options", "expandable"])
@@ -11947,14 +11953,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11947
11953
  };
11948
11954
  }
11949
11955
  });
11950
- const _hoisted_1$x = { id: "lupa-search-results-breadcrumbs" };
11951
- const _hoisted_2$l = ["href", "onClick"];
11952
- const _hoisted_3$f = {
11956
+ const _hoisted_1$E = { id: "lupa-search-results-breadcrumbs" };
11957
+ const _hoisted_2$q = ["href", "onClick"];
11958
+ const _hoisted_3$k = {
11953
11959
  key: 1,
11954
11960
  class: "lupa-search-results-breadcrumb-text"
11955
11961
  };
11956
- const _hoisted_4$b = { key: 2 };
11957
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
11962
+ const _hoisted_4$e = { key: 2 };
11963
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
11958
11964
  __name: "SearchResultsBreadcrumbs",
11959
11965
  props: {
11960
11966
  breadcrumbs: {}
@@ -11979,7 +11985,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11979
11985
  handleRoutingEvent(link, event, hasEventRouting.value);
11980
11986
  };
11981
11987
  return (_ctx, _cache) => {
11982
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
11988
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
11983
11989
  (openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
11984
11990
  return openBlock(), createElementBlock("span", {
11985
11991
  class: "lupa-search-results-breadcrumb",
@@ -11993,19 +11999,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11993
11999
  var _a;
11994
12000
  return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
11995
12001
  }
11996
- }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$l)) : (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(getLabel(breadcrumb.label)), 1)),
11997
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$b, " / ")) : createCommentVNode("", true)
12002
+ }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$q)) : (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString(getLabel(breadcrumb.label)), 1)),
12003
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$e, " / ")) : createCommentVNode("", true)
11998
12004
  ]);
11999
12005
  }), 128))
12000
12006
  ]);
12001
12007
  };
12002
12008
  }
12003
12009
  });
12004
- const _hoisted_1$w = {
12010
+ const _hoisted_1$D = {
12005
12011
  id: "lupa-search-result-filters",
12006
12012
  class: "lupa-search-result-filters"
12007
12013
  };
12008
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
12014
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
12009
12015
  __name: "FiltersTopDropdown",
12010
12016
  props: {
12011
12017
  options: {}
@@ -12013,8 +12019,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12013
12019
  setup(__props) {
12014
12020
  return (_ctx, _cache) => {
12015
12021
  var _a;
12016
- return openBlock(), createElementBlock("div", _hoisted_1$w, [
12017
- _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$D, {
12022
+ return openBlock(), createElementBlock("div", _hoisted_1$D, [
12023
+ _ctx.options.facets ? (openBlock(), createBlock(_sfc_main$K, {
12018
12024
  key: 0,
12019
12025
  options: _ctx.options.facets,
12020
12026
  "facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
@@ -12024,8 +12030,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12024
12030
  };
12025
12031
  }
12026
12032
  });
12027
- const _hoisted_1$v = { id: "lupa-search-results-layout-selection" };
12028
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
12033
+ const _hoisted_1$C = { id: "lupa-search-results-layout-selection" };
12034
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12029
12035
  __name: "SearchResultsLayoutSelection",
12030
12036
  setup(__props) {
12031
12037
  const searchResultStore = useSearchResultStore();
@@ -12036,7 +12042,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12036
12042
  searchResultStore.setLayout(layout2);
12037
12043
  };
12038
12044
  return (_ctx, _cache) => {
12039
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
12045
+ return openBlock(), createElementBlock("div", _hoisted_1$C, [
12040
12046
  createBaseVNode("div", {
12041
12047
  class: normalizeClass([
12042
12048
  "lupa-layout-selection-grid",
@@ -12058,11 +12064,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12058
12064
  };
12059
12065
  }
12060
12066
  });
12061
- const _hoisted_1$u = {
12067
+ const _hoisted_1$B = {
12062
12068
  key: 0,
12063
12069
  class: "lupa-mobile-toggle-filter-count"
12064
12070
  };
12065
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
12071
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12066
12072
  __name: "SearchResultsMobileToggle",
12067
12073
  props: {
12068
12074
  label: {},
@@ -12080,26 +12086,26 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12080
12086
  onClick: handleMobileToggle
12081
12087
  }, [
12082
12088
  createTextVNode(toDisplayString(_ctx.label) + " ", 1),
12083
- _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$u, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
12089
+ _ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$B, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
12084
12090
  ], 2);
12085
12091
  };
12086
12092
  }
12087
12093
  });
12088
- const _hoisted_1$t = {
12094
+ const _hoisted_1$A = {
12089
12095
  key: 0,
12090
12096
  id: "lupa-search-results-page-select",
12091
12097
  "data-cy": "lupa-search-results-page-select"
12092
12098
  };
12093
- const _hoisted_2$k = {
12099
+ const _hoisted_2$p = {
12094
12100
  key: 0,
12095
12101
  class: "lupa-page-number-separator"
12096
12102
  };
12097
- const _hoisted_3$e = ["onClick"];
12098
- const _hoisted_4$a = {
12103
+ const _hoisted_3$j = ["onClick"];
12104
+ const _hoisted_4$d = {
12099
12105
  key: 0,
12100
12106
  class: "lupa-page-number-separator"
12101
12107
  };
12102
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
12108
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
12103
12109
  __name: "SearchResultsPageSelect",
12104
12110
  props: {
12105
12111
  lastPageLabel: {},
@@ -12161,7 +12167,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12161
12167
  }
12162
12168
  };
12163
12169
  return (_ctx, _cache) => {
12164
- return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$t, [
12170
+ return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$A, [
12165
12171
  showBack.value ? (openBlock(), createElementBlock("div", {
12166
12172
  key: 0,
12167
12173
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
@@ -12172,7 +12178,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12172
12178
  class: "lupa-page-number lupa-page-number-first",
12173
12179
  onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
12174
12180
  }, " 1 "),
12175
- showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$k, "...")) : createCommentVNode("", true)
12181
+ showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, "...")) : createCommentVNode("", true)
12176
12182
  ], 64)) : createCommentVNode("", true),
12177
12183
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
12178
12184
  return openBlock(), createElementBlock("div", {
@@ -12183,10 +12189,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12183
12189
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
12184
12190
  ]),
12185
12191
  "data-cy": "lupa-page-number"
12186
- }, toDisplayString(page), 11, _hoisted_3$e);
12192
+ }, toDisplayString(page), 11, _hoisted_3$j);
12187
12193
  }), 128)),
12188
12194
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
12189
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$a, "...")) : createCommentVNode("", true),
12195
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$d, "...")) : createCommentVNode("", true),
12190
12196
  createBaseVNode("div", {
12191
12197
  class: "lupa-page-number lupa-page-number-last",
12192
12198
  onClick: _cache[2] || (_cache[2] = () => {
@@ -12205,13 +12211,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12205
12211
  };
12206
12212
  }
12207
12213
  });
12208
- const _hoisted_1$s = {
12214
+ const _hoisted_1$z = {
12209
12215
  id: "lupa-search-results-page-size",
12210
12216
  "data-cy": "lupa-search-results-page-size"
12211
12217
  };
12212
- const _hoisted_2$j = { id: "lupa-select" };
12213
- const _hoisted_3$d = { class: "lupa-select-label" };
12214
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
12218
+ const _hoisted_2$o = { id: "lupa-select" };
12219
+ const _hoisted_3$i = { class: "lupa-select-label" };
12220
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
12215
12221
  __name: "SearchResultsPageSize",
12216
12222
  props: {
12217
12223
  label: {},
@@ -12228,9 +12234,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12228
12234
  });
12229
12235
  };
12230
12236
  return (_ctx, _cache) => {
12231
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
12232
- createBaseVNode("div", _hoisted_2$j, [
12233
- createBaseVNode("label", _hoisted_3$d, toDisplayString(_ctx.label), 1),
12237
+ return openBlock(), createElementBlock("div", _hoisted_1$z, [
12238
+ createBaseVNode("div", _hoisted_2$o, [
12239
+ createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.label), 1),
12234
12240
  createBaseVNode("select", {
12235
12241
  class: "lupa-select-dropdown",
12236
12242
  "data-cy": "lupa-page-size-select-dropdown",
@@ -12247,17 +12253,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12247
12253
  };
12248
12254
  }
12249
12255
  });
12250
- const _hoisted_1$r = {
12256
+ const _hoisted_1$y = {
12251
12257
  id: "lupa-search-results-sort",
12252
12258
  class: "lupa-search-results-sort"
12253
12259
  };
12254
- const _hoisted_2$i = { id: "lupa-select" };
12255
- const _hoisted_3$c = { class: "lupa-select-label" };
12256
- const _hoisted_4$9 = ["value"];
12257
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
12260
+ const _hoisted_2$n = { id: "lupa-select" };
12261
+ const _hoisted_3$h = { class: "lupa-select-label" };
12262
+ const _hoisted_4$c = ["value"];
12263
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
12258
12264
  __name: "SearchResultsSort",
12259
12265
  props: {
12260
- options: {}
12266
+ options: {},
12267
+ callbacks: {}
12261
12268
  },
12262
12269
  setup(__props) {
12263
12270
  const props = __props;
@@ -12285,20 +12292,21 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12285
12292
  setSortValue();
12286
12293
  });
12287
12294
  const handleSelect = () => {
12288
- var _a;
12295
+ var _a, _b, _c;
12289
12296
  const value = (_a = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a.key;
12290
12297
  if (!value) {
12291
12298
  return;
12292
12299
  }
12300
+ (_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value });
12293
12301
  paramStore.appendParams({
12294
12302
  params: [{ name: QUERY_PARAMS$1.SORT, value }],
12295
12303
  paramsToRemove: [QUERY_PARAMS$1.PAGE]
12296
12304
  });
12297
12305
  };
12298
12306
  return (_ctx, _cache) => {
12299
- return openBlock(), createElementBlock("div", _hoisted_1$r, [
12300
- createBaseVNode("div", _hoisted_2$i, [
12301
- createBaseVNode("label", _hoisted_3$c, toDisplayString(_ctx.options.label), 1),
12307
+ return openBlock(), createElementBlock("div", _hoisted_1$y, [
12308
+ createBaseVNode("div", _hoisted_2$n, [
12309
+ createBaseVNode("label", _hoisted_3$h, toDisplayString(_ctx.options.label), 1),
12302
12310
  withDirectives(createBaseVNode("select", {
12303
12311
  class: "lupa-select-dropdown",
12304
12312
  "data-cy": "lupa-sort-select-dropdown",
@@ -12310,7 +12318,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12310
12318
  return openBlock(), createElementBlock("option", {
12311
12319
  key: option.key,
12312
12320
  value: option.key
12313
- }, toDisplayString(option.label), 9, _hoisted_4$9);
12321
+ }, toDisplayString(option.label), 9, _hoisted_4$c);
12314
12322
  }), 128))
12315
12323
  ], 544), [
12316
12324
  [vModelSelect, selectedKey.value]
@@ -12320,14 +12328,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12320
12328
  };
12321
12329
  }
12322
12330
  });
12323
- const _hoisted_1$q = { class: "lupa-toolbar-left" };
12324
- const _hoisted_2$h = { key: 1 };
12325
- const _hoisted_3$b = { key: 3 };
12326
- const _hoisted_4$8 = { key: 5 };
12327
- const _hoisted_5$4 = { class: "lupa-toolbar-right" };
12328
- const _hoisted_6$2 = { key: 1 };
12329
- const _hoisted_7$2 = { key: 3 };
12330
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
12331
+ const _hoisted_1$x = { class: "lupa-toolbar-left" };
12332
+ const _hoisted_2$m = { key: 1 };
12333
+ const _hoisted_3$g = { key: 3 };
12334
+ const _hoisted_4$b = { key: 5 };
12335
+ const _hoisted_5$7 = { class: "lupa-toolbar-right" };
12336
+ const _hoisted_6$4 = { key: 1 };
12337
+ const _hoisted_7$3 = { key: 3 };
12338
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
12331
12339
  __name: "SearchResultsToolbar",
12332
12340
  props: {
12333
12341
  options: {},
@@ -12335,12 +12343,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12335
12343
  },
12336
12344
  setup(__props) {
12337
12345
  const props = __props;
12338
- const optionsValue = computed(
12339
- () => {
12340
- var _a;
12341
- return (_a = props.options) != null ? _a : { labels: {} };
12342
- }
12343
- );
12346
+ const optionsValue = computed(() => {
12347
+ var _a;
12348
+ return (_a = props.options) != null ? _a : { labels: {} };
12349
+ });
12344
12350
  const paramStore = useParamsStore();
12345
12351
  const searchResultStore = useSearchResultStore();
12346
12352
  const optionsStore = useOptionsStore();
@@ -12416,6 +12422,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12416
12422
  const hasResults = computed(() => {
12417
12423
  return searchResult.value.total > 0;
12418
12424
  });
12425
+ const callbacks = computed(() => {
12426
+ var _a;
12427
+ return (_a = props.options.callbacks) != null ? _a : {};
12428
+ });
12419
12429
  const handleClearAll = () => {
12420
12430
  paramStore.removeAllFilters();
12421
12431
  };
@@ -12424,48 +12434,49 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12424
12434
  id: "lupa-search-results-toolbar",
12425
12435
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
12426
12436
  }, [
12427
- createBaseVNode("div", _hoisted_1$q, [
12428
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$y, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$h)),
12429
- showItemSummary.value ? (openBlock(), createBlock(_sfc_main$P, {
12437
+ createBaseVNode("div", _hoisted_1$x, [
12438
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$F, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
12439
+ showItemSummary.value ? (openBlock(), createBlock(_sfc_main$W, {
12430
12440
  key: 2,
12431
12441
  label: searchSummaryLabel.value,
12432
12442
  clearable: unref(hasAnyFilter) && showFilterClear.value,
12433
12443
  onClear: handleClearAll
12434
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$b)),
12435
- displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$w, {
12444
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$g)),
12445
+ displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$D, {
12436
12446
  key: 4,
12437
12447
  options: paginationOptions.value.pageSelect,
12438
12448
  "last-page-label": paginationOptions.value.labels.showMore,
12439
12449
  "first-page-label": paginationOptions.value.labels.showLess
12440
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_4$8))
12450
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_4$b))
12441
12451
  ]),
12442
- createBaseVNode("div", _hoisted_5$4, [
12443
- createVNode(_sfc_main$x, {
12452
+ createBaseVNode("div", _hoisted_5$7, [
12453
+ createVNode(_sfc_main$E, {
12444
12454
  label: optionsValue.value.labels.mobileFilterButton,
12445
12455
  "show-filter-count": showMobileFilterCount.value
12446
12456
  }, null, 8, ["label", "show-filter-count"]),
12447
- paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$v, {
12457
+ paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$C, {
12448
12458
  key: 0,
12449
12459
  options: paginationOptions.value.pageSize,
12450
12460
  label: paginationOptions.value.labels.pageSize
12451
- }, null, 8, ["options", "label"])) : (openBlock(), createElementBlock("div", _hoisted_6$2)),
12452
- sortOptions.value ? (openBlock(), createBlock(_sfc_main$u, {
12461
+ }, null, 8, ["options", "label"])) : (openBlock(), createElementBlock("div", _hoisted_6$4)),
12462
+ sortOptions.value ? (openBlock(), createBlock(_sfc_main$B, {
12453
12463
  key: 2,
12454
- options: sortOptions.value
12455
- }, null, 8, ["options"])) : (openBlock(), createElementBlock("div", _hoisted_7$2))
12464
+ options: sortOptions.value,
12465
+ callbacks: callbacks.value
12466
+ }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_7$3))
12456
12467
  ])
12457
12468
  ], 2);
12458
12469
  };
12459
12470
  }
12460
12471
  });
12461
- const _hoisted_1$p = { class: "lupa-badge-title" };
12462
- const _hoisted_2$g = ["src"];
12463
- const _hoisted_3$a = { key: 1 };
12464
- const _hoisted_4$7 = {
12472
+ const _hoisted_1$w = { class: "lupa-badge-title" };
12473
+ const _hoisted_2$l = ["src"];
12474
+ const _hoisted_3$f = { key: 1 };
12475
+ const _hoisted_4$a = {
12465
12476
  key: 0,
12466
12477
  class: "lupa-badge-full-text"
12467
12478
  };
12468
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
12479
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
12469
12480
  __name: "SearchResultGeneratedBadge",
12470
12481
  props: {
12471
12482
  options: {},
@@ -12498,20 +12509,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12498
12509
  class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
12499
12510
  style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
12500
12511
  }, [
12501
- createBaseVNode("span", _hoisted_1$p, [
12512
+ createBaseVNode("span", _hoisted_1$w, [
12502
12513
  image.value ? (openBlock(), createElementBlock("img", {
12503
12514
  key: 0,
12504
12515
  src: image.value
12505
- }, null, 8, _hoisted_2$g)) : createCommentVNode("", true),
12506
- hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$a, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
12516
+ }, null, 8, _hoisted_2$l)) : createCommentVNode("", true),
12517
+ hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
12507
12518
  ]),
12508
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$7, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
12519
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
12509
12520
  ], 6);
12510
12521
  };
12511
12522
  }
12512
12523
  });
12513
- const _hoisted_1$o = { class: "lupa-generated-badges" };
12514
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
12524
+ const _hoisted_1$v = { class: "lupa-generated-badges" };
12525
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
12515
12526
  __name: "SearchResultGeneratedBadges",
12516
12527
  props: {
12517
12528
  options: {}
@@ -12537,9 +12548,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12537
12548
  })).filter((b) => Boolean(b.id));
12538
12549
  });
12539
12550
  return (_ctx, _cache) => {
12540
- return openBlock(), createElementBlock("div", _hoisted_1$o, [
12551
+ return openBlock(), createElementBlock("div", _hoisted_1$v, [
12541
12552
  (openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
12542
- return openBlock(), createBlock(_sfc_main$s, {
12553
+ return openBlock(), createBlock(_sfc_main$z, {
12543
12554
  key: badge.id,
12544
12555
  badge,
12545
12556
  options: _ctx.options
@@ -12549,8 +12560,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12549
12560
  };
12550
12561
  }
12551
12562
  });
12552
- const _hoisted_1$n = ["innerHTML"];
12553
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
12563
+ const _hoisted_1$u = ["innerHTML"];
12564
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12554
12565
  __name: "CustomBadge",
12555
12566
  props: {
12556
12567
  badge: {}
@@ -12569,12 +12580,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12569
12580
  return openBlock(), createElementBlock("div", {
12570
12581
  class: normalizeClass(className.value),
12571
12582
  innerHTML: text.value
12572
- }, null, 10, _hoisted_1$n);
12583
+ }, null, 10, _hoisted_1$u);
12573
12584
  };
12574
12585
  }
12575
12586
  });
12576
- const _hoisted_1$m = { class: "lupa-text-badges" };
12577
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
12587
+ const _hoisted_1$t = { class: "lupa-text-badges" };
12588
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
12578
12589
  __name: "TextBadge",
12579
12590
  props: {
12580
12591
  badge: {}
@@ -12589,7 +12600,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12589
12600
  return badges.value.slice(0, props.badge.maxItems);
12590
12601
  });
12591
12602
  return (_ctx, _cache) => {
12592
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
12603
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
12593
12604
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
12594
12605
  return openBlock(), createElementBlock("div", {
12595
12606
  class: "lupa-badge lupa-text-badge",
@@ -12600,9 +12611,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12600
12611
  };
12601
12612
  }
12602
12613
  });
12603
- const _hoisted_1$l = { class: "lupa-image-badges" };
12604
- const _hoisted_2$f = ["src"];
12605
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
12614
+ const _hoisted_1$s = { class: "lupa-image-badges" };
12615
+ const _hoisted_2$k = ["src"];
12616
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
12606
12617
  __name: "ImageBadge",
12607
12618
  props: {
12608
12619
  badge: {}
@@ -12622,7 +12633,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12622
12633
  return `${props.badge.rootImageUrl}${src}`;
12623
12634
  };
12624
12635
  return (_ctx, _cache) => {
12625
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
12636
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
12626
12637
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
12627
12638
  return openBlock(), createElementBlock("div", {
12628
12639
  class: "lupa-badge lupa-image-badge",
@@ -12630,22 +12641,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12630
12641
  }, [
12631
12642
  createBaseVNode("img", {
12632
12643
  src: getImageUrl(item)
12633
- }, null, 8, _hoisted_2$f)
12644
+ }, null, 8, _hoisted_2$k)
12634
12645
  ]);
12635
12646
  }), 128))
12636
12647
  ]);
12637
12648
  };
12638
12649
  }
12639
12650
  });
12640
- const _hoisted_1$k = { id: "lupa-search-results-badges" };
12651
+ const _hoisted_1$r = { id: "lupa-search-results-badges" };
12641
12652
  const __default__$1 = {
12642
12653
  components: {
12643
- CustomBadge: _sfc_main$q,
12644
- TextBadge: _sfc_main$p,
12645
- ImageBadge: _sfc_main$o
12654
+ CustomBadge: _sfc_main$x,
12655
+ TextBadge: _sfc_main$w,
12656
+ ImageBadge: _sfc_main$v
12646
12657
  }
12647
12658
  };
12648
- const _sfc_main$n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
12659
+ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
12649
12660
  __name: "SearchResultsBadgeWrapper",
12650
12661
  props: {
12651
12662
  position: {},
@@ -12691,7 +12702,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12691
12702
  }
12692
12703
  };
12693
12704
  return (_ctx, _cache) => {
12694
- return openBlock(), createElementBlock("div", _hoisted_1$k, [
12705
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
12695
12706
  createBaseVNode("div", {
12696
12707
  id: "lupa-badges",
12697
12708
  class: normalizeClass(anchorPosition.value)
@@ -12702,7 +12713,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12702
12713
  badge
12703
12714
  }, null, 8, ["badge"]);
12704
12715
  }), 128)),
12705
- positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$r, {
12716
+ positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$y, {
12706
12717
  key: 0,
12707
12718
  options: _ctx.options
12708
12719
  }, null, 8, ["options"])) : createCommentVNode("", true)
@@ -12711,7 +12722,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12711
12722
  };
12712
12723
  }
12713
12724
  }));
12714
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
12725
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
12715
12726
  __name: "SearchResultsProductImage",
12716
12727
  props: {
12717
12728
  item: {},
@@ -12719,7 +12730,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12719
12730
  },
12720
12731
  setup(__props) {
12721
12732
  return (_ctx, _cache) => {
12722
- return openBlock(), createBlock(_sfc_main$13, {
12733
+ return openBlock(), createBlock(_sfc_main$1a, {
12723
12734
  item: _ctx.item,
12724
12735
  options: _ctx.options,
12725
12736
  "wrapper-class": "lupa-search-results-image-wrapper",
@@ -12728,14 +12739,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12728
12739
  };
12729
12740
  }
12730
12741
  });
12731
- const _hoisted_1$j = ["innerHTML"];
12732
- const _hoisted_2$e = ["title"];
12733
- const _hoisted_3$9 = {
12742
+ const _hoisted_1$q = ["innerHTML"];
12743
+ const _hoisted_2$j = ["title"];
12744
+ const _hoisted_3$e = {
12734
12745
  key: 0,
12735
12746
  class: "lupa-search-results-product-title-text"
12736
12747
  };
12737
- const _hoisted_4$6 = ["href"];
12738
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
12748
+ const _hoisted_4$9 = ["href"];
12749
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
12739
12750
  __name: "SearchResultsProductTitle",
12740
12751
  props: {
12741
12752
  item: {},
@@ -12768,25 +12779,25 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12768
12779
  class: "lupa-search-results-product-title",
12769
12780
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
12770
12781
  innerHTML: title.value
12771
- }, null, 12, _hoisted_1$j)) : (openBlock(), createElementBlock("div", {
12782
+ }, null, 12, _hoisted_1$q)) : (openBlock(), createElementBlock("div", {
12772
12783
  key: 1,
12773
12784
  class: "lupa-search-results-product-title",
12774
12785
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
12775
12786
  title: title.value
12776
12787
  }, [
12777
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$9, toDisplayString(title.value), 1)) : createCommentVNode("", true),
12788
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(title.value), 1)) : createCommentVNode("", true),
12778
12789
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
12779
12790
  key: 1,
12780
12791
  href: _ctx.link,
12781
12792
  class: "lupa-search-results-product-title-text lupa-title-link",
12782
12793
  onClick: handleNavigation
12783
- }, toDisplayString(title.value), 9, _hoisted_4$6)) : createCommentVNode("", true)
12784
- ], 12, _hoisted_2$e));
12794
+ }, toDisplayString(title.value), 9, _hoisted_4$9)) : createCommentVNode("", true)
12795
+ ], 12, _hoisted_2$j));
12785
12796
  };
12786
12797
  }
12787
12798
  });
12788
- const _hoisted_1$i = ["innerHTML"];
12789
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
12799
+ const _hoisted_1$p = ["innerHTML"];
12800
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
12790
12801
  __name: "SearchResultsProductDescription",
12791
12802
  props: {
12792
12803
  item: {},
@@ -12810,7 +12821,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12810
12821
  class: "lupa-search-results-product-description",
12811
12822
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
12812
12823
  innerHTML: description.value
12813
- }, null, 12, _hoisted_1$i)) : (openBlock(), createElementBlock("div", {
12824
+ }, null, 12, _hoisted_1$p)) : (openBlock(), createElementBlock("div", {
12814
12825
  key: 1,
12815
12826
  class: "lupa-search-results-product-description",
12816
12827
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
@@ -12818,15 +12829,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12818
12829
  };
12819
12830
  }
12820
12831
  });
12821
- const _hoisted_1$h = { id: "lupa-search-results-rating" };
12822
- const _hoisted_2$d = { class: "lupa-ratings" };
12823
- const _hoisted_3$8 = { class: "lupa-ratings-base" };
12824
- const _hoisted_4$5 = ["innerHTML"];
12825
- const _hoisted_5$3 = { class: "lupa-rating-wrapper" };
12826
- const _hoisted_6$1 = ["innerHTML"];
12827
- const _hoisted_7$1 = ["href"];
12832
+ const _hoisted_1$o = { id: "lupa-search-results-rating" };
12833
+ const _hoisted_2$i = { class: "lupa-ratings" };
12834
+ const _hoisted_3$d = { class: "lupa-ratings-base" };
12835
+ const _hoisted_4$8 = ["innerHTML"];
12836
+ const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
12837
+ const _hoisted_6$3 = ["innerHTML"];
12838
+ const _hoisted_7$2 = ["href"];
12828
12839
  const STAR_COUNT = 5;
12829
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
12840
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
12830
12841
  __name: "SearchResultsProductRating",
12831
12842
  props: {
12832
12843
  item: {},
@@ -12857,18 +12868,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12857
12868
  return generateLink(props.options.links.ratingDetails, props.item);
12858
12869
  });
12859
12870
  return (_ctx, _cache) => {
12860
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
12861
- createBaseVNode("div", _hoisted_2$d, [
12862
- createBaseVNode("div", _hoisted_3$8, [
12871
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
12872
+ createBaseVNode("div", _hoisted_2$i, [
12873
+ createBaseVNode("div", _hoisted_3$d, [
12863
12874
  (openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
12864
12875
  return openBlock(), createElementBlock("div", {
12865
12876
  key: index,
12866
12877
  innerHTML: star,
12867
12878
  class: "lupa-rating lupa-rating-not-highlighted"
12868
- }, null, 8, _hoisted_4$5);
12879
+ }, null, 8, _hoisted_4$8);
12869
12880
  }), 128))
12870
12881
  ]),
12871
- createBaseVNode("div", _hoisted_5$3, [
12882
+ createBaseVNode("div", _hoisted_5$6, [
12872
12883
  createBaseVNode("div", {
12873
12884
  class: "lupa-ratings-highlighted",
12874
12885
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -12878,7 +12889,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12878
12889
  key: index,
12879
12890
  innerHTML: star,
12880
12891
  class: "lupa-rating lupa-rating-highlighted"
12881
- }, null, 8, _hoisted_6$1);
12892
+ }, null, 8, _hoisted_6$3);
12882
12893
  }), 128))
12883
12894
  ], 4)
12884
12895
  ])
@@ -12886,16 +12897,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12886
12897
  createBaseVNode("a", {
12887
12898
  href: ratingLink.value,
12888
12899
  class: "lupa-total-ratings"
12889
- }, toDisplayString(totalRatings.value), 9, _hoisted_7$1)
12900
+ }, toDisplayString(totalRatings.value), 9, _hoisted_7$2)
12890
12901
  ]);
12891
12902
  };
12892
12903
  }
12893
12904
  });
12894
- const _hoisted_1$g = {
12905
+ const _hoisted_1$n = {
12895
12906
  class: "lupa-search-results-product-regular-price",
12896
12907
  "data-cy": "lupa-search-results-product-regular-price"
12897
12908
  };
12898
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
12909
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
12899
12910
  __name: "SearchResultsProductRegularPrice",
12900
12911
  props: {
12901
12912
  item: {},
@@ -12913,15 +12924,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12913
12924
  );
12914
12925
  });
12915
12926
  return (_ctx, _cache) => {
12916
- return openBlock(), createElementBlock("div", _hoisted_1$g, toDisplayString(price.value), 1);
12927
+ return openBlock(), createElementBlock("div", _hoisted_1$n, toDisplayString(price.value), 1);
12917
12928
  };
12918
12929
  }
12919
12930
  });
12920
- const _hoisted_1$f = {
12931
+ const _hoisted_1$m = {
12921
12932
  class: "lupa-search-results-product-price",
12922
12933
  "data-cy": "lupa-search-results-product-price"
12923
12934
  };
12924
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
12935
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
12925
12936
  __name: "SearchResultsProductPrice",
12926
12937
  props: {
12927
12938
  item: {},
@@ -12939,16 +12950,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12939
12950
  );
12940
12951
  });
12941
12952
  return (_ctx, _cache) => {
12942
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
12953
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
12943
12954
  createBaseVNode("strong", null, toDisplayString(price.value), 1)
12944
12955
  ]);
12945
12956
  };
12946
12957
  }
12947
12958
  });
12948
- const _hoisted_1$e = { class: "lupa-search-results-add-to-cart-wrapper" };
12949
- const _hoisted_2$c = { class: "lupa-search-results-product-addtocart" };
12950
- const _hoisted_3$7 = ["onClick", "disabled"];
12951
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
12959
+ const _hoisted_1$l = { class: "lupa-search-results-add-to-cart-wrapper" };
12960
+ const _hoisted_2$h = { class: "lupa-search-results-product-addtocart" };
12961
+ const _hoisted_3$c = ["onClick", "disabled"];
12962
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
12952
12963
  __name: "SearchResultsProductAddToCart",
12953
12964
  props: {
12954
12965
  item: {},
@@ -12975,25 +12986,25 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12975
12986
  loading.value = false;
12976
12987
  });
12977
12988
  return (_ctx, _cache) => {
12978
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
12979
- createBaseVNode("div", _hoisted_2$c, [
12989
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
12990
+ createBaseVNode("div", _hoisted_2$h, [
12980
12991
  createBaseVNode("button", {
12981
12992
  onClick: withModifiers(handleClick, ["stop"]),
12982
12993
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
12983
12994
  "data-cy": "lupa-add-to-cart",
12984
12995
  disabled: !inStockValue.value || loading.value
12985
- }, toDisplayString(label.value), 11, _hoisted_3$7)
12996
+ }, toDisplayString(label.value), 11, _hoisted_3$c)
12986
12997
  ])
12987
12998
  ]);
12988
12999
  };
12989
13000
  }
12990
13001
  });
12991
- const _hoisted_1$d = ["innerHTML"];
12992
- const _hoisted_2$b = { key: 0 };
12993
- const _hoisted_3$6 = { key: 1 };
12994
- const _hoisted_4$4 = { class: "lupa-search-box-custom-label" };
12995
- const _hoisted_5$2 = { class: "lupa-search-box-custom-text" };
12996
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
13002
+ const _hoisted_1$k = ["innerHTML"];
13003
+ const _hoisted_2$g = { key: 0 };
13004
+ const _hoisted_3$b = { key: 1 };
13005
+ const _hoisted_4$7 = { class: "lupa-search-box-custom-label" };
13006
+ const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
13007
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
12997
13008
  __name: "SearchResultsProductCustom",
12998
13009
  props: {
12999
13010
  item: {},
@@ -13031,20 +13042,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13031
13042
  key: 0,
13032
13043
  class: className.value,
13033
13044
  innerHTML: text.value
13034
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$d)) : (openBlock(), createElementBlock("div", mergeProps({
13045
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$k)) : (openBlock(), createElementBlock("div", mergeProps({
13035
13046
  key: 1,
13036
13047
  class: className.value
13037
13048
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
13038
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
13039
- createBaseVNode("div", _hoisted_4$4, toDisplayString(label.value), 1),
13040
- createBaseVNode("div", _hoisted_5$2, toDisplayString(text.value), 1)
13049
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$g, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$b, [
13050
+ createBaseVNode("div", _hoisted_4$7, toDisplayString(label.value), 1),
13051
+ createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
13041
13052
  ]))
13042
13053
  ], 16));
13043
13054
  };
13044
13055
  }
13045
13056
  });
13046
- const _hoisted_1$c = ["innerHTML"];
13047
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
13057
+ const _hoisted_1$j = ["innerHTML"];
13058
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
13048
13059
  __name: "SearchResultsProductCustomHtmlElement",
13049
13060
  props: {
13050
13061
  item: {},
@@ -13068,15 +13079,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13068
13079
  return openBlock(), createElementBlock("div", mergeProps({
13069
13080
  class: className.value,
13070
13081
  innerHTML: text.value
13071
- }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$c);
13082
+ }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$j);
13072
13083
  };
13073
13084
  }
13074
13085
  });
13075
- const _hoisted_1$b = { id: "lupa-search-results-rating" };
13076
- const _hoisted_2$a = ["innerHTML"];
13077
- const _hoisted_3$5 = { class: "lupa-ratings" };
13078
- const _hoisted_4$3 = ["href"];
13079
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
13086
+ const _hoisted_1$i = { id: "lupa-search-results-rating" };
13087
+ const _hoisted_2$f = ["innerHTML"];
13088
+ const _hoisted_3$a = { class: "lupa-ratings" };
13089
+ const _hoisted_4$6 = ["href"];
13090
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13080
13091
  __name: "SearchResultsProductSingleStarRating",
13081
13092
  props: {
13082
13093
  item: {},
@@ -13104,35 +13115,35 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13104
13115
  return RATING_STAR_HTML;
13105
13116
  });
13106
13117
  return (_ctx, _cache) => {
13107
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
13118
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
13108
13119
  createBaseVNode("div", {
13109
13120
  innerHTML: star.value,
13110
13121
  class: "lupa-rating lupa-rating-highlighted"
13111
- }, null, 8, _hoisted_2$a),
13112
- createBaseVNode("div", _hoisted_3$5, toDisplayString(rating.value), 1),
13122
+ }, null, 8, _hoisted_2$f),
13123
+ createBaseVNode("div", _hoisted_3$a, toDisplayString(rating.value), 1),
13113
13124
  createBaseVNode("a", {
13114
13125
  href: ratingLink.value,
13115
13126
  class: "lupa-total-ratings"
13116
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$3)
13127
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$6)
13117
13128
  ]);
13118
13129
  };
13119
13130
  }
13120
13131
  });
13121
13132
  const __default__ = {
13122
13133
  components: {
13123
- SearchResultsProductImage: _sfc_main$m,
13124
- SearchResultsProductTitle: _sfc_main$l,
13125
- SearchResultsProductDescription: _sfc_main$k,
13126
- SearchResultsProductRating: _sfc_main$j,
13127
- SearchResultsProductRegularPrice: _sfc_main$i,
13128
- SearchResultsProductPrice: _sfc_main$h,
13129
- SearchResultsProductAddToCart: _sfc_main$g,
13130
- SearchResultsProductCustom: _sfc_main$f,
13131
- SearchResultsProductCustomHtmlElement: _sfc_main$e,
13132
- SearchResultsProductSingleStarRating: _sfc_main$d
13133
- }
13134
- };
13135
- const _sfc_main$c = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
13134
+ SearchResultsProductImage: _sfc_main$t,
13135
+ SearchResultsProductTitle: _sfc_main$s,
13136
+ SearchResultsProductDescription: _sfc_main$r,
13137
+ SearchResultsProductRating: _sfc_main$q,
13138
+ SearchResultsProductRegularPrice: _sfc_main$p,
13139
+ SearchResultsProductPrice: _sfc_main$o,
13140
+ SearchResultsProductAddToCart: _sfc_main$n,
13141
+ SearchResultsProductCustom: _sfc_main$m,
13142
+ SearchResultsProductCustomHtmlElement: _sfc_main$l,
13143
+ SearchResultsProductSingleStarRating: _sfc_main$k
13144
+ }
13145
+ };
13146
+ const _sfc_main$j = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
13136
13147
  __name: "SearchResultsProductCardElement",
13137
13148
  props: {
13138
13149
  item: {},
@@ -13202,13 +13213,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13202
13213
  };
13203
13214
  }
13204
13215
  }));
13205
- const _hoisted_1$a = ["href"];
13206
- const _hoisted_2$9 = {
13216
+ const _hoisted_1$h = ["href"];
13217
+ const _hoisted_2$e = {
13207
13218
  key: 0,
13208
13219
  class: "lupa-out-of-stock"
13209
13220
  };
13210
- const _hoisted_3$4 = { class: "lupa-search-result-product-details-section" };
13211
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
13221
+ const _hoisted_3$9 = { class: "lupa-search-result-product-details-section" };
13222
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
13212
13223
  __name: "SearchResultsProductCard",
13213
13224
  props: {
13214
13225
  product: {},
@@ -13353,7 +13364,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13353
13364
  class: normalizeClass(["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]),
13354
13365
  onClick: handleClick
13355
13366
  }, [
13356
- createVNode(_sfc_main$n, { options: badgesOptions.value }, null, 8, ["options"]),
13367
+ createVNode(_sfc_main$u, { options: badgesOptions.value }, null, 8, ["options"]),
13357
13368
  createBaseVNode("div", {
13358
13369
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
13359
13370
  }, [
@@ -13363,7 +13374,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13363
13374
  onClick: handleNavigation
13364
13375
  }, [
13365
13376
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
13366
- return openBlock(), createBlock(_sfc_main$c, {
13377
+ return openBlock(), createBlock(_sfc_main$j, {
13367
13378
  class: "lupa-search-results-product-element",
13368
13379
  item: _ctx.product,
13369
13380
  element,
@@ -13373,16 +13384,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13373
13384
  link: link.value
13374
13385
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
13375
13386
  }), 128)),
13376
- createVNode(_sfc_main$n, {
13387
+ createVNode(_sfc_main$u, {
13377
13388
  options: badgesOptions.value,
13378
13389
  position: "image",
13379
13390
  class: "lupa-image-badges"
13380
13391
  }, null, 8, ["options"]),
13381
- ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
13382
- ], 8, _hoisted_1$a),
13383
- createBaseVNode("div", _hoisted_3$4, [
13392
+ ((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$e, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
13393
+ ], 8, _hoisted_1$h),
13394
+ createBaseVNode("div", _hoisted_3$9, [
13384
13395
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
13385
- return openBlock(), createBlock(_sfc_main$c, {
13396
+ return openBlock(), createBlock(_sfc_main$j, {
13386
13397
  class: "lupa-search-results-product-element",
13387
13398
  item: _ctx.product,
13388
13399
  element,
@@ -13400,7 +13411,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13400
13411
  class: normalizeClass("lupa-element-group-" + group)
13401
13412
  }, [
13402
13413
  (openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
13403
- return openBlock(), createBlock(_sfc_main$c, {
13414
+ return openBlock(), createBlock(_sfc_main$j, {
13404
13415
  class: "lupa-search-results-product-element",
13405
13416
  item: _ctx.product,
13406
13417
  element,
@@ -13418,23 +13429,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13418
13429
  };
13419
13430
  }
13420
13431
  });
13421
- const _hoisted_1$9 = {
13432
+ const _hoisted_1$g = {
13422
13433
  id: "lupa-search-results-similar-queries",
13423
13434
  "data-cy": "lupa-search-results-similar-queries"
13424
13435
  };
13425
- const _hoisted_2$8 = { class: "lupa-similar-queries-label" };
13426
- const _hoisted_3$3 = {
13436
+ const _hoisted_2$d = { class: "lupa-similar-queries-label" };
13437
+ const _hoisted_3$8 = {
13427
13438
  class: "lupa-similar-query-label",
13428
13439
  "data-cy": "lupa-similar-query-label"
13429
13440
  };
13430
- const _hoisted_4$2 = ["onClick"];
13431
- const _hoisted_5$1 = ["innerHTML"];
13432
- const _hoisted_6 = { key: 0 };
13433
- const _hoisted_7 = {
13441
+ const _hoisted_4$5 = ["onClick"];
13442
+ const _hoisted_5$4 = ["innerHTML"];
13443
+ const _hoisted_6$2 = { key: 0 };
13444
+ const _hoisted_7$1 = {
13434
13445
  class: "lupa-products",
13435
13446
  "data-cy": "lupa-products"
13436
13447
  };
13437
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
13448
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
13438
13449
  __name: "SearchResultsSimilarQueries",
13439
13450
  props: {
13440
13451
  labels: {},
@@ -13464,11 +13475,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13464
13475
  paramsStore.goToResults({ searchText, facet });
13465
13476
  };
13466
13477
  return (_ctx, _cache) => {
13467
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
13468
- createBaseVNode("div", _hoisted_2$8, toDisplayString(_ctx.labels.similarQueries), 1),
13478
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
13479
+ createBaseVNode("div", _hoisted_2$d, toDisplayString(_ctx.labels.similarQueries), 1),
13469
13480
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
13470
13481
  return openBlock(), createElementBlock("div", { key: index }, [
13471
- createBaseVNode("div", _hoisted_3$3, [
13482
+ createBaseVNode("div", _hoisted_3$8, [
13472
13483
  createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
13473
13484
  createBaseVNode("span", {
13474
13485
  id: "lupa-similar-query-text-component",
@@ -13478,13 +13489,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13478
13489
  }, [
13479
13490
  createBaseVNode("span", {
13480
13491
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
13481
- }, null, 8, _hoisted_5$1),
13482
- similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
13483
- ], 8, _hoisted_4$2)
13492
+ }, null, 8, _hoisted_5$4),
13493
+ similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$2, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
13494
+ ], 8, _hoisted_4$5)
13484
13495
  ]),
13485
- createBaseVNode("div", _hoisted_7, [
13496
+ createBaseVNode("div", _hoisted_7$1, [
13486
13497
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
13487
- return openBlock(), createBlock(_sfc_main$b, {
13498
+ return openBlock(), createBlock(_sfc_main$i, {
13488
13499
  style: normalizeStyle(_ctx.columnSize),
13489
13500
  key: getDocumentKey(index2, product),
13490
13501
  product,
@@ -13498,15 +13509,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13498
13509
  };
13499
13510
  }
13500
13511
  });
13501
- const _hoisted_1$8 = {
13512
+ const _hoisted_1$f = {
13502
13513
  key: 0,
13503
13514
  class: "lupa-results-additional-panel"
13504
13515
  };
13505
- const _hoisted_2$7 = {
13516
+ const _hoisted_2$c = {
13506
13517
  class: "lupa-results-additional-panel-items",
13507
13518
  "data-cy": "lupa-results-additional-panel-items"
13508
13519
  };
13509
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13520
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
13510
13521
  __name: "AdditionalPanel",
13511
13522
  props: {
13512
13523
  panel: {},
@@ -13578,10 +13589,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13578
13589
  handleQueryChange();
13579
13590
  });
13580
13591
  return (_ctx, _cache) => {
13581
- return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
13582
- createBaseVNode("div", _hoisted_2$7, [
13592
+ return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
13593
+ createBaseVNode("div", _hoisted_2$c, [
13583
13594
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
13584
- return openBlock(), createBlock(_sfc_main$b, {
13595
+ return openBlock(), createBlock(_sfc_main$i, {
13585
13596
  key: index,
13586
13597
  product: item,
13587
13598
  options: _ctx.panel,
@@ -13599,11 +13610,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13599
13610
  };
13600
13611
  }
13601
13612
  });
13602
- const _hoisted_1$7 = {
13613
+ const _hoisted_1$e = {
13603
13614
  key: 0,
13604
13615
  class: "lupa-results-additional-panels"
13605
13616
  };
13606
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13617
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
13607
13618
  __name: "AdditionalPanels",
13608
13619
  props: {
13609
13620
  options: {},
@@ -13620,9 +13631,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13620
13631
  return locationPanels.value.length > 0;
13621
13632
  });
13622
13633
  return (_ctx, _cache) => {
13623
- return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
13634
+ return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
13624
13635
  (openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
13625
- return openBlock(), createBlock(_sfc_main$9, {
13636
+ return openBlock(), createBlock(_sfc_main$g, {
13626
13637
  key: panel.queryKey,
13627
13638
  panel,
13628
13639
  options: _ctx.sdkOptions
@@ -13639,36 +13650,36 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13639
13650
  }
13640
13651
  return target;
13641
13652
  };
13642
- const _sfc_main$7 = {};
13643
- const _hoisted_1$6 = { class: "lupa-spinner-wrapper" };
13644
- const _hoisted_2$6 = { class: "lupa-spinner" };
13653
+ const _sfc_main$e = {};
13654
+ const _hoisted_1$d = { class: "lupa-spinner-wrapper" };
13655
+ const _hoisted_2$b = { class: "lupa-spinner" };
13645
13656
  function _sfc_render(_ctx, _cache) {
13646
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
13647
- createBaseVNode("div", _hoisted_2$6, [
13657
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
13658
+ createBaseVNode("div", _hoisted_2$b, [
13648
13659
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
13649
13660
  return createBaseVNode("div", { key: x });
13650
13661
  }), 64))
13651
13662
  ])
13652
13663
  ]);
13653
13664
  }
13654
- const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]);
13655
- const _hoisted_1$5 = { id: "lupa-search-results-products" };
13656
- const _hoisted_2$5 = {
13665
+ const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render]]);
13666
+ const _hoisted_1$c = { id: "lupa-search-results-products" };
13667
+ const _hoisted_2$a = {
13657
13668
  class: "lupa-products",
13658
13669
  "data-cy": "lupa-products"
13659
13670
  };
13660
- const _hoisted_3$2 = {
13671
+ const _hoisted_3$7 = {
13661
13672
  key: 0,
13662
13673
  class: "lupa-empty-results",
13663
13674
  "data-cy": "lupa-no-results-in-page"
13664
13675
  };
13665
- const _hoisted_4$1 = {
13676
+ const _hoisted_4$4 = {
13666
13677
  key: 3,
13667
13678
  class: "lupa-empty-results",
13668
13679
  "data-cy": "lupa-no-results"
13669
13680
  };
13670
- const _hoisted_5 = { key: 4 };
13671
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13681
+ const _hoisted_5$3 = { key: 4 };
13682
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
13672
13683
  __name: "SearchResultsProducts",
13673
13684
  props: {
13674
13685
  options: {},
@@ -13759,23 +13770,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13759
13770
  };
13760
13771
  return (_ctx, _cache) => {
13761
13772
  var _a;
13762
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
13773
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [
13763
13774
  unref(loading) && !unref(isMobileSidebarVisible) ? (openBlock(), createBlock(Spinner, {
13764
13775
  key: 0,
13765
13776
  class: "lupa-loader"
13766
13777
  })) : createCommentVNode("", true),
13767
13778
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
13768
- showTopFilters.value ? (openBlock(), createBlock(_sfc_main$z, {
13779
+ showTopFilters.value ? (openBlock(), createBlock(_sfc_main$G, {
13769
13780
  key: 0,
13770
13781
  options: (_a = _ctx.options.filters) != null ? _a : {}
13771
13782
  }, null, 8, ["options"])) : createCommentVNode("", true),
13772
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$t, {
13783
+ showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$A, {
13773
13784
  key: 1,
13774
13785
  class: "lupa-toolbar-mobile",
13775
13786
  options: _ctx.options,
13776
13787
  "pagination-location": "top"
13777
13788
  }, null, 8, ["options"])) : createCommentVNode("", true),
13778
- currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$M, {
13789
+ currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$T, {
13779
13790
  key: 2,
13780
13791
  class: normalizeClass(currentFiltersClass.value),
13781
13792
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
@@ -13783,18 +13794,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13783
13794
  expandable: !desktopFiltersExpanded.value
13784
13795
  }, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
13785
13796
  ], 64)) : createCommentVNode("", true),
13786
- createVNode(_sfc_main$8, {
13797
+ createVNode(_sfc_main$f, {
13787
13798
  options: _ctx.options,
13788
13799
  location: "top",
13789
13800
  sdkOptions: _ctx.options.options
13790
13801
  }, null, 8, ["options", "sdkOptions"]),
13791
13802
  unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
13792
- createVNode(_sfc_main$t, {
13803
+ createVNode(_sfc_main$A, {
13793
13804
  class: "lupa-toolbar-top",
13794
13805
  options: _ctx.options,
13795
13806
  "pagination-location": "top"
13796
13807
  }, null, 8, ["options"]),
13797
- createBaseVNode("div", _hoisted_2$5, [
13808
+ createBaseVNode("div", _hoisted_2$a, [
13798
13809
  _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
13799
13810
  return renderSlot(_ctx.$slots, "productCard", {
13800
13811
  style: normalizeStyle(columnSize.value),
@@ -13803,7 +13814,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13803
13814
  options: productCardOptions.value
13804
13815
  });
13805
13816
  }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
13806
- return openBlock(), createBlock(_sfc_main$b, {
13817
+ return openBlock(), createBlock(_sfc_main$i, {
13807
13818
  style: normalizeStyle(columnSize.value),
13808
13819
  key: getProductKeyAction(index, product),
13809
13820
  product,
@@ -13811,7 +13822,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13811
13822
  }, null, 8, ["style", "product", "options"]);
13812
13823
  }), 128))
13813
13824
  ]),
13814
- unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
13825
+ unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
13815
13826
  createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
13816
13827
  _ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
13817
13828
  key: 0,
@@ -13819,22 +13830,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13819
13830
  onClick: goToFirstPage
13820
13831
  }, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
13821
13832
  ])) : createCommentVNode("", true),
13822
- createVNode(_sfc_main$t, {
13833
+ createVNode(_sfc_main$A, {
13823
13834
  class: "lupa-toolbar-bottom",
13824
13835
  options: _ctx.options,
13825
13836
  "pagination-location": "bottom"
13826
13837
  }, null, 8, ["options"]),
13827
- createVNode(_sfc_main$8, {
13838
+ createVNode(_sfc_main$f, {
13828
13839
  options: _ctx.options,
13829
13840
  location: "bottom",
13830
13841
  sdkOptions: _ctx.options.options
13831
13842
  }, null, 8, ["options", "sdkOptions"])
13832
- ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
13843
+ ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
13833
13844
  createTextVNode(toDisplayString(_ctx.options.labels.emptyResults) + " ", 1),
13834
13845
  createBaseVNode("span", null, toDisplayString(unref(currentQueryText)), 1)
13835
13846
  ])) : createCommentVNode("", true),
13836
- hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
13837
- createVNode(_sfc_main$a, {
13847
+ hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
13848
+ createVNode(_sfc_main$h, {
13838
13849
  labels: similarQueriesLabels.value,
13839
13850
  columnSize: columnSize.value,
13840
13851
  productCardOptions: productCardOptions.value
@@ -13845,13 +13856,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13845
13856
  };
13846
13857
  }
13847
13858
  });
13848
- const _hoisted_1$4 = { class: "lupa-top-mobile-filter-wrapper" };
13849
- const _hoisted_2$4 = {
13859
+ const _hoisted_1$b = { class: "lupa-top-mobile-filter-wrapper" };
13860
+ const _hoisted_2$9 = {
13850
13861
  key: 0,
13851
13862
  class: "lupa-category-back"
13852
13863
  };
13853
- const _hoisted_3$1 = ["href"];
13854
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13864
+ const _hoisted_3$6 = ["href"];
13865
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
13855
13866
  __name: "CategoryTopFilters",
13856
13867
  props: {
13857
13868
  options: {}
@@ -13883,15 +13894,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13883
13894
  return openBlock(), createElementBlock("div", {
13884
13895
  class: normalizeClass(["lupa-category-top-mobile-filters", { "lupa-has-back-button": hasBackButton.value }])
13885
13896
  }, [
13886
- createBaseVNode("div", _hoisted_1$4, [
13887
- hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
13897
+ createBaseVNode("div", _hoisted_1$b, [
13898
+ hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
13888
13899
  createBaseVNode("a", {
13889
13900
  "data-cy": "lupa-category-back",
13890
13901
  href: backUrlLink.value,
13891
13902
  onClick: handleNavigationBack
13892
- }, toDisplayString(backTitle.value), 9, _hoisted_3$1)
13903
+ }, toDisplayString(backTitle.value), 9, _hoisted_3$6)
13893
13904
  ])) : createCommentVNode("", true),
13894
- createVNode(_sfc_main$t, {
13905
+ createVNode(_sfc_main$A, {
13895
13906
  class: "lupa-toolbar-mobile",
13896
13907
  "pagination-location": "top",
13897
13908
  options: _ctx.options
@@ -13901,18 +13912,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13901
13912
  };
13902
13913
  }
13903
13914
  });
13904
- const _hoisted_1$3 = {
13915
+ const _hoisted_1$a = {
13905
13916
  key: 0,
13906
13917
  class: "lupa-container-title-summary-mobile"
13907
13918
  };
13908
- const _hoisted_2$3 = {
13919
+ const _hoisted_2$8 = {
13909
13920
  key: 4,
13910
13921
  id: "lupa-search-results",
13911
13922
  class: "top-layout-wrapper"
13912
13923
  };
13913
- const _hoisted_3 = { class: "search-content" };
13914
- const _hoisted_4 = { id: "lupa-search-results" };
13915
- const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
13924
+ const _hoisted_3$5 = { class: "search-content" };
13925
+ const _hoisted_4$3 = { id: "lupa-search-results" };
13926
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13916
13927
  __name: "SearchResults",
13917
13928
  props: {
13918
13929
  options: {},
@@ -14101,40 +14112,40 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14101
14112
  return openBlock(), createElementBlock("div", {
14102
14113
  class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
14103
14114
  }, [
14104
- _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
14105
- createVNode(_sfc_main$Q, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14106
- createVNode(_sfc_main$O, {
14115
+ _ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
14116
+ createVNode(_sfc_main$X, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14117
+ createVNode(_sfc_main$V, {
14107
14118
  "show-summary": true,
14108
14119
  options: _ctx.options,
14109
14120
  "is-product-list": (_a = _ctx.isProductList) != null ? _a : false
14110
14121
  }, null, 8, ["options", "is-product-list"])
14111
14122
  ])) : createCommentVNode("", true),
14112
- isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$5, {
14123
+ isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$c, {
14113
14124
  key: 1,
14114
14125
  options: _ctx.options
14115
14126
  }, null, 8, ["options"])) : createCommentVNode("", true),
14116
- _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$B, {
14127
+ _ctx.options.filters ? (openBlock(), createBlock(_sfc_main$I, {
14117
14128
  key: 2,
14118
14129
  options: _ctx.options.filters
14119
14130
  }, null, 8, ["options"])) : createCommentVNode("", true),
14120
- unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$A, {
14131
+ unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$H, {
14121
14132
  key: 3,
14122
14133
  breadcrumbs: _ctx.options.breadcrumbs
14123
14134
  }, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
14124
- isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
14125
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$C, {
14135
+ isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
14136
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
14126
14137
  key: 0,
14127
14138
  options: (_b = _ctx.options.filters) != null ? _b : {},
14128
14139
  ref_key: "searchResultsFilters",
14129
14140
  ref: searchResultsFilters
14130
14141
  }, null, 8, ["options"])) : createCommentVNode("", true),
14131
- createBaseVNode("div", _hoisted_3, [
14132
- createVNode(_sfc_main$Q, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14133
- createVNode(_sfc_main$O, {
14142
+ createBaseVNode("div", _hoisted_3$5, [
14143
+ createVNode(_sfc_main$X, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14144
+ createVNode(_sfc_main$V, {
14134
14145
  options: _ctx.options,
14135
14146
  "is-product-list": (_c = _ctx.isProductList) != null ? _c : false
14136
14147
  }, null, 8, ["options", "is-product-list"]),
14137
- createVNode(_sfc_main$6, {
14148
+ createVNode(_sfc_main$d, {
14138
14149
  options: _ctx.options,
14139
14150
  ssr: ssrEnabled.value
14140
14151
  }, {
@@ -14145,19 +14156,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14145
14156
  }, 8, ["options", "ssr"])
14146
14157
  ])
14147
14158
  ])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
14148
- createVNode(_sfc_main$Q, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14149
- createVNode(_sfc_main$O, {
14159
+ createVNode(_sfc_main$X, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
14160
+ createVNode(_sfc_main$V, {
14150
14161
  options: _ctx.options,
14151
14162
  "is-product-list": (_d = _ctx.isProductList) != null ? _d : false
14152
14163
  }, null, 8, ["options", "is-product-list"]),
14153
- createBaseVNode("div", _hoisted_4, [
14154
- showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$C, {
14164
+ createBaseVNode("div", _hoisted_4$3, [
14165
+ showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$J, {
14155
14166
  key: 0,
14156
14167
  options: (_e = _ctx.options.filters) != null ? _e : {},
14157
14168
  ref_key: "searchResultsFilters",
14158
14169
  ref: searchResultsFilters
14159
14170
  }, null, 8, ["options"])) : createCommentVNode("", true),
14160
- createVNode(_sfc_main$6, {
14171
+ createVNode(_sfc_main$d, {
14161
14172
  options: _ctx.options,
14162
14173
  ssr: ssrEnabled.value
14163
14174
  }, createSlots({
@@ -14180,12 +14191,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14180
14191
  };
14181
14192
  }
14182
14193
  });
14183
- const _hoisted_1$2 = {
14194
+ const _hoisted_1$9 = {
14184
14195
  key: 0,
14185
14196
  class: "lupa-category-overview"
14186
14197
  };
14187
- const _hoisted_2$2 = ["innerHTML"];
14188
- const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
14198
+ const _hoisted_2$7 = ["innerHTML"];
14199
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
14189
14200
  __name: "CategoryDescription",
14190
14201
  props: {
14191
14202
  options: {}
@@ -14201,16 +14212,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14201
14212
  return Boolean((_b = (_a = props.options.categories) == null ? void 0 : _a.current) == null ? void 0 : _b.description);
14202
14213
  });
14203
14214
  return (_ctx, _cache) => {
14204
- return overviewVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
14215
+ return overviewVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
14205
14216
  createBaseVNode("div", {
14206
14217
  class: "lupa-category-description",
14207
14218
  innerHTML: description.value
14208
- }, null, 8, _hoisted_2$2)
14219
+ }, null, 8, _hoisted_2$7)
14209
14220
  ])) : createCommentVNode("", true);
14210
14221
  };
14211
14222
  }
14212
14223
  });
14213
- const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
14224
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
14214
14225
  __name: "ProductList",
14215
14226
  props: {
14216
14227
  options: {}
@@ -14232,7 +14243,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14232
14243
  __expose({ fetch: fetch2 });
14233
14244
  return (_ctx, _cache) => {
14234
14245
  return openBlock(), createElementBlock("div", null, [
14235
- createVNode(_sfc_main$4$1, {
14246
+ createVNode(_sfc_main$b, {
14236
14247
  options: componentOptions.value,
14237
14248
  "initial-filters": _ctx.options.initialFilters,
14238
14249
  "is-product-list": true,
@@ -14240,7 +14251,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14240
14251
  ref: searchResults2
14241
14252
  }, {
14242
14253
  default: withCtx(() => [
14243
- createVNode(_sfc_main$3$1, { options: _ctx.options }, null, 8, ["options"])
14254
+ createVNode(_sfc_main$a, { options: _ctx.options }, null, 8, ["options"])
14244
14255
  ]),
14245
14256
  _: 1
14246
14257
  }, 8, ["options", "initial-filters"])
@@ -19731,9 +19742,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19731
19742
  }).call(commonjsGlobal$1);
19732
19743
  })(lodash$1, lodash$1.exports);
19733
19744
  var lodashExports$1 = lodash$1.exports;
19734
- const _hoisted_1$1 = ["onClick"];
19735
- const _hoisted_2$1 = { class: "lupa-search-box-container" };
19736
- const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
19745
+ const _hoisted_1$8 = ["onClick"];
19746
+ const _hoisted_2$6 = { class: "lupa-search-box-container" };
19747
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
19737
19748
  __name: "SearchContainer",
19738
19749
  props: {
19739
19750
  options: {}
@@ -19778,8 +19789,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19778
19789
  class: "lupa-search-container",
19779
19790
  onClick: withModifiers(innerClick, ["stop"])
19780
19791
  }, [
19781
- createBaseVNode("div", _hoisted_2$1, [
19782
- createVNode(_sfc_main$R, {
19792
+ createBaseVNode("div", _hoisted_2$6, [
19793
+ createVNode(_sfc_main$Y, {
19783
19794
  options: fullSearchBoxOptions.value,
19784
19795
  "is-search-container": true,
19785
19796
  ref_key: "searchBox",
@@ -19787,13 +19798,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19787
19798
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
19788
19799
  }, null, 8, ["options"])
19789
19800
  ]),
19790
- createVNode(_sfc_main$4$1, {
19801
+ createVNode(_sfc_main$b, {
19791
19802
  options: fullSearchResultsOptions.value,
19792
19803
  "is-container": true,
19793
19804
  ref_key: "searchResults",
19794
19805
  ref: searchResults2
19795
19806
  }, null, 8, ["options"])
19796
- ], 8, _hoisted_1$1)
19807
+ ], 8, _hoisted_1$8)
19797
19808
  ]);
19798
19809
  };
19799
19810
  }
@@ -20496,13 +20507,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20496
20507
  };
20497
20508
  }
20498
20509
  });
20499
- const _hoisted_1 = { class: "lupa-search-product-recommendations-wrapper" };
20500
- const _hoisted_2 = {
20510
+ const _hoisted_1$7 = { class: "lupa-search-product-recommendations-wrapper" };
20511
+ const _hoisted_2$5 = {
20501
20512
  key: 0,
20502
20513
  class: "lupa-recommended-products",
20503
20514
  "data-cy": "lupa-recommended-products"
20504
20515
  };
20505
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
20516
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
20506
20517
  __name: "Recommendations",
20507
20518
  props: {
20508
20519
  options: {}
@@ -20588,8 +20599,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20588
20599
  });
20589
20600
  __expose({ fetch: fetch2 });
20590
20601
  return (_ctx, _cache) => {
20591
- return openBlock(), createElementBlock("div", _hoisted_1, [
20592
- !loading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
20602
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
20603
+ !loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
20593
20604
  createVNode(unref(Carousel), mergeProps(carouselOptions.value, { "wrap-around": true }), {
20594
20605
  addons: withCtx(() => [
20595
20606
  createVNode(unref(Navigation))
@@ -20600,7 +20611,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20600
20611
  key: getProductKeyAction(index, product)
20601
20612
  }, {
20602
20613
  default: withCtx(() => [
20603
- createVNode(_sfc_main$b, {
20614
+ createVNode(_sfc_main$i, {
20604
20615
  product,
20605
20616
  options: _ctx.options,
20606
20617
  "click-tracking-settings": clickTrackingSettings.value
@@ -20617,6 +20628,533 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20617
20628
  };
20618
20629
  }
20619
20630
  });
20631
+ const _withScopeId = (n) => (pushScopeId("data-v-6fa22b2b"), n = n(), popScopeId(), n);
20632
+ const _hoisted_1$6 = { class: "lupa-chat-spinner" };
20633
+ const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", null, null, -1));
20634
+ const _hoisted_3$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", null, null, -1));
20635
+ const _hoisted_4$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", null, null, -1));
20636
+ const _hoisted_5$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", null, null, -1));
20637
+ const _hoisted_6$1 = [
20638
+ _hoisted_2$4,
20639
+ _hoisted_3$4,
20640
+ _hoisted_4$2,
20641
+ _hoisted_5$2
20642
+ ];
20643
+ const _hoisted_7 = { class: "lupa-chat-spinner-message" };
20644
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
20645
+ __name: "ChatSpinner",
20646
+ props: {
20647
+ small: { type: Boolean },
20648
+ message: {}
20649
+ },
20650
+ setup(__props) {
20651
+ return (_ctx, _cache) => {
20652
+ return openBlock(), createElementBlock("section", _hoisted_1$6, [
20653
+ createBaseVNode("div", {
20654
+ class: normalizeClass([{ small: _ctx.small }, "lds-ring"])
20655
+ }, _hoisted_6$1, 2),
20656
+ createBaseVNode("div", _hoisted_7, toDisplayString(_ctx.message), 1)
20657
+ ]);
20658
+ };
20659
+ }
20660
+ });
20661
+ const ChatSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-6fa22b2b"]]);
20662
+ const _hoisted_1$5 = { class: "lupa-chat-input-container" };
20663
+ const _hoisted_2$3 = { id: "lupa-search-box-input" };
20664
+ const _hoisted_3$3 = {
20665
+ key: 0,
20666
+ class: "lupa-chat-form-submit"
20667
+ };
20668
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
20669
+ __name: "ChatInput",
20670
+ props: {
20671
+ disabled: { type: Boolean }
20672
+ },
20673
+ emits: ["submit"],
20674
+ setup(__props, { emit: emit2 }) {
20675
+ const inputValue = ref("");
20676
+ const submit = () => {
20677
+ emit2("submit", inputValue.value);
20678
+ inputValue.value = "";
20679
+ };
20680
+ return (_ctx, _cache) => {
20681
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
20682
+ createBaseVNode("form", {
20683
+ action: "javascript:void(0);",
20684
+ class: "chat-input-form",
20685
+ onSubmit: submit
20686
+ }, [
20687
+ createBaseVNode("div", _hoisted_2$3, [
20688
+ withDirectives(createBaseVNode("input", {
20689
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
20690
+ ref: "mainInput",
20691
+ autocomplete: "off",
20692
+ class: "lupa-search-box-input-field",
20693
+ "data-cy": "lupa-search-box-input-field",
20694
+ type: "text",
20695
+ placeholder: "Type your request here..."
20696
+ }, null, 512), [
20697
+ [vModelText, inputValue.value]
20698
+ ])
20699
+ ]),
20700
+ !_ctx.disabled ? (openBlock(), createElementBlock("button", _hoisted_3$3, "Ask LupaChat")) : (openBlock(), createBlock(ChatSpinner, {
20701
+ key: 1,
20702
+ small: true
20703
+ }))
20704
+ ], 32)
20705
+ ]);
20706
+ };
20707
+ }
20708
+ });
20709
+ const Env = {
20710
+ production: "https://api.lupasearch.com/v1/",
20711
+ staging: "https://api.staging.lupasearch.com/v1/"
20712
+ };
20713
+ const defaultConfig = {
20714
+ method: "POST",
20715
+ headers: { "Content-Type": "application/json" }
20716
+ };
20717
+ const getApiUrl = (environment, customBaseUrl) => {
20718
+ if (customBaseUrl) {
20719
+ return customBaseUrl;
20720
+ }
20721
+ return Env[environment] || Env["production"];
20722
+ };
20723
+ const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
20724
+ const { environment, customBaseUrl } = options;
20725
+ const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps2(__spreadValues2({}, defaultConfig), {
20726
+ body: JSON.stringify(request)
20727
+ }));
20728
+ if (res.status < 400) {
20729
+ const data = yield res.json();
20730
+ return __spreadProps2(__spreadValues2({}, data), { success: true });
20731
+ }
20732
+ const errors = yield res.json();
20733
+ return { success: false, errors };
20734
+ });
20735
+ const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20736
+ const { environment, customBaseUrl } = options;
20737
+ const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps2(__spreadValues2({}, defaultConfig), {
20738
+ body: JSON.stringify({ phrases })
20739
+ }));
20740
+ if (res.status < 400) {
20741
+ const data = yield res.json();
20742
+ return __spreadProps2(__spreadValues2({}, data), { success: true });
20743
+ }
20744
+ const errors = yield res.json();
20745
+ return { success: false, errors };
20746
+ });
20747
+ const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20748
+ const { environment, customBaseUrl } = options;
20749
+ const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps2(__spreadValues2({}, defaultConfig), {
20750
+ body: JSON.stringify({ phrases })
20751
+ }));
20752
+ if (res.status < 400) {
20753
+ const data = yield res.json();
20754
+ console.log(data);
20755
+ return __spreadProps2(__spreadValues2({}, data), { success: true });
20756
+ }
20757
+ const errors = yield res.json();
20758
+ return { success: false, errors };
20759
+ });
20760
+ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function* (options, {
20761
+ initialQuery,
20762
+ productStrings,
20763
+ messageHistory
20764
+ }) {
20765
+ const { environment, customBaseUrl } = options;
20766
+ const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps2(__spreadValues2({}, defaultConfig), {
20767
+ body: JSON.stringify({ initialQuery, messageHistory, productStrings })
20768
+ }));
20769
+ if (res.status < 400) {
20770
+ const data = yield res.json();
20771
+ console.log(data);
20772
+ return __spreadProps2(__spreadValues2({}, data), { success: true });
20773
+ }
20774
+ const errors = yield res.json();
20775
+ return { success: false, errors };
20776
+ });
20777
+ const prepareChatHistory = (chatLog) => {
20778
+ var _a, _b;
20779
+ const history = [];
20780
+ for (const log of chatLog) {
20781
+ history.push({
20782
+ role: "user",
20783
+ content: log.userInput
20784
+ });
20785
+ history.push({
20786
+ role: "assistant",
20787
+ content: log.suggestedPhrases.join(", ")
20788
+ });
20789
+ if (((_a = log.bestItems) == null ? void 0 : _a.length) > 0) {
20790
+ history.push({
20791
+ role: "assistant",
20792
+ content: `I suggest these best item matches to your query: ${(_b = log.bestItems) == null ? void 0 : _b.join(", ")}`
20793
+ });
20794
+ }
20795
+ }
20796
+ return history;
20797
+ };
20798
+ const ChatService = {
20799
+ suggestSearchChatPhrases,
20800
+ suggestPhraseAlternatives,
20801
+ suggestSimplifiedPhrases,
20802
+ suggestBestProductMatches,
20803
+ prepareChatHistory
20804
+ };
20805
+ const _hoisted_1$4 = { class: "lupa-chat-results" };
20806
+ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
20807
+ __name: "ChatPhraseProductsList",
20808
+ props: {
20809
+ options: {},
20810
+ searchResults: {}
20811
+ },
20812
+ setup(__props) {
20813
+ const props = __props;
20814
+ const getProductKeyAction = (index, product) => {
20815
+ return getProductKey(`${index}`, product, props.options.idKey);
20816
+ };
20817
+ return (_ctx, _cache) => {
20818
+ return openBlock(), createElementBlock("section", _hoisted_1$4, [
20819
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
20820
+ return openBlock(), createBlock(_sfc_main$i, {
20821
+ class: "lupa-chat-product-card",
20822
+ key: getProductKeyAction(index, product),
20823
+ product,
20824
+ options: _ctx.options
20825
+ }, null, 8, ["product", "options"]);
20826
+ }), 128))
20827
+ ]);
20828
+ };
20829
+ }
20830
+ });
20831
+ const _hoisted_1$3 = { class: "lupa-chat-content-entry-phrase" };
20832
+ const _hoisted_2$2 = { class: "lupa-chat-phrase-title" };
20833
+ const _hoisted_3$2 = {
20834
+ key: 0,
20835
+ class: "alert"
20836
+ };
20837
+ const _hoisted_4$1 = {
20838
+ key: 0,
20839
+ class: "lupa-chat-no-results"
20840
+ };
20841
+ const _hoisted_5$1 = /* @__PURE__ */ createBaseVNode("p", null, "We found no matches for this search term", -1);
20842
+ const _hoisted_6 = [
20843
+ _hoisted_5$1
20844
+ ];
20845
+ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
20846
+ __name: "ChatContentEntryPhrase",
20847
+ props: {
20848
+ options: {},
20849
+ phrase: {}
20850
+ },
20851
+ emits: ["loaded"],
20852
+ setup(__props, { emit: emit2 }) {
20853
+ const props = __props;
20854
+ const searchResults2 = ref([]);
20855
+ const usedAlternativePhrases = ref([]);
20856
+ const usedPartialResults = ref(false);
20857
+ const loading = ref(false);
20858
+ const currentAction = ref("");
20859
+ const displayPhrase = computed(() => props.phrase.replace(",", ""));
20860
+ onMounted(() => __async(this, null, function* () {
20861
+ loading.value = true;
20862
+ currentAction.value = "Loading search results...";
20863
+ try {
20864
+ const initialResults = yield getSearchResults(props.phrase, 8);
20865
+ if (initialResults.length) {
20866
+ searchResults2.value = initialResults;
20867
+ if (initialResults.length > 2) {
20868
+ return;
20869
+ }
20870
+ }
20871
+ currentAction.value = "Checking for alternative phrases...";
20872
+ const alternatives = yield getPhraseAlternatives();
20873
+ yield addAlternativePhraseResults(alternatives, 6);
20874
+ if (!searchResults2.value.length) {
20875
+ const partialAlteratives = [props.phrase].map((phrase) => phrase.split(/\s+/)).flat();
20876
+ currentAction.value = "Checking for partial alternatives...";
20877
+ const partialResults = yield addAlternativePhraseResults(partialAlteratives, 4);
20878
+ if (partialResults == null ? void 0 : partialResults.length) {
20879
+ usedPartialResults.value = true;
20880
+ }
20881
+ }
20882
+ } finally {
20883
+ loading.value = false;
20884
+ currentAction.value = "";
20885
+ emit2("loaded", searchResults2.value);
20886
+ }
20887
+ }));
20888
+ const addAlternativePhraseResults = (phrases, limit = 5) => __async(this, null, function* () {
20889
+ const allResults = [];
20890
+ for (const phrase of phrases) {
20891
+ const results = yield getSearchResults(phrase, limit);
20892
+ if (results.length) {
20893
+ usedAlternativePhrases.value.push(phrase);
20894
+ addToSearchResults(results);
20895
+ allResults.push(...results);
20896
+ }
20897
+ }
20898
+ return allResults;
20899
+ });
20900
+ const addToSearchResults = (items) => {
20901
+ const newDocuments = items.filter((item) => {
20902
+ return !searchResults2.value.find((result) => result.id === item.id);
20903
+ });
20904
+ searchResults2.value.push(...newDocuments);
20905
+ };
20906
+ const getSearchResults = (phrase, limit = 5) => __async(this, null, function* () {
20907
+ const query = { searchText: phrase, limit };
20908
+ const result = yield LupaSearchSdk.query(
20909
+ props.options.displayOptions.queryKey,
20910
+ query,
20911
+ props.options.sdkOptions
20912
+ );
20913
+ if (!result.success) {
20914
+ return [];
20915
+ }
20916
+ return result.items;
20917
+ });
20918
+ const getPhraseAlternatives = () => __async(this, null, function* () {
20919
+ const { phrases } = yield ChatService.suggestPhraseAlternatives(props.options.sdkOptions, {
20920
+ phrases: [props.phrase]
20921
+ });
20922
+ return phrases != null ? phrases : [];
20923
+ });
20924
+ return (_ctx, _cache) => {
20925
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [
20926
+ createBaseVNode("div", _hoisted_2$2, [
20927
+ createBaseVNode("h3", null, toDisplayString(displayPhrase.value), 1),
20928
+ createBaseVNode("sub", null, toDisplayString(usedAlternativePhrases.value.join(", ")), 1),
20929
+ usedPartialResults.value ? (openBlock(), createElementBlock("sub", _hoisted_3$2, "Including partial matches - which might not be what you are looking for")) : createCommentVNode("", true)
20930
+ ]),
20931
+ createBaseVNode("div", null, [
20932
+ createVNode(_sfc_main$4$1, {
20933
+ "search-results": searchResults2.value,
20934
+ options: _ctx.options.displayOptions
20935
+ }, null, 8, ["search-results", "options"])
20936
+ ]),
20937
+ !loading.value && !searchResults2.value.length ? (openBlock(), createElementBlock("div", _hoisted_4$1, _hoisted_6)) : createCommentVNode("", true),
20938
+ loading.value ? (openBlock(), createBlock(ChatSpinner, {
20939
+ key: 1,
20940
+ message: currentAction.value
20941
+ }, null, 8, ["message"])) : createCommentVNode("", true)
20942
+ ]);
20943
+ };
20944
+ }
20945
+ });
20946
+ const _hoisted_1$2 = { class: "lupa-chat-best-matches lupa-chat-content-entry" };
20947
+ const _hoisted_2$1 = /* @__PURE__ */ createBaseVNode("h3", null, "Best matches", -1);
20948
+ const _hoisted_3$1 = { key: 0 };
20949
+ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
20950
+ __name: "ChatContentEntry",
20951
+ props: {
20952
+ entry: {},
20953
+ options: {},
20954
+ history: {}
20955
+ },
20956
+ emits: ["loaded"],
20957
+ setup(__props, { emit: emit2 }) {
20958
+ const props = __props;
20959
+ const bestMatches = ref([]);
20960
+ const loadedResults = ref([]);
20961
+ const loadedEntries = ref(0);
20962
+ const loading = ref(true);
20963
+ const entryCount = computed(() => {
20964
+ return props.entry.allPhrases.length;
20965
+ });
20966
+ const loaded = (results = []) => {
20967
+ loadedResults.value.push(...results);
20968
+ loadedEntries.value++;
20969
+ if (loadedEntries.value === entryCount.value) {
20970
+ loadFinalRecommendations();
20971
+ }
20972
+ };
20973
+ const titleKey = computed(() => {
20974
+ var _a;
20975
+ return (_a = props.options.displayOptions.titleKey) != null ? _a : "title";
20976
+ });
20977
+ const loadFinalRecommendations = () => __async(this, null, function* () {
20978
+ var _a;
20979
+ try {
20980
+ const productResultStrings = loadedResults.value.map(
20981
+ (result) => {
20982
+ var _a2, _b;
20983
+ return (_b = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b : "";
20984
+ }
20985
+ );
20986
+ const { products } = yield ChatService.suggestBestProductMatches(props.options.sdkOptions, {
20987
+ initialQuery: props.entry.userInput,
20988
+ productStrings: productResultStrings,
20989
+ messageHistory: (_a = props.history) != null ? _a : []
20990
+ });
20991
+ bestMatches.value = products;
20992
+ emit2("loaded", products);
20993
+ } finally {
20994
+ loading.value = false;
20995
+ }
20996
+ });
20997
+ const bestMatchProducts = computed(() => {
20998
+ return bestMatches.value.map((productName) => {
20999
+ return loadedResults.value.find((r) => r[titleKey.value] === productName);
21000
+ }).filter(Boolean);
21001
+ });
21002
+ const explanation = computed(() => {
21003
+ var _a, _b;
21004
+ return ((_a = bestMatches.value) == null ? void 0 : _a.length) > 0 && !bestMatchProducts.value.length ? (_b = bestMatches == null ? void 0 : bestMatches.value) == null ? void 0 : _b[0] : "";
21005
+ });
21006
+ return (_ctx, _cache) => {
21007
+ return openBlock(), createElementBlock("div", null, [
21008
+ createBaseVNode("ul", null, [
21009
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.entry.allPhrases, (phrase) => {
21010
+ return openBlock(), createElementBlock("li", {
21011
+ key: phrase,
21012
+ class: "lupa-chat-content-entry"
21013
+ }, [
21014
+ phrase ? (openBlock(), createBlock(_sfc_main$3$1, {
21015
+ key: 0,
21016
+ phrase,
21017
+ options: _ctx.options,
21018
+ onLoaded: loaded
21019
+ }, null, 8, ["phrase", "options"])) : createCommentVNode("", true)
21020
+ ]);
21021
+ }), 128))
21022
+ ]),
21023
+ createBaseVNode("section", _hoisted_1$2, [
21024
+ _hoisted_2$1,
21025
+ explanation.value ? (openBlock(), createElementBlock("p", _hoisted_3$1, toDisplayString(explanation.value), 1)) : createCommentVNode("", true),
21026
+ loading.value ? (openBlock(), createBlock(ChatSpinner, {
21027
+ key: 1,
21028
+ message: "Selecting the best matches for you. This might take a few seconds."
21029
+ })) : createCommentVNode("", true),
21030
+ bestMatches.value.length ? (openBlock(), createBlock(_sfc_main$4$1, {
21031
+ key: 2,
21032
+ "search-results": bestMatchProducts.value,
21033
+ options: _ctx.options.displayOptions
21034
+ }, null, 8, ["search-results", "options"])) : createCommentVNode("", true)
21035
+ ])
21036
+ ]);
21037
+ };
21038
+ }
21039
+ });
21040
+ const _hoisted_1$1 = { class: "lupa-chat-section-title" };
21041
+ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
21042
+ __name: "ChatContentList",
21043
+ props: {
21044
+ content: {},
21045
+ options: {},
21046
+ history: {}
21047
+ },
21048
+ emits: ["loaded"],
21049
+ setup(__props, { emit: emit2 }) {
21050
+ const bestItemsLoaded = (items, key) => {
21051
+ emit2("loaded", { items, key });
21052
+ };
21053
+ return (_ctx, _cache) => {
21054
+ return openBlock(), createElementBlock("div", null, [
21055
+ createBaseVNode("ul", null, [
21056
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.content, (entry) => {
21057
+ return openBlock(), createElementBlock("li", {
21058
+ key: entry.key
21059
+ }, [
21060
+ createBaseVNode("h4", _hoisted_1$1, toDisplayString(entry.userInput), 1),
21061
+ createVNode(_sfc_main$2$1, {
21062
+ entry,
21063
+ options: _ctx.options,
21064
+ history: _ctx.history,
21065
+ onLoaded: (items) => bestItemsLoaded(items, entry.key)
21066
+ }, null, 8, ["entry", "options", "history", "onLoaded"])
21067
+ ]);
21068
+ }), 128))
21069
+ ])
21070
+ ]);
21071
+ };
21072
+ }
21073
+ });
21074
+ const _hoisted_1 = { class: "lupasearch-chat" };
21075
+ const _hoisted_2 = /* @__PURE__ */ createBaseVNode("section", { class: "lupa-chat-logo" }, [
21076
+ /* @__PURE__ */ createBaseVNode("img", { src: "https://www.lupasearch.com/images/partials/header/lupasearch-logo.svg" })
21077
+ ], -1);
21078
+ const _hoisted_3 = {
21079
+ key: 0,
21080
+ class: "lupasearch-chat-content"
21081
+ };
21082
+ const _hoisted_4 = {
21083
+ key: 1,
21084
+ class: "lupa-chat-spinner-main"
21085
+ };
21086
+ const _hoisted_5 = { class: "lupasearch-chat-input" };
21087
+ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
21088
+ __name: "ChatContainer",
21089
+ props: {
21090
+ options: {}
21091
+ },
21092
+ setup(__props) {
21093
+ const props = __props;
21094
+ const loading = ref(false);
21095
+ const error = ref("");
21096
+ const chatContent = ref([]);
21097
+ const history = computed(() => ChatService.prepareChatHistory(chatContent.value));
21098
+ const submitChatInput = (input) => __async(this, null, function* () {
21099
+ var _a;
21100
+ if (input.length < 3) {
21101
+ return;
21102
+ }
21103
+ try {
21104
+ loading.value = true;
21105
+ const request = {
21106
+ userPrompt: input,
21107
+ messageHistory: (_a = history.value) != null ? _a : [],
21108
+ queryKey: props.options.displayOptions.queryKey
21109
+ };
21110
+ const { phrases, success } = yield ChatService.suggestSearchChatPhrases(
21111
+ props.options.sdkOptions,
21112
+ request
21113
+ );
21114
+ if (!success || !phrases.length) {
21115
+ error.value = "Something went wrong";
21116
+ return;
21117
+ }
21118
+ const validPhrases = phrases.filter((p2) => (p2 == null ? void 0 : p2.trim().length) > 0);
21119
+ const chatLog = {
21120
+ key: Date.now().toString(),
21121
+ userInput: input,
21122
+ allPhrases: [...validPhrases],
21123
+ suggestedPhrases: phrases
21124
+ };
21125
+ chatContent.value.push(chatLog);
21126
+ } finally {
21127
+ loading.value = false;
21128
+ }
21129
+ });
21130
+ const bestItemsLoaded = ({ items, key }) => {
21131
+ const entry = chatContent.value.find((c2) => c2.key === key);
21132
+ entry.bestItems = items;
21133
+ };
21134
+ return (_ctx, _cache) => {
21135
+ return openBlock(), createElementBlock("section", _hoisted_1, [
21136
+ _hoisted_2,
21137
+ chatContent.value.length ? (openBlock(), createElementBlock("section", _hoisted_3, [
21138
+ createVNode(_sfc_main$1$1, {
21139
+ content: chatContent.value,
21140
+ options: _ctx.options,
21141
+ onLoaded: bestItemsLoaded,
21142
+ history: history.value
21143
+ }, null, 8, ["content", "options", "history"])
21144
+ ])) : createCommentVNode("", true),
21145
+ loading.value ? (openBlock(), createElementBlock("section", _hoisted_4, [
21146
+ createVNode(ChatSpinner, { message: "Loading initial recommendations... This might take up to 20s" })
21147
+ ])) : createCommentVNode("", true),
21148
+ createBaseVNode("section", _hoisted_5, [
21149
+ createVNode(_sfc_main$5, {
21150
+ onSubmit: submitChatInput,
21151
+ disabled: loading.value
21152
+ }, null, 8, ["disabled"])
21153
+ ])
21154
+ ]);
21155
+ };
21156
+ }
21157
+ });
20620
21158
  let piniaInstance = null;
20621
21159
  const initPinia = () => {
20622
21160
  if (piniaInstance) {
@@ -26179,7 +26717,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26179
26717
  };
26180
26718
  __expose({ fetch: fetch2 });
26181
26719
  return (_ctx, _cache) => {
26182
- return openBlock(), createBlock(unref(_sfc_main$R), {
26720
+ return openBlock(), createBlock(unref(_sfc_main$Y), {
26183
26721
  options: fullSearchBoxOptions.value,
26184
26722
  ref_key: "searchBox",
26185
26723
  ref: searchBox2
@@ -26306,7 +26844,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26306
26844
  };
26307
26845
  __expose({ fetch: fetch2 });
26308
26846
  return (_ctx, _cache) => {
26309
- return openBlock(), createBlock(unref(_sfc_main$4$1), {
26847
+ return openBlock(), createBlock(unref(_sfc_main$b), {
26310
26848
  options: fullSearchResultsOptions.value,
26311
26849
  ref_key: "searchResults",
26312
26850
  ref: searchResults2
@@ -26331,7 +26869,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26331
26869
  };
26332
26870
  __expose({ fetch: fetch2 });
26333
26871
  return (_ctx, _cache) => {
26334
- return openBlock(), createBlock(unref(_sfc_main$2$1), {
26872
+ return openBlock(), createBlock(unref(_sfc_main$9), {
26335
26873
  options: fullProductListOptions.value,
26336
26874
  ref_key: "productList",
26337
26875
  ref: productList2
@@ -26411,7 +26949,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26411
26949
  __expose({ fetch: fetch2, reloadOptions });
26412
26950
  return (_ctx, _cache) => {
26413
26951
  return openBlock(), createElementBlock("div", null, [
26414
- containerOptions.value && isOpen.value ? (openBlock(), createBlock(unref(_sfc_main$1$1), {
26952
+ containerOptions.value && isOpen.value ? (openBlock(), createBlock(unref(_sfc_main$8), {
26415
26953
  key: 0,
26416
26954
  options: containerOptions.value,
26417
26955
  ref_key: "productList",
@@ -26435,7 +26973,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26435
26973
  };
26436
26974
  __expose({ fetch: fetch2 });
26437
26975
  return (_ctx, _cache) => {
26438
- return openBlock(), createBlock(unref(_sfc_main$1b), {
26976
+ return openBlock(), createBlock(unref(_sfc_main$7), {
26439
26977
  options: _ctx.recommendationOptions,
26440
26978
  ref_key: "productRecommendations",
26441
26979
  ref: productRecommendations
@@ -26493,7 +27031,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26493
27031
  results: {},
26494
27032
  productList: {},
26495
27033
  searchContainer: {},
26496
- recommendations: {}
27034
+ recommendations: {},
27035
+ chat: {}
26497
27036
  };
26498
27037
  const tracking = (options) => {
26499
27038
  setupTracking(options);
@@ -26641,6 +27180,26 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26641
27180
  }
26642
27181
  app.recommendations[options.containerSelector] = instance;
26643
27182
  };
27183
+ const chat = (options, mountOptions) => {
27184
+ const existingInstance = app.chat[options.displayOptions.containerSelector];
27185
+ if (existingInstance) {
27186
+ existingInstance.props.options = options;
27187
+ if (mountOptions == null ? void 0 : mountOptions.fetch) {
27188
+ setTimeout(() => {
27189
+ var _a, _b, _c, _d;
27190
+ (_d = (_c = (_b = (_a = existingInstance.mountedComponent) == null ? void 0 : _a.component) == null ? void 0 : _b.exposed) == null ? void 0 : _c.fetch) == null ? void 0 : _d.call(_c);
27191
+ });
27192
+ }
27193
+ return;
27194
+ }
27195
+ const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1i, {
27196
+ recommendationOptions: options
27197
+ });
27198
+ if (!instance) {
27199
+ return;
27200
+ }
27201
+ app.chat[options.displayOptions.containerSelector] = instance;
27202
+ };
26644
27203
  const clearInstance = (element, app2) => {
26645
27204
  var _a;
26646
27205
  const content = element.innerHTML;
@@ -26712,6 +27271,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26712
27271
  } catch (e) {
26713
27272
  }
26714
27273
  };
27274
+ const clearChat = (selector) => {
27275
+ try {
27276
+ if (selector) {
27277
+ app.chat[selector] = null;
27278
+ clearInstance(app.chat[selector].mountElement, app.chat[selector].app);
27279
+ }
27280
+ for (const key in app.chat) {
27281
+ clearInstance(app.chat[key].mountElement, app.chat[key].app);
27282
+ }
27283
+ app.chat = {};
27284
+ } catch (e) {
27285
+ }
27286
+ };
26715
27287
  const lupaSearch = {
26716
27288
  searchBox,
26717
27289
  searchResults,
@@ -26723,7 +27295,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26723
27295
  clearSearchResults,
26724
27296
  clearProductList,
26725
27297
  clearSearchContainer,
26726
- clearRecommendations
27298
+ clearRecommendations,
27299
+ chat,
27300
+ clearChat
26727
27301
  };
26728
27302
  if (typeof window !== "undefined") {
26729
27303
  window.getLupa = lupaSearch;