@depict-ai/ui 4.3.1 → 4.3.3

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.
@@ -1,13 +1,13 @@
1
- import { add_to_version_info as $i7OB2$add_to_version_info, fetch_retry as $i7OB2$fetch_retry, base_url as $i7OB2$base_url, slider_fractional_factory as $i7OB2$slider_fractional_factory, dlog as $i7OB2$dlog, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, catchify as $i7OB2$catchify, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, slider_fading_factory as $i7OB2$slider_fading_factory, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, observer as $i7OB2$observer, javascript_media_query as $i7OB2$javascript_media_query, queueMacroTask as $i7OB2$queueMacroTask, findMostFrequentItem as $i7OB2$findMostFrequentItem, dwarn as $i7OB2$dwarn, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ContainedImage as $i7OB2$ContainedImage, standard_price_format as $i7OB2$standard_price_format, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, use_href_accessor as $i7OB2$use_href_accessor, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, useExpandingContainer as $i7OB2$useExpandingContainer, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, ListenableSet as $i7OB2$ListenableSet1, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
- import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, escape as $i7OB2$escape, createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, spread as $i7OB2$spread, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
3
- import { createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, createResource as $i7OB2$createResource, Show as $i7OB2$Show, Suspense as $i7OB2$Suspense, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, onCleanup as $i7OB2$onCleanup, For as $i7OB2$For, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, createEffect as $i7OB2$createEffect, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, splitProps as $i7OB2$splitProps, mergeProps as $i7OB2$mergeProps1, on as $i7OB2$on, batch as $i7OB2$batch, createSelector as $i7OB2$createSelector, children as $i7OB2$children, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
1
+ import { add_to_version_info as $i7OB2$add_to_version_info, fetch_retry as $i7OB2$fetch_retry, base_url as $i7OB2$base_url, dwarn as $i7OB2$dwarn, slider_fractional_factory as $i7OB2$slider_fractional_factory, dlog as $i7OB2$dlog, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, catchify as $i7OB2$catchify, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, slider_fading_factory as $i7OB2$slider_fading_factory, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, observer as $i7OB2$observer, javascript_media_query as $i7OB2$javascript_media_query, queueMacroTask as $i7OB2$queueMacroTask, findMostFrequentItem as $i7OB2$findMostFrequentItem, standard_price_format as $i7OB2$standard_price_format, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ContainedImage as $i7OB2$ContainedImage, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, use_href_accessor as $i7OB2$use_href_accessor, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, useExpandingContainer as $i7OB2$useExpandingContainer, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, ListenableSet as $i7OB2$ListenableSet1, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
+ import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, escape as $i7OB2$escape, createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps1, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, spread as $i7OB2$spread, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
3
+ import { createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, createResource as $i7OB2$createResource, createEffect as $i7OB2$createEffect, mergeProps as $i7OB2$mergeProps, Show as $i7OB2$Show, Suspense as $i7OB2$Suspense, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, onCleanup as $i7OB2$onCleanup, For as $i7OB2$For, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, splitProps as $i7OB2$splitProps, on as $i7OB2$on, batch as $i7OB2$batch, createSelector as $i7OB2$createSelector, children as $i7OB2$children, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
4
4
  import { ListenableSet as $i7OB2$ListenableSet, catchify as $i7OB2$catchify1, use_href_accessor as $i7OB2$use_href_accessor1, report as $i7OB2$report1 } from "@depict-ai/utilishared/latest";
5
5
  import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from "solid-js/store";
6
6
 
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.3.1";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.3.3";
11
11
  const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
12
12
  const cols_at_size = [];
13
13
  for (let i = 0; i < sorted_cols_at_size.length; i++) {
@@ -414,7 +414,7 @@ var $c8d5ff4524619fcd$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
414
414
  $c8d5ff4524619fcd$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
415
415
  function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
416
416
  const container_class = "x" + $i7OB2$createUniqueId();
417
- const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps(() => props.element_attributes, {
417
+ const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps1(() => props.element_attributes, {
418
418
  classList: {
419
419
  [container_class]: true
420
420
  }
@@ -606,7 +606,7 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
606
606
  } = slider;
607
607
  const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
608
608
  // Do like this, so we don't have to call mergeProps ourselves
609
- $i7OB2$createComponent(Layout, $i7OB2$mergeProps({
609
+ $i7OB2$createComponent(Layout, $i7OB2$mergeProps1({
610
610
  rows: "all",
611
611
  layout: "slider"
612
612
  }, layout_options_));
@@ -873,7 +873,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
873
873
  });
874
874
  // Work around https://github.com/solidjs/solid/issues/1828
875
875
  const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
876
- const [, otherAttributes] = $i7OB2$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
876
+ const [, otherAttributes] = $i7OB2$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
877
877
  ]);
878
878
 
879
879
  const [hasSetSize, setHasSetSize] = $i7OB2$createSignal(false);
@@ -889,7 +889,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
889
889
  if (loading === "force-lazy") return true;
890
890
  return loading === "lazy" && !isPrioritisedImage();
891
891
  });
892
- const modifiedOtherAttributes = $i7OB2$mergeProps1(otherAttributes, {
892
+ const modifiedOtherAttributes = $i7OB2$mergeProps(otherAttributes, {
893
893
  get loading() {
894
894
  return shouldActuallyEnableLazyLoading() ? "lazy" : undefined;
895
895
  }
@@ -929,13 +929,18 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
929
929
  let hasDecodedFastPath = false;
930
930
  let timeoutSet = false;
931
931
  let gotCleanedUp = false;
932
+ let srcJustChanged = true;
932
933
  img.classList.add("s-responsive-image");
933
934
  if (listingContext) {
934
935
  let prevValue;
935
936
  const aspectRatios = listingContext[$e8ffe11ed01df0fe$export$f8945274f08a3105] ||= new Set();
936
937
  const [, setMostPrevalentAspectRatio] = listingContext[$e8ffe11ed01df0fe$export$6066eb417ed2e9f7] ||= $i7OB2$createSignal();
937
938
  img.addEventListener("load", $i7OB2$catchify(() => {
938
- // Save our aspect ratio whenever it changes, so that we can base the containers on the most dominant aspect ratio, used in SearchModalV2
939
+ if (props.keyRatioUpdating) {
940
+ if (!srcJustChanged) return;
941
+ srcJustChanged = false;
942
+ }
943
+ // Save our aspect ratio whenever it changes, so that we can base the containers on the most dominant aspect ratio, used in SearchModalV2 and LookItem
939
944
  const aspectRatio_ = img.naturalWidth / img.naturalHeight;
940
945
  if (prevValue) aspectRatios.delete(prevValue);
941
946
  const newValue = !isNaN(aspectRatio_) ? {
@@ -953,7 +958,11 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
953
958
  $i7OB2$onCleanup(() => prevValue && aspectRatios.delete(prevValue));
954
959
  }
955
960
  $i7OB2$onCleanup(() => gotCleanedUp = true);
956
- $i7OB2$spread(img, $i7OB2$mergeProps1(modifiedOtherAttributes), false, true);
961
+ $i7OB2$spread(img, $i7OB2$mergeProps(modifiedOtherAttributes), false, true);
962
+ $i7OB2$createRenderEffect(() => {
963
+ props.src;
964
+ srcJustChanged = true;
965
+ });
957
966
  $i7OB2$createEffect(() => {
958
967
  if (!props.size()) return; // wait until we have a size, run every time the size changes
959
968
  if (timeoutSet) return;
@@ -1023,48 +1032,22 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1023
1032
  const [mostPrevalentAspectRatio] = context ?
1024
1033
  // If the context exists we have to create the signal here as getting it here would be too late when it's created by ShopifyResponsiveImg below
1025
1034
  context[(0, $e8ffe11ed01df0fe$export$6066eb417ed2e9f7)] ||= $i7OB2$createSignal() : [];
1026
- const [aspectRatio, setAspectRatio] = $i7OB2$createSignal($i7OB2$untrack(() => props.aspectRatio));
1027
1035
  const container = $f18d425032111270$export$94026ee33dbabc26({
1028
1036
  // Write getters manually instead of using JSX, so we can do more complex logic in the aspectRatio getter without increasing bundle size
1029
1037
  get class() {
1030
1038
  return props.class;
1031
1039
  },
1032
1040
  get aspectRatio() {
1033
- return aspectRatio();
1041
+ if (props.autoAdjustAspectRatio) {
1042
+ const targetRatio = mostPrevalentAspectRatio?.();
1043
+ if (targetRatio != undefined) return `var(${(0, $bb15dfb548a7666e$export$8a2234b5b1a5ebd4)}, ${targetRatio})`;
1044
+ }
1045
+ return props.aspectRatio;
1034
1046
  }
1035
1047
  });
1036
1048
  const owner = $i7OB2$getOwner();
1037
1049
  let createdSizeAccessor = false;
1038
1050
  let wasCleanedUp = false;
1039
- let timeout;
1040
- $i7OB2$createEffect(() => {
1041
- const {
1042
- autoAdjustAspectRatio: autoAdjustAspectRatio
1043
- } = props;
1044
- if (autoAdjustAspectRatio) {
1045
- const targetRatio = mostPrevalentAspectRatio?.();
1046
- if (targetRatio != undefined) {
1047
- const targetValue = `var(${(0, $bb15dfb548a7666e$export$8a2234b5b1a5ebd4)}, ${targetRatio})`;
1048
- const updateAspectRatio = $i7OB2$catchify(() => setAspectRatio(targetValue));
1049
- if (autoAdjustAspectRatio === "smoothed") {
1050
- if (!timeout)
1051
- // If we don't have a timeout yet, also update instantly. This is so that the aspect ratio does get set at the start of a transition, if it changes (when using smoothing).
1052
- updateAspectRatio();
1053
- clearTimeout(timeout);
1054
- timeout = setTimeout(() => {
1055
- timeout = undefined;
1056
- updateAspectRatio();
1057
- }, 500);
1058
- return;
1059
- }
1060
- return updateAspectRatio();
1061
- }
1062
- } else {
1063
- clearTimeout(timeout);
1064
- timeout = undefined;
1065
- }
1066
- setAspectRatio(props.aspectRatio);
1067
- });
1068
1051
  $i7OB2$createEffect(() => {
1069
1052
  if (currentImageSize() || wasCleanedUp) return; // We get into the effect when onCleanup is called if we don't have wasCleanedUp
1070
1053
  // ensure we always have a size accessor
@@ -1078,7 +1061,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1078
1061
  $i7OB2$queueMacroTask(() => setCurrentImageSize()); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
1079
1062
  });
1080
1063
 
1081
- $i7OB2$insert(container, $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $i7OB2$mergeProps({
1064
+ $i7OB2$insert(container, $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $i7OB2$mergeProps1({
1082
1065
  get size() {
1083
1066
  return $i7OB2$createMemo(() => currentImageSize()?.() || 0);
1084
1067
  },
@@ -1093,7 +1076,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1093
1076
  return container;
1094
1077
  }
1095
1078
  function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
1096
- return $i7OB2$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $i7OB2$mergeProps(props, {
1079
+ return $i7OB2$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $i7OB2$mergeProps1(props, {
1097
1080
  get imgProps() {
1098
1081
  return {
1099
1082
  ...props.imgProps,
@@ -1110,16 +1093,24 @@ function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
1110
1093
  }
1111
1094
  }));
1112
1095
  }
1096
+ function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1097
+ return $i7OB2$createMemo(() => {
1098
+ const price_formatting = props.price_formatting_;
1099
+ return $i7OB2$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
1100
+ });
1101
+ }
1113
1102
  var $5a6c386e1bde5665$var$_tmpl$ = ["<div", ' class="img-wrapper">', "</div>"],
1114
1103
  $5a6c386e1bde5665$var$_tmpl$2 = ["<span", ' class="d-price original">', "</span>"],
1115
1104
  $5a6c386e1bde5665$var$_tmpl$3 = ["<div", ' class="right-part"><div class="text-container"><span class="d-title line-clamp">', '</span><span class="', '">', "</span><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"];
1116
1105
  function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1117
1106
  display_: display_,
1118
1107
  FavoriteButton_: FavoriteButton_,
1119
- isExpanded_: isExpanded_,
1108
+ userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
1120
1109
  textFadeInAnimationRunning_: textFadeInAnimationRunning_,
1121
1110
  outerRef_: outerRef_,
1122
- animationDuration_: animationDuration_
1111
+ animationDuration_: animationDuration_,
1112
+ priceFormatting_: priceFormatting_,
1113
+ pseudoRouter_: pseudoRouter_
1123
1114
  }) {
1124
1115
  const variantToUse = $i7OB2$createMemo(() => {
1125
1116
  const display = display_();
@@ -1127,16 +1118,18 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1127
1118
  });
1128
1119
  const imageUrl = $i7OB2$createMemo(() => variantToUse()?.image_urls?.[0]);
1129
1120
  const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
1130
- const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $i7OB2$createSignal($i7OB2$untrack(isExpanded_));
1121
+ const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $i7OB2$createSignal($i7OB2$untrack(userWantsExpanded));
1131
1122
  const [animationEffectExists, setAnimationEffectExists] = $i7OB2$createSignal(false);
1132
1123
  const [salePrice] = $i7OB2$createResource(() => variantToUse()?.sale_price);
1133
1124
  const [originalPrice] = $i7OB2$createResource(() => variantToUse()?.original_price);
1134
- const isOnSale = $i7OB2$createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
1125
+ const isOnSale = $i7OB2$createMemo(() => !salePrice.loading && !originalPrice.loading && salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense after the initial load
1126
+ const enableLink = $i7OB2$createMemo(() => userWantsExpanded() && !animationIsRunning());
1127
+ const href = $i7OB2$createMemo(() => variantToUse()?.page_url);
1135
1128
  const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
1136
- return $i7OB2$ssrElement("a", $i7OB2$mergeProps({
1129
+ return $i7OB2$ssrElement("a", $i7OB2$mergeProps1({
1137
1130
  "class": "look-item"
1138
- }, () => isExpanded_() && !animationIsRunning() ? {
1139
- href: variantToUse()?.page_url
1131
+ }, () => enableLink() ? {
1132
+ href: href()
1140
1133
  } : {}), () => ["<!--$-->", $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1141
1134
  when: imageUrl,
1142
1135
  get fallback() {
@@ -1160,10 +1153,13 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1160
1153
  return imageUrl();
1161
1154
  },
1162
1155
  get aspectRatio() {
1163
- return isExpanded_() ? 0.75 : 1;
1156
+ return userWantsExpanded() ? 0.75 : 1;
1164
1157
  },
1165
1158
  get autoAdjustAspectRatio() {
1166
- return isExpanded_() ? "smoothed" : false;
1159
+ return userWantsExpanded();
1160
+ },
1161
+ imgProps: {
1162
+ keyRatioUpdating: true
1167
1163
  }
1168
1164
  });
1169
1165
  }
@@ -1171,24 +1167,72 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1171
1167
  }
1172
1168
  })), "<!--/-->", "<!--$-->", $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1173
1169
  get when() {
1174
- return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
1170
+ return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
1175
1171
  },
1176
1172
  get children() {
1177
1173
  return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$escape(variantToUse()?.title) ?? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1178
1174
  height: "1em",
1179
1175
  width: "20ch"
1180
- })), `d-price ${isOnSale() ? "sale" : ""}`, !variantToUse() || salePrice.loading ? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1181
- height: "1em",
1182
- width: "20ch"
1183
- })) : $i7OB2$escape(salePrice()), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1176
+ })), `d-price ${isOnSale() ? "sale" : ""}`, $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1184
1177
  get when() {
1185
- return isOnSale();
1178
+ return variantToUse() && !salePrice.loading;
1186
1179
  },
1187
- get children() {
1188
- return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$2, $i7OB2$ssrHydrationKey(), !variantToUse() || originalPrice.loading ? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1180
+ get fallback() {
1181
+ return $i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1189
1182
  height: "1em",
1190
1183
  width: "20ch"
1191
- })) : $i7OB2$escape(originalPrice()));
1184
+ });
1185
+ },
1186
+ get children() {
1187
+ return $i7OB2$createComponent((0, $i7OB2$Show), {
1188
+ get when() {
1189
+ return salePrice.latest;
1190
+ },
1191
+ get children() {
1192
+ return [priceFormatting_().pre_, $i7OB2$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
1193
+ get price_() {
1194
+ return salePrice();
1195
+ },
1196
+ get price_formatting_() {
1197
+ return priceFormatting_();
1198
+ }
1199
+ }), priceFormatting_().post_];
1200
+ }
1201
+ });
1202
+ }
1203
+ })), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1204
+ get when() {
1205
+ return isOnSale();
1206
+ },
1207
+ get children() {
1208
+ return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1209
+ get when() {
1210
+ return variantToUse() && !originalPrice.loading;
1211
+ },
1212
+ get fallback() {
1213
+ return $i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1214
+ height: "1em",
1215
+ width: "20ch"
1216
+ });
1217
+ },
1218
+ get children() {
1219
+ return $i7OB2$createComponent((0, $i7OB2$Show), {
1220
+ get when() {
1221
+ return salePrice.latest;
1222
+ },
1223
+ get children() {
1224
+ return [priceFormatting_().pre_, $i7OB2$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
1225
+ get price_() {
1226
+ return originalPrice();
1227
+ },
1228
+ get price_formatting_() {
1229
+ return priceFormatting_();
1230
+ }
1231
+ }), priceFormatting_().post_];
1232
+ }
1233
+ });
1234
+ }
1235
+ })));
1192
1236
  }
