@depict-ai/ui 4.3.0 → 4.3.2

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/latest/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { add_to_version_info as $9HbP8$add_to_version_info, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, slider_fractional_factory as $9HbP8$slider_fractional_factory, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, catchify as $9HbP8$catchify, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, observer as $9HbP8$observer, javascript_media_query as $9HbP8$javascript_media_query, queueMacroTask as $9HbP8$queueMacroTask, findMostFrequentItem as $9HbP8$findMostFrequentItem, dwarn as $9HbP8$dwarn, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, standard_price_format as $9HbP8$standard_price_format, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, use_href_accessor as $9HbP8$use_href_accessor, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, ListenableSet as $9HbP8$ListenableSet1, insert_surfaces as $9HbP8$insert_surfaces, is_debug as $9HbP8$is_debug } from "@depict-ai/utilishared/latest";
2
- import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps, isServer as $9HbP8$isServer, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, className as $9HbP8$className, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, getNextMarker as $9HbP8$getNextMarker, effect as $9HbP8$effect, classList as $9HbP8$classList, setAttribute as $9HbP8$setAttribute, style as $9HbP8$style, use as $9HbP8$use, setProperty as $9HbP8$setProperty, Dynamic as $9HbP8$Dynamic } from "solid-js/web";
3
- import { createSignal as $9HbP8$createSignal, createMemo as $9HbP8$createMemo, createResource as $9HbP8$createResource, Show as $9HbP8$Show, Suspense as $9HbP8$Suspense, untrack as $9HbP8$untrack, createRenderEffect as $9HbP8$createRenderEffect, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, onCleanup as $9HbP8$onCleanup, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createEffect as $9HbP8$createEffect, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, splitProps as $9HbP8$splitProps, mergeProps as $9HbP8$mergeProps1, on as $9HbP8$on, batch as $9HbP8$batch, createSelector as $9HbP8$createSelector, children as $9HbP8$children, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
1
+ import { add_to_version_info as $9HbP8$add_to_version_info, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, dwarn as $9HbP8$dwarn, slider_fractional_factory as $9HbP8$slider_fractional_factory, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, catchify as $9HbP8$catchify, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, observer as $9HbP8$observer, javascript_media_query as $9HbP8$javascript_media_query, queueMacroTask as $9HbP8$queueMacroTask, findMostFrequentItem as $9HbP8$findMostFrequentItem, standard_price_format as $9HbP8$standard_price_format, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, use_href_accessor as $9HbP8$use_href_accessor, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, ListenableSet as $9HbP8$ListenableSet1, insert_surfaces as $9HbP8$insert_surfaces, is_debug as $9HbP8$is_debug } from "@depict-ai/utilishared/latest";
2
+ import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps1, isServer as $9HbP8$isServer, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, className as $9HbP8$className, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, getNextMarker as $9HbP8$getNextMarker, effect as $9HbP8$effect, classList as $9HbP8$classList, setAttribute as $9HbP8$setAttribute, style as $9HbP8$style, use as $9HbP8$use, setProperty as $9HbP8$setProperty, Dynamic as $9HbP8$Dynamic } from "solid-js/web";
3
+ import { createSignal as $9HbP8$createSignal, createMemo as $9HbP8$createMemo, createResource as $9HbP8$createResource, createEffect as $9HbP8$createEffect, mergeProps as $9HbP8$mergeProps, Show as $9HbP8$Show, Suspense as $9HbP8$Suspense, untrack as $9HbP8$untrack, createRenderEffect as $9HbP8$createRenderEffect, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, onCleanup as $9HbP8$onCleanup, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, splitProps as $9HbP8$splitProps, on as $9HbP8$on, batch as $9HbP8$batch, createSelector as $9HbP8$createSelector, children as $9HbP8$children, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
4
4
  import { ListenableSet as $9HbP8$ListenableSet, catchify as $9HbP8$catchify1, use_href_accessor as $9HbP8$use_href_accessor1, report as $9HbP8$report1 } from "@depict-ai/utilishared/latest";
5
5
  import { createStore as $9HbP8$createStore, reconcile as $9HbP8$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.0";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.3.2";
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++) {
@@ -426,7 +426,7 @@ function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
426
426
  const container_class = "x" + $9HbP8$createUniqueId();
427
427
  const container_element_ = (() => {
428
428
  var _el$ = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
429
- $9HbP8$spread(_el$, $9HbP8$mergeProps(() => props.element_attributes, {
429
+ $9HbP8$spread(_el$, $9HbP8$mergeProps1(() => props.element_attributes, {
430
430
  "classList": {
431
431
  [container_class]: true
432
432
  }
@@ -669,7 +669,7 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
669
669
  } = slider;
670
670
  const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
671
671
  // Do like this, so we don't have to call mergeProps ourselves
672
- $9HbP8$createComponent(Layout, $9HbP8$mergeProps({
672
+ $9HbP8$createComponent(Layout, $9HbP8$mergeProps1({
673
673
  rows: "all",
674
674
  layout: "slider"
675
675
  }, layout_options_));
@@ -974,7 +974,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
974
974
  });
975
975
  // Work around https://github.com/solidjs/solid/issues/1828
976
976
  const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
977
- const [, otherAttributes] = $9HbP8$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 <-
977
+ const [, otherAttributes] = $9HbP8$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 <-
978
978
  ]);
979
979
 
980
980
  const [hasSetSize, setHasSetSize] = $9HbP8$createSignal(false);
@@ -990,7 +990,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
990
990
  if (loading === "force-lazy") return true;
991
991
  return loading === "lazy" && !isPrioritisedImage();
992
992
  });
993
- const modifiedOtherAttributes = $9HbP8$mergeProps1(otherAttributes, {
993
+ const modifiedOtherAttributes = $9HbP8$mergeProps(otherAttributes, {
994
994
  get loading() {
995
995
  return shouldActuallyEnableLazyLoading() ? "lazy" : undefined;
996
996
  }
@@ -1030,13 +1030,18 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
1030
1030
  let hasDecodedFastPath = false;
1031
1031
  let timeoutSet = false;
1032
1032
  let gotCleanedUp = false;
1033
+ let srcJustChanged = true;
1033
1034
  img.classList.add("s-responsive-image");
1034
1035
  if (listingContext) {
1035
1036
  let prevValue;
1036
1037
  const aspectRatios = listingContext[$e8ffe11ed01df0fe$export$f8945274f08a3105] ||= new Set();
1037
1038
  const [, setMostPrevalentAspectRatio] = listingContext[$e8ffe11ed01df0fe$export$6066eb417ed2e9f7] ||= $9HbP8$createSignal();
1038
1039
  img.addEventListener("load", $9HbP8$catchify(() => {
1039
- // Save our aspect ratio whenever it changes, so that we can base the containers on the most dominant aspect ratio, used in SearchModalV2
1040
+ if (props.keyRatioUpdating) {
1041
+ if (!srcJustChanged) return;
1042
+ srcJustChanged = false;
1043
+ }
1044
+ // 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
1040
1045
  const aspectRatio_ = img.naturalWidth / img.naturalHeight;
1041
1046
  if (prevValue) aspectRatios.delete(prevValue);
1042
1047
  const newValue = !isNaN(aspectRatio_) ? {
@@ -1054,7 +1059,11 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
1054
1059
  $9HbP8$onCleanup(() => prevValue && aspectRatios.delete(prevValue));
1055
1060
  }
1056
1061
  $9HbP8$onCleanup(() => gotCleanedUp = true);
1057
- $9HbP8$spread(img, $9HbP8$mergeProps1(modifiedOtherAttributes), false, true);
1062
+ $9HbP8$spread(img, $9HbP8$mergeProps(modifiedOtherAttributes), false, true);
1063
+ $9HbP8$createRenderEffect(() => {
1064
+ props.src;
1065
+ srcJustChanged = true;
1066
+ });
1058
1067
  $9HbP8$createEffect(() => {
1059
1068
  if (!props.size()) return; // wait until we have a size, run every time the size changes
1060
1069
  if (timeoutSet) return;
@@ -1124,48 +1133,22 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1124
1133
  const [mostPrevalentAspectRatio] = context ?
1125
1134
  // 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
1126
1135
  context[(0, $e8ffe11ed01df0fe$export$6066eb417ed2e9f7)] ||= $9HbP8$createSignal() : [];
1127
- const [aspectRatio, setAspectRatio] = $9HbP8$createSignal($9HbP8$untrack(() => props.aspectRatio));
1128
1136
  const container = $f18d425032111270$export$94026ee33dbabc26({
1129
1137
  // Write getters manually instead of using JSX, so we can do more complex logic in the aspectRatio getter without increasing bundle size
1130
1138
  get class() {
1131
1139
  return props.class;
1132
1140
  },
1133
1141
  get aspectRatio() {
1134
- return aspectRatio();
1142
+ if (props.autoAdjustAspectRatio) {
1143
+ const targetRatio = mostPrevalentAspectRatio?.();
1144
+ if (targetRatio != undefined) return `var(${(0, $bb15dfb548a7666e$export$8a2234b5b1a5ebd4)}, ${targetRatio})`;
1145
+ }
1146
+ return props.aspectRatio;
1135
1147
  }
1136
1148
  });
1137
1149
  const owner = $9HbP8$getOwner();
1138
1150
  let createdSizeAccessor = false;
1139
1151
  let wasCleanedUp = false;
1140
- let timeout;
1141
- $9HbP8$createEffect(() => {
1142
- const {
1143
- autoAdjustAspectRatio: autoAdjustAspectRatio
1144
- } = props;
1145
- if (autoAdjustAspectRatio) {
1146
- const targetRatio = mostPrevalentAspectRatio?.();
1147
- if (targetRatio != undefined) {
1148
- const targetValue = `var(${(0, $bb15dfb548a7666e$export$8a2234b5b1a5ebd4)}, ${targetRatio})`;
1149
- const updateAspectRatio = $9HbP8$catchify(() => setAspectRatio(targetValue));
1150
- if (autoAdjustAspectRatio === "smoothed") {
1151
- if (!timeout)
1152
- // 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).
1153
- updateAspectRatio();
1154
- clearTimeout(timeout);
1155
- timeout = setTimeout(() => {
1156
- timeout = undefined;
1157
- updateAspectRatio();
1158
- }, 500);
1159
- return;
1160
- }
1161
- return updateAspectRatio();
1162
- }
1163
- } else {
1164
- clearTimeout(timeout);
1165
- timeout = undefined;
1166
- }
1167
- setAspectRatio(props.aspectRatio);
1168
- });
1169
1152
  $9HbP8$createEffect(() => {
1170
1153
  if (currentImageSize() || wasCleanedUp) return; // We get into the effect when onCleanup is called if we don't have wasCleanedUp
1171
1154
  // ensure we always have a size accessor
@@ -1179,7 +1162,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1179
1162
  $9HbP8$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
1180
1163
  });
1181
1164
 
1182
- $9HbP8$insert(container, $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$mergeProps({
1165
+ $9HbP8$insert(container, $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$mergeProps1({
1183
1166
  get size() {
1184
1167
  return $9HbP8$createMemo(() => currentImageSize()?.() || 0);
1185
1168
  },
@@ -1194,7 +1177,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1194
1177
  return container;
1195
1178
  }
1196
1179
  function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
1197
- return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$mergeProps(props, {
1180
+ return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$mergeProps1(props, {
1198
1181
  get imgProps() {
1199
1182
  return {
1200
1183
  ...props.imgProps,
@@ -1211,7 +1194,13 @@ function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
1211
1194
  }
1212
1195
  }));
1213
1196
  }
1214
- var $5a6c386e1bde5665$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=img-wrapper><!$><!/><!$><!/>`),
1197
+ function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1198
+ return $9HbP8$createMemo(() => {
1199
+ const price_formatting = props.price_formatting_;
1200
+ return $9HbP8$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
1201
+ });
1202
+ }
1203
+ var $5a6c386e1bde5665$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=img-wrapper>`),
1215
1204
  $5a6c386e1bde5665$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<span class="d-price original">`),
1216
1205
  $5a6c386e1bde5665$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
1217
1206
  $5a6c386e1bde5665$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<a class=look-item><!$><!/><!$><!/>`);
@@ -1221,33 +1210,43 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1221
1210
  isExpanded_: isExpanded_,
1222
1211
  textFadeInAnimationRunning_: textFadeInAnimationRunning_,
1223
1212
  outerRef_: outerRef_,
1224
- animationDuration_: animationDuration_
1213
+ animationDuration_: animationDuration_,
1214
+ priceFormatting_: priceFormatting_,
1215
+ pseudoRouter_: pseudoRouter_
1225
1216
  }) {
1226
1217
  const variantToUse = $9HbP8$createMemo(() => {
1227
1218
  const display = display_();
1228
1219
  return display?.variant_displays[display?.variant_index];
1229
1220
  });
1230
- const imageUrls = () => variantToUse()?.image_urls;
1231
- const imageUrl = $9HbP8$createMemo(() => imageUrls()?.[0]);
1232
- const secondaryImageUrl = $9HbP8$createMemo(() => imageUrls()?.[1]);
1221
+ const imageUrl = $9HbP8$createMemo(() => variantToUse()?.image_urls?.[0]);
1233
1222
  const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
1234
1223
  const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $9HbP8$createSignal($9HbP8$untrack(isExpanded_));
1235
1224
  const [animationEffectExists, setAnimationEffectExists] = $9HbP8$createSignal(false);
1236
1225
  const [salePrice] = $9HbP8$createResource(() => variantToUse()?.sale_price);
1237
1226
  const [originalPrice] = $9HbP8$createResource(() => variantToUse()?.original_price);
1238
- const isOnSale = $9HbP8$createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
1227
+ const isOnSale = $9HbP8$createMemo(() => !salePrice.loading && !originalPrice.loading && salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense after the initial load
1228
+ const enableLink = $9HbP8$createMemo(() => isExpanded_() && !animationIsRunning());
1229
+ const href = $9HbP8$createMemo(() => variantToUse()?.page_url);
1239
1230
  const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
1240
1231
  return (() => {
1241
1232
  var _el$ = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$4),
1242
- _el$16 = _el$.firstChild,
1243
- [_el$17, _co$5] = $9HbP8$getNextMarker(_el$16.nextSibling),
1244
- _el$18 = _el$17.nextSibling,
1245
- [_el$19, _co$6] = $9HbP8$getNextMarker(_el$18.nextSibling);
1233
+ _el$12 = _el$.firstChild,
1234
+ [_el$13, _co$3] = $9HbP8$getNextMarker(_el$12.nextSibling),
1235
+ _el$14 = _el$13.nextSibling,
1236
+ [_el$15, _co$4] = $9HbP8$getNextMarker(_el$14.nextSibling);
1246
1237
  var _ref$ = outerRef_;
1247
1238
  typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$) : outerRef_ = _el$;
1248
- $9HbP8$spread(_el$, $9HbP8$mergeProps(() => isExpanded_() && !animationIsRunning() ? {
1249
- href: variantToUse()?.page_url
1250
- } : {}), false, true);
1239
+ $9HbP8$spread(_el$, $9HbP8$mergeProps1(() => enableLink() ? {
1240
+ href: href()
1241
+ } : {}, {
1242
+ get onClick() {
1243
+ return $9HbP8$catchify(event_ => enableLink() && pseudoRouter_.navigate_.go_to_({
1244
+ new_url_: href(),
1245
+ is_replace_: false,
1246
+ event_: event_
1247
+ }));
1248
+ }
1249
+ }), false, true);
1251
1250
  $9HbP8$insert(_el$, $9HbP8$createComponent((0, $9HbP8$Show), {
1252
1251
  when: imageUrl,
1253
1252
  get fallback() {
@@ -1256,11 +1255,7 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1256
1255
  });
1257
1256
  },
1258
1257
  get children() {
1259
- var _el$2 = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$),
1260
- _el$3 = _el$2.firstChild,
1261
- [_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling),
1262
- _el$5 = _el$4.nextSibling,
1263
- [_el$6, _co$2] = $9HbP8$getNextMarker(_el$5.nextSibling);
1258
+ var _el$2 = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$);
1264
1259
  $9HbP8$insert(_el$2, $9HbP8$createComponent((0, $9HbP8$Show), {
1265
1260
  get when() {
1266
1261
  return imageUrl();
@@ -1279,46 +1274,30 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1279
1274
  return isExpanded_() ? 0.75 : 1;
1280
1275
  },
1281
1276
  get autoAdjustAspectRatio() {
1282
- return isExpanded_() ? "smoothed" : false;
1283
- }
1284
- });
1285
- }
1286
- }), _el$4, _co$);
1287
- $9HbP8$insert(_el$2, $9HbP8$createComponent((0, $9HbP8$Show), {
1288
- get when() {
1289
- return secondaryImageUrl();
1290
- },
1291
- get children() {
1292
- return $9HbP8$createComponent((0, $70bb27cc6be01fc7$export$9d4a4b669b1929ab), {
1293
- get src() {
1294
- return secondaryImageUrl();
1295
- },
1296
- get aspectRatio() {
1297
- return isExpanded_() ? 0.75 : 1;
1277
+ return isExpanded_();
1298
1278
  },
1299
- "class": "secondary",
1300
- get autoAdjustAspectRatio() {
1301
- return isExpanded_() ? "smoothed" : false;
1279
+ imgProps: {
1280
+ keyRatioUpdating: true
1302
1281
  }
1303
1282
  });
1304
1283
  }
1305
- }), _el$6, _co$2);
1284
+ }));
1306
1285
  return _el$2;
1307
1286
  }
1308
- }), _el$17, _co$5);
1287
+ }), _el$13, _co$3);
1309
1288
  $9HbP8$insert(_el$, $9HbP8$createComponent((0, $9HbP8$Show), {
1310
1289
  get when() {
1311
1290
  return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
1312
1291
  },
1313
1292
  get children() {
1314
- var _el$7 = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$3),
1315
- _el$8 = _el$7.firstChild,
1316
- _el$9 = _el$8.firstChild,
1317
- _el$10 = _el$9.nextSibling,
1318
- _el$12 = _el$10.nextSibling,
1319
- [_el$13, _co$3] = $9HbP8$getNextMarker(_el$12.nextSibling),
1320
- _el$14 = _el$8.nextSibling,
1321
- [_el$15, _co$4] = $9HbP8$getNextMarker(_el$14.nextSibling);
1293
+ var _el$3 = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$3),
1294
+ _el$4 = _el$3.firstChild,
1295
+ _el$5 = _el$4.firstChild,
1296
+ _el$6 = _el$5.nextSibling,
1297
+ _el$8 = _el$6.nextSibling,
1298
+ [_el$9, _co$] = $9HbP8$getNextMarker(_el$8.nextSibling),
1299
+ _el$10 = _el$4.nextSibling,
1300
+ [_el$11, _co$2] = $9HbP8$getNextMarker(_el$10.nextSibling);
1322
1301
  $9HbP8$use(element => {
1323
1302
  const owner = $9HbP8$getOwner();
1324
1303
  $9HbP8$onCleanup((0, $9HbP8$observer).onexists(element, ({
@@ -1350,46 +1329,88 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
1350
1329
  for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $9HbP8$catchify(() => setAnimationIsRunning(false)));
1351
1330
  disconnector();
1352
1331
  }));
1353
- }, _el$7);
1354
- $9HbP8$insert(_el$9, () => variantToUse()?.title ?? $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1332
+ }, _el$3);
1333
+ $9HbP8$insert(_el$5, () => variantToUse()?.title ?? $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1355
1334
  height: "1em",
1356
1335
  width: "20ch"
1357
1336
  }));
1358
- $9HbP8$insert(_el$10, (() => {
1359
- var _c$ = $9HbP8$memo(() => !!(!variantToUse() || salePrice.loading));
1360
- return () => _c$() ? $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1361
- height: "1em",
1362
- width: "20ch"
1363
- }) : salePrice();
1364
- })());
1365
- $9HbP8$insert(_el$8, $9HbP8$createComponent((0, $9HbP8$Show), {
1337
+ $9HbP8$insert(_el$6, $9HbP8$createComponent((0, $9HbP8$Show), {
1338
+ get when() {
1339
+ return variantToUse() && !salePrice.loading;
1340
+ },
1341
+ get fallback() {
1342
+ return $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1343
+ height: "1em",
1344
+ width: "20ch"
1345
+ });
1346
+ },
1347
+ get children() {
1348
+ return $9HbP8$createComponent((0, $9HbP8$Show), {
1349
+ get when() {
1350
+ return salePrice.latest;
1351
+ },
1352
+ get children() {
1353
+ return [$9HbP8$memo(() => priceFormatting_().pre_), $9HbP8$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
1354
+ get price_() {
1355
+ return salePrice();
1356
+ },
1357
+ get price_formatting_() {
1358
+ return priceFormatting_();
1359
+ }
1360
+ }), $9HbP8$memo(() => priceFormatting_().post_)];
1361
+ }
1362
+ });
1363
+ }
1364
+ }));
1365
+ $9HbP8$insert(_el$4, $9HbP8$createComponent((0, $9HbP8$Show), {
1366
1366
  get when() {
1367
1367
  return isOnSale();
1368
1368
  },
1369
1369
  get children() {
1370
- var _el$11 = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$2);
1371
- $9HbP8$insert(_el$11, (() => {
1372
- var _c$2 = $9HbP8$memo(() => !!(!variantToUse() || originalPrice.loading));
1373
- return () => _c$2() ? $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1374
- height: "1em",
1375
- width: "20ch"
1376
- }) : originalPrice();
1377
- })());
1378
- return _el$11;
1370
+ var _el$7 = $9HbP8$getNextElement($5a6c386e1bde5665$var$_tmpl$2);
1371
+ $9HbP8$insert(_el$7, $9HbP8$createComponent((0, $9HbP8$Show), {
1372
+ get when() {
1373
+ return variantToUse() && !originalPrice.loading;
1374
+ },
1375
+ get fallback() {
1376
+ return $9HbP8$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
1377
+ height: "1em",
1378
+ width: "20ch"
1379
+ });
1380
+ },
1381
+ get children() {
1382
+ return $9HbP8$createComponent((0, $9HbP8$Show), {
1383
+ get when() {
1384
+ return salePrice.latest;
1385
+ },
1386
+ get children() {
1387
+ return [$9HbP8$memo(() => priceFormatting_().pre_), $9HbP8$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
1388
+ get price_() {
1389
+ return originalPrice();
1390
+ },
1391
+ get price_formatting_() {
1392
+ return priceFormatting_();
1393
+ }
1394
+ }), $9HbP8$memo(() => priceFormatting_().post_)];
1395
+ }
1396
+ });
1397
+ }
1398
+ }));
1399
+ return _el$7;
1379
1400
  }
