@depict-ai/ui 4.8.4 → 4.8.6

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.
@@ -114,7 +114,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
114
114
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
115
115
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
116
116
  /*! Depict.ai search and product listing SDK */
117
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.4";
117
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.6";
118
118
  function $054b1113e4897051$export$54c6d6ff54e72743(whatToWatch) {
119
119
  const [width, setWidth] = $3hooq$solidjs.createSignal(0);
120
120
  const [height, setHeight] = $3hooq$solidjs.createSignal(0);
@@ -2764,10 +2764,10 @@ function $068bde7fa83ac02c$export$92f2da32c6e7e7ee(_ref) {
2764
2764
  i18n_: i18n_
2765
2765
  } = _ref;
2766
2766
  return $3hooq$solidjs.createMemo(() => {
2767
- const n_hits = number_();
2768
- if (isNaN(n_hits)) return "";
2767
+ const numberToFormat = number_();
2768
+ if (isNaN(numberToFormat)) return "";
2769
2769
  const price_formatting = i18n_.price_formatting_();
2770
- return $3hooq$depictaiutilishared.standard_price_format(n_hits, 0,
2770
+ return $3hooq$depictaiutilishared.standard_price_format(numberToFormat, 0,
2771
2771
  // we never want places after comma here it looks weird as hell
2772
2772
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
2773
2773
  });
@@ -3630,7 +3630,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
3630
3630
  return isNewModal || !searchFieldEmpty() ? "" : "display: none";
3631
3631
  }
3632
3632
  }, () => searchFieldEmpty() ? {
3633
- "aria-hidden": "true"
3633
+ "aria-hidden": "true",
3634
+ tabIndex: -1
3634
3635
  } : {
3635
3636
  title: i18n_.clear_filters_query_sorting_after_submit_()
3636
3637
  }), () => isNewModal ? $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
@@ -4723,9 +4724,10 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
4723
4724
  });
4724
4725
  // total number of results = content results + product results + category suggestions
4725
4726
  const totalNumberResults = $3hooq$solidjs.createMemo(() => {
4726
- var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
4727
+ var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
4727
4728
  const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
4728
- const hits = results === null || results === void 0 ? void 0 : results.n_hits;
4729
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
4730
+ const hits = results !== null && results !== void 0 && results.cursor ? results === null || results === void 0 ? void 0 : results.n_hits : results === null || results === void 0 ? void 0 : (_results$displays = results.displays) === null || _results$displays === void 0 ? void 0 : _results$displays.length;
4729
4731
  const content_results = content_search_enabled_() && (results === null || results === void 0 ? void 0 : (_results$content_sear = results.content_search_links) === null || _results$content_sear === void 0 ? void 0 : _results$content_sear.length) || 0;
4730
4732
  const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
4731
4733
  return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
@@ -5122,6 +5124,7 @@ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_
5122
5124
  close_modal_: close_modal_
5123
5125
  };
5124
5126
  }
5127
+ let $367b536a2a94d24e$export$68620bd6d5c6bb86;
5125
5128
  function $367b536a2a94d24e$export$e183a13865960371(params_to_default_value, router_) {
5126
5129
  const signals = {};
5127
5130
  const entries = Object.entries(params_to_default_value);
@@ -5154,6 +5157,10 @@ function $367b536a2a94d24e$export$e183a13865960371(params_to_default_value, rout
5154
5157
  }
5155
5158
  }
5156
5159
  if (signal_changed) router_.navigate_.replace_state_(state);
5160
+ $3hooq$solidjs.onCleanup(() => $367b536a2a94d24e$export$68620bd6d5c6bb86 = {
5161
+ time: new Date().toISOString(),
5162
+ stack: new Error().stack
5163
+ });
5157
5164
  });
5158
5165
  // history_dot_state_to_state needs to update after its signals after url_state does BUT in the same task (might even have to be in the same tick in the microtask queue). If we'd use window.addEventListener("popstate") it would be guaranteed to be too late since each event listener has its own task
5159
5166
  (0, $3hooq$depictaiutilishared.instant_exec_on_suspect_history_change).add(event_handler);
@@ -7928,8 +7935,16 @@ function $a162c9a08dc208c2$export$b288c38ae3fddb56(_ref) {
7928
7935
  selected_filters_: [read_selected_filters]
7929
7936
  } = _ref;
