@depict-ai/ui 4.0.18 → 4.0.20

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.
@@ -95,7 +95,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
95
95
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
96
96
  $parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
97
97
  /*! Depict.ai search and product listing SDK */
98
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.18";
98
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.20";
99
99
 
100
100
  /**
101
101
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
@@ -2248,8 +2248,8 @@ function $317500f39819fba6$export$9ca09caa9c849d9c() {
2248
2248
  var $d1e7b96fb13cd1d3$var$_tmpl$ = ["<a", ">", "</a>"],
2249
2249
  $d1e7b96fb13cd1d3$var$_tmpl$2 = ["<div", ' class="', '"><div class="image-part" style="', '">', "</div><!--$-->", '<!--/--><h3 class="title">', "</h3></div>"],
2250
2250
  $d1e7b96fb13cd1d3$var$_tmpl$3 = ["<div", ' class="empty-image" style="', '">', "</div>"];
2251
- const $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent = 402.67;
2252
- const $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent = 203.64;
2251
+ const $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent = 400;
2252
+ const $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent = 200;
2253
2253
  const $d1e7b96fb13cd1d3$var$listingSuggestionCollageAspectRatio = $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent / $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent;
2254
2254
  function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
2255
2255
  var _image_urls$length, _image_urls;
@@ -2845,9 +2845,10 @@ function $58ffab03481f8973$export$66d1697a0f27069c(modalLayoutStacked) {
2845
2845
  };
2846
2846
  }
2847
2847
  var $43600b30502feeda$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
2848
- $43600b30502feeda$var$_tmpl$2 = ["<div", ' class="', '"></div>'],
2849
- $43600b30502feeda$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div><div class="discover-more"><button class="major" type="button">', "</button></div></div><!--$-->", "<!--/--></div>"],
2850
- $43600b30502feeda$var$_tmpl$4 = ["<b", ">", "</b>"];
2848
+ $43600b30502feeda$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
2849
+ $43600b30502feeda$var$_tmpl$3 = ["<b", ">", "</b>"],
2850
+ $43600b30502feeda$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
2851
+ $43600b30502feeda$var$_tmpl$5 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div></div><!--$-->', "<!--/--></div>"];
2851
2852
  /**
2852
2853
  * Second generation search modal - the solid component that gets added to <body> when the search modal is opened
2853
2854
  */
@@ -3130,6 +3131,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
3130
3131
  if (forceUseDiv_) return $3hooq$solidjsweb.ssrElement("div", props, () => $3hooq$solidjsweb.escape(props.children), true);
3131
3132
  return $3hooq$solidjsweb.ssrElement("dialog", props, () => $3hooq$solidjsweb.escape(props.children), true);
3132
3133
  };
3134
+ const discoverMoreSection = $3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), get_search_field_value_() ? $3hooq$solidjsweb.escape(i18n_.modal_view_all_results_()($3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(formattedTotalNumberResults())))) : $3hooq$solidjsweb.escape(i18n_.modal_discover_more_()));
3133
3135
  const search_field = $29e5dbeb69da7a36$export$b94867ecbd698f21({
3134
3136
  BackIcon_: () => $3hooq$solidjsweb.createComponent((0, $50b50df3efaa8776$export$11e9f390c90a537f), {}),
3135
3137
  input_field_ref_: element => set_input_field(element),
@@ -3166,7 +3168,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
3166
3168
  },
3167
3169
  onClose: close_modal_,
3168
3170
  get children() {
3169
- return [$3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "depict-search-modal-backdrop ".concat($3hooq$solidjsweb.escape($3hooq$solidjsweb.escape(backdropRandomClassname, true), true))), $3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), "depict-search-modal ".concat(modalLayoutStacked_() ? "stacked" : ""), "body ".concat($3hooq$solidjsweb.escape($3hooq$solidjsweb.escape(random_classname_body, true), true)), $3hooq$solidjsweb.escape(search_field), "padded ".concat(noResults() ? "no-results" : ""), get_search_field_value_() ? $3hooq$solidjsweb.escape(i18n_.modal_view_all_results_()($3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(formattedTotalNumberResults())))) : $3hooq$solidjsweb.escape(i18n_.modal_discover_more_()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $cc66bbf6e783bb58$export$f021bdedd3ec901a), {
3171
+ return [$3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "depict-search-modal-backdrop ".concat($3hooq$solidjsweb.escape($3hooq$solidjsweb.escape(backdropRandomClassname, true), true))), $3hooq$solidjsweb.ssr($43600b30502feeda$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), "depict-search-modal ".concat(modalLayoutStacked_() ? "stacked" : ""), "body ".concat($3hooq$solidjsweb.escape($3hooq$solidjsweb.escape(random_classname_body, true), true)), $3hooq$solidjsweb.escape(search_field), "padded ".concat(noResults() ? "no-results" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $cc66bbf6e783bb58$export$f021bdedd3ec901a), {
3170
3172
  styles: mergedCssObject
3171
3173
  })))];
