@depict-ai/ui 4.8.28 → 4.8.30

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 CHANGED
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.28";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.30";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $52FdA$solidjs.createSignal(false);
121
121
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -7633,26 +7633,31 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
7633
7633
  return cancel;
7634
7634
  }
7635
7635
  function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
7636
- const worstCaseIdleDeadline = 15000;
7636
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
7637
+ const page_hasnt_loaded =
7638
+ // @ts-ignore
7639
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
7637
7640
  const cancelFrameCheck = $4692443b324db9ee$var$checkForFrameDipsUntil(2000, () => {
7638
7641
  cancelIdleCallback();
7642
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
7639
7643
  callback({
7640
7644
  didTimeout: false,
7641
7645
  timeRemaining: () => 1000
7642
7646
  });
7643
- });
7647
+ }, page_hasnt_loaded);
7644
7648
  const cancelIdleCallback = $e4e98e5080f4386e$export$2972b890694ced75(deadline => {
7645
7649
  cancelFrameCheck();
7646
7650
  callback(deadline);
7647
- }, {
7648
- timeout: worstCaseIdleDeadline
7651
+ },
7652
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
7653
+ {
7654
+ timeout: page_hasnt_loaded ? 4000 : 15000
7649
7655
  });
7650
7656
  }
7651
7657
  /**
7652
7658
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7653
7659
  */
7654
- function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7655
- var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
7660
+ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
7656
7661
  const maxDips = 3;
7657
7662
  const noDipsBelow = 20;
7658
7663
  const fpsOverTime = [];
@@ -7682,10 +7687,7 @@ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7682
7687
  }));
7683
7688
  // If page hasn't loaded yet, wait for it to load before starting the check
7684
7689
  // This is because the first few frames until the load event are usually slower
7685
- const page_hasnt_loaded =
7686
- // @ts-ignore
7687
- (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
7688
- if (page_hasnt_loaded) addEventListener("load", () => {
7690
+ if (pageHasntLoaded) addEventListener("load", () => {
7689
7691
  start = performance.now();
7690
7692
  check();
7691
7693
  }, {
@@ -8240,6 +8242,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8240
8242
  const first_result_in_viewport_ = $52FdA$solidjs.createSignal();
8241
8243
  const last_result_in_viewport_ = $52FdA$solidjs.createSignal();
8242
8244
  const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
8245
+ const [, setAllProductsLoaded] = all_products_loaded_;
8243
8246
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $52FdA$solidjs.createSignal(0);
8244
8247
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $52FdA$solidjs.createSignal(false);
8245
8248
  const owner = $52FdA$solidjs.getOwner();
@@ -8269,31 +8272,34 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
8269
8272
  // Make "Get products in listing" request to get products in listing
8270
8273
  const [plp_products_] = $52FdA$solidjs.createResource(products_query_base_,
8271
8274
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
8272
- $52FdA$depictaiutilisharedlatest.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
8273
- id_: $52FdA$solidjs.untrack(id_to_query_for_),
8274
- scroll_restoration_data_: scroll_restoration_data_,
8275
- min_products_to_fetch_: min_products_to_fetch_,
8276
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
8277
- ...base_query,
8278
- limit: limit,
8279
- ...(cursor ? {
8280
- cursor: cursor
8281
- } : {}),
8282
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
8283
- // It's very hard to implement tracking that uses the collection title without this information
8284
- currentListingForTransformer_: new Promise(resolve => $52FdA$solidjs.createRoot(dispose => {
8285
- $52FdA$solidjs.createEffect($52FdA$depictaiutilisharedlatest.catchify(() => {
8286
- const key = base_query.id_type_ + base_query.id_to_query_for_;
8287
- const metaResponsePromise = metaRequestsForQuery().get(key);
8288
- if (!metaResponsePromise) return;
8289
- resolve(metaResponsePromise);
8290
- dispose();
8291
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
8292
- }));
8293
- $52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.onCleanup(dispose));
8294
- }))
8295
- })
8296
- })));
8275
+ $52FdA$depictaiutilisharedlatest.catchify(base_query => {
8276
+ setAllProductsLoaded(false);
8277
+ return $fef4890f1f8e0544$export$cc42dd29bf655ab6({
8278
+ id_: $52FdA$solidjs.untrack(id_to_query_for_),
8279
+ scroll_restoration_data_: scroll_restoration_data_,
8280
+ min_products_to_fetch_: min_products_to_fetch_,
8281
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
8282
+ ...base_query,
8283
+ limit: limit,
8284
+ ...(cursor ? {
8285
+ cursor: cursor
8286
+ } : {}),
8287
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
8288
+ // It's very hard to implement tracking that uses the collection title without this information
8289
+ currentListingForTransformer_: new Promise(resolve => $52FdA$solidjs.createRoot(dispose => {
8290
+ $52FdA$solidjs.createEffect($52FdA$depictaiutilisharedlatest.catchify(() => {
8291
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
8292
+ const metaResponsePromise = metaRequestsForQuery().get(key);
8293
+ if (!metaResponsePromise) return;
8294
+ resolve(metaResponsePromise);
8295
+ dispose();
8296
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
8297
+ }));
8298
+ $52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.onCleanup(dispose));
8299
+ }))
8300
+ })
8301
+ });
8302
+ }));
8297
8303
  const meta_query_base = $e4bc31358c414b18$export$210f130a61ac1e8d(() => ({
8298
8304
  merchant: merchant_(),
8299
8305
  market: market_(),
package/ES10/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.28";
14
+ export const version = "4.8.30";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared").Node_Array;
1621
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
package/ES10/index.js CHANGED
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
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.8.28";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.30";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $8tj43$createSignal(false);
16
16
  $8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
@@ -7528,26 +7528,31 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
7528
7528
  return cancel;
7529
7529
  }
7530
7530
  function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
7531
- const worstCaseIdleDeadline = 15000;
7531
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
7532
+ const page_hasnt_loaded =
7533
+ // @ts-ignore
7534
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
7532
7535
  const cancelFrameCheck = $29b3cf99ce390e3b$var$checkForFrameDipsUntil(2000, () => {
7533
7536
  cancelIdleCallback();
7537
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
7534
7538
  callback({
7535
7539
  didTimeout: false,
7536
7540
  timeRemaining: () => 1000
7537
7541
  });
7538
- });
7542
+ }, page_hasnt_loaded);
7539
7543
  const cancelIdleCallback = $6db93f70c2db1486$export$2972b890694ced75(deadline => {
7540
7544
  cancelFrameCheck();
7541
7545
  callback(deadline);
7542
- }, {
7543
- timeout: worstCaseIdleDeadline
7546
+ },
7547
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
7548
+ {
7549
+ timeout: page_hasnt_loaded ? 4000 : 15000
7544
7550
  });