7930
7937
  let last_remote_state;
7938
+ let executions = 0;
7939
+ let oneSecondInfiniteLoopPreventionTimeout;
7931
7940
  $3hooq$solidjs.createComputed(() => {
7932
7941
  var _available_filters_;
7942
+ // Sometimes (24 events in sentry, https://depictai-0o.sentry.io/issues/?project=5476183&query=is%3Aunresolved+filters+failed&referrer=issue-list&statsPeriod=14d), for some inexplicable reason, this computation infinite loops
7943
+ // I spent a 1h17min debug session with MadePeople in a tab where they could reproduce
7944
+ // Observations were that of the signal read_local_cache the observers at some point randomly started having this computation first instead of the effect that writes the value to the history
7945
+ // It's VERY HARD to get a tab in a state where it can be reproduced, like with the exact same circumstances it happens "once a day" for them and there's no noticable pattern. But when a tab is found, it can be reliably reproduced by going backwards/forwards.
7946
+ // Also we reliably clean up and dispose of the search page and the effect of history_dot_state_to_state stays in the signals' observers, but for some reason it disappears when the bug happens (onCleanup doesn't get called then either, if I debugged that correctly)
7947
+ // As a value first workaround, we just recognise when the computation has been executed "too often" and just start not doing anything after that
7933
7948
  const remote_filters = Object.fromEntries(((_available_filters_ = available_filters_()) === null || _available_filters_ === void 0 ? void 0 : _available_filters_.map(filter => {
7934
7949
  var _filter$meta;
7935
7950
  return [JSON.stringify([filter.field, filter.op, filter === null || filter === void 0 ? void 0 : (_filter$meta = filter.meta) === null || _filter$meta === void 0 ? void 0 : _filter$meta.type]), filter];
@@ -8036,9 +8051,36 @@ function $a162c9a08dc208c2$export$b288c38ae3fddb56(_ref) {
8036
8051
  }
8037
8052
  if (last_remote_state !== available_filters_() ||
8038
8053
  // we HAVE to update the local filter state (it can contain same info but needs to be different object reference) every time the API state changes, otherwise the CheckboxHierarchicalFilter component doesn't update
8039
- JSON.stringify(new_local_filter_state) !== JSON.stringify(read_local_cache()))
8040
- // Sorry……… They're not that big
8054
+ // Sorry……… They're not that big
8055
+ JSON.stringify(new_local_filter_state) !== JSON.stringify(read_local_cache())) {
8056
+ var _sources, _sources$find;
8057
+ const owner = $3hooq$solidjs.getOwner();
8058
+ const signal = owner === null || owner === void 0 ? void 0 : (_sources = owner.sources) === null || _sources === void 0 ? void 0 : (_sources$find = _sources.find) === null || _sources$find === void 0 ? void 0 : _sources$find.call(_sources, source => source.value === read_local_cache());
8059
+ if (executions > 30) {
8060
+ var _signal$observers, _signal$observers$map;
8061
+ // We're probably in an infinite loop, let's just stop
8062
+ $3hooq$depictaiutilishared.report(new Error("Infinite loop detected in create_modified_filters"), "error", {
8063
+ executions: executions,
8064
+ new_local_filter_state: new_local_filter_state,
8065
+ available_filters: available_filters_(),
8066
+ last_remote_state: last_remote_state,
8067
+ history_length: history.length,
8068
+ location: location.href,
8069
+ foundSignal: !!signal,
8070
+ observerSlots: signal === null || signal === void 0 ? void 0 : signal.observerSlots,
8071
+ observers: signal === null || signal === void 0 ? void 0 : (_signal$observers = signal.observers) === null || _signal$observers === void 0 ? void 0 : (_signal$observers$map = _signal$observers.map) === null || _signal$observers$map === void 0 ? void 0 : _signal$observers$map.call(_signal$observers, o => (o === null || o === void 0 ? void 0 : o.fn) + ""),
8072
+ lastHistoryDotStateToStateCleanupInfo: $367b536a2a94d24e$export$68620bd6d5c6bb86
8073
+ });
8074
+ return;
8075
+ }
8041
8076
  write_local_cache(new_local_filter_state);
8077
+ // Keep track how many times we wrote this signal
8078
+ executions++;
8079
+ oneSecondInfiniteLoopPreventionTimeout || (oneSecondInfiniteLoopPreventionTimeout = setTimeout($3hooq$depictaiutilishared.catchify(() => {
8080
+ executions = 0;
8081
+ oneSecondInfiniteLoopPreventionTimeout = undefined;
8082
+ }), 1000));
8083
+ }
8042
8084
  last_remote_state = available_filters_();
8043
8085
  });
8044
8086
  }
@@ -9930,7 +9972,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
9930
9972
  query_base_: query_base_,
9931
9973
  depict_api_: depict_api_,
9932
9974
  is_loading_: is_loading_,
9933
- content_blocks_: content_blocks_
9975
+ content_blocks_: content_blocks_,
9976
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
9934
9977
  } = _ref;
9935
9978
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
9936
9979
  const [get_extra_displays, set_extra_displays_] = $3hooq$solidjs.createSignal([], {
@@ -9957,6 +10000,7 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
9957
10000
  is_loading_: is_loading_,
9958
10001
  get_extra_displays: get_extra_displays
9959
10002
  });
10003
+ $3hooq$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
9960
10004
  $19438fea513c9d01$export$5e4aed86c12acdd9({
9961
10005
  percentage_in_view_: percentage_in_view_,
9962
10006
  set_extra_displays_: set_extra_displays_,
@@ -10102,7 +10146,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
10102
10146
  layout_options_: layout_options_,
10103
10147
  id_currently_querying_for_: id_currently_querying_for_,
10104
10148
  content_blocks_by_row_: content_blocks_by_row_,
10105
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
10149
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
10150
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
10106
10151
  } = _ref;
10107
10152
  // The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
10108
10153
  const is_loading_ = $3hooq$solidjs.createMemo(() => plp_results_.loading || query_base_.loading);
@@ -10233,7 +10278,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
10233
10278
  query_base_: query_base_,
10234
10279
  depict_api_: depict_api_,
10235
10280
  is_loading_: is_loading_,
10236
- content_blocks_: content_blocks_
10281
+ content_blocks_: content_blocks_,
10282
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
10237
10283
  });
