@depict-ai/ui 1.4.20 → 1.4.22
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 +5 -3
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +159 -157
- package/latest/index.cjs +5 -3
- package/latest/index.d.ts +1 -1
- package/latest/index.js +159 -157
- package/package.json +1 -1
- package/server/ES10/index.cjs +5 -3
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +100 -98
- package/server/latest/index.cjs +5 -3
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +100 -98
package/latest/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, catchify as $9HbP8$catchify, is_safari as $9HbP8$is_safari, report as $9HbP8$report, observer as $9HbP8$observer, 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
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
3
|
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";
|
|
5
4
|
|
|
6
5
|
/*! Depict.ai search and product listing SDK */
|
|
7
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
8
7
|
register_es_version("ui", "latest");
|
|
9
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.22";
|
|
10
9
|
const $e8ffe11ed01df0fe$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<img>`, 1);
|
|
11
10
|
function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
|
|
12
11
|
const [size, setSize] = $9HbP8$createSignal(0);
|
|
@@ -149,15 +148,15 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
149
148
|
$9HbP8$insert(details_, [summary_, $9HbP8$createComponent(ExpandingContainer, {
|
|
150
149
|
children: children
|
|
151
150
|
})], null);
|
|
152
|
-
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(details_).then($9HbP8$
|
|
153
|
-
$9HbP8$createEffect($9HbP8$
|
|
151
|
+
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(details_).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
152
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
154
153
|
const is_open = is_open_memo();
|
|
155
154
|
if (!is_in_dom())
|
|
156
155
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
157
156
|
return;
|
|
158
157
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
159
158
|
timeout_started = true;
|
|
160
|
-
setTimeout($9HbP8$
|
|
159
|
+
setTimeout($9HbP8$catchify(() => fresh_component = false));
|
|
161
160
|
}
|
|
162
161
|
if (is_open) {
|
|
163
162
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -165,10 +164,10 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
165
164
|
await expand(0, do_duration);
|
|
166
165
|
} else {
|
|
167
166
|
const animation = await collapse();
|
|
168
|
-
animation?.addEventListener("finish", $9HbP8$
|
|
167
|
+
animation?.addEventListener("finish", $9HbP8$catchify(() => details_.open = false));
|
|
169
168
|
}
|
|
170
169
|
}));
|
|
171
|
-
details_.addEventListener("toggle", $9HbP8$
|
|
170
|
+
details_.addEventListener("toggle", $9HbP8$catchify(() => {
|
|
172
171
|
const {
|
|
173
172
|
open: open
|
|
174
173
|
} = details_;
|
|
@@ -178,11 +177,11 @@ function $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d(props) {
|
|
|
178
177
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
179
178
|
);
|
|
180
179
|
|
|
181
|
-
summary_.addEventListener("click", $9HbP8$
|
|
180
|
+
summary_.addEventListener("click", $9HbP8$catchify(ev => {
|
|
182
181
|
ev.preventDefault();
|
|
183
182
|
toggle();
|
|
184
183
|
}));
|
|
185
|
-
summary_.addEventListener("keydown", $9HbP8$
|
|
184
|
+
summary_.addEventListener("keydown", $9HbP8$catchify(ev => {
|
|
186
185
|
const {
|
|
187
186
|
key: key
|
|
188
187
|
} = ev;
|
|
@@ -275,7 +274,7 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
275
274
|
}) {
|
|
276
275
|
let close_toast_;
|
|
277
276
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
278
|
-
$9HbP8$
|
|
277
|
+
$9HbP8$catchify(async () => {
|
|
279
278
|
const closing_animation_duration = 300; // ms
|
|
280
279
|
const element = (() => {
|
|
281
280
|
const _el$ = $9HbP8$getNextElement($bf52d9f9eebd1938$var$_tmpl$);
|
|
@@ -286,8 +285,8 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
286
285
|
})();
|
|
287
286
|
const [, set_is_showing_toast] = $bf52d9f9eebd1938$export$22970a0140fc759c;
|
|
288
287
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
289
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $9HbP8$
|
|
290
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $9HbP8$
|
|
288
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $9HbP8$catchify(() => closing_animation.pause()));
|
|
289
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $9HbP8$catchify(() => closing_animation.play()));
|
|
291
290
|
const body = await (0, $9HbP8$observer).wait_for_element("body");
|
|
292
291
|
const x_translate = "translateX(-50%) ";
|
|
293
292
|
let remove_keyboard_listener;
|
|
@@ -312,7 +311,7 @@ function $bf52d9f9eebd1938$export$5196e4c01fa56fcb({
|
|
|
312
311
|
// let other toasts close us if they open while we're still here
|
|
313
312
|
$bf52d9f9eebd1938$var$closing_functions.add(close_toast_);
|
|
314
313
|
set_is_showing_toast(true);
|
|
315
|
-
const handler = $9HbP8$
|
|
314
|
+
const handler = $9HbP8$catchify(({
|
|
316
315
|
key: key
|
|
317
316
|
}) => {
|
|
318
317
|
if (key === "Escape")
|
|
@@ -418,7 +417,7 @@ function $e9342fb3ac73a54a$export$8895d39404bd2bb1(props) {
|
|
|
418
417
|
const _el$2 = $9HbP8$getNextElement($e9342fb3ac73a54a$var$_tmpl$2),
|
|
419
418
|
_el$3 = _el$2.firstChild,
|
|
420
419
|
_el$4 = _el$3.nextSibling;
|
|
421
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
420
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(() => {
|
|
422
421
|
set_selected_filters(previous_selected_filters);
|
|
423
422
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
424
423
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
@@ -499,7 +498,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
499
498
|
get children() {
|
|
500
499
|
return [(() => {
|
|
501
500
|
const _el$6 = $9HbP8$getNextElement($1adfe60f3a14a1d7$var$_tmpl$);
|
|
502
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
501
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify(() =>
|
|
503
502
|
// click event handlers don't have an owner, carry it over
|
|
504
503
|
$9HbP8$runWithOwner(owner, () => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
505
504
|
selected_filters_: selected_filters_,
|
|
@@ -683,7 +682,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
683
682
|
_el$28 = _el$26.firstChild,
|
|
684
683
|
[_el$29, _co$10] = $9HbP8$getNextMarker(_el$28.nextSibling),
|
|
685
684
|
_el$27 = _el$29.nextSibling;
|
|
686
|
-
$9HbP8$addEventListener(_el$26, "click", $9HbP8$
|
|
685
|
+
$9HbP8$addEventListener(_el$26, "click", $9HbP8$catchify(() => {
|
|
687
686
|
const to_remove = selected_data();
|
|
688
687
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
689
688
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -739,9 +738,9 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
739
738
|
});
|
|
740
739
|
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(document.documentElement.contains(outmost_element));
|
|
741
740
|
const hidden = $9HbP8$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
742
|
-
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(outmost_element).then($9HbP8$
|
|
741
|
+
if (!$9HbP8$untrack(is_in_dom)) (0, $9HbP8$observer).wait_for_element(outmost_element).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
743
742
|
outmost_element.classList.add("selected-filters");
|
|
744
|
-
$9HbP8$createEffect($9HbP8$
|
|
743
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
745
744
|
if (!is_in_dom())
|
|
746
745
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
747
746
|
return;
|
|
@@ -778,7 +777,7 @@ const $87c712b5b33f24f7$export$48513f6b9f8ce62d = props => {
|
|
|
778
777
|
// 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.
|
|
779
778
|
// 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
|
|
780
779
|
// Why it can't be done instantaneously I don't know.
|
|
781
|
-
input_el.addEventListener("change", $9HbP8$
|
|
780
|
+
input_el.addEventListener("change", $9HbP8$catchify(() => requestAnimationFrame($9HbP8$catchify(() => {
|
|
782
781
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
783
782
|
}))));
|
|
784
783
|
props.input_ref_?.(input_el);
|
|
@@ -834,7 +833,7 @@ function $67b173f9db427028$export$ca21a16d65b3dd8({
|
|
|
834
833
|
_el$3 = _el$.firstChild,
|
|
835
834
|
[_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling),
|
|
836
835
|
_el$2 = _el$4.nextSibling;
|
|
837
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
836
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(() => set_show_extras(p => !p)), true);
|
|
838
837
|
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $f8a56ba74eedd0c6$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
839
838
|
$9HbP8$insert(_el$2, (() => {
|
|
840
839
|
const _c$ = $9HbP8$memo(() => !!get_show_extras());
|
|
@@ -924,7 +923,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
924
923
|
i18n_: i18n_
|
|
925
924
|
}) : []);
|
|
926
925
|
});
|
|
927
|
-
$9HbP8$createEffect($9HbP8$
|
|
926
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
928
927
|
if (!togglable_rest()) {
|
|
929
928
|
await collapse();
|
|
930
929
|
return;
|
|
@@ -937,7 +936,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
937
936
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
938
937
|
_el$4 = _el$3.nextSibling,
|
|
939
938
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
940
|
-
$9HbP8$addEventListener(_el$, "change", $9HbP8$
|
|
939
|
+
$9HbP8$addEventListener(_el$, "change", $9HbP8$catchify(() => {
|
|
941
940
|
const set_filter = existing_filter();
|
|
942
941
|
const {
|
|
943
942
|
field: field,
|
|
@@ -1005,7 +1004,7 @@ function $eb8d9bf3b5700c26$export$430444115f70a734({
|
|
|
1005
1004
|
_el$9 = _el$3.nextSibling,
|
|
1006
1005
|
[_el$10, _co$2] = $9HbP8$getNextMarker(_el$9.nextSibling);
|
|
1007
1006
|
$9HbP8$setAttribute(_el$2, "for", random_selector);
|
|
1008
|
-
$9HbP8$addEventListener(_el$4, "change", $9HbP8$
|
|
1007
|
+
$9HbP8$addEventListener(_el$4, "change", $9HbP8$catchify(() => {
|
|
1009
1008
|
const filter_object = {
|
|
1010
1009
|
op: filter_().op,
|
|
1011
1010
|
field: filter_().field,
|
|
@@ -1071,7 +1070,7 @@ function $a6b08770e164eced$export$e0d834a0ad870cda({
|
|
|
1071
1070
|
});
|
|
1072
1071
|
$9HbP8$createComputed(() => {
|
|
1073
1072
|
clearTimeout(debounce_timeout);
|
|
1074
|
-
debounce_timeout = setTimeout($9HbP8$
|
|
1073
|
+
debounce_timeout = setTimeout($9HbP8$catchify(range => $9HbP8$untrack(() => {
|
|
1075
1074
|
const default_data = filter_().data;
|
|
1076
1075
|
const filter_object = {
|
|
1077
1076
|
op: filter_().op,
|
|
@@ -1148,20 +1147,20 @@ function $a6b08770e164eced$var$RangeSelector({
|
|
|
1148
1147
|
[_el$22, _co$6] = $9HbP8$getNextMarker(_el$21.nextSibling);
|
|
1149
1148
|
const _ref$ = price_input_1;
|
|
1150
1149
|
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
1151
|
-
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$
|
|
1150
|
+
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$catchify(({
|
|
1152
1151
|
key: key
|
|
1153
1152
|
}) => {
|
|
1154
1153
|
if (key === "Enter") $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
1155
1154
|
}), true);
|
|
1156
|
-
$9HbP8$addEventListener(_el$4, "blur", $9HbP8$
|
|
1155
|
+
$9HbP8$addEventListener(_el$4, "blur", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
1157
1156
|
const _ref$2 = price_input_2;
|
|
1158
1157
|
typeof _ref$2 === "function" ? $9HbP8$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
1159
|
-
$9HbP8$addEventListener(_el$7, "keydown", $9HbP8$
|
|
1158
|
+
$9HbP8$addEventListener(_el$7, "keydown", $9HbP8$catchify(({
|
|
1160
1159
|
key: key
|
|
1161
1160
|
}) => {
|
|
1162
1161
|
if (key === "Enter") $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
1163
1162
|
}), true);
|
|
1164
|
-
$9HbP8$addEventListener(_el$7, "blur", $9HbP8$
|
|
1163
|
+
$9HbP8$addEventListener(_el$7, "blur", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
1165
1164
|
$9HbP8$insert(_el$, $9HbP8$createComponent($a6b08770e164eced$var$ExponentialSlider, {
|
|
1166
1165
|
max_: max_,
|
|
1167
1166
|
min_: min_,
|
|
@@ -1281,7 +1280,7 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
1281
1280
|
return [(() => {
|
|
1282
1281
|
const _el$25 = $9HbP8$getNextElement($a6b08770e164eced$var$_tmpl$2),
|
|
1283
1282
|
_el$26 = _el$25.firstChild;
|
|
1284
|
-
$9HbP8$addEventListener(_el$25, "click", $9HbP8$
|
|
1283
|
+
$9HbP8$addEventListener(_el$25, "click", $9HbP8$catchify(e => {
|
|
1285
1284
|
const rect = clickable_slider.getBoundingClientRect();
|
|
1286
1285
|
const slider_beginning_left = rect.left;
|
|
1287
1286
|
const slider_width = rect.width;
|
|
@@ -1307,12 +1306,12 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
1307
1306
|
range_input_1 = el;
|
|
1308
1307
|
set_value(range_input_1, 0);
|
|
1309
1308
|
}, _el$28);
|
|
1310
|
-
$9HbP8$addEventListener(_el$28, "input", $9HbP8$
|
|
1309
|
+
$9HbP8$addEventListener(_el$28, "input", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
1311
1310
|
$9HbP8$use(el => {
|
|
1312
1311
|
range_input_2 = el;
|
|
1313
1312
|
set_value(range_input_2, 1);
|
|
1314
1313
|
}, _el$29);
|
|
1315
|
-
$9HbP8$addEventListener(_el$29, "input", $9HbP8$
|
|
1314
|
+
$9HbP8$addEventListener(_el$29, "input", $9HbP8$catchify(() => $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
1316
1315
|
$9HbP8$effect(_p$ => {
|
|
1317
1316
|
const _v$7 = i18n_.range_filter_low_point_aria_label_(),
|
|
1318
1317
|
_v$8 = min_(),
|
|
@@ -1383,7 +1382,7 @@ function $0b6bc2f8309efa8a$export$e5c2828934226505({
|
|
|
1383
1382
|
return _el$;
|
|
1384
1383
|
})();
|
|
1385
1384
|
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(false);
|
|
1386
|
-
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$
|
|
1385
|
+
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
1387
1386
|
$9HbP8$createEffect(() => {
|
|
1388
1387
|
if (!is_in_dom())
|
|
1389
1388
|
// wait for us to being in DOM as animations don't work otherwise
|
|
@@ -1536,7 +1535,7 @@ function $1c8cac76cb67e9af$export$a32086fa6616eafd({
|
|
|
1536
1535
|
i18n_: i18n_
|
|
1537
1536
|
}) : []);
|
|
1538
1537
|
});
|
|
1539
|
-
$9HbP8$createEffect($9HbP8$
|
|
1538
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
1540
1539
|
if (!some_top_level_are_hidden()) {
|
|
1541
1540
|
await collapse();
|
|
1542
1541
|
return;
|
|
@@ -1595,7 +1594,7 @@ function $1c8cac76cb67e9af$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1595
1594
|
return value()?.is_checked_?.[0]?.() ?? false;
|
|
1596
1595
|
},
|
|
1597
1596
|
input_ref_: input => {
|
|
1598
|
-
input.addEventListener("change", $9HbP8$
|
|
1597
|
+
input.addEventListener("change", $9HbP8$catchify(() => $9HbP8$untrack(() => {
|
|
1599
1598
|
const {
|
|
1600
1599
|
checked: checked
|
|
1601
1600
|
} = input;
|
|
@@ -1680,7 +1679,7 @@ function $1c8cac76cb67e9af$var$batching_filter_state_syncer(props) {
|
|
|
1680
1679
|
existing_filter_: existing_filter_
|
|
1681
1680
|
} = props;
|
|
1682
1681
|
let sync_queued = false;
|
|
1683
|
-
const sync_fn = $9HbP8$
|
|
1682
|
+
const sync_fn = $9HbP8$catchify(async () => {
|
|
1684
1683
|
sync_queued = false;
|
|
1685
1684
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
1686
1685
|
const set_filter = existing_filter_();
|
|
@@ -1737,13 +1736,13 @@ function $1c8cac76cb67e9af$var$create_updating_signal({
|
|
|
1737
1736
|
$9HbP8$createComputed($9HbP8$on(read_checked, trigger_sync_, {
|
|
1738
1737
|
defer: true
|
|
1739
1738
|
}));
|
|
1740
|
-
$9HbP8$createComputed($9HbP8$on(read_checked, $9HbP8$
|
|
1739
|
+
$9HbP8$createComputed($9HbP8$on(read_checked, $9HbP8$catchify(new_value => {
|
|
1741
1740
|
if (updating_blocked) return;
|
|
1742
1741
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
1743
1742
|
}), {
|
|
1744
1743
|
defer: true
|
|
1745
1744
|
}));
|
|
1746
|
-
$9HbP8$createEffect($9HbP8$on(get_child_object_values, $9HbP8$
|
|
1745
|
+
$9HbP8$createEffect($9HbP8$on(get_child_object_values, $9HbP8$catchify(() => {
|
|
1747
1746
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
1748
1747
|
if (all_kids_checked === read_checked()) return;
|
|
1749
1748
|
updating_blocked = true;
|
|
@@ -1865,7 +1864,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
1865
1864
|
const is_selected = $9HbP8$createMemo(() => existing_filter()?.data?.includes(value().value_));
|
|
1866
1865
|
return (() => {
|
|
1867
1866
|
const _el$2 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$2);
|
|
1868
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
1867
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => {
|
|
1869
1868
|
const set_filter = existing_filter();
|
|
1870
1869
|
const {
|
|
1871
1870
|
field: field,
|
|
@@ -2019,7 +2018,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
2019
2018
|
i18n_: i18n_
|
|
2020
2019
|
}) : []);
|
|
2021
2020
|
});
|
|
2022
|
-
$9HbP8$createEffect($9HbP8$
|
|
2021
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
2023
2022
|
if (!togglable_rest()) {
|
|
2024
2023
|
await collapse();
|
|
2025
2024
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -2034,7 +2033,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
2034
2033
|
[_el$3, _co$] = $9HbP8$getNextMarker(_el$2.nextSibling),
|
|
2035
2034
|
_el$4 = _el$3.nextSibling,
|
|
2036
2035
|
[_el$5, _co$2] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
2037
|
-
$9HbP8$addEventListener(_el$, "change", $9HbP8$
|
|
2036
|
+
$9HbP8$addEventListener(_el$, "change", $9HbP8$catchify(() => {
|
|
2038
2037
|
const set_filter = existing_filter();
|
|
2039
2038
|
const {
|
|
2040
2039
|
field: field,
|
|
@@ -2424,7 +2423,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
2424
2423
|
_el$7 = _el$5.firstChild,
|
|
2425
2424
|
[_el$8, _co$] = $9HbP8$getNextMarker(_el$7.nextSibling),
|
|
2426
2425
|
_el$6 = _el$8.nextSibling;
|
|
2427
|
-
$9HbP8$addEventListener(_el$5, "click", $9HbP8$
|
|
2426
|
+
$9HbP8$addEventListener(_el$5, "click", $9HbP8$catchify(() => {
|
|
2428
2427
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
2429
2428
|
for (const filter of filter_array_()) {
|
|
2430
2429
|
const index = new_filter_obj.findIndex(({
|
|
@@ -2490,7 +2489,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
2490
2489
|
},
|
|
2491
2490
|
get children() {
|
|
2492
2491
|
const _el$25 = $9HbP8$getNextElement($fab07f52c9861732$var$_tmpl$8);
|
|
2493
|
-
$9HbP8$addEventListener(_el$25, "click", $9HbP8$
|
|
2492
|
+
$9HbP8$addEventListener(_el$25, "click", $9HbP8$catchify(() => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
2494
2493
|
user_triggered_: true,
|
|
2495
2494
|
selected_filters_: props.selected_filters_,
|
|
2496
2495
|
i18n_: props.i18n_,
|
|
@@ -2695,7 +2694,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2695
2694
|
const view_less_button_class = $9HbP8$make_random_classname();
|
|
2696
2695
|
const view_more_button_container = $9HbP8$createMemo(() => have_a_view_more_button() && (() => {
|
|
2697
2696
|
const _el$2 = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
2698
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
2697
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => set_rows_visible()(prev => prev + (rows_or_empty_object().rows_per_click ?? 1))), true);
|
|
2699
2698
|
$9HbP8$className(_el$2, `load-more-container ${view_more_button_class}`);
|
|
2700
2699
|
$9HbP8$insert(_el$2, () => rows_or_empty_object().button);
|
|
2701
2700
|
$9HbP8$runHydrationEvents();
|
|
@@ -2704,7 +2703,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2704
2703
|
// 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
|
|
2705
2704
|
const view_less_button_container = $9HbP8$createMemo(() => have_a_view_less_button() && (() => {
|
|
2706
2705
|
const _el$3 = $9HbP8$getNextElement($c8d5ff4524619fcd$var$_tmpl$);
|
|
2707
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
2706
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(() => set_rows_visible()(() => rows_or_empty_object().start_rows ?? 1)), true);
|
|
2708
2707
|
$9HbP8$className(_el$3, `load-less-container ${view_less_button_class}`);
|
|
2709
2708
|
$9HbP8$insert(_el$3, () => rows_or_empty_object().view_less_button);
|
|
2710
2709
|
$9HbP8$runHydrationEvents();
|
|
@@ -2725,7 +2724,7 @@ function $c8d5ff4524619fcd$var$ActualSolidLayout(props, container_element) {
|
|
|
2725
2724
|
return;
|
|
2726
2725
|
}
|
|
2727
2726
|
update_children_count();
|
|
2728
|
-
const mutation_observer = new MutationObserver($9HbP8$
|
|
2727
|
+
const mutation_observer = new MutationObserver($9HbP8$catchify(update_children_count));
|
|
2729
2728
|
mutation_observer.observe(container_element, {
|
|
2730
2729
|
childList: true
|
|
2731
2730
|
});
|
|
@@ -2788,7 +2787,7 @@ async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
2788
2787
|
// Animation broke, close it this time
|
|
2789
2788
|
actually_close();else if (!animation_started && closing_animation) {
|
|
2790
2789
|
animation_started = +new Date();
|
|
2791
|
-
$9HbP8$
|
|
2790
|
+
$9HbP8$catchify(closing_animation)()?.then($9HbP8$catchify(actually_close));
|
|
2792
2791
|
} else actually_close();
|
|
2793
2792
|
};
|
|
2794
2793
|
return search_modal({
|
|
@@ -2829,7 +2828,7 @@ async function $c58717f39bf51647$export$58e808b1db15d3bc({
|
|
|
2829
2828
|
function $ca6f574bd8772184$export$e183a13865960371(params_to_default_value, router_) {
|
|
2830
2829
|
const signals = {};
|
|
2831
2830
|
const entries = Object.entries(params_to_default_value);
|
|
2832
|
-
const event_handler = $9HbP8$
|
|
2831
|
+
const event_handler = $9HbP8$catchify((what_happened, args) => {
|
|
2833
2832
|
if (what_happened == "popstate") $ca6f574bd8772184$var$history_state_change(signals, entries, args.state);
|
|
2834
2833
|
});
|
|
2835
2834
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
@@ -2853,8 +2852,8 @@ function $ca6f574bd8772184$export$e183a13865960371(params_to_default_value, rout
|
|
|
2853
2852
|
});
|
|
2854
2853
|
// 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
|
|
2855
2854
|
(0, $9HbP8$instant_exec_on_suspect_history_change).add(event_handler);
|
|
2856
|
-
$9HbP8$onCleanup($9HbP8$
|
|
2857
|
-
$9HbP8$createEffect($9HbP8$
|
|
2855
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => (0, $9HbP8$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
2856
|
+
$9HbP8$createEffect($9HbP8$catchify(() => $9HbP8$untrack($9HbP8$catchify(() => $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
|
|
2858
2857
|
return signals;
|
|
2859
2858
|
}
|
|
2860
2859
|
function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
|
|
@@ -2967,7 +2966,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
2967
2966
|
return this.#cache_objs[endpoint] ||= {
|
|
2968
2967
|
in_progress_: {},
|
|
2969
2968
|
cache_: {},
|
|
2970
|
-
finalization_registry_: this.#supports_finalization_registry ? new FinalizationRegistry($9HbP8$
|
|
2969
|
+
finalization_registry_: this.#supports_finalization_registry ? new FinalizationRegistry($9HbP8$catchify(key => {
|
|
2971
2970
|
const our_cache = this.#cache_objs[endpoint].cache_;
|
|
2972
2971
|
$9HbP8$dlog("[Search API]: removing", key, "from", our_cache);
|
|
2973
2972
|
delete our_cache[key];
|
|
@@ -3115,11 +3114,11 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
3115
3114
|
result = $e5014ccd0b76d9f4$export$967e966fca9515e(result);
|
|
3116
3115
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
3117
3116
|
resolve_in_progress(result);
|
|
3118
|
-
setTimeout($9HbP8$
|
|
3117
|
+
setTimeout($9HbP8$catchify(() => {
|
|
3119
3118
|
if (this.#supports_finalization_registry) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
3120
3119
|
else
|
|
3121
3120
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
3122
|
-
setTimeout($9HbP8$
|
|
3121
|
+
setTimeout($9HbP8$catchify(() => delete cache_obj.cache_[body]), 300000);
|
|
3123
3122
|
}), 60000 // cache values for at least 60 seconds
|
|
3124
3123
|
);
|
|
3125
3124
|
|
|
@@ -3268,7 +3267,7 @@ function $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
|
|
|
3268
3267
|
});
|
|
3269
3268
|
}
|
|
3270
3269
|
function $8f9120a1ca151e6a$export$205efb947c7ffd78(handler, passive = true) {
|
|
3271
|
-
const catchified_handler = $9HbP8$
|
|
3270
|
+
const catchified_handler = $9HbP8$catchify(handler);
|
|
3272
3271
|
const owner = $9HbP8$getOwner();
|
|
3273
3272
|
// 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.
|
|
3274
3273
|
// Use observer in case that this gets called before body exists
|
|
@@ -3385,7 +3384,7 @@ function $6db49ca163afa2c3$export$83fd5de5504a7a67({
|
|
|
3385
3384
|
fill: "forwards",
|
|
3386
3385
|
easing: "ease-in-out"
|
|
3387
3386
|
});
|
|
3388
|
-
animation.addEventListener("finish", $9HbP8$
|
|
3387
|
+
animation.addEventListener("finish", $9HbP8$catchify(() => {
|
|
3389
3388
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
3390
3389
|
animation = undefined;
|
|
3391
3390
|
element.style.display = "none";
|
|
@@ -3446,7 +3445,7 @@ function $598245ecfe38f34b$export$ef6006467f04ee41({
|
|
|
3446
3445
|
},
|
|
3447
3446
|
get children() {
|
|
3448
3447
|
const _el$3 = $9HbP8$getNextElement($598245ecfe38f34b$var$_tmpl$);
|
|
3449
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
3448
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(() => $9HbP8$runWithOwner(root, () => $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
3450
3449
|
user_triggered_: true,
|
|
3451
3450
|
selected_filters_: selected_filters_,
|
|
3452
3451
|
also_clear_sorting_: false,
|
|
@@ -3578,7 +3577,8 @@ function $056f6ac0a6caa919$export$5e4aed86c12acdd9({
|
|
|
3578
3577
|
last_loaded = +new Date();
|
|
3579
3578
|
is_first_load = true;
|
|
3580
3579
|
});
|
|
3581
|
-
|
|
3580
|
+
// percentage_in_view_ has equals: false so it should update even when set to the same value. That is to make sure that if the user bounces around below the "viewport" of our product listing we still start fetching as soon as is_loading_more becomes false again and we get IntersectionObserverEntries
|
|
3581
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
3582
3582
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3583
3583
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
3584
3584
|
if (!get_last_cursor()) {
|
|
@@ -3649,6 +3649,8 @@ function $0e0b96a8dc1ad492$export$63dd0350f8559dda({
|
|
|
3649
3649
|
// No product card in view and not after last card, assume first card
|
|
3650
3650
|
return 0;
|
|
3651
3651
|
return last / displays_by_key_().size * 100;
|
|
3652
|
+
}, undefined, {
|
|
3653
|
+
equals: false
|
|
3652
3654
|
});
|
|
3653
3655
|
}
|
|
3654
3656
|
|
|
@@ -3748,7 +3750,7 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
3748
3750
|
const target_to_index_map = new Map();
|
|
3749
3751
|
const index_to_target_map_ = new Map();
|
|
3750
3752
|
const currently_intersecting = new Set();
|
|
3751
|
-
const intersection_observer = new IntersectionObserver($9HbP8$
|
|
3753
|
+
const intersection_observer = new IntersectionObserver($9HbP8$catchify(records => {
|
|
3752
3754
|
for (let i = 0; i < records.length; i++) {
|
|
3753
3755
|
const record = records[i];
|
|
3754
3756
|
const {
|
|
@@ -4067,7 +4069,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
|
|
|
4067
4069
|
_el$13 = _el$12.nextSibling,
|
|
4068
4070
|
_el$14 = _el$13.nextSibling,
|
|
4069
4071
|
[_el$15, _co$2] = $9HbP8$getNextMarker(_el$14.nextSibling);
|
|
4070
|
-
$9HbP8$addEventListener(_el$12, "change", $9HbP8$
|
|
4072
|
+
$9HbP8$addEventListener(_el$12, "change", $9HbP8$catchify(() => set_current_sorting(item())));
|
|
4071
4073
|
$9HbP8$setAttribute(_el$12, "name", title_radio_name);
|
|
4072
4074
|
$9HbP8$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
4073
4075
|
$9HbP8$effect(() => _el$12.checked = is_checked());
|
|
@@ -4096,7 +4098,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({
|
|
|
4096
4098
|
_el$19 = _el$18.nextSibling,
|
|
4097
4099
|
_el$20 = _el$19.nextSibling,
|
|
4098
4100
|
[_el$21, _co$3] = $9HbP8$getNextMarker(_el$20.nextSibling);
|
|
4099
|
-
$9HbP8$addEventListener(_el$18, "change", $9HbP8$
|
|
4101
|
+
$9HbP8$addEventListener(_el$18, "change", $9HbP8$catchify(() => set_current_sorting(c => c && {
|
|
4100
4102
|
...c,
|
|
4101
4103
|
order: order_value()
|
|
4102
4104
|
})));
|
|
@@ -4124,7 +4126,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
|
|
|
4124
4126
|
offset: 0
|
|
4125
4127
|
}, 1);
|
|
4126
4128
|
animation.pause();
|
|
4127
|
-
const fn = $9HbP8$
|
|
4129
|
+
const fn = $9HbP8$catchify(animation.play.bind(animation));
|
|
4128
4130
|
cleanup_fns.push(fn);
|
|
4129
4131
|
$9HbP8$onCleanup(fn);
|
|
4130
4132
|
} catch (e) {
|
|
@@ -4135,7 +4137,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
|
|
|
4135
4137
|
const style = element.style;
|
|
4136
4138
|
const original_value = style.overflow;
|
|
4137
4139
|
style.overflow = "hidden";
|
|
4138
|
-
const fn = $9HbP8$
|
|
4140
|
+
const fn = $9HbP8$catchify(() => style.overflow = original_value);
|
|
4139
4141
|
cleanup_fns.push(fn);
|
|
4140
4142
|
$9HbP8$onCleanup(fn);
|
|
4141
4143
|
}
|
|
@@ -4218,7 +4220,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4218
4220
|
set_search_sorting_open(true);
|
|
4219
4221
|
}
|
|
4220
4222
|
});
|
|
4221
|
-
$9HbP8$onCleanup($9HbP8$
|
|
4223
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => {
|
|
4222
4224
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
4223
4225
|
set_search_filters_open(false);
|
|
4224
4226
|
set_search_sorting_open(false);
|
|
@@ -4250,7 +4252,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4250
4252
|
_el$12 = _el$14.nextSibling;
|
|
4251
4253
|
$9HbP8$use(el => {
|
|
4252
4254
|
background = el;
|
|
4253
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4255
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify(() => {
|
|
4254
4256
|
set_background_style("transition", "all 200ms ease-in");
|
|
4255
4257
|
set_background_style("opacity", "1");
|
|
4256
4258
|
}));
|
|
@@ -4258,7 +4260,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4258
4260
|
$9HbP8$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
4259
4261
|
$9HbP8$use(el => {
|
|
4260
4262
|
dismiss_button = el;
|
|
4261
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4263
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify(() => {
|
|
4262
4264
|
set_button_style("transition", "all 200ms ease-in");
|
|
4263
4265
|
set_button_fraction_in(1);
|
|
4264
4266
|
}));
|
|
@@ -4291,7 +4293,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4291
4293
|
let last_move_page_y = start_page_y;
|
|
4292
4294
|
let first_move_was_downwards = false;
|
|
4293
4295
|
let distance_from_start_of_gesture = 0;
|
|
4294
|
-
const end_handler = $9HbP8$
|
|
4296
|
+
const end_handler = $9HbP8$catchify(e => {
|
|
4295
4297
|
const changedTouches = e?.changedTouches;
|
|
4296
4298
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
4297
4299
|
// other finger stopped touch, ignore it
|
|
@@ -4315,7 +4317,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4315
4317
|
modal.removeEventListener("touchcancel", end_handler);
|
|
4316
4318
|
modal.removeEventListener("touchmove", move_handler);
|
|
4317
4319
|
});
|
|
4318
|
-
const move_handler = $9HbP8$
|
|
4320
|
+
const move_handler = $9HbP8$catchify(e => {
|
|
4319
4321
|
const {
|
|
4320
4322
|
changedTouches: changedTouches
|
|
4321
4323
|
} = e;
|
|
@@ -4365,7 +4367,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4365
4367
|
};
|
|
4366
4368
|
$9HbP8$use(el => {
|
|
4367
4369
|
modal = el;
|
|
4368
|
-
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$
|
|
4370
|
+
(0, $9HbP8$observer).wait_for_element(el).then($9HbP8$catchify(() => {
|
|
4369
4371
|
set_modal_style("transition", "all 200ms ease-in");
|
|
4370
4372
|
set_modal_style("transform", "translateY(0)");
|
|
4371
4373
|
}));
|
|
@@ -4447,7 +4449,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4447
4449
|
},
|
|
4448
4450
|
get children() {
|
|
4449
4451
|
const _el$11 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$);
|
|
4450
|
-
$9HbP8$addEventListener(_el$11, "click", $9HbP8$
|
|
4452
|
+
$9HbP8$addEventListener(_el$11, "click", $9HbP8$catchify(() => {
|
|
4451
4453
|
const show_toast = $e9342fb3ac73a54a$export$8895d39404bd2bb1({
|
|
4452
4454
|
user_triggered_: true,
|
|
4453
4455
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -4457,7 +4459,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4457
4459
|
also_clear_sorting_: false,
|
|
4458
4460
|
delay_toast_: true
|
|
4459
4461
|
});
|
|
4460
|
-
cleanup_promise.then($9HbP8$
|
|
4462
|
+
cleanup_promise.then($9HbP8$catchify(show_toast));
|
|
4461
4463
|
}), true);
|
|
4462
4464
|
$9HbP8$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
4463
4465
|
$9HbP8$runHydrationEvents();
|
|
@@ -4530,7 +4532,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4530
4532
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4531
4533
|
const [get_current_sorting_] = current_sorting_;
|
|
4532
4534
|
const [is_small, set_is_small] = $9HbP8$createSignal(false);
|
|
4533
|
-
const dismiss_modal_ = $9HbP8$
|
|
4535
|
+
const dismiss_modal_ = $9HbP8$catchify(() => {
|
|
4534
4536
|
set_filters_open(false);
|
|
4535
4537
|
set_sorting_open(false);
|
|
4536
4538
|
});
|
|
@@ -4611,7 +4613,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4611
4613
|
})());
|
|
4612
4614
|
}
|
|
4613
4615
|
});
|
|
4614
|
-
$9HbP8$
|
|
4616
|
+
$9HbP8$catchify(async () => {
|
|
4615
4617
|
({
|
|
4616
4618
|
open_modal_: open_modal_,
|
|
4617
4619
|
close_modal_: close_modal_
|
|
@@ -4688,7 +4690,7 @@ function $cdea4cf8c5c071ef$var$OpenFiltersButton({
|
|
|
4688
4690
|
return _el$15;
|
|
4689
4691
|
}
|
|
4690
4692
|
}), _el$21, _co$5);
|
|
4691
|
-
$9HbP8$addEventListener(_el$16, "click", $9HbP8$
|
|
4693
|
+
$9HbP8$addEventListener(_el$16, "click", $9HbP8$catchify(() => $9HbP8$batch(() => {
|
|
4692
4694
|
if (search_filters_open_[0]()) {
|
|
4693
4695
|
search_filters_open_[1](false);
|
|
4694
4696
|
return;
|
|
@@ -4749,7 +4751,7 @@ function $cdea4cf8c5c071ef$var$OpenSortingButton({
|
|
|
4749
4751
|
_el$23 = _el$22.firstChild,
|
|
4750
4752
|
_el$24 = _el$23.nextSibling,
|
|
4751
4753
|
[_el$25, _co$6] = $9HbP8$getNextMarker(_el$24.nextSibling);
|
|
4752
|
-
$9HbP8$addEventListener(_el$22, "click", $9HbP8$
|
|
4754
|
+
$9HbP8$addEventListener(_el$22, "click", $9HbP8$catchify(() => $9HbP8$batch(() => {
|
|
4753
4755
|
if (search_sorting_open_[0]()) {
|
|
4754
4756
|
search_sorting_open_[1](false);
|
|
4755
4757
|
return;
|
|
@@ -4856,7 +4858,7 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4856
4858
|
}
|
|
4857
4859
|
old_pos = new_pos;
|
|
4858
4860
|
});
|
|
4859
|
-
const touchstart_handler = $9HbP8$
|
|
4861
|
+
const touchstart_handler = $9HbP8$catchify(e => {
|
|
4860
4862
|
is_in_touch_scroll = true;
|
|
4861
4863
|
if (e.touches.length === 1) {
|
|
4862
4864
|
// 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
|
|
@@ -4864,12 +4866,12 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4864
4866
|
diff_over_second_or_touch = 0;
|
|
4865
4867
|
}
|
|
4866
4868
|
});
|
|
4867
|
-
const touchend_handler = $9HbP8$
|
|
4869
|
+
const touchend_handler = $9HbP8$catchify(e => {
|
|
4868
4870
|
if (e.touches.length === 0)
|
|
4869
4871
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
4870
4872
|
inertia_timeout = setTimeout(
|
|
4871
4873
|
// inertia ends after 500ms (educated guess)
|
|
4872
|
-
$9HbP8$
|
|
4874
|
+
$9HbP8$catchify(() => {
|
|
4873
4875
|
is_in_touch_scroll = false;
|
|
4874
4876
|
diff_over_second_or_touch = 0;
|
|
4875
4877
|
}), 500);
|
|
@@ -4887,9 +4889,9 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4887
4889
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
4888
4890
|
if (!$9HbP8$untrack(modal_is_closed) && everything_closed)
|
|
4889
4891
|
// I think the point of this is to delay the animation a bit IIRC
|
|
4890
|
-
timeout = setTimeout($9HbP8$
|
|
4892
|
+
timeout = setTimeout($9HbP8$catchify(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
4891
4893
|
});
|
|
4892
|
-
$9HbP8$createComputed($9HbP8$
|
|
4894
|
+
$9HbP8$createComputed($9HbP8$catchify(async () => {
|
|
4893
4895
|
const element = sort_and_filter_element_();
|
|
4894
4896
|
if (!element) return;
|
|
4895
4897
|
await (0, $9HbP8$observer).wait_for_element(element);
|
|
@@ -4908,12 +4910,12 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4908
4910
|
_el$5 = _el$4.firstChild,
|
|
4909
4911
|
_el$6 = _el$4.nextSibling,
|
|
4910
4912
|
_el$7 = _el$6.firstChild;
|
|
4911
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
4913
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => {
|
|
4912
4914
|
set_search_filters_open_(true);
|
|
4913
4915
|
set_search_sorting_open_(false);
|
|
4914
4916
|
}), true);
|
|
4915
4917
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $b9bf7fce0ae60241$export$28f6150e232898de), {}));
|
|
4916
|
-
$9HbP8$addEventListener(_el$4, "click", $9HbP8$
|
|
4918
|
+
$9HbP8$addEventListener(_el$4, "click", $9HbP8$catchify(() => {
|
|
4917
4919
|
set_search_filters_open_(false);
|
|
4918
4920
|
set_search_sorting_open_(true);
|
|
4919
4921
|
}), true);
|
|
@@ -4921,7 +4923,7 @@ function $0b0380f75d729d63$var$ActualFloatingButtons({
|
|
|
4921
4923
|
const _c$ = $9HbP8$memo(() => current_sorting_[0]()?.order === "asc");
|
|
4922
4924
|
return () => _c$() ? $9HbP8$createComponent((0, $e1bb71e65e01a3a0$export$da32f7add8a22e86), {}) : $9HbP8$createComponent((0, $05fbe84eb34564ec$export$d10e63059ddb9fd4), {});
|
|
4923
4925
|
})());
|
|
4924
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
4926
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify(() => scrollTo({
|
|
4925
4927
|
top: 0,
|
|
4926
4928
|
behavior: "smooth"
|
|
4927
4929
|
})), true);
|
|
@@ -5162,7 +5164,7 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({
|
|
|
5162
5164
|
},
|
|
5163
5165
|
get children() {
|
|
5164
5166
|
const _el$2 = $9HbP8$getNextElement($dfa5b6f7c5e421df$var$_tmpl$2);
|
|
5165
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
5167
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(ev => router_.navigate_.go_to_({
|
|
5166
5168
|
new_url_: href(),
|
|
5167
5169
|
is_replace_: false,
|
|
5168
5170
|
event_: ev,
|
|
@@ -5234,7 +5236,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5234
5236
|
}];
|
|
5235
5237
|
$9HbP8$createComputed(() => {
|
|
5236
5238
|
if (place_holdey_quicklinks_data()?.[0]?.query_id) {
|
|
5237
|
-
if (last_was_placeholder) queueMicrotask($9HbP8$
|
|
5239
|
+
if (last_was_placeholder) queueMicrotask($9HbP8$catchify(() => {
|
|
5238
5240
|
sliding_element?.scrollTo({
|
|
5239
5241
|
left: 0
|
|
5240
5242
|
}); // for some reason we land one element to the right after placeholder rendering otherwise
|
|
@@ -5301,7 +5303,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5301
5303
|
} else if (!(intersecting_items_object[selected_index()]?.intersectionRatio >= 0.95)) {
|
|
5302
5304
|
// negated larger than to handle left side of comparison being undefined
|
|
5303
5305
|
let done_work = false;
|
|
5304
|
-
$9HbP8$runWithOwner(owner, () => $9HbP8$createComputed($9HbP8$
|
|
5306
|
+
$9HbP8$runWithOwner(owner, () => $9HbP8$createComputed($9HbP8$catchify(() => {
|
|
5305
5307
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
5306
5308
|
const sel_index = selected_index();
|
|
5307
5309
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -5349,7 +5351,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
5349
5351
|
}));
|
|
5350
5352
|
return (() => {
|
|
5351
5353
|
const _el$3 = $9HbP8$getNextElement($06edf3aec9073663$var$_tmpl$3);
|
|
5352
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$
|
|
5354
|
+
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(ev => {
|
|
5353
5355
|
const url = href();
|
|
5354
5356
|
if (is_selected() && !ev.metaKey && !ev.ctrlKey && !ev.button || !url)
|
|
5355
5357
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -5408,7 +5410,7 @@ function $641bba2917fe862b$export$6e49da55e449af7c({
|
|
|
5408
5410
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
5409
5411
|
};
|
|
5410
5412
|
|
|
5411
|
-
$9HbP8$createComputed($9HbP8$
|
|
5413
|
+
$9HbP8$createComputed($9HbP8$catchify(() => {
|
|
5412
5414
|
const last_result = get_last_result_in_viewport_();
|
|
5413
5415
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
5414
5416
|
if (isNaN(last_result)) {
|
|
@@ -5435,7 +5437,7 @@ function $641bba2917fe862b$export$6e49da55e449af7c({
|
|
|
5435
5437
|
set_to_later = last_result;
|
|
5436
5438
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
5437
5439
|
if (timeout) return;
|
|
5438
|
-
timeout = setTimeout($9HbP8$
|
|
5440
|
+
timeout = setTimeout($9HbP8$catchify(() => {
|
|
5439
5441
|
timeout = undefined;
|
|
5440
5442
|
last_time_history_changed = +new Date();
|
|
5441
5443
|
set_min_results_loaded(set_to_later);
|
|
@@ -5478,7 +5480,7 @@ function $587cd61972788655$export$210f130a61ac1e8d(fn) {
|
|
|
5478
5480
|
let last_queued;
|
|
5479
5481
|
let last_value;
|
|
5480
5482
|
let initial_run = true;
|
|
5481
|
-
$9HbP8$createComputed($9HbP8$
|
|
5483
|
+
$9HbP8$createComputed($9HbP8$catchify(async () => {
|
|
5482
5484
|
last_value = fn();
|
|
5483
5485
|
if (initial_run) {
|
|
5484
5486
|
initial_run = false;
|
|
@@ -5538,7 +5540,7 @@ function $e7fce80abe608e01$export$3945d6db2dfd3d12({
|
|
|
5538
5540
|
const handler = () => allow_filter_clearing = false;
|
|
5539
5541
|
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
|
|
5540
5542
|
$9HbP8$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
5541
|
-
$9HbP8$createEffect($9HbP8$on(crumb_data_, $9HbP8$
|
|
5543
|
+
$9HbP8$createEffect($9HbP8$on(crumb_data_, $9HbP8$catchify(new_crumb_data => {
|
|
5542
5544
|
const query_id_of_new_data = query_id_();
|
|
5543
5545
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && query_id_of_new_data !== query_id_when_we_got_previous_data) {
|
|
5544
5546
|
const previous_length = previous_crumb_data.length;
|
|
@@ -5723,7 +5725,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5723
5725
|
});
|
|
5724
5726
|
const [plp_results_] = $9HbP8$createResource(query_base_,
|
|
5725
5727
|
// 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)
|
|
5726
|
-
$9HbP8$
|
|
5728
|
+
$9HbP8$catchify(base_query => $641bba2917fe862b$export$cc42dd29bf655ab6({
|
|
5727
5729
|
id_: $9HbP8$untrack(query_id_),
|
|
5728
5730
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5729
5731
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -5841,7 +5843,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5841
5843
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5842
5844
|
...extra_sort_and_filter_args_
|
|
5843
5845
|
});
|
|
5844
|
-
$9HbP8$
|
|
5846
|
+
$9HbP8$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
5845
5847
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5846
5848
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
5847
5849
|
id_: query_id_,
|
|
@@ -5851,7 +5853,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5851
5853
|
$9HbP8$createComputed(() => {
|
|
5852
5854
|
if (plp_results_.loading) set_can_write_scroll_restoration(false);else if (plp_results_()) set_can_write_scroll_restoration(true);
|
|
5853
5855
|
});
|
|
5854
|
-
$9HbP8$createRenderEffect($9HbP8$
|
|
5856
|
+
$9HbP8$createRenderEffect($9HbP8$catchify(async () => {
|
|
5855
5857
|
const slim = is_slim_();
|
|
5856
5858
|
const only_show_filters_opener = only_show_filters_opener_?.();
|
|
5857
5859
|
const owner = $9HbP8$getOwner();
|
|
@@ -6097,7 +6099,7 @@ function $ccd5db07a3a069c5$export$477caf01aecaeb2a(options) {
|
|
|
6097
6099
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
6098
6100
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
6099
6101
|
const [get_current_href, set_current_href] = $9HbP8$createSignal(globalThis?.location?.href ?? "https://example.com");
|
|
6100
|
-
const history_change_handler = $9HbP8$
|
|
6102
|
+
const history_change_handler = $9HbP8$catchify(() => set_current_href(location.href));
|
|
6101
6103
|
const owner = $9HbP8$getOwner() || $9HbP8$createRoot(() => $9HbP8$getOwner());
|
|
6102
6104
|
const {
|
|
6103
6105
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -6267,7 +6269,7 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
6267
6269
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
6268
6270
|
* @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
|
|
6269
6271
|
*/
|
|
6270
|
-
go_to_: $9HbP8$
|
|
6272
|
+
go_to_: $9HbP8$catchify(async ({
|
|
6271
6273
|
new_url_: raw_new_url,
|
|
6272
6274
|
event_: event_,
|
|
6273
6275
|
force_spa_navigation_: force_spa_navigation_,
|
|
@@ -6688,7 +6690,7 @@ const $a6e23a834336fc19$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
6688
6690
|
|
|
6689
6691
|
const observe_to_signal = (element, setter) => {
|
|
6690
6692
|
const computed_style = getComputedStyle(element);
|
|
6691
|
-
const resize_observer = new ResizeObserver($9HbP8$
|
|
6693
|
+
const resize_observer = new ResizeObserver($9HbP8$catchify(() => {
|
|
6692
6694
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
6693
6695
|
}));
|
|
6694
6696
|
resize_observer.observe(element);
|
|
@@ -6857,7 +6859,7 @@ function $897bd4a76f611b38$export$d757d54550ebfb3d({
|
|
|
6857
6859
|
_el$2 = _el$.firstChild,
|
|
6858
6860
|
_el$4 = _el$2.nextSibling,
|
|
6859
6861
|
[_el$5, _co$] = $9HbP8$getNextMarker(_el$4.nextSibling);
|
|
6860
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
6862
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(e => {
|
|
6861
6863
|
router_.navigate_.go_to_({
|
|
6862
6864
|
new_url_: category_suggestion_().page_url,
|
|
6863
6865
|
is_replace_: false,
|
|
@@ -6915,7 +6917,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6915
6917
|
let input_element;
|
|
6916
6918
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
6917
6919
|
let field_div;
|
|
6918
|
-
$9HbP8$createEffect($9HbP8$
|
|
6920
|
+
$9HbP8$createEffect($9HbP8$catchify(async () => {
|
|
6919
6921
|
if (disabled_) return;
|
|
6920
6922
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
6921
6923
|
await (0, $9HbP8$observer).wait_for_element(input_element);
|
|
@@ -6935,7 +6937,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6935
6937
|
when: on_back_,
|
|
6936
6938
|
get children() {
|
|
6937
6939
|
const _el$2 = $9HbP8$getNextElement($5285d2814d0fac0c$var$_tmpl$);
|
|
6938
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
6940
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(on_back_), true);
|
|
6939
6941
|
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $22e59517c2ec94d3$export$1c641004b5485fed), {}));
|
|
6940
6942
|
$9HbP8$effect(() => $9HbP8$setAttribute(_el$2, "aria-label", i18n_.back_()));
|
|
6941
6943
|
$9HbP8$runHydrationEvents();
|
|
@@ -6951,7 +6953,7 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6951
6953
|
}) => {
|
|
6952
6954
|
// 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).
|
|
6953
6955
|
if (pointerType === "mouse") {
|
|
6954
|
-
const handler = $9HbP8$
|
|
6956
|
+
const handler = $9HbP8$catchify(({
|
|
6955
6957
|
pointerType: pointerType,
|
|
6956
6958
|
target: target
|
|
6957
6959
|
}) => {
|
|
@@ -6964,26 +6966,26 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6964
6966
|
if (owner_of_field_element) $9HbP8$runWithOwner(owner_of_field_element, () => $9HbP8$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
6965
6967
|
}
|
|
6966
6968
|
};
|
|
6967
|
-
$9HbP8$addEventListener(_el$4, "select", $9HbP8$
|
|
6969
|
+
$9HbP8$addEventListener(_el$4, "select", $9HbP8$catchify(() => {
|
|
6968
6970
|
if (disabled_)
|
|
6969
6971
|
// 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
|
|
6970
6972
|
return;
|
|
6971
6973
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
6972
6974
|
// everything was selected, clear filters on next submit on next input
|
|
6973
|
-
input_element.addEventListener("input", $9HbP8$
|
|
6975
|
+
input_element.addEventListener("input", $9HbP8$catchify(() => clear_filters_(false)),
|
|
6974
6976
|
// We don't count this as user triggered since it wasn't explicit
|
|
6975
6977
|
{
|
|
6976
6978
|
once: true
|
|
6977
6979
|
});
|
|
6978
6980
|
}));
|
|
6979
|
-
$9HbP8$addEventListener(_el$4, "input", $9HbP8$
|
|
6981
|
+
$9HbP8$addEventListener(_el$4, "input", $9HbP8$catchify(() => {
|
|
6980
6982
|
const {
|
|
6981
6983
|
value: value
|
|
6982
6984
|
} = input_element;
|
|
6983
6985
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
6984
6986
|
search_field_value_[1](value);
|
|
6985
6987
|
}), true);
|
|
6986
|
-
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$
|
|
6988
|
+
$9HbP8$addEventListener(_el$4, "keydown", $9HbP8$catchify(e => {
|
|
6987
6989
|
if (disabled_) {
|
|
6988
6990
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
6989
6991
|
// 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
|
|
@@ -6993,19 +6995,19 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
6993
6995
|
if (!dont_submit) submit_query_();
|
|
6994
6996
|
}
|
|
6995
6997
|
}), true);
|
|
6996
|
-
const _ref$ = $9HbP8$
|
|
6998
|
+
const _ref$ = $9HbP8$catchify(el => {
|
|
6997
6999
|
input_element = el;
|
|
6998
7000
|
input_field_ref_?.(el);
|
|
6999
7001
|
});
|
|
7000
7002
|
typeof _ref$ === "function" && $9HbP8$use(_ref$, _el$4);
|
|
7001
7003
|
_el$4.classList.toggle("has-adjacent-back-button", !!on_back_);
|
|
7002
|
-
$9HbP8$addEventListener(_el$5, "click", $9HbP8$
|
|
7004
|
+
$9HbP8$addEventListener(_el$5, "click", $9HbP8$catchify(() => {
|
|
7003
7005
|
search_field_value_[1]("");
|
|
7004
7006
|
clear_filters_(true);
|
|
7005
7007
|
if (!disabled_) input_element.focus();
|
|
7006
7008
|
}), true);
|
|
7007
7009
|
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {}));
|
|
7008
|
-
$9HbP8$addEventListener(_el$6, "click", $9HbP8$
|
|
7010
|
+
$9HbP8$addEventListener(_el$6, "click", $9HbP8$catchify(() => submit_query_()), true);
|
|
7009
7011
|
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $16f0ed5ea30d8d9c$export$82eafebb825fc23f), {}));
|
|
7010
7012
|
$9HbP8$effect(_p$ => {
|
|
7011
7013
|
const _v$ = i18n_.search_field_field_aria_label_(),
|
|
@@ -7136,7 +7138,7 @@ function $b6d5529b253681aa$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7136
7138
|
};
|
|
7137
7139
|
let ro;
|
|
7138
7140
|
if (one_axies_only !== "top") {
|
|
7139
|
-
ro = new ResizeObserver($9HbP8$
|
|
7141
|
+
ro = new ResizeObserver($9HbP8$catchify(records => {
|
|
7140
7142
|
records.forEach(({
|
|
7141
7143
|
contentRect: {
|
|
7142
7144
|
width: width
|
|
@@ -7157,10 +7159,10 @@ function $b6d5529b253681aa$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7157
7159
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
7158
7160
|
// this works
|
|
7159
7161
|
// keeping resize just in case
|
|
7160
|
-
const resize_resize_observer = new ResizeObserver($9HbP8$
|
|
7162
|
+
const resize_resize_observer = new ResizeObserver($9HbP8$catchify(align_position));
|
|
7161
7163
|
resize_resize_observer.observe(document.documentElement);
|
|
7162
7164
|
(0, $9HbP8$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
7163
|
-
$9HbP8$onCleanup($9HbP8$
|
|
7165
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => {
|
|
7164
7166
|
ro?.disconnect();
|
|
7165
7167
|
resize_resize_observer.disconnect();
|
|
7166
7168
|
}));
|
|
@@ -7188,7 +7190,7 @@ function $48d7e4a9707315b6$export$e026af0c7b64ea5f({
|
|
|
7188
7190
|
}, {
|
|
7189
7191
|
defer: true
|
|
7190
7192
|
}));
|
|
7191
|
-
$9HbP8$createComputed($9HbP8$on(get_search_query_, $9HbP8$
|
|
7193
|
+
$9HbP8$createComputed($9HbP8$on(get_search_query_, $9HbP8$catchify(() => {
|
|
7192
7194
|
// when a query was submitted, clear filters if clear was pressed before
|
|
7193
7195
|
const clear_value = $9HbP8$untrack(get_clear_filters_next_submit);
|
|
7194
7196
|
if (clear_value) {
|
|
@@ -7213,11 +7215,11 @@ function $21f51c14cb3f586f$export$84bba84a7b837187(read_search_query) {
|
|
|
7213
7215
|
const key = "depict_searches";
|
|
7214
7216
|
const previous_searches = $9HbP8$createSignal(JSON.parse(ls[key] || "[]"));
|
|
7215
7217
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
7216
|
-
$9HbP8$createEffect($9HbP8$
|
|
7218
|
+
$9HbP8$createEffect($9HbP8$catchify(() => {
|
|
7217
7219
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
7218
7220
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
7219
7221
|
}));
|
|
7220
|
-
$9HbP8$createComputed($9HbP8$
|
|
7222
|
+
$9HbP8$createComputed($9HbP8$catchify(() => {
|
|
7221
7223
|
const searches = $9HbP8$untrack(read_previous_searches);
|
|
7222
7224
|
const current_query = read_search_query();
|
|
7223
7225
|
if (!current_query)
|
|
@@ -7322,7 +7324,7 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = (display_or_variant_container,
|
|
|
7322
7324
|
[_el$21, _co$6] = $9HbP8$getNextMarker(_el$20.nextSibling),
|
|
7323
7325
|
_el$22 = _el$21.nextSibling,
|
|
7324
7326
|
[_el$23, _co$7] = $9HbP8$getNextMarker(_el$22.nextSibling);
|
|
7325
|
-
$9HbP8$addEventListener(_el$, "click", $9HbP8$
|
|
7327
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(event_ => router_.navigate_.go_to_({
|
|
7326
7328
|
new_url_: href(),
|
|
7327
7329
|
is_replace_: false,
|
|
7328
7330
|
event_: event_
|
|
@@ -7416,13 +7418,13 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
7416
7418
|
// don't wait if it's the first request
|
|
7417
7419
|
write_current_instant_query(value);
|
|
7418
7420
|
clearTimeout(timeout);
|
|
7419
|
-
timeout = setTimeout($9HbP8$
|
|
7421
|
+
timeout = setTimeout($9HbP8$catchify(() => write_current_instant_query(value)), 250);
|
|
7420
7422
|
});
|
|
7421
7423
|
const [search_results] = $9HbP8$createResource($9HbP8$createMemo(() => ({
|
|
7422
7424
|
tenant: tenant_(),
|
|
7423
7425
|
market: market_(),
|
|
7424
7426
|
query: read_current_instant_query()
|
|
7425
|
-
})), $9HbP8$
|
|
7427
|
+
})), $9HbP8$catchify(variable_data => {
|
|
7426
7428
|
return depict_api_.query({
|
|
7427
7429
|
// 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
|
|
7428
7430
|
limit: $9HbP8$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -7500,7 +7502,7 @@ function $4ceabea39c9a56ac$export$50b90be27d8502d9(el, [get_style_props, set_sty
|
|
|
7500
7502
|
[key]: new_value
|
|
7501
7503
|
});
|
|
7502
7504
|
};
|
|
7503
|
-
const is = new IntersectionObserver($9HbP8$
|
|
7505
|
+
const is = new IntersectionObserver($9HbP8$catchify(_records => {
|
|
7504
7506
|
do_positioning();
|
|
7505
7507
|
}), {
|
|
7506
7508
|
threshold: $9HbP8$buildThresholdList(100)
|
|
@@ -7521,7 +7523,7 @@ function $a36cbc4f68bfd590$export$91c3b6774e8be0f5({
|
|
|
7521
7523
|
const [get_current_href, set_current_href] = $9HbP8$createSignal(location.href);
|
|
7522
7524
|
const [exit_iterable, exitable_iterable] = $9HbP8$make_asyncIterable_exiter((0, $9HbP8$href_change_ipns));
|
|
7523
7525
|
$9HbP8$onCleanup(exit_iterable);
|
|
7524
|
-
$9HbP8$
|
|
7526
|
+
$9HbP8$catchify(async () => {
|
|
7525
7527
|
for await (const href of exitable_iterable)
|
|
7526
7528
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
7527
7529
|
set_current_href(href);
|
|
@@ -7591,18 +7593,18 @@ function $7ad3a93cbe6fa208$export$a146ac6fa8346a25({
|
|
|
7591
7593
|
_el$9 = _el$5.nextSibling;
|
|
7592
7594
|
$9HbP8$use(element => element.addEventListener(
|
|
7593
7595
|
// 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.
|
|
7594
|
-
"click", $9HbP8$
|
|
7596
|
+
"click", $9HbP8$catchify(ev => {
|
|
7595
7597
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
7596
7598
|
// not button 0 or cmd/ctrl click
|
|
7597
7599
|
return;
|
|
7598
7600
|
ev.preventDefault();
|
|
7599
7601
|
submit_query_(item());
|
|
7600
7602
|
})), _el$4);
|
|
7601
|
-
$9HbP8$addEventListener(_el$4, "mouseleave", $9HbP8$
|
|
7602
|
-
$9HbP8$addEventListener(_el$4, "mouseenter", $9HbP8$
|
|
7603
|
+
$9HbP8$addEventListener(_el$4, "mouseleave", $9HbP8$catchify(() => write_selected_index_(undefined)));
|
|
7604
|
+
$9HbP8$addEventListener(_el$4, "mouseenter", $9HbP8$catchify(() => write_selected_index_([0, index])));
|
|
7603
7605
|
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $694b7f90501fea4c$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
7604
7606
|
$9HbP8$insert(_el$6, item);
|
|
7605
|
-
$9HbP8$use(element => element.addEventListener("click", $9HbP8$
|
|
7607
|
+
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify(e => {
|
|
7606
7608
|
// 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.
|
|
7607
7609
|
set_unfiltered_previous_searches_(prev => {
|
|
7608
7610
|
const new_value = [...prev];
|
|
@@ -7772,7 +7774,7 @@ function $cea52f6b24092f05$export$e872e2339fb04a7f({
|
|
|
7772
7774
|
const is_selected = $9HbP8$createMemo(() => read_selected_index_()?.[0] === autocomplete_data_index && read_selected_index_()?.[1] === index);
|
|
7773
7775
|
return (() => {
|
|
7774
7776
|
const _el$ = $9HbP8$getNextElement($cea52f6b24092f05$var$_tmpl$);
|
|
7775
|
-
$9HbP8$use(element => element.addEventListener("click", $9HbP8$
|
|
7777
|
+
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify(ev => {
|
|
7776
7778
|
// 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.
|
|
7777
7779
|
if (is_query()) {
|
|
7778
7780
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
@@ -7788,8 +7790,8 @@ function $cea52f6b24092f05$export$e872e2339fb04a7f({
|
|
|
7788
7790
|
event_: ev
|
|
7789
7791
|
});
|
|
7790
7792
|
})), _el$);
|
|
7791
|
-
$9HbP8$addEventListener(_el$, "mouseleave", $9HbP8$
|
|
7792
|
-
$9HbP8$addEventListener(_el$, "mouseenter", $9HbP8$
|
|
7793
|
+
$9HbP8$addEventListener(_el$, "mouseleave", $9HbP8$catchify(() => write_selected_index_(undefined)));
|
|
7794
|
+
$9HbP8$addEventListener(_el$, "mouseenter", $9HbP8$catchify(() => write_selected_index_([autocomplete_data_index, index])));
|
|
7793
7795
|
$9HbP8$insert(_el$, (() => {
|
|
7794
7796
|
const _c$ = $9HbP8$memo(() => !!is_query());
|
|
7795
7797
|
return () => _c$() ? [$9HbP8$createComponent((0, $9HbP8$Show), {
|
|
@@ -8078,7 +8080,7 @@ function $15f380f0ce2812cc$var$actual_navigation_working_on_fake_data({
|
|
|
8078
8080
|
if (!$9HbP8$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
8079
8081
|
});
|
|
8080
8082
|
const owner = $9HbP8$getOwner();
|
|
8081
|
-
const handler = $9HbP8$
|
|
8083
|
+
const handler = $9HbP8$catchify(({
|
|
8082
8084
|
keyCode: keyCode
|
|
8083
8085
|
}) => $9HbP8$untrack(() => {
|
|
8084
8086
|
const up = keyCode === 38;
|
|
@@ -8138,7 +8140,7 @@ function $15f380f0ce2812cc$var$actual_navigation_working_on_fake_data({
|
|
|
8138
8140
|
const el = element_();
|
|
8139
8141
|
if (!el) return;
|
|
8140
8142
|
el.addEventListener("keyup", handler);
|
|
8141
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8143
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => el.removeEventListener("keyup", handler)));
|
|
8142
8144
|
});
|
|
8143
8145
|
}
|
|
8144
8146
|
function $1ae0eaca6ada9753$export$af0124069c150252({
|
|
@@ -8336,7 +8338,7 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
|
8336
8338
|
if (process.env.GA === "false") return;
|
|
8337
8339
|
let debounce_timeout;
|
|
8338
8340
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
8339
|
-
const send_to_ga = $9HbP8$
|
|
8341
|
+
const send_to_ga = $9HbP8$catchify(() => {
|
|
8340
8342
|
const fake_url = new URL(location.href);
|
|
8341
8343
|
const {
|
|
8342
8344
|
searchParams: searchParams
|
|
@@ -8349,12 +8351,12 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
|
8349
8351
|
$9HbP8$onCleanup(() => {
|
|
8350
8352
|
setTimeout(
|
|
8351
8353
|
// 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
|
|
8352
|
-
$9HbP8$
|
|
8354
|
+
$9HbP8$catchify(() => {
|
|
8353
8355
|
if ($9HbP8$untrack(get_search_query_) === $9HbP8$untrack(get_search_field_value_)) stop_timeout();
|
|
8354
8356
|
}));
|
|
8355
8357
|
});
|
|
8356
8358
|
let first_call = true;
|
|
8357
|
-
$9HbP8$createEffect($9HbP8$
|
|
8359
|
+
$9HbP8$createEffect($9HbP8$catchify(() => {
|
|
8358
8360
|
get_search_field_value_();
|
|
8359
8361
|
if (first_call) {
|
|
8360
8362
|
// we only want to do stuff when it changes
|
|
@@ -8428,7 +8430,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8428
8430
|
const [input_field, set_input_field] = $9HbP8$createSignal();
|
|
8429
8431
|
const [get_search_field_value_] = search_field_value_;
|
|
8430
8432
|
const [get_modal_search_results, set_modal_search_results_] = $9HbP8$createSignal();
|
|
8431
|
-
const close_on_escape_handler = $9HbP8$
|
|
8433
|
+
const close_on_escape_handler = $9HbP8$catchify(({
|
|
8432
8434
|
key: key
|
|
8433
8435
|
}) => {
|
|
8434
8436
|
if (key === "Escape") close_modal_();
|
|
@@ -8442,7 +8444,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8442
8444
|
const DiscoverMoreSection = () => (() => {
|
|
8443
8445
|
const _el$ = $9HbP8$getNextElement($fabfda1230351b1a$var$_tmpl$),
|
|
8444
8446
|
_el$2 = _el$.firstChild;
|
|
8445
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$
|
|
8447
|
+
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => submit_query_()), true);
|
|
8446
8448
|
$9HbP8$insert(_el$2, (() => {
|
|
8447
8449
|
const _c$ = $9HbP8$memo(() => !!get_search_field_value_());
|
|
8448
8450
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -8457,7 +8459,7 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8457
8459
|
if (disable_scrolling_) $aea1edf92433e81e$export$fe334901e8bebd57();
|
|
8458
8460
|
$fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
8459
8461
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
8460
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8462
|
+
$9HbP8$onCleanup($9HbP8$catchify(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
8461
8463
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
8462
8464
|
$c64d28ca12452b21$export$3340fdd8259bd4fd({
|
|
8463
8465
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -8509,13 +8511,13 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
8509
8511
|
[_el$16, _co$5] = $9HbP8$getNextMarker(_el$15.nextSibling),
|
|
8510
8512
|
_el$17 = _el$5.nextSibling,
|
|
8511
8513
|
[_el$18, _co$6] = $9HbP8$getNextMarker(_el$17.nextSibling);
|
|
8512
|
-
$9HbP8$addEventListener(_el$4, "click", $9HbP8$
|
|
8514
|
+
$9HbP8$addEventListener(_el$4, "click", $9HbP8$catchify(({
|
|
8513
8515
|
target: target
|
|
8514
8516
|
}) => {
|
|
8515
8517
|
if (target === modal_element) close_modal_();
|
|
8516
8518
|
}), true);
|
|
8517
8519
|
$9HbP8$insert(_el$5, search_field, _el$14, _co$4);
|
|
8518
|
-
$9HbP8$use(el => $9HbP8$
|
|
8520
|
+
$9HbP8$use(el => $9HbP8$catchify((0, $4ceabea39c9a56ac$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
8519
8521
|
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
8520
8522
|
severity_: "error",
|
|
8521
8523
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -8614,8 +8616,8 @@ function $fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
8614
8616
|
let set_initial_values = false;
|
|
8615
8617
|
let old_pathname;
|
|
8616
8618
|
let old_param_value;
|
|
8617
|
-
$9HbP8$onCleanup($9HbP8$
|
|
8618
|
-
$9HbP8$
|
|
8619
|
+
$9HbP8$onCleanup($9HbP8$catchify(exit_iterable));
|
|
8620
|
+
$9HbP8$catchify(async () => {
|
|
8619
8621
|
for await (const href of exitable_iterable) {
|
|
8620
8622
|
const u_o = new URL(href);
|
|
8621
8623
|
const new_pathname = u_o.pathname;
|
|
@@ -8687,7 +8689,7 @@ function $f8c929beb82c512b$export$9dd50d35b9d94fdf({
|
|
|
8687
8689
|
number_of_results_: number_of_results_,
|
|
8688
8690
|
type: type
|
|
8689
8691
|
}) {
|
|
8690
|
-
const contents = $9HbP8$createMemo($9HbP8$
|
|
8692
|
+
const contents = $9HbP8$createMemo($9HbP8$catchify(() => {
|
|
8691
8693
|
const q = get_search_query_();
|
|
8692
8694
|
return i18n_[type === $f8c929beb82c512b$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
8693
8695
|
const _el$ = $9HbP8$getNextElement($f8c929beb82c512b$var$_tmpl$);
|
|
@@ -8961,7 +8963,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
8961
8963
|
if (!result) return;
|
|
8962
8964
|
return {
|
|
8963
8965
|
href: result.page_url,
|
|
8964
|
-
onClick: $9HbP8$
|
|
8966
|
+
onClick: $9HbP8$catchify(ev => router_.navigate_.go_to_({
|
|
8965
8967
|
new_url_: result.page_url,
|
|
8966
8968
|
is_replace_: false,
|
|
8967
8969
|
event_: ev
|
|
@@ -9267,7 +9269,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9267
9269
|
} : {})
|
|
9268
9270
|
};
|
|
9269
9271
|
});
|
|
9270
|
-
const [search_results_] = $9HbP8$createResource(search_query_base_, $9HbP8$
|
|
9272
|
+
const [search_results_] = $9HbP8$createResource(search_query_base_, $9HbP8$catchify(async base_query => {
|
|
9271
9273
|
set_all_products_loaded(false);
|
|
9272
9274
|
// only first page of results
|
|
9273
9275
|
return await $641bba2917fe862b$export$cc42dd29bf655ab6({
|
|
@@ -9295,7 +9297,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9295
9297
|
const available_filters_ = $9HbP8$createMemo(() => search_results_()?.filters);
|
|
9296
9298
|
const modal_body_style = $9HbP8$createSignal({});
|
|
9297
9299
|
const [get_search_field_elements, set_search_field_elements] = $9HbP8$createSignal();
|
|
9298
|
-
const SafeSearchField = $9HbP8$
|
|
9300
|
+
const SafeSearchField = $9HbP8$catchify((0, $5285d2814d0fac0c$export$b94867ecbd698f21));
|
|
9299
9301
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
|
|
9300
9302
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
|
|
9301
9303
|
const n_hits = $9HbP8$createMemo(() => search_results_()?.n_hits);
|
|
@@ -9352,7 +9354,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9352
9354
|
})()));
|
|
9353
9355
|
}).remove);
|
|
9354
9356
|
$2ab89d64b7f1d5ef$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
9355
|
-
$9HbP8$
|
|
9357
|
+
$9HbP8$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
9356
9358
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
9357
9359
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
9358
9360
|
id_: get_search_query_,
|
|
@@ -9390,8 +9392,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9390
9392
|
if (!search_field) break add_input_field;
|
|
9391
9393
|
modal_body_style[1]({});
|
|
9392
9394
|
modal_body_style_ref_?.(modal_body_style);
|
|
9393
|
-
const align_position = $9HbP8$
|
|
9394
|
-
div_with_field_class.addEventListener("click", $9HbP8$
|
|
9395
|
+
const align_position = $9HbP8$catchify((0, $b6d5529b253681aa$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
9396
|
+
div_with_field_class.addEventListener("click", $9HbP8$catchify(e => {
|
|
9395
9397
|
const target = e.target;
|
|
9396
9398
|
const sel = ".submit";
|
|
9397
9399
|
if (target?.matches?.(sel) || target?.closest?.(sel))
|
|
@@ -9583,7 +9585,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9583
9585
|
function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
9584
9586
|
const style_element = document.createElement("style");
|
|
9585
9587
|
document.head.append(style_element);
|
|
9586
|
-
const resize_observer = new ResizeObserver($9HbP8$
|
|
9588
|
+
const resize_observer = new ResizeObserver($9HbP8$catchify(() => {
|
|
9587
9589
|
const styles = $926b1b5ba2239356$export$1233ca167bf71f9a({
|
|
9588
9590
|
".depict.plp .depict-search-modal .search-field": {
|
|
9589
9591
|
"height": `${aligner?.clientHeight}px`
|
|
@@ -9746,7 +9748,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
|
|
|
9746
9748
|
selected_filters_: selected_filters_
|
|
9747
9749
|
});
|
|
9748
9750
|
$90980bd87c9960f9$export$5162a71f252e6122();
|
|
9749
|
-
$9HbP8$
|
|
9751
|
+
$9HbP8$catchify(async () => {
|
|
9750
9752
|
const {
|
|
9751
9753
|
open_modal_: open_modal_,
|
|
9752
9754
|
close_modal_: close_modal_
|
|
@@ -10013,7 +10015,7 @@ function $806c97b931758897$export$316f6f283ae64765(props) {
|
|
|
10013
10015
|
const style_props_ = $9HbP8$createSignal({
|
|
10014
10016
|
position: "fixed"
|
|
10015
10017
|
});
|
|
10016
|
-
const defaultHandler = $9HbP8$
|
|
10018
|
+
const defaultHandler = $9HbP8$catchify(() => {
|
|
10017
10019
|
// 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.
|
|
10018
10020
|
const selected_text_range_ = [input_element.selectionStart, input_element.selectionEnd];
|
|
10019
10021
|
const {
|
|
@@ -10105,7 +10107,7 @@ const $6891c018a834cfdd$export$d86a33413558014e = openModalParams => {
|
|
|
10105
10107
|
}, dispose_aligner];
|
|
10106
10108
|
};
|
|
10107
10109
|
function $6e8944558258054f$export$d0596b5cae35ad4(open_search) {
|
|
10108
|
-
const handler = $9HbP8$
|
|
10110
|
+
const handler = $9HbP8$catchify(e => {
|
|
10109
10111
|
const {
|
|
10110
10112
|
key: key,
|
|
10111
10113
|
target: target
|
|
@@ -10124,7 +10126,7 @@ function $6e8944558258054f$export$d0596b5cae35ad4(open_search) {
|
|
|
10124
10126
|
function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
10125
10127
|
let old_url;
|
|
10126
10128
|
let disconnect_link_observer;
|
|
10127
|
-
const link_handler = $9HbP8$
|
|
10129
|
+
const link_handler = $9HbP8$catchify(e => {
|
|
10128
10130
|
const link = e.currentTarget || e.target;
|
|
10129
10131
|
if (link.href === old_url) {
|
|
10130
10132
|
history.pushState(history.state, "", link.href);
|
|
@@ -10133,7 +10135,7 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
10133
10135
|
});
|
|
10134
10136
|
let remove_added_listeners;
|
|
10135
10137
|
let resolve_remove_added_listeners;
|
|
10136
|
-
pr.addEventListener("open", $9HbP8$
|
|
10138
|
+
pr.addEventListener("open", $9HbP8$catchify(() => {
|
|
10137
10139
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
10138
10140
|
disconnect_link_observer = (0, $9HbP8$observer).onexists("a", async ({
|
|
10139
10141
|
element: element
|
|
@@ -10143,11 +10145,11 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
10143
10145
|
element.removeEventListener("click", link_handler);
|
|
10144
10146
|
});
|
|
10145
10147
|
}));
|
|
10146
|
-
pr.addEventListener("close", $9HbP8$
|
|
10148
|
+
pr.addEventListener("close", $9HbP8$catchify(() => {
|
|
10147
10149
|
disconnect_link_observer?.();
|
|
10148
10150
|
resolve_remove_added_listeners?.();
|
|
10149
10151
|
}));
|
|
10150
|
-
$9HbP8$
|
|
10152
|
+
$9HbP8$catchify(async () => {
|
|
10151
10153
|
for await (const href of (0, $9HbP8$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
10152
10154
|
})();
|
|
10153
10155
|
}
|
|
@@ -10159,7 +10161,7 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10159
10161
|
static #reverting_permitted = true;
|
|
10160
10162
|
static #visited_urls = (() => {
|
|
10161
10163
|
// 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).
|
|
10162
|
-
$9HbP8$
|
|
10164
|
+
$9HbP8$catchify(async () => {
|
|
10163
10165
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
10164
10166
|
// 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).
|
|
10165
10167
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|
|
@@ -10177,7 +10179,7 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10177
10179
|
async #listen() {
|
|
10178
10180
|
const [exit_ipns, exitable_ipns] = $9HbP8$make_asyncIterable_exiter((0, $9HbP8$href_change_ipns));
|
|
10179
10181
|
this.#stop_listening = exit_ipns;
|
|
10180
|
-
const caught_page_check_fn = $9HbP8$
|
|
10182
|
+
const caught_page_check_fn = $9HbP8$catchify(this.is_page_, "page check failed");
|
|
10181
10183
|
for await (const href of exitable_ipns) {
|
|
10182
10184
|
const url = new URL(href);
|
|
10183
10185
|
if (!caught_page_check_fn(url)) {
|
|
@@ -10195,17 +10197,17 @@ class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
10195
10197
|
this.addEventListener("close", dispose, {
|
|
10196
10198
|
once: true
|
|
10197
10199
|
});
|
|
10198
|
-
return $9HbP8$
|
|
10200
|
+
return $9HbP8$catchify(this.render_, "rendering failed")() || [];
|
|
10199
10201
|
});
|
|
10200
10202
|
}
|
|
10201
|
-
#unload = $9HbP8$
|
|
10203
|
+
#unload = $9HbP8$catchify(() => {
|
|
10202
10204
|
if (!this.#is_open) return;
|
|
10203
10205
|
this.#disconnect_observer?.();
|
|
10204
10206
|
if ($753e9b2889a47c89$export$3ccaa27d81dd8556.#reverting_permitted) while (this.#revert_fns.length) this.#revert_fns.pop()?.();
|
|
10205
10207
|
this.#is_open = false;
|
|
10206
10208
|
this.dispatchEvent(new CustomEvent("close"));
|
|
10207
10209
|
}, "failed to close page");
|
|
10208
|
-
#load = $9HbP8$
|
|
10210
|
+
#load = $9HbP8$catchify(async els => {
|
|
10209
10211
|
this.#is_open = true;
|
|
10210
10212
|
// So that #load doesn't get called again
|
|
10211
10213
|
let set_should_stay_inserted;
|