7545
7551
  }
7546
7552
  /**
7547
7553
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7548
7554
  */
7549
- function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7550
- var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
7555
+ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
7551
7556
  const maxDips = 3;
7552
7557
  const noDipsBelow = 20;
7553
7558
  const fpsOverTime = [];
@@ -7577,10 +7582,7 @@ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7577
7582
  }));
7578
7583
  // If page hasn't loaded yet, wait for it to load before starting the check
7579
7584
  // This is because the first few frames until the load event are usually slower
7580
- const page_hasnt_loaded =
7581
- // @ts-ignore
7582
- (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
7583
- if (page_hasnt_loaded) addEventListener("load", () => {
7585
+ if (pageHasntLoaded) addEventListener("load", () => {
7584
7586
  start = performance.now();
7585
7587
  check();
7586
7588
  }, {
@@ -8135,6 +8137,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
8135
8137
  const first_result_in_viewport_ = $8tj43$createSignal();
8136
8138
  const last_result_in_viewport_ = $8tj43$createSignal();
8137
8139
  const all_products_loaded_ = $8tj43$createSignal(false);
8140
+ const [, setAllProductsLoaded] = all_products_loaded_;
8138
8141
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $8tj43$createSignal(0);
8139
8142
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $8tj43$createSignal(false);
8140
8143
  const owner = $8tj43$getOwner();
@@ -8164,31 +8167,34 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
8164
8167
  // Make "Get products in listing" request to get products in listing
8165
8168
  const [plp_products_] = $8tj43$createResource(products_query_base_,
8166
8169
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
8167
- $8tj43$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
8168
- id_: $8tj43$untrack(id_to_query_for_),
8169
- scroll_restoration_data_: scroll_restoration_data_,
8170
- min_products_to_fetch_: min_products_to_fetch_,
8171
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
8172
- ...base_query,
8173
- limit: limit,
8174
- ...(cursor ? {
8175
- cursor: cursor
8176
- } : {}),
8177
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
8178
- // It's very hard to implement tracking that uses the collection title without this information
8179
- currentListingForTransformer_: new Promise(resolve => $8tj43$createRoot(dispose => {
8180
- $8tj43$createEffect($8tj43$catchify(() => {
8181
- const key = base_query.id_type_ + base_query.id_to_query_for_;
8182
- const metaResponsePromise = metaRequestsForQuery().get(key);
8183
- if (!metaResponsePromise) return;
8184
- resolve(metaResponsePromise);
8185
- dispose();
8186
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
8187
- }));
8188
- $8tj43$runWithOwner(owner, () => $8tj43$onCleanup(dispose));
8189
- }))
8190
- })
8191
- })));
8170
+ $8tj43$catchify(base_query => {
8171
+ setAllProductsLoaded(false);
8172
+ return $5e6abec0dab4e610$export$cc42dd29bf655ab6({
8173
+ id_: $8tj43$untrack(id_to_query_for_),
8174
+ scroll_restoration_data_: scroll_restoration_data_,
8175
+ min_products_to_fetch_: min_products_to_fetch_,
8176
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
8177
+ ...base_query,
8178
+ limit: limit,
8179
+ ...(cursor ? {
8180
+ cursor: cursor
8181
+ } : {}),
8182
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
8183
+ // It's very hard to implement tracking that uses the collection title without this information
8184
+ currentListingForTransformer_: new Promise(resolve => $8tj43$createRoot(dispose => {
8185
+ $8tj43$createEffect($8tj43$catchify(() => {
8186
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
8187
+ const metaResponsePromise = metaRequestsForQuery().get(key);
8188
+ if (!metaResponsePromise) return;
8189
+ resolve(metaResponsePromise);
8190
+ dispose();
8191
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
8192
+ }));
8193
+ $8tj43$runWithOwner(owner, () => $8tj43$onCleanup(dispose));
8194
+ }))
8195
+ })
8196
+ });
8197
+ }));
8192
8198
  const meta_query_base = $ec225bf1f1627ea8$export$210f130a61ac1e8d(() => ({
8193
8199
  merchant: merchant_(),
8194
8200
  market: market_(),
package/latest/index.cjs CHANGED
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.28";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.30";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $gVhhF$solidjs.createSignal(false);
115
115
  $gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
@@ -7217,25 +7217,30 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
7217
7217
  return cancel;
7218
7218
  }
7219
7219
  function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
7220
- const worstCaseIdleDeadline = 15000;
7220
+ const page_hasnt_loaded =
7221
+ // @ts-ignore
7222
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
7221
7223
  const cancelFrameCheck = $7ea61486b66872b6$var$checkForFrameDipsUntil(2000, () => {
7222
7224
  cancelIdleCallback();
7225
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
7223
7226
  callback({
7224
7227
  didTimeout: false,
7225
7228
  timeRemaining: () => 1000
7226
7229
  });
7227
- });
7230
+ }, page_hasnt_loaded);
7228
7231
  const cancelIdleCallback = $3ea8e0af95b5b7d2$export$2972b890694ced75(deadline => {
7229
7232
  cancelFrameCheck();
7230
7233
  callback(deadline);
7231
- }, {
7232
- timeout: worstCaseIdleDeadline
7234
+ },
7235
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
7236
+ {
7237
+ timeout: page_hasnt_loaded ? 4000 : 15000
7233
7238
  });