10238
10284
  $3hooq$solidjs.onCleanup(() => suspense_contents = undefined);
10239
10285
  return suspense_contents;
@@ -11606,6 +11652,17 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11606
11652
  };
11607
11653
  });
11608
11654
  }
11655
+ function $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
11656
+ let [allProductsLoaded] = _ref;
11657
+ return $3hooq$solidjs.createMemo(() => {
11658
+ var _plp_products_;
11659
+ const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
11660
+ const loadedAll = allProductsLoaded();
11661
+ if (!backendSays || !loadedAll) return backendSays;
11662
+ // People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
11663
+ return currentlyLoadedDisplays();
11664
+ });
11665
+ }
11609
11666
  var $739c927cbecd26b0$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
11610
11667
  $739c927cbecd26b0$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
11611
11668
  function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
@@ -11647,6 +11704,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
11647
11704
  } = _ref;
11648
11705
  const [get_sorting] = current_sorting_;
11649
11706
  const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
11707
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
11650
11708
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
11651
11709
  const number_of_rendered_selected_filters_items_ = $3hooq$solidjs.createSignal(0);
11652
11710
  const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
@@ -11725,24 +11783,21 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
11725
11783
  const SafeSearchField = $3hooq$depictaiutilishared.catchify((0, $29e5dbeb69da7a36$export$b94867ecbd698f21));
11726
11784
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
11727
11785
  const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
11728
- const n_hits = $3hooq$solidjs.createMemo(() => {
11729
- var _search_results_3;
11730
- return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
11731
- });
11786
+ const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
11732
11787
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
11733
- number_: n_hits,
11788
+ number_: countOfProductsForUI,
11734
11789
  i18n_: i18n_
11735
11790
  });
