@depict-ai/ui 1.4.19 → 1.4.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.
- package/ES10/index.cjs +61 -1
- package/ES10/index.d.ts +33 -2
- package/ES10/index.js +216 -159
- package/latest/index.cjs +60 -1
- package/latest/index.d.ts +33 -2
- package/latest/index.js +215 -159
- package/package.json +1 -1
- package/server/ES10/index.cjs +50 -1
- package/server/ES10/index.d.ts +33 -2
- package/server/ES10/index.js +146 -100
- package/server/latest/index.cjs +49 -1
- package/server/latest/index.d.ts +33 -2
- package/server/latest/index.js +145 -100
package/latest/index.js
CHANGED
|
@@ -1,11 +1,67 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info, report as $9HbP8$report, observer as $9HbP8$observer, catchify as $9HbP8$
|
|
2
|
-
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement,
|
|
3
|
-
import {
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, is_safari as $9HbP8$is_safari, report as $9HbP8$report, observer as $9HbP8$observer, catchify as $9HbP8$catchify1, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, make_random_classname as $9HbP8$make_random_classname, dlog as $9HbP8$dlog, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, javascript_media_query as $9HbP8$javascript_media_query, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, fetch_recs as $9HbP8$fetch_recs, snakeCasifyObject as $9HbP8$snakeCasifyObject, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base_url as $9HbP8$base_url, get_depict_id as $9HbP8$get_depict_id, get_user_id as $9HbP8$get_user_id, get_session_id as $9HbP8$get_session_id, sort_obj as $9HbP8$sort_obj, fetch_retry as $9HbP8$fetch_retry, add_version_query_params as $9HbP8$add_version_query_params, dwarn as $9HbP8$dwarn, make_url_with_query_params as $9HbP8$make_url_with_query_params, edit_current_page_meta_tags as $9HbP8$edit_current_page_meta_tags, use_href_accessor as $9HbP8$use_href_accessor, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
|
+
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, spread as $9HbP8$spread, mergeProps as $9HbP8$mergeProps, runHydrationEvents as $9HbP8$runHydrationEvents, effect as $9HbP8$effect, style as $9HbP8$style, insert as $9HbP8$insert, classList as $9HbP8$classList, createComponent as $9HbP8$createComponent, getNextMarker as $9HbP8$getNextMarker, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, setAttribute as $9HbP8$setAttribute, Dynamic as $9HbP8$Dynamic, use as $9HbP8$use, className as $9HbP8$className, isServer as $9HbP8$isServer } from "solid-js/web";
|
|
3
|
+
import { catchify as $9HbP8$catchify } from "@depict-ai/utilishared/latest/latest";
|
|
4
|
+
import { createSignal as $9HbP8$createSignal, onCleanup as $9HbP8$onCleanup, ErrorBoundary as $9HbP8$ErrorBoundary, createMemo as $9HbP8$createMemo, untrack as $9HbP8$untrack, createEffect as $9HbP8$createEffect, getOwner as $9HbP8$getOwner, Show as $9HbP8$Show, runWithOwner as $9HbP8$runWithOwner, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, on as $9HbP8$on, For as $9HbP8$For, createRenderEffect as $9HbP8$createRenderEffect, createComputed as $9HbP8$createComputed, batch as $9HbP8$batch, createResource as $9HbP8$createResource, createReaction as $9HbP8$createReaction, Suspense as $9HbP8$Suspense } from "solid-js";
|
|
4
5
|
|
|
5
6
|
/*! Depict.ai search and product listing SDK */
|
|
6
7
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
8
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
9
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.20";
|
|
10
|
+
const $e8ffe11ed01df0fe$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<img>`, 1);
|
|
11
|
+
function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
|
|
12
|
+
const [size, setSize] = $9HbP8$createSignal(0);
|
|
13
|
+
const resizeObserver = new ResizeObserver($9HbP8$catchify(records => {
|
|
14
|
+
for (let j = 0; j < records.length; j++) {
|
|
15
|
+
const {
|
|
16
|
+
width: width
|
|
17
|
+
} = records[j].contentRect;
|
|
18
|
+
if (!width) continue;
|
|
19
|
+
// add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
|
|
20
|
+
const new_size = width * 1.05 * ((0, $9HbP8$is_safari) ? 4 / 3 : 1);
|
|
21
|
+
setSize(Math.round(new_size));
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
resizeObserver.observe(whatToWatch);
|
|
25
|
+
$9HbP8$onCleanup(() => resizeObserver.disconnect());
|
|
26
|
+
return size;
|
|
27
|
+
}
|
|
28
|
+
function $e8ffe11ed01df0fe$export$6e5611bc7e57e477({
|
|
29
|
+
src: raw_src,
|
|
30
|
+
size: size,
|
|
31
|
+
resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
|
|
32
|
+
...otherOptions
|
|
33
|
+
}) {
|
|
34
|
+
const src = new URL(raw_src, location.origin);
|
|
35
|
+
const fallbackSrc = $e8ffe11ed01df0fe$var$generateImageUrl(src, 400);
|
|
36
|
+
const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, resolutions);
|
|
37
|
+
return (() => {
|
|
38
|
+
const _el$ = $9HbP8$getNextElement($e8ffe11ed01df0fe$var$_tmpl$);
|
|
39
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps(otherOptions, {
|
|
40
|
+
"src": fallbackSrc,
|
|
41
|
+
"srcset": srcset,
|
|
42
|
+
get sizes() {
|
|
43
|
+
return size() + "px";
|
|
44
|
+
}
|
|
45
|
+
}), false, false);
|
|
46
|
+
$9HbP8$runHydrationEvents();
|
|
47
|
+
return _el$;
|
|
48
|
+
})();
|
|
49
|
+
}
|
|
50
|
+
function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
|
|
51
|
+
return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
|
|
52
|
+
}
|
|
53
|
+
function $e8ffe11ed01df0fe$var$generateImageUrl(url, width) {
|
|
54
|
+
url.searchParams.set("width", width);
|
|
55
|
+
return url.href;
|
|
56
|
+
}
|
|
57
|
+
const $f18d425032111270$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div></div>`, 2);
|
|
58
|
+
function $f18d425032111270$export$94026ee33dbabc26(props) {
|
|
59
|
+
return (() => {
|
|
60
|
+
const _el$ = $9HbP8$getNextElement($f18d425032111270$var$_tmpl$);
|
|
61
|
+
$9HbP8$effect(_$p => $9HbP8$style(_el$, `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`, _$p));
|
|
62
|
+
return _el$;
|
|
63
|
+
})();
|
|
64
|
+
}
|
|
9
65
|
|
|
10
66
|
// Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
|
|
11
67
|
class $4fd48cb976bf1789$export$e1d52e4f0c7557a1 extends Error {}
|
|
@@ -93,15 +149,15 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
93
149
|
$9HbP8$insert(details_, [summary_, $9HbP8$createComponent(ExpandingContainer, {
|
|
94
150
|
children: children
|
|
95
151
|
})], null);
|
|
96
|
-
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(details_).then($9HbP8$
|
|
97
|
-
$9HbP8$createEffect($9HbP8$
|
|
152
|
+
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(details_).then($9HbP8$catchify1(() => set_is_in_dom(true)));
|
|
153
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
98
154
|
const is_open = is_open_memo();
|
|
99
155
|
if (!is_in_dom())
|
|
100
156
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
101
157
|
return;
|
|
102
158
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
103
159
|
timeout_started = true;
|
|
104
|
-
setTimeout($9HbP8$
|
|
160
|
+
setTimeout($9HbP8$catchify1(() => fresh_component = false));
|
|
105
161
|
}
|
|
106
162
|
if (is_open) {
|
|
107
163
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -109,10 +165,10 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
109
165
|
await expand(0, do_duration);
|
|
110
166
|
} else {
|
|
111
167
|
const animation = await collapse();
|
|
112
|
-
animation?.addEventListener("finish", $9HbP8$
|
|
168
|
+
animation?.addEventListener("finish", $9HbP8$catchify1(() => details_.open = false));
|
|
113
169
|
}
|
|
114
170
|
}));
|
|
115
|
-
details_.addEventListener("toggle", $9HbP8$
|
|
171
|
+
details_.addEventListener("toggle", $9HbP8$catchify1(() => {
|
|
116
172
|
const {
|
|
117
173
|
open: open
|
|
118
174
|
} = details_;
|
|
@@ -122,11 +178,11 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
122
178
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
123
179
|
);
|
|
124
180
|
|
|
125
|
-
summary_.addEventListener("click", $9HbP8$
|
|
181
|
+
summary_.addEventListener("click", $9HbP8$catchify1(ev => {
|
|
126
182
|
ev.preventDefault();
|
|
127
183
|
toggle();
|
|
128
184
|
}));
|
|
129
|
-
summary_.addEventListener("keydown", $9HbP8$
|
|
185
|
+
summary_.addEventListener("keydown", $9HbP8$catchify1(ev => {
|
|
130
186
|
const {
|
|
131
187
|
key: key
|
|
132
188
|
} = ev;
|
|
@@ -219,7 +275,7 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
219
275
|
}) {
|
|
220
276
|
let close_toast_;
|
|
221
277
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
222
|
-
$9HbP8$
|
|
278
|
+
$9HbP8$catchify1(async () => {
|
|
223
279
|
const closing_animation_duration = 300; // ms
|
|
224
280
|
const element = (() => {
|
|
225
281
|
const _el$ = $9HbP8$getNextElement($bf52d9f9eebd1938$var$_tmpl$);
|
|
@@ -230,8 +286,8 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
230
286
|
})();
|
|
231
287
|
const [, set_is_showing_toast] = $bf52d9f9eebd1938$export$22970a0140fc759c;
|
|
232
288
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
233
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $9HbP8$
|
|
234
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $9HbP8$
|
|
289
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $9HbP8$catchify1(() => closing_animation.pause()));
|
|
290
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $9HbP8$catchify1(() => closing_animation.play()));
|
|
235
291
|
const body = await (0, $9HbP8$observer).wait_for_element("body");
|
|
236
292
|
const x_translate = "translateX(-50%) ";
|
|
237
293
|
let remove_keyboard_listener;
|
|
@@ -256,7 +312,7 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
256
312
|
// let other toasts close us if they open while we're still here
|
|
257
313
|
$bf52d9f9eebd1938$var$closing_functions.add(close_toast_);
|
|
258
314
|
set_is_showing_toast(true);
|
|
259
|
-
const handler = $9HbP8$
|
|
315
|
+
const handler = $9HbP8$catchify1(({
|
|
260
316
|
key: key
|
|
261
317
|
}) => {
|
|
262
318
|
if (key === "Escape")
|
|
@@ -362,7 +418,7 @@ function $e9342fb3ac73a54a$export$8895d39404bd2bb1(props) {
|
|
|
362
418
|
const _el$2 = $9HbP8$getNextElement($e9342fb3ac73a54a$var$_tmpl$2),
|
|
363
419
|
_el$3 = _el$2.firstChild,
|
|
364
420
|
_el$4 = _el$3.nextSibling;
|
|
365
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
421
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify1(() => {
|
|
366
422
|
set_selected_filters(previous_selected_filters);
|
|
367
423
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
368
424
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
@@ -443,7 +499,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
443
499
|
get children() {
|
|
444
500
|
return [(() => {
|
|
445
501
|
const _el$6 = $9HbP8$getNextElement($1adfe60f3a14a1d7$var$_tmpl$);
|
|
446
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
502
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify1(() =>
|
|
447
503
|
// click event handlers don't have an owner, carry it over
|
|
448
504
|
$9HbP8$runWithOwner(owner, () => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
449
505
|
selected_filters_: selected_filters_,
|
|
@@ -627,7 +683,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
627
683
|
_el$28 = _el$26.firstChild,
|
|
628
684
|
[_el$29, _co$10] = $9HbP8$getNextMarker(_el$28.nextSibling),
|
|
629
685
|
_el$27 = _el$29.nextSibling;
|
|
630
|
-
$9HbP8$addEventListener(_el$26, "click", $9HbP8$
|
|
686
|
+
$9HbP8$addEventListener(_el$26, "click", $9HbP8$catchify1(() => {
|
|
631
687
|
const to_remove = selected_data();
|
|
632
688
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
633
689
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -683,9 +739,9 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
683
739
|
});
|
|
684
740
|
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(document.documentElement.contains(outmost_element));
|
|
685
741
|
const hidden = $9HbP8$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
686
|
-
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(outmost_element).then($9HbP8$
|
|
742
|
+
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(outmost_element).then($9HbP8$catchify1(() => set_is_in_dom(true)));
|
|
687
743
|
outmost_element.classList.add("selected-filters");
|
|
688
|
-
$9HbP8$createEffect($9HbP8$
|
|
744
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
689
745
|
if (!is_in_dom())
|
|
690
746
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
691
747
|
return;
|
|
@@ -722,7 +778,7 @@ const $87c712b5b33f24f7$export$48513f6b9f8ce62d = props => {
|
|
|
722
778
|
// The reason for that being that we re-use the checkboxes. That means if one box was unchecked by the user and then removed, the "checked" value of "another" checkbox (that now had position 0) had changed to 0 (because the user unchecked the box with position 0) while solid js still believed that it was checked because it's checked signal hadn't changed.
|
|
723
779
|
// I've worked around this by restoring the state of the checkbox to what it is in solid js a bit after it was changed
|
|
724
780
|
// Why it can't be done instantaneously I don't know.
|
|
725
|
-
input_el.addEventListener("change", $9HbP8$
|
|
781
|
+
input_el.addEventListener("change", $9HbP8$catchify1(() => requestAnimationFrame($9HbP8$catchify1(() => {
|
|
726
782
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
727
783
|
}))));
|
|
728
784
|
props.input_ref_?.(input_el);
|
|
@@ -778,7 +834,7 @@ function $67b173f9db427028$export$ca21a16d65b3dd8({
|
|
|
778
834
|
_el$3 = _el$.firstChild,
|
|
779
835
|
[_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling),
|
|
780
836
|
_el$2 = _el$4.nextSibling;
|
|
781
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
837
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify1(() => set_show_extras(p => !p)), true);
|
|
782
838
|
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $f8a56ba74eedd0c6$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
783
839
|
$9HbP8$insert(_el$2, (() => {
|
|
784
840
|
const _c$ = $9HbP8$memo(() => !!get_show_extras());
|
|
@@ -868,7 +924,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
868
924
|
i18n_: i18n_
|
|
869
925
|
}) : []);
|
|
870
926
|
});
|
|
871
|
-
$9HbP8$createEffect($9HbP8$
|
|
927
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
872
928
|
if (!togglable_rest()) {
|
|
873
929
|
await collapse();
|
|
874
930
|
return;
|
|
@@ -881,7 +937,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
881
937
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
882
938
|
_el$4 = _el$3.nextSibling,
|
|
883
939
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
884
|
-
$9HbP8$addEventListener(_el$, "change", $9HbP8$
|
|
940
|
+
$9HbP8$addEventListener(_el$, "change", $9HbP8$catchify1(() => {
|
|
885
941
|
const set_filter = existing_filter();
|
|
886
942
|
const {
|
|
887
943
|
field: field,
|
|
@@ -949,7 +1005,7 @@ function $eb8d9bf3b5700c26$export$430444115f70a734({
|
|
|
949
1005
|
_el$9 = _el$3.nextSibling,
|
|
950
1006
|
[_el$10, _co$2] = $9HbP8$getNextMarker(_el$9.nextSibling);
|
|
951
1007
|
$9HbP8$setAttribute(_el$2, "for", random_selector);
|
|
952
|
-
$9HbP8$addEventListener(_el$4, "change", $9HbP8$
|
|
1008
|
+
$9HbP8$addEventListener(_el$4, "change", $9HbP8$catchify1(() => {
|
|
953
1009
|
const filter_object = {
|
|
954
1010
|
op: filter_().op,
|
|
955
1011
|
field: filter_().field,
|
|
@@ -1015,7 +1071,7 @@ function $a6b08770e164eced$export$e0d834a0ad870cda({
|
|
|
1015
1071
|
});
|
|
1016
1072
|
$9HbP8$createComputed(() => {
|
|
1017
1073
|
clearTimeout(debounce_timeout);
|
|
1018
|
-
debounce_timeout = setTimeout($9HbP8$
|
|
1074
|
+
debounce_timeout = setTimeout($9HbP8$catchify1(range => $9HbP8$untrack(() => {
|
|
1019
1075
|
const default_data = filter_().data;
|
|
1020
1076
|
const filter_object = {
|
|
1021
1077
|
op: filter_().op,
|
|
@@ -1092,20 +1148,20 @@ function $a6b08770e164eced$var$RangeSelector({
|
|
|
1092
1148
|
[_el$22, _co$6] = $9HbP8$getNextMarker(_el$21.nextSibling);
|
|
1093
1149
|
const _ref$ = price_input_1;
|
|
1094
1150
|
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
1095
|
-
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$
|
|
1151
|
+
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$catchify1(({
|
|
1096
1152
|
key: key
|
|
1097
1153
|
}) => {
|
|
1098
1154
|
if (key === "Enter") $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
1099
1155
|
}), true);
|
|
1100
|
-
$9HbP8$addEventListener(_el$4, "blur", $9HbP8$
|
|
1156
|
+
$9HbP8$addEventListener(_el$4, "blur", $9HbP8$catchify1(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
1101
1157
|
const _ref$2 = price_input_2;
|
|
1102
1158
|
typeof _ref$2 === "function" ? $9HbP8$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
1103
|
-
$9HbP8$addEventListener(_el$7, "keydown", $9HbP8$
|
|
1159
|
+
$9HbP8$addEventListener(_el$7, "keydown", $9HbP8$catchify1(({
|
|
1104
1160
|
key: key
|
|
1105
1161
|
}) => {
|
|
1106
1162
|
if (key === "Enter") $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
1107
1163
|
}), true);
|
|
1108
|
-
$9HbP8$addEventListener(_el$7, "blur", $9HbP8$
|
|
1164
|
+
$9HbP8$addEventListener(_el$7, "blur", $9HbP8$catchify1(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
1109
1165
|
$9HbP8$insert(_el$, $9HbP8$createComponent($a6b08770e164eced$var$ExponentialSlider, {
|
|
1110
1166
|
max_: max_,
|
|
1111
1167
|
min_: min_,
|
|
@@ -1225,7 +1281,7 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
1225
1281
|
return [(() => {
|
|
1226
1282
|
const _el$25 = $9HbP8$getNextElement($a6b08770e164eced$var$_tmpl$2),
|
|
1227
1283
|
_el$26 = _el$25.firstChild;
|
|
1228
|
-
$9HbP8$addEventListener(_el$25, "click", $9HbP8$
|
|
1284
|
+
$9HbP8$addEventListener(_el$25, "click", $9HbP8$catchify1(e => {
|
|
1229
1285
|
const rect = clickable_slider.getBoundingClientRect();
|
|
1230
1286
|
const slider_beginning_left = rect.left;
|
|
1231
1287
|
const slider_width = rect.width;
|
|
@@ -1251,12 +1307,12 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
1251
1307
|
range_input_1 = el;
|
|
1252
1308
|
set_value(range_input_1, 0);
|
|
1253
1309
|
}, _el$28);
|
|
1254
|
-
$9HbP8$addEventListener(_el$28, "input", $9HbP8$
|
|
1310
|
+
$9HbP8$addEventListener(_el$28, "input", $9HbP8$catchify1(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
1255
1311
|
$9HbP8$use(el => {
|
|
1256
1312
|
range_input_2 = el;
|
|
1257
1313
|
set_value(range_input_2, 1);
|
|
1258
1314
|
}, _el$29);
|
|
1259
|
-
$9HbP8$addEventListener(_el$29, "input", $9HbP8$
|
|
1315
|
+
$9HbP8$addEventListener(_el$29, "input", $9HbP8$catchify1(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
1260
1316
|
$9HbP8$effect(_p$ => {
|
|
1261
1317
|
const _v$7 = i18n_.range_filter_low_point_aria_label_(),
|
|
1262
1318
|
_v$8 = min_(),
|
|
@@ -1327,7 +1383,7 @@ function $0b6bc2f8309efa8a$export$e5c2828934226505({
|
|
|
1327
1383
|
return _el$;
|
|
1328
1384
|
})();
|
|
1329
1385
|
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(false);
|
|
1330
|
-
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$
|
|
1386
|
+
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$catchify1(() => set_is_in_dom(true)));
|
|
1331
1387
|
$9HbP8$createEffect(() => {
|
|
1332
1388
|
if (!is_in_dom())
|
|
1333
1389
|
// wait for us to being in DOM as animations don't work otherwise
|
|
@@ -1480,7 +1536,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
|
|
|
1480
1536
|
i18n_: i18n_
|
|
1481
1537
|
}) : []);
|
|
1482
1538
|
});
|
|
1483
|
-
$9HbP8$createEffect($9HbP8$
|
|
1539
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
1484
1540
|
if (!some_top_level_are_hidden()) {
|
|
1485
1541
|
await collapse();
|
|
1486
1542
|
return;
|
|
@@ -1539,7 +1595,7 @@ function $1c8cac76cb67e9af$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1539
1595
|
return value()?.is_checked_?.[0]?.() ?? false;
|
|
1540
1596
|
},
|
|
1541
1597
|
input_ref_: input => {
|
|
1542
|
-
input.addEventListener("change", $9HbP8$
|
|
1598
|
+
input.addEventListener("change", $9HbP8$catchify1(() => $9HbP8$untrack(() => {
|
|
1543
1599
|
const {
|
|
1544
1600
|
checked: checked
|
|
1545
1601
|
} = input;
|
|
@@ -1624,7 +1680,7 @@ function $1c8cac76cb67e9af$var$batching_filter_state_syncer(props) {
|
|
|
1624
1680
|
existing_filter_: existing_filter_
|
|
1625
1681
|
} = props;
|
|
1626
1682
|
let sync_queued = false;
|
|
1627
|
-
const sync_fn = $9HbP8$
|
|
1683
|
+
const sync_fn = $9HbP8$catchify1(async () => {
|
|
1628
1684
|
sync_queued = false;
|
|
1629
1685
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
1630
1686
|
const set_filter = existing_filter_();
|
|
@@ -1681,13 +1737,13 @@ function $1c8cac76cb67e9af$var$create_updating_signal({
|
|
|
1681
1737
|
$9HbP8$createComputed($9HbP8$on(read_checked, trigger_sync_, {
|
|
1682
1738
|
defer: true
|
|
1683
1739
|
}));
|
|
1684
|
-
$9HbP8$createComputed($9HbP8$on(read_checked, $9HbP8$
|
|
1740
|
+
$9HbP8$createComputed($9HbP8$on(read_checked, $9HbP8$catchify1(new_value => {
|
|
1685
1741
|
if (updating_blocked) return;
|
|
1686
1742
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
1687
1743
|
}), {
|
|
1688
1744
|
defer: true
|
|
1689
1745
|
}));
|
|
1690
|
-
$9HbP8$createEffect($9HbP8$on(get_child_object_values, $9HbP8$
|
|
1746
|
+
$9HbP8$createEffect($9HbP8$on(get_child_object_values, $9HbP8$catchify1(() => {
|
|
1691
1747
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
1692
1748
|
if (all_kids_checked === read_checked()) return;
|
|
1693
1749
|
updating_blocked = true;
|
|
@@ -1809,7 +1865,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
1809
1865
|
const is_selected = $9HbP8$createMemo(() => existing_filter()?.data?.includes(value().value_));
|
|
1810
1866
|
return (() => {
|
|
1811
1867
|
const _el$2 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$2);
|
|
1812
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
1868
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify1(() => {
|
|
1813
1869
|
const set_filter = existing_filter();
|
|
1814
1870
|
const {
|
|
1815
1871
|
field: field,
|
|
@@ -1963,7 +2019,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
1963
2019
|
i18n_: i18n_
|
|
1964
2020
|
}) : []);
|
|
1965
2021
|
});
|
|
1966
|
-
$9HbP8$createEffect($9HbP8$
|
|
2022
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
1967
2023
|
if (!togglable_rest()) {
|
|
1968
2024
|
await collapse();
|
|
1969
2025
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -1978,7 +2034,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
1978
2034
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
1979
2035
|
_el$4 = _el$3.nextSibling,
|
|
1980
2036
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
1981
|
-
$9HbP8$addEventListener(_el$, "change", $9HbP8$
|
|
2037
|
+
$9HbP8$addEventListener(_el$, "change", $9HbP8$catchify1(() => {
|
|
1982
2038
|
const set_filter = existing_filter();
|
|
1983
2039
|
const {
|
|
1984
2040
|
field: field,
|
|
@@ -2368,7 +2424,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
2368
2424
|
_el$7 = _el$5.firstChild,
|
|
2369
2425
|
[_el$8, _co$] = $9HbP8$getNextMarker(_el$7.nextSibling),
|
|
2370
2426
|
_el$6 = _el$8.nextSibling;
|
|
2371
|
-
$9HbP8$addEventListener(_el$5, "click", $9HbP8$
|
|
2427
|
+
$9HbP8$addEventListener(_el$5, "click", $9HbP8$catchify1(() => {
|
|
2372
2428
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
2373
2429
|
for (const filter of filter_array_()) {
|
|
2374
2430
|
const index = new_filter_obj.findIndex(({
|
|
@@ -2434,7 +2490,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
2434
2490
|
},
|
|
2435
2491
|
get children() {
|
|
2436
2492
|
const _el$25 = $9HbP8$getNextElement($fab07f52c9861732$var$_tmpl$8);
|
|
2437
|
-
$9HbP8$addEventListener(_el$25, "click", $9HbP8$
|
|
2493
|
+
$9HbP8$addEventListener(_el$25, "click", $9HbP8$catchify1(() => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
2438
2494
|
user_triggered_: true,
|
|
2439
2495
|
selected_filters_: props.selected_filters_,
|
|
2440
2496
|
i18n_: props.i18n_,
|
|
@@ -2639,7 +2695,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2639
2695
|
const view_less_button_class = $9HbP8$make_random_classname();
|
|
2640
2696
|
const view_more_button_container = $9HbP8$createMemo(() => have_a_view_more_button() && (() => {
|
|
2641
2697
|
const _el$2 = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
2642
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
2698
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify1(() => set_rows_visible()(prev => prev + (rows_or_empty_object().rows_per_click ?? 1))), true);
|
|
2643
2699
|
$9HbP8$className(_el$2, `load-more-container ${view_more_button_class}`);
|
|
2644
2700
|
$9HbP8$insert(_el$2, () => rows_or_empty_object().button);
|
|
2645
2701
|
$9HbP8$runHydrationEvents();
|
|
@@ -2648,7 +2704,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2648
2704
|
// We need to have duplicate buttons because which ones is shown depends on the number of rows visible and therefore on the viewport size and therefore on the css media queries
|
|
2649
2705
|
const view_less_button_container = $9HbP8$createMemo(() => have_a_view_less_button() && (() => {
|
|
2650
2706
|
const _el$3 = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
2651
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
2707
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify1(() => set_rows_visible()(() => rows_or_empty_object().start_rows ?? 1)), true);
|
|
2652
2708
|
$9HbP8$className(_el$3, `load-less-container ${view_less_button_class}`);
|
|
2653
2709
|
$9HbP8$insert(_el$3, () => rows_or_empty_object().view_less_button);
|
|
2654
2710
|
$9HbP8$runHydrationEvents();
|
|
@@ -2669,7 +2725,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2669
2725
|
return;
|
|
2670
2726
|
}
|
|
2671
2727
|
update_children_count();
|
|
2672
|
-
const mutation_observer = new MutationObserver($9HbP8$
|
|
2728
|
+
const mutation_observer = new MutationObserver($9HbP8$catchify1(update_children_count));
|
|
2673
2729
|
mutation_observer.observe(container_element, {
|
|
2674
2730
|
childList: true
|
|
2675
2731
|
});
|
|
@@ -2732,7 +2788,7 @@ async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
2732
2788
|
// Animation broke, close it this time
|
|
2733
2789
|
actually_close();else if (!animation_started && closing_animation) {
|
|
2734
2790
|
animation_started = +new Date();
|
|
2735
|
-
$9HbP8$
|
|
2791
|
+
$9HbP8$catchify1(closing_animation)()?.then($9HbP8$catchify1(actually_close));
|
|
2736
2792
|
} else actually_close();
|
|
2737
2793
|
};
|
|
2738
2794
|
return search_modal({
|
|
@@ -2773,7 +2829,7 @@ async function $c58717f39bf51647$export$58e808b1db15d3bc({
|
|
|
2773
2829
|
function $ca6f574bd8772184$export$e183a13865960371(params_to_default_value, router_) {
|
|
2774
2830
|
const signals = {};
|
|
2775
2831
|
const entries = Object.entries(params_to_default_value);
|
|
2776
|
-
const event_handler = $9HbP8$
|
|
2832
|
+
const event_handler = $9HbP8$catchify1((what_happened, args) => {
|
|
2777
2833
|
if (what_happened == "popstate") $ca6f574bd8772184$var$history_state_change(signals, entries, args.state);
|
|
2778
2834
|
});
|
|
2779
2835
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
@@ -2797,8 +2853,8 @@ function $ca6f574bd8772184$export$e183a13865960371(params_to_default_value, rout
|
|
|
2797
2853
|
});
|
|
2798
2854
|
// history_dot_state_to_state needs to update after its signals after url_state does BUT in the same task (might even have to be in the same tick in the microtask queue). If we'd use window.addEventListener("popstate") it would be guaranteed to be too late since each event listener has its own task
|
|
2799
2855
|
(0, $9HbP8$instant_exec_on_suspect_history_change).add(event_handler);
|
|
2800
|
-
$9HbP8$onCleanup($9HbP8$
|
|
2801
|
-
$9HbP8$createEffect($9HbP8$
|
|
2856
|
+
$9HbP8$onCleanup($9HbP8$catchify1(() => (0, $9HbP8$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
2857
|
+
$9HbP8$createEffect($9HbP8$catchify1(() => $9HbP8$untrack($9HbP8$catchify1(() => $ca6f574bd8772184$var$history_state_change(signals, entries, history.state))))); // we need this to run after reading the initial state from history.state to write the defaults to history.state
|
|
2802
2858
|
return signals;
|
|
2803
2859
|
}
|
|
2804
2860
|
function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
|
|
@@ -2911,7 +2967,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
2911
2967
|
return this.#cache_objs[endpoint] ||= {
|
|
2912
2968
|
in_progress_: {},
|
|
2913
2969
|
cache_: {},
|
|
2914
|
-
finalization_registry_: this.#supports_finalization_registry ? new FinalizationRegistry($9HbP8$
|
|
2970
|
+
finalization_registry_: this.#supports_finalization_registry ? new FinalizationRegistry($9HbP8$catchify1(key => {
|
|
2915
2971
|
const our_cache = this.#cache_objs[endpoint].cache_;
|
|
2916
2972
|
$9HbP8$dlog("[Search API]: removing", key, "from", our_cache);
|
|
2917
2973
|
delete our_cache[key];
|
|
@@ -3059,11 +3115,11 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
3059
3115
|
result = $e5014ccd0b76d9f4$export$967e966fca9515e(result);
|
|
3060
3116
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
3061
3117
|
resolve_in_progress(result);
|
|
3062
|
-
setTimeout($9HbP8$
|
|
3118
|
+
setTimeout($9HbP8$catchify1(() => {
|
|
3063
3119
|
if (this.#supports_finalization_registry) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
3064
3120
|
else
|
|
3065
3121
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
3066
|
-
setTimeout($9HbP8$
|
|
3122
|
+
setTimeout($9HbP8$catchify1(() => delete cache_obj.cache_[body]), 300000);
|
|
3067
3123
|
}), 60000 // cache values for at least 60 seconds
|
|
3068
3124
|
);
|
|
3069
3125
|
|
|
@@ -3212,7 +3268,7 @@ function $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
|
|
|
3212
3268
|
});
|
|
3213
3269
|
}
|
|
3214
3270
|
function $8f9120a1ca151e6a$export$205efb947c7ffd78(handler, passive = true) {
|
|
3215
|
-
const catchified_handler = $9HbP8$
|
|
3271
|
+
const catchified_handler = $9HbP8$catchify1(handler);
|
|
3216
3272
|
const owner = $9HbP8$getOwner();
|
|
3217
3273
|
// Some customers (e.g. equestrian) have `height: 100%` and/or `overflow-x: hidden` on the body, which means that scroll events won't get dispatched on `window`. The pages who get it on <body> won't get it on `window` and vice-versa, so there shouldn't be a worry about duplicate calling of the handler.
|
|
3218
3274
|
// Use observer in case that this gets called before body exists
|
|
@@ -3329,7 +3385,7 @@ function $6db49ca163afa2c3$export$83fd5de5504a7a67({
|
|
|
3329
3385
|
fill: "forwards",
|
|
3330
3386
|
easing: "ease-in-out"
|
|
3331
3387
|
});
|
|
3332
|
-
animation.addEventListener("finish", $9HbP8$
|
|
3388
|
+
animation.addEventListener("finish", $9HbP8$catchify1(() => {
|
|
3333
3389
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
3334
3390
|
animation = undefined;
|
|
3335
3391
|
element.style.display = "none";
|
|
@@ -3390,7 +3446,7 @@ function $598245ecfe38f34b$export$ef6006467f04ee41({
|
|
|
3390
3446
|
},
|
|
3391
3447
|
get children() {
|
|
3392
3448
|
const _el$3 = $9HbP8$getNextElement($598245ecfe38f34b$var$_tmpl$);
|
|
3393
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
3449
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify1(() => $9HbP8$runWithOwner(root, () => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
3394
3450
|
user_triggered_: true,
|
|
3395
3451
|
selected_filters_: selected_filters_,
|
|
3396
3452
|
also_clear_sorting_: false,
|
|
@@ -3522,7 +3578,7 @@ function $056f6ac0a6caa919$export$5e4aed86c12acdd9({
|
|
|
3522
3578
|
last_loaded = +new Date();
|
|
3523
3579
|
is_first_load = true;
|
|
3524
3580
|
});
|
|
3525
|
-
$9HbP8$createEffect($9HbP8$
|
|
3581
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
3526
3582
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3527
3583
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
3528
3584
|
if (!get_last_cursor()) {
|
|
@@ -3692,7 +3748,7 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
3692
3748
|
const target_to_index_map = new Map();
|
|
3693
3749
|
const index_to_target_map_ = new Map();
|
|
3694
3750
|
const currently_intersecting = new Set();
|
|
3695
|
-
const intersection_observer = new IntersectionObserver($9HbP8$
|
|
3751
|
+
const intersection_observer = new IntersectionObserver($9HbP8$catchify1(records => {
|
|
3696
3752
|
for (let i = 0; i < records.length; i++) {
|
|
3697
3753
|
const record = records[i];
|
|
3698
3754
|
const {
|
|
@@ -4011,7 +4067,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
|
|
|
4011
4067
|
_el$13 = _el$12.nextSibling,
|
|
4012
4068
|
_el$14 = _el$13.nextSibling,
|
|
4013
4069
|
[_el$15, _co$2] = $9HbP8$getNextMarker(_el$14.nextSibling);
|
|
4014
|
-
$9HbP8$addEventListener(_el$12, "change", $9HbP8$
|
|
4070
|
+
$9HbP8$addEventListener(_el$12, "change", $9HbP8$catchify1(() => set_current_sorting(item())));
|
|
4015
4071
|
$9HbP8$setAttribute(_el$12, "name", title_radio_name);
|
|
4016
4072
|
$9HbP8$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
4017
4073
|
$9HbP8$effect(() => _el$12.checked = is_checked());
|
|
@@ -4040,7 +4096,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
|
|
|
4040
4096
|
_el$19 = _el$18.nextSibling,
|
|
4041
4097
|
_el$20 = _el$19.nextSibling,
|
|
4042
4098
|
[_el$21, _co$3] = $9HbP8$getNextMarker(_el$20.nextSibling);
|
|
4043
|
-
$9HbP8$addEventListener(_el$18, "change", $9HbP8$
|
|
4099
|
+
$9HbP8$addEventListener(_el$18, "change", $9HbP8$catchify1(() => set_current_sorting(c => c && {
|
|
4044
4100
|
...c,
|
|
4045
4101
|
order: order_value()
|
|
4046
4102
|
})));
|
|
@@ -4068,7 +4124,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
|
|
|
4068
4124
|
offset: 0
|
|
4069
4125
|
}, 1);
|
|
4070
4126
|
animation.pause();
|
|
4071
|
-
const fn = $9HbP8$
|
|
4127
|
+
const fn = $9HbP8$catchify1(animation.play.bind(animation));
|
|
4072
4128
|
cleanup_fns.push(fn);
|
|
4073
4129
|
$9HbP8$onCleanup(fn);
|
|
4074
4130
|
} catch (e) {
|
|
@@ -4079,7 +4135,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
|
|
|
4079
4135
|
const style = element.style;
|
|
4080
4136
|
const original_value = style.overflow;
|
|
4081
4137
|
style.overflow = "hidden";
|
|
4082
|
-
const fn = $9HbP8$
|
|
4138
|
+
const fn = $9HbP8$catchify1(() => style.overflow = original_value);
|
|
4083
4139
|
cleanup_fns.push(fn);
|
|
4084
4140
|
$9HbP8$onCleanup(fn);
|
|
4085
4141
|
}
|
|
@@ -4162,7 +4218,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4162
4218
|
set_search_sorting_open(true);
|
|
4163
4219
|
}
|
|
4164
4220
|
});
|
|
4165
|
-
$9HbP8$onCleanup($9HbP8$
|
|
4221
|
+
$9HbP8$onCleanup($9HbP8$catchify1(() => {
|
|
4166
4222
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
4167
4223
|
set_search_filters_open(false);
|
|
4168
4224
|
set_search_sorting_open(false);
|
|
@@ -4194,7 +4250,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4194
4250
|
_el$12 = _el$14.nextSibling;
|
|
4195
4251
|
$9HbP8$use(el => {
|
|
4196
4252
|
background = el;
|
|
4197
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4253
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify1(() => {
|
|
4198
4254
|
set_background_style("transition", "all 200ms ease-in");
|
|
4199
4255
|
set_background_style("opacity", "1");
|
|
4200
4256
|
}));
|
|
@@ -4202,7 +4258,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4202
4258
|
$9HbP8$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
4203
4259
|
$9HbP8$use(el => {
|
|
4204
4260
|
dismiss_button = el;
|
|
4205
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4261
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify1(() => {
|
|
4206
4262
|
set_button_style("transition", "all 200ms ease-in");
|
|
4207
4263
|
set_button_fraction_in(1);
|
|
4208
4264
|
}));
|
|
@@ -4235,7 +4291,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4235
4291
|
let last_move_page_y = start_page_y;
|
|
4236
4292
|
let first_move_was_downwards = false;
|
|
4237
4293
|
let distance_from_start_of_gesture = 0;
|
|
4238
|
-
const end_handler = $9HbP8$
|
|
4294
|
+
const end_handler = $9HbP8$catchify1(e => {
|
|
4239
4295
|
const changedTouches = e?.changedTouches;
|
|
4240
4296
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
4241
4297
|
// other finger stopped touch, ignore it
|
|
@@ -4259,7 +4315,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4259
4315
|
modal.removeEventListener("touchcancel", end_handler);
|
|
4260
4316
|
modal.removeEventListener("touchmove", move_handler);
|
|
4261
4317
|
});
|
|
4262
|
-
const move_handler = $9HbP8$
|
|
4318
|
+
const move_handler = $9HbP8$catchify1(e => {
|
|
4263
4319
|
const {
|
|
4264
4320
|
changedTouches: changedTouches
|
|
4265
4321
|
} = e;
|
|
@@ -4309,7 +4365,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4309
4365
|
};
|
|
4310
4366
|
$9HbP8$use(el => {
|
|
4311
4367
|
modal = el;
|
|
4312
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4368
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify1(() => {
|
|
4313
4369
|
set_modal_style("transition", "all 200ms ease-in");
|
|
4314
4370
|
set_modal_style("transform", "translateY(0)");
|
|
4315
4371
|
}));
|
|
@@ -4391,7 +4447,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4391
4447
|
},
|
|
4392
4448
|
get children() {
|
|
4393
4449
|
const _el$11 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$);
|
|
4394
|
-
$9HbP8$addEventListener(_el$11, "click", $9HbP8$
|
|
4450
|
+
$9HbP8$addEventListener(_el$11, "click", $9HbP8$catchify1(() => {
|
|
4395
4451
|
const show_toast = $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
4396
4452
|
user_triggered_: true,
|
|
4397
4453
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -4401,7 +4457,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4401
4457
|
also_clear_sorting_: false,
|
|
4402
4458
|
delay_toast_: true
|
|
4403
4459
|
});
|
|
4404
|
-
cleanup_promise.then($9HbP8$
|
|
4460
|
+
cleanup_promise.then($9HbP8$catchify1(show_toast));
|
|
4405
4461
|
}), true);
|
|
4406
4462
|
$9HbP8$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
4407
4463
|
$9HbP8$runHydrationEvents();
|
|
@@ -4474,7 +4530,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4474
4530
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4475
4531
|
const [get_current_sorting_] = current_sorting_;
|
|
4476
4532
|
const [is_small, set_is_small] = $9HbP8$createSignal(false);
|
|
4477
|
-
const dismiss_modal_ = $9HbP8$
|
|
4533
|
+
const dismiss_modal_ = $9HbP8$catchify1(() => {
|
|
4478
4534
|
set_filters_open(false);
|
|
4479
4535
|
set_sorting_open(false);
|
|
4480
4536
|
});
|
|
@@ -4555,7 +4611,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4555
4611
|
})());
|
|
4556
4612
|
}
|
|
4557
4613
|
});
|
|
4558
|
-
$9HbP8$
|
|
4614
|
+
$9HbP8$catchify1(async () => {
|
|
4559
4615
|
({
|
|
4560
4616
|
open_modal_: open_modal_,
|
|
4561
4617
|
close_modal_: close_modal_
|
|
@@ -4632,7 +4688,7 @@ function $cdea4cf8c5c071ef$var$OpenFiltersButton({
|
|
|
4632
4688
|
return _el$15;
|
|
4633
4689
|
}
|
|
4634
4690
|
}), _el$21, _co$5);
|
|
4635
|
-
$9HbP8$addEventListener(_el$16, "click", $9HbP8$
|
|
4691
|
+
$9HbP8$addEventListener(_el$16, "click", $9HbP8$catchify1(() => $9HbP8$batch(() => {
|
|
4636
4692
|
if (search_filters_open_[0]()) {
|
|
4637
4693
|
search_filters_open_[1](false);
|
|
4638
4694
|
return;
|
|
@@ -4693,7 +4749,7 @@ function $cdea4cf8c5c071ef$var$OpenSortingButton({
|
|
|
4693
4749
|
_el$23 = _el$22.firstChild,
|
|
4694
4750
|
_el$24 = _el$23.nextSibling,
|
|
4695
4751
|
[_el$25, _co$6] = $9HbP8$getNextMarker(_el$24.nextSibling);
|
|
4696
|
-
$9HbP8$addEventListener(_el$22, "click", $9HbP8$
|
|
4752
|
+
$9HbP8$addEventListener(_el$22, "click", $9HbP8$catchify1(() => $9HbP8$batch(() => {
|
|
4697
4753
|
if (search_sorting_open_[0]()) {
|
|
4698
4754
|
search_sorting_open_[1](false);
|
|
4699
4755
|
return;
|
|
@@ -4800,7 +4856,7 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4800
4856
|
}
|
|
4801
4857
|
old_pos = new_pos;
|
|
4802
4858
|
});
|
|
4803
|
-
const touchstart_handler = $9HbP8$
|
|
4859
|
+
const touchstart_handler = $9HbP8$catchify1(e => {
|
|
4804
4860
|
is_in_touch_scroll = true;
|
|
4805
4861
|
if (e.touches.length === 1) {
|
|
4806
4862
|
// we had no touches but then we got some. Adding a new touch cancels the inertia. We are in a new touch so do reset the diff
|
|
@@ -4808,12 +4864,12 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4808
4864
|
diff_over_second_or_touch = 0;
|
|
4809
4865
|
}
|
|
4810
4866
|
});
|
|
4811
|
-
const touchend_handler = $9HbP8$
|
|
4867
|
+
const touchend_handler = $9HbP8$catchify1(e => {
|
|
4812
4868
|
if (e.touches.length === 0)
|
|
4813
4869
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
4814
4870
|
inertia_timeout = setTimeout(
|
|
4815
4871
|
// inertia ends after 500ms (educated guess)
|
|
4816
|
-
$9HbP8$
|
|
4872
|
+
$9HbP8$catchify1(() => {
|
|
4817
4873
|
is_in_touch_scroll = false;
|
|
4818
4874
|
diff_over_second_or_touch = 0;
|
|
4819
4875
|
}), 500);
|
|
@@ -4831,9 +4887,9 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4831
4887
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
4832
4888
|
if (!$9HbP8$untrack(modal_is_closed) && everything_closed)
|
|
4833
4889
|
// I think the point of this is to delay the animation a bit IIRC
|
|
4834
|
-
timeout = setTimeout($9HbP8$
|
|
4890
|
+
timeout = setTimeout($9HbP8$catchify1(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
4835
4891
|
});
|
|
4836
|
-
$9HbP8$createComputed($9HbP8$
|
|
4892
|
+
$9HbP8$createComputed($9HbP8$catchify1(async () => {
|
|
4837
4893
|
const element = sort_and_filter_element_();
|
|
4838
4894
|
if (!element) return;
|
|
4839
4895
|
await (0, $9HbP8$observer).wait_for_element(element);
|
|
@@ -4852,12 +4908,12 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4852
4908
|
_el$5 = _el$4.firstChild,
|
|
4853
4909
|
_el$6 = _el$4.nextSibling,
|
|
4854
4910
|
_el$7 = _el$6.firstChild;
|
|
4855
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
4911
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify1(() => {
|
|
4856
4912
|
set_search_filters_open_(true);
|
|
4857
4913
|
set_search_sorting_open_(false);
|
|
4858
4914
|
}), true);
|
|
4859
4915
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $b9bf7fce0ae60241$export$28f6150e232898de), {}));
|
|
4860
|
-
$9HbP8$addEventListener(_el$4, "click", $9HbP8$
|
|
4916
|
+
$9HbP8$addEventListener(_el$4, "click", $9HbP8$catchify1(() => {
|
|
4861
4917
|
set_search_filters_open_(false);
|
|
4862
4918
|
set_search_sorting_open_(true);
|
|
4863
4919
|
}), true);
|
|
@@ -4865,7 +4921,7 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4865
4921
|
const _c$ = $9HbP8$memo(() => current_sorting_[0]()?.order === "asc");
|
|
4866
4922
|
return () => _c$() ? $9HbP8$createComponent((0, $e1bb71e65e01a3a0$export$da32f7add8a22e86), {}) : $9HbP8$createComponent((0, $05fbe84eb34564ec$export$d10e63059ddb9fd4), {});
|
|
4867
4923
|
})());
|
|
4868
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
4924
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify1(() => scrollTo({
|
|
4869
4925
|
top: 0,
|
|
4870
4926
|
behavior: "smooth"
|
|
4871
4927
|
})), true);
|
|
@@ -5106,7 +5162,7 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({
|
|
|
5106
5162
|
},
|
|
5107
5163
|
get children() {
|
|
5108
5164
|
const _el$2 = $9HbP8$getNextElement($dfa5b6f7c5e421df$var$_tmpl$2);
|
|
5109
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
5165
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify1(ev => router_.navigate_.go_to_({
|
|
5110
5166
|
new_url_: href(),
|
|
5111
5167
|
is_replace_: false,
|
|
5112
5168
|
event_: ev,
|
|
@@ -5178,7 +5234,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5178
5234
|
}];
|
|
5179
5235
|
$9HbP8$createComputed(() => {
|
|
5180
5236
|
if (place_holdey_quicklinks_data()?.[0]?.query_id) {
|
|
5181
|
-
if (last_was_placeholder) queueMicrotask($9HbP8$
|
|
5237
|
+
if (last_was_placeholder) queueMicrotask($9HbP8$catchify1(() => {
|
|
5182
5238
|
sliding_element?.scrollTo({
|
|
5183
5239
|
left: 0
|
|
5184
5240
|
}); // for some reason we land one element to the right after placeholder rendering otherwise
|
|
@@ -5245,7 +5301,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5245
5301
|
} else if (!(intersecting_items_object[selected_index()]?.intersectionRatio >= 0.95)) {
|
|
5246
5302
|
// negated larger than to handle left side of comparison being undefined
|
|
5247
5303
|
let done_work = false;
|
|
5248
|
-
$9HbP8$runWithOwner(owner, () => $9HbP8$createComputed($9HbP8$
|
|
5304
|
+
$9HbP8$runWithOwner(owner, () => $9HbP8$createComputed($9HbP8$catchify1(() => {
|
|
5249
5305
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
5250
5306
|
const sel_index = selected_index();
|
|
5251
5307
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -5293,7 +5349,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5293
5349
|
}));
|
|
5294
5350
|
return (() => {
|
|
5295
5351
|
const _el$3 = $9HbP8$getNextElement($06edf3aec9073663$var$_tmpl$3);
|
|
5296
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
5352
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify1(ev => {
|
|
5297
5353
|
const url = href();
|
|
5298
5354
|
if (is_selected() && !ev.metaKey && !ev.ctrlKey && !ev.button || !url)
|
|
5299
5355
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -5352,7 +5408,7 @@ function $641bba2917fe862b$export$6e49da55e449af7c({
|
|
|
5352
5408
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
5353
5409
|
};
|
|
5354
5410
|
|
|
5355
|
-
$9HbP8$createComputed($9HbP8$
|
|
5411
|
+
$9HbP8$createComputed($9HbP8$catchify1(() => {
|
|
5356
5412
|
const last_result = get_last_result_in_viewport_();
|
|
5357
5413
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
5358
5414
|
if (isNaN(last_result)) {
|
|
@@ -5379,7 +5435,7 @@ function $641bba2917fe862b$export$6e49da55e449af7c({
|
|
|
5379
5435
|
set_to_later = last_result;
|
|
5380
5436
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
5381
5437
|
if (timeout) return;
|
|
5382
|
-
timeout = setTimeout($9HbP8$
|
|
5438
|
+
timeout = setTimeout($9HbP8$catchify1(() => {
|
|
5383
5439
|
timeout = undefined;
|
|
5384
5440
|
last_time_history_changed = +new Date();
|
|
5385
5441
|
set_min_results_loaded(set_to_later);
|
|
@@ -5422,7 +5478,7 @@ function $587cd61972788655$export$210f130a61ac1e8d(fn) {
|
|
|
5422
5478
|
let last_queued;
|
|
5423
5479
|
let last_value;
|
|
5424
5480
|
let initial_run = true;
|
|
5425
|
-
$9HbP8$createComputed($9HbP8$
|
|
5481
|
+
$9HbP8$createComputed($9HbP8$catchify1(async () => {
|
|
5426
5482
|
last_value = fn();
|
|
5427
5483
|
if (initial_run) {
|
|
5428
5484
|
initial_run = false;
|
|
@@ -5482,7 +5538,7 @@ function $e7fce80abe608e01$export$3945d6db2dfd3d12({
|
|
|
5482
5538
|
const handler = () => allow_filter_clearing = false;
|
|
5483
5539
|
window.addEventListener("popstate", handler); // popstate only gets called when using back/forwards button of browser or the history navigate to achieve the same, but not on pushState or replaceState
|
|
5484
5540
|
$9HbP8$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
5485
|
-
$9HbP8$createEffect($9HbP8$on(crumb_data_, $9HbP8$
|
|
5541
|
+
$9HbP8$createEffect($9HbP8$on(crumb_data_, $9HbP8$catchify1(new_crumb_data => {
|
|
5486
5542
|
const query_id_of_new_data = query_id_();
|
|
5487
5543
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && query_id_of_new_data !== query_id_when_we_got_previous_data) {
|
|
5488
5544
|
const previous_length = previous_crumb_data.length;
|
|
@@ -5667,7 +5723,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5667
5723
|
});
|
|
5668
5724
|
const [plp_results_] = $9HbP8$createResource(query_base_,
|
|
5669
5725
|
// 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)
|
|
5670
|
-
$9HbP8$
|
|
5726
|
+
$9HbP8$catchify1(base_query => $641bba2917fe862b$export$cc42dd29bf655ab6({
|
|
5671
5727
|
id_: $9HbP8$untrack(query_id_),
|
|
5672
5728
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5673
5729
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -5785,7 +5841,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5785
5841
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5786
5842
|
...extra_sort_and_filter_args_
|
|
5787
5843
|
});
|
|
5788
|
-
$9HbP8$
|
|
5844
|
+
$9HbP8$catchify1((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
5789
5845
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5790
5846
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
5791
5847
|
id_: query_id_,
|
|
@@ -5795,7 +5851,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5795
5851
|
$9HbP8$createComputed(() => {
|
|
5796
5852
|
if (plp_results_.loading) set_can_write_scroll_restoration(false);else if (plp_results_()) set_can_write_scroll_restoration(true);
|
|
5797
5853
|
});
|
|
5798
|
-
$9HbP8$createRenderEffect($9HbP8$
|
|
5854
|
+
$9HbP8$createRenderEffect($9HbP8$catchify1(async () => {
|
|
5799
5855
|
const slim = is_slim_();
|
|
5800
5856
|
const only_show_filters_opener = only_show_filters_opener_?.();
|
|
5801
5857
|
const owner = $9HbP8$getOwner();
|
|
@@ -6041,7 +6097,7 @@ function $ccd5db07a3a069c5$export$477caf01aecaeb2a(options) {
|
|
|
6041
6097
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
6042
6098
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
6043
6099
|
const [get_current_href, set_current_href] = $9HbP8$createSignal(globalThis?.location?.href ?? "https://example.com");
|
|
6044
|
-
const history_change_handler = $9HbP8$
|
|
6100
|
+
const history_change_handler = $9HbP8$catchify1(() => set_current_href(location.href));
|
|
6045
6101
|
const owner = $9HbP8$getOwner() || $9HbP8$createRoot(() => $9HbP8$getOwner());
|
|
6046
6102
|
const {
|
|
6047
6103
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -6211,7 +6267,7 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
6211
6267
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
6212
6268
|
* @param category_query_id_ If you are navigating to a category and know the query_id of, please provide it. This is for making a better devEx in js-ui
|
|
6213
6269
|
*/
|
|
6214
|
-
go_to_: $9HbP8$
|
|
6270
|
+
go_to_: $9HbP8$catchify1(async ({
|
|
6215
6271
|
new_url_: raw_new_url,
|
|
6216
6272
|
event_: event_,
|
|
6217
6273
|
force_spa_navigation_: force_spa_navigation_,
|
|
@@ -6632,7 +6688,7 @@ const $a6e23a834336fc19$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
6632
6688
|
|
|
6633
6689
|
const observe_to_signal = (element, setter) => {
|
|
6634
6690
|
const computed_style = getComputedStyle(element);
|
|
6635
|
-
const resize_observer = new ResizeObserver($9HbP8$
|
|
6691
|
+
const resize_observer = new ResizeObserver($9HbP8$catchify1(() => {
|
|
6636
6692
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
6637
6693
|
}));
|
|
6638
6694
|
resize_observer.observe(element);
|
|
@@ -6801,7 +6857,7 @@ function $897bd4a76f611b38$export$d757d54550ebfb3d({
|
|
|
6801
6857
|
_el$2 = _el$.firstChild,
|
|
6802
6858
|
_el$4 = _el$2.nextSibling,
|
|
6803
6859
|
[_el$5, _co$] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
6804
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
6860
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify1(e => {
|
|
6805
6861
|
router_.navigate_.go_to_({
|
|
6806
6862
|
new_url_: category_suggestion_().page_url,
|
|
6807
6863
|
is_replace_: false,
|
|
@@ -6859,7 +6915,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6859
6915
|
let input_element;
|
|
6860
6916
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
6861
6917
|
let field_div;
|
|
6862
|
-
$9HbP8$createEffect($9HbP8$
|
|
6918
|
+
$9HbP8$createEffect($9HbP8$catchify1(async () => {
|
|
6863
6919
|
if (disabled_) return;
|
|
6864
6920
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
6865
6921
|
await (0, $9HbP8$observer).wait_for_element(input_element);
|
|
@@ -6879,7 +6935,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6879
6935
|
when: on_back_,
|
|
6880
6936
|
get children() {
|
|
6881
6937
|
const _el$2 = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$);
|
|
6882
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
6938
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify1(on_back_), true);
|
|
6883
6939
|
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $22e59517c2ec94d3$export$1c641004b5485fed), {}));
|
|
6884
6940
|
$9HbP8$effect(() => $9HbP8$setAttribute(_el$2, "aria-label", i18n_.back_()));
|
|
6885
6941
|
$9HbP8$runHydrationEvents();
|
|
@@ -6895,7 +6951,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6895
6951
|
}) => {
|
|
6896
6952
|
// When selecting text with a mouse we want a SearchField to be focussed even when releasing the mouse outside the .field element (we assume the event listener which opens the modal is attached to that).
|
|
6897
6953
|
if (pointerType === "mouse") {
|
|
6898
|
-
const handler = $9HbP8$
|
|
6954
|
+
const handler = $9HbP8$catchify1(({
|
|
6899
6955
|
pointerType: pointerType,
|
|
6900
6956
|
target: target
|
|
6901
6957
|
}) => {
|
|
@@ -6908,26 +6964,26 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6908
6964
|
if (owner_of_field_element) $9HbP8$runWithOwner(owner_of_field_element, () => $9HbP8$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
6909
6965
|
}
|
|
6910
6966
|
};
|
|
6911
|
-
$9HbP8$addEventListener(_el$4, "select", $9HbP8$
|
|
6967
|
+
$9HbP8$addEventListener(_el$4, "select", $9HbP8$catchify1(() => {
|
|
6912
6968
|
if (disabled_)
|
|
6913
6969
|
// just in case. The field not actually being disabled when being disabled_ is so that you can focus it and open the modal. We don't want any of the other input-field-interaction features to work
|
|
6914
6970
|
return;
|
|
6915
6971
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
6916
6972
|
// everything was selected, clear filters on next submit on next input
|
|
6917
|
-
input_element.addEventListener("input", $9HbP8$
|
|
6973
|
+
input_element.addEventListener("input", $9HbP8$catchify1(() => clear_filters_(false)),
|
|
6918
6974
|
// We don't count this as user triggered since it wasn't explicit
|
|
6919
6975
|
{
|
|
6920
6976
|
once: true
|
|
6921
6977
|
});
|
|
6922
6978
|
}));
|
|
6923
|
-
$9HbP8$addEventListener(_el$4, "input", $9HbP8$
|
|
6979
|
+
$9HbP8$addEventListener(_el$4, "input", $9HbP8$catchify1(() => {
|
|
6924
6980
|
const {
|
|
6925
6981
|
value: value
|
|
6926
6982
|
} = input_element;
|
|
6927
6983
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
6928
6984
|
search_field_value_[1](value);
|
|
6929
6985
|
}), true);
|
|
6930
|
-
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$
|
|
6986
|
+
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$catchify1(e => {
|
|
6931
6987
|
if (disabled_) {
|
|
6932
6988
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
6933
6989
|
// alow tab-selecting the input field and then open the modal when the user start writing but also to move past the field with tab
|
|
@@ -6937,19 +6993,19 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6937
6993
|
if (!dont_submit) submit_query_();
|
|
6938
6994
|
}
|
|
6939
6995
|
}), true);
|
|
6940
|
-
const _ref$ = $9HbP8$
|
|
6996
|
+
const _ref$ = $9HbP8$catchify1(el => {
|
|
6941
6997
|
input_element = el;
|
|
6942
6998
|
input_field_ref_?.(el);
|
|
6943
6999
|
});
|
|
6944
7000
|
typeof _ref$ === "function" && $9HbP8$use(_ref$, _el$4);
|
|
6945
7001
|
_el$4.classList.toggle("has-adjacent-back-button", !!on_back_);
|
|
6946
|
-
$9HbP8$addEventListener(_el$5, "click", $9HbP8$
|
|
7002
|
+
$9HbP8$addEventListener(_el$5, "click", $9HbP8$catchify1(() => {
|
|
6947
7003
|
search_field_value_[1]("");
|
|
6948
7004
|
clear_filters_(true);
|
|
6949
7005
|
if (!disabled_) input_element.focus();
|
|
6950
7006
|
}), true);
|
|
6951
7007
|
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {}));
|
|
6952
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
7008
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify1(() => submit_query_()), true);
|
|
6953
7009
|
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $16f0ed5ea30d8d9c$export$82eafebb825fc23f), {}));
|
|
6954
7010
|
$9HbP8$effect(_p$ => {
|
|
6955
7011
|
const _v$ = i18n_.search_field_field_aria_label_(),
|
|
@@ -7080,7 +7136,7 @@ function $b6d5529b253681aa$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7080
7136
|
};
|
|
7081
7137
|
let ro;
|
|
7082
7138
|
if (one_axies_only !== "top") {
|
|
7083
|
-
ro = new ResizeObserver($9HbP8$
|
|
7139
|
+
ro = new ResizeObserver($9HbP8$catchify1(records => {
|
|
7084
7140
|
records.forEach(({
|
|
7085
7141
|
contentRect: {
|
|
7086
7142
|
width: width
|
|
@@ -7101,10 +7157,10 @@ function $b6d5529b253681aa$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7101
7157
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
7102
7158
|
// this works
|
|
7103
7159
|
// keeping resize just in case
|
|
7104
|
-
const resize_resize_observer = new ResizeObserver($9HbP8$
|
|
7160
|
+
const resize_resize_observer = new ResizeObserver($9HbP8$catchify1(align_position));
|
|
7105
7161
|
resize_resize_observer.observe(document.documentElement);
|
|
7106
7162
|
(0, $9HbP8$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
7107
|
-
$9HbP8$onCleanup($9HbP8$
|
|
7163
|
+
$9HbP8$onCleanup($9HbP8$catchify1(() => {
|
|
7108
7164
|
ro?.disconnect();
|
|
7109
7165
|
resize_resize_observer.disconnect();
|
|
7110
7166
|
}));
|
|
@@ -7132,7 +7188,7 @@ function $48d7e4a9707315b6$export$e026af0c7b64ea5f({
|
|
|
7132
7188
|
}, {
|
|
7133
7189
|
defer: true
|
|
7134
7190
|
}));
|
|
7135
|
-
$9HbP8$createComputed($9HbP8$on(get_search_query_, $9HbP8$
|
|
7191
|
+
$9HbP8$createComputed($9HbP8$on(get_search_query_, $9HbP8$catchify1(() => {
|
|
7136
7192
|
// when a query was submitted, clear filters if clear was pressed before
|
|
7137
7193
|
const clear_value = $9HbP8$untrack(get_clear_filters_next_submit);
|
|
7138
7194
|
if (clear_value) {
|
|
@@ -7157,11 +7213,11 @@ function $21f51c14cb3f586f$export$84bba84a7b837187(read_search_query) {
|
|
|
7157
7213
|
const key = "depict_searches";
|
|
7158
7214
|
const previous_searches = $9HbP8$createSignal(JSON.parse(ls[key] || "[]"));
|
|
7159
7215
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
7160
|
-
$9HbP8$createEffect($9HbP8$
|
|
7216
|
+
$9HbP8$createEffect($9HbP8$catchify1(() => {
|
|
7161
7217
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
7162
7218
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
7163
7219
|
}));
|
|
7164
|
-
$9HbP8$createComputed($9HbP8$
|
|
7220
|
+
$9HbP8$createComputed($9HbP8$catchify1(() => {
|
|
7165
7221
|
const searches = $9HbP8$untrack(read_previous_searches);
|
|
7166
7222
|
const current_query = read_search_query();
|
|
7167
7223
|
if (!current_query)
|
|
@@ -7266,7 +7322,7 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = (display_or_variant_container,
|
|
|
7266
7322
|
[_el$21, _co$6] = $9HbP8$getNextMarker(_el$20.nextSibling),
|
|
7267
7323
|
_el$22 = _el$21.nextSibling,
|
|
7268
7324
|
[_el$23, _co$7] = $9HbP8$getNextMarker(_el$22.nextSibling);
|
|
7269
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
7325
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify1(event_ => router_.navigate_.go_to_({
|
|
7270
7326
|
new_url_: href(),
|
|
7271
7327
|
is_replace_: false,
|
|
7272
7328
|
event_: event_
|
|
@@ -7360,13 +7416,13 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
7360
7416
|
// don't wait if it's the first request
|
|
7361
7417
|
write_current_instant_query(value);
|
|
7362
7418
|
clearTimeout(timeout);
|
|
7363
|
-
timeout = setTimeout($9HbP8$
|
|
7419
|
+
timeout = setTimeout($9HbP8$catchify1(() => write_current_instant_query(value)), 250);
|
|
7364
7420
|
});
|
|
7365
7421
|
const [search_results] = $9HbP8$createResource($9HbP8$createMemo(() => ({
|
|
7366
7422
|
tenant: tenant_(),
|
|
7367
7423
|
market: market_(),
|
|
7368
7424
|
query: read_current_instant_query()
|
|
7369
|
-
})), $9HbP8$
|
|
7425
|
+
})), $9HbP8$catchify1(variable_data => {
|
|
7370
7426
|
return depict_api_.query({
|
|
7371
7427
|
// here it is (unfortunately) important that the keys in the object are in the same order as in SearchPage.tsx, because when JSON-encoding them to compare for caching the strings will be different otherwise
|
|
7372
7428
|
limit: $9HbP8$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -7444,7 +7500,7 @@ function $4ceabea39c9a56ac$export$50b90be27d8502d9(el, [get_style_props, set_sty
|
|
|
7444
7500
|
[key]: new_value
|
|
7445
7501
|
});
|
|
7446
7502
|
};
|
|
7447
|
-
const is = new IntersectionObserver($9HbP8$
|
|
7503
|
+
const is = new IntersectionObserver($9HbP8$catchify1(_records => {
|
|
7448
7504
|
do_positioning();
|
|
7449
7505
|
}), {
|
|
7450
7506
|
threshold: $9HbP8$buildThresholdList(100)
|
|
@@ -7465,7 +7521,7 @@ function $a36cbc4f68bfd590$export$91c3b6774e8be0f5({
|
|
|
7465
7521
|
const [get_current_href, set_current_href] = $9HbP8$createSignal(location.href);
|
|
7466
7522
|
const [exit_iterable, exitable_iterable] = $9HbP8$make_asyncIterable_exiter((0, $9HbP8$href_change_ipns));
|
|
7467
7523
|
$9HbP8$onCleanup(exit_iterable);
|
|
7468
|
-
$9HbP8$
|
|
7524
|
+
$9HbP8$catchify1(async () => {
|
|
7469
7525
|
for await (const href of exitable_iterable)
|
|
7470
7526
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
7471
7527
|
set_current_href(href);
|
|
@@ -7535,18 +7591,18 @@ function $7ad3a93cbe6fa208$export$a146ac6fa8346a25({
|
|
|
7535
7591
|
_el$9 = _el$5.nextSibling;
|
|
7536
7592
|
$9HbP8$use(element => element.addEventListener(
|
|
7537
7593
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
7538
|
-
"click", $9HbP8$
|
|
7594
|
+
"click", $9HbP8$catchify1(ev => {
|
|
7539
7595
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
7540
7596
|
// not button 0 or cmd/ctrl click
|
|
7541
7597
|
return;
|
|
7542
7598
|
ev.preventDefault();
|
|
7543
7599
|
submit_query_(item());
|
|
7544
7600
|
})), _el$4);
|
|
7545
|
-
$9HbP8$addEventListener(_el$4, "mouseleave", $9HbP8$
|
|
7546
|
-
$9HbP8$addEventListener(_el$4, "mouseenter", $9HbP8$
|
|
7601
|
+
$9HbP8$addEventListener(_el$4, "mouseleave", $9HbP8$catchify1(() => write_selected_index_(undefined)));
|
|
7602
|
+
$9HbP8$addEventListener(_el$4, "mouseenter", $9HbP8$catchify1(() => write_selected_index_([0, index])));
|
|
7547
7603
|
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $694b7f90501fea4c$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
7548
7604
|
$9HbP8$insert(_el$6, item);
|
|
7549
|
-
$9HbP8$use(element => element.addEventListener("click", $9HbP8$
|
|
7605
|
+
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify1(e => {
|
|
7550
7606
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
7551
7607
|
set_unfiltered_previous_searches_(prev => {
|
|
7552
7608
|
const new_value = [...prev];
|
|
@@ -7716,7 +7772,7 @@ function $cea52f6b24092f05$export$e872e2339fb04a7f({
|
|
|
7716
7772
|
const is_selected = $9HbP8$createMemo(() => read_selected_index_()?.[0] === autocomplete_data_index && read_selected_index_()?.[1] === index);
|
|
7717
7773
|
return (() => {
|
|
7718
7774
|
const _el$ = $9HbP8$getNextElement($cea52f6b24092f05$var$_tmpl$);
|
|
7719
|
-
$9HbP8$use(element => element.addEventListener("click", $9HbP8$
|
|
7775
|
+
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify1(ev => {
|
|
7720
7776
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
7721
7777
|
if (is_query()) {
|
|
7722
7778
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
@@ -7732,8 +7788,8 @@ function $cea52f6b24092f05$export$e872e2339fb04a7f({
|
|
|
7732
7788
|
event_: ev
|
|
7733
7789
|
});
|
|
7734
7790
|
})), _el$);
|
|
7735
|
-
$9HbP8$addEventListener(_el$, "mouseleave", $9HbP8$
|
|
7736
|
-
$9HbP8$addEventListener(_el$, "mouseenter", $9HbP8$
|
|
7791
|
+
$9HbP8$addEventListener(_el$, "mouseleave", $9HbP8$catchify1(() => write_selected_index_(undefined)));
|
|
7792
|
+
$9HbP8$addEventListener(_el$, "mouseenter", $9HbP8$catchify1(() => write_selected_index_([autocomplete_data_index, index])));
|
|
7737
7793
|
$9HbP8$insert(_el$, (() => {
|
|
7738
7794
|
const _c$ = $9HbP8$memo(() => !!is_query());
|
|
7739
7795
|
return () => _c$() ? [$9HbP8$createComponent((0, $9HbP8$Show), {
|
|
@@ -8022,7 +8078,7 @@ function $15f380f0ce2812cc$var$actual_navigation_working_on_fake_data({
|
|
|
8022
8078
|
if (!$9HbP8$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
8023
8079
|
});
|
|
8024
8080
|
const owner = $9HbP8$getOwner();
|
|
8025
|
-
const handler = $9HbP8$
|
|
8081
|
+
const handler = $9HbP8$catchify1(({
|
|
8026
8082
|
keyCode: keyCode
|
|
8027
8083
|
}) => $9HbP8$untrack(() => {
|
|
8028
8084
|
const up = keyCode === 38;
|
|
@@ -8082,7 +8138,7 @@ function $15f380f0ce2812cc$var$actual_navigation_working_on_fake_data({
|
|
|
8082
8138
|
const el = element_();
|
|
8083
8139
|
if (!el) return;
|
|
8084
8140
|
el.addEventListener("keyup", handler);
|
|
8085
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8141
|
+
$9HbP8$onCleanup($9HbP8$catchify1(() => el.removeEventListener("keyup", handler)));
|
|
8086
8142
|
});
|
|
8087
8143
|
}
|
|
8088
8144
|
function $1ae0eaca6ada9753$export$af0124069c150252({
|
|
@@ -8280,7 +8336,7 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
|
8280
8336
|
if (process.env.GA === "false") return;
|
|
8281
8337
|
let debounce_timeout;
|
|
8282
8338
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
8283
|
-
const send_to_ga = $9HbP8$
|
|
8339
|
+
const send_to_ga = $9HbP8$catchify1(() => {
|
|
8284
8340
|
const fake_url = new URL(location.href);
|
|
8285
8341
|
const {
|
|
8286
8342
|
searchParams: searchParams
|
|
@@ -8293,12 +8349,12 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
|
8293
8349
|
$9HbP8$onCleanup(() => {
|
|
8294
8350
|
setTimeout(
|
|
8295
8351
|
// do it next event loop because search_field_value_ is wrong this one and search_query might be too because we want the old value to be put into the history entry and a framework like NextJS might take some time to navigate
|
|
8296
|
-
$9HbP8$
|
|
8352
|
+
$9HbP8$catchify1(() => {
|
|
8297
8353
|
if ($9HbP8$untrack(get_search_query_) === $9HbP8$untrack(get_search_field_value_)) stop_timeout();
|
|
8298
8354
|
}));
|
|
8299
8355
|
});
|
|
8300
8356
|
let first_call = true;
|
|
8301
|
-
$9HbP8$createEffect($9HbP8$
|
|
8357
|
+
$9HbP8$createEffect($9HbP8$catchify1(() => {
|
|
8302
8358
|
get_search_field_value_();
|
|
8303
8359
|
if (first_call) {
|
|
8304
8360
|
// we only want to do stuff when it changes
|
|
@@ -8372,7 +8428,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8372
8428
|
const [input_field, set_input_field] = $9HbP8$createSignal();
|
|
8373
8429
|
const [get_search_field_value_] = search_field_value_;
|
|
8374
8430
|
const [get_modal_search_results, set_modal_search_results_] = $9HbP8$createSignal();
|
|
8375
|
-
const close_on_escape_handler = $9HbP8$
|
|
8431
|
+
const close_on_escape_handler = $9HbP8$catchify1(({
|
|
8376
8432
|
key: key
|
|
8377
8433
|
}) => {
|
|
8378
8434
|
if (key === "Escape") close_modal_();
|
|
@@ -8386,7 +8442,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8386
8442
|
const DiscoverMoreSection = () => (() => {
|
|
8387
8443
|
const _el$ = $9HbP8$getNextElement($fabfda1230351b1a$var$_tmpl$),
|
|
8388
8444
|
_el$2 = _el$.firstChild;
|
|
8389
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
8445
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify1(() => submit_query_()), true);
|
|
8390
8446
|
$9HbP8$insert(_el$2, (() => {
|
|
8391
8447
|
const _c$ = $9HbP8$memo(() => !!get_search_field_value_());
|
|
8392
8448
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -8401,7 +8457,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8401
8457
|
if (disable_scrolling_) $aea1edf92433e81e$export$fe334901e8bebd57();
|
|
8402
8458
|
$fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
8403
8459
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
8404
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8460
|
+
$9HbP8$onCleanup($9HbP8$catchify1(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
8405
8461
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
8406
8462
|
$c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
8407
8463
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -8453,13 +8509,13 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8453
8509
|
[_el$16, _co$5] = $9HbP8$getNextMarker(_el$15.nextSibling),
|
|
8454
8510
|
_el$17 = _el$5.nextSibling,
|
|
8455
8511
|
[_el$18, _co$6] = $9HbP8$getNextMarker(_el$17.nextSibling);
|
|
8456
|
-
$9HbP8$addEventListener(_el$4, "click", $9HbP8$
|
|
8512
|
+
$9HbP8$addEventListener(_el$4, "click", $9HbP8$catchify1(({
|
|
8457
8513
|
target: target
|
|
8458
8514
|
}) => {
|
|
8459
8515
|
if (target === modal_element) close_modal_();
|
|
8460
8516
|
}), true);
|
|
8461
8517
|
$9HbP8$insert(_el$5, search_field, _el$14, _co$4);
|
|
8462
|
-
$9HbP8$use(el => $9HbP8$
|
|
8518
|
+
$9HbP8$use(el => $9HbP8$catchify1((0, $4ceabea39c9a56ac$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
8463
8519
|
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
8464
8520
|
severity_: "error",
|
|
8465
8521
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -8558,8 +8614,8 @@ function $fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
8558
8614
|
let set_initial_values = false;
|
|
8559
8615
|
let old_pathname;
|
|
8560
8616
|
let old_param_value;
|
|
8561
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8562
|
-
$9HbP8$
|
|
8617
|
+
$9HbP8$onCleanup($9HbP8$catchify1(exit_iterable));
|
|
8618
|
+
$9HbP8$catchify1(async () => {
|
|
8563
8619
|
for await (const href of exitable_iterable) {
|
|
8564
8620
|
const u_o = new URL(href);
|
|
8565
8621
|
const new_pathname = u_o.pathname;
|
|
@@ -8631,7 +8687,7 @@ function $f8c929beb82c512b$export$9dd50d35b9d94fdf({
|
|
|
8631
8687
|
number_of_results_: number_of_results_,
|
|
8632
8688
|
type: type
|
|
8633
8689
|
}) {
|
|
8634
|
-
const contents = $9HbP8$createMemo($9HbP8$
|
|
8690
|
+
const contents = $9HbP8$createMemo($9HbP8$catchify1(() => {
|
|
8635
8691
|
const q = get_search_query_();
|
|
8636
8692
|
return i18n_[type === $f8c929beb82c512b$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
8637
8693
|
const _el$ = $9HbP8$getNextElement($f8c929beb82c512b$var$_tmpl$);
|
|
@@ -8905,7 +8961,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
8905
8961
|
if (!result) return;
|
|
8906
8962
|
return {
|
|
8907
8963
|
href: result.page_url,
|
|
8908
|
-
onClick: $9HbP8$
|
|
8964
|
+
onClick: $9HbP8$catchify1(ev => router_.navigate_.go_to_({
|
|
8909
8965
|
new_url_: result.page_url,
|
|
8910
8966
|
is_replace_: false,
|
|
8911
8967
|
event_: ev
|
|
@@ -9211,7 +9267,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9211
9267
|
} : {})
|
|
9212
9268
|
};
|
|
9213
9269
|
});
|
|
9214
|
-
const [search_results_] = $9HbP8$createResource(search_query_base_, $9HbP8$
|
|
9270
|
+
const [search_results_] = $9HbP8$createResource(search_query_base_, $9HbP8$catchify1(async base_query => {
|
|
9215
9271
|
set_all_products_loaded(false);
|
|
9216
9272
|
// only first page of results
|
|
9217
9273
|
return await $641bba2917fe862b$export$cc42dd29bf655ab6({
|
|
@@ -9239,7 +9295,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9239
9295
|
const available_filters_ = $9HbP8$createMemo(() => search_results_()?.filters);
|
|
9240
9296
|
const modal_body_style = $9HbP8$createSignal({});
|
|
9241
9297
|
const [get_search_field_elements, set_search_field_elements] = $9HbP8$createSignal();
|
|
9242
|
-
const SafeSearchField = $9HbP8$
|
|
9298
|
+
const SafeSearchField = $9HbP8$catchify1((0, $5285d2814d0fac0c$export$b94867ecbd698f21));
|
|
9243
9299
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
|
|
9244
9300
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
|
|
9245
9301
|
const n_hits = $9HbP8$createMemo(() => search_results_()?.n_hits);
|
|
@@ -9296,7 +9352,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9296
9352
|
})()));
|
|
9297
9353
|
}).remove);
|
|
9298
9354
|
$2ab89d64b7f1d5ef$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
9299
|
-
$9HbP8$
|
|
9355
|
+
$9HbP8$catchify1((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
9300
9356
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
9301
9357
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
9302
9358
|
id_: get_search_query_,
|
|
@@ -9334,8 +9390,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9334
9390
|
if (!search_field) break add_input_field;
|
|
9335
9391
|
modal_body_style[1]({});
|
|
9336
9392
|
modal_body_style_ref_?.(modal_body_style);
|
|
9337
|
-
const align_position = $9HbP8$
|
|
9338
|
-
div_with_field_class.addEventListener("click", $9HbP8$
|
|
9393
|
+
const align_position = $9HbP8$catchify1((0, $b6d5529b253681aa$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
9394
|
+
div_with_field_class.addEventListener("click", $9HbP8$catchify1(e => {
|
|
9339
9395
|
const target = e.target;
|
|
9340
9396
|
const sel = ".submit";
|
|
9341
9397
|
if (target?.matches?.(sel) || target?.closest?.(sel))
|
|
@@ -9527,7 +9583,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9527
9583
|
function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
9528
9584
|
const style_element = document.createElement("style");
|
|
9529
9585
|
document.head.append(style_element);
|
|
9530
|
-
const resize_observer = new ResizeObserver($9HbP8$
|
|
9586
|
+
const resize_observer = new ResizeObserver($9HbP8$catchify1(() => {
|
|
9531
9587
|
const styles = $926b1b5ba2239356$export$1233ca167bf71f9a({
|
|
9532
9588
|
".depict.plp .depict-search-modal .search-field": {
|
|
9533
9589
|
"height": `${aligner?.clientHeight}px`
|
|
@@ -9690,7 +9746,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
|
|
|
9690
9746
|
selected_filters_: selected_filters_
|
|
9691
9747
|
});
|
|
9692
9748
|
$90980bd87c9960f9$export$5162a71f252e6122();
|
|
9693
|
-
$9HbP8$
|
|
9749
|
+
$9HbP8$catchify1(async () => {
|
|
9694
9750
|
const {
|
|
9695
9751
|
open_modal_: open_modal_,
|
|
9696
9752
|
close_modal_: close_modal_
|
|
@@ -9957,7 +10013,7 @@ function $806c97b931758897$export$316f6f283ae64765(props) {
|
|
|
9957
10013
|
const style_props_ = $9HbP8$createSignal({
|
|
9958
10014
|
position: "fixed"
|
|
9959
10015
|
});
|
|
9960
|
-
const defaultHandler = $9HbP8$
|
|
10016
|
+
const defaultHandler = $9HbP8$catchify1(() => {
|
|
9961
10017
|
// When selecting text in the SearchField that's in the page we want the same selection to persist. It doesn't by itself, since the SearchModal has an entirely different SearchField. Therefore, we manually copy the selection over.
|
|
9962
10018
|
const selected_text_range_ = [input_element.selectionStart, input_element.selectionEnd];
|
|
9963
10019
|
const {
|
|
@@ -10049,7 +10105,7 @@ const $6891c018a834cfdd$export$d86a33413558014e = openModalParams => {
|
|
|
10049
10105
|
}, dispose_aligner];
|
|
10050
10106
|
};
|
|
10051
10107
|
function $6e8944558258054f$export$d0596b5cae35ad4(open_search) {
|
|
10052
|
-
const handler = $9HbP8$
|
|
10108
|
+
const handler = $9HbP8$catchify1(e => {
|
|
10053
10109
|
const {
|
|
10054
10110
|
key: key,
|
|
10055
10111
|
target: target
|
|
@@ -10068,7 +10124,7 @@ function $6e8944558258054f$export$d0596b5cae35ad4(open_search) {
|
|
|
10068
10124
|
function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
10069
10125
|
let old_url;
|
|
10070
10126
|
let disconnect_link_observer;
|
|
10071
|
-
const link_handler = $9HbP8$
|
|
10127
|
+
const link_handler = $9HbP8$catchify1(e => {
|
|
10072
10128
|
const link = e.currentTarget || e.target;
|
|
10073
10129
|
if (link.href === old_url) {
|
|
10074
10130
|
history.pushState(history.state, "", link.href);
|
|
@@ -10077,7 +10133,7 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
10077
10133
|
});
|
|
10078
10134
|
let remove_added_listeners;
|
|
10079
10135
|
let resolve_remove_added_listeners;
|
|
10080
|
-
pr.addEventListener("open", $9HbP8$
|
|
10136
|
+
pr.addEventListener("open", $9HbP8$catchify1(() => {
|
|
10081
10137
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
10082
10138
|
disconnect_link_observer = (0, $9HbP8$observer).onexists("a", async ({
|
|
10083
10139
|
element: element
|
|
@@ -10087,11 +10143,11 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
10087
10143
|
element.removeEventListener("click", link_handler);
|
|
10088
10144
|
});
|
|
10089
10145
|
}));
|
|
10090
|
-
pr.addEventListener("close", $9HbP8$
|
|
10146
|
+
pr.addEventListener("close", $9HbP8$catchify1(() => {
|
|
10091
10147
|
disconnect_link_observer?.();
|
|
10092
10148
|
resolve_remove_added_listeners?.();
|
|
10093
10149
|
}));
|
|
10094
|
-
$9HbP8$
|
|
10150
|
+
$9HbP8$catchify1(async () => {
|
|
10095
10151
|
for await (const href of (0, $9HbP8$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
10096
10152
|
})();
|
|
10097
10153
|
}
|
|
@@ -10103,7 +10159,7 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10103
10159
|
static #reverting_permitted = true;
|
|
10104
10160
|
static #visited_urls = (() => {
|
|
10105
10161
|
// Keep track of all URLs that have been visited since the document that was initially loaded (loaded means the process where the browser creates a new `document` and `window` object).
|
|
10106
|
-
$9HbP8$
|
|
10162
|
+
$9HbP8$catchify1(async () => {
|
|
10107
10163
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
10108
10164
|
// I don't think we want to ship a library that users are *forced* to transpile, it should run in the newest version of all major browsers. So we'll just use a function wrapper for now (adding "last 1 ios version" to the build target does a bunch of other unneeded transpilations).
|
|
10109
10165
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|
|
@@ -10121,7 +10177,7 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10121
10177
|
async #listen() {
|
|
10122
10178
|
const [exit_ipns, exitable_ipns] = $9HbP8$make_asyncIterable_exiter((0, $9HbP8$href_change_ipns));
|
|
10123
10179
|
this.#stop_listening = exit_ipns;
|
|
10124
|
-
const caught_page_check_fn = $9HbP8$
|
|
10180
|
+
const caught_page_check_fn = $9HbP8$catchify1(this.is_page_, "page check failed");
|
|
10125
10181
|
for await (const href of exitable_ipns) {
|
|
10126
10182
|
const url = new URL(href);
|
|
10127
10183
|
if (!caught_page_check_fn(url)) {
|
|
@@ -10139,17 +10195,17 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10139
10195
|
this.addEventListener("close", dispose, {
|
|
10140
10196
|
once: true
|
|
10141
10197
|
});
|
|
10142
|
-
return $9HbP8$
|
|
10198
|
+
return $9HbP8$catchify1(this.render_, "rendering failed")() || [];
|
|
10143
10199
|
});
|
|
10144
10200
|
}
|
|
10145
|
-
#unload = $9HbP8$
|
|
10201
|
+
#unload = $9HbP8$catchify1(() => {
|
|
10146
10202
|
if (!this.#is_open) return;
|
|
10147
10203
|
this.#disconnect_observer?.();
|
|
10148
10204
|
if ($753e9b2889a47c89$export$3ccaa27d81dd8556.#reverting_permitted) while (this.#revert_fns.length) this.#revert_fns.pop()?.();
|
|
10149
10205
|
this.#is_open = false;
|
|
10150
10206
|
this.dispatchEvent(new CustomEvent("close"));
|
|
10151
10207
|
}, "failed to close page");
|
|
10152
|
-
#load = $9HbP8$
|
|
10208
|
+
#load = $9HbP8$catchify1(async els => {
|
|
10153
10209
|
this.#is_open = true;
|
|
10154
10210
|
// So that #load doesn't get called again
|
|
10155
10211
|
let set_should_stay_inserted;
|
|
@@ -10264,4 +10320,4 @@ const $4690a06c8489dcd0$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
10264
10320
|
const $4690a06c8489dcd0$export$864d304a0bc46829 = "2%";
|
|
10265
10321
|
const $4690a06c8489dcd0$export$7bf543b9d9be2c22 = (0, $e4615ecd1849548f$export$b91cec6bdc6b32a1);
|
|
10266
10322
|
$9HbP8$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
10267
|
-
export { $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|
|
10323
|
+
export { $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|