@depict-ai/ui 3.0.2 → 3.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -236,9 +236,9 @@
236
236
  "@babel/plugin-transform-typescript": "^7.22.9",
237
237
  "@babel/runtime": "latest",
238
238
  "@babel/runtime-corejs3": "^7.22.6",
239
- "@depict-ai/plp-styling": "^2.0.0",
240
- "@depict-ai/types": "^5.0.0",
241
- "@depict-ai/utilishared": "^2.0.0",
239
+ "@depict-ai/plp-styling": "^2.0.1",
240
+ "@depict-ai/types": "^5.0.1",
241
+ "@depict-ai/utilishared": "^2.0.1",
242
242
  "solid-js": "^1.8.1"
243
243
  },
244
244
  "type": "module",
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
83
83
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
84
84
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
85
85
  /*! Depict.ai search and product listing SDK */
86
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.2";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.4";
87
87
  const $9d19451330d04c3c$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
88
88
  function $9d19451330d04c3c$export$8be2714ec7f169ee() {
89
89
  var _$escape2, _$escape3;
@@ -420,12 +420,12 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
420
420
  * Vue has async router that needs to be awaited (it navigates after a microtask)
421
421
  * This standardises waiting for all kinds of routers
422
422
  */
423
- constructor(on_navigation, listing_id_state_key) {
423
+ constructor(on_navigation, listing_query_state_key) {
424
424
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_get_navigation_happened_promise);
425
425
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_dont_attempt_navigation);
426
426
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_throwing_on_navigation);
427
427
  $parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "on_navigation_", void 0);