11736
11791
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
11737
11792
  const no_results_text_ = $3hooq$solidjs.createMemo(() => {
11738
- var _search_results_4, _search_results_4$con;
11739
- return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
11793
+ var _search_results_3, _search_results_3$con;
11794
+ return ((_search_results_3 = search_results_()) !== null && _search_results_3 !== void 0 && (_search_results_3$con = _search_results_3.content_search_links) !== null && _search_results_3$con !== void 0 && _search_results_3$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
11740
11795
  });
11741
11796
  const results_for = $3hooq$solidjsweb.createComponent((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), $3hooq$solidjsweb.mergeProps({
11742
11797
  get type() {
11743
11798
  return (0, $9870a8a48ee126af$export$2452208c79fe93ea).products;
11744
11799
  },
11745
- number_of_results_: n_hits
11800
+ number_of_results_: countOfProductsForUI
11746
11801
  }, {
11747
11802
  get_search_query_: get_search_query_,
11748
11803
  i18n_: i18n_,
@@ -11968,6 +12023,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
11968
12023
  sort_or_filter_open_: sort_or_filter_open_,
11969
12024
  id_currently_querying_for_: get_search_query_,
11970
12025
  content_blocks_by_row_: content_blocks_by_row_,
12026
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
11971
12027
  no_results_options_: {
11972
12028
  selected_filters_: selected_filters_,
11973
12029
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -12008,10 +12064,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
12008
12064
  last_result_in_viewport_: last_result_in_viewport_,
12009
12065
  formatted_number_of_results_: formatted_number_of_results_,
12010
12066
  i18n_: i18n_,
12011
- number_of_results_: $3hooq$solidjs.createMemo(() => {
12012
- var _search_results_5;
12013
- return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
12014
- })
12067
+ number_of_results_: countOfProductsForUI
12015
12068
  });
12016
12069
  }
12017
12070
  })), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
@@ -13521,6 +13574,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13521
13574
  const number_of_rendered_selected_filters_items_ = $3hooq$solidjs.createSignal(0);
13522
13575
  const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
13523
13576
  const last_result_in_viewport_ = $3hooq$solidjs.createSignal();
13577
+ const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
13578
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
13524
13579
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $3hooq$solidjs.createSignal(false);
13525
13580
  const products_query_base_ = $e4bc31358c414b18$export$210f130a61ac1e8d(() => {
13526
13581
  const sort_obj = get_sorting() && {
@@ -13567,6 +13622,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13567
13622
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
13568
13623
  const [plp_meta] = $3hooq$solidjs.createResource(meta_query_base, $3hooq$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
13569
13624
  const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
13625
+ const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
13570
13626
  const available_sortings_ = $3hooq$solidjs.createMemo(() => {
13571
13627
  var _plp_products_, _plp_products_$sorts;
13572
13628
  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 => {
@@ -13593,10 +13649,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13593
13649
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
13594
13650
  const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
13595
13651
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
13596
- number_: $3hooq$solidjs.createMemo(() => {
13597
- var _plp_products_3;
13598
- return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
13599
- }),
13652
+ number_: countOfProductsForUI,
13600
13653
  i18n_: i18n_
13601
13654
  });
13602
13655
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
@@ -13619,10 +13672,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13619
13672
  last_result_in_viewport_: last_result_in_viewport_,
13620
13673
  formatted_number_of_results_: formatted_number_of_results_,
13621
13674
  i18n_: i18n_,
13622
- number_of_results_: $3hooq$solidjs.createMemo(() => {
13623
- var _plp_products_4;
13624
- return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
13625
- }),
13675
+ number_of_results_: countOfProductsForUI,
13626
13676
  ...extraProps
13627
13677
  });
13628
13678
  }
@@ -13641,8 +13691,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13641
13691
  }
13642
13692
  })), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
13643
13693
  get when() {
13644
- var _plp_products_5;
13645
- return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
13694
+ return countOfProductsForUI() === 1;
13646
13695
  },