1193
1237
  })), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
1194
1238
  when: FavoriteButton_,
@@ -1255,10 +1299,12 @@ var $7555dcad3b8a4632$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"
1255
1299
  function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1256
1300
  displays_: displays_,
1257
1301
  FavoriteButton_: FavoriteButton_,
1258
- userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
1302
+ userWantsExpandedSignal_: userWantsExpandedSignal_,
1259
1303
  containerWidth_: containerWidth_,
1260
1304
  animationDuration_: animationDuration_,
1261
- supportsHover_: supportsHover_
1305
+ supportsHover_: supportsHover_,
1306
+ priceFormatting_: priceFormatting_,
1307
+ pseudoRouter_: pseudoRouter_
1262
1308
  }) {
1263
1309
  let isAffectedByChromeBug = false;
1264
1310
  // If the user requests the drawer to be expanded or not
@@ -1267,6 +1313,7 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1267
1313
  // The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
1268
1314
  const textFadeInAnimationRunning = $i7OB2$createSignal(false);
1269
1315
  const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
1316
+ const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
1270
1317
  $62a8f670f8464532$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
1271
1318
  return $i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
1272
1319
  get children() {
@@ -1275,7 +1322,7 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1275
1322
  return containerWidth_() || !displays_;
1276
1323
  },
1277
1324
  get children() {
1278
- return $i7OB2$ssr($7555dcad3b8a4632$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrElement("div", $i7OB2$mergeProps({
1325
+ return $i7OB2$ssr($7555dcad3b8a4632$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrElement("div", $i7OB2$mergeProps1({
1279
1326
  get ["class"]() {
1280
1327
  return `look-overlay ${userWantsExpanded() ? "expanded" : ""} ${!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""}`;
1281
1328
  }
@@ -1289,11 +1336,13 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1289
1336
  },
1290
1337
  children: (display, index) => {
1291
1338
  return $i7OB2$createComponent((0, $5a6c386e1bde5665$export$b73ed90f0ee50dc3), {
1339
+ pseudoRouter_: pseudoRouter_,
1292
1340
  animationDuration_: animationDuration_,
1293
1341
  display_: display,
1294
1342
  FavoriteButton_: FavoriteButton_,
1295
- isExpanded_: userWantsExpanded,
1343
+ userWantsExpandedSignal_: userWantsExpandedSignal_,
1296
1344
  textFadeInAnimationRunning_: textFadeInAnimationRunning,
1345
+ priceFormatting_: priceFormatting_,
1297
1346
  outerRef_: el => $i7OB2$createEffect(() => {
1298
1347
  if (index !== 0) return;
1299
1348
  const resizeObserver = new ResizeObserver($i7OB2$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
@@ -1334,10 +1383,10 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1334
1383
  expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
1335
1384
  FavoriteButton_: FavoriteButton_,
1336
1385
  placeholderImageAspectRatio_: placeholderImageAspectRatio_,
1337
- animationDuration_: animationDuration_
1386
+ animationDuration_: animationDuration_,
1387
+ priceFormatting_: priceFormatting_,
1388
+ pseudoRouter_: pseudoRouter_
1338
1389
  }) {
1339
- // TODO: shopify, run displayTransformers to get dynamic prices
1340
- // TODO: format prices
1341
1390
  const [coverImage] = display_?.image_urls || [];
1342
1391
  const useWantsExpandedSignal_ = $i7OB2$createSignal(false);
1343
1392
  const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
@@ -1369,7 +1418,7 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1369
1418
  when: display_,
1370
1419
  get fallback() {
1371
1420
  return $i7OB2$createComponent((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
1372
- aspectRatio: placeholderImageAspectRatio_
1421
+ aspectRatio: `var(${(0, $bb15dfb548a7666e$export$8a2234b5b1a5ebd4)}, ${placeholderImageAspectRatio_})`
1373
1422
  });
1374
1423
  },
1375
1424
  get children() {
@@ -1387,10 +1436,124 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1387
1436
  containerWidth_: containerWidth_,
1388
1437
  animationDuration_: animationDuration_,
1389
1438
  supportsHover_: supportsHover_,
1390
- FavoriteButton_: FavoriteButton_
1439
+ FavoriteButton_: FavoriteButton_,
1440
+ priceFormatting_: priceFormatting_,
1441
+ pseudoRouter_: pseudoRouter_
1391
1442
  })]);
1392
1443
  return container;
1393
1444
  }
1445
+
1446
+ /**
1447
+ * This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
1448
+ * @param clickEvent The click event that triggered the navigation
1449
+ */
1450
+ function $a281666e5c15c2ec$export$29d28dadc2d6b631(clickEvent) {
1451
+ return clickEvent?.button ||
1452
+ // if not zero it's a wheel click which opens in new tab
1453
+ clickEvent?.metaKey ||
1454
+ // if true, cmd button on macOS which opens in new tab
1455
+ clickEvent?.ctrlKey ||
1456
+ // if true, ctrl button on windows or linux which opens in new tab
1457
+ clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
1458
+ ;
1459
+ }
1460
+
1461
+ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
1462
+ /**
1463
+ * Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
1464
+ */ /**
1465
+ * We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
1466
+ */
1467
+ #throwing_on_navigation(...args) {
1468
+ const {
1469
+ on_navigation_: on_navigation_
1470
+ } = this;
1471
+ if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
1472
+ // make sure that we don't accidentally catchify if the SDK consumer has fucked up
1473
+ try {
1474
+ return on_navigation_(...args);
1475
+ } catch (e) {
1476
+ queueMicrotask(() => {
1477
+ throw e;
1478
+ });
1479
+ }
1480
+ }
1481
+ /**
1482
+ * Vue has async router that needs to be awaited (it navigates after a microtask)
1483
+ * This standardises waiting for all kinds of routers
1484
+ */
1485
+ #get_navigation_happened_promise(is_replace) {
1486
+ return new Promise(resolve => {
1487
+ const handler = what_happened => {
1488
+ if (what_happened === (is_replace ? "replaceState" : "pushState")) {
1489
+ resolve();
1490
+ (0, $i7OB2$instant_exec_on_suspect_history_change).delete(handler);
1491
+ }
1492
+ };
1493
+ (0, $i7OB2$instant_exec_on_suspect_history_change).add(handler);
1494
+ });
1495
+ }
1496
+ navigate_ = {
1497
+ /**
1498
+ * Call this if you *just* want to replace the state object in history.state
1499
+ */
1500
+ replace_state_: new_state => {
1501
+ // This doesn't break any router, so we just do this directly for now, since many don't expose an interface for changing the state
1502
+ globalThis?.history?.replaceState(new_state, "");
1503
+ },
1504
+ /**
1505
+ * Call this to change the URL
1506
+ * @param new_url_ new URL to go to
1507
+ * @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
1508
+ * @param force_spa_navigation_ if you want to force SPA navigation even if on_navigation_ is set to "hard_navigation". You should only set this to true for inter-SDK-page navigations
1509
+ * @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
1510
+ * @param listing_id_ If you are navigating to a category and know the listing_id of, please provide it. This is for making a better devEx in js-ui
1511
+ */
1512
+ go_to_: $i7OB2$catchify(async ({
1513
+ new_url_: raw_new_url,
1514
+ event_: event_,
1515
+ force_spa_navigation_: force_spa_navigation_,
1516
+ is_replace_: is_replace_,
1517
+ listing_query_: listing_query_,
1518
+ scroll = true
1519
+ }) => {
1520
+ const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
1521
+ const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
1522
+ if ($a281666e5c15c2ec$export$29d28dadc2d6b631(event_)) return;
1523
+ const different_origin = new_url_.origin !== location.origin;
1524
+ if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
1525
+ if (force_spa_navigation_ && different_origin)
1526
+ // If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
1527
+ $i7OB2$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
1528
+ if (!event_)
1529
+ // If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
1530
+ location.assign(new_url_);
1531
+ return;
1532
+ }
1533
+ event_?.preventDefault();
1534
+ const promise = this.#get_navigation_happened_promise(true);
1535
+ if (force_spa_navigation_ && wants_hard_navigation) {
1536
+ // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
1537
+ const new_state = history.state;
1538
+ if (listing_query_) {
1539
+ // In JS-UI we need to know the listing_id of the current category, therefore push it into state
1540
+ if (!this.listing_query_state_key) $i7OB2$report(new Error("listing_query_state_key is not set"), "error");
1541
+ new_state[this.listing_query_state_key] = listing_query_;
1542
+ }
1543
+ history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
1544
+ } else this.#throwing_on_navigation.call(this, {
1545
+ is_replace: is_replace_,
1546
+ new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
1547
+ scroll: scroll
1548
+ });
1549
+ await promise;
1550
+ })
1551
+ };
1552
+ constructor(on_navigation, listing_query_state_key) {
1553
+ this.listing_query_state_key = listing_query_state_key;
1554
+ this.on_navigation_ = on_navigation;
1555
+ }
1556
+ }
1394
1557
  var $f577edfe2240eec1$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
1395
1558
  let $f577edfe2240eec1$var$expandedLooksSignal_;
1396
1559
  function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
@@ -1399,6 +1562,7 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
1399
1562
  equals: false
1400
1563
  });
1401
1564
  const expandingAnimationDuration = 240;
1565
+ const pseudoRouter = new (0, $4fd2ba03703a7d92$export$7e1297a3a19f10d8)("hard_navigation");
1402
1566
  const grid_spacing_override = $i7OB2$createMemo(() => {
1403
1567
  const {
1404
1568
  gridSpacing_: gridSpacing_
@@ -1424,19 +1588,35 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
1424
1588
  });
1425
1589
  const decoded = await response?.json?.().catch(() => false);
1426
1590
  if (!decoded)
1427
- // If network fails, make sure to return empty array adn SolidRecommendationSlider will remove its elements
1591
+ // If network fails, make sure to return empty array and SolidRecommendationSlider will remove its elements
1428
1592
  return [];
1429
- return decoded.listings;
1593
+ const {
1594
+ listings: listings
1595
+ } = decoded;
1596
+ const baseData = {
1597
+ merchant: merchant,
1598
+ market: market,
1599
+ locale: locale
1600
+ };
1601
+ return $f577edfe2240eec1$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
1602
+ });
1603
+ $i7OB2$createEffect(() => {
1604
+ const {
1605
+ onNavigation_: onNavigation_
1606
+ } = props;
1607
+ if (onNavigation_) pseudoRouter.on_navigation_ = onNavigation_;
1430
1608
  });
1431
1609
  return $i7OB2$ssr($f577edfe2240eec1$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrStyle(`--animation-duration: ${expandingAnimationDuration}ms`), $i7OB2$escape($i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
1432
1610
  get children() {
1433
1611
  return $c4492d24952ed731$export$d41d19e89346fa2({
1434
- product_card_template_: (display, info) => $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1612
+ product_card_template_: display => $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1435
1613
  display_: display,
1436
1614
  FavoriteButton_: props.FavoriteButton_,
1437
1615
  placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
1438
1616
  animationDuration_: expandingAnimationDuration,
1439
- expandedLooksSignal_: $f577edfe2240eec1$var$expandedLooksSignal_
1617
+ expandedLooksSignal_: $f577edfe2240eec1$var$expandedLooksSignal_,
1618
+ priceFormatting_: () => props.priceFormatting_,
1619
+ pseudoRouter_: pseudoRouter
1440
1620
  }),
1441
1621
  recommendations_resource_: looksResource,
1442
1622
  title_: () => props.title_,
@@ -1449,6 +1629,53 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
1449
1629
  })));
