@depict-ai/ui 2.1.3 → 2.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.
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
70
70
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
71
71
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
72
72
  /*! Depict.ai search and product listing SDK */
73
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.3";
73
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.5";
74
74
  const $1ab22f2cd39b3061$var$fallback_operator = "in";
75
75
  const $1ab22f2cd39b3061$var$fallback_token = "";
76
76
  const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
@@ -285,6 +285,7 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
285
285
  });
286
286
  return size;
287
287
  }
288
+ const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
288
289
  function $19950faaac026e09$export$6e5611bc7e57e477(props) {
289
290
  // Enable reactive props
290
291
  const otherOptions = $5vyXB$solidjs.createMemo(() => {
@@ -307,11 +308,91 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
307
308
  srcset: srcset
308
309
  };
309
310
  });
310
- return $5vyXB$solidjsweb.ssrElement("img", $5vyXB$solidjsweb.mergeProps(otherOptions, src_options, {
311
- get sizes() {
312
- return props.size() + "px";
313
- }
314
- }), undefined, true);
311
+ // Work around https://github.com/solidjs/solid/issues/1828
312
+ const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
313
+ const [hasSetSize, setHasSetSize] = $5vyXB$solidjs.createSignal(false);
314
+ const [hasDecoded, setHasDecoded] = $5vyXB$solidjs.createSignal(false);
315
+ const sizePX = $5vyXB$solidjs.createMemo(() => `${props.size()}px`); // props.size could be a getter that expects a cleanup so get it in this memo instead of where we set img.sizes
316
+ const listingContext = $84798aaa863a4909$export$8d0c4fdbb05a2f2e();
317
+ // Batch idle callbacks so that MutationObserver can batch the resulting mutations better, so we don't lose tons of CPU time to MutationObservers doing lots of things for each image
318
+ // Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
319
+ const executeWhenIdleBatched = fn => {
320
+ if (typeof requestIdleCallback !== "function") setTimeout(fn); // Old browsers don't get optimisation
321
+ const existingStack = listingContext?.[$19950faaac026e09$var$onIdleFunctionsSymbol];
322
+ if (existingStack) return existingStack.add(fn);
323
+ const newStack = new Set([fn]);
324
+ if (listingContext) listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol] = newStack;
325
+ const processStackWhenIdle = () => requestIdleCallback(deadline => {
326
+ const start = performance.now();
327
+ const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
328
+ for (const fn of newStack) {
329
+ newStack.delete(fn);
330
+ fn();
331
+ const timeTaken = performance.now() - start;
332
+ if ((!deadline.timeRemaining() || timeTaken > thirdDeadlineTime) && newStack.size) {
333
+ // There's still work to be done but no time, so schedule another idle callback
334
+ processStackWhenIdle();
335
+ return;
336
+ }
337
+ }
338
+ // Stack is empty
339
+ if (listingContext) delete listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol];
340
+ }, {
341
+ timeout: 15000
342
+ } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
343
+ );
344
+
345
+ processStackWhenIdle();
346
+ };
347
+ let sizeSetFastPath = false;
348
+ let hasDecodedFastPath = false;
349
+ let timeoutSet = false;
350
+ $5vyXB$solidjsweb.spread(img, $5vyXB$solidjs.mergeProps(otherOptions), false, true);
351
+ $5vyXB$solidjs.createEffect(() => {
352
+ if (!props.size()) return; // wait until we have a size
353
+ if (timeoutSet) return;
354
+ const handler = $5vyXB$depictaiutilishared.catchify(() => {
355
+ img.sizes = sizePX(); // use latest available value of props.size
356
+ if (!sizeSetFastPath) {
357
+ setHasSetSize(true);
358
+ sizeSetFastPath = true;
359
+ }
360
+ timeoutSet = false;
361
+ });
362
+ // Throttle the updating of sizes to avoid unnecessary image re-fetches during resize
363
+ // And also because we first set src after sizes has been set, wait with loading and decoding images until browser is idle
364
+ // This greatly improves performance when loading (more) products
365
+ // See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
366
+ executeWhenIdleBatched(handler);
367
+ timeoutSet = true;
368
+ });
369
+ $5vyXB$solidjs.createEffect(() => {
370
+ if (!props.size() || !hasSetSize()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
371
+ Object.assign(img, src_options());
372
+ // Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
373
+ // We can do this because there has to be a container around us giving us a size
374
+ // No need to listen if we're already in the DOM
375
+ if (hasDecodedFastPath) return;
376
+ if (props.loading === "lazy") {
377
+ // For lazy loading there's no decoding to wait for as it only occurs when the image is visible
378
+ // Make sure src is set before we put the image into the DOM though so no broken image symbol is shown
379
+ setHasDecoded(true);
380
+ hasDecodedFastPath = true;
381
+ }
382
+ img.decode().catch(e => $5vyXB$depictaiutilishared.dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
383
+ .then(async () => {
384
+ // Also wait with inserting image (i.e. paint) until browser is idle
385
+ await new Promise(r => executeWhenIdleBatched(r));
386
+ setHasDecoded(true);
387
+ hasDecodedFastPath = true;
388
+ });
389
+ });
390
+ return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
391
+ get when() {
392
+ return hasDecoded();
393
+ },
394
+ children: img
395
+ });
315
396
  }