13647
13696
  get fallback() {
13648
13697
  return i18n_.products_();
@@ -13816,6 +13865,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13816
13865
  content_blocks_by_row_: contentBlocksByRow,
13817
13866
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
13818
13867
  id_currently_querying_for_: id_to_query_for_,
13868
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
13869
+ all_products_loaded_: all_products_loaded_,
13819
13870
  no_results_options_: {
13820
13871
  selected_filters_: selected_filters_,
13821
13872
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.4";
14
+ export const version = "4.8.6";
15
15
  /**
16
16
  * Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
17
17
  */
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.4";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.6";
14
14
  function $4be619ec2cd7bba3$export$54c6d6ff54e72743(whatToWatch) {
15
15
  const [width, setWidth] = $b8hua$createSignal(0);
16
16
  const [height, setHeight] = $b8hua$createSignal(0);
@@ -2660,10 +2660,10 @@ function $43fbdca0f726a34b$export$92f2da32c6e7e7ee(_ref) {
2660
2660
  i18n_: i18n_
2661
2661
  } = _ref;
2662
2662
  return $b8hua$createMemo(() => {
2663
- const n_hits = number_();
2664
- if (isNaN(n_hits)) return "";
2663
+ const numberToFormat = number_();
2664
+ if (isNaN(numberToFormat)) return "";
2665
2665
  const price_formatting = i18n_.price_formatting_();
2666
- return $b8hua$standard_price_format(n_hits, 0,
2666
+ return $b8hua$standard_price_format(numberToFormat, 0,
2667
2667
  // we never want places after comma here it looks weird as hell
2668
2668
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
2669
2669
  });
@@ -3526,7 +3526,8 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
3526
3526
  return isNewModal || !searchFieldEmpty() ? "" : "display: none";
3527
3527
  }
3528
3528
  }, () => searchFieldEmpty() ? {
3529
- "aria-hidden": "true"
3529
+ "aria-hidden": "true",
3530
+ tabIndex: -1
3530
3531
  } : {
3531
3532
  title: i18n_.clear_filters_query_sorting_after_submit_()
3532
3533
  }), () => isNewModal ? $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
@@ -4619,9 +4620,10 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
4619
4620
  });
4620
4621
  // total number of results = content results + product results + category suggestions
4621
4622
  const totalNumberResults = $b8hua$createMemo(() => {
4622
- var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
4623
+ var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
4623
4624
  const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
4624
- const hits = results === null || results === void 0 ? void 0 : results.n_hits;
4625
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
4626
+ const hits = results !== null && results !== void 0 && results.cursor ? results === null || results === void 0 ? void 0 : results.n_hits : results === null || results === void 0 ? void 0 : (_results$displays = results.displays) === null || _results$displays === void 0 ? void 0 : _results$displays.length;
4625
4627
  const content_results = content_search_enabled_() && (results === null || results === void 0 ? void 0 : (_results$content_sear = results.content_search_links) === null || _results$content_sear === void 0 ? void 0 : _results$content_sear.length) || 0;
4626
4628
  const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
4627
4629
  return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
@@ -5018,6 +5020,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
5018
5020
  close_modal_: close_modal_
5019
5021
  };
5020
5022
  }
5023
+ let $972f6bce0f9d61be$export$68620bd6d5c6bb86;
5021
5024
  function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
5022
5025
  const signals = {};
5023
5026
  const entries = Object.entries(params_to_default_value);
@@ -5050,6 +5053,10 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
5050
5053
  }
5051
5054
  }
5052
5055
  if (signal_changed) router_.navigate_.replace_state_(state);
5056
+ $b8hua$onCleanup(() => $972f6bce0f9d61be$export$68620bd6d5c6bb86 = {
5057
+ time: new Date().toISOString(),
5058
+ stack: new Error().stack
5059
+ });
5053
5060
  });
5054
5061
  // history_dot_state_to_state needs to update after its signals after url_state does BUT in the same task (might even have to be in the same tick in the microtask queue). If we'd use window.addEventListener("popstate") it would be guaranteed to be too late since each event listener has its own task
5055
5062
  (0, $b8hua$instant_exec_on_suspect_history_change).add(event_handler);
@@ -7824,8 +7831,16 @@ function $44aa24b1bb793549$export$b288c38ae3fddb56(_ref) {
7824
7831
  selected_filters_: [read_selected_filters]
7825
7832
  } = _ref;
7826
7833
  let last_remote_state;
