@depict-ai/ui 1.4.20 → 1.4.21
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 +2 -3
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +156 -157
- package/latest/index.cjs +2 -3
- package/latest/index.d.ts +1 -1
- package/latest/index.js +156 -157
- package/package.json +1 -1
- package/server/ES10/index.cjs +2 -3
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +97 -98
- package/server/latest/index.cjs +2 -3
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +97 -98
package/server/ES10/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, catchify as $b8hua$catchify, is_safari as $b8hua$is_safari, report as $b8hua$report, observer as $b8hua$observer, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, make_random_classname as $b8hua$make_random_classname, dlog as $b8hua$dlog, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, javascript_media_query as $b8hua$javascript_media_query, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, fetch_recs as $b8hua$fetch_recs, snakeCasifyObject as $b8hua$snakeCasifyObject, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, base_url as $b8hua$base_url, get_depict_id as $b8hua$get_depict_id, get_user_id as $b8hua$get_user_id, get_session_id as $b8hua$get_session_id, make_url_with_query_params as $b8hua$make_url_with_query_params, fetch_retry as $b8hua$fetch_retry, add_version_query_params as $b8hua$add_version_query_params, dwarn as $b8hua$dwarn, sort_obj as $b8hua$sort_obj, edit_current_page_meta_tags as $b8hua$edit_current_page_meta_tags, use_href_accessor as $b8hua$use_href_accessor, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, ContainedImage as $b8hua$ContainedImage, deparallelize_no_drop as $b8hua$deparallelize_no_drop, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { ssrElement as $b8hua$ssrElement, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, ssrClassList as $b8hua$ssrClassList, escape as $b8hua$escape, insert as $b8hua$insert, createComponent as $b8hua$createComponent, ssrAttribute as $b8hua$ssrAttribute, Dynamic as $b8hua$Dynamic, isServer as $b8hua$isServer, mergeProps as $b8hua$mergeProps } from "solid-js/web";
|
|
3
|
-
import { catchify as $b8hua$catchify } from "@depict-ai/utilishared/latest/ES10";
|
|
4
3
|
import { createSignal as $b8hua$createSignal, onCleanup as $b8hua$onCleanup, ErrorBoundary as $b8hua$ErrorBoundary, createMemo as $b8hua$createMemo, untrack as $b8hua$untrack, createEffect as $b8hua$createEffect, getOwner as $b8hua$getOwner, Show as $b8hua$Show, Index as $b8hua$Index, For as $b8hua$For, createRenderEffect as $b8hua$createRenderEffect, createComputed as $b8hua$createComputed, on as $b8hua$on, batch as $b8hua$batch, createRoot as $b8hua$createRoot, runWithOwner as $b8hua$runWithOwner, createResource as $b8hua$createResource, createReaction as $b8hua$createReaction, Suspense as $b8hua$Suspense } from "solid-js";
|
|
5
4
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
6
5
|
import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -9,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
9
8
|
/*! Depict.ai search and product listing SDK */
|
|
10
9
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
11
10
|
register_es_version("ui", "ES10");
|
|
12
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.21";
|
|
13
12
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
14
13
|
const [size, setSize] = $b8hua$createSignal(0);
|
|
15
14
|
const resizeObserver = new ResizeObserver($b8hua$catchify(records => {
|
|
@@ -139,15 +138,15 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
139
138
|
$b8hua$insert(details_, [summary_, $b8hua$createComponent(ExpandingContainer, {
|
|
140
139
|
children: children
|
|
141
140
|
})], null);
|
|
142
|
-
if (!$b8hua$untrack(is_in_dom)) (0, $b8hua$observer).wait_for_element(details_).then($b8hua$
|
|
143
|
-
$b8hua$createEffect($b8hua$
|
|
141
|
+
if (!$b8hua$untrack(is_in_dom)) (0, $b8hua$observer).wait_for_element(details_).then($b8hua$catchify(() => set_is_in_dom(true)));
|
|
142
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
144
143
|
const is_open = is_open_memo();
|
|
145
144
|
if (!is_in_dom())
|
|
146
145
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
147
146
|
return;
|
|
148
147
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
149
148
|
timeout_started = true;
|
|
150
|
-
setTimeout($b8hua$
|
|
149
|
+
setTimeout($b8hua$catchify(() => fresh_component = false));
|
|
151
150
|
}
|
|
152
151
|
if (is_open) {
|
|
153
152
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -155,10 +154,10 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
155
154
|
await expand(0, do_duration);
|
|
156
155
|
} else {
|
|
157
156
|
const animation = await collapse();
|
|
158
|
-
animation === null || animation === void 0 || animation.addEventListener("finish", $b8hua$
|
|
157
|
+
animation === null || animation === void 0 || animation.addEventListener("finish", $b8hua$catchify(() => details_.open = false));
|
|
159
158
|
}
|
|
160
159
|
}));
|
|
161
|
-
details_.addEventListener("toggle", $b8hua$
|
|
160
|
+
details_.addEventListener("toggle", $b8hua$catchify(() => {
|
|
162
161
|
const {
|
|
163
162
|
open: open
|
|
164
163
|
} = details_;
|
|
@@ -168,11 +167,11 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
168
167
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
169
168
|
);
|
|
170
169
|
|
|
171
|
-
summary_.addEventListener("click", $b8hua$
|
|
170
|
+
summary_.addEventListener("click", $b8hua$catchify(ev => {
|
|
172
171
|
ev.preventDefault();
|
|
173
172
|
toggle();
|
|
174
173
|
}));
|
|
175
|
-
summary_.addEventListener("keydown", $b8hua$
|
|
174
|
+
summary_.addEventListener("keydown", $b8hua$catchify(ev => {
|
|
176
175
|
const {
|
|
177
176
|
key: key
|
|
178
177
|
} = ev;
|
|
@@ -451,9 +450,9 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
451
450
|
});
|
|
452
451
|
const [is_in_dom, set_is_in_dom] = $b8hua$createSignal(document.documentElement.contains(outmost_element));
|
|
453
452
|
const hidden = $b8hua$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
454
|
-
if (!$b8hua$untrack(is_in_dom)) (0, $b8hua$observer).wait_for_element(outmost_element).then($b8hua$
|
|
453
|
+
if (!$b8hua$untrack(is_in_dom)) (0, $b8hua$observer).wait_for_element(outmost_element).then($b8hua$catchify(() => set_is_in_dom(true)));
|
|
455
454
|
outmost_element.classList.add("selected-filters");
|
|
456
|
-
$b8hua$createEffect($b8hua$
|
|
455
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
457
456
|
if (!is_in_dom())
|
|
458
457
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
459
458
|
return;
|
|
@@ -587,7 +586,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
587
586
|
i18n_: i18n_
|
|
588
587
|
}) : []);
|
|
589
588
|
});
|
|
590
|
-
$b8hua$createEffect($b8hua$
|
|
589
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
591
590
|
if (!togglable_rest()) {
|
|
592
591
|
await collapse();
|
|
593
592
|
return;
|
|
@@ -683,7 +682,7 @@ function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
|
|
|
683
682
|
});
|
|
684
683
|
$b8hua$createComputed(() => {
|
|
685
684
|
clearTimeout(debounce_timeout);
|
|
686
|
-
debounce_timeout = setTimeout($b8hua$
|
|
685
|
+
debounce_timeout = setTimeout($b8hua$catchify(range => $b8hua$untrack(() => {
|
|
687
686
|
const default_data = filter_().data;
|
|
688
687
|
const filter_object = {
|
|
689
688
|
op: filter_().op,
|
|
@@ -861,7 +860,7 @@ function $457279ff15864cb9$export$e5c2828934226505(_ref) {
|
|
|
861
860
|
};
|
|
862
861
|
const outer_div = $b8hua$ssr($457279ff15864cb9$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", expanded_() ? $b8hua$escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $b8hua$escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
863
862
|
const [is_in_dom, set_is_in_dom] = $b8hua$createSignal(false);
|
|
864
|
-
(0, $b8hua$observer).wait_for_element(outer_div).then($b8hua$
|
|
863
|
+
(0, $b8hua$observer).wait_for_element(outer_div).then($b8hua$catchify(() => set_is_in_dom(true)));
|
|
865
864
|
$b8hua$createEffect(() => {
|
|
866
865
|
if (!is_in_dom())
|
|
867
866
|
// wait for us to being in DOM as animations don't work otherwise
|
|
@@ -1019,7 +1018,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
1019
1018
|
i18n_: i18n_
|
|
1020
1019
|
}) : []);
|
|
1021
1020
|
});
|
|
1022
|
-
$b8hua$createEffect($b8hua$
|
|
1021
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
1023
1022
|
if (!some_top_level_are_hidden()) {
|
|
1024
1023
|
await collapse();
|
|
1025
1024
|
return;
|
|
@@ -1068,7 +1067,7 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1068
1067
|
return (_value$is_checked_$ = (_value6 = value()) === null || _value6 === void 0 ? void 0 : (_value6$is_checked_ = _value6.is_checked_) === null || _value6$is_checked_ === void 0 ? void 0 : (_value6$is_checked_$ = _value6$is_checked_[0]) === null || _value6$is_checked_$ === void 0 ? void 0 : _value6$is_checked_$.call(_value6$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
1069
1068
|
},
|
|
1070
1069
|
input_ref_: input => {
|
|
1071
|
-
input.addEventListener("change", $b8hua$
|
|
1070
|
+
input.addEventListener("change", $b8hua$catchify(() => $b8hua$untrack(() => {
|
|
1072
1071
|
var _value8;
|
|
1073
1072
|
const {
|
|
1074
1073
|
checked: checked
|
|
@@ -1152,7 +1151,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
1152
1151
|
existing_filter_: existing_filter_
|
|
1153
1152
|
} = props;
|
|
1154
1153
|
let sync_queued = false;
|
|
1155
|
-
const sync_fn = $b8hua$
|
|
1154
|
+
const sync_fn = $b8hua$catchify(async () => {
|
|
1156
1155
|
sync_queued = false;
|
|
1157
1156
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
1158
1157
|
const set_filter = existing_filter_();
|
|
@@ -1214,13 +1213,13 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
1214
1213
|
$b8hua$createComputed($b8hua$on(read_checked, trigger_sync_, {
|
|
1215
1214
|
defer: true
|
|
1216
1215
|
}));
|
|
1217
|
-
$b8hua$createComputed($b8hua$on(read_checked, $b8hua$
|
|
1216
|
+
$b8hua$createComputed($b8hua$on(read_checked, $b8hua$catchify(new_value => {
|
|
1218
1217
|
if (updating_blocked) return;
|
|
1219
1218
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
1220
1219
|
}), {
|
|
1221
1220
|
defer: true
|
|
1222
1221
|
}));
|
|
1223
|
-
$b8hua$createEffect($b8hua$on(get_child_object_values, $b8hua$
|
|
1222
|
+
$b8hua$createEffect($b8hua$on(get_child_object_values, $b8hua$catchify(() => {
|
|
1224
1223
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
1225
1224
|
if (all_kids_checked === read_checked()) return;
|
|
1226
1225
|
updating_blocked = true;
|
|
@@ -1490,7 +1489,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
1490
1489
|
i18n_: i18n_
|
|
1491
1490
|
}) : []);
|
|
1492
1491
|
});
|
|
1493
|
-
$b8hua$createEffect($b8hua$
|
|
1492
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
1494
1493
|
if (!togglable_rest()) {
|
|
1495
1494
|
await collapse();
|
|
1496
1495
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -2110,7 +2109,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2110
2109
|
return;
|
|
2111
2110
|
}
|
|
2112
2111
|
update_children_count();
|
|
2113
|
-
const mutation_observer = new MutationObserver($b8hua$
|
|
2112
|
+
const mutation_observer = new MutationObserver($b8hua$catchify(update_children_count));
|
|
2114
2113
|
mutation_observer.observe(container_element, {
|
|
2115
2114
|
childList: true
|
|
2116
2115
|
});
|
|
@@ -2171,7 +2170,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
2171
2170
|
actually_close();else if (!animation_started && closing_animation) {
|
|
2172
2171
|
var _catchify;
|
|
2173
2172
|
animation_started = +new Date();
|
|
2174
|
-
(_catchify = $b8hua$
|
|
2173
|
+
(_catchify = $b8hua$catchify(closing_animation)()) === null || _catchify === void 0 || _catchify.then($b8hua$catchify(actually_close));
|
|
2175
2174
|
} else actually_close();
|
|
2176
2175
|
};
|
|
2177
2176
|
return search_modal({
|
|
@@ -2213,7 +2212,7 @@ async function $5c5732ef44f05b26$export$58e808b1db15d3bc(_ref) {
|
|
|
2213
2212
|
function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
|
|
2214
2213
|
const signals = {};
|
|
2215
2214
|
const entries = Object.entries(params_to_default_value);
|
|
2216
|
-
const event_handler = $b8hua$
|
|
2215
|
+
const event_handler = $b8hua$catchify((what_happened, args) => {
|
|
2217
2216
|
if (what_happened == "popstate") $972f6bce0f9d61be$var$history_state_change(signals, entries, args.state);
|
|
2218
2217
|
});
|
|
2219
2218
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
@@ -2238,8 +2237,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
2238
2237
|
});
|
|
2239
2238
|
// 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
|
|
2240
2239
|
(0, $b8hua$instant_exec_on_suspect_history_change).add(event_handler);
|
|
2241
|
-
$b8hua$onCleanup($b8hua$
|
|
2242
|
-
$b8hua$createEffect($b8hua$
|
|
2240
|
+
$b8hua$onCleanup($b8hua$catchify(() => (0, $b8hua$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
2241
|
+
$b8hua$createEffect($b8hua$catchify(() => $b8hua$untrack($b8hua$catchify(() => $972f6bce0f9d61be$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
|
|
2243
2242
|
return signals;
|
|
2244
2243
|
}
|
|
2245
2244
|
function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
@@ -2493,7 +2492,7 @@ function $284849364a6ef73a$var$_get_cache_obj_for_endpoint2(endpoint) {
|
|
|
2493
2492
|
return (_classPrivateFieldGet5 = $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs))[endpoint] || (_classPrivateFieldGet5[endpoint] = {
|
|
2494
2493
|
in_progress_: {},
|
|
2495
2494
|
cache_: {},
|
|
2496
|
-
finalization_registry_: $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($b8hua$
|
|
2495
|
+
finalization_registry_: $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($b8hua$catchify(key => {
|
|
2497
2496
|
const our_cache = $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs)[endpoint].cache_;
|
|
2498
2497
|
$b8hua$dlog("[Search API]: removing", key, "from", our_cache);
|
|
2499
2498
|
delete our_cache[key];
|
|
@@ -2630,11 +2629,11 @@ async function $284849364a6ef73a$var$_cached_post_request2(endpoint, input_req,
|
|
|
2630
2629
|
result = $ed0fefda39a0f15d$export$967e966fca9515e(result);
|
|
2631
2630
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
2632
2631
|
resolve_in_progress(result);
|
|
2633
|
-
setTimeout($b8hua$
|
|
2632
|
+
setTimeout($b8hua$catchify(() => {
|
|
2634
2633
|
if ($b8hua$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry)) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
2635
2634
|
else
|
|
2636
2635
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
2637
|
-
setTimeout($b8hua$
|
|
2636
|
+
setTimeout($b8hua$catchify(() => delete cache_obj.cache_[body]), 300000);
|
|
2638
2637
|
}), 60000 // cache values for at least 60 seconds
|
|
2639
2638
|
);
|
|
2640
2639
|
|
|
@@ -2725,7 +2724,7 @@ function $43fbdca0f726a34b$export$92f2da32c6e7e7ee(_ref) {
|
|
|
2725
2724
|
}
|
|
2726
2725
|
function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
|
|
2727
2726
|
let passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2728
|
-
const catchified_handler = $b8hua$
|
|
2727
|
+
const catchified_handler = $b8hua$catchify(handler);
|
|
2729
2728
|
const owner = $b8hua$getOwner();
|
|
2730
2729
|
// 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.
|
|
2731
2730
|
// Use observer in case that this gets called before body exists
|
|
@@ -2844,7 +2843,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
|
|
|
2844
2843
|
fill: "forwards",
|
|
2845
2844
|
easing: "ease-in-out"
|
|
2846
2845
|
});
|
|
2847
|
-
animation.addEventListener("finish", $b8hua$
|
|
2846
|
+
animation.addEventListener("finish", $b8hua$catchify(() => {
|
|
2848
2847
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
2849
2848
|
animation = undefined;
|
|
2850
2849
|
element.style.display = "none";
|
|
@@ -3008,7 +3007,7 @@ function $6d2962bc9370f884$export$5e4aed86c12acdd9(_ref) {
|
|
|
3008
3007
|
last_loaded = +new Date();
|
|
3009
3008
|
is_first_load = true;
|
|
3010
3009
|
});
|
|
3011
|
-
$b8hua$createEffect($b8hua$
|
|
3010
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
3012
3011
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3013
3012
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
3014
3013
|
if (!get_last_cursor()) {
|
|
@@ -3181,7 +3180,7 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
3181
3180
|
const target_to_index_map = new Map();
|
|
3182
3181
|
const index_to_target_map_ = new Map();
|
|
3183
3182
|
const currently_intersecting = new Set();
|
|
3184
|
-
const intersection_observer = new IntersectionObserver($b8hua$
|
|
3183
|
+
const intersection_observer = new IntersectionObserver($b8hua$catchify(records => {
|
|
3185
3184
|
for (let i = 0; i < records.length; i++) {
|
|
3186
3185
|
const record = records[i];
|
|
3187
3186
|
const {
|
|
@@ -3524,7 +3523,7 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
3524
3523
|
offset: 0
|
|
3525
3524
|
}, 1);
|
|
3526
3525
|
animation.pause();
|
|
3527
|
-
const fn = $b8hua$
|
|
3526
|
+
const fn = $b8hua$catchify(animation.play.bind(animation));
|
|
3528
3527
|
cleanup_fns.push(fn);
|
|
3529
3528
|
$b8hua$onCleanup(fn);
|
|
3530
3529
|
} catch (e) {
|
|
@@ -3535,7 +3534,7 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
3535
3534
|
const style = element.style;
|
|
3536
3535
|
const original_value = style.overflow;
|
|
3537
3536
|
style.overflow = "hidden";
|
|
3538
|
-
const fn = $b8hua$
|
|
3537
|
+
const fn = $b8hua$catchify(() => style.overflow = original_value);
|
|
3539
3538
|
cleanup_fns.push(fn);
|
|
3540
3539
|
$b8hua$onCleanup(fn);
|
|
3541
3540
|
}
|
|
@@ -3624,7 +3623,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
3624
3623
|
set_search_sorting_open(true);
|
|
3625
3624
|
}
|
|
3626
3625
|
});
|
|
3627
|
-
$b8hua$onCleanup($b8hua$
|
|
3626
|
+
$b8hua$onCleanup($b8hua$catchify(() => {
|
|
3628
3627
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
3629
3628
|
set_search_filters_open(false);
|
|
3630
3629
|
set_search_sorting_open(false);
|
|
@@ -3727,7 +3726,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
3727
3726
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
3728
3727
|
const [get_current_sorting_] = current_sorting_;
|
|
3729
3728
|
const [is_small, set_is_small] = $b8hua$createSignal(false);
|
|
3730
|
-
const dismiss_modal_ = $b8hua$
|
|
3729
|
+
const dismiss_modal_ = $b8hua$catchify(() => {
|
|
3731
3730
|
set_filters_open(false);
|
|
3732
3731
|
set_sorting_open(false);
|
|
3733
3732
|
});
|
|
@@ -3815,7 +3814,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
3815
3814
|
if (filters_open()) set_extra_els_in_results_container_($b8hua$ssr($7396052a1484264f$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), filter_options))));else set_extra_els_in_results_container_($b8hua$ssr($7396052a1484264f$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $cfdbd124dd09d713$export$1f1775a58da589b5), sorting_options))));
|
|
3816
3815
|
}
|
|
3817
3816
|
});
|
|
3818
|
-
$b8hua$
|
|
3817
|
+
$b8hua$catchify(async () => {
|
|
3819
3818
|
({
|
|
3820
3819
|
open_modal_: open_modal_,
|
|
3821
3820
|
close_modal_: close_modal_
|
|
@@ -3926,13 +3925,13 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
3926
3925
|
} = _ref;
|
|
3927
3926
|
let close_toast_;
|
|
3928
3927
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
3929
|
-
$b8hua$
|
|
3928
|
+
$b8hua$catchify(async () => {
|
|
3930
3929
|
const closing_animation_duration = 300; // ms
|
|
3931
3930
|
const element = $b8hua$ssrElement("div", more_attributes, () => $b8hua$escape(children), true);
|
|
3932
3931
|
const [, set_is_showing_toast] = $a61a2051e15c8d7a$export$22970a0140fc759c;
|
|
3933
3932
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
3934
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $b8hua$
|
|
3935
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $b8hua$
|
|
3933
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $b8hua$catchify(() => closing_animation.pause()));
|
|
3934
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $b8hua$catchify(() => closing_animation.play()));
|
|
3936
3935
|
const body = await (0, $b8hua$observer).wait_for_element("body");
|
|
3937
3936
|
const x_translate = "translateX(-50%) ";
|
|
3938
3937
|
let remove_keyboard_listener;
|
|
@@ -3957,7 +3956,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
3957
3956
|
// let other toasts close us if they open while we're still here
|
|
3958
3957
|
$a61a2051e15c8d7a$var$closing_functions.add(close_toast_);
|
|
3959
3958
|
set_is_showing_toast(true);
|
|
3960
|
-
const handler = $b8hua$
|
|
3959
|
+
const handler = $b8hua$catchify(_ref2 => {
|
|
3961
3960
|
let {
|
|
3962
3961
|
key: key
|
|
3963
3962
|
} = _ref2;
|
|
@@ -4062,7 +4061,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
4062
4061
|
}
|
|
4063
4062
|
old_pos = new_pos;
|
|
4064
4063
|
});
|
|
4065
|
-
const touchstart_handler = $b8hua$
|
|
4064
|
+
const touchstart_handler = $b8hua$catchify(e => {
|
|
4066
4065
|
is_in_touch_scroll = true;
|
|
4067
4066
|
if (e.touches.length === 1) {
|
|
4068
4067
|
// 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
|
|
@@ -4070,12 +4069,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
4070
4069
|
diff_over_second_or_touch = 0;
|
|
4071
4070
|
}
|
|
4072
4071
|
});
|
|
4073
|
-
const touchend_handler = $b8hua$
|
|
4072
|
+
const touchend_handler = $b8hua$catchify(e => {
|
|
4074
4073
|
if (e.touches.length === 0)
|
|
4075
4074
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
4076
4075
|
inertia_timeout = setTimeout(
|
|
4077
4076
|
// inertia ends after 500ms (educated guess)
|
|
4078
|
-
$b8hua$
|
|
4077
|
+
$b8hua$catchify(() => {
|
|
4079
4078
|
is_in_touch_scroll = false;
|
|
4080
4079
|
diff_over_second_or_touch = 0;
|
|
4081
4080
|
}), 500);
|
|
@@ -4093,9 +4092,9 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
4093
4092
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
4094
4093
|
if (!$b8hua$untrack(modal_is_closed) && everything_closed)
|
|
4095
4094
|
// I think the point of this is to delay the animation a bit IIRC
|
|
4096
|
-
timeout = setTimeout($b8hua$
|
|
4095
|
+
timeout = setTimeout($b8hua$catchify(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
4097
4096
|
});
|
|
4098
|
-
$b8hua$createComputed($b8hua$
|
|
4097
|
+
$b8hua$createComputed($b8hua$catchify(async () => {
|
|
4099
4098
|
const element = sort_and_filter_element_();
|
|
4100
4099
|
if (!element) return;
|
|
4101
4100
|
await (0, $b8hua$observer).wait_for_element(element);
|
|
@@ -4395,7 +4394,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
4395
4394
|
$b8hua$createComputed(() => {
|
|
4396
4395
|
var _place_holdey_quickli, _place_holdey_quickli2;
|
|
4397
4396
|
if ((_place_holdey_quickli = place_holdey_quicklinks_data()) !== null && _place_holdey_quickli !== void 0 && (_place_holdey_quickli2 = _place_holdey_quickli[0]) !== null && _place_holdey_quickli2 !== void 0 && _place_holdey_quickli2.query_id) {
|
|
4398
|
-
if (last_was_placeholder) queueMicrotask($b8hua$
|
|
4397
|
+
if (last_was_placeholder) queueMicrotask($b8hua$catchify(() => {
|
|
4399
4398
|
var _sliding_element;
|
|
4400
4399
|
(_sliding_element = sliding_element) === null || _sliding_element === void 0 || _sliding_element.scrollTo({
|
|
4401
4400
|
left: 0
|
|
@@ -4464,7 +4463,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
4464
4463
|
} else if (!(((_intersecting_items_o = intersecting_items_object[selected_index()]) === null || _intersecting_items_o === void 0 ? void 0 : _intersecting_items_o.intersectionRatio) >= 0.95)) {
|
|
4465
4464
|
// negated larger than to handle left side of comparison being undefined
|
|
4466
4465
|
let done_work = false;
|
|
4467
|
-
$b8hua$runWithOwner(owner, () => $b8hua$createComputed($b8hua$
|
|
4466
|
+
$b8hua$runWithOwner(owner, () => $b8hua$createComputed($b8hua$catchify(() => {
|
|
4468
4467
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
4469
4468
|
const sel_index = selected_index();
|
|
4470
4469
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -4551,7 +4550,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
4551
4550
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
4552
4551
|
};
|
|
4553
4552
|
|
|
4554
|
-
$b8hua$createComputed($b8hua$
|
|
4553
|
+
$b8hua$createComputed($b8hua$catchify(() => {
|
|
4555
4554
|
const last_result = get_last_result_in_viewport_();
|
|
4556
4555
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
4557
4556
|
if (isNaN(last_result)) {
|
|
@@ -4578,7 +4577,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
4578
4577
|
set_to_later = last_result;
|
|
4579
4578
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
4580
4579
|
if (timeout) return;
|
|
4581
|
-
timeout = setTimeout($b8hua$
|
|
4580
|
+
timeout = setTimeout($b8hua$catchify(() => {
|
|
4582
4581
|
timeout = undefined;
|
|
4583
4582
|
last_time_history_changed = +new Date();
|
|
4584
4583
|
set_min_results_loaded(set_to_later);
|
|
@@ -4626,7 +4625,7 @@ function $ec225bf1f1627ea8$export$210f130a61ac1e8d(fn) {
|
|
|
4626
4625
|
let last_queued;
|
|
4627
4626
|
let last_value;
|
|
4628
4627
|
let initial_run = true;
|
|
4629
|
-
$b8hua$createComputed($b8hua$
|
|
4628
|
+
$b8hua$createComputed($b8hua$catchify(async () => {
|
|
4630
4629
|
last_value = fn();
|
|
4631
4630
|
if (initial_run) {
|
|
4632
4631
|
initial_run = false;
|
|
@@ -4747,7 +4746,7 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
4747
4746
|
const handler = () => allow_filter_clearing = false;
|
|
4748
4747
|
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
|
|
4749
4748
|
$b8hua$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
4750
|
-
$b8hua$createEffect($b8hua$on(crumb_data_, $b8hua$
|
|
4749
|
+
$b8hua$createEffect($b8hua$on(crumb_data_, $b8hua$catchify(new_crumb_data => {
|
|
4751
4750
|
const query_id_of_new_data = query_id_();
|
|
4752
4751
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && query_id_of_new_data !== query_id_when_we_got_previous_data) {
|
|
4753
4752
|
const previous_length = previous_crumb_data.length;
|
|
@@ -4906,7 +4905,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
4906
4905
|
});
|
|
4907
4906
|
const [plp_results_] = $b8hua$createResource(query_base_,
|
|
4908
4907
|
// 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)
|
|
4909
|
-
$b8hua$
|
|
4908
|
+
$b8hua$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
4910
4909
|
id_: $b8hua$untrack(query_id_),
|
|
4911
4910
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
4912
4911
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -5040,7 +5039,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
5040
5039
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5041
5040
|
...extra_sort_and_filter_args_
|
|
5042
5041
|
});
|
|
5043
|
-
$b8hua$
|
|
5042
|
+
$b8hua$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
5044
5043
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5045
5044
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
5046
5045
|
id_: query_id_,
|
|
@@ -5050,7 +5049,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
5050
5049
|
$b8hua$createComputed(() => {
|
|
5051
5050
|
if (plp_results_.loading) set_can_write_scroll_restoration(false);else if (plp_results_()) set_can_write_scroll_restoration(true);
|
|
5052
5051
|
});
|
|
5053
|
-
$b8hua$createRenderEffect($b8hua$
|
|
5052
|
+
$b8hua$createRenderEffect($b8hua$catchify(async () => {
|
|
5054
5053
|
var _only_show_filters_op;
|
|
5055
5054
|
const slim = is_slim_();
|
|
5056
5055
|
const only_show_filters_opener = (_only_show_filters_op = only_show_filters_opener_) === null || _only_show_filters_op === void 0 ? void 0 : _only_show_filters_op();
|
|
@@ -5267,7 +5266,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
5267
5266
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
5268
5267
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
5269
5268
|
const [get_current_href, set_current_href] = $b8hua$createSignal((_globalThis$location$ = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.href) !== null && _globalThis$location$ !== void 0 ? _globalThis$location$ : "https://example.com");
|
|
5270
|
-
const history_change_handler = $b8hua$
|
|
5269
|
+
const history_change_handler = $b8hua$catchify(() => set_current_href(location.href));
|
|
5271
5270
|
const owner = $b8hua$getOwner() || $b8hua$createRoot(() => $b8hua$getOwner());
|
|
5272
5271
|
const {
|
|
5273
5272
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -5439,7 +5438,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
5439
5438
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
5440
5439
|
* @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
|
|
5441
5440
|
*/
|
|
5442
|
-
go_to_: $b8hua$
|
|
5441
|
+
go_to_: $b8hua$catchify(async _ref => {
|
|
5443
5442
|
let {
|
|
5444
5443
|
new_url_: raw_new_url,
|
|
5445
5444
|
event_: event_,
|
|
@@ -5936,7 +5935,7 @@ const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
5936
5935
|
|
|
5937
5936
|
const observe_to_signal = (element, setter) => {
|
|
5938
5937
|
const computed_style = getComputedStyle(element);
|
|
5939
|
-
const resize_observer = new ResizeObserver($b8hua$
|
|
5938
|
+
const resize_observer = new ResizeObserver($b8hua$catchify(() => {
|
|
5940
5939
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
5941
5940
|
}));
|
|
5942
5941
|
resize_observer.observe(element);
|
|
@@ -6135,7 +6134,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
6135
6134
|
let input_element;
|
|
6136
6135
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
6137
6136
|
let field_div;
|
|
6138
|
-
$b8hua$createEffect($b8hua$
|
|
6137
|
+
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
6139
6138
|
if (disabled_) return;
|
|
6140
6139
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
6141
6140
|
await (0, $b8hua$observer).wait_for_element(input_element);
|
|
@@ -6252,7 +6251,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
6252
6251
|
};
|
|
6253
6252
|
let ro;
|
|
6254
6253
|
if (one_axies_only !== "top") {
|
|
6255
|
-
ro = new ResizeObserver($b8hua$
|
|
6254
|
+
ro = new ResizeObserver($b8hua$catchify(records => {
|
|
6256
6255
|
records.forEach(_ref => {
|
|
6257
6256
|
let {
|
|
6258
6257
|
contentRect: {
|
|
@@ -6274,10 +6273,10 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
6274
6273
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
6275
6274
|
// this works
|
|
6276
6275
|
// keeping resize just in case
|
|
6277
|
-
const resize_resize_observer = new ResizeObserver($b8hua$
|
|
6276
|
+
const resize_resize_observer = new ResizeObserver($b8hua$catchify(align_position));
|
|
6278
6277
|
resize_resize_observer.observe(document.documentElement);
|
|
6279
6278
|
(0, $b8hua$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
6280
|
-
$b8hua$onCleanup($b8hua$
|
|
6279
|
+
$b8hua$onCleanup($b8hua$catchify(() => {
|
|
6281
6280
|
var _ro;
|
|
6282
6281
|
(_ro = ro) === null || _ro === void 0 || _ro.disconnect();
|
|
6283
6282
|
resize_resize_observer.disconnect();
|
|
@@ -6307,7 +6306,7 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
6307
6306
|
}, {
|
|
6308
6307
|
defer: true
|
|
6309
6308
|
}));
|
|
6310
|
-
$b8hua$createComputed($b8hua$on(get_search_query_, $b8hua$
|
|
6309
|
+
$b8hua$createComputed($b8hua$on(get_search_query_, $b8hua$catchify(() => {
|
|
6311
6310
|
// when a query was submitted, clear filters if clear was pressed before
|
|
6312
6311
|
const clear_value = $b8hua$untrack(get_clear_filters_next_submit);
|
|
6313
6312
|
if (clear_value) {
|
|
@@ -6332,11 +6331,11 @@ function $07d90b8270ece8de$export$84bba84a7b837187(read_search_query) {
|
|
|
6332
6331
|
const key = "depict_searches";
|
|
6333
6332
|
const previous_searches = $b8hua$createSignal(JSON.parse(ls[key] || "[]"));
|
|
6334
6333
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
6335
|
-
$b8hua$createEffect($b8hua$
|
|
6334
|
+
$b8hua$createEffect($b8hua$catchify(() => {
|
|
6336
6335
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
6337
6336
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
6338
6337
|
}));
|
|
6339
|
-
$b8hua$createComputed($b8hua$
|
|
6338
|
+
$b8hua$createComputed($b8hua$catchify(() => {
|
|
6340
6339
|
const searches = $b8hua$untrack(read_previous_searches);
|
|
6341
6340
|
const current_query = read_search_query();
|
|
6342
6341
|
if (!current_query)
|
|
@@ -6475,13 +6474,13 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
6475
6474
|
// don't wait if it's the first request
|
|
6476
6475
|
write_current_instant_query(value);
|
|
6477
6476
|
clearTimeout(timeout);
|
|
6478
|
-
timeout = setTimeout($b8hua$
|
|
6477
|
+
timeout = setTimeout($b8hua$catchify(() => write_current_instant_query(value)), 250);
|
|
6479
6478
|
});
|
|
6480
6479
|
const [search_results] = $b8hua$createResource($b8hua$createMemo(() => ({
|
|
6481
6480
|
tenant: tenant_(),
|
|
6482
6481
|
market: market_(),
|
|
6483
6482
|
query: read_current_instant_query()
|
|
6484
|
-
})), $b8hua$
|
|
6483
|
+
})), $b8hua$catchify(variable_data => {
|
|
6485
6484
|
return depict_api_.query({
|
|
6486
6485
|
// 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
|
|
6487
6486
|
limit: $b8hua$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -6554,7 +6553,7 @@ function $e8776b492383c292$export$91c3b6774e8be0f5(_ref) {
|
|
|
6554
6553
|
const [get_current_href, set_current_href] = $b8hua$createSignal(location.href);
|
|
6555
6554
|
const [exit_iterable, exitable_iterable] = $b8hua$make_asyncIterable_exiter((0, $b8hua$href_change_ipns));
|
|
6556
6555
|
$b8hua$onCleanup(exit_iterable);
|
|
6557
|
-
$b8hua$
|
|
6556
|
+
$b8hua$catchify(async () => {
|
|
6558
6557
|
for await (const href of exitable_iterable)
|
|
6559
6558
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
6560
6559
|
set_current_href(href);
|
|
@@ -6964,7 +6963,7 @@ function $2ebb1d6ae6763f7a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
6964
6963
|
if (!$b8hua$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
6965
6964
|
});
|
|
6966
6965
|
const owner = $b8hua$getOwner();
|
|
6967
|
-
const handler = $b8hua$
|
|
6966
|
+
const handler = $b8hua$catchify(_ref3 => {
|
|
6968
6967
|
let {
|
|
6969
6968
|
keyCode: keyCode
|
|
6970
6969
|
} = _ref3;
|
|
@@ -7027,7 +7026,7 @@ function $2ebb1d6ae6763f7a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
7027
7026
|
const el = element_();
|
|
7028
7027
|
if (!el) return;
|
|
7029
7028
|
el.addEventListener("keyup", handler);
|
|
7030
|
-
$b8hua$onCleanup($b8hua$
|
|
7029
|
+
$b8hua$onCleanup($b8hua$catchify(() => el.removeEventListener("keyup", handler)));
|
|
7031
7030
|
});
|
|
7032
7031
|
}
|
|
7033
7032
|
function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
@@ -7236,7 +7235,7 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
7236
7235
|
if (process.env.GA === "false") return;
|
|
7237
7236
|
let debounce_timeout;
|
|
7238
7237
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
7239
|
-
const send_to_ga = $b8hua$
|
|
7238
|
+
const send_to_ga = $b8hua$catchify(() => {
|
|
7240
7239
|
const fake_url = new URL(location.href);
|
|
7241
7240
|
const {
|
|
7242
7241
|
searchParams: searchParams
|
|
@@ -7249,12 +7248,12 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
7249
7248
|
$b8hua$onCleanup(() => {
|
|
7250
7249
|
setTimeout(
|
|
7251
7250
|
// 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
|
|
7252
|
-
$b8hua$
|
|
7251
|
+
$b8hua$catchify(() => {
|
|
7253
7252
|
if ($b8hua$untrack(get_search_query_) === $b8hua$untrack(get_search_field_value_)) stop_timeout();
|
|
7254
7253
|
}));
|
|
7255
7254
|
});
|
|
7256
7255
|
let first_call = true;
|
|
7257
|
-
$b8hua$createEffect($b8hua$
|
|
7256
|
+
$b8hua$createEffect($b8hua$catchify(() => {
|
|
7258
7257
|
get_search_field_value_();
|
|
7259
7258
|
if (first_call) {
|
|
7260
7259
|
// we only want to do stuff when it changes
|
|
@@ -7331,7 +7330,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
7331
7330
|
const [input_field, set_input_field] = $b8hua$createSignal();
|
|
7332
7331
|
const [get_search_field_value_] = search_field_value_;
|
|
7333
7332
|
const [get_modal_search_results, set_modal_search_results_] = $b8hua$createSignal();
|
|
7334
|
-
const close_on_escape_handler = $b8hua$
|
|
7333
|
+
const close_on_escape_handler = $b8hua$catchify(_ref2 => {
|
|
7335
7334
|
let {
|
|
7336
7335
|
key: key
|
|
7337
7336
|
} = _ref2;
|
|
@@ -7347,7 +7346,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
7347
7346
|
if (disable_scrolling_) $e56d241d0f33d459$export$fe334901e8bebd57();
|
|
7348
7347
|
$e82132ed97521828$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
7349
7348
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
7350
|
-
$b8hua$onCleanup($b8hua$
|
|
7349
|
+
$b8hua$onCleanup($b8hua$catchify(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
7351
7350
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
7352
7351
|
$a09bb7c652acf957$export$3340fdd8259bd4fd({
|
|
7353
7352
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -7455,8 +7454,8 @@ function $e82132ed97521828$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
7455
7454
|
let set_initial_values = false;
|
|
7456
7455
|
let old_pathname;
|
|
7457
7456
|
let old_param_value;
|
|
7458
|
-
$b8hua$onCleanup($b8hua$
|
|
7459
|
-
$b8hua$
|
|
7457
|
+
$b8hua$onCleanup($b8hua$catchify(exit_iterable));
|
|
7458
|
+
$b8hua$catchify(async () => {
|
|
7460
7459
|
for await (const href of exitable_iterable) {
|
|
7461
7460
|
const u_o = new URL(href);
|
|
7462
7461
|
const new_pathname = u_o.pathname;
|
|
@@ -7527,7 +7526,7 @@ function $69602b3d8fd54c38$export$9dd50d35b9d94fdf(_ref) {
|
|
|
7527
7526
|
number_of_results_: number_of_results_,
|
|
7528
7527
|
type: type
|
|
7529
7528
|
} = _ref;
|
|
7530
|
-
const contents = $b8hua$createMemo($b8hua$
|
|
7529
|
+
const contents = $b8hua$createMemo($b8hua$catchify(() => {
|
|
7531
7530
|
const q = get_search_query_();
|
|
7532
7531
|
return i18n_[type === $69602b3d8fd54c38$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()($b8hua$ssr($69602b3d8fd54c38$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(q)), $b8hua$ssr($69602b3d8fd54c38$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(formatted_number_of_results_())), !!q, number_of_results_());
|
|
7533
7532
|
}));
|
|
@@ -7799,7 +7798,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
7799
7798
|
if (!result) return;
|
|
7800
7799
|
return {
|
|
7801
7800
|
href: result.page_url,
|
|
7802
|
-
onClick: $b8hua$
|
|
7801
|
+
onClick: $b8hua$catchify(ev => router_.navigate_.go_to_({
|
|
7803
7802
|
new_url_: result.page_url,
|
|
7804
7803
|
is_replace_: false,
|
|
7805
7804
|
event_: ev
|
|
@@ -8075,7 +8074,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
8075
8074
|
} : {})
|
|
8076
8075
|
};
|
|
8077
8076
|
});
|
|
8078
|
-
const [search_results_] = $b8hua$createResource(search_query_base_, $b8hua$
|
|
8077
|
+
const [search_results_] = $b8hua$createResource(search_query_base_, $b8hua$catchify(async base_query => {
|
|
8079
8078
|
set_all_products_loaded(false);
|
|
8080
8079
|
// only first page of results
|
|
8081
8080
|
return await $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
@@ -8112,7 +8111,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
8112
8111
|
});
|
|
8113
8112
|
const modal_body_style = $b8hua$createSignal({});
|
|
8114
8113
|
const [get_search_field_elements, set_search_field_elements] = $b8hua$createSignal();
|
|
8115
|
-
const SafeSearchField = $b8hua$
|
|
8114
|
+
const SafeSearchField = $b8hua$catchify((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
8116
8115
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $b8hua$createSignal(false);
|
|
8117
8116
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $b8hua$createSignal();
|
|
8118
8117
|
const n_hits = $b8hua$createMemo(() => {
|
|
@@ -8167,7 +8166,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
8167
8166
|
$b8hua$runWithOwner(owner, () => results_filters[1](matches ? [results_for, filters_opener] : $b8hua$ssr($da279c5a540c6846$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(results_for), $b8hua$escape(filters_opener))));
|
|
8168
8167
|
}).remove);
|
|
8169
8168
|
$3a2bed57c9a57e21$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
8170
|
-
$b8hua$
|
|
8169
|
+
$b8hua$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
8171
8170
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
8172
8171
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
8173
8172
|
id_: get_search_query_,
|
|
@@ -8206,8 +8205,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
8206
8205
|
if (!search_field) break add_input_field;
|
|
8207
8206
|
modal_body_style[1]({});
|
|
8208
8207
|
modal_body_style_ref_ === null || modal_body_style_ref_ === void 0 || modal_body_style_ref_(modal_body_style);
|
|
8209
|
-
const align_position = $b8hua$
|
|
8210
|
-
div_with_field_class.addEventListener("click", $b8hua$
|
|
8208
|
+
const align_position = $b8hua$catchify((0, $1308a7816c3d4f2d$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
8209
|
+
div_with_field_class.addEventListener("click", $b8hua$catchify(e => {
|
|
8211
8210
|
var _target$matches, _target$closest, _on_open_, _ref4;
|
|
8212
8211
|
const target = e.target;
|
|
8213
8212
|
const sel = ".submit";
|
|
@@ -8378,7 +8377,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
8378
8377
|
function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
8379
8378
|
const style_element = document.createElement("style");
|
|
8380
8379
|
document.head.append(style_element);
|
|
8381
|
-
const resize_observer = new ResizeObserver($b8hua$
|
|
8380
|
+
const resize_observer = new ResizeObserver($b8hua$catchify(() => {
|
|
8382
8381
|
const styles = $cc64aabf2c7a1f1a$export$1233ca167bf71f9a({
|
|
8383
8382
|
".depict.plp .depict-search-modal .search-field": {
|
|
8384
8383
|
"height": "".concat(aligner === null || aligner === void 0 ? void 0 : aligner.clientHeight, "px")
|
|
@@ -8605,7 +8604,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
8605
8604
|
selected_filters_: selected_filters_
|
|
8606
8605
|
});
|
|
8607
8606
|
$68e6625c8d51f847$export$5162a71f252e6122();
|
|
8608
|
-
$b8hua$
|
|
8607
|
+
$b8hua$catchify(async () => {
|
|
8609
8608
|
const {
|
|
8610
8609
|
open_modal_: open_modal_,
|
|
8611
8610
|
close_modal_: close_modal_
|
|
@@ -8890,7 +8889,7 @@ function $eb064bc3350276c1$export$316f6f283ae64765(props) {
|
|
|
8890
8889
|
const style_props_ = $b8hua$createSignal({
|
|
8891
8890
|
position: "fixed"
|
|
8892
8891
|
});
|
|
8893
|
-
const defaultHandler = $b8hua$
|
|
8892
|
+
const defaultHandler = $b8hua$catchify(() => {
|
|
8894
8893
|
// 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.
|
|
8895
8894
|
const selected_text_range_ = [input_element.selectionStart, input_element.selectionEnd];
|
|
8896
8895
|
const {
|
|
@@ -8979,7 +8978,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
|
|
|
8979
8978
|
}, dispose_aligner];
|
|
8980
8979
|
};
|
|
8981
8980
|
function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
8982
|
-
const handler = $b8hua$
|
|
8981
|
+
const handler = $b8hua$catchify(e => {
|
|
8983
8982
|
const {
|
|
8984
8983
|
key: key,
|
|
8985
8984
|
target: target
|
|
@@ -8998,7 +8997,7 @@ function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
|
8998
8997
|
function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
8999
8998
|
let old_url;
|
|
9000
8999
|
let disconnect_link_observer;
|
|
9001
|
-
const link_handler = $b8hua$
|
|
9000
|
+
const link_handler = $b8hua$catchify(e => {
|
|
9002
9001
|
const link = e.currentTarget || e.target;
|
|
9003
9002
|
if (link.href === old_url) {
|
|
9004
9003
|
history.pushState(history.state, "", link.href);
|
|
@@ -9007,7 +9006,7 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
9007
9006
|
});
|
|
9008
9007
|
let remove_added_listeners;
|
|
9009
9008
|
let resolve_remove_added_listeners;
|
|
9010
|
-
pr.addEventListener("open", $b8hua$
|
|
9009
|
+
pr.addEventListener("open", $b8hua$catchify(() => {
|
|
9011
9010
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
9012
9011
|
disconnect_link_observer = (0, $b8hua$observer).onexists("a", async _ref => {
|
|
9013
9012
|
let {
|
|
@@ -9018,12 +9017,12 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
9018
9017
|
element.removeEventListener("click", link_handler);
|
|
9019
9018
|
});
|
|
9020
9019
|
}));
|
|
9021
|
-
pr.addEventListener("close", $b8hua$
|
|
9020
|
+
pr.addEventListener("close", $b8hua$catchify(() => {
|
|
9022
9021
|
var _disconnect_link_obse, _resolve_remove_added;
|
|
9023
9022
|
(_disconnect_link_obse = disconnect_link_observer) === null || _disconnect_link_obse === void 0 || _disconnect_link_obse();
|
|
9024
9023
|
(_resolve_remove_added = resolve_remove_added_listeners) === null || _resolve_remove_added === void 0 || _resolve_remove_added();
|
|
9025
9024
|
}));
|
|
9026
|
-
$b8hua$
|
|
9025
|
+
$b8hua$catchify(async () => {
|
|
9027
9026
|
for await (const href of (0, $b8hua$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
9028
9027
|
})();
|
|
9029
9028
|
}
|
|
@@ -9121,7 +9120,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
9121
9120
|
});
|
|
9122
9121
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_unload, {
|
|
9123
9122
|
writable: true,
|
|
9124
|
-
value: $b8hua$
|
|
9123
|
+
value: $b8hua$catchify(() => {
|
|
9125
9124
|
var _classPrivateFieldGet3;
|
|
9126
9125
|
if (!$b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_is_open)) return;
|
|
9127
9126
|
(_classPrivateFieldGet3 = $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_disconnect_observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
@@ -9135,7 +9134,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
9135
9134
|
});
|
|
9136
9135
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_load, {
|
|
9137
9136
|
writable: true,
|
|
9138
|
-
value: $b8hua$
|
|
9137
|
+
value: $b8hua$catchify(async els => {
|
|
9139
9138
|
$b8hua$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_is_open, true);
|
|
9140
9139
|
// So that #load doesn't get called again
|
|
9141
9140
|
let set_should_stay_inserted;
|
|
@@ -9199,7 +9198,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
9199
9198
|
async function $f9fd3017c20b774a$var$_listen2() {
|
|
9200
9199
|
const [exit_ipns, exitable_ipns] = $b8hua$make_asyncIterable_exiter((0, $b8hua$href_change_ipns));
|
|
9201
9200
|
$b8hua$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_stop_listening, exit_ipns);
|
|
9202
|
-
const caught_page_check_fn = $b8hua$
|
|
9201
|
+
const caught_page_check_fn = $b8hua$catchify(this.is_page_, "page check failed");
|
|
9203
9202
|
for await (const href of exitable_ipns) {
|
|
9204
9203
|
const url = new URL(href);
|
|
9205
9204
|
if (!caught_page_check_fn(url)) {
|
|
@@ -9217,7 +9216,7 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
9217
9216
|
this.addEventListener("close", dispose, {
|
|
9218
9217
|
once: true
|
|
9219
9218
|
});
|
|
9220
|
-
return $b8hua$
|
|
9219
|
+
return $b8hua$catchify(this.render_, "rendering failed")() || [];
|
|
9221
9220
|
});
|
|
9222
9221
|
}
|
|
9223
9222
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
@@ -9265,7 +9264,7 @@ var $f9fd3017c20b774a$var$_visited_urls = {
|
|
|
9265
9264
|
writable: true,
|
|
9266
9265
|
value: (() => {
|
|
9267
9266
|
// 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).
|
|
9268
|
-
$b8hua$
|
|
9267
|
+
$b8hua$catchify(async () => {
|
|
9269
9268
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
9270
9269
|
// 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).
|
|
9271
9270
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|