7234
7239
  }
7235
7240
  /**
7236
7241
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7237
7242
  */
7238
- function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7243
+ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
7239
7244
  const maxDips = 3;
7240
7245
  const noDipsBelow = 20;
7241
7246
  const fpsOverTime = [];
@@ -7265,10 +7270,7 @@ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7265
7270
  }));
7266
7271
  // If page hasn't loaded yet, wait for it to load before starting the check
7267
7272
  // This is because the first few frames until the load event are usually slower
7268
- const page_hasnt_loaded =
7269
- // @ts-ignore
7270
- globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
7271
- if (page_hasnt_loaded) addEventListener("load", () => {
7273
+ if (pageHasntLoaded) addEventListener("load", () => {
7272
7274
  start = performance.now();
7273
7275
  check();
7274
7276
  }, {
@@ -7798,6 +7800,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
7798
7800
  const first_result_in_viewport_ = $gVhhF$solidjs.createSignal();
7799
7801
  const last_result_in_viewport_ = $gVhhF$solidjs.createSignal();
7800
7802
  const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
7803
+ const [, setAllProductsLoaded] = all_products_loaded_;
7801
7804
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $gVhhF$solidjs.createSignal(0);
7802
7805
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $gVhhF$solidjs.createSignal(false);
7803
7806
  const owner = $gVhhF$solidjs.getOwner();
@@ -7827,31 +7830,34 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
7827
7830
  // Make "Get products in listing" request to get products in listing
7828
7831
  const [plp_products_] = $gVhhF$solidjs.createResource(products_query_base_,
7829
7832
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
7830
- $gVhhF$depictaiutilisharedlatest.catchify(base_query => $276380e4607fb9fb$export$cc42dd29bf655ab6({
7831
- id_: $gVhhF$solidjs.untrack(id_to_query_for_),
7832
- scroll_restoration_data_: scroll_restoration_data_,
7833
- min_products_to_fetch_: min_products_to_fetch_,
7834
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
7835
- ...base_query,
7836
- limit: limit,
7837
- ...(cursor ? {
7838
- cursor: cursor
7839
- } : {}),
7840
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
7841
- // It's very hard to implement tracking that uses the collection title without this information
7842
- currentListingForTransformer_: new Promise(resolve => $gVhhF$solidjs.createRoot(dispose => {
7843
- $gVhhF$solidjs.createEffect($gVhhF$depictaiutilisharedlatest.catchify(() => {
7844
- const key = base_query.id_type_ + base_query.id_to_query_for_;
7845
- const metaResponsePromise = metaRequestsForQuery().get(key);
7846
- if (!metaResponsePromise) return;
7847
- resolve(metaResponsePromise);
7848
- dispose();
7849
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
7850
- }));
7851
- $gVhhF$solidjs.runWithOwner(owner, () => $gVhhF$solidjs.onCleanup(dispose));
7852
- }))
7853
- })
7854
- })));
7833
+ $gVhhF$depictaiutilisharedlatest.catchify(base_query => {
7834
+ setAllProductsLoaded(false);
7835
+ return $276380e4607fb9fb$export$cc42dd29bf655ab6({
7836
+ id_: $gVhhF$solidjs.untrack(id_to_query_for_),
7837
+ scroll_restoration_data_: scroll_restoration_data_,
7838
+ min_products_to_fetch_: min_products_to_fetch_,
7839
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
7840
+ ...base_query,
7841
+ limit: limit,
7842
+ ...(cursor ? {
7843
+ cursor: cursor
7844
+ } : {}),
7845
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
7846
+ // It's very hard to implement tracking that uses the collection title without this information
7847
+ currentListingForTransformer_: new Promise(resolve => $gVhhF$solidjs.createRoot(dispose => {
7848
+ $gVhhF$solidjs.createEffect($gVhhF$depictaiutilisharedlatest.catchify(() => {
7849
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
7850
+ const metaResponsePromise = metaRequestsForQuery().get(key);
7851
+ if (!metaResponsePromise) return;
7852
+ resolve(metaResponsePromise);
7853
+ dispose();
7854
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
7855
+ }));
7856
+ $gVhhF$solidjs.runWithOwner(owner, () => $gVhhF$solidjs.onCleanup(dispose));
7857
+ }))
7858
+ })
7859
+ });
7860
+ }));
7855
7861
  const meta_query_base = $8cd545330f2674dc$export$210f130a61ac1e8d(() => ({
7856
7862
  merchant: merchant_(),
7857
7863
  market: market_(),
package/latest/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.28";
14
+ export const version = "4.8.30";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared").Node_Array;
1621
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
package/latest/index.js CHANGED
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$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.8.28";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.30";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $9HbP8$createSignal(false);
13
13
  $9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
@@ -7115,25 +7115,30 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
7115
7115
  return cancel;
7116
7116
  }
7117
7117
  function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
7118
- const worstCaseIdleDeadline = 15000;
7118
+ const page_hasnt_loaded =
7119
+ // @ts-ignore
7120
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
7119
7121
  const cancelFrameCheck = $f71681eb5d5aae0a$var$checkForFrameDipsUntil(2000, () => {
7120
7122
  cancelIdleCallback();
7123
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
7121
7124
  callback({
7122
7125
  didTimeout: false,
7123
7126
  timeRemaining: () => 1000
7124
7127
  });
7125
- });
7128
+ }, page_hasnt_loaded);
7126
7129
  const cancelIdleCallback = $4ea56971d92eb0cd$export$2972b890694ced75(deadline => {
7127
7130
  cancelFrameCheck();
7128
7131
  callback(deadline);
7129
- }, {
7130
- timeout: worstCaseIdleDeadline
7132
+ },
7133
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
7134
+ {
7135
+ timeout: page_hasnt_loaded ? 4000 : 15000
7131
7136
  });