428
- $parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "listing_id_state_key", void 0);
428
+ $parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "listing_query_state_key", void 0);
429
429
  $parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "navigate_", {
430
430
  /**
431
431
  * Call this if you *just* want to replace the state object in history.state
@@ -449,7 +449,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
449
449
  event_: event_,
450
450
  force_spa_navigation_: force_spa_navigation_,
451
451
  is_replace_: is_replace_,
452
- listing_id_: listing_id_,
452
+ listing_query_: listing_query_,
453
453
  scroll = true
454
454
  } = _ref;
455
455
  const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
@@ -470,10 +470,10 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
470
470
  if (force_spa_navigation_ && wants_hard_navigation) {
471
471
  // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
472
472
  const new_state = history.state;
473
- if (listing_id_) {
473
+ if (listing_query_) {
474
474
  // In JS-UI we need to know the listing_id of the current category, therefore push it into state
475
- if (!this.listing_id_state_key) $3hooq$depictaiutilishared.report(new Error("listing_id_state_key is not set"), "error");
476
- new_state[this.listing_id_state_key] = listing_id_;
475
+ if (!this.listing_query_state_key) $3hooq$depictaiutilishared.report(new Error("listing_query_state_key is not set"), "error");
476
+ new_state[this.listing_query_state_key] = listing_query_;
477
477
  }
478
478
  history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
479
479
  } else $73014ff36186a4dd$var$_classPrivateMethodGet(this, $73014ff36186a4dd$var$_throwing_on_navigation, $73014ff36186a4dd$var$_throwing_on_navigation2).call(this, {
@@ -484,7 +484,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
484
484
  await promise;
485
485
  })
486
486
  });
487
- this.listing_id_state_key = listing_id_state_key;
487
+ this.listing_query_state_key = listing_query_state_key;
488
488
  this.on_navigation_ = on_navigation;
489
489
  }
490
490
  }
@@ -4745,6 +4745,8 @@ function $b3dc12c672c9df24$export$967e966fca9515e(api_response) {
4745
4745
  }
4746
4746
  return api_response;
4747
4747
  }
4748
+ const $c3739e86187f2054$export$74ee7529ce0f8a00 = "listingId";
4749
+ const $c3739e86187f2054$export$5aae649db1b959fc = "externalId";
4748
4750
  function $e270e9f953fcbc58$var$_classPrivateMethodInitSpec(obj, privateSet) {
4749
4751
  $e270e9f953fcbc58$var$_checkPrivateRedeclaration(obj, privateSet);
4750
4752
  privateSet.add(obj);
@@ -4853,9 +4855,14 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
4853
4855
  })
4854
4856
  });
4855
4857
  }
4856
- async get_listing(input_req) {
4858
+ async get_listing(_ref) {
4859
+ let {
4860
+ id_type_: id_type_,
4861
+ id_to_query_for_: id_to_query_for_,
4862
+ ...input_req
4863
+ } = _ref;
4857
4864
  return await $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_cached_request, $e270e9f953fcbc58$var$_cached_request2).call(this, {
4858
- endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + encodeURIComponent(input_req.listing_id),
4865
+ endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + (id_type_ === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_),
4859
4866
  input_req_: input_req,
4860
4867
  fallback_response_: () => ({
4861
4868
  listing_id: "",
@@ -4869,20 +4876,18 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
4869
4876
  "quick_links": [],
4870
4877
  failed: true
4871
4878
  }),
4872
- method_: "GET",
4873
- delete_key_before_sending_: "listing_id" // this goes into the path, but we still need to have it in the request object until the last second as we want to include it as a key when caching requests
4879
+ method_: "GET"
4874
4880
  });
4875
4881
  }
4876
-
4877
- async get_listing_products(input_req) {
4878
- const listing_id = input_req.listing_id; // listing_id goes into the path
4879
- const cloned_request = {
4880
- ...input_req
4881
- };
4882
- delete cloned_request["listing_id"];
4882
+ async get_listing_products(_ref2) {
4883
+ let {
4884
+ id_to_query_for_: id_to_query_for_,
4885
+ id_type_: id_type_,
4886
+ ...input_req_
4887
+ } = _ref2;
4883
4888
  return await $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_cached_request, $e270e9f953fcbc58$var$_cached_request2).call(this, {
4884
- endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + encodeURIComponent(listing_id) + "/products",
4885
- input_req_: input_req,
4889
+ endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + (id_type_ === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_) + "/products",
4890
+ input_req_: input_req_,
4886
4891
  fallback_response_: () => ({
4887
4892
  "n_hits": 0,
4888
4893
  "displays": [],
@@ -4920,7 +4925,7 @@ async function $e270e9f953fcbc58$var$_run_url_creator_for_suggest2(merchant, mar
4920
4925
  const category_transformer = (_this$display_transfo = this.display_transformers) === null || _this$display_transfo === void 0 ? void 0 : _this$display_transfo.categories;
4921
4926
  if (!category_transformer) return response;
4922
4927
  // find category suggestions, run thing with them, and then replace them
4923
- const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "category");
4928
+ const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "listing");
4924
4929
  const transformed_category_suggestions = await category_transformer({
4925
4930
  market: market,
4926
4931
  merchant: merchant,
@@ -4966,15 +4971,14 @@ async function $e270e9f953fcbc58$var$_run_display_transformers_for_rest2(merchan
4966
4971
  });
4967
4972
  return input_data;
4968
4973
  }
4969
- async function $e270e9f953fcbc58$var$_cached_request2(_ref) {
4974
+ async function $e270e9f953fcbc58$var$_cached_request2(_ref3) {
4970
4975
  var _classPrivateFieldGet5, _cache_obj$cache_$bod, _cache_obj$cache_$bod2;
4971
4976
  let {
4972
4977
  endpoint_: endpoint_,
4973
4978
  input_req_: input_req_,
4974
4979
  fallback_response_: fallback_response_,
4975
- method_ = "POST",
4976
- delete_key_before_sending_: delete_key_before_sending_ // only supported for GET requests
4977
- } = _ref;
4980
+ method_ = "POST"
4981
+ } = _ref3;
4978
4982
  const cache_obj = $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_get_cache_obj_for_endpoint, $e270e9f953fcbc58$var$_get_cache_obj_for_endpoint2).call(this, endpoint_);
4979
4983
  const with_ids = $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $e270e9f953fcbc58$var$_add_ids_to_request).call(this, input_req_);
4980
4984
  const metaData = await ((_classPrivateFieldGet5 = $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $e270e9f953fcbc58$var$_get_metadata)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.call(this));
@@ -4991,7 +4995,6 @@ async function $e270e9f953fcbc58$var$_cached_request2(_ref) {
4991
4995
  cache_obj.in_progress_[body] = new Promise(r => resolve_in_progress = r);
4992
4996
  try {
4993
4997
  const is_post = method_ === "POST";
4994
- if (!is_post && delete_key_before_sending_) delete sorted_request[delete_key_before_sending_];
4995
4998
  const url_to_request = is_post ? endpoint_ : $3hooq$depictaiutilishared.make_url_with_query_params(endpoint_, sorted_request);
4996
4999
  const api_response = await $3hooq$depictaiutilishared.fetch_retry($3hooq$depictaiutilishared.add_version_query_params(url_to_request), {
4997
5000
  method: method_,
@@ -5327,7 +5330,7 @@ function $19438fea513c9d01$export$5e4aed86c12acdd9(_ref) {
5327
5330
  // After first load, always just load 20 since people might just be browsing the top ones still
5328
5331
  min_products_to_fetch_ : now - last_loaded < 10000 ? min_products_to_fetch_ * 5 : min_products_to_fetch_;
5329
5332
  // dlog("loading ", number_of_results_to_load, "products, because it was", now - last_loaded, "ms since last load");
5330
- const api_response = await depict_api_["listing_id" in base_part ? "get_listing_products" : "query"]({
5333
+ const api_response = await depict_api_["query" in base_part ? "query" : "get_listing_products"]({
5331
5334
  cursor: get_last_cursor(),
5332
5335
  limit: number_of_results_to_load,
5333
5336
  ...base_part
@@ -6707,11 +6710,12 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6707
6710
  let {
6708
6711
  quicklinks_data_: quicklinks_data_,
6709
6712
  router_: router_,
6710
- current_listing_id_: current_listing_id_,
6713
+ id_to_query_for_: id_to_query_for_,
6711
6714
  breadcrumb_data_: breadcrumb_data_,
6712
6715
  i18n_: i18n_,
6713
6716
  sorting_query_param_: sorting_query_param_,
6714
- filter_query_param_prefix_: filter_query_param_prefix_
6717
+ filter_query_param_prefix_: filter_query_param_prefix_,
6718
+ id_type_: id_type_
6715
6719
  } = _ref;
6716
6720
  let scrolling_logic_ran_for_listing_id = false;
6717
6721
  let last_scroll_position;
@@ -6719,13 +6723,13 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6719
6723
  let last_was_placeholder = false;
6720
6724
  let sliding_element;
6721
6725
  $3hooq$solidjs.createComputed(() => {
6722
- current_listing_id_();
6726
+ id_to_query_for_();
6723
6727
  scrolling_logic_ran_for_listing_id = false;
6724
6728
  });
6725
6729
  const place_holdey_quicklinks_data = $3hooq$solidjs.createMemo(() => quicklinks_data_() || [,,,]);
6726
6730
  const selected_index = $3hooq$solidjs.createMemo(() => {
6727
6731
  var _quicklinks_data_;
6728
- return (_quicklinks_data_ = quicklinks_data_()) === null || _quicklinks_data_ === void 0 ? void 0 : _quicklinks_data_.findIndex(item => item.listing_id === current_listing_id_());
6732
+ return (_quicklinks_data_ = quicklinks_data_()) === null || _quicklinks_data_ === void 0 ? void 0 : _quicklinks_data_.findIndex(item => item[id_type_() === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id" : "listing_id"] === id_to_query_for_());
6729
6733
  }); // this will be -1 when viewing child categories
6730
6734
  const scrollpos_per_listing_id = {};
6731
6735
  const mutation_plugins = [function () {
@@ -6735,7 +6739,7 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6735
6739
  } = this.insert_here;
6736
6740
  if (scrollLeft > 0) {
6737
6741
  last_scroll_position = scrollLeft;
6738
- const current_id = $3hooq$solidjs.untrack(current_listing_id_);
6742
+ const current_id = $3hooq$solidjs.untrack(id_to_query_for_);
6739
6743
  // make sure to not save position where selected item isn't in viewport
6740
6744
  const current_selected_index = $3hooq$solidjs.untrack(selected_index);
6741
6745
  const intersecting_thing = this.intersecting_items_object[current_selected_index];
@@ -6800,7 +6804,7 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6800
6804
  equals: false
6801
6805
  }), new_data => {
6802
6806
  const quicklinks_data = quicklinks_data_(); // this signal should have updated by now since this is a createEffect
6803
- const current_id = current_listing_id_();
6807
+ const current_id = id_to_query_for_();
6804
6808
  if (!new_data || !quicklinks_data || !current_id) return;
6805
6809
  const owner = $3hooq$solidjs.getOwner();
6806
6810
  queueMicrotask(() => {
@@ -6851,13 +6855,9 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6851
6855
  // Solution: instead of not adding the state to the url, add a flag to the link if it's a sibling and then display the toast on load if the flag is set
6852
6856
  const is_sibling = $3hooq$solidjs.createMemo(() => {
6853
6857
  var _quicklinks_data_2;
6854
- const current_id = current_listing_id_();
6855
- return (_quicklinks_data_2 = quicklinks_data_()) === null || _quicklinks_data_2 === void 0 ? void 0 : _quicklinks_data_2.some(_ref3 => {
6856
- let {
6857
- listing_id: listing_id
6858
- } = _ref3;
6859
- return listing_id === current_id;
6860
- });
6858
+ const current_id = id_to_query_for_();
6859
+ const lookForId = id_type_() === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id" : "listing_id";
6860
+ return (_quicklinks_data_2 = quicklinks_data_()) === null || _quicklinks_data_2 === void 0 ? void 0 : _quicklinks_data_2.some(quickLink => quickLink[lookForId] === current_id);
6861
6861
  });
6862
6862
  const href = $3hooq$solidjs.createMemo(() => {
6863
6863
  var _display_accessor;
@@ -7076,13 +7076,14 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
7076
7076
  function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
7077
7077
  let {
7078
7078
  crumb_data_: crumb_data_,
7079
- listing_id_: listing_id_,
7079
+ id_to_query_for_: id_to_query_for_,
7080
7080
  i18n_: i18n_,
7081
7081
  selected_filters_: selected_filters_,
7082
7082
  local_filter_cache_: local_filter_cache_,
7083
7083
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
7084
7084
  plp_results_: plp_results_,
7085
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
7085
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
7086
+ id_type_: id_type_
7086
7087
  } = _ref;
7087
7088
  // If we just got opened in a new tab, clear filters instantly and remove the flag
7088
7089
  $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
@@ -7093,17 +7094,21 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
7093
7094
  i18n_: i18n_,
7094
7095
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
7095
7096
  });
7096
- // Code below is for when we're already open and the user navigates to a new category
7097
+ // The code below is for when we're already open and the user navigates to a new category
7097
7098
  let previous_crumb_data = $3hooq$solidjs.untrack(crumb_data_);
7098
- let listing_id_when_we_got_previous_data = $3hooq$solidjs.untrack(listing_id_);
7099
+ let id_when_we_got_previous_data = {
7100
+ id_: $3hooq$solidjs.untrack(id_to_query_for_),
7101
+ type_: $3hooq$solidjs.untrack(id_type_)
7102
+ };
7099
7103
  let allow_filter_clearing = true; // set to false when going backwards/forwards
7100
7104
  // temporarily disable filter clearing when going backwards/forwards
7101
7105
  const handler = () => allow_filter_clearing = false;
7102
7106
  window.addEventListener("popstate", handler); // popstate only gets called when using back/forwards button of browser or the history navigate to achieve the same, but not on pushState or replaceState
7103
7107
  $3hooq$solidjs.onCleanup(() => window.removeEventListener("popstate", handler));
7104
7108
  $3hooq$solidjs.createEffect($3hooq$solidjs.on(crumb_data_, $3hooq$depictaiutilishared.catchify(new_crumb_data => {
7105
- const listing_id_of_new_data = listing_id_();
7106
- if (allow_filter_clearing && previous_crumb_data && new_crumb_data && listing_id_of_new_data !== listing_id_when_we_got_previous_data) {
7109
+ const id_of_new_data = id_to_query_for_();
7110
+ const type_of_id_of_new_data = id_type_();
7111
+ if (allow_filter_clearing && previous_crumb_data && new_crumb_data && (id_of_new_data !== id_when_we_got_previous_data.id_ || type_of_id_of_new_data !== id_when_we_got_previous_data.type_)) {
7107
7112
  const previous_length = previous_crumb_data.length;
7108
7113
  const new_length = new_crumb_data.length;
7109
7114
  const went_upwards = new_length < previous_length;
@@ -7129,7 +7134,10 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
7129
7134
  sideways_filter_clearing_flag_[1](false);
7130
7135
  }
7131
7136
  }
7132
- listing_id_when_we_got_previous_data = listing_id_of_new_data;
7137
+ id_when_we_got_previous_data = {
7138
+ id_: id_of_new_data,
7139
+ type_: type_of_id_of_new_data
7140
+ };
7133
7141
  previous_crumb_data = new_crumb_data;
7134
7142
  if (!allow_filter_clearing) allow_filter_clearing = true;
7135
7143
  })));
@@ -7197,8 +7205,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7197
7205
  var _on_filters_construct;
7198
7206
  let {
7199
7207
  depict_api_: depict_api_,
7200
- listing_id_: listing_id_,
7201
- meta_title_suffix_: meta_title_suffix_,
7208
+ id_to_query_for_: id_to_query_for_,
7209
+ id_type_: id_type_,
7202
7210
  current_sorting_: current_sorting_,
7203
7211
  min_products_to_fetch_: min_products_to_fetch_,
7204
7212
  category_filters_open_: category_filters_open_,
@@ -7251,7 +7259,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7251
7259
  merchant: merchant_(),
7252
7260
  market: market_(),
7253
7261
  locale: backend_locale_(),
7254
- listing_id: listing_id_(),
7262
+ id_to_query_for_: id_to_query_for_(),
7263
+ id_type_: id_type_(),
7255
7264
  ...(f.length ? {
7256
7265
  filters: f
7257
7266
  } : {}),
@@ -7263,8 +7272,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7263
7272
  // Make "Get products in listing" request to get products in listing
7264
7273
  const [plp_products_] = $3hooq$solidjs.createResource(products_query_base_,
7265
7274
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
7266
- $3hooq$depictaiutilishared.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
7267
- id_: $3hooq$solidjs.untrack(listing_id_),
7275
+ $3hooq$depictaiutilisharedlatest.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
7276
+ id_: $3hooq$solidjs.untrack(id_to_query_for_),
7268
7277
  scroll_restoration_data_: scroll_restoration_data_,
7269
7278
  min_products_to_fetch_: min_products_to_fetch_,
7270
7279
  make_request_: (limit, cursor) => depict_api_.get_listing_products({
@@ -7279,10 +7288,11 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7279
7288
  merchant: merchant_(),
7280
7289
  market: market_(),
7281
7290
  locale: backend_locale_(),
7282
- listing_id: listing_id_()
7291
+ id_to_query_for_: id_to_query_for_(),
7292
+ id_type_: id_type_()
7283
7293
  }));
7284
7294
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
7285
- const [plp_meta] = $3hooq$solidjs.createResource(meta_query_base, $3hooq$depictaiutilishared.catchify(query => depict_api_.get_listing(query)));
7295
+ const [plp_meta] = $3hooq$solidjs.createResource(meta_query_base, $3hooq$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
7286
7296
  const available_sortings_ = $3hooq$solidjs.createMemo(() => {
7287
7297
  var _plp_products_, _plp_products_$sorts;
7288
7298
  return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
@@ -7306,17 +7316,6 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7306
7316
  var _plp_meta2;
7307
7317
  return (_plp_meta2 = plp_meta()) === null || _plp_meta2 === void 0 ? void 0 : _plp_meta2.quick_links;
7308
7318
  });
7309
- const meta_tag_data_ = $3hooq$solidjs.createMemo(() => {
7310
- var _plp_meta3;
7311
- if ((_plp_meta3 = plp_meta()) !== null && _plp_meta3 !== void 0 && _plp_meta3.replace_meta_tags) {
7312
- var _plp_meta4, _plp_meta5;
7313
- return {
7314
- title: ((_plp_meta4 = plp_meta()) === null || _plp_meta4 === void 0 ? void 0 : _plp_meta4.title) + (meta_title_suffix_() || ""),
7315
- description: (_plp_meta5 = plp_meta()) === null || _plp_meta5 === void 0 ? void 0 : _plp_meta5.description
7316
- };
7317
- }
7318
- });
7319
- $3hooq$depictaiutilishared.edit_current_page_meta_tags(meta_tag_data_);
7320
7319
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
7321
7320
  const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
7322
7321
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
@@ -7380,7 +7379,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7380
7379
  }));
7381
7380
  results_for = make_product_count_();
7382
7381
  } else {
7383
- $3hooq$depictaiutilishared.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
7382
+ $3hooq$depictaiutilisharedlatest.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
7384
7383
  results_for = $3hooq$solidjsweb.ssr($ede6c70ecdca46fe$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey());
7385
7384
  }
7386
7385
  const filters_opener = $f70cc6dfcadf0fd5$export$d7841e452f2e59a8({
@@ -7402,17 +7401,17 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7402
7401
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
7403
7402
  ...extra_sort_and_filter_args_
7404
7403
  });
7405
- $3hooq$depictaiutilishared.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
7404
+ $3hooq$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
7406
7405
  scroll_restoration_data_: scroll_restoration_data_,
7407
7406
  last_result_in_viewport_: last_result_in_viewport_,
7408
- id_: listing_id_,
7407
+ id_: id_to_query_for_,
7409
7408
  can_write_scroll_restoration_: can_write_scroll_restoration_
7410
7409
  });
7411
7410
  (_on_filters_construct = on_filters_constructed_) === null || _on_filters_construct === void 0 || _on_filters_construct();
7412
7411
  $3hooq$solidjs.createComputed(() => {
7413
7412
  if (plp_products_.loading) set_can_write_scroll_restoration(false);else if (plp_products_()) set_can_write_scroll_restoration(true);
7414
7413
  });
7415
- $3hooq$solidjs.createRenderEffect($3hooq$depictaiutilishared.catchify(async () => {
7414
+ $3hooq$solidjs.createRenderEffect($3hooq$depictaiutilisharedlatest.catchify(async () => {
7416
7415
  var _only_show_filters_op;
7417
7416
  const slim = is_slim_();
7418
7417
  const only_show_filters_opener = (_only_show_filters_op = only_show_filters_opener_) === null || _only_show_filters_op === void 0 ? void 0 : _only_show_filters_op();
@@ -7426,14 +7425,15 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7426
7425
  available_filters_: available_filters_
7427
7426
  });
7428
7427
  $8b366fdb0c76194d$export$3945d6db2dfd3d12({
7429
- listing_id_: listing_id_,
7428
+ id_to_query_for_: id_to_query_for_,
7430
7429
  crumb_data_: crumb_data_,
7431
7430
  i18n_: i18n_,
7432
7431
  selected_filters_: selected_filters_,
7433
7432
  local_filter_cache_: local_filter_cache_,
7434
7433
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
7435
7434
  plp_results_: plp_products_,
7436
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
7435
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
7436
+ id_type_: id_type_
7437
7437
  });
7438
7438
  get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
7439
7439
  get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
@@ -7457,7 +7457,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7457
7457
  get children() {
7458
7458
  return $3hooq$solidjsweb.createComponent((0, $21a004c2e7bd4c16$export$466cdc317043f6cb), {
7459
7459
  quicklinks_data_: quicklinks_data_,
7460
- current_listing_id_: listing_id_,
7460
+ id_to_query_for_: id_to_query_for_,
7461
+ id_type_: id_type_,
7461
7462
  router_: router_,
7462
7463
  breadcrumb_data_: crumb_data_,
7463
7464
  i18n_: i18n_,
@@ -7508,7 +7509,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7508
7509
  sort_or_filter_open_: sort_or_filter_open_,
7509
7510
  desktop_filter_elements_: desktop_filter_elements_,
7510
7511
  content_blocks_by_row_: content_blocks_by_row_,
7511
- id_currently_querying_for_: listing_id_,
7512
+ id_currently_querying_for_: id_to_query_for_,
7512
7513
  no_results_options_: {
7513
7514
  selected_filters_: selected_filters_,
7514
7515
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -7552,10 +7553,10 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7552
7553
  * Adds the current page as last breadcrumb to the breadcrumb trail
7553
7554
  */
7554
7555
  function $ede6c70ecdca46fe$var$add_us_to_crumbs(plp_meta, title) {
7555
- const href_accessor = $3hooq$depictaiutilishared.use_href_accessor();
7556
+ const href_accessor = $3hooq$depictaiutilisharedlatest.use_href_accessor();
7556
7557
  return $3hooq$solidjs.createMemo(() => {
7557
- var _plp_meta6;
7558
- const api_value = (_plp_meta6 = plp_meta()) === null || _plp_meta6 === void 0 ? void 0 : _plp_meta6.breadcrumbs;
7558
+ var _plp_meta3;
7559
+ const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
7559
7560
  if (!api_value) return api_value;
7560
7561
  return [...api_value, {
7561
7562
  get listing_id() {
@@ -7569,6 +7570,12 @@ function $ede6c70ecdca46fe$var$add_us_to_crumbs(plp_meta, title) {
7569
7570
  },
7570
7571
  get slug() {
7571
7572
  return plp_meta().slug;
7573
+ },
7574
+ get listing_type() {
7575
+ return plp_meta().listing_type;
7576
+ },
7577
+ get external_id() {
7578
+ return plp_meta().external_id;
7572
7579
  }
7573
7580
  }];
7574
7581
  });
@@ -7773,8 +7780,7 @@ var $9cbefc32b9dab36d$var$_router = /*#__PURE__*/new WeakMap();
7773
7780
  var $9cbefc32b9dab36d$var$_localization_signal = /*#__PURE__*/new WeakMap();
7774
7781
  var $9cbefc32b9dab36d$var$_merchant_signal = /*#__PURE__*/new WeakMap();
7775
7782
  var $9cbefc32b9dab36d$var$_market_signal = /*#__PURE__*/new WeakMap();
7776
- var $9cbefc32b9dab36d$var$_listing_id_signal = /*#__PURE__*/new WeakMap();
7777
- var $9cbefc32b9dab36d$var$_meta_title_suffix_ = /*#__PURE__*/new WeakMap();
7783
+ var $9cbefc32b9dab36d$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
7778
7784
  var $9cbefc32b9dab36d$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
7779
7785
  class $9cbefc32b9dab36d$export$f34314aa9505732e {
7780
7786
  get localization() {
@@ -7784,11 +7790,11 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7784
7790
  set localization(locale_obj) {
7785
7791
  $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[1](locale_obj);
7786
7792
  }
7787
- get listing_id() {
7788
- return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_id_signal)[0]();
7793
+ get listing_query() {
7794
+ return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_query_signal)[0]();
7789
7795
  }
7790
- set listing_id(id) {
7791
- $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_id_signal)[1](id);
7796
+ set listing_query(query) {
7797
+ $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_query_signal)[1](query);
7792
7798
  }
7793
7799
  get merchant() {
7794
7800
  return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_merchant_signal)[0]();
@@ -7802,12 +7808,6 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7802
7808
  set market(market) {
7803
7809
  $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_market_signal)[1](market);
7804
7810
  }
7805
- get meta_title_suffix() {
7806
- return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_meta_title_suffix_)[0]();
7807
- }
7808
- set meta_title_suffix(new_suffix) {
7809
- $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_meta_title_suffix_)[1](new_suffix);
7810
- }
7811
7811
  get disable_override_listing_id() {
7812
7812
  return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_disable_override_listing_id)[0]();