1450
1630
  }, "LookSlider failed");
1451
1631
  }
1632
+ async function $f577edfe2240eec1$var$runDisplayTransformersForLooks(baseData, listings, displayTransformers) {
1633
+ try {
1634
+ const {
1635
+ products: productTransformer,
1636
+ categories: providedListingTransformer
1637
+ } = displayTransformers || {};
1638
+ if (!productTransformer && !providedListingTransformer) return listings;
1639
+ const listingTransformer = providedListingTransformer || (({
1640
+ data: data
1641
+ }) => data);
1642
+ const displaysToTransform = [];
1643
+ const displayIdsPerListingId = {};
1644
+ const transformedListingsPromise = listingTransformer({
1645
+ ...baseData,
1646
+ data: listings.map(({
1647
+ displays: displays,
1648
+ ...listing
1649
+ }) => {
1650
+ // Populate our displays by id and displayIdToListings object in the .map where we add ancestors to the listings, for peak efficiency
1651
+ for (let i = 0; i < displays.length; i++) {
1652
+ const display = displays[i];
1653
+ const uniqueIdOfDisplay = $16351e4c87b90b3d$export$548d053aba053d79(display);
1654
+ displaysToTransform.push(display);
1655
+ (displayIdsPerListingId[listing.listing_id] ||= []).push(uniqueIdOfDisplay);
1656
+ }
1657
+ return {
1658
+ ...listing,
1659
+ ancestors: []
1660
+ };
1661
+ })
1662
+ });
1663
+ // This allows the person providing the displayTransformer to re-order and remove displays
1664
+ const transformedProducts = productTransformer ? await productTransformer({
1665
+ ...baseData,
1666
+ displays: displaysToTransform
1667
+ }) : displaysToTransform;
1668
+ const transformedListings = await transformedListingsPromise;
1669
+ const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$16351e4c87b90b3d$export$548d053aba053d79(display), display]));
1670
+ return transformedListings.map(listing => $i7OB2$mergeProps(listing, {
1671
+ // use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
1672
+ displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
1673
+ }));
1674
+ } catch (e) {
1675
+ $i7OB2$dwarn("Displaytransformers threw", e);
1676
+ return [];
1677
+ }
1678
+ }
1452
1679
  const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