7132
7137
  }
7133
7138
  /**
7134
7139
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7135
7140
  */
7136
- function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7141
+ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
7137
7142
  const maxDips = 3;
7138
7143
  const noDipsBelow = 20;
7139
7144
  const fpsOverTime = [];
@@ -7163,10 +7168,7 @@ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7163
7168
  }));
7164
7169
  // If page hasn't loaded yet, wait for it to load before starting the check
7165
7170
  // This is because the first few frames until the load event are usually slower
7166
- const page_hasnt_loaded =
7167
- // @ts-ignore
7168
- globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
7169
- if (page_hasnt_loaded) addEventListener("load", () => {
7171
+ if (pageHasntLoaded) addEventListener("load", () => {
7170
7172
  start = performance.now();
7171
7173
  check();
7172
7174
  }, {
@@ -7696,6 +7698,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
7696
7698
  const first_result_in_viewport_ = $9HbP8$createSignal();
7697
7699
  const last_result_in_viewport_ = $9HbP8$createSignal();
7698
7700
  const all_products_loaded_ = $9HbP8$createSignal(false);
7701
+ const [, setAllProductsLoaded] = all_products_loaded_;
7699
7702
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $9HbP8$createSignal(0);
7700
7703
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $9HbP8$createSignal(false);
7701
7704
  const owner = $9HbP8$getOwner();
@@ -7725,31 +7728,34 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
7725
7728
  // Make "Get products in listing" request to get products in listing
7726
7729
  const [plp_products_] = $9HbP8$createResource(products_query_base_,
7727
7730
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
7728
- $9HbP8$catchify(base_query => $641bba2917fe862b$export$cc42dd29bf655ab6({
7729
- id_: $9HbP8$untrack(id_to_query_for_),
7730
- scroll_restoration_data_: scroll_restoration_data_,
7731
- min_products_to_fetch_: min_products_to_fetch_,
7732
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
7733
- ...base_query,
7734
- limit: limit,
7735
- ...(cursor ? {
7736
- cursor: cursor
7737
- } : {}),
7738
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
7739
- // It's very hard to implement tracking that uses the collection title without this information
7740
- currentListingForTransformer_: new Promise(resolve => $9HbP8$createRoot(dispose => {
7741
- $9HbP8$createEffect($9HbP8$catchify(() => {
7742
- const key = base_query.id_type_ + base_query.id_to_query_for_;
7743
- const metaResponsePromise = metaRequestsForQuery().get(key);
7744
- if (!metaResponsePromise) return;
7745
- resolve(metaResponsePromise);
7746
- dispose();
7747
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
7748
- }));
7749
- $9HbP8$runWithOwner(owner, () => $9HbP8$onCleanup(dispose));
7750
- }))
7751
- })
7752
- })));
7731
+ $9HbP8$catchify(base_query => {
7732
+ setAllProductsLoaded(false);
7733
+ return $641bba2917fe862b$export$cc42dd29bf655ab6({
7734
+ id_: $9HbP8$untrack(id_to_query_for_),
7735
+ scroll_restoration_data_: scroll_restoration_data_,
7736
+ min_products_to_fetch_: min_products_to_fetch_,
7737
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
7738
+ ...base_query,
7739
+ limit: limit,
7740
+ ...(cursor ? {
7741
+ cursor: cursor
7742
+ } : {}),
7743
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
7744
+ // It's very hard to implement tracking that uses the collection title without this information
7745
+ currentListingForTransformer_: new Promise(resolve => $9HbP8$createRoot(dispose => {
7746
+ $9HbP8$createEffect($9HbP8$catchify(() => {
7747
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
7748
+ const metaResponsePromise = metaRequestsForQuery().get(key);
7749
+ if (!metaResponsePromise) return;
7750
+ resolve(metaResponsePromise);
7751
+ dispose();
7752
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
7753
+ }));
7754
+ $9HbP8$runWithOwner(owner, () => $9HbP8$onCleanup(dispose));
7755
+ }))
7756
+ })
7757
+ });
7758
+ }));
7753
7759
  const meta_query_base = $587cd61972788655$export$210f130a61ac1e8d(() => ({
7754
7760
  merchant: merchant_(),
7755
7761
  market: market_(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.8.28",
3
+ "version": "4.8.30",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -236,7 +236,7 @@
236
236
  "@babel/plugin-transform-typescript": "^7.22.9",
237
237
  "@babel/runtime": "latest",
238
238
  "@babel/runtime-corejs3": "^7.22.6",
239
- "@depict-ai/plp-styling": "^4.4.20",
239
+ "@depict-ai/plp-styling": "^4.4.21",
240
240
  "@depict-ai/types": "^5.4.5",
241
241
  "@depict-ai/utilishared": "^2.4.7",
242
242
  "solid-js": "^1.8.16"
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.28";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.30";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $3hooq$solidjs.createSignal(false);
121
121
  $3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -6218,26 +6218,31 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
6218
6218
  return cancel;
6219
6219
  }
6220
6220
  function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
6221
- const worstCaseIdleDeadline = 15000;
6221
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
6222
+ const page_hasnt_loaded =
6223
+ // @ts-ignore
6224
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
6222
6225
  const cancelFrameCheck = $4692443b324db9ee$var$checkForFrameDipsUntil(2000, () => {
6223
6226
  cancelIdleCallback();
6227
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
6224
6228
  callback({
6225
6229
  didTimeout: false,
6226
6230
  timeRemaining: () => 1000
6227
6231
  });
6228
- });
6232
+ }, page_hasnt_loaded);
6229
6233
  const cancelIdleCallback = $e4e98e5080f4386e$export$2972b890694ced75(deadline => {
6230
6234
  cancelFrameCheck();
6231
6235
  callback(deadline);
6232
- }, {
6233
- timeout: worstCaseIdleDeadline
6236
+ },
6237
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
6238
+ {
6239
+ timeout: page_hasnt_loaded ? 4000 : 15000
6234
6240
  });
6235
6241
  }