7834
+ let executions = 0;
7835
+ let oneSecondInfiniteLoopPreventionTimeout;
7827
7836
  $b8hua$createComputed(() => {
7828
7837
  var _available_filters_;
7838
+ // Sometimes (24 events in sentry, https://depictai-0o.sentry.io/issues/?project=5476183&query=is%3Aunresolved+filters+failed&referrer=issue-list&statsPeriod=14d), for some inexplicable reason, this computation infinite loops
7839
+ // I spent a 1h17min debug session with MadePeople in a tab where they could reproduce
7840
+ // Observations were that of the signal read_local_cache the observers at some point randomly started having this computation first instead of the effect that writes the value to the history
7841
+ // It's VERY HARD to get a tab in a state where it can be reproduced, like with the exact same circumstances it happens "once a day" for them and there's no noticable pattern. But when a tab is found, it can be reliably reproduced by going backwards/forwards.
7842
+ // Also we reliably clean up and dispose of the search page and the effect of history_dot_state_to_state stays in the signals' observers, but for some reason it disappears when the bug happens (onCleanup doesn't get called then either, if I debugged that correctly)
7843
+ // As a value first workaround, we just recognise when the computation has been executed "too often" and just start not doing anything after that
7829
7844
  const remote_filters = Object.fromEntries(((_available_filters_ = available_filters_()) === null || _available_filters_ === void 0 ? void 0 : _available_filters_.map(filter => {
7830
7845
  var _filter$meta;
7831
7846
  return [JSON.stringify([filter.field, filter.op, filter === null || filter === void 0 ? void 0 : (_filter$meta = filter.meta) === null || _filter$meta === void 0 ? void 0 : _filter$meta.type]), filter];
@@ -7932,9 +7947,36 @@ function $44aa24b1bb793549$export$b288c38ae3fddb56(_ref) {
7932
7947
  }
7933
7948
  if (last_remote_state !== available_filters_() ||
7934
7949
  // we HAVE to update the local filter state (it can contain same info but needs to be different object reference) every time the API state changes, otherwise the CheckboxHierarchicalFilter component doesn't update
7935
- JSON.stringify(new_local_filter_state) !== JSON.stringify(read_local_cache()))
7936
- // Sorry……… They're not that big
7950
+ // Sorry……… They're not that big
7951
+ JSON.stringify(new_local_filter_state) !== JSON.stringify(read_local_cache())) {
7952
+ var _sources, _sources$find;
7953
+ const owner = $b8hua$getOwner();
7954
+ const signal = owner === null || owner === void 0 ? void 0 : (_sources = owner.sources) === null || _sources === void 0 ? void 0 : (_sources$find = _sources.find) === null || _sources$find === void 0 ? void 0 : _sources$find.call(_sources, source => source.value === read_local_cache());
7955
+ if (executions > 30) {
7956
+ var _signal$observers, _signal$observers$map;
7957
+ // We're probably in an infinite loop, let's just stop
7958
+ $b8hua$report(new Error("Infinite loop detected in create_modified_filters"), "error", {
7959
+ executions: executions,
7960
+ new_local_filter_state: new_local_filter_state,
7961
+ available_filters: available_filters_(),
7962
+ last_remote_state: last_remote_state,
7963
+ history_length: history.length,
7964
+ location: location.href,
7965
+ foundSignal: !!signal,
7966
+ observerSlots: signal === null || signal === void 0 ? void 0 : signal.observerSlots,
7967
+ observers: signal === null || signal === void 0 ? void 0 : (_signal$observers = signal.observers) === null || _signal$observers === void 0 ? void 0 : (_signal$observers$map = _signal$observers.map) === null || _signal$observers$map === void 0 ? void 0 : _signal$observers$map.call(_signal$observers, o => (o === null || o === void 0 ? void 0 : o.fn) + ""),
7968
+ lastHistoryDotStateToStateCleanupInfo: $972f6bce0f9d61be$export$68620bd6d5c6bb86
7969
+ });
7970
+ return;
7971
+ }
7937
7972
  write_local_cache(new_local_filter_state);
7973
+ // Keep track how many times we wrote this signal
7974
+ executions++;
7975
+ oneSecondInfiniteLoopPreventionTimeout || (oneSecondInfiniteLoopPreventionTimeout = setTimeout($b8hua$catchify(() => {
7976
+ executions = 0;
7977
+ oneSecondInfiniteLoopPreventionTimeout = undefined;
7978
+ }), 1000));
7979
+ }
7938
7980
  last_remote_state = available_filters_();
7939
7981
  });
7940
7982
  }
@@ -9826,7 +9868,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
9826
9868
  query_base_: query_base_,
9827
9869
  depict_api_: depict_api_,
9828
9870
  is_loading_: is_loading_,
9829
- content_blocks_: content_blocks_
9871
+ content_blocks_: content_blocks_,
9872
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
9830
9873
  } = _ref;
9831
9874
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
9832
9875
  const [get_extra_displays, set_extra_displays_] = $b8hua$createSignal([], {
@@ -9853,6 +9896,7 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
9853
9896
  is_loading_: is_loading_,
9854
9897
  get_extra_displays: get_extra_displays
9855
9898
  });
9899
+ $b8hua$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
9856
9900
  $6d2962bc9370f884$export$5e4aed86c12acdd9({
9857
9901
  percentage_in_view_: percentage_in_view_,
9858
9902
  set_extra_displays_: set_extra_displays_,
@@ -9998,7 +10042,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
9998
10042
  layout_options_: layout_options_,
9999
10043
  id_currently_querying_for_: id_currently_querying_for_,
10000
10044
  content_blocks_by_row_: content_blocks_by_row_,
10001
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
10045
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
10046
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
10002
10047
  } = _ref;
10003
10048
  // The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
10004
10049
  const is_loading_ = $b8hua$createMemo(() => plp_results_.loading || query_base_.loading);
@@ -10129,7 +10174,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
10129
10174
  query_base_: query_base_,
10130
10175
  depict_api_: depict_api_,
10131
10176
  is_loading_: is_loading_,
10132
- content_blocks_: content_blocks_
10177
+ content_blocks_: content_blocks_,
10178
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
10133
10179
  });