1453
1680
  let $90980bd87c9960f9$var$has_ran = false;
1454
1681
  function $90980bd87c9960f9$export$5162a71f252e6122() {
@@ -1489,21 +1716,6 @@ function $90980bd87c9960f9$var$starts_with_any_prefix(key) {
1489
1716
  }
1490
1717
  }
1491
1718
 
1492
- /**
1493
- * This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
1494
- * @param clickEvent The click event that triggered the navigation
1495
- */
1496
- function $a281666e5c15c2ec$export$29d28dadc2d6b631(clickEvent) {
1497
- return clickEvent?.button ||
1498
- // if not zero it's a wheel click which opens in new tab
1499
- clickEvent?.metaKey ||
1500
- // if true, cmd button on macOS which opens in new tab
1501
- clickEvent?.ctrlKey ||
1502
- // if true, ctrl button on windows or linux which opens in new tab
1503
- clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
1504
- ;
1505
- }
1506
-
1507
1719
  /**
1508
1720
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
1509
1721
  */
@@ -1543,12 +1755,6 @@ function $d8dbf52fea1773e2$export$f50b88e2a00918b5(fn) {
1543
1755
  }
1544
1756
  };
1545
1757
  }
1546
- function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1547
- return $i7OB2$createMemo(() => {
1548
- const price_formatting = props.price_formatting_;
1549
- return $i7OB2$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
1550
- });
1551
- }
1552
1758
  function $f4125ce4984deee6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