6236
6242
  /**
6237
6243
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
6238
6244
  */
6239
- function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
6240
- var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
6245
+ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
6241
6246
  const maxDips = 3;
6242
6247
  const noDipsBelow = 20;
6243
6248
  const fpsOverTime = [];
@@ -6267,10 +6272,7 @@ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
6267
6272
  }));
6268
6273
  // If page hasn't loaded yet, wait for it to load before starting the check
6269
6274
  // This is because the first few frames until the load event are usually slower
6270
- const page_hasnt_loaded =
6271
- // @ts-ignore
6272
- (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
6273
- if (page_hasnt_loaded) addEventListener("load", () => {
6275
+ if (pageHasntLoaded) addEventListener("load", () => {
6274
6276
  start = performance.now();
6275
6277
  check();
6276
6278
  }, {
@@ -6798,6 +6800,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
6798
6800
  const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
6799
6801
  const last_result_in_viewport_ = $3hooq$solidjs.createSignal();
6800
6802
  const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
6803
+ const [, setAllProductsLoaded] = all_products_loaded_;
6801
6804
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
6802
6805
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $3hooq$solidjs.createSignal(false);
6803
6806
  const owner = $3hooq$solidjs.getOwner();
@@ -6827,31 +6830,34 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
6827
6830
  // Make "Get products in listing" request to get products in listing
6828
6831
  const [plp_products_] = $3hooq$solidjs.createResource(products_query_base_,
6829
6832
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
6830
- $3hooq$depictaiutilisharedlatest.catchify(base_query => $fef4890f1f8e0544$export$cc42dd29bf655ab6({
6831
- id_: $3hooq$solidjs.untrack(id_to_query_for_),
6832
- scroll_restoration_data_: scroll_restoration_data_,
6833
- min_products_to_fetch_: min_products_to_fetch_,
6834
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
6835
- ...base_query,
6836
- limit: limit,
6837
- ...(cursor ? {
6838
- cursor: cursor
6839
- } : {}),
6840
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
6841
- // It's very hard to implement tracking that uses the collection title without this information
6842
- currentListingForTransformer_: new Promise(resolve => $3hooq$solidjs.createRoot(dispose => {
6843
- $3hooq$solidjs.createEffect($3hooq$depictaiutilisharedlatest.catchify(() => {
6844
- const key = base_query.id_type_ + base_query.id_to_query_for_;
6845
- const metaResponsePromise = metaRequestsForQuery().get(key);
6846
- if (!metaResponsePromise) return;
6847
- resolve(metaResponsePromise);
6848
- dispose();
6849
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6850
- }));
6851
- $3hooq$solidjs.runWithOwner(owner, () => $3hooq$solidjs.onCleanup(dispose));
6852
- }))
6853
- })
6854
- })));
6833
+ $3hooq$depictaiutilisharedlatest.catchify(base_query => {
6834
+ setAllProductsLoaded(false);
6835
+ return $fef4890f1f8e0544$export$cc42dd29bf655ab6({
6836
+ id_: $3hooq$solidjs.untrack(id_to_query_for_),
6837
+ scroll_restoration_data_: scroll_restoration_data_,
6838
+ min_products_to_fetch_: min_products_to_fetch_,
6839
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
6840
+ ...base_query,
6841
+ limit: limit,
6842
+ ...(cursor ? {
6843
+ cursor: cursor
6844
+ } : {}),
6845
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
6846
+ // It's very hard to implement tracking that uses the collection title without this information
6847
+ currentListingForTransformer_: new Promise(resolve => $3hooq$solidjs.createRoot(dispose => {
6848
+ $3hooq$solidjs.createEffect($3hooq$depictaiutilisharedlatest.catchify(() => {
6849
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
6850
+ const metaResponsePromise = metaRequestsForQuery().get(key);
6851
+ if (!metaResponsePromise) return;
6852
+ resolve(metaResponsePromise);
6853
+ dispose();
6854
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6855
+ }));
6856
+ $3hooq$solidjs.runWithOwner(owner, () => $3hooq$solidjs.onCleanup(dispose));
6857
+ }))
6858
+ })
6859
+ });
6860
+ }));
6855
6861
  const meta_query_base = $e4bc31358c414b18$export$210f130a61ac1e8d(() => ({
6856
6862
  merchant: merchant_(),
6857
6863
  market: market_(),
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.28";
14
+ export const version = "4.8.30";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared").Node_Array;
1621
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
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.8.28";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.30";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $b8hua$createSignal(false);
16
16
  $b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
@@ -6113,26 +6113,31 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
6113
6113
  return cancel;
6114
6114
  }
6115
6115
  function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
6116
- const worstCaseIdleDeadline = 15000;
6116
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
6117
+ const page_hasnt_loaded =
6118
+ // @ts-ignore
6119
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
6117
6120
  const cancelFrameCheck = $29b3cf99ce390e3b$var$checkForFrameDipsUntil(2000, () => {
6118
6121
  cancelIdleCallback();
6122
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
6119
6123
  callback({
6120
6124
  didTimeout: false,
6121
6125
  timeRemaining: () => 1000
6122
6126
  });
6123
- });
6127
+ }, page_hasnt_loaded);
6124
6128
  const cancelIdleCallback = $6db93f70c2db1486$export$2972b890694ced75(deadline => {
6125
6129
  cancelFrameCheck();
6126
6130
  callback(deadline);
6127
- }, {
6128
- timeout: worstCaseIdleDeadline
6131
+ },
6132
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
6133
+ {
6134
+ timeout: page_hasnt_loaded ? 4000 : 15000
6129
6135
  });
