@depict-ai/ui 3.0.3 → 3.0.5

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.
@@ -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.3";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.5";
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
  }
@@ -948,27 +948,31 @@ function $76012c4468a53d1f$export$43f0fb951fcb0c54(_ref) {
948
948
  });
949
949
  }
950
950
  // source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
951
+ // deeply diffs two objects
952
+ // Modified by chatGPT to not be recursive, since stiga was getting a stack overflow just due to the size of their data
953
+ // Modified futher to bias towards saying objects are equal non-primitive objects differ
951
954
  function $76012c4468a53d1f$var$deep_equal(obj1, obj2) {
952
- if (obj1 === obj2) return true;
953
- if (Array.isArray(obj1) && Array.isArray(obj2)) {
954
- if (obj1.length !== obj2.length) return false;
955
- return obj1.every((elem, index) => {
956
- return $76012c4468a53d1f$var$deep_equal(elem, obj2[index]);
957
- });
958
- }
959
- if (typeof obj1 === "object" && typeof obj2 === "object" && obj1 !== null && obj2 !== null) {
960
- if (Array.isArray(obj1) || Array.isArray(obj2)) return false;
961
- const keys1 = Object.keys(obj1);
962
- const keys2 = Object.keys(obj2);
963
- if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
964
- for (const key in obj1) {
965
- if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore keys changing with every request
966
- const isEqual = $76012c4468a53d1f$var$deep_equal(obj1[key], obj2[key]);
967
- if (!isEqual) return false;
968
- }
969
- return true;
955
+ const stack = [[obj1, obj2]];
956
+ while (stack.length > 0) {
957
+ const [currentObj1, currentObj2] = stack.pop();
958
+ if (currentObj1 === currentObj2) continue;
959
+ if (Array.isArray(currentObj1) && Array.isArray(currentObj2)) {
960
+ if (currentObj1.length !== currentObj2.length) return false;
961
+ for (let i = 0; i < currentObj1.length; i++) stack.push([currentObj1[i], currentObj2[i]]);
962
+ } else if (typeof currentObj1 === "object" && typeof currentObj2 === "object" && currentObj1 !== null && currentObj2 !== null) {
963
+ if (Array.isArray(currentObj1) || Array.isArray(currentObj2)) return false;
964
+ const keys1 = Object.keys(currentObj1);
965
+ const keys2 = Object.keys(currentObj2);
966
+ if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
967
+ for (let key in currentObj1) {
968
+ if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore comparing values for keys we know are changing with every request
969
+ stack.push([currentObj1[key], currentObj2[key]]);
970
+ }
971
+ } else if (typeof currentObj1 !== "function" && typeof currentObj2 !== "function")
972
+ // Claim that all functions are equal, since the only way a function ends up here is because someone added it in the displayTransformer and that shouldn't force us to re-render, right?
973
+ return false;
970
974
  }
971
- return false;
975
+ return true;
972
976
  }
973
977
  const $6c2c739b113a8ddf$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
974
978
  $6c2c739b113a8ddf$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
@@ -4745,6 +4749,11 @@ function $b3dc12c672c9df24$export$967e966fca9515e(api_response) {
4745
4749
  }
4746
4750
  return api_response;
4747
4751
  }
4752
+
4753
+ // Minifiable and tree-shakable enum
4754
+ // Why not use const enum? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/9223#note_1675965260
4755
+ const $c3739e86187f2054$export$74ee7529ce0f8a00 = "listingId";
4756
+ const $c3739e86187f2054$export$5aae649db1b959fc = "externalId";
4748
4757
  function $e270e9f953fcbc58$var$_classPrivateMethodInitSpec(obj, privateSet) {
4749
4758
  $e270e9f953fcbc58$var$_checkPrivateRedeclaration(obj, privateSet);
4750
4759
  privateSet.add(obj);
@@ -4853,9 +4862,14 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
4853
4862
  })
4854
4863
  });
4855
4864
  }
4856
- async get_listing(input_req) {
4865
+ async get_listing(_ref) {
4866
+ let {
4867
+ id_type_: id_type_,
4868
+ id_to_query_for_: id_to_query_for_,
4869
+ ...input_req
4870
+ } = _ref;
4857
4871
  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),
4872
+ endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + (id_type_ === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_),
4859
4873
  input_req_: input_req,
4860
4874
  fallback_response_: () => ({
4861
4875
  listing_id: "",
@@ -4869,20 +4883,18 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
4869
4883
  "quick_links": [],
4870
4884
  failed: true
4871
4885
  }),
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
4886
+ method_: "GET"
4874
4887
  });