7813
7813
  }
@@ -7827,7 +7827,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7827
7827
  on_navigation: on_navigation,
7828
7828
  display_transformers: display_transformers,
7829
7829
  unique_instance_key_for_state = "",
7830
- listing_id_state_key: listing_id_state_key,
7830
+ listing_query_state_key: listing_query_state_key,
7831
7831
  ...props_on_class
7832
7832
  } = _ref2;
7833
7833
  $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_router, {
@@ -7846,13 +7846,9 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7846
7846
  writable: true,
7847
7847
  value: $3hooq$solidjs.createSignal()
7848
7848
  });
7849
- $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_listing_id_signal, {
7849
+ $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_listing_query_signal, {
7850
7850
  writable: true,
7851
- value: $3hooq$solidjs.createSignal("")
7852
- });
7853
- $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_meta_title_suffix_, {
7854
- writable: true,
7855
- value: $3hooq$solidjs.createSignal()
7851
+ value: $3hooq$solidjs.createSignal({})
7856
7852
  });
7857
7853
  $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_disable_override_listing_id, {
7858
7854
  writable: true,
@@ -7865,7 +7861,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7865
7861
  throw new Error("You can only have one instance of DepictCategory with the same uniqueInstanceKeyForState");
7866
7862
  Object.assign(this, props_on_class); // set initial signal values
7867
7863
  $cfcd56242923775d$export$5162a71f252e6122();
7868
- $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldSet)(this, $9cbefc32b9dab36d$var$_router, new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation", listing_id_state_key));
7864
+ $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldSet)(this, $9cbefc32b9dab36d$var$_router, new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation", listing_query_state_key));
7869
7865
  if (on_navigation) $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_router).on_navigation_ = on_navigation;