6130
6136
  }
6131
6137
  /**
6132
6138
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
6133
6139
  */
6134
- function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
6135
- var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
6140
+ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
6136
6141
  const maxDips = 3;
6137
6142
  const noDipsBelow = 20;
6138
6143
  const fpsOverTime = [];
@@ -6162,10 +6167,7 @@ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
6162
6167
  }));
6163
6168
  // If page hasn't loaded yet, wait for it to load before starting the check
6164
6169
  // This is because the first few frames until the load event are usually slower
6165
- const page_hasnt_loaded =
6166
- // @ts-ignore
6167
- (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
6168
- if (page_hasnt_loaded) addEventListener("load", () => {
6170
+ if (pageHasntLoaded) addEventListener("load", () => {
6169
6171
  start = performance.now();
6170
6172
  check();
6171
6173
  }, {
@@ -6693,6 +6695,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
6693
6695
  const first_result_in_viewport_ = $b8hua$createSignal();
6694
6696
  const last_result_in_viewport_ = $b8hua$createSignal();
6695
6697
  const all_products_loaded_ = $b8hua$createSignal(false);
6698
+ const [, setAllProductsLoaded] = all_products_loaded_;
6696
6699
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $b8hua$createSignal(0);
6697
6700
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $b8hua$createSignal(false);
6698
6701
  const owner = $b8hua$getOwner();
@@ -6722,31 +6725,34 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
6722
6725
  // Make "Get products in listing" request to get products in listing
6723
6726
  const [plp_products_] = $b8hua$createResource(products_query_base_,
6724
6727
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
6725
- $b8hua$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
6726
- id_: $b8hua$untrack(id_to_query_for_),
6727
- scroll_restoration_data_: scroll_restoration_data_,
6728
- min_products_to_fetch_: min_products_to_fetch_,
6729
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
6730
- ...base_query,
6731
- limit: limit,
6732
- ...(cursor ? {
6733
- cursor: cursor
6734
- } : {}),
6735
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
6736
- // It's very hard to implement tracking that uses the collection title without this information
6737
- currentListingForTransformer_: new Promise(resolve => $b8hua$createRoot(dispose => {
6738
- $b8hua$createEffect($b8hua$catchify(() => {
6739
- const key = base_query.id_type_ + base_query.id_to_query_for_;
6740
- const metaResponsePromise = metaRequestsForQuery().get(key);
6741
- if (!metaResponsePromise) return;
6742
- resolve(metaResponsePromise);
6743
- dispose();
6744
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6745
- }));
6746
- $b8hua$runWithOwner(owner, () => $b8hua$onCleanup(dispose));
6747
- }))
6748
- })
6749
- })));
6728
+ $b8hua$catchify(base_query => {
6729
+ setAllProductsLoaded(false);
6730
+ return $5e6abec0dab4e610$export$cc42dd29bf655ab6({
6731
+ id_: $b8hua$untrack(id_to_query_for_),
6732
+ scroll_restoration_data_: scroll_restoration_data_,
6733
+ min_products_to_fetch_: min_products_to_fetch_,
6734
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
6735
+ ...base_query,
6736
+ limit: limit,
6737
+ ...(cursor ? {
6738
+ cursor: cursor
6739
+ } : {}),
6740
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
6741
+ // It's very hard to implement tracking that uses the collection title without this information
6742
+ currentListingForTransformer_: new Promise(resolve => $b8hua$createRoot(dispose => {
6743
+ $b8hua$createEffect($b8hua$catchify(() => {
6744
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
6745
+ const metaResponsePromise = metaRequestsForQuery().get(key);
6746
+ if (!metaResponsePromise) return;
6747
+ resolve(metaResponsePromise);
6748
+ dispose();
6749
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6750
+ }));
6751
+ $b8hua$runWithOwner(owner, () => $b8hua$onCleanup(dispose));
6752
+ }))
6753
+ })
6754
+ });
6755
+ }));
6750
6756
  const meta_query_base = $ec225bf1f1627ea8$export$210f130a61ac1e8d(() => ({
6751
6757
  merchant: merchant_(),
6752
6758
  market: market_(),
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.28";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.30";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $5vyXB$solidjs.createSignal(false);
115
115
  $5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
@@ -5855,25 +5855,30 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
5855
5855
  return cancel;
5856
5856
  }
5857
5857
  function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
5858
- const worstCaseIdleDeadline = 15000;
5858
+ const page_hasnt_loaded =
5859
+ // @ts-ignore
5860
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
5859
5861
  const cancelFrameCheck = $7ea61486b66872b6$var$checkForFrameDipsUntil(2000, () => {
5860
5862
  cancelIdleCallback();
5863
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
5861
5864
  callback({
5862
5865
  didTimeout: false,
5863
5866
  timeRemaining: () => 1000
5864
5867
  });
5865
- });
5868
+ }, page_hasnt_loaded);
5866
5869
  const cancelIdleCallback = $3ea8e0af95b5b7d2$export$2972b890694ced75(deadline => {
5867
5870
  cancelFrameCheck();
5868
5871
  callback(deadline);
5869
- }, {
5870
- timeout: worstCaseIdleDeadline
5872
+ },
5873
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
5874
+ {
5875
+ timeout: page_hasnt_loaded ? 4000 : 15000
5871
5876
  });
