@depict-ai/ui 4.1.3 → 4.1.5
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 +189 -82
- package/ES10/index.d.ts +8 -2
- package/ES10/index.js +189 -83
- package/latest/index.cjs +189 -82
- package/latest/index.d.ts +8 -2
- package/latest/index.js +189 -83
- package/package.json +1 -1
- package/server/ES10/index.cjs +157 -53
- package/server/ES10/index.d.ts +8 -2
- package/server/ES10/index.js +157 -54
- package/server/latest/index.cjs +157 -53
- package/server/latest/index.d.ts +8 -2
- package/server/latest/index.js +157 -54
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,76 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
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.1.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.5";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This is a function that will safely clone an object that may contain promises.
|
|
14
|
+
* It will use structuredClone to clone the object and then re-apply (copy) any promises that were in the original object to the cloned object.
|
|
15
|
+
* @param obj Anything to clone
|
|
16
|
+
*/
|
|
17
|
+
function $de6ccd37192b5fc2$export$83bb9af5671e1dbe(obj) {
|
|
18
|
+
if (obj instanceof Promise) return obj;
|
|
19
|
+
// Extract all promises, keep a map of them, and then re-apply them to both the original object and the target object after cloning
|
|
20
|
+
const seen = new Set();
|
|
21
|
+
const keyStack = [[]];
|
|
22
|
+
const valueStack = [obj];
|
|
23
|
+
const promiseLocationStack = [];
|
|
24
|
+
while (valueStack.length) {
|
|
25
|
+
const value = valueStack.pop();
|
|
26
|
+
const keyPath = keyStack.pop();
|
|
27
|
+
// Promises can only be in objects and we don't need to check for objects we've already seen (like in circular references)
|
|
28
|
+
if (typeof value !== "object" || value === null || seen.has(value)) continue;
|
|
29
|
+
seen.add(value);
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
for (let i = 0; i < value.length; i++) {
|
|
32
|
+
const ourValue = value[i];
|
|
33
|
+
const valuesKeyPath = [...keyPath, i];
|
|
34
|
+
if (ourValue instanceof Promise) {
|
|
35
|
+
promiseLocationStack.push([valuesKeyPath, ourValue]);
|
|
36
|
+
delete value[i]; // This will leave a hole in the array, but it's fine since we'll put it back soon
|
|
37
|
+
// This way both the indexes will be correct when putting the value back and our for loop doesn't get messed up
|
|
38
|
+
} else {
|
|
39
|
+
keyStack.push(valuesKeyPath);
|
|
40
|
+
valueStack.push(ourValue);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
for (const innerKey in value) {
|
|
46
|
+
const ourValue = value[innerKey];
|
|
47
|
+
const valuesKeyPath = [...keyPath, innerKey];
|
|
48
|
+
if (ourValue instanceof Promise) {
|
|
49
|
+
promiseLocationStack.push([valuesKeyPath, ourValue]);
|
|
50
|
+
delete value[innerKey];
|
|
51
|
+
} else {
|
|
52
|
+
keyStack.push(valuesKeyPath);
|
|
53
|
+
valueStack.push(ourValue);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
let structuredClonedObject;
|
|
58
|
+
let error;
|
|
59
|
+
try {
|
|
60
|
+
structuredClonedObject = structuredClone(obj);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
// We still need to put back the promises in the original object, even if we threw an error
|
|
63
|
+
error = e;
|
|
64
|
+
}
|
|
65
|
+
// Put back the promises in both the original object and the cloned object
|
|
66
|
+
while (promiseLocationStack.length) {
|
|
67
|
+
const [keyPath, promise] = promiseLocationStack.pop();
|
|
68
|
+
let targetInClone = structuredClonedObject;
|
|
69
|
+
let targetInOriginal = obj;
|
|
70
|
+
for (let i = 0; i < keyPath.length - 1; i++) {
|
|
71
|
+
if (!error) targetInClone = targetInClone[keyPath[i]];
|
|
72
|
+
targetInOriginal = targetInOriginal[keyPath[i]];
|
|
73
|
+
}
|
|
74
|
+
if (!error) targetInClone[keyPath[keyPath.length - 1]] = promise;
|
|
75
|
+
targetInOriginal[keyPath[keyPath.length - 1]] = promise;
|
|
76
|
+
}
|
|
77
|
+
if (error) throw error;
|
|
78
|
+
return structuredClonedObject;
|
|
79
|
+
}
|
|
11
80
|
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
12
81
|
let $90980bd87c9960f9$var$has_ran = false;
|
|
13
82
|
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
@@ -149,12 +218,42 @@ function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
|
149
218
|
}) => signal[1](matches)).remove);
|
|
150
219
|
return signal[0];
|
|
151
220
|
}
|
|
221
|
+
var $d20eff0aadc28983$var$_tmpl$ = ["<span", ' class="', '" style="', '"></span>'];
|
|
222
|
+
function $d20eff0aadc28983$export$acb3eaade4b23afd(props) {
|
|
223
|
+
// Work around https://github.com/solidjs/solid/issues/1980
|
|
224
|
+
return $i7OB2$ssr($d20eff0aadc28983$var$_tmpl$, $i7OB2$ssrHydrationKey(), `${$i7OB2$escape(props.class, true) || ""} depict-placeholder`, $i7OB2$ssrStyle(props.style));
|
|
225
|
+
}
|
|
226
|
+
function $d134eae24341b4a1$export$89c6019e4baa40b1(props) {
|
|
227
|
+
const style = $i7OB2$createMemo(() => {
|
|
228
|
+
const {
|
|
229
|
+
style: style,
|
|
230
|
+
height: height,
|
|
231
|
+
width: width
|
|
232
|
+
} = props;
|
|
233
|
+
return {
|
|
234
|
+
...(style || {}),
|
|
235
|
+
height: height ?? "1em",
|
|
236
|
+
...(width && {
|
|
237
|
+
width: width
|
|
238
|
+
})
|
|
239
|
+
};
|
|
240
|
+
});
|
|
241
|
+
return $i7OB2$createComponent((0, $d20eff0aadc28983$export$acb3eaade4b23afd), {
|
|
242
|
+
get style() {
|
|
243
|
+
return style();
|
|
244
|
+
},
|
|
245
|
+
get ["class"]() {
|
|
246
|
+
return props.class;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}
|
|
152
250
|
var $e003be2a50d9e5bc$var$_tmpl$ = ["<span", ' class="title line-clamp">', "</span>"],
|
|
153
251
|
$e003be2a50d9e5bc$var$_tmpl$2 = ["<span", ' class="brand">', "</span>"],
|
|
154
252
|
$e003be2a50d9e5bc$var$_tmpl$3 = ["<div", ' class="tagline line-clamp">', "</div>"],
|
|
155
253
|
$e003be2a50d9e5bc$var$_tmpl$4 = ["<span", ' class="orig price"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span>"],
|
|
156
|
-
$e003be2a50d9e5bc$var$_tmpl$5 = ["<
|
|
157
|
-
$e003be2a50d9e5bc$var$_tmpl$6 = ["<div", ' class="
|
|
254
|
+
$e003be2a50d9e5bc$var$_tmpl$5 = ["<span", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span>"],
|
|
255
|
+
$e003be2a50d9e5bc$var$_tmpl$6 = ["<a", ' class="', '"', '><div class="img-part"><!--$-->', "<!--/--><!--$-->", '<!--/--></div><div class="right-part"><!--$-->', '<!--/--><div class="price-container"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div></a>"],
|
|
256
|
+
$e003be2a50d9e5bc$var$_tmpl$7 = ["<div", ' class="title-brand-tagline">', "</div>"];
|
|
158
257
|
const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = ({
|
|
159
258
|
display_: display_,
|
|
160
259
|
router_: router_,
|
|
@@ -168,13 +267,16 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = ({
|
|
|
168
267
|
const [get_selected_index_, set_selected_index_] = selected_index_ || [];
|
|
169
268
|
const variant = display_.variant_displays[display_.variant_index];
|
|
170
269
|
const href = $i7OB2$createMemo(() => variant.page_url); // <- could be made reactive getter 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
|
|
171
|
-
|
|
270
|
+
// Prices can be promises, for example in our shopify app. Always assume they are (will work the same when they aren't)
|
|
271
|
+
const [salePrice] = $i7OB2$createResource(() => variant.sale_price);
|
|
272
|
+
const [originalPrice] = $i7OB2$createResource(() => variant.original_price);
|
|
273
|
+
const isOnSale = $i7OB2$createMemo(() => salePrice() !== originalPrice());
|
|
172
274
|
const supports_hover = $dc9262ef6f786812$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
|
|
173
275
|
const [isSelected, selectedDueToKeyboardNavigation] = selected_index_ ? $f4125ce4984deee6$export$fb40a80c530e5f2b(get_selected_index_, keyboardNavigationGroupIndex_, index_) : [];
|
|
174
276
|
const secondary_image_url = variant.image_urls?.[1] || variant.secondary_image_url || variant.alternative_display_image_url;
|
|
175
277
|
const brandInTagline = selected_index_ && variant.brand;
|
|
176
278
|
const TitleBrandTagline = () => [!selected_index_ && $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape(variant.brand)), $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(variant.title)), (variant.sub_heading_1 || variant.sub_heading_2 || brandInTagline) && $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$escape([brandInTagline, variant.sub_heading_1, variant.sub_heading_2].filter(v => v).join(" | ")))];
|
|
177
|
-
return $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$
|
|
279
|
+
return $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$6, $i7OB2$ssrHydrationKey(), `instant-card ${isSelected?.() ? "selected" : ""}`, $i7OB2$ssrAttribute("href", $i7OB2$escape(href(), true), false) + $i7OB2$ssrAttribute("data-search-result-id", $i7OB2$escape(display_.search_result_id, true), false), $i7OB2$escape($i7OB2$createComponent(InstantCardImageComponent_, {
|
|
178
280
|
get src_() {
|
|
179
281
|
return variant.image_urls?.[0] || variant.image_url || variant.display_image_url;
|
|
180
282
|
}
|
|
@@ -187,32 +289,43 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = ({
|
|
|
187
289
|
src_: secondary_image_url
|
|
188
290
|
});
|
|
189
291
|
}
|
|
190
|
-
})), selected_index_ ? $i7OB2$escape($i7OB2$createComponent(TitleBrandTagline, {})) : $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$
|
|
191
|
-
when
|
|
292
|
+
})), selected_index_ ? $i7OB2$escape($i7OB2$createComponent(TitleBrandTagline, {})) : $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$7, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(TitleBrandTagline, {}))), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
293
|
+
get when() {
|
|
294
|
+
return isOnSale();
|
|
295
|
+
},
|
|
192
296
|
get children() {
|
|
193
297
|
return $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$4, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.price_formatting_().pre_), $i7OB2$escape($i7OB2$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
|
|
194
298
|
get price_() {
|
|
195
|
-
return
|
|
299
|
+
return originalPrice();
|
|
196
300
|
},
|
|
197
301
|
get price_formatting_() {
|
|
198
302
|
return i18n_.price_formatting_();
|
|
199
303
|
}
|
|
200
304
|
})), $i7OB2$escape(i18n_.price_formatting_().post_));
|
|
201
305
|
}
|
|
202
|
-
})),
|
|
203
|
-
get
|
|
204
|
-
return
|
|
306
|
+
})), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
307
|
+
get when() {
|
|
308
|
+
return !salePrice.loading && salePrice.latest;
|
|
205
309
|
},
|
|
206
|
-
get
|
|
207
|
-
return
|
|
310
|
+
get fallback() {
|
|
311
|
+
return $i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
312
|
+
width: "5ch",
|
|
313
|
+
height: "1em",
|
|
314
|
+
"class": "price"
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
get children() {
|
|
318
|
+
return $i7OB2$ssr($e003be2a50d9e5bc$var$_tmpl$5, $i7OB2$ssrHydrationKey(), `${"price"} ${isOnSale() ? "sales-price" : ""}`, $i7OB2$escape(i18n_.price_formatting_().pre_), $i7OB2$escape($i7OB2$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
|
|
319
|
+
get price_() {
|
|
320
|
+
return salePrice();
|
|
321
|
+
},
|
|
322
|
+
get price_formatting_() {
|
|
323
|
+
return i18n_.price_formatting_();
|
|
324
|
+
}
|
|
325
|
+
})), $i7OB2$escape(i18n_.price_formatting_().post_));
|
|
208
326
|
}
|
|
209
|
-
}))
|
|
327
|
+
})));
|
|
210
328
|
};
|
|
211
|
-
var $d20eff0aadc28983$var$_tmpl$ = ["<span", ' class="', '" style="', '"></span>'];
|
|
212
|
-
function $d20eff0aadc28983$export$acb3eaade4b23afd(props) {
|
|
213
|
-
// Work around https://github.com/solidjs/solid/issues/1980
|
|
214
|
-
return $i7OB2$ssr($d20eff0aadc28983$var$_tmpl$, $i7OB2$ssrHydrationKey(), `${$i7OB2$escape(props.class, true) || ""} depict-placeholder`, $i7OB2$ssrStyle(props.style));
|
|
215
|
-
}
|
|
216
329
|
function $7f60f09116a3fe61$export$3f37af283f8fb843(props) {
|
|
217
330
|
const style = $i7OB2$createMemo(() => {
|
|
218
331
|
const {
|
|
@@ -244,30 +357,6 @@ function $7f60f09116a3fe61$export$3f37af283f8fb843(props) {
|
|
|
244
357
|
}
|
|
245
358
|
});
|
|
246
359
|
}
|
|
247
|
-
function $d134eae24341b4a1$export$89c6019e4baa40b1(props) {
|
|
248
|
-
const style = $i7OB2$createMemo(() => {
|
|
249
|
-
const {
|
|
250
|
-
style: style,
|
|
251
|
-
height: height,
|
|
252
|
-
width: width
|
|
253
|
-
} = props;
|
|
254
|
-
return {
|
|
255
|
-
...(style || {}),
|
|
256
|
-
height: height ?? "1em",
|
|
257
|
-
...(width && {
|
|
258
|
-
width: width
|
|
259
|
-
})
|
|
260
|
-
};
|
|
261
|
-
});
|
|
262
|
-
return $i7OB2$createComponent((0, $d20eff0aadc28983$export$acb3eaade4b23afd), {
|
|
263
|
-
get style() {
|
|
264
|
-
return style();
|
|
265
|
-
},
|
|
266
|
-
get ["class"]() {
|
|
267
|
-
return props.class;
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
360
|
var $bb15dfb548a7666e$var$_tmpl$ = ["<div", ' class="instant-card"><div class="img-part">', '</div><div class="right-part"><div class="title-brand-tagline"><span class="title">', '</span></div><div class="price-container">', "</div></div></div>"];
|
|
272
361
|
const $bb15dfb548a7666e$export$8a2234b5b1a5ebd4 = "--image-aspect-ratio";
|
|
273
362
|
function $bb15dfb548a7666e$export$ee1733d9a8495996() {
|
|
@@ -365,7 +454,12 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({
|
|
|
365
454
|
// We had a case on singular where they popped an image url and due to use caching after some time there was no image
|
|
366
455
|
// Attempt cloning the displays if possible (99.9% of the cases probably) and if not, just use the original display
|
|
367
456
|
try {
|
|
368
|
-
|
|
457
|
+
// Use promiseSafeStructuredClone so that:
|
|
458
|
+
// 1. When fetching for example prices from an API, one can start that API request
|
|
459
|
+
// 2. Add the promise to the display
|
|
460
|
+
// 3. Already render the product card with placeholders for prices while the price loads
|
|
461
|
+
// 4. When the price loads, re-render the display with the new price
|
|
462
|
+
display = $de6ccd37192b5fc2$export$83bb9af5671e1dbe(display);
|
|
369
463
|
} catch (e) {
|
|
370
464
|
if (!$29ec7cddbe1d3484$var$printedCloneError) {
|
|
371
465
|
$29ec7cddbe1d3484$var$printedCloneError = true;
|
|
@@ -423,7 +517,7 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({
|
|
|
423
517
|
// Modified futher to bias towards saying objects are equal non-primitive objects differ
|
|
424
518
|
function $29ec7cddbe1d3484$var$deep_equal(obj1, obj2) {
|
|
425
519
|
const stack = [[obj1, obj2]];
|
|
426
|
-
while (stack.length
|
|
520
|
+
while (stack.length) {
|
|
427
521
|
const [currentObj1, currentObj2] = stack.pop();
|
|
428
522
|
if (currentObj1 === currentObj2) continue;
|
|
429
523
|
if (Array.isArray(currentObj1) && Array.isArray(currentObj2)) {
|
|
@@ -1900,10 +1994,10 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
1900
1994
|
const src_options = $i7OB2$createMemo(() => {
|
|
1901
1995
|
const {
|
|
1902
1996
|
src: src,
|
|
1903
|
-
|
|
1997
|
+
customUrls: customUrls
|
|
1904
1998
|
} = props;
|
|
1905
|
-
const fallback_src = (
|
|
1906
|
-
const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096],
|
|
1999
|
+
const fallback_src = (customUrls || $e8ffe11ed01df0fe$export$1d6267828870adda)(src, 400);
|
|
2000
|
+
const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customUrls);
|
|
1907
2001
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
1908
2002
|
return {
|
|
1909
2003
|
srcset: srcset,
|
|
@@ -1912,7 +2006,9 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
1912
2006
|
});
|
|
1913
2007
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
1914
2008
|
const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
|
|
1915
|
-
const [, otherAttributes] = $i7OB2$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading"
|
|
2009
|
+
const [, otherAttributes] = $i7OB2$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
2010
|
+
]);
|
|
2011
|
+
|
|
1916
2012
|
const [hasSetSize, setHasSetSize] = $i7OB2$createSignal(false);
|
|
1917
2013
|
const [hasDecoded, setHasDecoded] = $i7OB2$createSignal(false);
|
|
1918
2014
|
const productCardIndexAccessor = $b6440e72ed83671a$export$e3faf4d95300054f();
|
|
@@ -2041,9 +2137,9 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
2041
2137
|
});
|
|
2042
2138
|
}
|
|
2043
2139
|
function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2044
|
-
return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$
|
|
2140
|
+
return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$export$1d6267828870adda)(url, width)} ${width}w`).join(", ");
|
|
2045
2141
|
}
|
|
2046
|
-
function $e8ffe11ed01df0fe$
|
|
2142
|
+
function $e8ffe11ed01df0fe$export$1d6267828870adda(url, width) {
|
|
2047
2143
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2048
2144
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2049
2145
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2108,8 +2204,15 @@ function $4f16612bea257571$export$9d4a4b669b1929ab(props) {
|
|
|
2108
2204
|
get imgProps() {
|
|
2109
2205
|
return {
|
|
2110
2206
|
...props.imgProps,
|
|
2111
|
-
|
|
2112
|
-
) =>
|
|
2207
|
+
customUrls: (url, width // Apparently don't have to encode url for CF's service
|
|
2208
|
+
) => {
|
|
2209
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2210
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2211
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2212
|
+
return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
|
|
2213
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2214
|
+
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
2215
|
+
}
|
|
2113
2216
|
};
|
|
2114
2217
|
}
|
|
2115
2218
|
}));
|
|
@@ -11786,4 +11889,4 @@ function $58b3487626e85ece$var$align_field_modal(alignmentSignals, input, modalV
|
|
|
11786
11889
|
});
|
|
11787
11890
|
}
|
|
11788
11891
|
$i7OB2$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
11789
|
-
export { $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $4f16612bea257571$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField };
|
|
11892
|
+
export { $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $4f16612bea257571$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField };
|