7870
7866
  const override_listing_id_query_param_names_ = ["listing_id_" + unique_instance_key_for_state, "listing_id"]; // If you're wondering why this is an array https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7958#note_1511700842
7871
7867
  const sorting_query_param_ = "sorting" + unique_instance_key_for_state;
@@ -7934,14 +7930,16 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
7934
7930
  category_title: category_title
7935
7931
  } = props;
7936
7932
  const shared_properties = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
7933
+ const diffableListingQuery = $3hooq$solidjs.createMemo(() => Object.values(depict_category.listing_query).join(""));
7937
7934
  return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
7938
7935
  $3hooq$solidjs.createEffect(prev => {
7939
7936
  // this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
7940
- const id = depict_category.listing_id; // <- this is a reactive getter
7941
- $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_id_change)(id, prev);
7942
- return id;
7937
+ diffableListingQuery(); // Only re-run this effect when the listing query *actually* changes (not just the object reference)
7938
+ const newId = $3hooq$solidjs.untrack(() => depict_category.listing_query);
7939
+ $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)(newId, prev);
7940
+ return newId;
7943
7941
  });
7944
- $3hooq$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_id_change)());
7942
+ $3hooq$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)());
7945
7943
  const grid_spacing_override = $3hooq$solidjs.createMemo(() => {
7946
7944
  const {
7947
7945
  grid_spacing: grid_spacing
@@ -7982,8 +7980,8 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
7982
7980
  depict_api_: depict_api_,
7983
7981
  min_products_to_fetch_: $9cbefc32b9dab36d$var$min_products_to_fetch_,
7984
7982
  local_filter_cache_: local_filter_cache_,
7985
- listing_id_: $3hooq$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_id),
7986
- meta_title_suffix_: () => depict_category.meta_title_suffix,
7983
+ id_to_query_for_: $3hooq$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
7984
+ id_type_: $3hooq$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() ? $c3739e86187f2054$export$74ee7529ce0f8a00 : depict_category.listing_query.type),
7987
7985
  i18n_: i18n_,
7988
7986
  show_quicklinks_: $3hooq$solidjs.createMemo(() => {
7989
7987
  var _props$show_quicklink;
@@ -8051,13 +8049,16 @@ function $9cbefc32b9dab36d$export$de035477d6fef996(_ref4) {
8051
8049
  sorting_query_param_: sorting_query_param_,
8052
8050
  filter_query_param_prefix_: filter_query_param_prefix_
8053
8051
  } = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
8052
+ const id_to_query_for_ = $3hooq$solidjs.createMemo(() => depict_category.listing_query.id);
8053
+ const id_type_ = $3hooq$solidjs.createMemo(() => depict_category.listing_query.type);
8054
8054
  return $3hooq$solidjsweb.createComponent($9cbefc32b9dab36d$var$InExternalAreaDiv, {
8055
8055
  get children() {
8056
8056
  return $21a004c2e7bd4c16$export$466cdc317043f6cb({
8057
8057
  i18n_: i18n_,
8058
8058
  quicklinks_data_: quicklinks_data_,
8059
8059
  router_: router_,
8060
- current_listing_id_: () => depict_category.listing_id,
8060
+ id_type_: id_type_,
8061
+ id_to_query_for_: id_to_query_for_,
8061
8062
  breadcrumb_data_: breadcrumb_data_,
8062
8063
  sorting_query_param_: sorting_query_param_,
8063
8064
  filter_query_param_prefix_: filter_query_param_prefix_
@@ -8234,12 +8235,16 @@ function $3001ad378baf39dc$export$d757d54550ebfb3d(_ref) {
8234
8235
  category_suggestion_: category_suggestion_,
8235
8236
  router_: router_
8236
8237
  } = _ref;
8238
+ const parentTitle = $3hooq$solidjs.createMemo(() => {
8239
+ var _category_suggestion_;
8240
+ return (_category_suggestion_ = category_suggestion_().breadcrumbs.at(-1)) === null || _category_suggestion_ === void 0 ? void 0 : _category_suggestion_.title;
8241
+ });
8237
8242
  return $3hooq$solidjsweb.ssr($3001ad378baf39dc$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(category_suggestion_().page_url, true), false), $3hooq$solidjsweb.escape(category_suggestion_().title), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
8238
8243
  get when() {
8239
- return typeof category_suggestion_().parent_title === "string";
8244
+ return parentTitle();
8240
8245
  },
8241
8246
  get children() {
8242
- return $3hooq$solidjsweb.ssr($3001ad378baf39dc$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(category_suggestion_().parent_title));
8247
+ return $3hooq$solidjsweb.ssr($3001ad378baf39dc$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(parentTitle()));
8243
8248
  }
8244
8249
  })));
8245
8250
  }
@@ -8826,6 +8831,12 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
8826
8831
  var _read_selected_index_, _read_selected_index_2;
8827
8832
  return ((_read_selected_index_ = read_selected_index_()) === null || _read_selected_index_ === void 0 ? void 0 : _read_selected_index_[0]) === autocomplete_data_index && ((_read_selected_index_2 = read_selected_index_()) === null || _read_selected_index_2 === void 0 ? void 0 : _read_selected_index_2[1]) === index;
8828
8833
  });
8834
+ const parent_title_if_exists = $3hooq$solidjs.createMemo(() => {
8835
+ var _item$breadcrumbs$at;
8836
+ const item = input_obj();
8837
+ if (!("breadcrumbs" in item)) return;
8838
+ return (_item$breadcrumbs$at = item.breadcrumbs.at(-1)) === null || _item$breadcrumbs$at === void 0 ? void 0 : _item$breadcrumbs$at.title;
8839
+ });
8829
8840
  return $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "suggestion ".concat(is_selected() ? "selected" : "", " ").concat(is_history ? "history" : "", " ").concat($3hooq$solidjsweb.escape($3hooq$solidjsweb.escape("type-" + input_obj().type, true), true)), $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(href(), true), false), is_query() ? $3hooq$solidjsweb.escape([$3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
8830
8841
  when: is_history,
8831
8842
  get fallback() {
@@ -8840,13 +8851,13 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
8840
8851
  return $3hooq$solidjs.createMemo(() => input_obj().title);
8841
8852
  },
8842
8853
  searching_for_value_: searching_for_value_
8843
- })]) : $3hooq$solidjsweb.escape([typeof input_obj() /* this is a harmless lie */.parent_title === "string" ? $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
8854
+ })]) : $3hooq$solidjsweb.escape([parent_title_if_exists() ? $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
8844
8855
  class_: "category line-clamp",
8845
8856
  get whole_text_to_display_() {
8846
8857
  return $3hooq$solidjs.createMemo(() => input_obj().title);
8847
8858
  },
8848
8859
  searching_for_value_: searching_for_value_
8849
- })), $3hooq$solidjsweb.escape(input_obj().parent_title)) : input_obj().type === "content" ? $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3cf7b4db1e203c93$export$605674723bcc715c), {
8860
+ })), $3hooq$solidjsweb.escape(parent_title_if_exists())) : input_obj().type === "content" ? $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3cf7b4db1e203c93$export$605674723bcc715c), {
8850
8861
  width: "16",
8851
8862
  height: "16"
8852
8863
  })), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