5872
5877
  }
5873
5878
  /**
5874
5879
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
5875
5880
  */
5876
- function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
5881
+ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
5877
5882
  const maxDips = 3;
5878
5883
  const noDipsBelow = 20;
5879
5884
  const fpsOverTime = [];
@@ -5903,10 +5908,7 @@ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
5903
5908
  }));
5904
5909
  // If page hasn't loaded yet, wait for it to load before starting the check
5905
5910
  // This is because the first few frames until the load event are usually slower
5906
- const page_hasnt_loaded =
5907
- // @ts-ignore
5908
- globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
5909
- if (page_hasnt_loaded) addEventListener("load", () => {
5911
+ if (pageHasntLoaded) addEventListener("load", () => {
5910
5912
  start = performance.now();
5911
5913
  check();
5912
5914
  }, {
@@ -6409,6 +6411,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
6409
6411
  const first_result_in_viewport_ = $5vyXB$solidjs.createSignal();
6410
6412
  const last_result_in_viewport_ = $5vyXB$solidjs.createSignal();
6411
6413
  const all_products_loaded_ = $5vyXB$solidjs.createSignal(false);
6414
+ const [, setAllProductsLoaded] = all_products_loaded_;
6412
6415
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $5vyXB$solidjs.createSignal(0);
6413
6416
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $5vyXB$solidjs.createSignal(false);
6414
6417
  const owner = $5vyXB$solidjs.getOwner();
@@ -6438,31 +6441,34 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
6438
6441
  // Make "Get products in listing" request to get products in listing
6439
6442
  const [plp_products_] = $5vyXB$solidjs.createResource(products_query_base_,
6440
6443
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
6441
- $5vyXB$depictaiutilisharedlatest.catchify(base_query => $276380e4607fb9fb$export$cc42dd29bf655ab6({
6442
- id_: $5vyXB$solidjs.untrack(id_to_query_for_),
6443
- scroll_restoration_data_: scroll_restoration_data_,
6444
- min_products_to_fetch_: min_products_to_fetch_,
6445
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
6446
- ...base_query,
6447
- limit: limit,
6448
- ...(cursor ? {
6449
- cursor: cursor
6450
- } : {}),
6451
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
6452
- // It's very hard to implement tracking that uses the collection title without this information
6453
- currentListingForTransformer_: new Promise(resolve => $5vyXB$solidjs.createRoot(dispose => {
6454
- $5vyXB$solidjs.createEffect($5vyXB$depictaiutilisharedlatest.catchify(() => {
6455
- const key = base_query.id_type_ + base_query.id_to_query_for_;
6456
- const metaResponsePromise = metaRequestsForQuery().get(key);
6457
- if (!metaResponsePromise) return;
6458
- resolve(metaResponsePromise);
6459
- dispose();
6460
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6461
- }));
6462
- $5vyXB$solidjs.runWithOwner(owner, () => $5vyXB$solidjs.onCleanup(dispose));
6463
- }))
6464
- })
6465
- })));
6444
+ $5vyXB$depictaiutilisharedlatest.catchify(base_query => {
6445
+ setAllProductsLoaded(false);
6446
+ return $276380e4607fb9fb$export$cc42dd29bf655ab6({
6447
+ id_: $5vyXB$solidjs.untrack(id_to_query_for_),
6448
+ scroll_restoration_data_: scroll_restoration_data_,
6449
+ min_products_to_fetch_: min_products_to_fetch_,
6450
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
6451
+ ...base_query,
6452
+ limit: limit,
6453
+ ...(cursor ? {
6454
+ cursor: cursor
6455
+ } : {}),
6456
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
6457
+ // It's very hard to implement tracking that uses the collection title without this information
6458
+ currentListingForTransformer_: new Promise(resolve => $5vyXB$solidjs.createRoot(dispose => {
6459
+ $5vyXB$solidjs.createEffect($5vyXB$depictaiutilisharedlatest.catchify(() => {
6460
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
6461
+ const metaResponsePromise = metaRequestsForQuery().get(key);
6462
+ if (!metaResponsePromise) return;
6463
+ resolve(metaResponsePromise);
6464
+ dispose();
6465
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6466
+ }));
6467
+ $5vyXB$solidjs.runWithOwner(owner, () => $5vyXB$solidjs.onCleanup(dispose));
6468
+ }))
6469
+ })
6470
+ });
6471
+ }));
6466
6472
  const meta_query_base = $8cd545330f2674dc$export$210f130a61ac1e8d(() => ({
6467
6473
  merchant: merchant_(),
6468
6474
  market: market_(),
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.28";
14
+ export const version = "4.8.30";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared").Node_Array;
1621
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
@@ -7,7 +7,7 @@ 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.8.28";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.30";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $i7OB2$createSignal(false);
13
13
  $i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
@@ -5753,25 +5753,30 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
5753
5753
  return cancel;
5754
5754
  }
5755
5755
  function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
5756
- const worstCaseIdleDeadline = 15000;
5756
+ const page_hasnt_loaded =
5757
+ // @ts-ignore
5758
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
5757
5759
  const cancelFrameCheck = $f71681eb5d5aae0a$var$checkForFrameDipsUntil(2000, () => {
5758
5760
  cancelIdleCallback();
5761
+ // Allow a long time of loading images since otherwise it takes even longer to erroneously load images later
5759
5762
  callback({
5760
5763
  didTimeout: false,
5761
5764
  timeRemaining: () => 1000
5762
5765
  });
5763
- });
5766
+ }, page_hasnt_loaded);
5764
5767
  const cancelIdleCallback = $4ea56971d92eb0cd$export$2972b890694ced75(deadline => {
5765
5768
  cancelFrameCheck();
5766
5769
  callback(deadline);
5767
- }, {
5768
- timeout: worstCaseIdleDeadline
5770
+ },
5771
+ // If page hasn't loaded yet, it's more likely we run into the chrome bug than need to delay image loading to not lock up the browser, so only give rIC a 4s timeout
5772
+ {
5773
+ timeout: page_hasnt_loaded ? 4000 : 15000
5769
5774
  });