1380
- }), _el$13, _co$3);
1381
- $9HbP8$insert(_el$7, $9HbP8$createComponent((0, $9HbP8$Show), {
1401
+ }), _el$9, _co$);
1402
+ $9HbP8$insert(_el$3, $9HbP8$createComponent((0, $9HbP8$Show), {
1382
1403
  when: FavoriteButton_,
1383
1404
  get children() {
1384
1405
  return $9HbP8$createComponent(FavoriteButton, {
1385
1406
  display_: display_
1386
1407
  });
1387
1408
  }
1388
- }), _el$15, _co$4);
1389
- $9HbP8$effect(() => _el$10.classList.toggle("sale", !!isOnSale()));
1390
- return _el$7;
1409
+ }), _el$11, _co$2);
1410
+ $9HbP8$effect(() => _el$6.classList.toggle("sale", !!isOnSale()));
1411
+ return _el$3;
1391
1412
  }
1392
- }), _el$19, _co$6);
1413
+ }), _el$15, _co$4);
1393
1414
  $9HbP8$runHydrationEvents();
1394
1415
  return _el$;
1395
1416
  })();
@@ -1451,7 +1472,9 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1451
1472
  userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
1452
1473
  containerWidth_: containerWidth_,
1453
1474
  animationDuration_: animationDuration_,