3172
3174
  }
@@ -11180,6 +11182,69 @@ function $eab939d0b95b75ee$var$make_state_saved_rows(_ref2, i18n_) {
11180
11182
  }));
11181
11183
  return rows;
11182
11184
  }
11185
+ function $ce2f7ec02a8f2173$export$e06dee46ebe7faa9(_ref) {
11186
+ let {
11187
+ setBackdropStyle_: setBackdropStyle_,
11188
+ setBodyAlignment_: setBodyAlignment_,
11189
+ openDuration_: openDuration_
11190
+ } = _ref;
11191
+ setBackdropStyle_(prev => ({
11192
+ ...prev,
11193
+ opacity: 0,
11194
+ transition: "opacity ".concat(openDuration_, "ms ease-in")
11195
+ }));
11196
+ requestAnimationFrame(() => setBackdropStyle_(prev => ({
11197
+ ...prev,
11198
+ opacity: 1
11199
+ })));
11200
+ setBodyAlignment_(prev => ({
11201
+ ...prev,
11202
+ opacity: 0,
11203
+ transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
11204
+ // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
11205
+ "--js-animation-duration": "".concat(openDuration_, "ms")
11206
+ }));
11207
+ requestAnimationFrame(() => setBodyAlignment_(prev => ({
11208
+ ...prev,
11209
+ opacity: 1
11210
+ })));
11211
+ }
11212
+ function $ce2f7ec02a8f2173$export$23d40cc5971c3acd(_ref2) {
11213
+ let {
11214
+ setBackdropStyle_: setBackdropStyle_,
11215
+ setBodyAlignment_: setBodyAlignment_,
11216
+ closeDuration_: closeDuration_
11217
+ } = _ref2;
11218
+ setBackdropStyle_(prev => ({
11219
+ ...prev,
11220
+ opacity: 0,
11221
+ transition: "opacity ".concat(closeDuration_, "ms ease-out")
11222
+ }));
11223
+ setBodyAlignment_(prev => ({
11224
+ ...prev,
11225
+ opacity: 0,
11226
+ transition: "opacity ".concat(closeDuration_, "ms ease-out")
11227
+ }));
11228
+ }
11229
+ function $ce2f7ec02a8f2173$export$dab9321f3c157061(alignmentSignals, modalVersion) {
11230
+ const [, setBodyAlignment_] = alignmentSignals.body_;
11231
+ const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $3hooq$solidjs.createSignal({});
11232
+ // For default centered modal, also run our fading animations if search modal v2
11233
+ modalVersion === 2 && $ce2f7ec02a8f2173$export$e06dee46ebe7faa9({
11234
+ openDuration_: 125,
11235
+ setBodyAlignment_: setBodyAlignment_,
11236
+ setBackdropStyle_: setBackdropStyle_
11237
+ });
11238
+ const closingAnimation = modalVersion === 2 ? async () => {
11239
+ $ce2f7ec02a8f2173$export$23d40cc5971c3acd({
11240
+ closeDuration_: 100,
11241
+ setBodyAlignment_: setBodyAlignment_,
11242
+ setBackdropStyle_: setBackdropStyle_
11243
+ });
11244
+ await new Promise(r => setTimeout(r, 100));
11245
+ } : undefined;
11246
+ return closingAnimation;
11247
+ }
11183
11248
  var $a60bc7692ce52705$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
11184
11249
  function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11185
11250
  let {
@@ -11194,7 +11259,15 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11194
11259
  } = _ref;
