@depict-ai/ui 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -20,6 +20,8 @@ function $parcel$interopDefault(a) {
20
20
  }
21
21
  $parcel$export(module.exports, "useExpandingContainerReactive", () => $d6d51b09cb2116a6$export$5bad61ecde080b1f);
22
22
  $parcel$export(module.exports, "LooksSliderOrGrid", () => $e57cd46536ad992e$export$2c9f9bf2092486aa);
23
+ $parcel$export(module.exports, "LookCard", () => $47e3c3102c78121b$export$44809a8a3e867e30);
24
+ $parcel$export(module.exports, "PseudoRouter", () => $73014ff36186a4dd$export$7e1297a3a19f10d8);
23
25
  $parcel$export(module.exports, "promiseSafeStructuredClone", () => $400d96565bbbfe07$export$83bb9af5671e1dbe);
24
26
  $parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $cfcd56242923775d$export$5162a71f252e6122);
25
27
  $parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $cfcd56242923775d$export$3064e1e8c6513da3);
@@ -102,7 +104,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
102
104
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
103
105
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
104
106
  /*! Depict.ai search and product listing SDK */
105
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.6.0";
107
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.0";
106
108
  function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
107
109
  const {
108
110
  collapse: collapse,
@@ -5649,7 +5651,7 @@ function $513986fde589b871$export$3e41faf802a29e71(props) {
5649
5651
  return undefined;
5650
5652
  }
5651
5653
  async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
5652
- const body = parent || (await (0, $52FdA$depictaiutilishared.observer).wait_for_element("body"));
5654
+ const body = parent || document.body || (await (0, $52FdA$depictaiutilishared.observer).wait_for_element("body"));
5653
5655
  let dispose_and_remove;
5654
5656
  const open_modal_ = $52FdA$depictaiutilishared.catchify(async function () {
5655
5657
  let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -6470,7 +6472,9 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
6470
6472
  local_filter_cache_: [get_local_filter_cache, set_local_filter_cache],
6471
6473
  selected_filters_: [get_selected_filters, set_selected_filters],
6472
6474
  expanded_hierarchical_filters_: [get_expanded_hierarchical_filters, set_expanded_hierarchical_filters],
6473
- delay_toast_: delay_toast_
6475
+ delay_toast_: delay_toast_,
6476
+ expanded_filters_: expanded_filters_,
6477
+ filters_open_: filters_open_
6474
6478
  } = props;
6475
6479
  const previous_selected_filters = $52FdA$solidjs.untrack(get_selected_filters);
6476
6480
  if (!previous_selected_filters.length) {
@@ -6479,9 +6483,13 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
6479
6483
  if (delay_toast_) return () => {};
6480
6484
  return;
6481
6485
  }
6486
+ const previousExpandedFilters = $52FdA$solidjs.untrack(() => expanded_filters_ === null || expanded_filters_ === void 0 ? void 0 : expanded_filters_[0]());
6487
+ const previousFiltersOpen = $52FdA$solidjs.untrack(() => filters_open_ === null || filters_open_ === void 0 ? void 0 : filters_open_[0]());
6482
6488
  const previous_expanded_hierarchical_filters = $52FdA$solidjs.untrack(get_expanded_hierarchical_filters);
6483
6489
  const previous_local_filter_cache = $52FdA$solidjs.untrack(get_local_filter_cache);
6484
6490
  const statement_accessor = user_triggered_ ? i18n_.filters_cleared_ : i18n_.we_cleared_your_filters_;
6491
+ expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1]([]);
6492
+ filters_open_ === null || filters_open_ === void 0 || filters_open_[1](false);
6485
6493
  set_selected_filters([]);
6486
6494
  scrollTo({
6487
6495
  top: 0
@@ -6507,7 +6515,7 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
6507
6515
  close_toast_: close_toast_
6508
6516
  } = $5909f8d84b7b4c30$export$5196e4c01fa56fcb({
6509
6517
  class: "cleared_filters",
6510
- close_after_: 30000,
6518
+ close_after_: 10000,
6511
6519
  on_close_: on_toast_hidden,
6512
6520
  children: [(() => {
6513
6521
  var _el$ = $52FdA$solidjsweb.getNextElement($1a8463d757baadb6$var$_tmpl$);
@@ -6520,7 +6528,9 @@ function $1a8463d757baadb6$export$8895d39404bd2bb1(props) {
6520
6528
  $52FdA$solidjsweb.addEventListener(_el$3, "click", $52FdA$depictaiutilishared.catchify(() => {
6521
6529
  set_selected_filters(previous_selected_filters);
6522
6530
  set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
6531
+ if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
6523
6532
  if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
6533
+ if (typeof previousFiltersOpen === "boolean") filters_open_ === null || filters_open_ === void 0 || filters_open_[1](previousFiltersOpen);
6524
6534
  // also restore previous filter cache, I think this should trigger a correct re-merging with newly in-came filters from backend in case there are any. This is because selected filters otherwise might not exist anymore and therefore can't be viewed in the UI
6525
6535
  set_local_filter_cache(previous_local_filter_cache);
6526
6536
  scrollTo({
@@ -10747,7 +10757,9 @@ function $1c0d0256826edea6$export$e026af0c7b64ea5f(_ref) {
10747
10757
  current_sorting_: current_sorting_,
10748
10758
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
10749
10759
  i18n_: i18n_,
10750
- local_filter_cache_: local_filter_cache_
10760
+ local_filter_cache_: local_filter_cache_,
10761
+ expanded_filters_: expanded_filters_,
10762
+ filters_open_: filters_open_
10751
10763
  } = _ref;
10752
10764
  const [get_selected_filters] = selected_filters_;
10753
10765
  // Possible values:
@@ -10775,7 +10787,9 @@ function $1c0d0256826edea6$export$e026af0c7b64ea5f(_ref) {
10775
10787
  also_clear_sorting_: true,
10776
10788
  current_sorting_: current_sorting_,
10777
10789
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
10778
- local_filter_cache_: local_filter_cache_
10790
+ local_filter_cache_: local_filter_cache_,
10791
+ expanded_filters_: expanded_filters_,
10792
+ filters_open_: filters_open_
10779
10793
  });
10780
10794
  }
10781
10795
  }), {
@@ -10843,16 +10857,26 @@ function $1689794f03ba2554$export$205efb947c7ffd78(handler) {
10843
10857
  // Some customers (e.g. equestrian) have `height: 100%` and/or `overflow-x: hidden` on the body, which means that scroll events won't get dispatched on `window`. The pages who get it on <body> won't get it on `window` and vice-versa, so there shouldn't be a worry about duplicate calling of the handler.
10844
10858
  // Use observer in case that this gets called before body exists
10845
10859
  if (!override_element) {
10846
- const disconnect = (0, $52FdA$depictaiutilishared.observer).onexists("body", _ref => {
10847
- let {
10848
- element: element
10849
- } = _ref;
10860
+ const doWithBody = element => {
10850
10861
  element.addEventListener("scroll", catchified_handler, {
10851
10862
  passive: passive
10852
10863
  });
10853
10864
  $52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.onCleanup(() => element.removeEventListener("scroll", catchified_handler)));
10854
- });
10855
- $52FdA$solidjs.onCleanup(disconnect);
10865
+ };
10866
+ const {
10867
+ body: body
10868
+ } = document;
10869
+ if (body)
10870
+ // Only start observer if we absolutely need it, for performance
10871
+ doWithBody(body);else {
10872
+ const disconnect = (0, $52FdA$depictaiutilishared.observer).onexists("body", _ref => {
10873
+ let {
10874
+ element: element
10875
+ } = _ref;
10876
+ return doWithBody(element);
10877
+ });
10878
+ $52FdA$solidjs.onCleanup(disconnect);
10879
+ }
10856
10880
  }
10857
10881
  for (const event of ["resize", "orientationchange", "scroll"]) {
10858
10882
  const listen_on = override_element !== null && override_element !== void 0 ? override_element : window;
@@ -14439,7 +14463,9 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
14439
14463
  current_sorting_: current_sorting_,
14440
14464
  expanded_hierarchical_filters_: state_.expanded_hierarchical_filters,
14441
14465
  i18n_: i18n_,
14442
- local_filter_cache_: state_.local_filter_cache
14466
+ local_filter_cache_: state_.local_filter_cache,
14467
+ expanded_filters_: state_.expanded_filters,
14468
+ filters_open_: state_.filters_open
14443
14469
  });
14444
14470
  $ddd39c5f36f49703$export$dde08b2dca8cc1ce.set(this, {
14445
14471
  search_query_url_param_name_: search_query_url_param_name_,
@@ -15515,7 +15541,9 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
15515
15541
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15516
15542
  plp_results_: plp_results_,
15517
15543
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15518
- id_type_: id_type_
15544
+ id_type_: id_type_,
15545
+ expanded_filters_: expanded_filters_,
15546
+ filters_open_: filters_open_
15519
15547
  } = _ref;
15520
15548
  // If we just got opened in a new tab, clear filters instantly and remove the flag
15521
15549
  $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
@@ -15524,7 +15552,9 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
15524
15552
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15525
15553
  selected_filters_: selected_filters_,
15526
15554
  i18n_: i18n_,
15527
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
15555
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15556
+ expanded_filters_: expanded_filters_,
15557
+ filters_open_: filters_open_
15528
15558
  });
15529
15559
  // The code below is for when we're already open and the user navigates to a new category
15530
15560
  let previous_crumb_data = $52FdA$solidjs.untrack(crumb_data_);
@@ -15560,7 +15590,9 @@ function $8b366fdb0c76194d$export$3945d6db2dfd3d12(_ref) {
15560
15590
  also_clear_sorting_: false,
15561
15591
  selected_filters_: selected_filters_,
15562
15592
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15563
- local_filter_cache_: local_filter_cache_
15593
+ local_filter_cache_: local_filter_cache_,
15594
+ expanded_filters_: expanded_filters_,
15595
+ filters_open_: filters_open_
15564
15596
  });
15565
15597
  // Also ensure we don't have `sideways_url_params_flag` set anymore
15566
15598
  sideways_filter_clearing_flag_[1](false);
@@ -15581,7 +15613,9 @@ function $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_
15581
15613
  i18n_: i18n_,
15582
15614
  selected_filters_: selected_filters_,
15583
15615
  local_filter_cache_: local_filter_cache_,
15584
- sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_]
15616
+ sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_],
15617
+ expanded_filters_: expanded_filters_,
15618
+ filters_open_: filters_open_
15585
15619
  } = _ref3;
15586
15620
  const tracking_function_for_plp_results = $52FdA$solidjs.createReaction(() => {
15587
15621
  // On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
@@ -15596,7 +15630,9 @@ function $8b366fdb0c76194d$var$clear_if_opened_new_tab_with_sideways_url_params_
15596
15630
  also_clear_sorting_: false,
15597
15631
  selected_filters_: selected_filters_,
15598
15632
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15599
- local_filter_cache_: local_filter_cache_
15633
+ local_filter_cache_: local_filter_cache_,
15634
+ filters_open_: filters_open_,
15635
+ expanded_filters_: expanded_filters_
15600
15636
  });
15601
15637
  });
15602
15638
  });