4875
4888
  }
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"];
4889
+ async get_listing_products(_ref2) {
4890
+ let {
4891
+ id_to_query_for_: id_to_query_for_,
4892
+ id_type_: id_type_,
4893
+ ...input_req_
4894
+ } = _ref2;
4883
4895
  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,
4896
+ endpoint_: $e270e9f953fcbc58$var$v3_base_url + "listings/" + (id_type_ === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_) + "/products",
4897
+ input_req_: input_req_,
4886
4898
  fallback_response_: () => ({
4887
4899
  "n_hits": 0,
4888
4900
  "displays": [],
@@ -4920,7 +4932,7 @@ async function $e270e9f953fcbc58$var$_run_url_creator_for_suggest2(merchant, mar
4920
4932
  const category_transformer = (_this$display_transfo = this.display_transformers) === null || _this$display_transfo === void 0 ? void 0 : _this$display_transfo.categories;
4921
4933
  if (!category_transformer) return response;
4922
4934
  // find category suggestions, run thing with them, and then replace them
4923
- const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "category");
4935
+ const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "listing");
4924
4936
  const transformed_category_suggestions = await category_transformer({
4925
4937
  market: market,
4926
4938
  merchant: merchant,
@@ -4966,15 +4978,14 @@ async function $e270e9f953fcbc58$var$_run_display_transformers_for_rest2(merchan
4966
4978
  });
4967
4979
  return input_data;
4968
4980
  }
4969
- async function $e270e9f953fcbc58$var$_cached_request2(_ref) {
4981
+ async function $e270e9f953fcbc58$var$_cached_request2(_ref3) {
4970
4982
  var _classPrivateFieldGet5, _cache_obj$cache_$bod, _cache_obj$cache_$bod2;
4971
4983
  let {
4972
4984
  endpoint_: endpoint_,
4973
4985
  input_req_: input_req_,
4974
4986
  fallback_response_: fallback_response_,
4975
- method_ = "POST",
4976
- delete_key_before_sending_: delete_key_before_sending_ // only supported for GET requests
4977
- } = _ref;
4987
+ method_ = "POST"
4988
+ } = _ref3;
4978
4989
  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
4990
  const with_ids = $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $e270e9f953fcbc58$var$_add_ids_to_request).call(this, input_req_);
4980
4991
  const metaData = await ((_classPrivateFieldGet5 = $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $e270e9f953fcbc58$var$_get_metadata)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.call(this));
@@ -4991,7 +5002,6 @@ async function $e270e9f953fcbc58$var$_cached_request2(_ref) {
4991
5002
  cache_obj.in_progress_[body] = new Promise(r => resolve_in_progress = r);
4992
5003
  try {
4993
5004
  const is_post = method_ === "POST";
4994
- if (!is_post && delete_key_before_sending_) delete sorted_request[delete_key_before_sending_];
4995
5005
  const url_to_request = is_post ? endpoint_ : $3hooq$depictaiutilishared.make_url_with_query_params(endpoint_, sorted_request);
4996
5006
  const api_response = await $3hooq$depictaiutilishared.fetch_retry($3hooq$depictaiutilishared.add_version_query_params(url_to_request), {
4997
5007
  method: method_,
@@ -5327,7 +5337,7 @@ function $19438fea513c9d01$export$5e4aed86c12acdd9(_ref) {
5327
5337
  // After first load, always just load 20 since people might just be browsing the top ones still
5328
5338
  min_products_to_fetch_ : now - last_loaded < 10000 ? min_products_to_fetch_ * 5 : min_products_to_fetch_;
5329
5339
  // 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"]({
5340
+ const api_response = await depict_api_["query" in base_part ? "query" : "get_listing_products"]({
5331
5341
  cursor: get_last_cursor(),
5332
5342
  limit: number_of_results_to_load,
5333
5343
  ...base_part
@@ -6707,11 +6717,12 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6707
6717
  let {
6708
6718
  quicklinks_data_: quicklinks_data_,
6709
6719
  router_: router_,
6710
- current_listing_id_: current_listing_id_,
6720
+ id_to_query_for_: id_to_query_for_,
6711
6721
  breadcrumb_data_: breadcrumb_data_,
6712
6722
  i18n_: i18n_,
6713
6723
  sorting_query_param_: sorting_query_param_,
6714
- filter_query_param_prefix_: filter_query_param_prefix_
6724
+ filter_query_param_prefix_: filter_query_param_prefix_,
6725
+ id_type_: id_type_
6715
6726
  } = _ref;
6716
6727
  let scrolling_logic_ran_for_listing_id = false;
6717
6728
  let last_scroll_position;
@@ -6719,13 +6730,13 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6719
6730
  let last_was_placeholder = false;
6720
6731
  let sliding_element;
6721
6732
  $3hooq$solidjs.createComputed(() => {
6722
- current_listing_id_();
6733
+ id_to_query_for_();
6723
6734
  scrolling_logic_ran_for_listing_id = false;
6724
6735
  });
6725
6736
  const place_holdey_quicklinks_data = $3hooq$solidjs.createMemo(() => quicklinks_data_() || [,,,]);
6726
6737
  const selected_index = $3hooq$solidjs.createMemo(() => {
6727
6738
  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_());
6739
+ 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
6740
  }); // this will be -1 when viewing child categories
6730
6741
  const scrollpos_per_listing_id = {};
6731
6742
  const mutation_plugins = [function () {
@@ -6735,7 +6746,7 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6735
6746
  } = this.insert_here;
6736
6747
  if (scrollLeft > 0) {
6737
6748
  last_scroll_position = scrollLeft;
6738
- const current_id = $3hooq$solidjs.untrack(current_listing_id_);
6749
+ const current_id = $3hooq$solidjs.untrack(id_to_query_for_);
6739
6750
  // make sure to not save position where selected item isn't in viewport
6740
6751
  const current_selected_index = $3hooq$solidjs.untrack(selected_index);
6741
6752
  const intersecting_thing = this.intersecting_items_object[current_selected_index];
@@ -6800,7 +6811,7 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6800
6811
  equals: false
6801
6812
  }), new_data => {
6802
6813
  const quicklinks_data = quicklinks_data_(); // this signal should have updated by now since this is a createEffect
6803
- const current_id = current_listing_id_();
6814
+ const current_id = id_to_query_for_();
6804
6815
  if (!new_data || !quicklinks_data || !current_id) return;
6805
6816
  const owner = $3hooq$solidjs.getOwner();
6806
6817
  queueMicrotask(() => {
@@ -6851,13 +6862,9 @@ function $21a004c2e7bd4c16$export$466cdc317043f6cb(_ref) {
6851
6862
  // 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
6863
  const is_sibling = $3hooq$solidjs.createMemo(() => {
6853
6864
  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
- });
6865
+ const current_id = id_to_query_for_();
6866
+ const lookForId = id_type_() === $c3739e86187f2054$export$5aae649db1b959fc ? "external_id" : "listing_id";
6867
+ return (_quicklinks_data_2 = quicklinks_data_()) === null || _quicklinks_data_2 === void 0 ? void 0 : _quicklinks_data_2.some(quickLink => quickLink[lookForId] === current_id);
6861
6868
  });
6862
6869
  const href = $3hooq$solidjs.createMemo(() => {
6863
6870
  var _display_accessor;
@@ -7076,13 +7083,14 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
7076
7083
  function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
7077
7084
  let {
7078
7085
  crumb_data_: crumb_data_,
7079
- listing_id_: listing_id_,
7086
+ id_to_query_for_: id_to_query_for_,
7080
7087
  i18n_: i18n_,
7081
7088
  selected_filters_: selected_filters_,
7082
7089
  local_filter_cache_: local_filter_cache_,
7083
7090
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
7084
7091
  plp_results_: plp_results_,
7085
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
7092
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
7093
+ id_type_: id_type_
7086
7094
  } = _ref;
7087
7095
  // If we just got opened in a new tab, clear filters instantly and remove the flag
7088
7096
  $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
@@ -7093,17 +7101,21 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
7093
7101
  i18n_: i18n_,
7094
7102
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
7095
7103
  });
7096
- // Code below is for when we're already open and the user navigates to a new category
7104
+ // The code below is for when we're already open and the user navigates to a new category
7097
7105
  let previous_crumb_data = $3hooq$solidjs.untrack(crumb_data_);
7098
- let listing_id_when_we_got_previous_data = $3hooq$solidjs.untrack(listing_id_);
7106
+ let id_when_we_got_previous_data = {
7107
+ id_: $3hooq$solidjs.untrack(id_to_query_for_),
7108
+ type_: $3hooq$solidjs.untrack(id_type_)
7109
+ };
7099
7110
  let allow_filter_clearing = true; // set to false when going backwards/forwards
7100
7111
  // temporarily disable filter clearing when going backwards/forwards
7101
7112
  const handler = () => allow_filter_clearing = false;
7102
7113
  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
7114
  $3hooq$solidjs.onCleanup(() => window.removeEventListener("popstate", handler));
7104
7115
  $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) {
7116
+ const id_of_new_data = id_to_query_for_();
7117
+ const type_of_id_of_new_data = id_type_();
7118
+ 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
7119
  const previous_length = previous_crumb_data.length;
7108
7120
  const new_length = new_crumb_data.length;
7109
7121
  const went_upwards = new_length < previous_length;
@@ -7129,7 +7141,10 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
7129
7141
  sideways_filter_clearing_flag_[1](false);
7130
7142
  }
7131
7143
  }
7132
- listing_id_when_we_got_previous_data = listing_id_of_new_data;
7144
+ id_when_we_got_previous_data = {
7145
+ id_: id_of_new_data,
7146
+ type_: type_of_id_of_new_data
7147
+ };
7133
7148
  previous_crumb_data = new_crumb_data;
7134
7149
  if (!allow_filter_clearing) allow_filter_clearing = true;
7135
7150
  })));
@@ -7197,8 +7212,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7197
7212
  var _on_filters_construct;
7198
7213
  let {
7199
7214
  depict_api_: depict_api_,
7200
- listing_id_: listing_id_,
7201
- meta_title_suffix_: meta_title_suffix_,
7215
+ id_to_query_for_: id_to_query_for_,
7216
+ id_type_: id_type_,
7202
7217
  current_sorting_: current_sorting_,
7203
7218
  min_products_to_fetch_: min_products_to_fetch_,
7204
7219
  category_filters_open_: category_filters_open_,
@@ -7251,7 +7266,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7251
7266
  merchant: merchant_(),
7252
7267
  market: market_(),
7253
7268
  locale: backend_locale_(),
7254
- listing_id: listing_id_(),
7269
+ id_to_query_for_: id_to_query_for_(),
7270
+ id_type_: id_type_(),
7255
7271
  ...(f.length ? {
7256
7272
  filters: f
7257
7273
  } : {}),
@@ -7263,8 +7279,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7263
7279
  // Make "Get products in listing" request to get products in listing
7264
7280
  const [plp_products_] = $3hooq$solidjs.createResource(products_query_base_,
7265
7281
  // 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_),
7282
+ $3hooq$depictaiutilisharedlatest.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
7283
+ id_: $3hooq$solidjs.untrack(id_to_query_for_),
7268
7284
  scroll_restoration_data_: scroll_restoration_data_,
7269
7285
  min_products_to_fetch_: min_products_to_fetch_,
7270
7286
  make_request_: (limit, cursor) => depict_api_.get_listing_products({
@@ -7279,10 +7295,11 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7279
7295
  merchant: merchant_(),
7280
7296
  market: market_(),
7281
7297
  locale: backend_locale_(),
7282
- listing_id: listing_id_()
7298
+ id_to_query_for_: id_to_query_for_(),
7299
+ id_type_: id_type_()
7283
7300
  }));
7284
7301
  // 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)));
7302
+ const [plp_meta] = $3hooq$solidjs.createResource(meta_query_base, $3hooq$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
7286
7303
  const available_sortings_ = $3hooq$solidjs.createMemo(() => {
7287
7304
  var _plp_products_, _plp_products_$sorts;
7288
7305
  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 +7323,6 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7306
7323
  var _plp_meta2;
7307
7324
  return (_plp_meta2 = plp_meta()) === null || _plp_meta2 === void 0 ? void 0 : _plp_meta2.quick_links;
7308
7325
  });
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
7326
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
7321
7327
  const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
7322
7328
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
@@ -7380,7 +7386,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7380
7386
  }));
7381
7387
  results_for = make_product_count_();
7382
7388
  } else {
7383
- $3hooq$depictaiutilishared.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
7389
+ $3hooq$depictaiutilisharedlatest.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
7384
7390
  results_for = $3hooq$solidjsweb.ssr($ede6c70ecdca46fe$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey());
7385
7391
  }
7386
7392
  const filters_opener = $f70cc6dfcadf0fd5$export$d7841e452f2e59a8({
@@ -7402,17 +7408,17 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7402
7408
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
7403
7409
  ...extra_sort_and_filter_args_
7404
7410
  });
7405
- $3hooq$depictaiutilishared.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
7411
+ $3hooq$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
7406
7412
  scroll_restoration_data_: scroll_restoration_data_,
7407
7413
  last_result_in_viewport_: last_result_in_viewport_,
7408
- id_: listing_id_,
7414
+ id_: id_to_query_for_,
7409
7415
  can_write_scroll_restoration_: can_write_scroll_restoration_
7410
7416
  });