11195
11260
  return $3hooq$solidjs.createRoot(dispose => {
11196
11261
  const [innerWidthReactive, setInnerWidthReactive] = $3hooq$solidjs.createSignal(innerWidth);
11197
- const resizeObserver = new ResizeObserver(records => setInnerWidthReactive(records.at(-1).contentRect.width));
11262
+ const [innerHeightReactive, setInnerHeightReactive] = $3hooq$solidjs.createSignal(innerHeight);
11263
+ const resizeObserver = new ResizeObserver(records => {
11264
+ const {
11265
+ width: width,
11266
+ height: height
11267
+ } = records.at(-1).contentRect;
11268
+ setInnerWidthReactive(width);
11269
+ setInnerHeightReactive(height);
11270
+ });
11198
11271
  const {
11199
11272
  left: left,
11200
11273
  top: top,
@@ -11223,6 +11296,12 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11223
11296
  zIndex: +zIndexOfFake + 1
11224
11297
  } : {})
11225
11298
  });
11299
+ const absoluteFieldTop = $3hooq$solidjs.createMemo(() => {
11300
+ innerHeightReactive();
11301
+ innerWidthReactive();
11302
+ // This is very semi-scientific but I hope it works (seems to, albeit laggy see comment where this value gets used)
11303
+ return fakeField.getBoundingClientRect().top;
11304
+ });
11226
11305
  const pxOffCenter = Math.abs($3hooq$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
11227
11306
  const openDuration_ = pxOffCenter > 100 ? 250 : 125; // faster animations if little left-right movement
11228
11307
  const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
@@ -11256,7 +11335,10 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11256
11335
  Object.assign(addedToBody.style, {
11257
11336
  // This is left: 50%, transform: translateX(-50) with extra steps but when using it safari and firefox glitch out like crazy
11258
11337
  left: "".concat(innerWidthReactive() / 2 - inModalFieldWidth() / 2, "px"),
11259
- width: inModalFieldWidthPx()
11338
+ width: inModalFieldWidthPx(),
11339
+ // Lord forgive me for this is laggy. Example: on preview browser when resizing the screen in both x and y direction at the sam time. But it's too hard to change the code now, so that it doesn't happen.
11340
+ // Basically we'd want one align_field running in only the y-axis on the field that's still in the DOM and another one in the x-axis on the fake field. Or something…
11341
+ top: absoluteFieldTop() + "px"
11260
11342
  });
11261
11343
  // We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
11262
11344
  setPollAlignment_(true);
@@ -11274,7 +11356,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11274
11356
  clearTimeout(disableResizePollingTimeout);
11275
11357
  setPollAlignment_(false);
11276
11358
  });