316
397
  function $19950faaac026e09$var$make_srcset(url, resolutions) {
317
398
  return resolutions.map(width => `${$19950faaac026e09$var$generateImageUrl(url, width)} ${width}w`).join(", ");
@@ -349,7 +430,7 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
349
430
  $5vyXB$depictaiutilishared.queueMacroTask(() => setCurrentImageSize(undefined)); // 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
350
431
  });
351
432
 
352
- container.append($5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
433
+ $5vyXB$solidjsweb.insert(container, $5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
353
434
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
354
435
  get size() {
355
436
  return $5vyXB$solidjs.createMemo(() => currentImageSize()?.() || 0);
@@ -4032,6 +4113,9 @@ function $d92f338ba8f9da9b$var$remap_blocks_to_index({
4032
4113
  const cols_showing = n_cols_currently_showing_();
4033
4114
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4034
4115
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4116
+ if (!cols_showing)
4117
+ // Nope out of here if we don't know how many columns are showing
4118
+ return content_blocks_by_index;
4035
4119
  for (let i = 0; i < wrapped_blocks.length; i++) {
4036
4120
  // i = row to show at
4037
4121
  const block = wrapped_blocks[i];
@@ -4092,14 +4176,16 @@ function $d92f338ba8f9da9b$var$remap_blocks_to_index({
4092
4176
  function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4093
4177
  const get_wrapped_blocks = $5vyXB$solidjs.mapArray(() => rendered_content_blocks, block => {
4094
4178
  if (!block) return;
4095
- const get_span_columns = () => Math.min(block.span_columns, max_span_columns() ?? Infinity);
4179
+ const final_span_columns = $5vyXB$solidjs.createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
4180
+ // If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
4181
+ const final_span_rows = $5vyXB$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4096
4182
  const [rendering_delayed, set_rendering_delayed_] = $5vyXB$solidjs.createSignal(true);
4097
4183
  const content = $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
4098
4184
  get when() {
4099
4185
  return !rendering_delayed();
4100
4186
  },
4101
4187
  get children() {
4102
- return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "grid-column:" + `span ${$5vyXB$solidjsweb.escape(get_span_columns(), true)}` + (";grid-row:" + `span ${$5vyXB$solidjsweb.escape(block.span_rows, true)}`) + (";spans_columns_variable_name:" + $5vyXB$solidjsweb.escape(get_span_columns(), true)), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent($d92f338ba8f9da9b$var$RenderContent, {
4188
+ return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "grid-column:" + `span ${$5vyXB$solidjsweb.escape(final_span_columns(), true)}` + (";grid-row:" + `span ${$5vyXB$solidjsweb.escape(final_span_rows(), true)}`) + (";spans_columns_variable_name:" + $5vyXB$solidjsweb.escape(final_span_columns(), true)), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent($d92f338ba8f9da9b$var$RenderContent, {
4103
4189
  get content() {
4104
4190
  return block.content;
4105
4191
  }
@@ -4116,7 +4202,10 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4116
4202
  },
4117
4203
  get span_columns() {
4118
4204
  // Cap max width of block to the number of columns available, for everyone downstream
4119
- return get_span_columns();
4205
+ return final_span_columns();
4206
+ },
4207
+ get span_rows() {
4208
+ return final_span_rows();
4120
4209
  }
4121
4210
  });
4122
4211
  });
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.3";
10
+ export const version = "2.1.5";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
@@ -152,17 +152,19 @@ export function ImageContainer(props: {
152
152
  export function makeSizeAccessor(whatToWatch: HTMLElement): Accessor<number>;
153
153
  /**
154
154
  * Automatically generate a srcset from the shopify CDN for an image and set the sizes attribute to the provided accessor.
155
+ * Will also delay loading and decoding of image until the browser is idle (with 5s timeout) to improve filtering/loading more performance.
155
156
  * This is used for our responsive images:
156
157
  * 1. The image must have a container with a fixed size (or aspect ratio) that is independent of the image. When aspectRatio is configured on the depict-cards element as data attribute, we will wrap the image in a ImageContainer for this. If it's false, the user has to provide this container themselves.
157
158
  * 2. We set a ResizeObserver on one of the currently visible images (see makeSizeAccessor)
158
159
  * 3. We set the size attribute of all the visible images to the size of the container we're observing. The point of this is that the sizes attribute is used to determine which image to load, and usually it's set by the user and depends on the relationship between image size and viewport size. By using a ResizeObserver, we can make sure the sizes attribute is always set to the correct value without it having to be configured. This will make so the browser always loads the correct image size for a crisp image but still fast load.
160
+ * You need to use insert(domNode, <ShopifyResponsiveImg size={sizeAccessor} src={src} />) if you want to insert the return value of this component into a DOM element manually, where you `import { insert } from "solid-js/web";` because we first want to insert the image once it has loaded.
159
161
  */
160
162
  export function ShopifyResponsiveImg(props: {
161
163
  resolutions?: number[];
162
164
  size: Accessor<number>;
163
165
  } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes"> & {
164
166
  src: string;
165
- }): HTMLImageElement;
167
+ }): JSX.Element;
166
168
  export const shopifyContainedImageContextSymbol: unique symbol;
167
169
  /**
168
170
  * Abstraction built on top of ShopifyResponsiveImg. This is your one-stop-shop If you just need a responsive image.
@@ -1,12 +1,12 @@
1
- import { add_to_version_info as $i7OB2$add_to_version_info, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, dlog as $i7OB2$dlog, queueMacroTask as $i7OB2$queueMacroTask, catchify as $i7OB2$catchify, is_safari as $i7OB2$is_safari, observer as $i7OB2$observer, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, slider_fractional_factory as $i7OB2$slider_fractional_factory, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, fetch_recs as $i7OB2$fetch_recs, snakeCasifyObject as $i7OB2$snakeCasifyObject, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, base_url as $i7OB2$base_url, get_depict_id as $i7OB2$get_depict_id, get_user_id as $i7OB2$get_user_id, get_session_id as $i7OB2$get_session_id, sort_obj as $i7OB2$sort_obj, fetch_retry as $i7OB2$fetch_retry, add_version_query_params as $i7OB2$add_version_query_params, dwarn as $i7OB2$dwarn, make_url_with_query_params as $i7OB2$make_url_with_query_params, edit_current_page_meta_tags as $i7OB2$edit_current_page_meta_tags, javascript_media_query as $i7OB2$javascript_media_query, use_href_accessor as $i7OB2$use_href_accessor, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, ContainedImage as $i7OB2$ContainedImage, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
- import { createComponent as $i7OB2$createComponent, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, ssrElement as $i7OB2$ssrElement, mergeProps as $i7OB2$mergeProps, escape as $i7OB2$escape, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, isServer as $i7OB2$isServer, ssrClassList as $i7OB2$ssrClassList, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
3
- import { createSignal as $i7OB2$createSignal, getOwner as $i7OB2$getOwner, createEffect as $i7OB2$createEffect, runWithOwner as $i7OB2$runWithOwner, onCleanup as $i7OB2$onCleanup, createMemo as $i7OB2$createMemo, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createResource as $i7OB2$createResource, Suspense as $i7OB2$Suspense, Show as $i7OB2$Show, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, For as $i7OB2$For, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, on as $i7OB2$on, batch as $i7OB2$batch, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray, mergeProps as $i7OB2$mergeProps1 } from "solid-js";
1
+ import { add_to_version_info as $i7OB2$add_to_version_info, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, dlog as $i7OB2$dlog, queueMacroTask as $i7OB2$queueMacroTask, catchify as $i7OB2$catchify, is_safari as $i7OB2$is_safari, observer as $i7OB2$observer, dwarn as $i7OB2$dwarn, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, slider_fractional_factory as $i7OB2$slider_fractional_factory, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, fetch_recs as $i7OB2$fetch_recs, snakeCasifyObject as $i7OB2$snakeCasifyObject, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, base_url as $i7OB2$base_url, get_depict_id as $i7OB2$get_depict_id, get_user_id as $i7OB2$get_user_id, get_session_id as $i7OB2$get_session_id, sort_obj as $i7OB2$sort_obj, fetch_retry as $i7OB2$fetch_retry, add_version_query_params as $i7OB2$add_version_query_params, make_url_with_query_params as $i7OB2$make_url_with_query_params, edit_current_page_meta_tags as $i7OB2$edit_current_page_meta_tags, javascript_media_query as $i7OB2$javascript_media_query, use_href_accessor as $i7OB2$use_href_accessor, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, ContainedImage as $i7OB2$ContainedImage, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
+ import { createComponent as $i7OB2$createComponent, insert as $i7OB2$insert, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, spread as $i7OB2$spread, escape as $i7OB2$escape, ssrAttribute as $i7OB2$ssrAttribute, mergeProps as $i7OB2$mergeProps1, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
3
+ import { createSignal as $i7OB2$createSignal, getOwner as $i7OB2$getOwner, createEffect as $i7OB2$createEffect, runWithOwner as $i7OB2$runWithOwner, onCleanup as $i7OB2$onCleanup, createMemo as $i7OB2$createMemo, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, mergeProps as $i7OB2$mergeProps, Show as $i7OB2$Show, createResource as $i7OB2$createResource, Suspense as $i7OB2$Suspense, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, For as $i7OB2$For, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, on as $i7OB2$on, batch as $i7OB2$batch, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
4
4
  import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from "solid-js/store";
5
5
 
6
6
  /*! Depict.ai search and product listing SDK */
7
7
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
8
8
  register_es_version("ui", "latest");
9
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.3";
9
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.5";
10
10
  const $4147651646da990a$var$fallback_operator = "in";
11
11
  const $4147651646da990a$var$fallback_token = "";
12
12
  const $4147651646da990a$var$legacy_filter_prefix = "filter_";
@@ -221,6 +221,7 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
221
221
  });
222
222
  return size;
223
223
  }
224
+ const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
224
225
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
225
226
  // Enable reactive props
226
227
  const otherOptions = $i7OB2$createMemo(() => {
@@ -243,11 +244,91 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
243
244
  srcset: srcset
244
245
  };
245
246
  });
246
- return $i7OB2$ssrElement("img", $i7OB2$mergeProps(otherOptions, src_options, {
247
- get sizes() {
248
- return props.size() + "px";
249
- }
250
- }), undefined, true);
247
+ // Work around https://github.com/solidjs/solid/issues/1828
248
+ const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
249
+ const [hasSetSize, setHasSetSize] = $i7OB2$createSignal(false);
250
+ const [hasDecoded, setHasDecoded] = $i7OB2$createSignal(false);
251
+ const sizePX = $i7OB2$createMemo(() => `${props.size()}px`); // props.size could be a getter that expects a cleanup so get it in this memo instead of where we set img.sizes
252
+ const listingContext = $011607bdf658f807$export$8d0c4fdbb05a2f2e();
253
+ // Batch idle callbacks so that MutationObserver can batch the resulting mutations better, so we don't lose tons of CPU time to MutationObservers doing lots of things for each image
254
+ // Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
255
+ const executeWhenIdleBatched = fn => {
256
+ if (typeof requestIdleCallback !== "function") setTimeout(fn); // Old browsers don't get optimisation
257
+ const existingStack = listingContext?.[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
258
+ if (existingStack) return existingStack.add(fn);
259
+ const newStack = new Set([fn]);
260
+ if (listingContext) listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol] = newStack;
261
+ const processStackWhenIdle = () => requestIdleCallback(deadline => {
262
+ const start = performance.now();
263
+ const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
264
+ for (const fn of newStack) {
265
+ newStack.delete(fn);
266
+ fn();
267
+ const timeTaken = performance.now() - start;
268
+ if ((!deadline.timeRemaining() || timeTaken > thirdDeadlineTime) && newStack.size) {
269
+ // There's still work to be done but no time, so schedule another idle callback
270
+ processStackWhenIdle();
271
+ return;
272
+ }
273
+ }
274
+ // Stack is empty
275
+ if (listingContext) delete listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
276
+ }, {
277
+ timeout: 15000
278
+ } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
279
+ );
280
+
281
+ processStackWhenIdle();
282
+ };
283
+ let sizeSetFastPath = false;
284
+ let hasDecodedFastPath = false;
285
+ let timeoutSet = false;
286
+ $i7OB2$spread(img, $i7OB2$mergeProps(otherOptions), false, true);
287
+ $i7OB2$createEffect(() => {
288
+ if (!props.size()) return; // wait until we have a size
289
+ if (timeoutSet) return;
290
+ const handler = $i7OB2$catchify(() => {
291
+ img.sizes = sizePX(); // use latest available value of props.size
292
+ if (!sizeSetFastPath) {
293
+ setHasSetSize(true);
294
+ sizeSetFastPath = true;
295
+ }
296
+ timeoutSet = false;
297
+ });
298
+ // Throttle the updating of sizes to avoid unnecessary image re-fetches during resize
299
+ // And also because we first set src after sizes has been set, wait with loading and decoding images until browser is idle
300
+ // This greatly improves performance when loading (more) products
301
+ // See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
302
+ executeWhenIdleBatched(handler);
303
+ timeoutSet = true;
304
+ });
305
+ $i7OB2$createEffect(() => {
306
+ if (!props.size() || !hasSetSize()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
307
+ Object.assign(img, src_options());
308
+ // Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
309
+ // We can do this because there has to be a container around us giving us a size
310
+ // No need to listen if we're already in the DOM
311
+ if (hasDecodedFastPath) return;
312
+ if (props.loading === "lazy") {
313
+ // For lazy loading there's no decoding to wait for as it only occurs when the image is visible
314
+ // Make sure src is set before we put the image into the DOM though so no broken image symbol is shown
315
+ setHasDecoded(true);
316
+ hasDecodedFastPath = true;
317
+ }
318
+ img.decode().catch(e => $i7OB2$dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
319
+ .then(async () => {
320
+ // Also wait with inserting image (i.e. paint) until browser is idle
321
+ await new Promise(r => executeWhenIdleBatched(r));
322
+ setHasDecoded(true);
323
+ hasDecodedFastPath = true;
324
+ });
325
+ });
326
+ return $i7OB2$createComponent((0, $i7OB2$Show), {
327
+ get when() {
328
+ return hasDecoded();
329
+ },
330
+ children: img
331
+ });
251
332
  }
252
333
  function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
253
334
  return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
@@ -285,7 +366,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
285
366
  $i7OB2$queueMacroTask(() => setCurrentImageSize(undefined)); // 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
286
367
  });
287
368
 
288
- container.append($i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
369
+ $i7OB2$insert(container, $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
289
370
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
290
371
  get size() {
291
372
  return $i7OB2$createMemo(() => currentImageSize()?.() || 0);
@@ -660,7 +741,7 @@ const $c8d5ff4524619fcd$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
660
741
  $c8d5ff4524619fcd$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
661
742
  function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
662
743
  const container_class = "x" + $i7OB2$createUniqueId();
663
- const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps(() => props.element_attributes, {
744
+ const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps1(() => props.element_attributes, {
664
745
  classList: {
665
746
  [container_class]: true
666
747
  }
@@ -785,7 +866,7 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
785
866
  } = slider;
786
867
  const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
787
868
  // Do like this, so we don't have to call mergeProps ourselves
788
- $i7OB2$createComponent(Layout, $i7OB2$mergeProps({
869
+ $i7OB2$createComponent(Layout, $i7OB2$mergeProps1({
789
870
  rows: "all",
790
871
  layout: "slider"
791
872
  }, layout_options_));
@@ -900,7 +981,7 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
900
981
  }) {
901
982
  const is_showing_something = $i7OB2$createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
902
983
  const num_placeholders_ = () => 20;
903
- const elements = $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
984
+ const elements = $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
904
985
  get rows() {
905
986
  return rows_object_();
906
987
  },
@@ -1110,7 +1191,7 @@ function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1110
1191
  }
1111
1192
  const $19976a74d273070d$var$_tmpl$ = '<path d="M11.669 10.531l9.156-9.156a.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569A.8.8 0 0 0 20.24 0a.77.77 0 0 0-.569.237l-9.14 9.14-9.14-9.14A.79.79 0 0 0 .807 0a.77.77 0 0 0-.569.237A.78.78 0 0 0 0 .807a.77.77 0 0 0 .237.569l9.156 9.156-9.156 9.14c-.159.157-.237.349-.237.569s.079.412.237.569c.085.085.174.148.268.19a1.095 1.095 0 0 0 .316.048.894.894 0 0 0 .285-.048.84.84 0 0 0 .285-.19l9.139-9.14 9.14 9.14a.894.894 0 0 0 .268.19 1.049 1.049 0 0 0 .301.048.941.941 0 0 0 .301-.048.84.84 0 0 0 .285-.19.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569z"></path>';
1112
1193
  function $19976a74d273070d$export$3b621d86b1566b2(props = {}) {
1113
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
1194
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
1114
1195
  xmlns: "http://www.w3.org/2000/svg",
1115
1196
  width: "21.064",
1116
1197
  height: "21.047",
@@ -1348,7 +1429,7 @@ const $49b79728e7d9e2a1$export$48513f6b9f8ce62d = props => {
1348
1429
  };
1349
1430
  const $f8a56ba74eedd0c6$var$_tmpl$ = '<path d="M10.173 5.548H5.5V.875c0-.075-.027-.14-.081-.193S5.301.601 5.226.601s-.14.027-.193.081-.081.118-.081.193v4.673H.274c-.075 0-.14.027-.193.081A.27.27 0 0 0 0 5.827c0 .075.027.14.081.193s.118.081.193.081h4.678v4.673c0 .075.027.14.081.193s.118.081.193.081.14-.027.193-.081.081-.118.081-.193V6.101h4.673a.27.27 0 0 0 .199-.081c.054-.054.08-.118.08-.193a.27.27 0 0 0-.279-.279z" fill="#000"></path>';
1350
1431
  function $f8a56ba74eedd0c6$export$f21ab0717a89c77f(props) {
1351
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
1432
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
1352
1433
  xmlns: "http://www.w3.org/2000/svg",
1353
1434
  width: "11",
1354
1435
  height: "12"
@@ -2195,7 +2276,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
2195
2276
  const current_value = $91aa8ee9f431800d$export$325f75597868c4f0(value().value_);
2196
2277
  return !!data?.some(item => $91aa8ee9f431800d$export$325f75597868c4f0(item) === current_value);
2197
2278
  });
2198
- const MakeButton = attributes => $i7OB2$ssrElement("button", $i7OB2$mergeProps(attributes, {
2279
+ const MakeButton = attributes => $i7OB2$ssrElement("button", $i7OB2$mergeProps1(attributes, {
2199
2280
  get disabled() {
2200
2281
  return value().count_ === 0 && !is_selected();
2201
2282
  },
@@ -2445,7 +2526,7 @@ var $12497d09ef87296e$export$2e2bcd8739ae039 = {
2445
2526
  };
2446
2527
  const $9bc34983fc5f7bdb$var$_tmpl$ = '<path d="M4.617 12.738a.48.48 0 0 1-.164-.027c-.051-.023-.094-.055-.129-.098L.125 8.414A.39.39 0 0 1 0 8.117c0-.113.039-.211.125-.293s.18-.125.293-.125.215.043.297.125l3.902 3.902L16.086.262c.082-.082.18-.125.297-.125s.211.043.293.125.125.184.125.301-.043.215-.125.297L4.914 12.613c-.039.043-.086.078-.141.098s-.102.027-.156.027zm0 0"></path>';
2447
2528
  function $9bc34983fc5f7bdb$export$f2ca6fc699ca1fb4(props = {}) {
2448
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
2529
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
2449
2530
  xmlns: "http://www.w3.org/2000/svg",
2450
2531
  width: "16.8",
2451
2532
  height: "14"
@@ -3766,7 +3847,7 @@ const $6dee9211e57ac31a$var$_tmpl$ = ["<style", ' type="text/css">', "</style>"]
3766
3847
  const $6dee9211e57ac31a$export$c500183c31c2b22e = "--spans-columns";
3767
3848
  function $6dee9211e57ac31a$export$ab6b147eec64fea5(props) {
3768
3849
  const container_class = "x" + $i7OB2$createUniqueId();
3769
- const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps(() => props.element_attributes, {
3850
+ const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps1(() => props.element_attributes, {
3770
3851
  classList: {
3771
3852
  [container_class]: true
3772
3853
  }
@@ -3968,6 +4049,9 @@ function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
3968
4049
  const cols_showing = n_cols_currently_showing_();
3969
4050
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
3970
4051
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4052
+ if (!cols_showing)
4053
+ // Nope out of here if we don't know how many columns are showing
4054
+ return content_blocks_by_index;
3971
4055
  for (let i = 0; i < wrapped_blocks.length; i++) {
3972
4056
  // i = row to show at
3973
4057
  const block = wrapped_blocks[i];
@@ -4028,21 +4112,23 @@ function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
4028
4112
  function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4029
4113
  const get_wrapped_blocks = $i7OB2$mapArray(() => rendered_content_blocks, block => {
4030
4114
  if (!block) return;
4031
- const get_span_columns = () => Math.min(block.span_columns, max_span_columns() ?? Infinity);
4115
+ const final_span_columns = $i7OB2$createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
4116
+ // If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
4117
+ const final_span_rows = $i7OB2$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4032
4118
  const [rendering_delayed, set_rendering_delayed_] = $i7OB2$createSignal(true);
4033
4119
  const content = $i7OB2$createComponent((0, $i7OB2$Show), {
4034
4120
  get when() {
4035
4121
  return !rendering_delayed();
4036
4122
  },
4037
4123
  get children() {
4038
- return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), "grid-column:" + `span ${$i7OB2$escape(get_span_columns(), true)}` + (";grid-row:" + `span ${$i7OB2$escape(block.span_rows, true)}`) + (";spans_columns_variable_name:" + $i7OB2$escape(get_span_columns(), true)), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
4124
+ return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), "grid-column:" + `span ${$i7OB2$escape(final_span_columns(), true)}` + (";grid-row:" + `span ${$i7OB2$escape(final_span_rows(), true)}`) + (";spans_columns_variable_name:" + $i7OB2$escape(final_span_columns(), true)), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
4039
4125
  get content() {
4040
4126
  return block.content;
4041
4127
  }
4042
4128
  })));
4043
4129
  }
4044
4130
  });
4045
- return $i7OB2$mergeProps1(block, {
4131
+ return $i7OB2$mergeProps(block, {
4046
4132
  // Create content divs for the blocks with as much fine-grained diffing as possible?
4047
4133
  content: () => {
4048
4134
  // 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
@@ -4052,7 +4138,10 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4052
4138
  },
4053
4139
  get span_columns() {
4054
4140
  // Cap max width of block to the number of columns available, for everyone downstream
4055
- return get_span_columns();
4141
+ return final_span_columns();
4142
+ },
4143
+ get span_rows() {
4144
+ return final_span_rows();
4056
4145
  }
4057
4146
  });
4058
4147
  });
@@ -4376,7 +4465,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
4376
4465
  const $e1bb71e65e01a3a0$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zM9.449 3.5H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h1.398c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-1.051-.699h.703v-.699h-.703zm0 0"></path>',
4377
4466
  $e1bb71e65e01a3a0$var$_tmpl$2 = '<path d="M10.852 6.301H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h2.801a.35.35 0 0 1 .348.352v1.398a.35.35 0 0 1-.348.352zm-2.453-.699H10.5v-.703H8.398zm3.851 3.5H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h4.199c.191 0 .352.156.352.352V8.75c0 .191-.16.352-.352.352zm-3.852-.703h3.5V7.7h-3.5zm5.25 3.499H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h5.598a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-5.25-.699H13.3V10.5H8.398zm0 0"></path>';
4378
4467
  function $e1bb71e65e01a3a0$export$da32f7add8a22e86(props = {}) {
4379
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
4468
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
4380
4469
  xmlns: "http://www.w3.org/2000/svg",
4381
4470
  width: "14",
4382
4471
  height: "14",
@@ -4385,7 +4474,7 @@ function $e1bb71e65e01a3a0$export$da32f7add8a22e86(props = {}) {
4385
4474
  }
4386
4475
  const $05fbe84eb34564ec$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zm3.25 1.644H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h1.398a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-1.051-.699h.703V10.5h-.703zm2.454-2.097H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h2.801a.35.35 0 0 1 .348.352V8.75c0 .191-.156.352-.348.352zm-2.453-.703H10.5V7.7H8.398zm3.851-2.098H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h4.199c.191 0 .352.156.352.352v1.398c0 .195-.16.352-.352.352zm-3.852-.699h3.5v-.703h-3.5zm5.25-2.102H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h5.598c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-5.25-.699H13.3v-.699H8.398zm0 0"></path>';
4387
4476
  function $05fbe84eb34564ec$export$d10e63059ddb9fd4(props = {}) {
4388
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
4477
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
4389
4478
  xmlns: "http://www.w3.org/2000/svg",
4390
4479
  width: "14",
4391
4480
  height: "14",
@@ -4498,7 +4587,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
4498
4587
  })));
4499
4588
  },
4500
4589
  get children() {
4501
- return $i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $i7OB2$mergeProps(args_for_filtering_, {
4590
+ return $i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $i7OB2$mergeProps1(args_for_filtering_, {
4502
4591
  are_in_modal_: true
4503
4592
  }))));
4504
4593
  }
@@ -6470,7 +6559,7 @@ function $22e59517c2ec94d3$export$1c641004b5485fed() {
6470
6559
  }
6471
6560
  const $16f0ed5ea30d8d9c$var$_tmpl$ = '<path d="M19.811 20.174l-6.234-6.809a7.96 7.96 0 0 0 .923-1.179c.274-.424.502-.865.687-1.323a8.04 8.04 0 0 0 .42-1.436 7.88 7.88 0 0 0 .144-1.507c0-.526-.051-1.042-.154-1.548-.096-.506-.243-.995-.441-1.466s-.441-.919-.728-1.343a8.28 8.28 0 0 0-.984-1.21 7.86 7.86 0 0 0-1.2-.984A7.56 7.56 0 0 0 10.89.651C10.418.453 9.929.302 9.423.2S8.401.046 7.875.046 6.833.097 6.327.2 5.332.453 4.86.651a7.56 7.56 0 0 0-1.354.718c-.431.287-.831.615-1.2.984a8.28 8.28 0 0 0-.984 1.21 7.73 7.73 0 0 0-.728 1.343c-.198.472-.349.96-.451 1.466A8.31 8.31 0 0 0 0 7.921a8.31 8.31 0 0 0 .144 1.548c.103.506.253.995.451 1.466a8.08 8.08 0 0 0 .728 1.354 7.86 7.86 0 0 0 .984 1.2 7.54 7.54 0 0 0 1.2.995c.431.287.882.53 1.354.728.472.191.96.338 1.466.441a8.31 8.31 0 0 0 1.548.144c.451 0 .896-.038 1.333-.113a7.83 7.83 0 0 0 1.282-.328 7.55 7.55 0 0 0 1.2-.533 8.08 8.08 0 0 0 1.107-.749l6.245 6.809a.45.45 0 0 0 .174.123.55.55 0 0 0 .205.041.61.61 0 0 0 .195-.031c.061-.021.116-.055.164-.102.109-.096.164-.219.164-.369.007-.144-.038-.267-.133-.369zM1.046 7.921c0-.937.178-1.818.533-2.646.362-.834.851-1.559 1.466-2.174.622-.615 1.347-1.101 2.174-1.456.827-.362 1.712-.543 2.656-.543s1.829.181 2.656.543c.827.355 1.548.841 2.164 1.456.622.615 1.111 1.34 1.466 2.174a6.52 6.52 0 0 1 .543 2.646c0 .943-.181 1.829-.543 2.656a6.89 6.89 0 0 1-1.466 2.174c-.615.615-1.336 1.104-2.164 1.466-.827.356-1.712.533-2.656.533s-1.829-.178-2.656-.533c-.827-.362-1.552-.851-2.174-1.466-.615-.622-1.104-1.347-1.466-2.174-.355-.827-.533-1.712-.533-2.656z"></path>';
6472
6561
  function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
6473
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
6562
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
6474
6563
  xmlns: "http://www.w3.org/2000/svg",
6475
6564
  width: "20",
6476
6565
  height: "22"
@@ -6529,7 +6618,7 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
6529
6618
  const should_show = $i7OB2$createMemo(() => !!((recommendations_resource.loading || recommendations_resource()?.length) && all_products_loaded_()));
6530
6619
  const num_placeholders_ = $i7OB2$createMemo(() => (0, $7747fe1a8c5652e3$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...layout_options_().cols_at_size.map(([per_column]) => per_column)));
6531
6620
  // Don't tear down elements every time one updates the page - don't put them within <Show>
6532
- const elements = $i7OB2$ssr($172e1b898d457050$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.search_recs_title_()), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
6621
+ const elements = $i7OB2$ssr($172e1b898d457050$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.search_recs_title_()), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
6533
6622
  rows: rows_object,
6534
6623
  layout: "grid",
6535
6624
  element_attributes: {
@@ -7010,7 +7099,7 @@ function $f3213c0640246d58$export$ba17c5b7e6dda39f({
7010
7099
  }
7011
7100
  const $190927650b4840eb$var$_tmpl$ = '<path d="M56 26.455a13.71 13.71 0 0 0-9.578 3.967A13.71 13.71 0 0 0 42.455 40v176a13.71 13.71 0 0 0 3.967 9.578A13.71 13.71 0 0 0 56 229.545h144A13.71 13.71 0 0 0 213.545 216V88a2.456 2.456 0 0 1 0-.002c.001-1.452-.597-2.895-1.623-3.922l-55.998-55.998a5.61 5.61 0 0 0-3.922-1.623 2.456 2.456 0 0 1-.002 0zm0 11.09h88A2.456 2.456 0 0 1 146.455 40v48c0 2.903 2.642 5.545 5.545 5.545h48A2.456 2.456 0 0 1 202.455 96v120a2.456 2.456 0 0 1-2.455 2.455H56A2.456 2.456 0 0 1 53.545 216V40A2.456 2.456 0 0 1 56 37.545zm103.061 11.498a2.456 2.456 0 0 1 2.676.531l28.689 28.689a2.456 2.456 0 0 1-1.736 4.191H160A2.456 2.456 0 0 1 157.545 80V51.311a2.456 2.456 0 0 1 1.516-2.268zM96 130.455c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545zm0 32c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545z"></path>';
7012
7101
  function $190927650b4840eb$export$605674723bcc715c(props = {}) {
7013
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
7102
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
7014
7103
  xmlns: "http://www.w3.org/2000/svg",
7015
7104
  width: "32",
7016
7105
  height: "32",
@@ -8084,7 +8173,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
8084
8173
  if (content_result_) return $i7OB2$ssrElement("a", attributes, () => $i7OB2$escape(children), true);
8085
8174
  return $i7OB2$ssrElement("div", attributes, () => $i7OB2$escape(children), true);
8086
8175
  };
8087
- return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps(make_link_attributes, {
8176
+ return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps1(make_link_attributes, {
8088
8177
  tabIndex: "-1",
8089
8178
  get children() {
8090
8179
  return $i7OB2$createComponent((0, $190927650b4840eb$export$605674723bcc715c), {
@@ -8092,7 +8181,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
8092
8181
  height: "28"
8093
8182
  });
8094
8183
  }
8095
- }))), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps({
8184
+ }))), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps1({
8096
8185
  "class": "content-title line-clamp"
8097
8186
  }, make_link_attributes, {
8098
8187
  get title() {
@@ -8224,7 +8313,7 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
8224
8313
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).content;
8225
8314
  },
8226
8315
  number_of_results_: num_results
8227
- })), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
8316
+ })), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
8228
8317
  layout: "grid",
8229
8318
  element_attributes: {
8230
8319
  class: "cards"
@@ -8373,7 +8462,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
8373
8462
  });
8374
8463
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $i7OB2$createSignal();
8375
8464
  const no_results_text_ = $i7OB2$createMemo(() => (search_results_()?.content_search_links?.length ? i18n_.no_products_ : i18n_.no_results_text_)());
8376
- const results_for = $i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $i7OB2$mergeProps({
8465
+ const results_for = $i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $i7OB2$mergeProps1({
8377
8466
  get type() {
8378
8467
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
8379
8468
  },