10134
10180
  $b8hua$onCleanup(() => suspense_contents = undefined);
10135
10181
  return suspense_contents;
@@ -11502,6 +11548,17 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11502
11548
  };
11503
11549
  });
11504
11550
  }
11551
+ function $0728458b46ee9d32$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
11552
+ let [allProductsLoaded] = _ref;
11553
+ return $b8hua$createMemo(() => {
11554
+ var _plp_products_;
11555
+ const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
11556
+ const loadedAll = allProductsLoaded();
11557
+ if (!backendSays || !loadedAll) return backendSays;
11558
+ // People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
11559
+ return currentlyLoadedDisplays();
11560
+ });
11561
+ }
11505
11562
  var $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
11506
11563
  $da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
11507
11564
  function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
@@ -11543,6 +11600,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
11543
11600
  } = _ref;
11544
11601
  const [get_sorting] = current_sorting_;
11545
11602
  const all_products_loaded_ = $b8hua$createSignal(false);
11603
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $b8hua$createSignal(0);
11546
11604
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
11547
11605
  const number_of_rendered_selected_filters_items_ = $b8hua$createSignal(0);
11548
11606
  const first_result_in_viewport_ = $b8hua$createSignal();
@@ -11621,24 +11679,21 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
11621
11679
  const SafeSearchField = $b8hua$catchify((0, $584c06c09cf4609d$export$b94867ecbd698f21));
11622
11680
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $b8hua$createSignal(false);
11623
11681
  const [desktop_filter_elements_, set_desktop_filter_elements] = $b8hua$createSignal();
11624
- const n_hits = $b8hua$createMemo(() => {
11625
- var _search_results_3;
11626
- return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
11627
- });
11682
+ const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
11628
11683
  const formatted_number_of_results_ = $43fbdca0f726a34b$export$92f2da32c6e7e7ee({
11629
- number_: n_hits,
11684
+ number_: countOfProductsForUI,
11630
11685
  i18n_: i18n_
11631
11686
  });
