@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.
- package/ES10/index.cjs +327 -203
- package/ES10/index.d.ts +242 -235
- package/ES10/index.js +361 -237
- package/latest/index.cjs +307 -188
- package/latest/index.d.ts +242 -235
- package/latest/index.js +341 -222
- package/package.json +2 -2
- package/server/ES10/index.cjs +312 -197
- package/server/ES10/index.d.ts +242 -235
- package/server/ES10/index.js +352 -237
- package/server/latest/index.cjs +290 -180
- package/server/latest/index.d.ts +242 -235
- package/server/latest/index.js +330 -220
package/server/ES10/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem,
|
|
2
|
-
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$
|
|
3
|
-
import { createSignal as $b8hua$createSignal, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, Show as $b8hua$Show, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner,
|
|
4
|
-
import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, standard_price_format as $b8hua$standard_price_format, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ContainedImage as $b8hua$ContainedImage, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
|
+
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps1, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, spread as $b8hua$spread, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
|
+
import { createSignal as $b8hua$createSignal, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, createEffect as $b8hua$createEffect, mergeProps as $b8hua$mergeProps, Show as $b8hua$Show, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, splitProps as $b8hua$splitProps, on as $b8hua$on, batch as $b8hua$batch, createSelector as $b8hua$createSelector, children as $b8hua$children, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
5
4
|
import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
6
6
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
7
7
|
import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
8
8
|
import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from "solid-js/store";
|
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.3.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.3.3";
|
|
14
14
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
15
15
|
const cols_at_size = [];
|
|
16
16
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -436,7 +436,7 @@ var $63f1f8dbcd07d3b0$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
|
|
|
436
436
|
$63f1f8dbcd07d3b0$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
|
|
437
437
|
function $63f1f8dbcd07d3b0$export$d21e32dfedac04be(props) {
|
|
438
438
|
const container_class = "x" + $b8hua$createUniqueId();
|
|
439
|
-
const container_element_ = $b8hua$ssrElement("div", $b8hua$
|
|
439
|
+
const container_element_ = $b8hua$ssrElement("div", $b8hua$mergeProps1(() => props.element_attributes, {
|
|
440
440
|
classList: {
|
|
441
441
|
[container_class]: true
|
|
442
442
|
}
|
|
@@ -640,7 +640,7 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
640
640
|
} = slider;
|
|
641
641
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
642
642
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
643
|
-
$b8hua$createComponent(Layout, $b8hua$
|
|
643
|
+
$b8hua$createComponent(Layout, $b8hua$mergeProps1({
|
|
644
644
|
rows: "all",
|
|
645
645
|
layout: "slider"
|
|
646
646
|
}, layout_options_));
|
|
@@ -919,7 +919,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
919
919
|
});
|
|
920
920
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
921
921
|
const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
|
|
922
|
-
const [, otherAttributes] = $b8hua$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 <-
|
|
922
|
+
const [, otherAttributes] = $b8hua$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 <-
|
|
923
923
|
]);
|
|
924
924
|
|
|
925
925
|
const [hasSetSize, setHasSetSize] = $b8hua$createSignal(false);
|
|
@@ -935,7 +935,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
935
935
|
if (loading === "force-lazy") return true;
|
|
936
936
|
return loading === "lazy" && !isPrioritisedImage();
|
|
937
937
|
});
|
|
938
|
-
const modifiedOtherAttributes = $b8hua$
|
|
938
|
+
const modifiedOtherAttributes = $b8hua$mergeProps(otherAttributes, {
|
|
939
939
|
get loading() {
|
|
940
940
|
return shouldActuallyEnableLazyLoading() ? "lazy" : undefined;
|
|
941
941
|
}
|
|
@@ -975,13 +975,18 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
975
975
|
let hasDecodedFastPath = false;
|
|
976
976
|
let timeoutSet = false;
|
|
977
977
|
let gotCleanedUp = false;
|
|
978
|
+
let srcJustChanged = true;
|
|
978
979
|
img.classList.add("s-responsive-image");
|
|
979
980
|
if (listingContext) {
|
|
980
981
|
let prevValue;
|
|
981
982
|
const aspectRatios = listingContext[$56047603f9d212b6$export$f8945274f08a3105] || (listingContext[$56047603f9d212b6$export$f8945274f08a3105] = new Set());
|
|
982
983
|
const [, setMostPrevalentAspectRatio] = listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] || (listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] = $b8hua$createSignal());
|
|
983
984
|
img.addEventListener("load", $b8hua$catchify(() => {
|
|
984
|
-
|
|
985
|
+
if (props.keyRatioUpdating) {
|
|
986
|
+
if (!srcJustChanged) return;
|
|
987
|
+
srcJustChanged = false;
|
|
988
|
+
}
|
|
989
|
+
// 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
|
|
985
990
|
const aspectRatio_ = img.naturalWidth / img.naturalHeight;
|
|
986
991
|
if (prevValue) aspectRatios.delete(prevValue);
|
|
987
992
|
const newValue = !isNaN(aspectRatio_) ? {
|
|
@@ -1002,7 +1007,11 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1002
1007
|
$b8hua$onCleanup(() => prevValue && aspectRatios.delete(prevValue));
|
|
1003
1008
|
}
|
|
1004
1009
|
$b8hua$onCleanup(() => gotCleanedUp = true);
|
|
1005
|
-
$b8hua$spread(img, $b8hua$
|
|
1010
|
+
$b8hua$spread(img, $b8hua$mergeProps(modifiedOtherAttributes), false, true);
|
|
1011
|
+
$b8hua$createRenderEffect(() => {
|
|
1012
|
+
props.src;
|
|
1013
|
+
srcJustChanged = true;
|
|
1014
|
+
});
|
|
1006
1015
|
$b8hua$createEffect(() => {
|
|
1007
1016
|
if (!props.size()) return; // wait until we have a size, run every time the size changes
|
|
1008
1017
|
if (timeoutSet) return;
|
|
@@ -1070,48 +1079,22 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1070
1079
|
context[$4df489344a0f97c7$export$d7b7ab832c20e2f4] = $b8hua$createSignal();
|
|
1071
1080
|
const [currentImageSize, setCurrentImageSize] = (context === null || context === void 0 ? void 0 : context[$4df489344a0f97c7$export$d7b7ab832c20e2f4]) || $4df489344a0f97c7$var$backupSizeSignal; // use global fallback signal (might lead to blurry images) if no context is available
|
|
1072
1081
|
const [mostPrevalentAspectRatio] = context ? context[(0, $56047603f9d212b6$export$6066eb417ed2e9f7)] || (context[(0, $56047603f9d212b6$export$6066eb417ed2e9f7)] = $b8hua$createSignal()) : [];
|
|
1073
|
-
const [aspectRatio, setAspectRatio] = $b8hua$createSignal($b8hua$untrack(() => props.aspectRatio));
|
|
1074
1082
|
const container = $801e8845d3fa3653$export$94026ee33dbabc26({
|
|
1075
1083
|
// Write getters manually instead of using JSX, so we can do more complex logic in the aspectRatio getter without increasing bundle size
|
|
1076
1084
|
get class() {
|
|
1077
1085
|
return props.class;
|
|
1078
1086
|
},
|
|
1079
1087
|
get aspectRatio() {
|
|
1080
|
-
|
|
1088
|
+
if (props.autoAdjustAspectRatio) {
|
|
1089
|
+
const targetRatio = mostPrevalentAspectRatio === null || mostPrevalentAspectRatio === void 0 ? void 0 : mostPrevalentAspectRatio();
|
|
1090
|
+
if (targetRatio != undefined) return "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(targetRatio, ")");
|
|
1091
|
+
}
|
|
1092
|
+
return props.aspectRatio;
|
|
1081
1093
|
}
|
|
1082
1094
|
});
|
|
1083
1095
|
const owner = $b8hua$getOwner();
|
|
1084
1096
|
let createdSizeAccessor = false;
|
|
1085
1097
|
let wasCleanedUp = false;
|
|
1086
|
-
let timeout;
|
|
1087
|
-
$b8hua$createEffect(() => {
|
|
1088
|
-
const {
|
|
1089
|
-
autoAdjustAspectRatio: autoAdjustAspectRatio
|
|
1090
|
-
} = props;
|
|
1091
|
-
if (autoAdjustAspectRatio) {
|
|
1092
|
-
const targetRatio = mostPrevalentAspectRatio === null || mostPrevalentAspectRatio === void 0 ? void 0 : mostPrevalentAspectRatio();
|
|
1093
|
-
if (targetRatio != undefined) {
|
|
1094
|
-
const targetValue = "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(targetRatio, ")");
|
|
1095
|
-
const updateAspectRatio = $b8hua$catchify(() => setAspectRatio(targetValue));
|
|
1096
|
-
if (autoAdjustAspectRatio === "smoothed") {
|
|
1097
|
-
if (!timeout)
|
|
1098
|
-
// 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).
|
|
1099
|
-
updateAspectRatio();
|
|
1100
|
-
clearTimeout(timeout);
|
|
1101
|
-
timeout = setTimeout(() => {
|
|
1102
|
-
timeout = undefined;
|
|
1103
|
-
updateAspectRatio();
|
|
1104
|
-
}, 500);
|
|
1105
|
-
return;
|
|
1106
|
-
}
|
|
1107
|
-
return updateAspectRatio();
|
|
1108
|
-
}
|
|
1109
|
-
} else {
|
|
1110
|
-
clearTimeout(timeout);
|
|
1111
|
-
timeout = undefined;
|
|
1112
|
-
}
|
|
1113
|
-
setAspectRatio(props.aspectRatio);
|
|
1114
|
-
});
|
|
1115
1098
|
$b8hua$createEffect(() => {
|
|
1116
1099
|
if (currentImageSize() || wasCleanedUp) return; // We get into the effect when onCleanup is called if we don't have wasCleanedUp
|
|
1117
1100
|
// ensure we always have a size accessor
|
|
@@ -1125,7 +1108,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1125
1108
|
$b8hua$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
|
|
1126
1109
|
});
|
|
1127
1110
|
|
|
1128
|
-
$b8hua$insert(container, $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $b8hua$
|
|
1111
|
+
$b8hua$insert(container, $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $b8hua$mergeProps1({
|
|
1129
1112
|
get size() {
|
|
1130
1113
|
return $b8hua$createMemo(() => {
|
|
1131
1114
|
var _currentImageSize;
|
|
@@ -1144,7 +1127,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1144
1127
|
return container;
|
|
1145
1128
|
}
|
|
1146
1129
|
function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
|
|
1147
|
-
return $b8hua$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $b8hua$
|
|
1130
|
+
return $b8hua$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $b8hua$mergeProps1(props, {
|
|
1148
1131
|
get imgProps() {
|
|
1149
1132
|
return {
|
|
1150
1133
|
...props.imgProps,
|
|
@@ -1161,6 +1144,12 @@ function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
|
|
|
1161
1144
|
}
|
|
1162
1145
|
}));
|
|
1163
1146
|
}
|
|
1147
|
+
function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
1148
|
+
return $b8hua$createMemo(() => {
|
|
1149
|
+
const price_formatting = props.price_formatting_;
|
|
1150
|
+
return $b8hua$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1164
1153
|
var $0c5b1686f971e5e7$var$_tmpl$ = ["<div", ' class="img-wrapper">', "</div>"],
|
|
1165
1154
|
$0c5b1686f971e5e7$var$_tmpl$2 = ["<span", ' class="d-price original">', "</span>"],
|
|
1166
1155
|
$0c5b1686f971e5e7$var$_tmpl$3 = ["<div", ' class="right-part"><div class="text-container"><span class="d-title line-clamp">', '</span><span class="', '">', "</span><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"];
|
|
@@ -1168,10 +1157,12 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1168
1157
|
let {
|
|
1169
1158
|
display_: display_,
|
|
1170
1159
|
FavoriteButton_: FavoriteButton_,
|
|
1171
|
-
|
|
1160
|
+
userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
|
|
1172
1161
|
textFadeInAnimationRunning_: textFadeInAnimationRunning_,
|
|
1173
1162
|
outerRef_: outerRef_,
|
|
1174
|
-
animationDuration_: animationDuration_
|
|
1163
|
+
animationDuration_: animationDuration_,
|
|
1164
|
+
priceFormatting_: priceFormatting_,
|
|
1165
|
+
pseudoRouter_: pseudoRouter_
|
|
1175
1166
|
} = _ref;
|
|
1176
1167
|
const variantToUse = $b8hua$createMemo(() => {
|
|
1177
1168
|
const display = display_();
|
|
@@ -1182,7 +1173,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1182
1173
|
return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : (_variantToUse$image_u = _variantToUse.image_urls) === null || _variantToUse$image_u === void 0 ? void 0 : _variantToUse$image_u[0];
|
|
1183
1174
|
});
|
|
1184
1175
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1185
|
-
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $b8hua$createSignal($b8hua$untrack(
|
|
1176
|
+
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $b8hua$createSignal($b8hua$untrack(userWantsExpanded));
|
|
1186
1177
|
const [animationEffectExists, setAnimationEffectExists] = $b8hua$createSignal(false);
|
|
1187
1178
|
const [salePrice] = $b8hua$createResource(() => {
|
|
1188
1179
|
var _variantToUse2;
|
|
@@ -1192,16 +1183,18 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1192
1183
|
var _variantToUse3;
|
|
1193
1184
|
return (_variantToUse3 = variantToUse()) === null || _variantToUse3 === void 0 ? void 0 : _variantToUse3.original_price;
|
|
1194
1185
|
});
|
|
1195
|
-
const isOnSale = $b8hua$createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
|
|
1186
|
+
const isOnSale = $b8hua$createMemo(() => !salePrice.loading && !originalPrice.loading && salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense after the initial load
|
|
1187
|
+
const enableLink = $b8hua$createMemo(() => userWantsExpanded() && !animationIsRunning());
|
|
1188
|
+
const href = $b8hua$createMemo(() => {
|
|
1189
|
+
var _variantToUse4;
|
|
1190
|
+
return (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url;
|
|
1191
|
+
});
|
|
1196
1192
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1197
|
-
return $b8hua$ssrElement("a", $b8hua$
|
|
1193
|
+
return $b8hua$ssrElement("a", $b8hua$mergeProps1({
|
|
1198
1194
|
"class": "look-item"
|
|
1199
|
-
}, () => {
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
href: (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url
|
|
1203
|
-
} : {};
|
|
1204
|
-
}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1195
|
+
}, () => enableLink() ? {
|
|
1196
|
+
href: href()
|
|
1197
|
+
} : {}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1205
1198
|
when: imageUrl,
|
|
1206
1199
|
get fallback() {
|
|
1207
1200
|
return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
@@ -1224,10 +1217,13 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1224
1217
|
return imageUrl();
|
|
1225
1218
|
},
|
|
1226
1219
|
get aspectRatio() {
|
|
1227
|
-
return
|
|
1220
|
+
return userWantsExpanded() ? 0.75 : 1;
|
|
1228
1221
|
},
|
|
1229
1222
|
get autoAdjustAspectRatio() {
|
|
1230
|
-
return
|
|
1223
|
+
return userWantsExpanded();
|
|
1224
|
+
},
|
|
1225
|
+
imgProps: {
|
|
1226
|
+
keyRatioUpdating: true
|
|
1231
1227
|
}
|
|
1232
1228
|
});
|
|
1233
1229
|
}
|
|
@@ -1235,25 +1231,73 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1235
1231
|
}
|
|
1236
1232
|
})), "<!--/-->", "<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1237
1233
|
get when() {
|
|
1238
|
-
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() :
|
|
1234
|
+
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1239
1235
|
},
|
|
1240
1236
|
get children() {
|
|
1241
1237
|
var _$escape2, _variantToUse5;
|
|
1242
1238
|
return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$3, $b8hua$ssrHydrationKey(), (_$escape2 = $b8hua$escape((_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title)) !== null && _$escape2 !== void 0 ? _$escape2 : $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
|
|
1243
1239
|
height: "1em",
|
|
1244
1240
|
width: "20ch"
|
|
1245
|
-
})), "d-price ".concat(isOnSale() ? "sale" : ""),
|
|
1246
|
-
height: "1em",
|
|
1247
|
-
width: "20ch"
|
|
1248
|
-
})) : $b8hua$escape(salePrice()), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1241
|
+
})), "d-price ".concat(isOnSale() ? "sale" : ""), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1249
1242
|
get when() {
|
|
1250
|
-
return
|
|
1243
|
+
return variantToUse() && !salePrice.loading;
|
|
1251
1244
|
},
|
|
1252
|
-
get
|
|
1253
|
-
return $b8hua$
|
|
1245
|
+
get fallback() {
|
|
1246
|
+
return $b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
|
|
1254
1247
|
height: "1em",
|
|
1255
1248
|
width: "20ch"
|
|
1256
|
-
})
|
|
1249
|
+
});
|
|
1250
|
+
},
|
|
1251
|
+
get children() {
|
|
1252
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
1253
|
+
get when() {
|
|
1254
|
+
return salePrice.latest;
|
|
1255
|
+
},
|
|
1256
|
+
get children() {
|
|
1257
|
+
return [priceFormatting_().pre_, $b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
|
|
1258
|
+
get price_() {
|
|
1259
|
+
return salePrice();
|
|
1260
|
+
},
|
|
1261
|
+
get price_formatting_() {
|
|
1262
|
+
return priceFormatting_();
|
|
1263
|
+
}
|
|
1264
|
+
}), priceFormatting_().post_];
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1269
|
+
get when() {
|
|
1270
|
+
return isOnSale();
|
|
1271
|
+
},
|
|
1272
|
+
get children() {
|
|
1273
|
+
return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1274
|
+
get when() {
|
|
1275
|
+
return variantToUse() && !originalPrice.loading;
|
|
1276
|
+
},
|
|
1277
|
+
get fallback() {
|
|
1278
|
+
return $b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
|
|
1279
|
+
height: "1em",
|
|
1280
|
+
width: "20ch"
|
|
1281
|
+
});
|
|
1282
|
+
},
|
|
1283
|
+
get children() {
|
|
1284
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
1285
|
+
get when() {
|
|
1286
|
+
return salePrice.latest;
|
|
1287
|
+
},
|
|
1288
|
+
get children() {
|
|
1289
|
+
return [priceFormatting_().pre_, $b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
|
|
1290
|
+
get price_() {
|
|
1291
|
+
return originalPrice();
|
|
1292
|
+
},
|
|
1293
|
+
get price_formatting_() {
|
|
1294
|
+
return priceFormatting_();
|
|
1295
|
+
}
|
|
1296
|
+
}), priceFormatting_().post_];
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
})));
|
|
1257
1301
|
}
|
|
1258
1302
|
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1259
1303
|
when: FavoriteButton_,
|
|
@@ -1321,10 +1365,12 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1321
1365
|
let {
|
|
1322
1366
|
displays_: displays_,
|
|
1323
1367
|
FavoriteButton_: FavoriteButton_,
|
|
1324
|
-
userWantsExpandedSignal_:
|
|
1368
|
+
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
1325
1369
|
containerWidth_: containerWidth_,
|
|
1326
1370
|
animationDuration_: animationDuration_,
|
|
1327
|
-
supportsHover_: supportsHover_
|
|
1371
|
+
supportsHover_: supportsHover_,
|
|
1372
|
+
priceFormatting_: priceFormatting_,
|
|
1373
|
+
pseudoRouter_: pseudoRouter_
|
|
1328
1374
|
} = _ref;
|
|
1329
1375
|
let isAffectedByChromeBug = false;
|
|
1330
1376
|
// If the user requests the drawer to be expanded or not
|
|
@@ -1333,6 +1379,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1333
1379
|
// The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
|
|
1334
1380
|
const textFadeInAnimationRunning = $b8hua$createSignal(false);
|
|
1335
1381
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1382
|
+
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1336
1383
|
$72017ebd8b9df947$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1337
1384
|
return $b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
1338
1385
|
get children() {
|
|
@@ -1341,7 +1388,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1341
1388
|
return containerWidth_() || !displays_;
|
|
1342
1389
|
},
|
|
1343
1390
|
get children() {
|
|
1344
|
-
return $b8hua$ssr($4089a7972a508539$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrElement("div", $b8hua$
|
|
1391
|
+
return $b8hua$ssr($4089a7972a508539$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrElement("div", $b8hua$mergeProps1({
|
|
1345
1392
|
get ["class"]() {
|
|
1346
1393
|
return "look-overlay ".concat(userWantsExpanded() ? "expanded" : "", " ").concat(!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : "");
|
|
1347
1394
|
}
|
|
@@ -1355,11 +1402,13 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1355
1402
|
},
|
|
1356
1403
|
children: (display, index) => {
|
|
1357
1404
|
return $b8hua$createComponent((0, $0c5b1686f971e5e7$export$b73ed90f0ee50dc3), {
|
|
1405
|
+
pseudoRouter_: pseudoRouter_,
|
|
1358
1406
|
animationDuration_: animationDuration_,
|
|
1359
1407
|
display_: display,
|
|
1360
1408
|
FavoriteButton_: FavoriteButton_,
|
|
1361
|
-
|
|
1409
|
+
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
1362
1410
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1411
|
+
priceFormatting_: priceFormatting_,
|
|
1363
1412
|
outerRef_: el => $b8hua$createEffect(() => {
|
|
1364
1413
|
if (index !== 0) return;
|
|
1365
1414
|
const resizeObserver = new ResizeObserver($b8hua$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -1401,10 +1450,10 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1401
1450
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
1402
1451
|
FavoriteButton_: FavoriteButton_,
|
|
1403
1452
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
1404
|
-
animationDuration_: animationDuration_
|
|
1453
|
+
animationDuration_: animationDuration_,
|
|
1454
|
+
priceFormatting_: priceFormatting_,
|
|
1455
|
+
pseudoRouter_: pseudoRouter_
|
|
1405
1456
|
} = _ref;
|
|
1406
|
-
// TODO: shopify, run displayTransformers to get dynamic prices
|
|
1407
|
-
// TODO: format prices
|
|
1408
1457
|
const [coverImage] = (display_ === null || display_ === void 0 ? void 0 : display_.image_urls) || [];
|
|
1409
1458
|
const useWantsExpandedSignal_ = $b8hua$createSignal(false);
|
|
1410
1459
|
const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
|
|
@@ -1437,7 +1486,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1437
1486
|
when: display_,
|
|
1438
1487
|
get fallback() {
|
|
1439
1488
|
return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
1440
|
-
aspectRatio: placeholderImageAspectRatio_
|
|
1489
|
+
aspectRatio: "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(placeholderImageAspectRatio_, ")")
|
|
1441
1490
|
});
|
|
1442
1491
|
},
|
|
1443
1492
|
get children() {
|
|
@@ -1455,10 +1504,136 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1455
1504
|
containerWidth_: containerWidth_,
|
|
1456
1505
|
animationDuration_: animationDuration_,
|
|
1457
1506
|
supportsHover_: supportsHover_,
|
|
1458
|
-
FavoriteButton_: FavoriteButton_
|
|
1507
|
+
FavoriteButton_: FavoriteButton_,
|
|
1508
|
+
priceFormatting_: priceFormatting_,
|
|
1509
|
+
pseudoRouter_: pseudoRouter_
|
|
1459
1510
|
})]);
|
|
1460
1511
|
return container;
|
|
1461
1512
|
}
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* 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
|
|
1516
|
+
* @param clickEvent The click event that triggered the navigation
|
|
1517
|
+
*/
|
|
1518
|
+
function $9b35d1384e31813a$export$29d28dadc2d6b631(clickEvent) {
|
|
1519
|
+
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
1520
|
+
);
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
1524
|
+
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
1525
|
+
privateSet.add(obj);
|
|
1526
|
+
}
|
|
1527
|
+
function $ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateCollection) {
|
|
1528
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
1529
|
+
}
|
|
1530
|
+
function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn) {
|
|
1531
|
+
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
1532
|
+
return fn;
|
|
1533
|
+
}
|
|
1534
|
+
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
1535
|
+
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
1536
|
+
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
1537
|
+
/**
|
|
1538
|
+
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
1539
|
+
*/ /**
|
|
1540
|
+
* 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
|
|
1541
|
+
*/ /**
|
|
1542
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
1543
|
+
* This standardises waiting for all kinds of routers
|
|
1544
|
+
*/
|
|
1545
|
+
constructor(on_navigation, listing_query_state_key) {
|
|
1546
|
+
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
1547
|
+
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
1548
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
1549
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
1550
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "navigate_", {
|
|
1551
|
+
/**
|
|
1552
|
+
* Call this if you *just* want to replace the state object in history.state
|
|
1553
|
+
*/
|
|
1554
|
+
replace_state_: new_state => {
|
|
1555
|
+
var _globalThis$history;
|
|
1556
|
+
// 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
|
|
1557
|
+
globalThis === null || globalThis === void 0 || (_globalThis$history = globalThis.history) === null || _globalThis$history === void 0 || _globalThis$history.replaceState(new_state, "");
|
|
1558
|
+
},
|
|
1559
|
+
/**
|
|
1560
|
+
* Call this to change the URL
|
|
1561
|
+
* @param new_url_ new URL to go to
|
|
1562
|
+
* @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
|
|
1563
|
+
* @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
|
|
1564
|
+
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
1565
|
+
* @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
|
|
1566
|
+
*/
|
|
1567
|
+
go_to_: $b8hua$catchify(async _ref => {
|
|
1568
|
+
let {
|
|
1569
|
+
new_url_: raw_new_url,
|
|
1570
|
+
event_: event_,
|
|
1571
|
+
force_spa_navigation_: force_spa_navigation_,
|
|
1572
|
+
is_replace_: is_replace_,
|
|
1573
|
+
listing_query_: listing_query_,
|
|
1574
|
+
scroll = true
|
|
1575
|
+
} = _ref;
|
|
1576
|
+
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
1577
|
+
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
1578
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
1579
|
+
const different_origin = new_url_.origin !== location.origin;
|
|
1580
|
+
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
1581
|
+
if (force_spa_navigation_ && different_origin)
|
|
1582
|
+
// If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
|
|
1583
|
+
$b8hua$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
|
|
1584
|
+
if (!event_)
|
|
1585
|
+
// If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
|
|
1586
|
+
location.assign(new_url_);
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
event_ === null || event_ === void 0 || event_.preventDefault();
|
|
1590
|
+
const promise = $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_get_navigation_happened_promise, $ac571292d606f30b$var$_get_navigation_happened_promise2).call(this, true);
|
|
1591
|
+
if (force_spa_navigation_ && wants_hard_navigation) {
|
|
1592
|
+
// Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
|
|
1593
|
+
const new_state = history.state;
|
|
1594
|
+
if (listing_query_) {
|
|
1595
|
+
// In JS-UI we need to know the listing_id of the current category, therefore push it into state
|
|
1596
|
+
if (!this.listing_query_state_key) $b8hua$report(new Error("listing_query_state_key is not set"), "error");
|
|
1597
|
+
new_state[this.listing_query_state_key] = listing_query_;
|
|
1598
|
+
}
|
|
1599
|
+
history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
|
|
1600
|
+
} else $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_throwing_on_navigation, $ac571292d606f30b$var$_throwing_on_navigation2).call(this, {
|
|
1601
|
+
is_replace: is_replace_,
|
|
1602
|
+
new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
|
|
1603
|
+
scroll: scroll
|
|
1604
|
+
});
|
|
1605
|
+
await promise;
|
|
1606
|
+
})
|
|
1607
|
+
});
|
|
1608
|
+
this.listing_query_state_key = listing_query_state_key;
|
|
1609
|
+
this.on_navigation_ = on_navigation;
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
1613
|
+
const {
|
|
1614
|
+
on_navigation_: on_navigation_
|
|
1615
|
+
} = this;
|
|
1616
|
+
if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
|
|
1617
|
+
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
1618
|
+
try {
|
|
1619
|
+
return on_navigation_(...arguments);
|
|
1620
|
+
} catch (e) {
|
|
1621
|
+
queueMicrotask(() => {
|
|
1622
|
+
throw e;
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
1627
|
+
return new Promise(resolve => {
|
|
1628
|
+
const handler = what_happened => {
|
|
1629
|
+
if (what_happened === (is_replace ? "replaceState" : "pushState")) {
|
|
1630
|
+
resolve();
|
|
1631
|
+
(0, $b8hua$instant_exec_on_suspect_history_change).delete(handler);
|
|
1632
|
+
}
|
|
1633
|
+
};
|
|
1634
|
+
(0, $b8hua$instant_exec_on_suspect_history_change).add(handler);
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1462
1637
|
var $cee56a95f722f55f$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
|
|
1463
1638
|
let $cee56a95f722f55f$var$expandedLooksSignal_;
|
|
1464
1639
|
function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
@@ -1467,6 +1642,7 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
|
1467
1642
|
equals: false
|
|
1468
1643
|
}));
|
|
1469
1644
|
const expandingAnimationDuration = 240;
|
|
1645
|
+
const pseudoRouter = new (0, $ac571292d606f30b$export$7e1297a3a19f10d8)("hard_navigation");
|
|
1470
1646
|
const grid_spacing_override = $b8hua$createMemo(() => {
|
|
1471
1647
|
const {
|
|
1472
1648
|
gridSpacing_: gridSpacing_
|
|
@@ -1494,19 +1670,35 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
|
1494
1670
|
});
|
|
1495
1671
|
const decoded = await (response === null || response === void 0 ? void 0 : (_json = (_ref2 = response).json) === null || _json === void 0 ? void 0 : _json.call(_ref2).catch(() => false));
|
|
1496
1672
|
if (!decoded)
|
|
1497
|
-
// If network fails, make sure to return empty array
|
|
1673
|
+
// If network fails, make sure to return empty array and SolidRecommendationSlider will remove its elements
|
|
1498
1674
|
return [];
|
|
1499
|
-
|
|
1675
|
+
const {
|
|
1676
|
+
listings: listings
|
|
1677
|
+
} = decoded;
|
|
1678
|
+
const baseData = {
|
|
1679
|
+
merchant: merchant,
|
|
1680
|
+
market: market,
|
|
1681
|
+
locale: locale
|
|
1682
|
+
};
|
|
1683
|
+
return $cee56a95f722f55f$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
1684
|
+
});
|
|
1685
|
+
$b8hua$createEffect(() => {
|
|
1686
|
+
const {
|
|
1687
|
+
onNavigation_: onNavigation_
|
|
1688
|
+
} = props;
|
|
1689
|
+
if (onNavigation_) pseudoRouter.on_navigation_ = onNavigation_;
|
|
1500
1690
|
});
|
|
1501
1691
|
return $b8hua$ssr($cee56a95f722f55f$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("--animation-duration: ".concat(expandingAnimationDuration, "ms")), $b8hua$escape($b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
1502
1692
|
get children() {
|
|
1503
1693
|
return $39ddb986053fb759$export$d41d19e89346fa2({
|
|
1504
|
-
product_card_template_:
|
|
1694
|
+
product_card_template_: display => $697d8713dc82b9ab$export$44809a8a3e867e30({
|
|
1505
1695
|
display_: display,
|
|
1506
1696
|
FavoriteButton_: props.FavoriteButton_,
|
|
1507
1697
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
1508
1698
|
animationDuration_: expandingAnimationDuration,
|
|
1509
|
-
expandedLooksSignal_: $cee56a95f722f55f$var$expandedLooksSignal_
|
|
1699
|
+
expandedLooksSignal_: $cee56a95f722f55f$var$expandedLooksSignal_,
|
|
1700
|
+
priceFormatting_: () => props.priceFormatting_,
|
|
1701
|
+
pseudoRouter_: pseudoRouter
|
|
1510
1702
|
}),
|
|
1511
1703
|
recommendations_resource_: looksResource,
|
|
1512
1704
|
title_: () => props.title_,
|
|
@@ -1519,6 +1711,58 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
|
1519
1711
|
})));
|
|
1520
1712
|
}, "LookSlider failed");
|
|
1521
1713
|
}
|
|
1714
|
+
async function $cee56a95f722f55f$var$runDisplayTransformersForLooks(baseData, listings, displayTransformers) {
|
|
1715
|
+
try {
|
|
1716
|
+
const {
|
|
1717
|
+
products: productTransformer,
|
|
1718
|
+
categories: providedListingTransformer
|
|
1719
|
+
} = displayTransformers || {};
|
|
1720
|
+
if (!productTransformer && !providedListingTransformer) return listings;
|
|
1721
|
+
const listingTransformer = providedListingTransformer || (_ref3 => {
|
|
1722
|
+
let {
|
|
1723
|
+
data: data
|
|
1724
|
+
} = _ref3;
|
|
1725
|
+
return data;
|
|
1726
|
+
});
|
|
1727
|
+
const displaysToTransform = [];
|
|
1728
|
+
const displayIdsPerListingId = {};
|
|
1729
|
+
const transformedListingsPromise = listingTransformer({
|
|
1730
|
+
...baseData,
|
|
1731
|
+
data: listings.map(_ref4 => {
|
|
1732
|
+
let {
|
|
1733
|
+
displays: displays,
|
|
1734
|
+
...listing
|
|
1735
|
+
} = _ref4;
|
|
1736
|
+
// Populate our displays by id and displayIdToListings object in the .map where we add ancestors to the listings, for peak efficiency
|
|
1737
|
+
for (let i = 0; i < displays.length; i++) {
|
|
1738
|
+
var _listing$listing_id;
|
|
1739
|
+
const display = displays[i];
|
|
1740
|
+
const uniqueIdOfDisplay = $6a4c7ed6d005505c$export$548d053aba053d79(display);
|
|
1741
|
+
displaysToTransform.push(display);
|
|
1742
|
+
(displayIdsPerListingId[_listing$listing_id = listing.listing_id] || (displayIdsPerListingId[_listing$listing_id] = [])).push(uniqueIdOfDisplay);
|
|
1743
|
+
}
|
|
1744
|
+
return {
|
|
1745
|
+
...listing,
|
|
1746
|
+
ancestors: []
|
|
1747
|
+
};
|
|
1748
|
+
})
|
|
1749
|
+
});
|
|
1750
|
+
// This allows the person providing the displayTransformer to re-order and remove displays
|
|
1751
|
+
const transformedProducts = productTransformer ? await productTransformer({
|
|
1752
|
+
...baseData,
|
|
1753
|
+
displays: displaysToTransform
|
|
1754
|
+
}) : displaysToTransform;
|
|
1755
|
+
const transformedListings = await transformedListingsPromise;
|
|
1756
|
+
const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$6a4c7ed6d005505c$export$548d053aba053d79(display), display]));
|
|
1757
|
+
return transformedListings.map(listing => $b8hua$mergeProps(listing, {
|
|
1758
|
+
// use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
|
|
1759
|
+
displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
|
|
1760
|
+
}));
|
|
1761
|
+
} catch (e) {
|
|
1762
|
+
$b8hua$dwarn("Displaytransformers threw", e);
|
|
1763
|
+
return [];
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1522
1766
|
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
1523
1767
|
let $68e6625c8d51f847$var$has_ran = false;
|
|
1524
1768
|
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
@@ -1560,15 +1804,6 @@ function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
|
1560
1804
|
}
|
|
1561
1805
|
}
|
|
1562
1806
|
|
|
1563
|
-
/**
|
|
1564
|
-
* 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
|
|
1565
|
-
* @param clickEvent The click event that triggered the navigation
|
|
1566
|
-
*/
|
|
1567
|
-
function $9b35d1384e31813a$export$29d28dadc2d6b631(clickEvent) {
|
|
1568
|
-
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
1569
|
-
);
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
1807
|
/**
|
|
1573
1808
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
1574
1809
|
*/
|
|
@@ -1609,12 +1844,6 @@ function $01c33966d9ddb108$export$f50b88e2a00918b5(fn) {
|
|
|
1609
1844
|
}
|
|
1610
1845
|
};
|
|
1611
1846
|
}
|
|
1612
|
-
function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
1613
|
-
return $b8hua$createMemo(() => {
|
|
1614
|
-
const price_formatting = props.price_formatting_;
|
|
1615
|
-
return $b8hua$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1616
|
-
});
|
|
1617
|
-
}
|
|
1618
1847
|
function $d0883254246d3eb6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
|
|
1619
1848
|
const isSelected = $b8hua$createMemo(() => {
|
|
1620
1849
|
const selectedValue = selectedIndex();
|
|
@@ -1944,7 +2173,7 @@ function $6d95ef50ee01d5a1$export$5d2caaa6b530761c() {
|
|
|
1944
2173
|
var $9783d437ad61594c$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>';
|
|
1945
2174
|
function $9783d437ad61594c$export$3b621d86b1566b2() {
|
|
1946
2175
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1947
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
2176
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
1948
2177
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1949
2178
|
width: "21.064",
|
|
1950
2179
|
height: "21.064",
|
|
@@ -2050,7 +2279,7 @@ function $02b6641aa50ce528$export$ba17c5b7e6dda39f(_ref) {
|
|
|
2050
2279
|
var $ef0f18a578b32578$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>';
|
|
2051
2280
|
function $ef0f18a578b32578$export$82eafebb825fc23f() {
|
|
2052
2281
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2053
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
2282
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
2054
2283
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2055
2284
|
width: "20",
|
|
2056
2285
|
height: "22",
|
|
@@ -2060,7 +2289,7 @@ function $ef0f18a578b32578$export$82eafebb825fc23f() {
|
|
|
2060
2289
|
var $3c5e15c6ee4227a9$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>';
|
|
2061
2290
|
function $3c5e15c6ee4227a9$export$605674723bcc715c() {
|
|
2062
2291
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2063
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
2292
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
2064
2293
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2065
2294
|
width: "32",
|
|
2066
2295
|
height: "32",
|
|
@@ -2648,7 +2877,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
2648
2877
|
get children() {
|
|
2649
2878
|
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.back_(), true), false), $b8hua$escape($b8hua$createComponent(BackIcon_, {})));
|
|
2650
2879
|
}
|
|
2651
|
-
})), "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_field_field_aria_label_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(search_field_value_[0](), true), false) + $b8hua$ssrAttribute("placeholder", $b8hua$escape(i18n_.placeholder_text_(), true), false), $b8hua$ssrAttribute("title", $b8hua$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $b8hua$ssrStyle($b8hua$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$ssrElement("button", $b8hua$
|
|
2880
|
+
})), "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_field_field_aria_label_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(search_field_value_[0](), true), false) + $b8hua$ssrAttribute("placeholder", $b8hua$escape(i18n_.placeholder_text_(), true), false), $b8hua$ssrAttribute("title", $b8hua$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $b8hua$ssrStyle($b8hua$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$ssrElement("button", $b8hua$mergeProps1({
|
|
2652
2881
|
"class": "submit major",
|
|
2653
2882
|
type: "button"
|
|
2654
2883
|
}, () => isNewModal ? {
|
|
@@ -3186,7 +3415,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
3186
3415
|
var _listing_;
|
|
3187
3416
|
return (_listing_ = listing_()) === null || _listing_ === void 0 ? void 0 : _listing_.page_url;
|
|
3188
3417
|
}); // <- 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
|
|
3189
|
-
const LinkToListing = props => $b8hua$ssrElement("a", $b8hua$
|
|
3418
|
+
const LinkToListing = props => $b8hua$ssrElement("a", $b8hua$mergeProps1(props, {
|
|
3190
3419
|
get href() {
|
|
3191
3420
|
return href();
|
|
3192
3421
|
}
|
|
@@ -3497,7 +3726,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
3497
3726
|
$b8hua$createComputed($b8hua$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
|
|
3498
3727
|
defer: true
|
|
3499
3728
|
})); // reset autocomplete position if query changes
|
|
3500
|
-
return [$b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$
|
|
3729
|
+
return [$b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$mergeProps1(sharedSuggestionProps, {
|
|
3501
3730
|
get title_() {
|
|
3502
3731
|
return i18n_.popular_;
|
|
3503
3732
|
},
|
|
@@ -3507,7 +3736,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
3507
3736
|
return itemIndexes_.suggestionsIndex_;
|
|
3508
3737
|
},
|
|
3509
3738
|
showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
|
|
3510
|
-
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$
|
|
3739
|
+
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$mergeProps1(sharedSuggestionProps, {
|
|
3511
3740
|
get title_() {
|
|
3512
3741
|
return i18n_.previous_;
|
|
3513
3742
|
},
|
|
@@ -3518,7 +3747,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
3518
3747
|
},
|
|
3519
3748
|
extraTitleRowElements_: () => $b8hua$ssr($4acc866f8fdfc002$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(i18n_.clear_all_from_filter_crumbs_())),
|
|
3520
3749
|
showPlaceholders_: () => false
|
|
3521
|
-
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$
|
|
3750
|
+
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$mergeProps1(sharedSuggestionProps, {
|
|
3522
3751
|
get title_() {
|
|
3523
3752
|
return i18n_.content_;
|
|
3524
3753
|
},
|
|
@@ -3931,7 +4160,7 @@ function $6a439680ae7e9ba3$export$b2539bed5023c21c(props) {
|
|
|
3931
4160
|
return $b8hua$createComponent($6a439680ae7e9ba3$var$TabsContext.Provider, {
|
|
3932
4161
|
value: new (0, $b8hua$ListenableSet)(),
|
|
3933
4162
|
get children() {
|
|
3934
|
-
return $b8hua$createComponent($6a439680ae7e9ba3$var$ActualTabs, $b8hua$
|
|
4163
|
+
return $b8hua$createComponent($6a439680ae7e9ba3$var$ActualTabs, $b8hua$mergeProps1(props, {
|
|
3935
4164
|
get children() {
|
|
3936
4165
|
return props.children;
|
|
3937
4166
|
}
|
|
@@ -3961,7 +4190,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
3961
4190
|
},
|
|
3962
4191
|
children: item => {
|
|
3963
4192
|
const weSelected = $b8hua$createMemo(() => isSelected(item().id));
|
|
3964
|
-
return $b8hua$createComponent((0, $b8hua$Dynamic), $b8hua$
|
|
4193
|
+
return $b8hua$createComponent((0, $b8hua$Dynamic), $b8hua$mergeProps1({
|
|
3965
4194
|
get component() {
|
|
3966
4195
|
return props.AnchorComponent;
|
|
3967
4196
|
},
|
|
@@ -4044,7 +4273,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
4044
4273
|
if (!currentTabs) throw new Error("Tab must be a child of Tabs");
|
|
4045
4274
|
const id = $b8hua$createUniqueId();
|
|
4046
4275
|
const ourSet = currentTabs;
|
|
4047
|
-
const extendedProps = $b8hua$
|
|
4276
|
+
const extendedProps = $b8hua$mergeProps({
|
|
4048
4277
|
id: id
|
|
4049
4278
|
}, props);
|
|
4050
4279
|
ourSet.add(extendedProps);
|
|
@@ -4164,120 +4393,6 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
4164
4393
|
}
|
|
4165
4394
|
});
|
|
4166
4395
|
}
|
|
4167
|
-
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
4168
|
-
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
4169
|
-
privateSet.add(obj);
|
|
4170
|
-
}
|
|
4171
|
-
function $ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateCollection) {
|
|
4172
|
-
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4173
|
-
}
|
|
4174
|
-
function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn) {
|
|
4175
|
-
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
4176
|
-
return fn;
|
|
4177
|
-
}
|
|
4178
|
-
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
4179
|
-
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
4180
|
-
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
4181
|
-
/**
|
|
4182
|
-
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
4183
|
-
*/ /**
|
|
4184
|
-
* 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
|
|
4185
|
-
*/ /**
|
|
4186
|
-
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
4187
|
-
* This standardises waiting for all kinds of routers
|
|
4188
|
-
*/
|
|
4189
|
-
constructor(on_navigation, listing_query_state_key) {
|
|
4190
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
4191
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
4192
|
-
$b8hua$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
4193
|
-
$b8hua$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
4194
|
-
$b8hua$babelruntimehelpersdefineProperty(this, "navigate_", {
|
|
4195
|
-
/**
|
|
4196
|
-
* Call this if you *just* want to replace the state object in history.state
|
|
4197
|
-
*/
|
|
4198
|
-
replace_state_: new_state => {
|
|
4199
|
-
var _globalThis$history;
|
|
4200
|
-
// 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
|
|
4201
|
-
globalThis === null || globalThis === void 0 || (_globalThis$history = globalThis.history) === null || _globalThis$history === void 0 || _globalThis$history.replaceState(new_state, "");
|
|
4202
|
-
},
|
|
4203
|
-
/**
|
|
4204
|
-
* Call this to change the URL
|
|
4205
|
-
* @param new_url_ new URL to go to
|
|
4206
|
-
* @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
|
|
4207
|
-
* @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
|
|
4208
|
-
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
4209
|
-
* @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
|
|
4210
|
-
*/
|
|
4211
|
-
go_to_: $b8hua$catchify(async _ref => {
|
|
4212
|
-
let {
|
|
4213
|
-
new_url_: raw_new_url,
|
|
4214
|
-
event_: event_,
|
|
4215
|
-
force_spa_navigation_: force_spa_navigation_,
|
|
4216
|
-
is_replace_: is_replace_,
|
|
4217
|
-
listing_query_: listing_query_,
|
|
4218
|
-
scroll = true
|
|
4219
|
-
} = _ref;
|
|
4220
|
-
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
4221
|
-
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
4222
|
-
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
4223
|
-
const different_origin = new_url_.origin !== location.origin;
|
|
4224
|
-
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
4225
|
-
if (force_spa_navigation_ && different_origin)
|
|
4226
|
-
// If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
|
|
4227
|
-
$b8hua$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
|
|
4228
|
-
if (!event_)
|
|
4229
|
-
// If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
|
|
4230
|
-
location.assign(new_url_);
|
|
4231
|
-
return;
|
|
4232
|
-
}
|
|
4233
|
-
event_ === null || event_ === void 0 || event_.preventDefault();
|
|
4234
|
-
const promise = $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_get_navigation_happened_promise, $ac571292d606f30b$var$_get_navigation_happened_promise2).call(this, true);
|
|
4235
|
-
if (force_spa_navigation_ && wants_hard_navigation) {
|
|
4236
|
-
// Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
|
|
4237
|
-
const new_state = history.state;
|
|
4238
|
-
if (listing_query_) {
|
|
4239
|
-
// In JS-UI we need to know the listing_id of the current category, therefore push it into state
|
|
4240
|
-
if (!this.listing_query_state_key) $b8hua$report(new Error("listing_query_state_key is not set"), "error");
|
|
4241
|
-
new_state[this.listing_query_state_key] = listing_query_;
|
|
4242
|
-
}
|
|
4243
|
-
history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
|
|
4244
|
-
} else $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_throwing_on_navigation, $ac571292d606f30b$var$_throwing_on_navigation2).call(this, {
|
|
4245
|
-
is_replace: is_replace_,
|
|
4246
|
-
new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
|
|
4247
|
-
scroll: scroll
|
|
4248
|
-
});
|
|
4249
|
-
await promise;
|
|
4250
|
-
})
|
|
4251
|
-
});
|
|
4252
|
-
this.listing_query_state_key = listing_query_state_key;
|
|
4253
|
-
this.on_navigation_ = on_navigation;
|
|
4254
|
-
}
|
|
4255
|
-
}
|
|
4256
|
-
function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
4257
|
-
const {
|
|
4258
|
-
on_navigation_: on_navigation_
|
|
4259
|
-
} = this;
|
|
4260
|
-
if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
|
|
4261
|
-
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
4262
|
-
try {
|
|
4263
|
-
return on_navigation_(...arguments);
|
|
4264
|
-
} catch (e) {
|
|
4265
|
-
queueMicrotask(() => {
|
|
4266
|
-
throw e;
|
|
4267
|
-
});
|
|
4268
|
-
}
|
|
4269
|
-
}
|
|
4270
|
-
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
4271
|
-
return new Promise(resolve => {
|
|
4272
|
-
const handler = what_happened => {
|
|
4273
|
-
if (what_happened === (is_replace ? "replaceState" : "pushState")) {
|
|
4274
|
-
resolve();
|
|
4275
|
-
(0, $b8hua$instant_exec_on_suspect_history_change).delete(handler);
|
|
4276
|
-
}
|
|
4277
|
-
};
|
|
4278
|
-
(0, $b8hua$instant_exec_on_suspect_history_change).add(handler);
|
|
4279
|
-
});
|
|
4280
|
-
}
|
|
4281
4396
|
var $b652875d5a5139ec$var$_tmpl$ = ["<div", ' class="image-container">', "</div>"];
|
|
4282
4397
|
function $b652875d5a5139ec$export$41e1a079d40a0d58(props) {
|
|
4283
4398
|
const [display] = $b8hua$createResource(() => ({
|
|
@@ -4377,7 +4492,7 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
4377
4492
|
get children() {
|
|
4378
4493
|
return $b8hua$ssr($e3efeb558d952696$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(title()));
|
|
4379
4494
|
}
|
|
4380
|
-
}), $b8hua$ssr($e3efeb558d952696$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$
|
|
4495
|
+
}), $b8hua$ssr($e3efeb558d952696$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
4381
4496
|
get rows() {
|
|
4382
4497
|
return rows_object_();
|
|
4383
4498
|
},
|
|
@@ -4673,7 +4788,7 @@ function $6b0fd8fd20df8ccf$var$ActualShopTheLookButton(props) {
|
|
|
4673
4788
|
}, true);
|
|
4674
4789
|
$b8hua$createEffect(() => button.style.display = displayStyleValue()); // Set our attributes like this, so we allow total control over the button from the outside via buttonAttributes
|
|
4675
4790
|
$b8hua$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
|
|
4676
|
-
$6b0fd8fd20df8ccf$var$modalProps = $b8hua$
|
|
4791
|
+
$6b0fd8fd20df8ccf$var$modalProps = $b8hua$mergeProps(partForModal, {
|
|
4677
4792
|
products_to_shop_: products_to_shop_
|
|
4678
4793
|
});
|
|
4679
4794
|
button.addEventListener("click", openModal);
|
|
@@ -5109,7 +5224,7 @@ const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
|
|
|
5109
5224
|
};
|
|
5110
5225
|
var $ff3225aef892a467$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>';
|
|
5111
5226
|
function $ff3225aef892a467$export$f21ab0717a89c77f(props) {
|
|
5112
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
5227
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1(props, {
|
|
5113
5228
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5114
5229
|
width: "11",
|
|
5115
5230
|
height: "12"
|
|
@@ -6377,7 +6492,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
6377
6492
|
const MakeButton = attributes => {
|
|
6378
6493
|
const label = $b8hua$createMemo(() => value().name_ || value().value_ + "");
|
|
6379
6494
|
const count_zero = $b8hua$createMemo(() => value().count_ === 0);
|
|
6380
|
-
return $b8hua$ssrElement("button", $b8hua$
|
|
6495
|
+
return $b8hua$ssrElement("button", $b8hua$mergeProps1(attributes, {
|
|
6381
6496
|
get disabled() {
|
|
6382
6497
|
return count_zero() && !is_selected();
|
|
6383
6498
|
},
|
|
@@ -6687,7 +6802,7 @@ var $d2988f745661df9c$export$2e2bcd8739ae039 = {
|
|
|
6687
6802
|
var $905f44be08b7378e$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>';
|
|
6688
6803
|
function $905f44be08b7378e$export$f2ca6fc699ca1fb4() {
|
|
6689
6804
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6690
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
6805
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
6691
6806
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6692
6807
|
width: "16.8",
|
|
6693
6808
|
height: "14"
|
|
@@ -7830,7 +7945,7 @@ async function $284849364a6ef73a$var$_run_url_creator_for_suggest2(merchant, mar
|
|
|
7830
7945
|
// Filter out our transformed ancestors
|
|
7831
7946
|
const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
|
|
7832
7947
|
// Add the now transformed ancestors into the ancestors of the listing suggestions
|
|
7833
|
-
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $b8hua$
|
|
7948
|
+
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $b8hua$mergeProps(item, {
|
|
7834
7949
|
// Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
|
|
7835
7950
|
ancestors: item.ancestors.map(ancestor => {
|
|
7836
7951
|
const newAncestor = transformedAncestors[ancestor.listing_id];
|
|
@@ -8337,7 +8452,7 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
8337
8452
|
return (0, $981356a8bf29ad72$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...possible_num_columns);
|
|
8338
8453
|
});
|
|
8339
8454
|
// Don't tear down elements every time one updates the page - don't put them within <Show>
|
|
8340
|
-
const elements = $b8hua$ssr($8ef6232475d44150$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(i18n_.search_recs_title_()), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$
|
|
8455
|
+
const elements = $b8hua$ssr($8ef6232475d44150$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(i18n_.search_recs_title_()), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
8341
8456
|
rows: rows_object,
|
|
8342
8457
|
layout: "grid",
|
|
8343
8458
|
element_attributes: {
|
|
@@ -9194,7 +9309,7 @@ var $64d94dcaa058dc7b$var$_tmpl$ = ["<style", ' type="text/css">', "</style>"];
|
|
|
9194
9309
|
const $64d94dcaa058dc7b$export$c500183c31c2b22e = "--spans-columns";
|
|
9195
9310
|
function $64d94dcaa058dc7b$export$ab6b147eec64fea5(props) {
|
|
9196
9311
|
const container_class = "x" + $b8hua$createUniqueId();
|
|
9197
|
-
const container_element_ = $b8hua$ssrElement("div", $b8hua$
|
|
9312
|
+
const container_element_ = $b8hua$ssrElement("div", $b8hua$mergeProps1(() => props.element_attributes, {
|
|
9198
9313
|
classList: {
|
|
9199
9314
|
[container_class]: true
|
|
9200
9315
|
}
|
|
@@ -9464,7 +9579,7 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
9464
9579
|
})));
|
|
9465
9580
|
}
|
|
9466
9581
|
});
|
|
9467
|
-
return $b8hua$
|
|
9582
|
+
return $b8hua$mergeProps(block, {
|
|
9468
9583
|
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
9469
9584
|
content: () => {
|
|
9470
9585
|
// 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
|
|
@@ -9706,7 +9821,7 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
9706
9821
|
} = slider;
|
|
9707
9822
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
9708
9823
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
9709
|
-
$b8hua$createComponent(Layout, $b8hua$
|
|
9824
|
+
$b8hua$createComponent(Layout, $b8hua$mergeProps1(layout_options_, {
|
|
9710
9825
|
rows: "all",
|
|
9711
9826
|
get cols_at_size() {
|
|
9712
9827
|
return modified_cols_at_size();
|
|
@@ -9867,7 +9982,7 @@ var $79af35736fe8e5c8$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3
|
|
|
9867
9982
|
$79af35736fe8e5c8$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>';
|
|
9868
9983
|
function $79af35736fe8e5c8$export$da32f7add8a22e86() {
|
|
9869
9984
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9870
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
9985
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
9871
9986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9872
9987
|
width: "14",
|
|
9873
9988
|
height: "14",
|
|
@@ -9877,7 +9992,7 @@ function $79af35736fe8e5c8$export$da32f7add8a22e86() {
|
|
|
9877
9992
|
var $73e3c96bc365e0e9$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>';
|
|
9878
9993
|
function $73e3c96bc365e0e9$export$d10e63059ddb9fd4() {
|
|
9879
9994
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9880
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
9995
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
9881
9996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9882
9997
|
width: "14",
|
|
9883
9998
|
height: "14",
|
|
@@ -9993,7 +10108,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
9993
10108
|
})));
|
|
9994
10109
|
},
|
|
9995
10110
|
get children() {
|
|
9996
|
-
return $b8hua$ssr($082c4ed3e22f8d71$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $b8hua$
|
|
10111
|
+
return $b8hua$ssr($082c4ed3e22f8d71$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $b8hua$mergeProps1(args_for_filtering_, {
|
|
9997
10112
|
are_in_modal_: true
|
|
9998
10113
|
}))));
|
|
9999
10114
|
}
|
|
@@ -10589,7 +10704,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
10589
10704
|
if (content_result_) return $b8hua$ssrElement("a", attributes, () => $b8hua$escape(children), true);
|
|
10590
10705
|
return $b8hua$ssrElement("div", attributes, () => $b8hua$escape(children), true);
|
|
10591
10706
|
};
|
|
10592
|
-
return $b8hua$ssr($22470de5f42cc35d$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$
|
|
10707
|
+
return $b8hua$ssr($22470de5f42cc35d$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$mergeProps1(make_link_attributes, {
|
|
10593
10708
|
tabIndex: "-1",
|
|
10594
10709
|
get children() {
|
|
10595
10710
|
return $b8hua$createComponent((0, $3c5e15c6ee4227a9$export$605674723bcc715c), {
|
|
@@ -10597,7 +10712,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
10597
10712
|
height: "28"
|
|
10598
10713
|
});
|
|
10599
10714
|
}
|
|
10600
|
-
}))), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$
|
|
10715
|
+
}))), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$mergeProps1({
|
|
10601
10716
|
"class": "content-title line-clamp"
|
|
10602
10717
|
}, make_link_attributes, {
|
|
10603
10718
|
get title() {
|
|
@@ -10752,7 +10867,7 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
10752
10867
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).content;
|
|
10753
10868
|
},
|
|
10754
10869
|
number_of_results_: num_results
|
|
10755
|
-
})), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$
|
|
10870
|
+
})), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
10756
10871
|
layout: "grid",
|
|
10757
10872
|
element_attributes: {
|
|
10758
10873
|
class: "cards"
|
|
@@ -11145,7 +11260,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11145
11260
|
var _search_results_4, _search_results_4$con;
|
|
11146
11261
|
return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
|
|
11147
11262
|
});
|
|
11148
|
-
const results_for = $b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $b8hua$
|
|
11263
|
+
const results_for = $b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $b8hua$mergeProps1({
|
|
11149
11264
|
get type() {
|
|
11150
11265
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
|
|
11151
11266
|
},
|
|
@@ -13117,7 +13232,7 @@ function $4b4b262708b516ee$var$add_us_to_crumbs(plp_meta) {
|
|
|
13117
13232
|
var _plp_meta3;
|
|
13118
13233
|
const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
|
|
13119
13234
|
if (!api_value) return api_value;
|
|
13120
|
-
return [...api_value, $b8hua$
|
|
13235
|
+
return [...api_value, $b8hua$mergeProps(plp_meta(), {
|
|
13121
13236
|
get page_url() {
|
|
13122
13237
|
return href_accessor();
|
|
13123
13238
|
}
|