@@ -8863,7 +8874,7 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
8863
8874
  searching_for_value_: searching_for_value_
8864
8875
  }), $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
8865
8876
  if (input_obj().type === "content") return i18n_.content_();
8866
- if (input_obj().category_type === "BRAND") return i18n_.brand_();
8877
+ if (input_obj().listing_type === "brand") return i18n_.brand_();
8867
8878
  return i18n_.category_();
8868
8879
  })()))]));
8869
8880
  };
@@ -9087,7 +9098,7 @@ function $1a7b2e0cdf65293a$var$actual_navigation_working_on_fake_data(_ref2) {
9087
9098
  url.searchParams.set(search_query_param_name_, title);
9088
9099
  return $1730e5b4d47679a3$export$1efe1013da60d0e4(e, url.href);
9089
9100
  }));
9090
- } else if ((selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) == "category" || (selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) === "content") $3hooq$solidjs.runWithOwner(owner, () => override_on_enter_for_this_entry(e => {
9101
+ } else if ((selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) == "listing" || (selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) === "content") $3hooq$solidjs.runWithOwner(owner, () => override_on_enter_for_this_entry(e => {
9091
9102
  const {
9092
9103
  page_url: page_url
9093
9104
  } = selected_entry;
@@ -9567,7 +9578,7 @@ function $e3ac79dbd744c1c1$export$c05a196222ba1302(_ref) {
9567
9578
  } = _ref;
9568
9579
  const category_suggestions_ = $3hooq$solidjs.createMemo(() => {
9569
9580
  var _suggestions_;
9570
- return (_suggestions_ = suggestions_()) === null || _suggestions_ === void 0 ? void 0 : _suggestions_.suggestions.filter(s => s.type === "category");
9581
+ return (_suggestions_ = suggestions_()) === null || _suggestions_ === void 0 ? void 0 : _suggestions_.suggestions.filter(s => s.type === "listing");
9571
9582
  });
9572
9583
  return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
9573
9584
  get when() {