5770
5775
  }
5771
5776
  /**
5772
5777
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
5773
5778
  */
5774
- function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
5779
+ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips, pageHasntLoaded) {
5775
5780
  const maxDips = 3;
5776
5781
  const noDipsBelow = 20;
5777
5782
  const fpsOverTime = [];
@@ -5801,10 +5806,7 @@ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
5801
5806
  }));
5802
5807
  // If page hasn't loaded yet, wait for it to load before starting the check
5803
5808
  // This is because the first few frames until the load event are usually slower
5804
- const page_hasnt_loaded =
5805
- // @ts-ignore
5806
- globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
5807
- if (page_hasnt_loaded) addEventListener("load", () => {
5809
+ if (pageHasntLoaded) addEventListener("load", () => {
5808
5810
  start = performance.now();
5809
5811
  check();
5810
5812
  }, {
@@ -6307,6 +6309,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
6307
6309
  const first_result_in_viewport_ = $i7OB2$createSignal();
6308
6310
  const last_result_in_viewport_ = $i7OB2$createSignal();
6309
6311
  const all_products_loaded_ = $i7OB2$createSignal(false);
6312
+ const [, setAllProductsLoaded] = all_products_loaded_;
6310
6313
  const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $i7OB2$createSignal(0);
6311
6314
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $i7OB2$createSignal(false);
6312
6315
  const owner = $i7OB2$getOwner();
@@ -6336,31 +6339,34 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
6336
6339
  // Make "Get products in listing" request to get products in listing
6337
6340
  const [plp_products_] = $i7OB2$createResource(products_query_base_,
6338
6341
  // only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
6339
- $i7OB2$catchify(base_query => $641bba2917fe862b$export$cc42dd29bf655ab6({
6340
- id_: $i7OB2$untrack(id_to_query_for_),
6341
- scroll_restoration_data_: scroll_restoration_data_,
6342
- min_products_to_fetch_: min_products_to_fetch_,
6343
- make_request_: (limit, cursor) => depict_api_.get_listing_products({
6344
- ...base_query,
6345
- limit: limit,
6346
- ...(cursor ? {
6347
- cursor: cursor
6348
- } : {}),
6349
- // This gets exposed to the products display transformer and gives it information about the listing the products are in
6350
- // It's very hard to implement tracking that uses the collection title without this information
6351
- currentListingForTransformer_: new Promise(resolve => $i7OB2$createRoot(dispose => {
6352
- $i7OB2$createEffect($i7OB2$catchify(() => {
6353
- const key = base_query.id_type_ + base_query.id_to_query_for_;
6354
- const metaResponsePromise = metaRequestsForQuery().get(key);
6355
- if (!metaResponsePromise) return;
6356
- resolve(metaResponsePromise);
6357
- dispose();
6358
- setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6359
- }));
6360
- $i7OB2$runWithOwner(owner, () => $i7OB2$onCleanup(dispose));
6361
- }))
6362
- })
6363
- })));
6342
+ $i7OB2$catchify(base_query => {
6343
+ setAllProductsLoaded(false);
6344
+ return $641bba2917fe862b$export$cc42dd29bf655ab6({
6345
+ id_: $i7OB2$untrack(id_to_query_for_),
6346
+ scroll_restoration_data_: scroll_restoration_data_,
6347
+ min_products_to_fetch_: min_products_to_fetch_,
6348
+ make_request_: (limit, cursor) => depict_api_.get_listing_products({
6349
+ ...base_query,
6350
+ limit: limit,
6351
+ ...(cursor ? {
6352
+ cursor: cursor
6353
+ } : {}),
6354
+ // This gets exposed to the products display transformer and gives it information about the listing the products are in
6355
+ // It's very hard to implement tracking that uses the collection title without this information
6356
+ currentListingForTransformer_: new Promise(resolve => $i7OB2$createRoot(dispose => {
6357
+ $i7OB2$createEffect($i7OB2$catchify(() => {
6358
+ const key = base_query.id_type_ + base_query.id_to_query_for_;
6359
+ const metaResponsePromise = metaRequestsForQuery().get(key);
6360
+ if (!metaResponsePromise) return;
6361
+ resolve(metaResponsePromise);
6362
+ dispose();
6363
+ setMetaRequestsForQuery(prev => (prev.delete(key), prev));
6364
+ }));
6365
+ $i7OB2$runWithOwner(owner, () => $i7OB2$onCleanup(dispose));
6366
+ }))
6367
+ })
6368
+ });
6369
+ }));
6364
6370
  const meta_query_base = $587cd61972788655$export$210f130a61ac1e8d(() => ({
6365
6371
  merchant: merchant_(),
6366
6372
  market: market_(),