11632
11687
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $b8hua$createSignal();
11633
11688
  const no_results_text_ = $b8hua$createMemo(() => {
11634
- var _search_results_4, _search_results_4$con;
11635
- return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
11689
+ var _search_results_3, _search_results_3$con;
11690
+ return ((_search_results_3 = search_results_()) !== null && _search_results_3 !== void 0 && (_search_results_3$con = _search_results_3.content_search_links) !== null && _search_results_3$con !== void 0 && _search_results_3$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
11636
11691
  });
11637
11692
  const results_for = $b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $b8hua$mergeProps({
11638
11693
  get type() {
11639
11694
  return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
11640
11695
  },
11641
- number_of_results_: n_hits
11696
+ number_of_results_: countOfProductsForUI
11642
11697
  }, {
11643
11698
  get_search_query_: get_search_query_,
11644
11699
  i18n_: i18n_,
@@ -11864,6 +11919,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
11864
11919
  sort_or_filter_open_: sort_or_filter_open_,
11865
11920
  id_currently_querying_for_: get_search_query_,
11866
11921
  content_blocks_by_row_: content_blocks_by_row_,
11922
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
11867
11923
  no_results_options_: {
11868
11924
  selected_filters_: selected_filters_,
11869
11925
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -11904,10 +11960,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
11904
11960
  last_result_in_viewport_: last_result_in_viewport_,
11905
11961
  formatted_number_of_results_: formatted_number_of_results_,
11906
11962
  i18n_: i18n_,
11907
- number_of_results_: $b8hua$createMemo(() => {
11908
- var _search_results_5;
11909
- return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
11910
- })
11963
+ number_of_results_: countOfProductsForUI
11911
11964
  });
11912
11965
  }
11913
11966
  })), $b8hua$escape($b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
@@ -13417,6 +13470,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
13417
13470
  const number_of_rendered_selected_filters_items_ = $b8hua$createSignal(0);
13418
13471
  const first_result_in_viewport_ = $b8hua$createSignal();
13419
13472
  const last_result_in_viewport_ = $b8hua$createSignal();
13473
+ const all_products_loaded_ = $b8hua$createSignal(false);
13474
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $b8hua$createSignal(0);
13420
13475
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $b8hua$createSignal(false);
13421
13476
  const products_query_base_ = $ec225bf1f1627ea8$export$210f130a61ac1e8d(() => {
13422
13477
  const sort_obj = get_sorting() && {
@@ -13463,6 +13518,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
13463
13518
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
13464
13519
  const [plp_meta] = $b8hua$createResource(meta_query_base, $b8hua$catchify1(query => depict_api_.get_listing(query)));
13465
13520
  const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
13521
+ const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
13466
13522
  const available_sortings_ = $b8hua$createMemo(() => {
13467
13523
  var _plp_products_, _plp_products_$sorts;
13468
13524
  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 => {
@@ -13489,10 +13545,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
13489
13545
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $b8hua$createSignal(false);
13490
13546
  const [desktop_filter_elements_, set_desktop_filter_elements] = $b8hua$createSignal();
13491
13547
  const formatted_number_of_results_ = $43fbdca0f726a34b$export$92f2da32c6e7e7ee({
13492
- number_: $b8hua$createMemo(() => {
13493
- var _plp_products_3;
13494
- return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
13495
- }),
13548
+ number_: countOfProductsForUI,
13496
13549
  i18n_: i18n_
13497
13550
  });
13498
13551
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $b8hua$createSignal();
@@ -13515,10 +13568,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
13515
13568
  last_result_in_viewport_: last_result_in_viewport_,
13516
13569
  formatted_number_of_results_: formatted_number_of_results_,
13517
13570
  i18n_: i18n_,
13518
- number_of_results_: $b8hua$createMemo(() => {
13519
- var _plp_products_4;
13520
- return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
13521
- }),
13571
+ number_of_results_: countOfProductsForUI,
13522
13572
  ...extraProps
13523
13573
  });
13524
13574
  }
@@ -13537,8 +13587,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
13537
13587
  }
13538
13588
  })), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
13539
13589
  get when() {
13540
- var _plp_products_5;
13541
- return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
13590
+ return countOfProductsForUI() === 1;
13542
13591
  },
13543
13592
  get fallback() {
13544
13593
  return i18n_.products_();
@@ -13712,6 +13761,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
13712
13761
  content_blocks_by_row_: contentBlocksByRow,
13713
13762
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
13714
13763
  id_currently_querying_for_: id_to_query_for_,
13764
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
13765
+ all_products_loaded_: all_products_loaded_,
13715
13766
  no_results_options_: {
13716
13767
  selected_filters_: selected_filters_,
13717
13768
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,