1553
1759
  const isSelected = $i7OB2$createMemo(() => {
1554
1760
  const selectedValue = selectedIndex();
@@ -1855,7 +2061,7 @@ function $694b7f90501fea4c$export$5d2caaa6b530761c() {
1855
2061
  }
1856
2062
  var $19976a74d273070d$var$_tmpl$ = '<path d="M11.669 10.531l9.156-9.156a.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569A.8.8 0 0 0 20.24 0a.77.77 0 0 0-.569.237l-9.14 9.14-9.14-9.14A.79.79 0 0 0 .807 0a.77.77 0 0 0-.569.237A.78.78 0 0 0 0 .807a.77.77 0 0 0 .237.569l9.156 9.156-9.156 9.14c-.159.157-.237.349-.237.569s.079.412.237.569c.085.085.174.148.268.19a1.095 1.095 0 0 0 .316.048.894.894 0 0 0 .285-.048.84.84 0 0 0 .285-.19l9.139-9.14 9.14 9.14a.894.894 0 0 0 .268.19 1.049 1.049 0 0 0 .301.048.941.941 0 0 0 .301-.048.84.84 0 0 0 .285-.19.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569z"></path>';
1857
2063
  function $19976a74d273070d$export$3b621d86b1566b2(props = {}) {
1858
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
2064
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
1859
2065
  xmlns: "http://www.w3.org/2000/svg",
1860
2066
  width: "21.064",
1861
2067
  height: "21.064",
@@ -1955,7 +2161,7 @@ function $f3213c0640246d58$export$ba17c5b7e6dda39f({
1955
2161
  }
1956
2162
  var $16f0ed5ea30d8d9c$var$_tmpl$ = '<path d="M19.811 20.174l-6.234-6.809a7.96 7.96 0 0 0 .923-1.179c.274-.424.502-.865.687-1.323a8.04 8.04 0 0 0 .42-1.436 7.88 7.88 0 0 0 .144-1.507c0-.526-.051-1.042-.154-1.548-.096-.506-.243-.995-.441-1.466s-.441-.919-.728-1.343a8.28 8.28 0 0 0-.984-1.21 7.86 7.86 0 0 0-1.2-.984A7.56 7.56 0 0 0 10.89.651C10.418.453 9.929.302 9.423.2S8.401.046 7.875.046 6.833.097 6.327.2 5.332.453 4.86.651a7.56 7.56 0 0 0-1.354.718c-.431.287-.831.615-1.2.984a8.28 8.28 0 0 0-.984 1.21 7.73 7.73 0 0 0-.728 1.343c-.198.472-.349.96-.451 1.466A8.31 8.31 0 0 0 0 7.921a8.31 8.31 0 0 0 .144 1.548c.103.506.253.995.451 1.466a8.08 8.08 0 0 0 .728 1.354 7.86 7.86 0 0 0 .984 1.2 7.54 7.54 0 0 0 1.2.995c.431.287.882.53 1.354.728.472.191.96.338 1.466.441a8.31 8.31 0 0 0 1.548.144c.451 0 .896-.038 1.333-.113a7.83 7.83 0 0 0 1.282-.328 7.55 7.55 0 0 0 1.2-.533 8.08 8.08 0 0 0 1.107-.749l6.245 6.809a.45.45 0 0 0 .174.123.55.55 0 0 0 .205.041.61.61 0 0 0 .195-.031c.061-.021.116-.055.164-.102.109-.096.164-.219.164-.369.007-.144-.038-.267-.133-.369zM1.046 7.921c0-.937.178-1.818.533-2.646.362-.834.851-1.559 1.466-2.174.622-.615 1.347-1.101 2.174-1.456.827-.362 1.712-.543 2.656-.543s1.829.181 2.656.543c.827.355 1.548.841 2.164 1.456.622.615 1.111 1.34 1.466 2.174a6.52 6.52 0 0 1 .543 2.646c0 .943-.181 1.829-.543 2.656a6.89 6.89 0 0 1-1.466 2.174c-.615.615-1.336 1.104-2.164 1.466-.827.356-1.712.533-2.656.533s-1.829-.178-2.656-.533c-.827-.362-1.552-.851-2.174-1.466-.615-.622-1.104-1.347-1.466-2.174-.355-.827-.533-1.712-.533-2.656z"></path>';
1957
2163
  function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
1958
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
2164
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
1959
2165
  xmlns: "http://www.w3.org/2000/svg",
1960
2166
  width: "20",
1961
2167
  height: "22",
@@ -1964,7 +2170,7 @@ function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
1964
2170
  }
1965
2171
  var $190927650b4840eb$var$_tmpl$ = '<path d="M56 26.455a13.71 13.71 0 0 0-9.578 3.967A13.71 13.71 0 0 0 42.455 40v176a13.71 13.71 0 0 0 3.967 9.578A13.71 13.71 0 0 0 56 229.545h144A13.71 13.71 0 0 0 213.545 216V88a2.456 2.456 0 0 1 0-.002c.001-1.452-.597-2.895-1.623-3.922l-55.998-55.998a5.61 5.61 0 0 0-3.922-1.623 2.456 2.456 0 0 1-.002 0zm0 11.09h88A2.456 2.456 0 0 1 146.455 40v48c0 2.903 2.642 5.545 5.545 5.545h48A2.456 2.456 0 0 1 202.455 96v120a2.456 2.456 0 0 1-2.455 2.455H56A2.456 2.456 0 0 1 53.545 216V40A2.456 2.456 0 0 1 56 37.545zm103.061 11.498a2.456 2.456 0 0 1 2.676.531l28.689 28.689a2.456 2.456 0 0 1-1.736 4.191H160A2.456 2.456 0 0 1 157.545 80V51.311a2.456 2.456 0 0 1 1.516-2.268zM96 130.455c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545zm0 32c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545z"></path>';
1966
2172
  function $190927650b4840eb$export$605674723bcc715c(props = {}) {
1967
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
2173
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
1968
2174
  xmlns: "http://www.w3.org/2000/svg",
1969
2175
  width: "32",
1970
2176
  height: "32",
@@ -2519,7 +2725,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
2519
2725
  get children() {
2520
2726
  return $i7OB2$ssr($5285d2814d0fac0c$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.back_(), true), false), $i7OB2$escape($i7OB2$createComponent(BackIcon_, {})));
2521
2727
  }
2522
- })), `query ${!!on_back_ ? "has-adjacent-back-button" : ""}`, $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.search_field_field_aria_label_(), true), false) + $i7OB2$ssrAttribute("value", $i7OB2$escape(search_field_value_[0](), true), false) + $i7OB2$ssrAttribute("placeholder", $i7OB2$escape(i18n_.placeholder_text_(), true), false), $i7OB2$ssrAttribute("title", $i7OB2$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $i7OB2$ssrStyle($i7OB2$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $i7OB2$escape($i7OB2$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {})), $i7OB2$ssrElement("button", $i7OB2$mergeProps({
2728
+ })), `query ${!!on_back_ ? "has-adjacent-back-button" : ""}`, $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.search_field_field_aria_label_(), true), false) + $i7OB2$ssrAttribute("value", $i7OB2$escape(search_field_value_[0](), true), false) + $i7OB2$ssrAttribute("placeholder", $i7OB2$escape(i18n_.placeholder_text_(), true), false), $i7OB2$ssrAttribute("title", $i7OB2$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $i7OB2$ssrStyle($i7OB2$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $i7OB2$escape($i7OB2$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {})), $i7OB2$ssrElement("button", $i7OB2$mergeProps1({
2523
2729
  "class": "submit major",
2524
2730
  type: "button"
2525
2731
  }, () => isNewModal ? {
@@ -3038,7 +3244,7 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
3038
3244
  selected_index_: [read_selected_index_, write_selected_index_]
3039
3245
  }) {
3040
3246
  const href = $i7OB2$createMemo(() => listing_()?.page_url); // <- could be made reactive getter created in displayTransformers, read it in memo here since it might create computations (for example in the preview-brower), and there's no owner in the onClick handler
3041
- const LinkToListing = props => $i7OB2$ssrElement("a", $i7OB2$mergeProps(props, {
3247
+ const LinkToListing = props => $i7OB2$ssrElement("a", $i7OB2$mergeProps1(props, {
3042
3248
  get href() {
3043
3249
  return href();
3044
3250
  }
@@ -3328,7 +3534,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
3328
3534
  $i7OB2$createComputed($i7OB2$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
3329
3535
  defer: true
3330
3536
  })); // reset autocomplete position if query changes
3331
- return [$i7OB2$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $i7OB2$mergeProps(sharedSuggestionProps, {
3537
+ return [$i7OB2$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $i7OB2$mergeProps1(sharedSuggestionProps, {
3332
3538
  get title_() {
3333
3539
  return i18n_.popular_;
3334
3540
  },
@@ -3338,7 +3544,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
3338
3544
  return itemIndexes_.suggestionsIndex_;
3339
3545
  },
3340
3546
  showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
3341
- })), $i7OB2$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $i7OB2$mergeProps(sharedSuggestionProps, {
3547
+ })), $i7OB2$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $i7OB2$mergeProps1(sharedSuggestionProps, {
3342
3548
  get title_() {
3343
3549
  return i18n_.previous_;
3344
3550
  },
@@ -3349,7 +3555,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
3349
3555
  },
3350
3556
  extraTitleRowElements_: () => $i7OB2$ssr($2f3171b02c8f4a5d$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.clear_all_from_filter_crumbs_())),
3351
3557
  showPlaceholders_: () => false
3352
- })), $i7OB2$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $i7OB2$mergeProps(sharedSuggestionProps, {
3558
+ })), $i7OB2$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $i7OB2$mergeProps1(sharedSuggestionProps, {
3353
3559
  get title_() {
3354
3560
  return i18n_.content_;
3355
3561
  },
@@ -3750,7 +3956,7 @@ function $024fbc0a2d796fad$export$b2539bed5023c21c(props) {
3750
3956
  return $i7OB2$createComponent($024fbc0a2d796fad$var$TabsContext.Provider, {
3751
3957
  value: new (0, $i7OB2$ListenableSet)(),
3752
3958
  get children() {
3753
- return $i7OB2$createComponent($024fbc0a2d796fad$var$ActualTabs, $i7OB2$mergeProps(props, {
3959
+ return $i7OB2$createComponent($024fbc0a2d796fad$var$ActualTabs, $i7OB2$mergeProps1(props, {
3754
3960
  get children() {
3755
3961
  return props.children;
3756
3962
  }
@@ -3780,7 +3986,7 @@ function $024fbc0a2d796fad$var$ActualTabs(props) {
3780
3986
  },
3781
3987
  children: item => {
3782
3988
  const weSelected = $i7OB2$createMemo(() => isSelected(item().id));
3783
- return $i7OB2$createComponent((0, $i7OB2$Dynamic), $i7OB2$mergeProps({
3989
+ return $i7OB2$createComponent((0, $i7OB2$Dynamic), $i7OB2$mergeProps1({
3784
3990
  get component() {
3785
3991
  return props.AnchorComponent;
3786
3992
  },
@@ -3859,7 +4065,7 @@ function $024fbc0a2d796fad$export$3e41faf802a29e71(props) {
3859
4065
  if (!currentTabs) throw new Error("Tab must be a child of Tabs");
3860
4066
  const id = $i7OB2$createUniqueId();
3861
4067
  const ourSet = currentTabs;
3862
- const extendedProps = $i7OB2$mergeProps1({
4068
+ const extendedProps = $i7OB2$mergeProps({
3863
4069
  id: id
3864
4070
  }, props);
3865
4071
  ourSet.add(extendedProps);
@@ -3973,102 +4179,6 @@ function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
3973
4179
  }
3974
4180
  });
3975
4181
  }
3976
- class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
3977
- /**
3978
- * Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
3979
- */ /**
3980
- * We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
3981
- */
3982
- #throwing_on_navigation(...args) {
3983
- const {
3984
- on_navigation_: on_navigation_
3985
- } = this;
3986
- if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
3987
- // make sure that we don't accidentally catchify if the SDK consumer has fucked up
3988
- try {
3989
- return on_navigation_(...args);
3990
- } catch (e) {
3991
- queueMicrotask(() => {
3992
- throw e;
3993
- });
3994
- }
3995
- }
3996
- /**
3997
- * Vue has async router that needs to be awaited (it navigates after a microtask)
3998
- * This standardises waiting for all kinds of routers
3999
- */
4000
- #get_navigation_happened_promise(is_replace) {
4001
- return new Promise(resolve => {
4002
- const handler = what_happened => {
4003
- if (what_happened === (is_replace ? "replaceState" : "pushState")) {
4004
- resolve();
4005
- (0, $i7OB2$instant_exec_on_suspect_history_change).delete(handler);
4006
- }
4007
- };
4008
- (0, $i7OB2$instant_exec_on_suspect_history_change).add(handler);
4009
- });
4010
- }
4011
- navigate_ = {
4012
- /**
4013
- * Call this if you *just* want to replace the state object in history.state
4014
- */
4015
- replace_state_: new_state => {
4016
- // This doesn't break any router, so we just do this directly for now, since many don't expose an interface for changing the state
4017
- globalThis?.history?.replaceState(new_state, "");
4018
- },
4019
- /**
4020
- * Call this to change the URL
4021
- * @param new_url_ new URL to go to
4022
- * @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
4023
- * @param force_spa_navigation_ if you want to force SPA navigation even if on_navigation_ is set to "hard_navigation". You should only set this to true for inter-SDK-page navigations
4024
- * @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
4025
- * @param listing_id_ If you are navigating to a category and know the listing_id of, please provide it. This is for making a better devEx in js-ui
4026
- */
4027
- go_to_: $i7OB2$catchify(async ({
4028
- new_url_: raw_new_url,
4029
- event_: event_,
4030
- force_spa_navigation_: force_spa_navigation_,
4031
- is_replace_: is_replace_,
4032
- listing_query_: listing_query_,
4033
- scroll = true
4034
- }) => {
4035
- const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
4036
- const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
4037
- if ($a281666e5c15c2ec$export$29d28dadc2d6b631(event_)) return;
4038
- const different_origin = new_url_.origin !== location.origin;
4039
- if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
4040
- if (force_spa_navigation_ && different_origin)
4041
- // If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
4042
- $i7OB2$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
4043
- if (!event_)
4044
- // If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
4045
- location.assign(new_url_);
4046
- return;
4047
- }
4048
- event_?.preventDefault();
4049
- const promise = this.#get_navigation_happened_promise(true);
4050
- if (force_spa_navigation_ && wants_hard_navigation) {
4051
- // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
4052
- const new_state = history.state;
4053
- if (listing_query_) {
4054
- // In JS-UI we need to know the listing_id of the current category, therefore push it into state
4055
- if (!this.listing_query_state_key) $i7OB2$report(new Error("listing_query_state_key is not set"), "error");
4056
- new_state[this.listing_query_state_key] = listing_query_;
4057
- }
4058
- history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
4059
- } else this.#throwing_on_navigation.call(this, {
4060
- is_replace: is_replace_,
4061
- new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
4062
- scroll: scroll
4063
- });
4064
- await promise;
4065
- })
4066
- };
4067
- constructor(on_navigation, listing_query_state_key) {
4068
- this.listing_query_state_key = listing_query_state_key;
4069
- this.on_navigation_ = on_navigation;
4070
- }
4071
- }
4072
4182
  var $2a26c8ff1ef1fe75$var$_tmpl$ = ["<div", ' class="image-container">', "</div>"];
4073
4183
  function $2a26c8ff1ef1fe75$export$41e1a079d40a0d58(props) {
4074
4184
  const [display] = $i7OB2$createResource(() => ({
@@ -4162,7 +4272,7 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
4162
4272
  get children() {
4163
4273
  return $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(title()));
4164
4274
  }
4165
- }), $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
4275
+ }), $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
4166
4276
  get rows() {
4167
4277
  return rows_object_();
4168
4278
  },
@@ -4446,7 +4556,7 @@ function $8560c919ff763930$var$ActualShopTheLookButton(props) {
4446
4556
  const button = $i7OB2$ssrElement("button", localProps.buttonAttributes, () => $i7OB2$escape(localProps?.buttonAttributes?.children) || "Shop the look", true);
4447
4557
  $i7OB2$createEffect(() => button.style.display = displayStyleValue()); // Set our attributes like this, so we allow total control over the button from the outside via buttonAttributes
4448
4558
  $i7OB2$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
4449
- $8560c919ff763930$var$modalProps = $i7OB2$mergeProps1(partForModal, {
4559
+ $8560c919ff763930$var$modalProps = $i7OB2$mergeProps(partForModal, {
4450
4560
  products_to_shop_: products_to_shop_
4451
4561
  });
4452
4562
  button.addEventListener("click", openModal);
@@ -4862,7 +4972,7 @@ const $49b79728e7d9e2a1$export$48513f6b9f8ce62d = props => {
4862
4972
  };
4863
4973
  var $f8a56ba74eedd0c6$var$_tmpl$ = '<path d="M10.173 5.548H5.5V.875c0-.075-.027-.14-.081-.193S5.301.601 5.226.601s-.14.027-.193.081-.081.118-.081.193v4.673H.274c-.075 0-.14.027-.193.081A.27.27 0 0 0 0 5.827c0 .075.027.14.081.193s.118.081.193.081h4.678v4.673c0 .075.027.14.081.193s.118.081.193.081.14-.027.193-.081.081-.118.081-.193V6.101h4.673a.27.27 0 0 0 .199-.081c.054-.054.08-.118.08-.193a.27.27 0 0 0-.279-.279z" fill="#000"></path>';
4864
4974
  function $f8a56ba74eedd0c6$export$f21ab0717a89c77f(props) {
4865
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
4975
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
4866
4976
  xmlns: "http://www.w3.org/2000/svg",
4867
4977
  width: "11",
4868
4978
  height: "12"
@@ -6033,7 +6143,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
6033
6143
  const MakeButton = attributes => {
6034
6144
  const label = $i7OB2$createMemo(() => value().name_ || value().value_ + "");
6035
6145
  const count_zero = $i7OB2$createMemo(() => value().count_ === 0);
6036
- return $i7OB2$ssrElement("button", $i7OB2$mergeProps(attributes, {
6146
+ return $i7OB2$ssrElement("button", $i7OB2$mergeProps1(attributes, {
6037
6147
  get disabled() {
6038
6148
  return count_zero() && !is_selected();
6039
6149
  },
@@ -6333,7 +6443,7 @@ var $12497d09ef87296e$export$2e2bcd8739ae039 = {
6333
6443
  };
6334
6444
  var $9bc34983fc5f7bdb$var$_tmpl$ = '<path d="M4.617 12.738a.48.48 0 0 1-.164-.027c-.051-.023-.094-.055-.129-.098L.125 8.414A.39.39 0 0 1 0 8.117c0-.113.039-.211.125-.293s.18-.125.293-.125.215.043.297.125l3.902 3.902L16.086.262c.082-.082.18-.125.297-.125s.211.043.293.125.125.184.125.301-.043.215-.125.297L4.914 12.613c-.039.043-.086.078-.141.098s-.102.027-.156.027zm0 0"></path>';
6335
6445
  function $9bc34983fc5f7bdb$export$f2ca6fc699ca1fb4(props = {}) {
6336
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
6446
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
6337
6447
  xmlns: "http://www.w3.org/2000/svg",
6338
6448
  width: "16.8",
6339
6449
  height: "14"
@@ -7256,7 +7366,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
7256
7366
  // Filter out our transformed ancestors
7257
7367
  const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
7258
7368
  // Add the now transformed ancestors into the ancestors of the listing suggestions
7259
- const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $i7OB2$mergeProps1(item, {
7369
+ const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $i7OB2$mergeProps(item, {
7260
7370
  // Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
7261
7371
  ancestors: item.ancestors.map(ancestor => {
7262
7372
  const newAncestor = transformedAncestors[ancestor.listing_id];
@@ -7787,7 +7897,7 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
7787
7897
  return (0, $7747fe1a8c5652e3$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...possible_num_columns);
7788
7898
  });
7789
7899
  // Don't tear down elements every time one updates the page - don't put them within <Show>
7790
- const elements = $i7OB2$ssr($172e1b898d457050$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.search_recs_title_()), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
7900
+ const elements = $i7OB2$ssr($172e1b898d457050$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.search_recs_title_()), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
7791
7901
  rows: rows_object,
7792
7902
  layout: "grid",
7793
7903
  element_attributes: {
@@ -8607,7 +8717,7 @@ var $6dee9211e57ac31a$var$_tmpl$ = ["<style", ' type="text/css">', "</style>"];
8607
8717
  const $6dee9211e57ac31a$export$c500183c31c2b22e = "--spans-columns";
8608
8718
  function $6dee9211e57ac31a$export$ab6b147eec64fea5(props) {
8609
8719
  const container_class = "x" + $i7OB2$createUniqueId();
8610
- const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps(() => props.element_attributes, {
8720
+ const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps1(() => props.element_attributes, {
8611
8721
  classList: {
8612
8722
  [container_class]: true
8613
8723
  }
@@ -8857,7 +8967,7 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
8857
8967
  })));
8858
8968
  }
8859
8969
  });
8860
- return $i7OB2$mergeProps1(block, {
8970
+ return $i7OB2$mergeProps(block, {
8861
8971
  // Create content divs for the blocks with as much fine-grained diffing as possible?
8862
8972
  content: () => {
8863
8973
  // Sneaky on-demand rendering, so we don't render more blocks than we can show: we have the rendered value here and don't return a function that renders because if our block would be moved around we'd be guaranteed to re-render
@@ -9092,7 +9202,7 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
9092
9202
  } = slider;
9093
9203
  const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
9094
9204
  // Do like this, so we don't have to call mergeProps ourselves
9095
- $i7OB2$createComponent(Layout, $i7OB2$mergeProps(layout_options_, {
9205
+ $i7OB2$createComponent(Layout, $i7OB2$mergeProps1(layout_options_, {
9096
9206
  rows: "all",
9097
9207
  get cols_at_size() {
9098
9208
  return modified_cols_at_size();
@@ -9238,7 +9348,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
9238
9348
  var $e1bb71e65e01a3a0$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zM9.449 3.5H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h1.398c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-1.051-.699h.703v-.699h-.703zm0 0"></path>',
9239
9349
  $e1bb71e65e01a3a0$var$_tmpl$2 = '<path d="M10.852 6.301H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h2.801a.35.35 0 0 1 .348.352v1.398a.35.35 0 0 1-.348.352zm-2.453-.699H10.5v-.703H8.398zm3.851 3.5H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h4.199c.191 0 .352.156.352.352V8.75c0 .191-.16.352-.352.352zm-3.852-.703h3.5V7.7h-3.5zm5.25 3.499H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h5.598a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-5.25-.699H13.3V10.5H8.398zm0 0"></path>';
9240
9350
  function $e1bb71e65e01a3a0$export$da32f7add8a22e86(props = {}) {
9241
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
9351
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
9242
9352
  xmlns: "http://www.w3.org/2000/svg",
9243
9353
  width: "14",
9244
9354
  height: "14",
@@ -9247,7 +9357,7 @@ function $e1bb71e65e01a3a0$export$da32f7add8a22e86(props = {}) {
9247
9357
  }
9248
9358
  var $05fbe84eb34564ec$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zm3.25 1.644H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h1.398a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-1.051-.699h.703V10.5h-.703zm2.454-2.097H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h2.801a.35.35 0 0 1 .348.352V8.75c0 .191-.156.352-.348.352zm-2.453-.703H10.5V7.7H8.398zm3.851-2.098H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h4.199c.191 0 .352.156.352.352v1.398c0 .195-.16.352-.352.352zm-3.852-.699h3.5v-.703h-3.5zm5.25-2.102H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h5.598c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-5.25-.699H13.3v-.699H8.398zm0 0"></path>';
9249
9359
  function $05fbe84eb34564ec$export$d10e63059ddb9fd4(props = {}) {
9250
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
9360
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
9251
9361
  xmlns: "http://www.w3.org/2000/svg",
9252
9362
  width: "14",
9253
9363
  height: "14",
@@ -9360,7 +9470,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
9360
9470
  })));
9361
9471
  },
9362
9472
  get children() {
9363
- return $i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $i7OB2$mergeProps(args_for_filtering_, {
9473
+ return $i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $i7OB2$mergeProps1(args_for_filtering_, {
9364
9474
  are_in_modal_: true
9365
9475
  }))));
9366
9476
  }
@@ -9916,7 +10026,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
9916
10026
  if (content_result_) return $i7OB2$ssrElement("a", attributes, () => $i7OB2$escape(children), true);
9917
10027
  return $i7OB2$ssrElement("div", attributes, () => $i7OB2$escape(children), true);
9918
10028
  };
9919
- return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps(make_link_attributes, {
10029
+ return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps1(make_link_attributes, {
9920
10030
  tabIndex: "-1",
9921
10031
  get children() {
9922
10032
  return $i7OB2$createComponent((0, $190927650b4840eb$export$605674723bcc715c), {
@@ -9924,7 +10034,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
9924
10034
  height: "28"
9925
10035
  });
9926
10036
  }
9927
- }))), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps({
10037
+ }))), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps1({
9928
10038
  "class": "content-title line-clamp"
9929
10039
  }, make_link_attributes, {
9930
10040
  get title() {
@@ -10059,7 +10169,7 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
10059
10169
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).content;
10060
10170
  },
10061
10171
  number_of_results_: num_results
10062
- })), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
10172
+ })), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
10063
10173
  layout: "grid",
10064
10174
  element_attributes: {
10065
10175
  class: "cards"
@@ -10431,7 +10541,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
10431
10541
  });
10432
10542
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $i7OB2$createSignal();
10433
10543
  const no_results_text_ = $i7OB2$createMemo(() => (search_results_()?.content_search_links?.length ? i18n_.no_products_ : i18n_.no_results_text_)());
10434
- const results_for = $i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $i7OB2$mergeProps({
10544
+ const results_for = $i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $i7OB2$mergeProps1({
10435
10545
  get type() {
10436
10546
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
10437
10547
  },
@@ -12160,7 +12270,7 @@ function $df5d81d0fe61ff21$var$add_us_to_crumbs(plp_meta) {
12160
12270
  return $i7OB2$createMemo(() => {
12161
12271
  const api_value = plp_meta()?.breadcrumbs;
12162
12272
  if (!api_value) return api_value;
12163
- return [...api_value, $i7OB2$mergeProps1(plp_meta(), {
12273
+ return [...api_value, $i7OB2$mergeProps(plp_meta(), {
12164
12274
  get page_url() {
12165
12275
  return href_accessor();
12166
12276
  }