1454
- supportsHover_: supportsHover_
1475
+ supportsHover_: supportsHover_,
1476
+ priceFormatting_: priceFormatting_,
1477
+ pseudoRouter_: pseudoRouter_
1455
1478
  }) {
1456
1479
  let isAffectedByChromeBug = false;
1457
1480
  // If the user requests the drawer to be expanded or not
@@ -1481,7 +1504,7 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1481
1504
  behavior: "smooth"
1482
1505
  });
1483
1506
  }), _el$2);
1484
- $9HbP8$spread(_el$2, $9HbP8$mergeProps({
1507
+ $9HbP8$spread(_el$2, $9HbP8$mergeProps1({
1485
1508
  get classList() {
1486
1509
  return {
1487
1510
  expanded: userWantsExpanded(),
@@ -1505,11 +1528,13 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
1505
1528
  },
1506
1529
  children: (display, index) => {
1507
1530
  return $9HbP8$createComponent((0, $5a6c386e1bde5665$export$b73ed90f0ee50dc3), {
1531
+ pseudoRouter_: pseudoRouter_,
1508
1532
  animationDuration_: animationDuration_,
1509
1533
  display_: display,
1510
1534
  FavoriteButton_: FavoriteButton_,
1511
1535
  isExpanded_: userWantsExpanded,
1512
1536
  textFadeInAnimationRunning_: textFadeInAnimationRunning,
1537
+ priceFormatting_: priceFormatting_,
1513
1538
  outerRef_: el => $9HbP8$createEffect(() => {
1514
1539
  if (index !== 0) return;
1515
1540
  const resizeObserver = new ResizeObserver($9HbP8$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
@@ -1552,10 +1577,10 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1552
1577
  expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
1553
1578
  FavoriteButton_: FavoriteButton_,
1554
1579
  placeholderImageAspectRatio_: placeholderImageAspectRatio_,
1555
- animationDuration_: animationDuration_
1580
+ animationDuration_: animationDuration_,
1581
+ priceFormatting_: priceFormatting_,
1582
+ pseudoRouter_: pseudoRouter_
1556
1583
  }) {
1557
- // TODO: shopify, run displayTransformers to get dynamic prices
1558
- // TODO: format prices
1559
1584
  const [coverImage] = display_?.image_urls || [];
1560
1585
  const useWantsExpandedSignal_ = $9HbP8$createSignal(false);
1561
1586
  const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
@@ -1563,7 +1588,13 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1563
1588
  const us = Symbol("look");
1564
1589
  const container = (() => {
1565
1590
  var _el$ = $9HbP8$getNextElement($28ee4f7db3cc44b8$var$_tmpl$);
1566
- $9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(() => setUserWantsExpanded(prev => !prev)), true);
1591
+ $9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(({
1592
+ target: target
1593
+ }) => {
1594
+ // Don't toggle when clicking on the links
1595
+ if (target.matches("a") || target.closest("a")) return;
1596
+ setUserWantsExpanded(prev => !prev);
1597
+ }), true);
1567
1598
  _el$.classList.toggle("placeholder", !!!display_);
1568
1599
  $9HbP8$runHydrationEvents();
1569
1600
  return _el$;
@@ -1593,7 +1624,7 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1593
1624
  when: display_,
1594
1625
  get fallback() {
1595
1626
  return $9HbP8$createComponent((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
1596
- aspectRatio: placeholderImageAspectRatio_
1627
+ aspectRatio: `var(${(0, $bb15dfb548a7666e$export$8a2234b5b1a5ebd4)}, ${placeholderImageAspectRatio_})`
1597
1628
  });
1598
1629
  },
1599
1630
  get children() {
@@ -1611,11 +1642,125 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1611
1642
  containerWidth_: containerWidth_,
1612
1643
  animationDuration_: animationDuration_,
1613
1644
  supportsHover_: supportsHover_,
1614
- FavoriteButton_: FavoriteButton_
1645
+ FavoriteButton_: FavoriteButton_,
1646
+ priceFormatting_: priceFormatting_,
1647
+ pseudoRouter_: pseudoRouter_
1615
1648
  })]);
1616
1649
  return container;
1617
1650
  }
1618
1651
  $9HbP8$delegateEvents(["click"]);
1652
+
1653
+ /**
1654
+ * 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
1655
+ * @param clickEvent The click event that triggered the navigation
1656
+ */
1657
+ function $a281666e5c15c2ec$export$29d28dadc2d6b631(clickEvent) {
1658
+ return clickEvent?.button ||
1659
+ // if not zero it's a wheel click which opens in new tab
1660
+ clickEvent?.metaKey ||
1661
+ // if true, cmd button on macOS which opens in new tab
1662
+ clickEvent?.ctrlKey ||
1663
+ // if true, ctrl button on windows or linux which opens in new tab
1664
+ clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
1665
+ ;
1666
+ }
1667
+
1668
+ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
1669
+ /**
1670
+ * Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
1671
+ */ /**
1672
+ * 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
1673
+ */
1674
+ #throwing_on_navigation(...args) {
1675
+ const {
1676
+ on_navigation_: on_navigation_
1677
+ } = this;
1678
+ if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
1679
+ // make sure that we don't accidentally catchify if the SDK consumer has fucked up
1680
+ try {
1681
+ return on_navigation_(...args);
1682
+ } catch (e) {
1683
+ queueMicrotask(() => {
1684
+ throw e;
1685
+ });
1686
+ }
1687
+ }
1688
+ /**
1689
+ * Vue has async router that needs to be awaited (it navigates after a microtask)
1690
+ * This standardises waiting for all kinds of routers
1691
+ */
1692
+ #get_navigation_happened_promise(is_replace) {
1693
+ return new Promise(resolve => {
1694
+ const handler = what_happened => {
1695
+ if (what_happened === (is_replace ? "replaceState" : "pushState")) {
1696
+ resolve();
1697
+ (0, $9HbP8$instant_exec_on_suspect_history_change).delete(handler);
1698
+ }
1699
+ };
1700
+ (0, $9HbP8$instant_exec_on_suspect_history_change).add(handler);
1701
+ });
1702
+ }
1703
+ navigate_ = {
1704
+ /**
1705
+ * Call this if you *just* want to replace the state object in history.state
1706
+ */
1707
+ replace_state_: new_state => {
1708
+ // 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
1709
+ globalThis?.history?.replaceState(new_state, "");
1710
+ },
1711
+ /**
1712
+ * Call this to change the URL
1713
+ * @param new_url_ new URL to go to
1714
+ * @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
1715
+ * @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
1716
+ * @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
1717
+ * @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
1718
+ */
1719
+ go_to_: $9HbP8$catchify(async ({
1720
+ new_url_: raw_new_url,
1721
+ event_: event_,
1722
+ force_spa_navigation_: force_spa_navigation_,
1723
+ is_replace_: is_replace_,
1724
+ listing_query_: listing_query_,
1725
+ scroll = true
1726
+ }) => {
1727
+ const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
1728
+ const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
1729
+ if ($a281666e5c15c2ec$export$29d28dadc2d6b631(event_)) return;
1730
+ const different_origin = new_url_.origin !== location.origin;
1731
+ if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
1732
+ if (force_spa_navigation_ && different_origin)
1733
+ // If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
1734
+ $9HbP8$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
1735
+ if (!event_)
1736
+ // If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
1737
+ location.assign(new_url_);
1738
+ return;
1739
+ }
1740
+ event_?.preventDefault();
1741
+ const promise = this.#get_navigation_happened_promise(true);
1742
+ if (force_spa_navigation_ && wants_hard_navigation) {
1743
+ // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
1744
+ const new_state = history.state;
1745
+ if (listing_query_) {
1746
+ // In JS-UI we need to know the listing_id of the current category, therefore push it into state
1747
+ if (!this.listing_query_state_key) $9HbP8$report(new Error("listing_query_state_key is not set"), "error");
1748
+ new_state[this.listing_query_state_key] = listing_query_;
1749
+ }
1750
+ history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
1751
+ } else this.#throwing_on_navigation.call(this, {
1752
+ is_replace: is_replace_,
1753
+ new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
1754
+ scroll: scroll
1755
+ });
1756
+ await promise;
1757
+ })
1758
+ };
1759
+ constructor(on_navigation, listing_query_state_key) {
1760
+ this.listing_query_state_key = listing_query_state_key;
1761
+ this.on_navigation_ = on_navigation;
1762
+ }
1763
+ }
1619
1764
  var $f577edfe2240eec1$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class="depict recommendations looks"style=--animation-duration:240ms>`);
1620
1765
  let $f577edfe2240eec1$var$expandedLooksSignal_;
1621
1766
  function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
@@ -1624,6 +1769,7 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
1624
1769
  equals: false
1625
1770
  });
1626
1771
  const expandingAnimationDuration = 240;
1772
+ const pseudoRouter = new (0, $4fd2ba03703a7d92$export$7e1297a3a19f10d8)("hard_navigation");
1627
1773
  const grid_spacing_override = $9HbP8$createMemo(() => {
1628
1774
  const {
1629
1775
  gridSpacing_: gridSpacing_
@@ -1649,21 +1795,37 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
1649
1795
  });
1650
1796
  const decoded = await response?.json?.().catch(() => false);
1651
1797
  if (!decoded)
1652
- // If network fails, make sure to return empty array adn SolidRecommendationSlider will remove its elements
1798
+ // If network fails, make sure to return empty array and SolidRecommendationSlider will remove its elements
1653
1799
  return [];
1654
- return decoded.listings;
1800
+ const {
1801
+ listings: listings
1802
+ } = decoded;
1803
+ const baseData = {
1804
+ merchant: merchant,
1805
+ market: market,
1806
+ locale: locale
1807
+ };
1808
+ return $f577edfe2240eec1$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
1809
+ });
1810
+ $9HbP8$createEffect(() => {
1811
+ const {
1812
+ onNavigation_: onNavigation_
1813
+ } = props;
1814
+ if (onNavigation_) pseudoRouter.on_navigation_ = onNavigation_;
1655
1815
  });
1656
1816
  return (() => {
1657
1817
  var _el$ = $9HbP8$getNextElement($f577edfe2240eec1$var$_tmpl$);
1658
1818
  $9HbP8$insert(_el$, $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
1659
1819
  get children() {
1660
1820
  return $c4492d24952ed731$export$d41d19e89346fa2({
1661
- product_card_template_: (display, info) => $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1821
+ product_card_template_: display => $28ee4f7db3cc44b8$export$44809a8a3e867e30({
1662
1822
  display_: display,
1663
1823
  FavoriteButton_: props.FavoriteButton_,
1664
1824
  placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
1665
1825
  animationDuration_: expandingAnimationDuration,
1666
- expandedLooksSignal_: $f577edfe2240eec1$var$expandedLooksSignal_
1826
+ expandedLooksSignal_: $f577edfe2240eec1$var$expandedLooksSignal_,
1827
+ priceFormatting_: () => props.priceFormatting_,
1828
+ pseudoRouter_: pseudoRouter
1667
1829
  }),
1668
1830
  recommendations_resource_: looksResource,
1669
1831
  title_: () => props.title_,
@@ -1678,6 +1840,53 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
1678
1840
  })();
1679
1841
  }, "LookSlider failed");
1680
1842
  }
1843
+ async function $f577edfe2240eec1$var$runDisplayTransformersForLooks(baseData, listings, displayTransformers) {
1844
+ try {
1845
+ const {
1846
+ products: productTransformer,
1847
+ categories: providedListingTransformer
1848
+ } = displayTransformers || {};
1849
+ if (!productTransformer && !providedListingTransformer) return listings;
1850
+ const listingTransformer = providedListingTransformer || (({
1851
+ data: data
1852
+ }) => data);
1853
+ const displaysToTransform = [];
1854
+ const displayIdsPerListingId = {};
1855
+ const transformedListingsPromise = listingTransformer({
1856
+ ...baseData,
1857
+ data: listings.map(({
1858
+ displays: displays,
1859
+ ...listing
1860
+ }) => {
1861
+ // Populate our displays by id and displayIdToListings object in the .map where we add ancestors to the listings, for peak efficiency
1862
+ for (let i = 0; i < displays.length; i++) {
1863
+ const display = displays[i];
1864
+ const uniqueIdOfDisplay = $16351e4c87b90b3d$export$548d053aba053d79(display);
1865
+ displaysToTransform.push(display);
1866
+ (displayIdsPerListingId[listing.listing_id] ||= []).push(uniqueIdOfDisplay);
1867
+ }
1868
+ return {
1869
+ ...listing,
1870
+ ancestors: []
1871
+ };
1872
+ })
1873
+ });
1874
+ // This allows the person providing the displayTransformer to re-order and remove displays
1875
+ const transformedProducts = productTransformer ? await productTransformer({
1876
+ ...baseData,
1877
+ displays: displaysToTransform
1878
+ }) : displaysToTransform;
1879
+ const transformedListings = await transformedListingsPromise;
1880
+ const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$16351e4c87b90b3d$export$548d053aba053d79(display), display]));
1881
+ return transformedListings.map(listing => $9HbP8$mergeProps(listing, {
1882
+ // use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
1883
+ displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
1884
+ }));
1885
+ } catch (e) {
1886
+ $9HbP8$dwarn("Displaytransformers threw", e);
1887
+ return [];
1888
+ }
1889
+ }
1681
1890
  const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
1682
1891
  let $90980bd87c9960f9$var$has_ran = false;
1683
1892
  function $90980bd87c9960f9$export$5162a71f252e6122() {
@@ -1718,21 +1927,6 @@ function $90980bd87c9960f9$var$starts_with_any_prefix(key) {
1718
1927
  }
1719
1928
  }
1720
1929
 
1721
- /**
1722
- * 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
1723
- * @param clickEvent The click event that triggered the navigation
1724
- */
1725
- function $a281666e5c15c2ec$export$29d28dadc2d6b631(clickEvent) {
1726
- return clickEvent?.button ||
1727
- // if not zero it's a wheel click which opens in new tab
1728
- clickEvent?.metaKey ||
1729
- // if true, cmd button on macOS which opens in new tab
1730
- clickEvent?.ctrlKey ||
1731
- // if true, ctrl button on windows or linux which opens in new tab
1732
- clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
1733
- ;
1734
- }
1735
-
1736
1930
  /**
1737
1931
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
1738
1932
  */
@@ -1772,12 +1966,6 @@ function $d8dbf52fea1773e2$export$f50b88e2a00918b5(fn) {
1772
1966
  }
1773
1967
  };
1774
1968
  }
1775
- function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1776
- return $9HbP8$createMemo(() => {
1777
- const price_formatting = props.price_formatting_;
1778
- return $9HbP8$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
1779
- });
1780
- }
1781
1969
  function $f4125ce4984deee6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
1782
1970
  const isSelected = $9HbP8$createMemo(() => {
1783
1971
  const selectedValue = selectedIndex();
@@ -3144,7 +3332,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
3144
3332
  $9HbP8$insert(_el$5, $9HbP8$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {}));
3145
3333
  var _ref$2 = submit_button_ref_;
3146
3334
  typeof _ref$2 === "function" ? $9HbP8$use(_ref$2, _el$6) : submit_button_ref_ = _el$6;
3147
- $9HbP8$spread(_el$6, $9HbP8$mergeProps({
3335
+ $9HbP8$spread(_el$6, $9HbP8$mergeProps1({
3148
3336
  get onClick() {
3149
3337
  return $9HbP8$catchify(() => submit_query_());
3150
3338
  }
@@ -3781,7 +3969,7 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
3781
3969
  const href = $9HbP8$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
3782
3970
  const LinkToListing = props => (() => {
3783
3971
  var _el$ = $9HbP8$getNextElement($4ce5b8892775b62d$var$_tmpl$);
3784
- $9HbP8$spread(_el$, $9HbP8$mergeProps(props, {
3972
+ $9HbP8$spread(_el$, $9HbP8$mergeProps1(props, {
3785
3973
  get href() {
3786
3974
  return href();
3787
3975
  },
@@ -4175,7 +4363,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
4175
4363
  $9HbP8$createComputed($9HbP8$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
4176
4364
  defer: true
4177
4365
  })); // reset autocomplete position if query changes
4178
- return [$9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps(sharedSuggestionProps, {
4366
+ return [$9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps1(sharedSuggestionProps, {
4179
4367
  get title_() {
4180
4368
  return i18n_.popular_;
4181
4369
  },
@@ -4185,7 +4373,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
4185
4373
  return itemIndexes_.suggestionsIndex_;
4186
4374
  },
4187
4375
  showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
4188
- })), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps(sharedSuggestionProps, {
4376
+ })), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps1(sharedSuggestionProps, {
4189
4377
  get title_() {
4190
4378
  return i18n_.previous_;
4191
4379
  },
@@ -4202,7 +4390,7 @@ function $2f3171b02c8f4a5d$export$af1fb307bbba2417({
4202
4390
  return _el$;
4203
4391
  })(),
4204
4392
  showPlaceholders_: () => false
4205
- })), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps(sharedSuggestionProps, {
4393
+ })), $9HbP8$createComponent((0, $903297121898e5ff$export$d4994a86c6235f72), $9HbP8$mergeProps1(sharedSuggestionProps, {
4206
4394
  get title_() {
4207
4395
  return i18n_.content_;
4208
4396
  },
@@ -4724,7 +4912,7 @@ function $024fbc0a2d796fad$export$b2539bed5023c21c(props) {
4724
4912
  return $9HbP8$createComponent($024fbc0a2d796fad$var$TabsContext.Provider, {
4725
4913
  value: new (0, $9HbP8$ListenableSet)(),
4726
4914
  get children() {
4727
- return $9HbP8$createComponent($024fbc0a2d796fad$var$ActualTabs, $9HbP8$mergeProps(props, {
4915
+ return $9HbP8$createComponent($024fbc0a2d796fad$var$ActualTabs, $9HbP8$mergeProps1(props, {
4728
4916
  get children() {
4729
4917
  return props.children;
4730
4918
  }
@@ -4754,7 +4942,7 @@ function $024fbc0a2d796fad$var$ActualTabs(props) {
4754
4942
  },
4755
4943
  children: item => {
4756
4944
  const weSelected = $9HbP8$createMemo(() => isSelected(item().id));
4757
- return $9HbP8$createComponent((0, $9HbP8$Dynamic), $9HbP8$mergeProps({
4945
+ return $9HbP8$createComponent((0, $9HbP8$Dynamic), $9HbP8$mergeProps1({
4758
4946
  get component() {
4759
4947
  return props.AnchorComponent;
4760
4948
  },
@@ -4861,7 +5049,7 @@ function $024fbc0a2d796fad$export$3e41faf802a29e71(props) {
4861
5049
  if (!currentTabs) throw new Error("Tab must be a child of Tabs");
4862
5050
  const id = $9HbP8$createUniqueId();
4863
5051
  const ourSet = currentTabs;
4864
- const extendedProps = $9HbP8$mergeProps1({
5052
+ const extendedProps = $9HbP8$mergeProps({
4865
5053
  id: id
4866
5054
  }, props);
4867
5055
  ourSet.add(extendedProps);
@@ -4975,102 +5163,6 @@ function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
4975
5163
  }
4976
5164
  });
4977
5165
  }
4978
- class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
4979
- /**
4980
- * Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
4981
- */ /**
4982
- * 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
4983
- */
4984
- #throwing_on_navigation(...args) {
4985
- const {
4986
- on_navigation_: on_navigation_
4987
- } = this;
4988
- if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
4989
- // make sure that we don't accidentally catchify if the SDK consumer has fucked up
4990
- try {
4991
- return on_navigation_(...args);
4992
- } catch (e) {
4993
- queueMicrotask(() => {
4994
- throw e;
4995
- });
4996
- }
4997
- }
4998
- /**
4999
- * Vue has async router that needs to be awaited (it navigates after a microtask)
5000
- * This standardises waiting for all kinds of routers
5001
- */
5002
- #get_navigation_happened_promise(is_replace) {
5003
- return new Promise(resolve => {
5004
- const handler = what_happened => {
5005
- if (what_happened === (is_replace ? "replaceState" : "pushState")) {
5006
- resolve();
5007
- (0, $9HbP8$instant_exec_on_suspect_history_change).delete(handler);
5008
- }
5009
- };
5010
- (0, $9HbP8$instant_exec_on_suspect_history_change).add(handler);
5011
- });
5012
- }
5013
- navigate_ = {
5014
- /**
5015
- * Call this if you *just* want to replace the state object in history.state
5016
- */
5017
- replace_state_: new_state => {
5018
- // 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
5019
- globalThis?.history?.replaceState(new_state, "");
5020
- },
5021
- /**
5022
- * Call this to change the URL
5023
- * @param new_url_ new URL to go to
5024
- * @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
5025
- * @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
5026
- * @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
5027
- * @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
5028
- */
5029
- go_to_: $9HbP8$catchify(async ({
5030
- new_url_: raw_new_url,
5031
- event_: event_,
5032
- force_spa_navigation_: force_spa_navigation_,
5033
- is_replace_: is_replace_,
5034
- listing_query_: listing_query_,
5035
- scroll = true
5036
- }) => {
5037
- const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
5038
- const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
5039
- if ($a281666e5c15c2ec$export$29d28dadc2d6b631(event_)) return;
5040
- const different_origin = new_url_.origin !== location.origin;
5041
- if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
5042
- if (force_spa_navigation_ && different_origin)
5043
- // If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
5044
- $9HbP8$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
5045
- if (!event_)
5046
- // If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
5047
- location.assign(new_url_);
5048
- return;
5049
- }
5050
- event_?.preventDefault();
5051
- const promise = this.#get_navigation_happened_promise(true);
5052
- if (force_spa_navigation_ && wants_hard_navigation) {
5053
- // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
5054
- const new_state = history.state;
5055
- if (listing_query_) {
5056
- // In JS-UI we need to know the listing_id of the current category, therefore push it into state
5057
- if (!this.listing_query_state_key) $9HbP8$report(new Error("listing_query_state_key is not set"), "error");
5058
- new_state[this.listing_query_state_key] = listing_query_;
5059
- }
5060
- history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
5061
- } else this.#throwing_on_navigation.call(this, {
5062
- is_replace: is_replace_,
5063
- new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
5064
- scroll: scroll
5065
- });
5066
- await promise;
5067
- })
5068
- };
5069
- constructor(on_navigation, listing_query_state_key) {
5070
- this.listing_query_state_key = listing_query_state_key;
5071
- this.on_navigation_ = on_navigation;
5072
- }
5073
- }
5074
5166
  var $2a26c8ff1ef1fe75$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=image-container>`);
5075
5167
  function $2a26c8ff1ef1fe75$export$41e1a079d40a0d58(props) {
5076
5168
  const [display] = $9HbP8$createResource(() => ({
@@ -5187,7 +5279,7 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
5187
5279
  _el$5 = _el$4.nextSibling,
5188
5280
  [_el$6, _co$2] = $9HbP8$getNextMarker(_el$5.nextSibling);
5189
5281
  $9HbP8$insert(_el$2, (0, $a458486f22b22f63$export$a2cc176055f8f08), _el$4, _co$);
5190
- $9HbP8$insert(_el$2, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps({
5282
+ $9HbP8$insert(_el$2, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
5191
5283
  get rows() {
5192
5284
  return rows_object_();
5193
5285
  },
@@ -5563,14 +5655,14 @@ function $8560c919ff763930$var$ActualShopTheLookButton(props) {
5563
5655
  const displayStyleValue = $9HbP8$createMemo(() => hasAnythingToShow() ? "" : "none");
5564
5656
  const button = (() => {
5565
5657
  var _el$2 = $9HbP8$getNextElement($8560c919ff763930$var$_tmpl$2);
5566
- $9HbP8$spread(_el$2, $9HbP8$mergeProps(() => localProps.buttonAttributes), false, true);
5658
+ $9HbP8$spread(_el$2, $9HbP8$mergeProps1(() => localProps.buttonAttributes), false, true);
5567
5659
  $9HbP8$insert(_el$2, () => localProps?.buttonAttributes?.children || "Shop the look");
5568
5660
  $9HbP8$runHydrationEvents();
5569
5661
  return _el$2;
5570
5662
  })();
5571
5663
  $9HbP8$createEffect(() => button.style.display = displayStyleValue()); // Set our attributes like this, so we allow total control over the button from the outside via buttonAttributes
5572
5664
  $9HbP8$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
5573
- $8560c919ff763930$var$modalProps = $9HbP8$mergeProps1(partForModal, {
5665
+ $8560c919ff763930$var$modalProps = $9HbP8$mergeProps(partForModal, {
5574
5666
  products_to_shop_: products_to_shop_
5575
5667
  });
5576
5668
  button.addEventListener("click", openModal);
@@ -6306,7 +6398,7 @@ var $f8a56ba74eedd0c6$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg><path d="M
6306
6398
  function $f8a56ba74eedd0c6$export$f21ab0717a89c77f(props) {
6307
6399
  return (() => {
6308
6400
  var _el$ = $9HbP8$getNextElement($f8a56ba74eedd0c6$var$_tmpl$);
6309
- $9HbP8$spread(_el$, $9HbP8$mergeProps(props, {
6401
+ $9HbP8$spread(_el$, $9HbP8$mergeProps1(props, {
6310
6402
  "xmlns": "http://www.w3.org/2000/svg",
6311
6403
  "width": "11",
6312
6404
  "height": "12"
@@ -7781,7 +7873,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
7781
7873
  [_el$6, _co$] = $9HbP8$getNextMarker(_el$5.nextSibling),
7782
7874
  _el$7 = _el$6.nextSibling,
7783
7875
  [_el$8, _co$2] = $9HbP8$getNextMarker(_el$7.nextSibling);
7784
- $9HbP8$spread(_el$2, $9HbP8$mergeProps(attributes, {
7876
+ $9HbP8$spread(_el$2, $9HbP8$mergeProps1(attributes, {
7785
7877
  get disabled() {
7786
7878
  return $9HbP8$memo(() => !!count_zero())() && !is_selected();
7787
7879
  },
@@ -9179,7 +9271,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
9179
9271
  // Filter out our transformed ancestors
9180
9272
  const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
9181
9273
  // Add the now transformed ancestors into the ancestors of the listing suggestions
9182
- const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $9HbP8$mergeProps1(item, {
9274
+ const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $9HbP8$mergeProps(item, {
9183
9275
  // Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
9184
9276
  ancestors: item.ancestors.map(ancestor => {
9185
9277
  const newAncestor = transformedAncestors[ancestor.listing_id];
@@ -9739,7 +9831,7 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
9739
9831
  [_el$6, _co$2] = $9HbP8$getNextMarker(_el$5.nextSibling);
9740
9832
  $9HbP8$insert(_el$2, () => i18n_.search_recs_title_());
9741
9833
  $9HbP8$insert(_el$, (0, $a458486f22b22f63$export$a2cc176055f8f08), _el$4, _co$);
9742
- $9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps({
9834
+ $9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
9743
9835
  rows: rows_object,
9744
9836
  layout: "grid",
9745
9837
  element_attributes: {
@@ -10468,7 +10560,7 @@ function $6dee9211e57ac31a$export$ab6b147eec64fea5(props) {
10468
10560
  const container_class = "x" + $9HbP8$createUniqueId();
10469
10561
  const container_element_ = (() => {
10470
10562
  var _el$ = $9HbP8$getNextElement($6dee9211e57ac31a$var$_tmpl$);
10471
- $9HbP8$spread(_el$, $9HbP8$mergeProps(() => props.element_attributes, {
10563
+ $9HbP8$spread(_el$, $9HbP8$mergeProps1(() => props.element_attributes, {
10472
10564
  "classList": {
10473
10565
  [container_class]: true
10474
10566
  }
@@ -10743,7 +10835,7 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
10743
10835
  return _el$;
10744
10836
  }
10745
10837
  });
10746
- return $9HbP8$mergeProps1(block, {
10838
+ return $9HbP8$mergeProps(block, {
10747
10839
  // Create content divs for the blocks with as much fine-grained diffing as possible?
10748
10840
  content: () => {
10749
10841
  // 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
@@ -10984,7 +11076,7 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
10984
11076
  } = slider;
10985
11077
  const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
10986
11078
  // Do like this, so we don't have to call mergeProps ourselves
10987
- $9HbP8$createComponent(Layout, $9HbP8$mergeProps(layout_options_, {
11079
+ $9HbP8$createComponent(Layout, $9HbP8$mergeProps1(layout_options_, {
10988
11080
  rows: "all",
10989
11081
  get cols_at_size() {
10990
11082
  return modified_cols_at_size();
@@ -11489,7 +11581,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
11489
11581
  get children() {
11490
11582
  return (() => {
11491
11583
  var _el$34 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$5);
11492
- $9HbP8$insert(_el$34, $9HbP8$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $9HbP8$mergeProps(args_for_filtering_, {
11584
+ $9HbP8$insert(_el$34, $9HbP8$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $9HbP8$mergeProps1(args_for_filtering_, {
11493
11585
  are_in_modal_: true
11494
11586
  })));
11495
11587
  return _el$34;
@@ -12255,7 +12347,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
12255
12347
  [_el$8, _co$] = $9HbP8$getNextMarker(_el$7.nextSibling),
12256
12348
  _el$9 = _el$8.nextSibling,
12257
12349
  [_el$10, _co$2] = $9HbP8$getNextMarker(_el$9.nextSibling);
12258
- $9HbP8$insert(_el$4, $9HbP8$createComponent(LinkIfPossible, $9HbP8$mergeProps(make_link_attributes, {
12350
+ $9HbP8$insert(_el$4, $9HbP8$createComponent(LinkIfPossible, $9HbP8$mergeProps1(make_link_attributes, {
12259
12351
  tabIndex: "-1",
12260
12352
  get children() {
12261
12353
  return $9HbP8$createComponent((0, $190927650b4840eb$export$605674723bcc715c), {
@@ -12264,7 +12356,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
12264
12356
  });
12265
12357
  }
12266
12358
  })));
12267
- $9HbP8$insert(_el$5, $9HbP8$createComponent(LinkIfPossible, $9HbP8$mergeProps({
12359
+ $9HbP8$insert(_el$5, $9HbP8$createComponent(LinkIfPossible, $9HbP8$mergeProps1({
12268
12360
  "class": "content-title line-clamp"
12269
12361
  }, make_link_attributes, {
12270
12362
  get title() {
@@ -12411,7 +12503,7 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
12411
12503
  },
12412
12504
  number_of_results_: num_results
12413
12505
  }), _el$3, _co$);
12414
- $9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps({
12506
+ $9HbP8$insert(_el$, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
12415
12507
  layout: "grid",
12416
12508
  element_attributes: {
12417
12509
  class: "cards"
@@ -12798,7 +12890,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
12798
12890
  });
12799
12891
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
12800
12892
  const no_results_text_ = $9HbP8$createMemo(() => (search_results_()?.content_search_links?.length ? i18n_.no_products_ : i18n_.no_results_text_)());
12801
- const results_for = $9HbP8$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $9HbP8$mergeProps({
12893
+ const results_for = $9HbP8$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $9HbP8$mergeProps1({
12802
12894
  get type() {
12803
12895
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
12804
12896
  },
@@ -14691,7 +14783,7 @@ function $df5d81d0fe61ff21$var$add_us_to_crumbs(plp_meta) {
14691
14783
  return $9HbP8$createMemo(() => {
14692
14784
  const api_value = plp_meta()?.breadcrumbs;
14693
14785
  if (!api_value) return api_value;
14694
- return [...api_value, $9HbP8$mergeProps1(plp_meta(), {
14786
+ return [...api_value, $9HbP8$mergeProps(plp_meta(), {
14695
14787
  get page_url() {
14696
14788
  return href_accessor();
14697
14789
  }