7411
7417
  (_on_filters_construct = on_filters_constructed_) === null || _on_filters_construct === void 0 || _on_filters_construct();
7412
7418
  $3hooq$solidjs.createComputed(() => {
7413
7419
  if (plp_products_.loading) set_can_write_scroll_restoration(false);else if (plp_products_()) set_can_write_scroll_restoration(true);
7414
7420
  });
7415
- $3hooq$solidjs.createRenderEffect($3hooq$depictaiutilishared.catchify(async () => {
7421
+ $3hooq$solidjs.createRenderEffect($3hooq$depictaiutilisharedlatest.catchify(async () => {
7416
7422
  var _only_show_filters_op;
7417
7423
  const slim = is_slim_();
7418
7424
  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 +7432,15 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7426
7432
  available_filters_: available_filters_
7427
7433
  });
7428
7434
  $8b366fdb0c76194d$export$3945d6db2dfd3d12({
7429
- listing_id_: listing_id_,
7435
+ id_to_query_for_: id_to_query_for_,
7430
7436
  crumb_data_: crumb_data_,
7431
7437
  i18n_: i18n_,
7432
7438
  selected_filters_: selected_filters_,
7433
7439
  local_filter_cache_: local_filter_cache_,
7434
7440
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
7435
7441
  plp_results_: plp_products_,
7436
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
7442
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
7443
+ id_type_: id_type_
7437
7444
  });
7438
7445
  get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
7439
7446
  get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
@@ -7457,7 +7464,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7457
7464
  get children() {
7458
7465
  return $3hooq$solidjsweb.createComponent((0, $21a004c2e7bd4c16$export$466cdc317043f6cb), {
7459
7466
  quicklinks_data_: quicklinks_data_,
7460
- current_listing_id_: listing_id_,
7467
+ id_to_query_for_: id_to_query_for_,
7468
+ id_type_: id_type_,
7461
7469
  router_: router_,
7462
7470
  breadcrumb_data_: crumb_data_,
7463
7471
  i18n_: i18n_,
@@ -7508,7 +7516,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7508
7516
  sort_or_filter_open_: sort_or_filter_open_,
7509
7517
  desktop_filter_elements_: desktop_filter_elements_,
7510
7518
  content_blocks_by_row_: content_blocks_by_row_,
7511
- id_currently_querying_for_: listing_id_,
7519
+ id_currently_querying_for_: id_to_query_for_,
7512
7520
  no_results_options_: {
7513
7521
  selected_filters_: selected_filters_,
7514
7522
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -7552,10 +7560,10 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7552
7560
  * Adds the current page as last breadcrumb to the breadcrumb trail
7553
7561
  */
7554
7562
  function $ede6c70ecdca46fe$var$add_us_to_crumbs(plp_meta, title) {
7555
- const href_accessor = $3hooq$depictaiutilishared.use_href_accessor();
7563
+ const href_accessor = $3hooq$depictaiutilisharedlatest.use_href_accessor();
7556
7564
  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;
7565
+ var _plp_meta3;
7566
+ const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
7559
7567
  if (!api_value) return api_value;
7560
7568
  return [...api_value, {
7561
7569
  get listing_id() {
@@ -7569,6 +7577,12 @@ function $ede6c70ecdca46fe$var$add_us_to_crumbs(plp_meta, title) {
7569
7577
  },
7570
7578
  get slug() {
7571
7579
  return plp_meta().slug;
7580
+ },
7581
+ get listing_type() {
7582
+ return plp_meta().listing_type;
7583
+ },
7584
+ get external_id() {
7585
+ return plp_meta().external_id;
7572
7586
  }
7573
7587
  }];
7574
7588
  });
@@ -7773,8 +7787,7 @@ var $9cbefc32b9dab36d$var$_router = /*#__PURE__*/new WeakMap();
7773
7787
  var $9cbefc32b9dab36d$var$_localization_signal = /*#__PURE__*/new WeakMap();
7774
7788
  var $9cbefc32b9dab36d$var$_merchant_signal = /*#__PURE__*/new WeakMap();
7775
7789
  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();
7790
+ var $9cbefc32b9dab36d$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
7778
7791
  var $9cbefc32b9dab36d$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
7779
7792
  class $9cbefc32b9dab36d$export$f34314aa9505732e {
7780
7793
  get localization() {
@@ -7784,11 +7797,11 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7784
7797
  set localization(locale_obj) {
7785
7798
  $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[1](locale_obj);
7786
7799
  }
7787
- get listing_id() {
7788
- return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_id_signal)[0]();
7800
+ get listing_query() {
7801
+ return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_query_signal)[0]();
7789
7802
  }
7790
- set listing_id(id) {
7791
- $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_id_signal)[1](id);
7803
+ set listing_query(query) {
7804
+ $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_listing_query_signal)[1](query);
7792
7805
  }
7793
7806
  get merchant() {
7794
7807
  return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_merchant_signal)[0]();
@@ -7802,12 +7815,6 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7802
7815
  set market(market) {
7803
7816
  $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_market_signal)[1](market);
7804
7817
  }
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
7818
  get disable_override_listing_id() {
7812
7819
  return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_disable_override_listing_id)[0]();
7813
7820
  }
@@ -7827,7 +7834,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7827
7834
  on_navigation: on_navigation,
7828
7835
  display_transformers: display_transformers,
7829
7836
  unique_instance_key_for_state = "",
7830
- listing_id_state_key: listing_id_state_key,
7837
+ listing_query_state_key: listing_query_state_key,
7831
7838
  ...props_on_class
7832
7839
  } = _ref2;
7833
7840
  $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_router, {
@@ -7846,13 +7853,9 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7846
7853
  writable: true,
7847
7854
  value: $3hooq$solidjs.createSignal()
7848
7855
  });
7849
- $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_listing_id_signal, {
7856
+ $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_listing_query_signal, {
7850
7857
  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()
7858
+ value: $3hooq$solidjs.createSignal({})
7856
7859
  });
7857
7860
  $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_disable_override_listing_id, {
7858
7861
  writable: true,
@@ -7865,7 +7868,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
7865
7868
  throw new Error("You can only have one instance of DepictCategory with the same uniqueInstanceKeyForState");
7866
7869
  Object.assign(this, props_on_class); // set initial signal values
7867
7870
  $cfcd56242923775d$export$5162a71f252e6122();
7868
- $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldSet)(this, $9cbefc32b9dab36d$var$_router, new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation", listing_id_state_key));
7871
+ $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldSet)(this, $9cbefc32b9dab36d$var$_router, new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation", listing_query_state_key));
7869
7872
  if (on_navigation) $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_router).on_navigation_ = on_navigation;
7870
7873
  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
7874
  const sorting_query_param_ = "sorting" + unique_instance_key_for_state;
@@ -7934,14 +7937,16 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
7934
7937
  category_title: category_title
7935
7938
  } = props;
7936
7939
  const shared_properties = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
7940
+ const diffableListingQuery = $3hooq$solidjs.createMemo(() => Object.values(depict_category.listing_query || {}).join(""));
7937
7941
  return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
7938
7942
  $3hooq$solidjs.createEffect(prev => {
7939
7943
  // 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;
7944
+ diffableListingQuery(); // Only re-run this effect when the listing query *actually* changes (not just the object reference)
7945
+ const newId = $3hooq$solidjs.untrack(() => depict_category.listing_query);
7946
+ $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)(newId, prev);
7947
+ return newId;
7943
7948
  });
7944
- $3hooq$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_id_change)());
7949
+ $3hooq$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)());
7945
7950
  const grid_spacing_override = $3hooq$solidjs.createMemo(() => {
7946
7951
  const {
7947
7952
  grid_spacing: grid_spacing
@@ -7982,8 +7987,11 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
7982
7987
  depict_api_: depict_api_,
7983
7988
  min_products_to_fetch_: $9cbefc32b9dab36d$var$min_products_to_fetch_,
7984
7989
  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,
7990
+ id_to_query_for_: $3hooq$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
7991
+ id_type_: $3hooq$solidjs.createMemo(() => {
7992
+ if (!depict_category.disable_override_listing_id && override_listing_id_accessor_()) return $c3739e86187f2054$export$74ee7529ce0f8a00;
7993
+ return depict_category.listing_query.type;
7994
+ }),
7987
7995
  i18n_: i18n_,
7988
7996
  show_quicklinks_: $3hooq$solidjs.createMemo(() => {
7989
7997
  var _props$show_quicklink;
@@ -8051,13 +8059,16 @@ function $9cbefc32b9dab36d$export$de035477d6fef996(_ref4) {
8051
8059
  sorting_query_param_: sorting_query_param_,
8052
8060
  filter_query_param_prefix_: filter_query_param_prefix_
8053
8061
  } = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
8062
+ const id_to_query_for_ = $3hooq$solidjs.createMemo(() => depict_category.listing_query.id);
8063
+ const id_type_ = $3hooq$solidjs.createMemo(() => depict_category.listing_query.type);
8054
8064
  return $3hooq$solidjsweb.createComponent($9cbefc32b9dab36d$var$InExternalAreaDiv, {
8055
8065
  get children() {
8056
8066
  return $21a004c2e7bd4c16$export$466cdc317043f6cb({
8057
8067
  i18n_: i18n_,
8058
8068
  quicklinks_data_: quicklinks_data_,
8059
8069
  router_: router_,
8060
- current_listing_id_: () => depict_category.listing_id,
8070
+ id_type_: id_type_,
8071
+ id_to_query_for_: id_to_query_for_,
8061
8072
  breadcrumb_data_: breadcrumb_data_,
8062
8073
  sorting_query_param_: sorting_query_param_,
8063
8074
  filter_query_param_prefix_: filter_query_param_prefix_
@@ -8873,7 +8884,7 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
8873
8884
  searching_for_value_: searching_for_value_
8874
8885
  }), $3hooq$solidjsweb.ssr($0677d509ad208e22$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
8875
8886
  if (input_obj().type === "content") return i18n_.content_();
8876
- if (input_obj().category_type === "brand") return i18n_.brand_();
8887
+ if (input_obj().listing_type === "brand") return i18n_.brand_();
8877
8888
  return i18n_.category_();
8878
8889
  })()))]));
8879
8890
  };
@@ -9097,7 +9108,7 @@ function $1a7b2e0cdf65293a$var$actual_navigation_working_on_fake_data(_ref2) {
9097
9108
  url.searchParams.set(search_query_param_name_, title);
9098
9109
  return $1730e5b4d47679a3$export$1efe1013da60d0e4(e, url.href);
9099
9110
  }));
9100
- } 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 => {
9111
+ } 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 => {
9101
9112
  const {
9102
9113
  page_url: page_url
9103
9114
  } = selected_entry;
@@ -9577,7 +9588,7 @@ function $e3ac79dbd744c1c1$export$c05a196222ba1302(_ref) {
9577
9588
  } = _ref;
9578
9589
  const category_suggestions_ = $3hooq$solidjs.createMemo(() => {
9579
9590
  var _suggestions_;
9580
- return (_suggestions_ = suggestions_()) === null || _suggestions_ === void 0 ? void 0 : _suggestions_.suggestions.filter(s => s.type === "category");
9591
+ return (_suggestions_ = suggestions_()) === null || _suggestions_ === void 0 ? void 0 : _suggestions_.suggestions.filter(s => s.type === "listing");
9581
9592
  });
9582
9593
  return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
9583
9594
  get when() {