11277
- $a60bc7692ce52705$export$e06dee46ebe7faa9({
11359
+ $ce2f7ec02a8f2173$export$e06dee46ebe7faa9({
11278
11360
  setBackdropStyle_: setBackdropStyle_,
11279
11361
  setBodyAlignment_: setBodyAlignment_,
11280
11362
  openDuration_: openDuration_
@@ -11288,7 +11370,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11288
11370
  width: width,
11289
11371
  left: left
11290
11372
  } = fakeField.getBoundingClientRect();
11291
- $a60bc7692ce52705$export$23d40cc5971c3acd({
11373
+ $ce2f7ec02a8f2173$export$23d40cc5971c3acd({
11292
11374
  setBackdropStyle_: setBackdropStyle_,
11293
11375
  setBodyAlignment_: setBodyAlignment_,
11294
11376
  closeDuration_: closeDuration_
@@ -11317,69 +11399,6 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11317
11399
  };
11318
11400
  });
11319
11401
  }
11320
- function $a60bc7692ce52705$export$e06dee46ebe7faa9(_ref2) {
11321
- let {
11322
- setBackdropStyle_: setBackdropStyle_,
11323
- setBodyAlignment_: setBodyAlignment_,
11324
- openDuration_: openDuration_
11325
- } = _ref2;
11326
- setBackdropStyle_(prev => ({
11327
- ...prev,
11328
- opacity: 0,
11329
- transition: "opacity ".concat(openDuration_, "ms ease-in")
11330
- }));
11331
- requestAnimationFrame(() => setBackdropStyle_(prev => ({
11332
- ...prev,
11333
- opacity: 1
11334
- })));
11335
- setBodyAlignment_(prev => ({
11336
- ...prev,
11337
- opacity: 0,
11338
- transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
11339
- // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
11340
- "--js-animation-duration": "".concat(openDuration_, "ms")
11341
- }));
11342
- requestAnimationFrame(() => setBodyAlignment_(prev => ({
11343
- ...prev,
11344
- opacity: 1
11345
- })));
11346
- }
11347
- function $a60bc7692ce52705$export$23d40cc5971c3acd(_ref3) {
11348
- let {
11349
- setBackdropStyle_: setBackdropStyle_,
11350
- setBodyAlignment_: setBodyAlignment_,
11351
- closeDuration_: closeDuration_
11352
- } = _ref3;
11353
- setBackdropStyle_(prev => ({
11354
- ...prev,
11355
- opacity: 0,
11356
- transition: "opacity ".concat(closeDuration_, "ms ease-out")
11357
- }));
11358
- setBodyAlignment_(prev => ({
11359
- ...prev,
11360
- opacity: 0,
11361
- transition: "opacity ".concat(closeDuration_, "ms ease-out")
11362
- }));
11363
- }
11364
- function $a60bc7692ce52705$export$dab9321f3c157061(alignmentSignals, modalVersion) {
11365
- const [, setBodyAlignment_] = alignmentSignals.body_;
11366
- const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $3hooq$solidjs.createSignal({});
11367
- // For default centered modal, also run our fading animations if search modal v2
11368
- modalVersion === 2 && $a60bc7692ce52705$export$e06dee46ebe7faa9({
11369
- openDuration_: 125,
11370
- setBodyAlignment_: setBodyAlignment_,
11371
- setBackdropStyle_: setBackdropStyle_
11372
- });
11373
- const closingAnimation = modalVersion === 2 ? async () => {
11374
- $a60bc7692ce52705$export$23d40cc5971c3acd({
11375
- closeDuration_: 100,
11376
- setBodyAlignment_: setBodyAlignment_,
11377
- setBackdropStyle_: setBackdropStyle_
11378
- });
11379
- await new Promise(r => setTimeout(r, 100));
11380
- } : undefined;
11381
- return closingAnimation;
11382
- }
11383
11402
  var $739c927cbecd26b0$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
11384
11403
  $739c927cbecd26b0$var$_tmpl$2 = ["<div", ' class="depict plp search"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
11385
11404
  function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
@@ -12067,7 +12086,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
12067
12086
  if (!((_ = open_signal_value[0]) !== null && _ !== void 0 && _.alignmentSignals_) && search_page_aligned_modal_alignment_signals_) {
12068
12087
  // Open modal aligned with search page if no alignment specified and possible to align with search page
12069
12088
  const [options_arg, ...rest] = open_signal_value === true ? [{}] : open_signal_value;
12070
- const closingAnimation = $a60bc7692ce52705$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
12089
+ const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
12071
12090
  open_modal_({
12072
12091
  closing_animation_: closingAnimation,
12073
12092
  ...options_arg,
@@ -12077,7 +12096,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
12077
12096
  }
12078
12097
  // Open centered modal
12079
12098
  const centeredModalAlignmentSignals = $996102a9349df6d7$export$41b4894022a3580f();
12080
- const closingAnimation = $a60bc7692ce52705$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
12099
+ const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
12081
12100
  if (signal_value_is_options) {
12082
12101
  const [options_arg, ...rest] = open_signal_value;
12083
12102
  open_modal_({
@@ -12331,7 +12350,7 @@ const $a24cfef36ef12dc5$export$d86a33413558014e = openModalParams => {
12331
12350
  field_: $3hooq$solidjs.createSignal({}),
12332
12351
  backdrop_: $3hooq$solidjs.createSignal({})
12333
12352
  };
12334
- const closingAnimation = $a60bc7692ce52705$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
12353
+ const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
12335
12354
  $3hooq$solidjs.createRoot(dispose => {
12336
12355
  dispose_aligner = () => {
12337
12356
  var _cleanup;
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.0.18";
13
+ export const version = "4.0.20";
14
14
  /**
15
15
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
16
16
  */
@@ -1211,7 +1211,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1211
1211
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1212
1212
  content_blocks_by_row?: ContentBlocksByRow;
1213
1213
  layout?: PossibleLayout;
1214
- }): import("@depict-ai/utilishared").Node_Array;
1214
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1215
1215
  export function BreadCrumbs<T extends Display>({
1216
1216
  depict_category
1217
1217
  }: {
@@ -1351,7 +1351,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1351
1351
  * Open the modal with support for alignment.
1352
1352
  * @returns {void}
1353
1353
  */
1354
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1354
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1355
1355
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1356
1356
  export interface PageReplacer {
1357
1357
  readonly render_: () => Node_Array;
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.18";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.20";
14
14
 
15
15
  /**
16
16
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
@@ -2163,8 +2163,8 @@ function $4a3ed70b3b7c60d5$export$9ca09caa9c849d9c() {
2163
2163
  var $26db6925469636a4$var$_tmpl$ = ["<a", ">", "</a>"],
2164
2164
  $26db6925469636a4$var$_tmpl$2 = ["<div", ' class="', '"><div class="image-part" style="', '">', "</div><!--$-->", '<!--/--><h3 class="title">', "</h3></div>"],
2165
2165
  $26db6925469636a4$var$_tmpl$3 = ["<div", ' class="empty-image" style="', '">', "</div>"];
2166
- const $26db6925469636a4$var$aspectRatioWidthComponent = 402.67;
2167
- const $26db6925469636a4$var$aspectRatioHeightComponent = 203.64;
2166
+ const $26db6925469636a4$var$aspectRatioWidthComponent = 400;
2167
+ const $26db6925469636a4$var$aspectRatioHeightComponent = 200;
2168
2168
  const $26db6925469636a4$var$listingSuggestionCollageAspectRatio = $26db6925469636a4$var$aspectRatioWidthComponent / $26db6925469636a4$var$aspectRatioHeightComponent;
2169
2169
  function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
2170
2170
  var _image_urls$length, _image_urls;
@@ -2760,9 +2760,10 @@ function $1abb91ab5abc8994$export$66d1697a0f27069c(modalLayoutStacked) {
2760
2760
  };
2761
2761
  }
2762
2762
  var $06fcd2a345efd24d$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
2763
- $06fcd2a345efd24d$var$_tmpl$2 = ["<div", ' class="', '"></div>'],
2764
- $06fcd2a345efd24d$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div><div class="discover-more"><button class="major" type="button">', "</button></div></div><!--$-->", "<!--/--></div>"],
2765
- $06fcd2a345efd24d$var$_tmpl$4 = ["<b", ">", "</b>"];
2763
+ $06fcd2a345efd24d$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
2764
+ $06fcd2a345efd24d$var$_tmpl$3 = ["<b", ">", "</b>"],
2765
+ $06fcd2a345efd24d$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
2766
+ $06fcd2a345efd24d$var$_tmpl$5 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div></div><!--$-->', "<!--/--></div>"];
2766
2767
  /**
2767
2768
  * Second generation search modal - the solid component that gets added to <body> when the search modal is opened
2768
2769
  */
@@ -3045,6 +3046,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
3045
3046
  if (forceUseDiv_) return $b8hua$ssrElement("div", props, () => $b8hua$escape(props.children), true);
3046
3047
  return $b8hua$ssrElement("dialog", props, () => $b8hua$escape(props.children), true);
3047
3048
  };
3049
+ const discoverMoreSection = $b8hua$ssr($06fcd2a345efd24d$var$_tmpl$2, $b8hua$ssrHydrationKey(), get_search_field_value_() ? $b8hua$escape(i18n_.modal_view_all_results_()($b8hua$ssr($06fcd2a345efd24d$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$escape(formattedTotalNumberResults())))) : $b8hua$escape(i18n_.modal_discover_more_()));
3048
3050
  const search_field = $584c06c09cf4609d$export$b94867ecbd698f21({
3049
3051
  BackIcon_: () => $b8hua$createComponent((0, $c2fe922d21c40514$export$11e9f390c90a537f), {}),
3050
3052
  input_field_ref_: element => set_input_field(element),
@@ -3081,7 +3083,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
3081
3083
  },
3082
3084
  onClose: close_modal_,
3083
3085
  get children() {
3084
- return [$b8hua$ssr($06fcd2a345efd24d$var$_tmpl$2, $b8hua$ssrHydrationKey(), "depict-search-modal-backdrop ".concat($b8hua$escape($b8hua$escape(backdropRandomClassname, true), true))), $b8hua$ssr($06fcd2a345efd24d$var$_tmpl$3, $b8hua$ssrHydrationKey(), "depict-search-modal ".concat(modalLayoutStacked_() ? "stacked" : ""), "body ".concat($b8hua$escape($b8hua$escape(random_classname_body, true), true)), $b8hua$escape(search_field), "padded ".concat(noResults() ? "no-results" : ""), get_search_field_value_() ? $b8hua$escape(i18n_.modal_view_all_results_()($b8hua$ssr($06fcd2a345efd24d$var$_tmpl$4, $b8hua$ssrHydrationKey(), $b8hua$escape(formattedTotalNumberResults())))) : $b8hua$escape(i18n_.modal_discover_more_()), $b8hua$escape($b8hua$createComponent((0, $a86e71c0015bd8ab$export$f021bdedd3ec901a), {
3086
+ return [$b8hua$ssr($06fcd2a345efd24d$var$_tmpl$4, $b8hua$ssrHydrationKey(), "depict-search-modal-backdrop ".concat($b8hua$escape($b8hua$escape(backdropRandomClassname, true), true))), $b8hua$ssr($06fcd2a345efd24d$var$_tmpl$5, $b8hua$ssrHydrationKey(), "depict-search-modal ".concat(modalLayoutStacked_() ? "stacked" : ""), "body ".concat($b8hua$escape($b8hua$escape(random_classname_body, true), true)), $b8hua$escape(search_field), "padded ".concat(noResults() ? "no-results" : ""), $b8hua$escape($b8hua$createComponent((0, $a86e71c0015bd8ab$export$f021bdedd3ec901a), {
3085
3087
  styles: mergedCssObject
3086
3088
  })))];
3087
3089
  }
@@ -11095,6 +11097,69 @@ function $d53ebed6f63304e4$var$make_state_saved_rows(_ref2, i18n_) {
11095
11097
  }));
11096
11098
  return rows;
11097
11099
  }
11100
+ function $d7833ca17fc05c5e$export$e06dee46ebe7faa9(_ref) {
11101
+ let {
11102
+ setBackdropStyle_: setBackdropStyle_,
11103
+ setBodyAlignment_: setBodyAlignment_,
11104
+ openDuration_: openDuration_
11105
+ } = _ref;
11106
+ setBackdropStyle_(prev => ({
11107
+ ...prev,
11108
+ opacity: 0,
11109
+ transition: "opacity ".concat(openDuration_, "ms ease-in")
11110
+ }));
11111
+ requestAnimationFrame(() => setBackdropStyle_(prev => ({
11112
+ ...prev,
11113
+ opacity: 1
11114
+ })));
11115
+ setBodyAlignment_(prev => ({
11116
+ ...prev,
11117
+ opacity: 0,
11118
+ transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
11119
+ // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
11120
+ "--js-animation-duration": "".concat(openDuration_, "ms")
11121
+ }));
11122
+ requestAnimationFrame(() => setBodyAlignment_(prev => ({
11123
+ ...prev,
11124
+ opacity: 1
11125
+ })));
11126
+ }
11127
+ function $d7833ca17fc05c5e$export$23d40cc5971c3acd(_ref2) {
11128
+ let {
11129
+ setBackdropStyle_: setBackdropStyle_,
11130
+ setBodyAlignment_: setBodyAlignment_,
11131
+ closeDuration_: closeDuration_
11132
+ } = _ref2;
11133
+ setBackdropStyle_(prev => ({
11134
+ ...prev,
11135
+ opacity: 0,
11136
+ transition: "opacity ".concat(closeDuration_, "ms ease-out")
11137
+ }));
11138
+ setBodyAlignment_(prev => ({
11139
+ ...prev,
11140
+ opacity: 0,
11141
+ transition: "opacity ".concat(closeDuration_, "ms ease-out")
11142
+ }));
11143
+ }
11144
+ function $d7833ca17fc05c5e$export$dab9321f3c157061(alignmentSignals, modalVersion) {
11145
+ const [, setBodyAlignment_] = alignmentSignals.body_;
11146
+ const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $b8hua$createSignal({});
11147
+ // For default centered modal, also run our fading animations if search modal v2
11148
+ modalVersion === 2 && $d7833ca17fc05c5e$export$e06dee46ebe7faa9({
11149
+ openDuration_: 125,
11150
+ setBodyAlignment_: setBodyAlignment_,
11151
+ setBackdropStyle_: setBackdropStyle_
11152
+ });
11153
+ const closingAnimation = modalVersion === 2 ? async () => {
11154
+ $d7833ca17fc05c5e$export$23d40cc5971c3acd({
11155
+ closeDuration_: 100,
11156
+ setBodyAlignment_: setBodyAlignment_,
11157
+ setBackdropStyle_: setBackdropStyle_
11158
+ });
11159
+ await new Promise(r => setTimeout(r, 100));
11160
+ } : undefined;
11161
+ return closingAnimation;
11162
+ }
11098
11163
  var $937791b86d3d1509$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
11099
11164
  function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11100
11165
  let {
@@ -11109,7 +11174,15 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11109
11174
  } = _ref;
11110
11175
  return $b8hua$createRoot(dispose => {
11111
11176
  const [innerWidthReactive, setInnerWidthReactive] = $b8hua$createSignal(innerWidth);
11112
- const resizeObserver = new ResizeObserver(records => setInnerWidthReactive(records.at(-1).contentRect.width));
11177
+ const [innerHeightReactive, setInnerHeightReactive] = $b8hua$createSignal(innerHeight);
11178
+ const resizeObserver = new ResizeObserver(records => {
11179
+ const {
11180
+ width: width,
11181
+ height: height
11182
+ } = records.at(-1).contentRect;
11183
+ setInnerWidthReactive(width);
11184
+ setInnerHeightReactive(height);
11185
+ });
11113
11186
  const {
11114
11187
  left: left,
11115
11188
  top: top,
@@ -11138,6 +11211,12 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11138
11211
  zIndex: +zIndexOfFake + 1
11139
11212
  } : {})
11140
11213
  });
11214
+ const absoluteFieldTop = $b8hua$createMemo(() => {
11215
+ innerHeightReactive();
11216
+ innerWidthReactive();
11217
+ // This is very semi-scientific but I hope it works (seems to, albeit laggy see comment where this value gets used)
11218
+ return fakeField.getBoundingClientRect().top;
11219
+ });
11141
11220
  const pxOffCenter = Math.abs($b8hua$untrack(innerWidthReactive) / 2 - (left + width / 2));
11142
11221
  const openDuration_ = pxOffCenter > 100 ? 250 : 125; // faster animations if little left-right movement
11143
11222
  const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
@@ -11171,7 +11250,10 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11171
11250
  Object.assign(addedToBody.style, {
11172
11251
  // This is left: 50%, transform: translateX(-50) with extra steps but when using it safari and firefox glitch out like crazy
11173
11252
  left: "".concat(innerWidthReactive() / 2 - inModalFieldWidth() / 2, "px"),
11174
- width: inModalFieldWidthPx()
11253
+ width: inModalFieldWidthPx(),
11254
+ // Lord forgive me for this is laggy. Example: on preview browser when resizing the screen in both x and y direction at the sam time. But it's too hard to change the code now, so that it doesn't happen.
11255
+ // Basically we'd want one align_field running in only the y-axis on the field that's still in the DOM and another one in the x-axis on the fake field. Or something…
11256
+ top: absoluteFieldTop() + "px"
11175
11257
  });
11176
11258
  // We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
11177
11259
  setPollAlignment_(true);
@@ -11189,7 +11271,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11189
11271
  clearTimeout(disableResizePollingTimeout);
11190
11272
  setPollAlignment_(false);
11191
11273
  });
11192
- $937791b86d3d1509$export$e06dee46ebe7faa9({
11274
+ $d7833ca17fc05c5e$export$e06dee46ebe7faa9({
11193
11275
  setBackdropStyle_: setBackdropStyle_,
11194
11276
  setBodyAlignment_: setBodyAlignment_,
11195
11277
  openDuration_: openDuration_
@@ -11203,7 +11285,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11203
11285
  width: width,
11204
11286
  left: left
11205
11287
  } = fakeField.getBoundingClientRect();
11206
- $937791b86d3d1509$export$23d40cc5971c3acd({
11288
+ $d7833ca17fc05c5e$export$23d40cc5971c3acd({
11207
11289
  setBackdropStyle_: setBackdropStyle_,
11208
11290
  setBodyAlignment_: setBodyAlignment_,
11209
11291
  closeDuration_: closeDuration_
@@ -11232,69 +11314,6 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
11232
11314
  };
11233
11315
  });
11234
11316
  }
11235
- function $937791b86d3d1509$export$e06dee46ebe7faa9(_ref2) {
11236
- let {
11237
- setBackdropStyle_: setBackdropStyle_,
11238
- setBodyAlignment_: setBodyAlignment_,
11239
- openDuration_: openDuration_
11240
- } = _ref2;
11241
- setBackdropStyle_(prev => ({
11242
- ...prev,
11243
- opacity: 0,
11244
- transition: "opacity ".concat(openDuration_, "ms ease-in")
11245
- }));
11246
- requestAnimationFrame(() => setBackdropStyle_(prev => ({
11247
- ...prev,
11248
- opacity: 1
11249
- })));
11250
- setBodyAlignment_(prev => ({
11251
- ...prev,
11252
- opacity: 0,
11253
- transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
11254
- // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
11255
- "--js-animation-duration": "".concat(openDuration_, "ms")
11256
- }));
11257
- requestAnimationFrame(() => setBodyAlignment_(prev => ({
11258
- ...prev,
11259
- opacity: 1
11260
- })));
11261
- }
11262
- function $937791b86d3d1509$export$23d40cc5971c3acd(_ref3) {
11263
- let {
11264
- setBackdropStyle_: setBackdropStyle_,
11265
- setBodyAlignment_: setBodyAlignment_,
11266
- closeDuration_: closeDuration_
11267
- } = _ref3;
11268
- setBackdropStyle_(prev => ({
11269
- ...prev,
11270
- opacity: 0,
11271
- transition: "opacity ".concat(closeDuration_, "ms ease-out")
11272
- }));
11273
- setBodyAlignment_(prev => ({
11274
- ...prev,
11275
- opacity: 0,
11276
- transition: "opacity ".concat(closeDuration_, "ms ease-out")
11277
- }));
11278
- }
11279
- function $937791b86d3d1509$export$dab9321f3c157061(alignmentSignals, modalVersion) {
11280
- const [, setBodyAlignment_] = alignmentSignals.body_;
11281
- const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $b8hua$createSignal({});
11282
- // For default centered modal, also run our fading animations if search modal v2
11283
- modalVersion === 2 && $937791b86d3d1509$export$e06dee46ebe7faa9({
11284
- openDuration_: 125,
11285
- setBodyAlignment_: setBodyAlignment_,
11286
- setBackdropStyle_: setBackdropStyle_
11287
- });
11288
- const closingAnimation = modalVersion === 2 ? async () => {
11289
- $937791b86d3d1509$export$23d40cc5971c3acd({
11290
- closeDuration_: 100,
11291
- setBodyAlignment_: setBodyAlignment_,
11292
- setBackdropStyle_: setBackdropStyle_
11293
- });
11294
- await new Promise(r => setTimeout(r, 100));
11295
- } : undefined;
11296
- return closingAnimation;
11297
- }
11298
11317
  var $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
11299
11318
  $da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="depict plp search"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
11300
11319
  function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
@@ -11982,7 +12001,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
11982
12001
  if (!((_ = open_signal_value[0]) !== null && _ !== void 0 && _.alignmentSignals_) && search_page_aligned_modal_alignment_signals_) {
11983
12002
  // Open modal aligned with search page if no alignment specified and possible to align with search page
11984
12003
  const [options_arg, ...rest] = open_signal_value === true ? [{}] : open_signal_value;
11985
- const closingAnimation = $937791b86d3d1509$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
12004
+ const closingAnimation = $d7833ca17fc05c5e$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
11986
12005
  open_modal_({
11987
12006
  closing_animation_: closingAnimation,
11988
12007
  ...options_arg,
@@ -11992,7 +12011,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
11992
12011
  }
11993
12012
  // Open centered modal
11994
12013
  const centeredModalAlignmentSignals = $8e8ce3f7a5eb11a6$export$41b4894022a3580f();
11995
- const closingAnimation = $937791b86d3d1509$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
12014
+ const closingAnimation = $d7833ca17fc05c5e$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
11996
12015
  if (signal_value_is_options) {
11997
12016
  const [options_arg, ...rest] = open_signal_value;
11998
12017
  open_modal_({
@@ -12246,7 +12265,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
12246
12265
  field_: $b8hua$createSignal({}),
12247
12266
  backdrop_: $b8hua$createSignal({})
12248
12267
  };
12249
- const closingAnimation = $937791b86d3d1509$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
12268
+ const closingAnimation = $d7833ca17fc05c5e$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
12250
12269
  $b8hua$createRoot(dispose => {
12251
12270
  dispose_aligner = () => {
12252
12271
  var _cleanup;