@@ -15923,7 +15959,9 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
15923
15959
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15924
15960
  plp_results_: plp_products_,
15925
15961
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15926
- id_type_: id_type_
15962
+ id_type_: id_type_,
15963
+ expanded_filters_: expanded_filters_,
15964
+ filters_open_: category_filters_open_
15927
15965
  });
15928
15966
  get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
15929
15967
  get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
package/ES10/index.d.ts CHANGED
@@ -9,8 +9,9 @@ import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestio
9
9
  import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
+ import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
12
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.6.0";
14
+ export const version = "4.7.0";
14
15
  /**
15
16
  * Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
16
17
  */
@@ -844,7 +845,7 @@ export type OnNavigation = ((options: {
844
845
  /**
845
846
  * Not a router that does our custom routing on non-spas and otherwise plugs into other routers and generalises their functionality
846
847
  */
847
- declare class PseudoRouter {
848
+ export class PseudoRouter {
848
849
  #private;
849
850
  /**
850
851
  * Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
@@ -880,6 +881,28 @@ declare class PseudoRouter {
880
881
  };
881
882
  constructor(on_navigation: OnNavigation, listing_query_state_key?: string);
882
883
  }
884
+ /**
885
+ * The whole card representing a look
886
+ */
887
+ export function LookCard({
888
+ display_,
889
+ expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
890
+ FavoriteButton_,
891
+ placeholderImageAspectRatio_,
892
+ animationDuration_,
893
+ priceFormatting_,
894
+ pseudoRouter_
895
+ }: {
896
+ display_: FeaturedInDisplay | null;
897
+ FavoriteButton_?: (props: {
898
+ display_: Accessor<ModernDisplay | null | undefined>;
899
+ }) => JSX.Element;
900
+ placeholderImageAspectRatio_: number | string;
901
+ animationDuration_: number;
902
+ expandedLooksSignal_: Signal<Set<symbol>>;
903
+ priceFormatting_: Accessor<plp_shared_i18n["price_formatting_"]>;
904
+ pseudoRouter_: PseudoRouter;
905
+ }): HTMLDivElement;
883
906
  /**
884
907
  * Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
885
908
  */
package/ES10/index.js CHANGED
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
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.6.0";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.0";
14
14
  function $8e8b179489080711$export$5bad61ecde080b1f() {
15
15
  const {
16
16
  collapse: collapse,
@@ -5557,7 +5557,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
5557
5557
  return undefined;
5558
5558
  }
5559
5559
  async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
5560
- const body = parent || (await (0, $8tj43$observer).wait_for_element("body"));
5560
+ const body = parent || document.body || (await (0, $8tj43$observer).wait_for_element("body"));
5561
5561
  let dispose_and_remove;
5562
5562
  const open_modal_ = $8tj43$catchify(async function () {
5563
5563
  let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -6378,7 +6378,9 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
6378
6378
  local_filter_cache_: [get_local_filter_cache, set_local_filter_cache],
6379
6379
  selected_filters_: [get_selected_filters, set_selected_filters],
6380
6380
  expanded_hierarchical_filters_: [get_expanded_hierarchical_filters, set_expanded_hierarchical_filters],
6381
- delay_toast_: delay_toast_
6381
+ delay_toast_: delay_toast_,
6382
+ expanded_filters_: expanded_filters_,
6383
+ filters_open_: filters_open_
6382
6384
  } = props;
6383
6385
  const previous_selected_filters = $8tj43$untrack(get_selected_filters);
6384
6386
  if (!previous_selected_filters.length) {
@@ -6387,9 +6389,13 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
6387
6389
  if (delay_toast_) return () => {};
6388
6390
  return;
6389
6391
  }
6392
+ const previousExpandedFilters = $8tj43$untrack(() => expanded_filters_ === null || expanded_filters_ === void 0 ? void 0 : expanded_filters_[0]());
6393
+ const previousFiltersOpen = $8tj43$untrack(() => filters_open_ === null || filters_open_ === void 0 ? void 0 : filters_open_[0]());
6390
6394
  const previous_expanded_hierarchical_filters = $8tj43$untrack(get_expanded_hierarchical_filters);
6391
6395
  const previous_local_filter_cache = $8tj43$untrack(get_local_filter_cache);
6392
6396
  const statement_accessor = user_triggered_ ? i18n_.filters_cleared_ : i18n_.we_cleared_your_filters_;
6397
+ expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1]([]);
6398
+ filters_open_ === null || filters_open_ === void 0 || filters_open_[1](false);
6393
6399
  set_selected_filters([]);
6394
6400
  scrollTo({
6395
6401
  top: 0
@@ -6415,7 +6421,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
6415
6421
  close_toast_: close_toast_
6416
6422
  } = $a61a2051e15c8d7a$export$5196e4c01fa56fcb({
6417
6423
  class: "cleared_filters",
6418
- close_after_: 30000,
6424
+ close_after_: 10000,
6419
6425
  on_close_: on_toast_hidden,
6420
6426
  children: [(() => {
6421
6427
  var _el$ = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$);
@@ -6428,7 +6434,9 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
6428
6434
  $8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => {
6429
6435
  set_selected_filters(previous_selected_filters);
6430
6436
  set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
6437
+ if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
6431
6438
  if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
6439
+ if (typeof previousFiltersOpen === "boolean") filters_open_ === null || filters_open_ === void 0 || filters_open_[1](previousFiltersOpen);
6432
6440
  // also restore previous filter cache, I think this should trigger a correct re-merging with newly in-came filters from backend in case there are any. This is because selected filters otherwise might not exist anymore and therefore can't be viewed in the UI
6433
6441
  set_local_filter_cache(previous_local_filter_cache);
6434
6442
  scrollTo({
@@ -10655,7 +10663,9 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
10655
10663
  current_sorting_: current_sorting_,
10656
10664
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
10657
10665
  i18n_: i18n_,
10658
- local_filter_cache_: local_filter_cache_
10666
+ local_filter_cache_: local_filter_cache_,
10667
+ expanded_filters_: expanded_filters_,
10668
+ filters_open_: filters_open_
10659
10669
  } = _ref;
10660
10670
  const [get_selected_filters] = selected_filters_;
10661
10671
  // Possible values:
@@ -10683,7 +10693,9 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
10683
10693
  also_clear_sorting_: true,
10684
10694
  current_sorting_: current_sorting_,
10685
10695
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
10686
- local_filter_cache_: local_filter_cache_
10696
+ local_filter_cache_: local_filter_cache_,
10697
+ expanded_filters_: expanded_filters_,
10698
+ filters_open_: filters_open_
10687
10699
  });
10688
10700
  }
10689
10701
  }), {
@@ -10751,16 +10763,26 @@ function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
10751
10763
  // Some customers (e.g. equestrian) have `height: 100%` and/or `overflow-x: hidden` on the body, which means that scroll events won't get dispatched on `window`. The pages who get it on <body> won't get it on `window` and vice-versa, so there shouldn't be a worry about duplicate calling of the handler.
10752
10764
  // Use observer in case that this gets called before body exists
10753
10765
  if (!override_element) {
10754
- const disconnect = (0, $8tj43$observer).onexists("body", _ref => {
10755
- let {
10756
- element: element
10757
- } = _ref;
10766
+ const doWithBody = element => {
10758
10767
  element.addEventListener("scroll", catchified_handler, {
10759
10768
  passive: passive
10760
10769
  });
10761
10770
  $8tj43$runWithOwner(owner, () => $8tj43$onCleanup(() => element.removeEventListener("scroll", catchified_handler)));
10762
- });
10763
- $8tj43$onCleanup(disconnect);
10771
+ };
10772
+ const {
10773
+ body: body
10774
+ } = document;
10775
+ if (body)
10776
+ // Only start observer if we absolutely need it, for performance
10777
+ doWithBody(body);else {
10778
+ const disconnect = (0, $8tj43$observer).onexists("body", _ref => {
10779
+ let {
10780
+ element: element
10781
+ } = _ref;
10782
+ return doWithBody(element);
10783
+ });
10784
+ $8tj43$onCleanup(disconnect);
10785
+ }
10764
10786
  }
10765
10787
  for (const event of ["resize", "orientationchange", "scroll"]) {
10766
10788
  const listen_on = override_element !== null && override_element !== void 0 ? override_element : window;
@@ -14347,7 +14369,9 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
14347
14369
  current_sorting_: current_sorting_,
14348
14370
  expanded_hierarchical_filters_: state_.expanded_hierarchical_filters,
14349
14371
  i18n_: i18n_,
14350
- local_filter_cache_: state_.local_filter_cache
14372
+ local_filter_cache_: state_.local_filter_cache,
14373
+ expanded_filters_: state_.expanded_filters,
14374
+ filters_open_: state_.filters_open
14351
14375
  });
14352
14376
  $eb064bc3350276c1$export$dde08b2dca8cc1ce.set(this, {
14353
14377
  search_query_url_param_name_: search_query_url_param_name_,
@@ -15423,7 +15447,9 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
15423
15447
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15424
15448
  plp_results_: plp_results_,
15425
15449
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15426
- id_type_: id_type_
15450
+ id_type_: id_type_,
15451
+ expanded_filters_: expanded_filters_,
15452
+ filters_open_: filters_open_
15427
15453
  } = _ref;
15428
15454
  // If we just got opened in a new tab, clear filters instantly and remove the flag
15429
15455
  $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
@@ -15432,7 +15458,9 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
15432
15458
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15433
15459
  selected_filters_: selected_filters_,
15434
15460
  i18n_: i18n_,
15435
- sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
15461
+ sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15462
+ expanded_filters_: expanded_filters_,
15463
+ filters_open_: filters_open_
15436
15464
  });
15437
15465
  // The code below is for when we're already open and the user navigates to a new category
15438
15466
  let previous_crumb_data = $8tj43$untrack(crumb_data_);
@@ -15468,7 +15496,9 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
15468
15496
  also_clear_sorting_: false,
15469
15497
  selected_filters_: selected_filters_,
15470
15498
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15471
- local_filter_cache_: local_filter_cache_
15499
+ local_filter_cache_: local_filter_cache_,
15500
+ expanded_filters_: expanded_filters_,
15501
+ filters_open_: filters_open_
15472
15502
  });
15473
15503
  // Also ensure we don't have `sideways_url_params_flag` set anymore
15474
15504
  sideways_filter_clearing_flag_[1](false);
@@ -15489,7 +15519,9 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
15489
15519
  i18n_: i18n_,
15490
15520
  selected_filters_: selected_filters_,
15491
15521
  local_filter_cache_: local_filter_cache_,
15492
- sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_]
15522
+ sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_],
15523
+ expanded_filters_: expanded_filters_,
15524
+ filters_open_: filters_open_
15493
15525
  } = _ref3;
15494
15526
  const tracking_function_for_plp_results = $8tj43$createReaction(() => {
15495
15527
  // On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
@@ -15504,7 +15536,9 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
15504
15536
  also_clear_sorting_: false,
15505
15537
  selected_filters_: selected_filters_,
15506
15538
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15507
- local_filter_cache_: local_filter_cache_
15539
+ local_filter_cache_: local_filter_cache_,
15540
+ filters_open_: filters_open_,
15541
+ expanded_filters_: expanded_filters_
15508
15542
  });
15509
15543
  });
15510
15544
  });
@@ -15831,7 +15865,9 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
15831
15865
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15832
15866
  plp_results_: plp_products_,
15833
15867
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15834
- id_type_: id_type_
15868
+ id_type_: id_type_,
15869
+ expanded_filters_: expanded_filters_,
15870
+ filters_open_: category_filters_open_
15835
15871
  });
15836
15872
  get_breadcrumb_accessor_ === null || get_breadcrumb_accessor_ === void 0 || get_breadcrumb_accessor_(crumb_data_);
15837
15873
  get_quicklinks_accessor_ === null || get_quicklinks_accessor_ === void 0 || get_quicklinks_accessor_(quicklinks_data_);
@@ -16089,4 +16125,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
16089
16125
  }, "Entire CategoryPage failed");
16090
16126
  }
16091
16127
  $8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
16092
- export { $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
16128
+ export { $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $697d8713dc82b9ab$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };