@depict-ai/ui 1.0.17 → 1.0.18
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/dist/client/main.js +430 -230
- package/dist/client/module.js +431 -233
- package/dist/index.d.ts +59 -27
- package/dist/main.js +13 -9
- package/dist/module.js +13 -9
- package/dist/server/main.js +374 -195
- package/dist/server/module.js +375 -198
- package/package.json +50 -27
package/dist/client/main.js
CHANGED
|
@@ -6,6 +6,8 @@ function $parcel$export(e, n, v, s) {
|
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
$parcel$export(module.exports, "CrossIcon", () => $c77c68e559a1506c$export$3b621d86b1566b2);
|
|
10
|
+
$parcel$export(module.exports, "GenericSliderArrowButton", () => $0f313083912e447a$export$8be2714ec7f169ee);
|
|
9
11
|
$parcel$export(module.exports, "fetchDepictRecommendations", () => $bc91d938b8c601b4$export$58e808b1db15d3bc);
|
|
10
12
|
$parcel$export(module.exports, "QuickLinks", () => $48567ac5b39bac56$export$de035477d6fef996);
|
|
11
13
|
$parcel$export(module.exports, "BreadCrumbs", () => $48567ac5b39bac56$export$5b7c3ce0ebe51f86);
|
|
@@ -40,11 +42,54 @@ $parcel$export(module.exports, "defaultGridSpacing", () => $a3280f0aad997933$exp
|
|
|
40
42
|
$parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$export$c3834fa86c616831);
|
|
41
43
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
42
44
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
43
|
-
/*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.0.
|
|
45
|
+
/*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.0.18";
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
|
|
47
49
|
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
const $c77c68e559a1506c$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg><path d="M11.669 10.531l9.156-9.156a.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569A.8.8 0 0 0 20.24 0a.77.77 0 0 0-.569.237l-9.14 9.14-9.14-9.14A.79.79 0 0 0 .807 0a.77.77 0 0 0-.569.237A.78.78 0 0 0 0 .807a.77.77 0 0 0 .237.569l9.156 9.156-9.156 9.14c-.159.157-.237.349-.237.569s.079.412.237.569c.085.085.174.148.268.19a1.095 1.095 0 0 0 .316.048.894.894 0 0 0 .285-.048.84.84 0 0 0 .285-.19l9.139-9.14 9.14 9.14a.894.894 0 0 0 .268.19 1.049 1.049 0 0 0 .301.048.941.941 0 0 0 .301-.048.84.84 0 0 0 .285-.19.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569z"></path></svg>`, 4);
|
|
55
|
+
function $c77c68e559a1506c$export$3b621d86b1566b2(props = {}) {
|
|
56
|
+
return (()=>{
|
|
57
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($c77c68e559a1506c$var$_tmpl$);
|
|
58
|
+
(0, $57o7A$solidjsweb.spread)(_el$, (0, $57o7A$solidjsweb.mergeProps)(props, {
|
|
59
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
60
|
+
"width": "21.064",
|
|
61
|
+
"height": "21.047",
|
|
62
|
+
"viewBox": "0 0 21.064 21.064"
|
|
63
|
+
}), true, true);
|
|
64
|
+
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
65
|
+
return _el$;
|
|
66
|
+
})();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
const $0f313083912e447a$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>`, 4);
|
|
75
|
+
function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
|
|
76
|
+
return (()=>{
|
|
77
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($0f313083912e447a$var$_tmpl$);
|
|
78
|
+
(0, $57o7A$solidjsweb.effect)((_p$)=>{
|
|
79
|
+
const _v$ = props.width_ ?? 14, _v$2 = props.height_ ?? 26;
|
|
80
|
+
_v$ !== _p$._v$ && (0, $57o7A$solidjsweb.setAttribute)(_el$, "width", _p$._v$ = _v$);
|
|
81
|
+
_v$2 !== _p$._v$2 && (0, $57o7A$solidjsweb.setAttribute)(_el$, "height", _p$._v$2 = _v$2);
|
|
82
|
+
return _p$;
|
|
83
|
+
}, {
|
|
84
|
+
_v$: undefined,
|
|
85
|
+
_v$2: undefined
|
|
86
|
+
});
|
|
87
|
+
return _el$;
|
|
88
|
+
})();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
48
93
|
async function $bc91d938b8c601b4$export$58e808b1db15d3bc({ merchant: merchant , market: market , headers: headers , ...fetch_recs_options }) {
|
|
49
94
|
return await (0, $57o7A$depictaiutilishared.fetch_recs)({
|
|
50
95
|
tenant: merchant,
|
|
@@ -62,7 +107,6 @@ async function $bc91d938b8c601b4$export$58e808b1db15d3bc({ merchant: merchant ,
|
|
|
62
107
|
|
|
63
108
|
|
|
64
109
|
|
|
65
|
-
|
|
66
110
|
function $6e22b5314fb52f4c$export$e183a13865960371(params_to_default_value, router_) {
|
|
67
111
|
const signals = {};
|
|
68
112
|
const entries = Object.entries(params_to_default_value);
|
|
@@ -72,7 +116,9 @@ function $6e22b5314fb52f4c$export$e183a13865960371(params_to_default_value, rout
|
|
|
72
116
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
73
117
|
(0, $57o7A$solidjs.createRenderEffect)(()=>{
|
|
74
118
|
let signal_changed = false;
|
|
75
|
-
let { state: state } = history
|
|
119
|
+
let { state: state } = globalThis?.history || {
|
|
120
|
+
state: {}
|
|
121
|
+
}; // cloning isn't necessary because we're calling replaceState on it anyway
|
|
76
122
|
if (state === null || typeof state != "object") state = {};
|
|
77
123
|
for (const [param, default_value] of entries){
|
|
78
124
|
const [read_signal] = signals[param] ||= (0, $57o7A$solidjs.createSignal)(state[param] ?? default_value);
|
|
@@ -350,13 +396,14 @@ function $d659702496cb72ea$export$a71e92cfbb498adc(props) {
|
|
|
350
396
|
|
|
351
397
|
function $76b6ac05693f5c71$export$205efb947c7ffd78(handler, passive = true) {
|
|
352
398
|
const catchified_handler = (0, $57o7A$depictaiutilishared.catchify)(handler);
|
|
399
|
+
const owner = (0, $57o7A$solidjs.getOwner)();
|
|
353
400
|
// 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.
|
|
354
401
|
// Use observer in case that this gets called before body exists
|
|
355
402
|
const disconnect = (0, $57o7A$depictaiutilishared.observer).onexists("body", ({ element: element })=>{
|
|
356
403
|
element.addEventListener("scroll", catchified_handler, {
|
|
357
404
|
passive: passive
|
|
358
405
|
});
|
|
359
|
-
(0, $57o7A$solidjs.onCleanup)(()=>element.removeEventListener("scroll", catchified_handler));
|
|
406
|
+
(0, $57o7A$solidjs.runWithOwner)(owner, ()=>(0, $57o7A$solidjs.onCleanup)(()=>element.removeEventListener("scroll", catchified_handler)));
|
|
360
407
|
});
|
|
361
408
|
(0, $57o7A$solidjs.onCleanup)(disconnect);
|
|
362
409
|
for (const event of [
|
|
@@ -372,8 +419,10 @@ function $76b6ac05693f5c71$export$205efb947c7ffd78(handler, passive = true) {
|
|
|
372
419
|
}
|
|
373
420
|
|
|
374
421
|
|
|
422
|
+
|
|
375
423
|
const $401aee5f33dca9e2$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="scroll-status" style="display:none"><span class="text"><b></b> – <b></b> <!#><!/> <b></b></span></div>`, 12);
|
|
376
424
|
function $401aee5f33dca9e2$export$83fd5de5504a7a67({ formatted_number_of_results_: formatted_number_of_results_ , first_result_in_viewport_: [get_first_result_in_viewport] , last_result_in_viewport_: [get_last_result_in_viewport] , number_of_results_: number_of_results_ , i18n_: { price_formatting_: price_formatting_ , of_: of_ } }) {
|
|
425
|
+
if (0, $57o7A$solidjsweb.isServer) return; // won't show in initial render and need scroll position
|
|
377
426
|
const [first_to_show, set_first_to_show] = (0, $57o7A$solidjs.createSignal)(0);
|
|
378
427
|
const [last_to_show, set_last_to_show] = (0, $57o7A$solidjs.createSignal)(0);
|
|
379
428
|
const [count_to_show, set_count_to_show] = (0, $57o7A$solidjs.createSignal)("");
|
|
@@ -714,6 +763,7 @@ function $47e2cc552c02110c$export$8895d39404bd2bb1(props) {
|
|
|
714
763
|
|
|
715
764
|
const $0d0b172488865048$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<a class="hint" href="javascript:void(0)"></a>`, 2), $0d0b172488865048$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="no-results"><div class="text"></div><!#><!/></div>`, 6);
|
|
716
765
|
function $0d0b172488865048$export$ef6006467f04ee41({ i18n_: i18n_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ }) {
|
|
766
|
+
const root = (0, $57o7A$solidjs.getOwner)();
|
|
717
767
|
return [
|
|
718
768
|
(()=>{
|
|
719
769
|
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($0d0b172488865048$var$_tmpl$2), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, [_el$5, _co$] = (0, $57o7A$solidjsweb.getNextMarker)(_el$4.nextSibling);
|
|
@@ -724,14 +774,14 @@ function $0d0b172488865048$export$ef6006467f04ee41({ i18n_: i18n_ , expanded_hie
|
|
|
724
774
|
},
|
|
725
775
|
get children () {
|
|
726
776
|
const _el$3 = (0, $57o7A$solidjsweb.getNextElement)($0d0b172488865048$var$_tmpl$);
|
|
727
|
-
(0, $57o7A$solidjsweb.addEventListener)(_el$3, "click", (0, $57o7A$depictaiutilishared.catchify)(()=>(0, $47e2cc552c02110c$export$8895d39404bd2bb1)({
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
777
|
+
(0, $57o7A$solidjsweb.addEventListener)(_el$3, "click", (0, $57o7A$depictaiutilishared.catchify)(()=>(0, $57o7A$solidjs.runWithOwner)(root, ()=>(0, $47e2cc552c02110c$export$8895d39404bd2bb1)({
|
|
778
|
+
user_triggered_: true,
|
|
779
|
+
selected_filters_: selected_filters_,
|
|
780
|
+
also_clear_sorting_: false,
|
|
781
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
782
|
+
i18n_: i18n_,
|
|
783
|
+
local_filter_cache_: local_filter_cache_
|
|
784
|
+
}))), true);
|
|
735
785
|
(0, $57o7A$solidjsweb.insert)(_el$3, ()=>i18n_.try_without_filters_());
|
|
736
786
|
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
737
787
|
return _el$3;
|
|
@@ -746,8 +796,10 @@ function $0d0b172488865048$export$ef6006467f04ee41({ i18n_: i18n_ , expanded_hie
|
|
|
746
796
|
]);
|
|
747
797
|
|
|
748
798
|
|
|
799
|
+
|
|
749
800
|
function $fc23d7668ae0011d$export$a2cc176055f8f08() {
|
|
750
|
-
|
|
801
|
+
const text = "Please try setting `colsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
802
|
+
return (0, $57o7A$solidjsweb.isServer) ? `<!-- ${text} -->` : document.createComment(text);
|
|
751
803
|
}
|
|
752
804
|
|
|
753
805
|
|
|
@@ -819,11 +871,20 @@ function $5f7d55c710fd1bc2$var$unwrapping_helper(elements) {
|
|
|
819
871
|
}
|
|
820
872
|
|
|
821
873
|
|
|
874
|
+
|
|
822
875
|
let $0caf87eaa19079da$var$cached_placeholder_element;
|
|
823
876
|
let $0caf87eaa19079da$var$rendering_cached_placeholder_element;
|
|
824
877
|
function $0caf87eaa19079da$export$f33414a4df0afd3f({ product_card_template_: product_card_template_ , num_placeholders_: num_placeholders_ }) {
|
|
825
878
|
const [get_elements, set_elements] = (0, $57o7A$solidjs.createSignal)([]);
|
|
826
879
|
let existing_num = 0;
|
|
880
|
+
if (0, $57o7A$solidjsweb.isServer) // want to render simple placeholders on server, effects don't run there
|
|
881
|
+
return (0, $57o7A$solidjs.createMemo)(()=>Array.from({
|
|
882
|
+
length: num_placeholders_()
|
|
883
|
+
}).map(()=>{
|
|
884
|
+
const template_result = product_card_template_(null, undefined);
|
|
885
|
+
// @ts-ignore
|
|
886
|
+
if (typeof template_result?.then !== "function") return template_result;
|
|
887
|
+
}));
|
|
827
888
|
(0, $57o7A$solidjs.createRenderEffect)(()=>{
|
|
828
889
|
const to_add = num_placeholders_() - existing_num;
|
|
829
890
|
if (to_add <= 0) return;
|
|
@@ -1016,22 +1077,17 @@ function $a73063cc642f3e5f$export$43f0fb951fcb0c54({ displays_by_key_: displays_
|
|
|
1016
1077
|
];
|
|
1017
1078
|
},
|
|
1018
1079
|
children: (product_id, index)=>{
|
|
1019
|
-
// We're using `untrack` here since we don't want to react in here to displays_by_key changing
|
|
1020
|
-
// As long as our key stays the same we assume that the display hasn't changed, so we don't want to rerender
|
|
1021
|
-
// If the key gets removed, <For> will remove us
|
|
1022
1080
|
const owner = (0, $57o7A$solidjs.getOwner)();
|
|
1023
1081
|
const display_accessor = (0, $57o7A$solidjs.createMemo)(()=>displays_by_key_().get(product_id));
|
|
1024
|
-
const [product_card_resource] = (0, $57o7A$solidjs.createResource)(
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
]), // re-render when merchant or market changes
|
|
1028
|
-
([merchant, market])=>{
|
|
1082
|
+
const [product_card_resource] = (0, $57o7A$solidjs.createResource)(display_accessor, // re-render when the reference to the display object changes
|
|
1083
|
+
// this should only be the case when the merchant or market changes and the new request has completed
|
|
1084
|
+
(display)=>{
|
|
1029
1085
|
// get display in the function that re-runs when merchant or market have changed, since the display may have changed but product_id not
|
|
1030
|
-
const display = (0, $57o7A$solidjs.untrack)(display_accessor);
|
|
1031
1086
|
return product_card_template_(display, {
|
|
1032
1087
|
set_on_index_change: (fn)=>(0, $57o7A$solidjs.runWithOwner)(owner, ()=>(0, $57o7A$solidjs.createEffect)(()=>fn(index()))),
|
|
1033
|
-
merchant:
|
|
1034
|
-
market
|
|
1088
|
+
merchant: (0, $57o7A$solidjs.untrack)(merchant_),
|
|
1089
|
+
// this means that the merchant and market provided to the template is wrong while we do another fetch, but I don't see how anyone would need to know the correct market there
|
|
1090
|
+
market: (0, $57o7A$solidjs.untrack)(market_)
|
|
1035
1091
|
});
|
|
1036
1092
|
});
|
|
1037
1093
|
const node_accessor = (0, $5f7d55c710fd1bc2$export$2f0cbfbb4354bb52)(product_card_resource);
|
|
@@ -1174,7 +1230,7 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1174
1230
|
const random_id = (0, $57o7A$depictaiutilishared.make_random_classname)();
|
|
1175
1231
|
const selector_beginning_ = `.depict.plp #${random_id}>`;
|
|
1176
1232
|
const [get_styling, set_styling_] = (0, $57o7A$solidjs.createSignal)("");
|
|
1177
|
-
const [get_should_have_placeholders_rendered, set_should_have_placeholders_rendered] = (0, $57o7A$solidjs.createSignal)(
|
|
1233
|
+
const [get_should_have_placeholders_rendered, set_should_have_placeholders_rendered] = (0, $57o7A$solidjs.createSignal)(true);
|
|
1178
1234
|
const rendered_placeholders = (0, $57o7A$solidjs.createMemo)(()=>get_should_have_placeholders_rendered() ? (0, $0caf87eaa19079da$export$f33414a4df0afd3f)({
|
|
1179
1235
|
product_card_template_: product_card_template_,
|
|
1180
1236
|
num_placeholders_: (0, $57o7A$solidjs.createMemo)(()=>{
|
|
@@ -1430,21 +1486,23 @@ function $a69e505a12a77874$export$e13dddbb31c3a42f() {
|
|
|
1430
1486
|
|
|
1431
1487
|
|
|
1432
1488
|
|
|
1489
|
+
|
|
1490
|
+
|
|
1433
1491
|
const $a0e53f99354809d9$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div></div>`, 2);
|
|
1434
|
-
function $a0e53f99354809d9$export$6649caad96ef8870({ children: children ,
|
|
1492
|
+
function $a0e53f99354809d9$export$6649caad96ef8870({ children: children , slider_ref_: slider_ref_ , faded_opacity_: faded_opacity_ = 0.7 , mutation_plugins_: mutation_plugins_ = [] }) {
|
|
1435
1493
|
const slider = new (0, $57o7A$depictaiutilishared.Amazing_Slider)({
|
|
1436
1494
|
button_contents: {
|
|
1437
1495
|
left: [
|
|
1438
1496
|
(()=>{
|
|
1439
1497
|
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($a0e53f99354809d9$var$_tmpl$);
|
|
1440
|
-
(0, $57o7A$solidjsweb.insert)(_el$, ()
|
|
1498
|
+
(0, $57o7A$solidjsweb.insert)(_el$, (0, $57o7A$solidjsweb.createComponent)((0, $0f313083912e447a$export$8be2714ec7f169ee), {}));
|
|
1441
1499
|
return _el$;
|
|
1442
1500
|
})()
|
|
1443
1501
|
],
|
|
1444
1502
|
right: [
|
|
1445
1503
|
(()=>{
|
|
1446
1504
|
const _el$2 = (0, $57o7A$solidjsweb.getNextElement)($a0e53f99354809d9$var$_tmpl$);
|
|
1447
|
-
(0, $57o7A$solidjsweb.insert)(_el$2, ()
|
|
1505
|
+
(0, $57o7A$solidjsweb.insert)(_el$2, (0, $57o7A$solidjsweb.createComponent)((0, $0f313083912e447a$export$8be2714ec7f169ee), {}));
|
|
1448
1506
|
return _el$2;
|
|
1449
1507
|
})()
|
|
1450
1508
|
]
|
|
@@ -1468,8 +1526,9 @@ function $a0e53f99354809d9$export$6649caad96ef8870({ children: children , button
|
|
|
1468
1526
|
|
|
1469
1527
|
|
|
1470
1528
|
|
|
1529
|
+
|
|
1471
1530
|
const $235a2771a44e28e9$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="clear-all-filters minor"></button>`, 2), $235a2771a44e28e9$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="inner"><span class="title"><!#><!/>: </span><!#><!/></div>`, 8), $235a2771a44e28e9$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="clear-filter major"><!#><!/><span><!#><!/><!#><!/><!#><!/> – <!#><!/><!#><!/><!#><!/></span></button>`, 18), $235a2771a44e28e9$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="clear-filter major"><!#><!/><span></span></button>`, 6);
|
|
1472
|
-
function $235a2771a44e28e9$export$fecbb157621501bd({ number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: [read_local_filter_cache] , search_filters_open_: [read_search_filters_open] , search_sorting_open_: [read_search_sorting_open] ,
|
|
1531
|
+
function $235a2771a44e28e9$export$fecbb157621501bd({ number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: [read_local_filter_cache] , search_filters_open_: [read_search_filters_open] , search_sorting_open_: [read_search_sorting_open] , local_filter_cache_: local_filter_cache_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ }) {
|
|
1473
1532
|
const { price_formatting_: price_formatting_ } = i18n_;
|
|
1474
1533
|
const [read_selected_filters, write_selected_filters] = selected_filters_;
|
|
1475
1534
|
const { collapse: collapse , expand: expand , ExpandingContainer: ExpandingContainer } = (0, $4b455f60dadde8b8$export$5bad61ecde080b1f)({
|
|
@@ -1486,7 +1545,6 @@ function $235a2771a44e28e9$export$fecbb157621501bd({ number_of_rendered_selected
|
|
|
1486
1545
|
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($235a2771a44e28e9$var$_tmpl$2), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, [_el$5, _co$] = (0, $57o7A$solidjsweb.getNextMarker)(_el$4.nextSibling), _el$3 = _el$5.nextSibling, _el$7 = _el$2.nextSibling, [_el$8, _co$2] = (0, $57o7A$solidjsweb.getNextMarker)(_el$7.nextSibling);
|
|
1487
1546
|
(0, $57o7A$solidjsweb.insert)(_el$2, ()=>i18n_.selected_filters_title_(), _el$5, _co$);
|
|
1488
1547
|
(0, $57o7A$solidjsweb.insert)(_el$, (0, $57o7A$solidjsweb.createComponent)((0, $a0e53f99354809d9$export$6649caad96ef8870), {
|
|
1489
|
-
button_: slider_arrow_button_,
|
|
1490
1548
|
slider_ref_: (slider)=>slider.container.classList.add("filter-crumbs"),
|
|
1491
1549
|
get children () {
|
|
1492
1550
|
return [
|
|
@@ -1584,7 +1642,7 @@ function $235a2771a44e28e9$export$fecbb157621501bd({ number_of_rendered_selected
|
|
|
1584
1642
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
1585
1643
|
write_selected_filters(cloned_selected_filters);
|
|
1586
1644
|
};
|
|
1587
|
-
(0, $57o7A$solidjsweb.insert)(_el$9, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
1645
|
+
(0, $57o7A$solidjsweb.insert)(_el$9, (0, $57o7A$solidjsweb.createComponent)((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}), _el$25, _co$9);
|
|
1588
1646
|
(0, $57o7A$solidjsweb.insert)(_el$10, ()=>price_formatting_().pre_, _el$13, _co$3);
|
|
1589
1647
|
(0, $57o7A$solidjsweb.insert)(_el$10, (0, $57o7A$solidjsweb.createComponent)((0, $d659702496cb72ea$export$a71e92cfbb498adc), {
|
|
1590
1648
|
get price_ () {
|
|
@@ -1693,7 +1751,7 @@ function $235a2771a44e28e9$export$fecbb157621501bd({ number_of_rendered_selected
|
|
|
1693
1751
|
}
|
|
1694
1752
|
write_selected_filters(cloned_selected_filters);
|
|
1695
1753
|
}), true);
|
|
1696
|
-
(0, $57o7A$solidjsweb.insert)(_el$26, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
1754
|
+
(0, $57o7A$solidjsweb.insert)(_el$26, (0, $57o7A$solidjsweb.createComponent)((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}), _el$29, _co$10);
|
|
1697
1755
|
(0, $57o7A$solidjsweb.insert)(_el$27, name);
|
|
1698
1756
|
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
1699
1757
|
return _el$26;
|
|
@@ -1753,6 +1811,7 @@ function $235a2771a44e28e9$export$fecbb157621501bd({ number_of_rendered_selected
|
|
|
1753
1811
|
|
|
1754
1812
|
|
|
1755
1813
|
|
|
1814
|
+
|
|
1756
1815
|
async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_opts) {
|
|
1757
1816
|
const body = await (0, $57o7A$depictaiutilishared.observer).wait_for_element("body");
|
|
1758
1817
|
let dispose_and_remove;
|
|
@@ -1895,12 +1954,32 @@ const $b3cf6ca8dc0e9998$export$48513f6b9f8ce62d = (props)=>{
|
|
|
1895
1954
|
|
|
1896
1955
|
|
|
1897
1956
|
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
const $cc43b6428000c4bf$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg><path d="M10.173 5.548H5.5V.875c0-.075-.027-.14-.081-.193S5.301.601 5.226.601s-.14.027-.193.081-.081.118-.081.193v4.673H.274c-.075 0-.14.027-.193.081A.27.27 0 0 0 0 5.827c0 .075.027.14.081.193s.118.081.193.081h4.678v4.673c0 .075.027.14.081.193s.118.081.193.081.14-.027.193-.081.081-.118.081-.193V6.101h4.673a.27.27 0 0 0 .199-.081c.054-.054.08-.118.08-.193a.27.27 0 0 0-.279-.279z" fill="#000"></path></svg>`, 4);
|
|
1963
|
+
function $cc43b6428000c4bf$export$f21ab0717a89c77f(props) {
|
|
1964
|
+
return (()=>{
|
|
1965
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($cc43b6428000c4bf$var$_tmpl$);
|
|
1966
|
+
(0, $57o7A$solidjsweb.spread)(_el$, (0, $57o7A$solidjsweb.mergeProps)(props, {
|
|
1967
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
1968
|
+
"width": "11",
|
|
1969
|
+
"height": "12"
|
|
1970
|
+
}), true, true);
|
|
1971
|
+
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
1972
|
+
return _el$;
|
|
1973
|
+
})();
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
|
|
1898
1977
|
const $0fe1e7efdf4200d6$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button type="button" class="expand-filter"><!#><!/><span></span></button>`, 6);
|
|
1899
1978
|
function $0fe1e7efdf4200d6$export$ca21a16d65b3dd8({ show_extras_: [get_show_extras, set_show_extras] , i18n_: i18n_ }) {
|
|
1900
1979
|
return (()=>{
|
|
1901
1980
|
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($0fe1e7efdf4200d6$var$_tmpl$), _el$3 = _el$.firstChild, [_el$4, _co$] = (0, $57o7A$solidjsweb.getNextMarker)(_el$3.nextSibling), _el$2 = _el$4.nextSibling;
|
|
1902
1981
|
(0, $57o7A$solidjsweb.addEventListener)(_el$, "click", (0, $57o7A$depictaiutilishared.catchify)(()=>set_show_extras((p)=>!p)), true);
|
|
1903
|
-
(0, $57o7A$solidjsweb.insert)(_el$, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
1982
|
+
(0, $57o7A$solidjsweb.insert)(_el$, (0, $57o7A$solidjsweb.createComponent)((0, $cc43b6428000c4bf$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
1904
1983
|
(0, $57o7A$solidjsweb.insert)(_el$2, (()=>{
|
|
1905
1984
|
const _c$ = (0, $57o7A$solidjsweb.memo)(()=>!!get_show_extras());
|
|
1906
1985
|
return ()=>_c$() ? i18n_.view_less_() : i18n_.view_more_();
|
|
@@ -3127,6 +3206,20 @@ var $a636ca15e3d3570d$export$2e2bcd8739ae039 = {
|
|
|
3127
3206
|
|
|
3128
3207
|
|
|
3129
3208
|
|
|
3209
|
+
|
|
3210
|
+
|
|
3211
|
+
|
|
3212
|
+
const $0f4656eaf6c22d1d$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="16.8" height="14"><path d="M4.617 12.738a.48.48 0 0 1-.164-.027c-.051-.023-.094-.055-.129-.098L.125 8.414A.39.39 0 0 1 0 8.117c0-.113.039-.211.125-.293s.18-.125.293-.125.215.043.297.125l3.902 3.902L16.086.262c.082-.082.18-.125.297-.125s.211.043.293.125.125.184.125.301-.043.215-.125.297L4.914 12.613c-.039.043-.086.078-.141.098s-.102.027-.156.027zm0 0"></path></svg>`, 4);
|
|
3213
|
+
function $0f4656eaf6c22d1d$export$f2ca6fc699ca1fb4(props = {}) {
|
|
3214
|
+
return (()=>{
|
|
3215
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($0f4656eaf6c22d1d$var$_tmpl$);
|
|
3216
|
+
(0, $57o7A$solidjsweb.spread)(_el$, props, true, true);
|
|
3217
|
+
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
3218
|
+
return _el$;
|
|
3219
|
+
})();
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
|
|
3130
3223
|
const $b064919833b3e80b$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<span class="show-selected" aria-hidden="true"><span></span><!#><!/></span>`, 6);
|
|
3131
3224
|
function $b064919833b3e80b$export$53c59af873b303c9({ selected_filters_in_group_: selected_filters_in_group_ , i18n_: { price_formatting_: price_formatting_ } }) {
|
|
3132
3225
|
const [show_tick_icon, set_show_tick_icon] = (0, $57o7A$solidjs.createSignal)(false);
|
|
@@ -3186,7 +3279,7 @@ function $b064919833b3e80b$export$53c59af873b303c9({ selected_filters_in_group_:
|
|
|
3186
3279
|
return show_tick_icon();
|
|
3187
3280
|
},
|
|
3188
3281
|
get children () {
|
|
3189
|
-
return (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
3282
|
+
return (0, $57o7A$solidjsweb.createComponent)((0, $0f4656eaf6c22d1d$export$f2ca6fc699ca1fb4), {});
|
|
3190
3283
|
}
|
|
3191
3284
|
}), _el$4, _co$);
|
|
3192
3285
|
return _el$;
|
|
@@ -3294,6 +3387,7 @@ function $061ff5b4c3d36171$export$89c6019e4baa40b1(props) {
|
|
|
3294
3387
|
}
|
|
3295
3388
|
|
|
3296
3389
|
|
|
3390
|
+
|
|
3297
3391
|
const $aff9a96d30ed3563$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="filter-collapsible"></div>`, 2), $aff9a96d30ed3563$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="clear-group"><!#><!/><span></span></button>`, 6), $aff9a96d30ed3563$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="view-more-clear"><!#><!/><!#><!/></div>`, 6), $aff9a96d30ed3563$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="filter-collapsible-body"><div class="filter-part"></div><!#><!/></div>`, 6), $aff9a96d30ed3563$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<details class="filter-collapsible"></details>`, 2), $aff9a96d30ed3563$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<summary class="filter-group-summary"><div class="summary"><span></span><div class="selected-w-sign"><!#><!/><!#><!/></div></div></summary>`, 12), $aff9a96d30ed3563$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="ungrouped"></div>`, 2), $aff9a96d30ed3563$var$_tmpl$8 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="clear-all-filters major"></button>`, 2);
|
|
3298
3392
|
function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
|
|
3299
3393
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
@@ -3450,7 +3544,7 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
|
|
|
3450
3544
|
}
|
|
3451
3545
|
props.selected_filters_[1](new_filter_obj);
|
|
3452
3546
|
}), true);
|
|
3453
|
-
(0, $57o7A$solidjsweb.insert)(_el$5, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
3547
|
+
(0, $57o7A$solidjsweb.insert)(_el$5, (0, $57o7A$solidjsweb.createComponent)((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}), _el$8, _co$);
|
|
3454
3548
|
(0, $57o7A$solidjsweb.insert)(_el$6, ()=>props.i18n_.clear_individual_filter_());
|
|
3455
3549
|
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
3456
3550
|
return _el$5;
|
|
@@ -3690,6 +3784,45 @@ function $ca1176b694a6ee2e$export$fe334901e8bebd57() {
|
|
|
3690
3784
|
|
|
3691
3785
|
|
|
3692
3786
|
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
|
+
|
|
3790
|
+
|
|
3791
|
+
|
|
3792
|
+
const $f958b5ac0e4a78da$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" class="sort-icon"><path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zM9.449 3.5H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h1.398c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-1.051-.699h.703v-.699h-.703zm0 0"></path><path d="M10.852 6.301H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h2.801a.35.35 0 0 1 .348.352v1.398a.35.35 0 0 1-.348.352zm-2.453-.699H10.5v-.703H8.398zm3.851 3.5H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h4.199c.191 0 .352.156.352.352V8.75c0 .191-.16.352-.352.352zm-3.852-.703h3.5V7.7h-3.5zm5.25 3.499H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h5.598a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-5.25-.699H13.3V10.5H8.398zm0 0"></path></svg>`, 6);
|
|
3793
|
+
function $f958b5ac0e4a78da$export$da32f7add8a22e86(props = {}) {
|
|
3794
|
+
return (()=>{
|
|
3795
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($f958b5ac0e4a78da$var$_tmpl$);
|
|
3796
|
+
(0, $57o7A$solidjsweb.spread)(_el$, props, true, true);
|
|
3797
|
+
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
3798
|
+
return _el$;
|
|
3799
|
+
})();
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
|
|
3803
|
+
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
|
|
3807
|
+
const $046db47e0326c715$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" class="sort-icon"><path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zm3.25 1.644H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h1.398a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-1.051-.699h.703V10.5h-.703zm2.454-2.097H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h2.801a.35.35 0 0 1 .348.352V8.75c0 .191-.156.352-.348.352zm-2.453-.703H10.5V7.7H8.398zm3.851-2.098H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h4.199c.191 0 .352.156.352.352v1.398c0 .195-.16.352-.352.352zm-3.852-.699h3.5v-.703h-3.5zm5.25-2.102H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h5.598c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-5.25-.699H13.3v-.699H8.398zm0 0"></path></svg>`, 4);
|
|
3808
|
+
function $046db47e0326c715$export$d10e63059ddb9fd4(props = {}) {
|
|
3809
|
+
return (()=>{
|
|
3810
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($046db47e0326c715$var$_tmpl$);
|
|
3811
|
+
(0, $57o7A$solidjsweb.spread)(_el$, props, true, true);
|
|
3812
|
+
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
3813
|
+
return _el$;
|
|
3814
|
+
})();
|
|
3815
|
+
}
|
|
3816
|
+
|
|
3817
|
+
|
|
3818
|
+
|
|
3819
|
+
|
|
3820
|
+
const $02215fefc955d01e$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" class="filter-icon"><path d="M1.75 14.697c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246V8.75c0-.096.034-.178.103-.246s.15-.103.246-.103.178.034.246.103.103.15.103.246v5.599c0 .096-.034.178-.103.246s-.15.103-.246.103zm0-9.796c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246v-3.5c0-.1.034-.185.103-.253s.15-.103.246-.103.178.034.246.103.103.153.103.253v3.5c0 .096-.034.178-.103.246s-.15.103-.246.103zm.697 2.796H1.053c-.292 0-.54-.103-.745-.308S0 6.938 0 6.651s.103-.54.308-.745.453-.308.745-.308h1.395c.292 0 .54.103.745.308s.308.453.308.745-.103.533-.308.738-.453.308-.745.308zM1.053 6.303c-.1 0-.185.034-.253.103s-.103.15-.103.246.034.178.103.246S.952 7 1.053 7h1.395c.1 0 .185-.034.253-.103s.103-.15.103-.246-.034-.178-.103-.246-.153-.103-.253-.103H1.053zm5.599 8.395c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246v-2.796c0-.1.034-.184.103-.253s.15-.102.246-.102.178.034.246.102.103.153.103.253v2.796c0 .096-.034.178-.103.246s-.15.103-.246.103zm0-7c-.096 0-.178-.034-.246-.103s-.103-.15-.103-.246V1.053c0-.1.034-.185.103-.253s.15-.103.246-.103.178.034.246.103S7 .952 7 1.053v6.296c0 .096-.034.178-.103.246s-.15.103-.246.103zm.697 2.803H5.947c-.287 0-.533-.102-.738-.308s-.308-.453-.308-.745.103-.533.308-.738.451-.308.738-.308h1.401c.292 0 .54.103.745.308s.308.451.308.738-.103.54-.308.745-.453.308-.745.308zM5.947 9.099c-.096 0-.178.034-.246.103s-.103.15-.103.246.034.185.103.253.15.103.246.103h1.401c.096 0 .178-.034.246-.103s.103-.153.103-.253-.034-.178-.103-.246-.15-.103-.246-.103H5.947zm5.605 5.599c-.1 0-.184-.034-.253-.103s-.102-.15-.102-.246v-7c0-.096.034-.178.102-.246S11.453 7 11.553 7s.178.034.246.103.103.15.103.246v7c0 .096-.034.178-.103.246s-.15.103-.246.103zm0-11.197c-.1 0-.184-.034-.253-.103s-.102-.15-.102-.246V1.053c0-.1.034-.185.102-.253s.153-.103.253-.103.178.034.246.103.103.153.103.253v2.099c0 .096-.034.178-.103.246s-.15.103-.246.103zm.697 2.803h-1.401c-.287 0-.533-.103-.738-.308s-.308-.453-.308-.745.103-.54.308-.745.451-.308.738-.308h1.401c.292 0 .54.103.745.308s.308.453.308.745-.102.54-.308.745-.453.308-.745.308zm-1.401-1.401c-.096 0-.178.034-.246.103s-.102.15-.102.246.034.178.102.246.15.103.246.103h1.401c.096 0 .178-.034.246-.103s.102-.15.102-.246-.034-.178-.102-.246-.15-.103-.246-.103h-1.401z"></path></svg>`, 4);
|
|
3821
|
+
function $02215fefc955d01e$export$28f6150e232898de() {
|
|
3822
|
+
return (0, $57o7A$solidjsweb.getNextElement)($02215fefc955d01e$var$_tmpl$);
|
|
3823
|
+
}
|
|
3824
|
+
|
|
3825
|
+
|
|
3693
3826
|
const $1872ceb56ede7a52$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="clear minor"></button>`, 2), $1872ceb56ede7a52$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="depict plp depict-filter-sort-mobile-modal-container"><div class="depict-filter-sort-modal-backdrop"></div><button class="dismiss-modal"></button><div class="filter-sort-modal"><div class="body"><!#><!/><!#><!/></div><div class="bottom-row"><!#><!/><button class="show-results major"></button></div></div></div>`, 20), $1872ceb56ede7a52$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<details class="sorting"></details>`, 2), $1872ceb56ede7a52$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<summary class="sort-filter-summary"><div class="summary"><div class="left-els"><!#><!/><span></span></div><!#><!/></div></summary>`, 12), $1872ceb56ede7a52$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="body"></div>`, 2), $1872ceb56ede7a52$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<details class="filters"></details>`, 2), $1872ceb56ede7a52$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<b></b>`, 2);
|
|
3694
3827
|
const $1872ceb56ede7a52$var$no_go_selector = ".range .range-group";
|
|
3695
3828
|
function $1872ceb56ede7a52$export$9bf11afa910f536e({ args_for_sorting_: args_for_sorting_ , args_for_filtering_: args_for_filtering_ , search_filters_open_: [get_search_filters_open, set_search_filters_open] , search_sorting_open_: [get_search_sorting_open, set_search_sorting_open] , dismiss_modal_: dismiss_modal_ , register_closing_animation_: register_closing_animation_ , formatted_number_of_results_: formatted_number_of_results_ , i18n_: i18n_ }) {
|
|
@@ -3757,7 +3890,7 @@ function $1872ceb56ede7a52$export$9bf11afa910f536e({ args_for_sorting_: args_for
|
|
|
3757
3890
|
}));
|
|
3758
3891
|
}, _el$3);
|
|
3759
3892
|
(0, $57o7A$solidjsweb.addEventListener)(_el$3, "click", dismiss_modal_, true);
|
|
3760
|
-
(0, $57o7A$solidjsweb.insert)(_el$3, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
3893
|
+
(0, $57o7A$solidjsweb.insert)(_el$3, (0, $57o7A$solidjsweb.createComponent)((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}));
|
|
3761
3894
|
_el$4.$$touchstart = ({ changedTouches: changedTouches , target: target })=>{
|
|
3762
3895
|
// touchstart should always only have one changed touch, track it here
|
|
3763
3896
|
if (touches >= 1) {
|
|
@@ -3865,7 +3998,7 @@ function $1872ceb56ede7a52$export$9bf11afa910f536e({ args_for_sorting_: args_for
|
|
|
3865
3998
|
const _el$16 = (0, $57o7A$solidjsweb.getNextElement)($1872ceb56ede7a52$var$_tmpl$4), _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$20 = _el$18.firstChild, [_el$21, _co$4] = (0, $57o7A$solidjsweb.getNextMarker)(_el$20.nextSibling), _el$19 = _el$21.nextSibling, _el$22 = _el$18.nextSibling, [_el$23, _co$5] = (0, $57o7A$solidjsweb.getNextMarker)(_el$22.nextSibling);
|
|
3866
3999
|
(0, $57o7A$solidjsweb.insert)(_el$18, (()=>{
|
|
3867
4000
|
const _c$ = (0, $57o7A$solidjsweb.memo)(()=>args_for_sorting_.current_sorting_[0]()?.order === "asc");
|
|
3868
|
-
return ()=>_c$() ? (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4001
|
+
return ()=>_c$() ? (0, $57o7A$solidjsweb.createComponent)((0, $f958b5ac0e4a78da$export$da32f7add8a22e86), {}) : (0, $57o7A$solidjsweb.createComponent)((0, $046db47e0326c715$export$d10e63059ddb9fd4), {});
|
|
3869
4002
|
})(), _el$21, _co$4);
|
|
3870
4003
|
(0, $57o7A$solidjsweb.insert)(_el$19, ()=>i18n_.sorting_text_());
|
|
3871
4004
|
(0, $57o7A$solidjsweb.insert)(_el$17, (0, $57o7A$solidjsweb.createComponent)((0, $7567511a7c3e4bd7$export$e5c2828934226505), {
|
|
@@ -3894,7 +4027,7 @@ function $1872ceb56ede7a52$export$9bf11afa910f536e({ args_for_sorting_: args_for
|
|
|
3894
4027
|
get summary_ () {
|
|
3895
4028
|
return (()=>{
|
|
3896
4029
|
const _el$26 = (0, $57o7A$solidjsweb.getNextElement)($1872ceb56ede7a52$var$_tmpl$4), _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$30 = _el$28.firstChild, [_el$31, _co$6] = (0, $57o7A$solidjsweb.getNextMarker)(_el$30.nextSibling), _el$29 = _el$31.nextSibling, _el$32 = _el$28.nextSibling, [_el$33, _co$7] = (0, $57o7A$solidjsweb.getNextMarker)(_el$32.nextSibling);
|
|
3897
|
-
(0, $57o7A$solidjsweb.insert)(_el$28, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4030
|
+
(0, $57o7A$solidjsweb.insert)(_el$28, (0, $57o7A$solidjsweb.createComponent)((0, $02215fefc955d01e$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
3898
4031
|
(0, $57o7A$solidjsweb.insert)(_el$29, ()=>i18n_.filters_());
|
|
3899
4032
|
(0, $57o7A$solidjsweb.insert)(_el$27, (0, $57o7A$solidjsweb.createComponent)((0, $7567511a7c3e4bd7$export$e5c2828934226505), {
|
|
3900
4033
|
expanded_: filters_expanded,
|
|
@@ -4112,130 +4245,144 @@ function $70482f04605572e2$export$b288c38ae3fddb56({ available_filters_: availab
|
|
|
4112
4245
|
}
|
|
4113
4246
|
|
|
4114
4247
|
|
|
4115
|
-
|
|
4248
|
+
|
|
4249
|
+
|
|
4250
|
+
const $f49857214f7675b1$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><path d="M12.949 7.699H.352A.35.35 0 0 1 0 7.352.35.35 0 0 1 .352 7h12.598a.35.35 0 0 1 .352.352.35.35 0 0 1-.352.348zm0 0"></path></svg>`, 4);
|
|
4251
|
+
function $f49857214f7675b1$export$cb808a3c41736d8e() {
|
|
4252
|
+
return (0, $57o7A$solidjsweb.getNextElement)($f49857214f7675b1$var$_tmpl$);
|
|
4253
|
+
}
|
|
4254
|
+
|
|
4255
|
+
|
|
4256
|
+
|
|
4257
|
+
|
|
4258
|
+
|
|
4259
|
+
|
|
4260
|
+
const $f8f64d05c525825b$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="filters"><div class="body"></div></div>`, 4), $f8f64d05c525825b$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="sorting"><div class="body"></div></div>`, 4), $f8f64d05c525825b$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="sort-and-filter-buttons"><div class="outer"><div class="inner"><!#><!/><!#><!/><!#><!/></div></div></div>`, 12), $f8f64d05c525825b$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<span class="num-filters"></span>`, 2), $f8f64d05c525825b$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="open-filters-button-container"><!#><!/><button type="button"><!#><!/><span></span></button></div>`, 10), $f8f64d05c525825b$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="toggle-button for-sorting major-minor-transition"><span></span><!#><!/></button>`, 6);
|
|
4116
4261
|
function $f8f64d05c525825b$export$d7841e452f2e59a8({ current_sorting_: current_sorting_ , set_extra_els_in_results_container_: set_extra_els_in_results_container_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , set_sort_or_filter_open_: set_sort_or_filter_open_ , i18n_: i18n_ , available_sortings_: available_sortings_ , available_filters_: available_filters_ , expanded_filters_: expanded_filters_ , middle_elements_: middle_elements_ , input_modal_open_: input_modal_open_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , set_sort_and_filter_element_: set_sort_and_filter_element_ , formatted_number_of_results_: formatted_number_of_results_ , filter_button_width_: filter_button_width_ , sort_button_width_: sort_button_width_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ , get_extra_filters_button_: get_extra_filters_button_ , get_extra_sorting_button_: get_extra_sorting_button_ }) {
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4262
|
+
const Self = ()=>{
|
|
4263
|
+
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
4264
|
+
(0, $70482f04605572e2$export$b288c38ae3fddb56)({
|
|
4265
|
+
available_filters_: available_filters_,
|
|
4266
|
+
selected_filters_: selected_filters_,
|
|
4267
|
+
local_filter_cache_: local_filter_cache_
|
|
4268
|
+
});
|
|
4269
|
+
const cleanup_promise = new Promise((r)=>(0, $57o7A$solidjs.onCleanup)(r));
|
|
4270
|
+
const [filters_open, set_filters_open] = search_filters_open_;
|
|
4271
|
+
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4272
|
+
const [get_current_sorting_] = current_sorting_;
|
|
4273
|
+
const [is_small, set_is_small] = (0, $57o7A$solidjs.createSignal)(false);
|
|
4274
|
+
const dismiss_modal_ = (0, $57o7A$depictaiutilishared.catchify)(()=>{
|
|
4275
|
+
set_filters_open(false);
|
|
4276
|
+
set_sorting_open(false);
|
|
4277
|
+
});
|
|
4278
|
+
const meta_of_currently_selected_sorting_ = (0, $57o7A$solidjs.createMemo)(()=>available_sortings_()?.find?.((sorting)=>sorting.field === get_current_sorting_()?.field)?.meta);
|
|
4279
|
+
const filter_options = {
|
|
4280
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
4281
|
+
local_filter_cache_: local_filter_cache_,
|
|
4282
|
+
available_filters_: available_filters_,
|
|
4283
|
+
expanded_filters_: expanded_filters_,
|
|
4284
|
+
selected_filters_: selected_filters_,
|
|
4285
|
+
i18n_: i18n_
|
|
4286
|
+
};
|
|
4287
|
+
const sorting_options = {
|
|
4288
|
+
current_sorting_: current_sorting_,
|
|
4289
|
+
available_sortings_: available_sortings_,
|
|
4290
|
+
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
4291
|
+
};
|
|
4292
|
+
const make_open_filters_button = (adhere_to_width = false, is_tabbable = false)=>(0, $57o7A$solidjsweb.createComponent)($f8f64d05c525825b$var$OpenFiltersButton, {
|
|
4293
|
+
tabindex_: is_tabbable ? 0 : -1,
|
|
4294
|
+
i18n_: i18n_,
|
|
4295
|
+
search_filters_open_: search_filters_open_,
|
|
4296
|
+
search_sorting_open_: search_sorting_open_,
|
|
4297
|
+
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
4298
|
+
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
4136
4299
|
});
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
selected_filters_: selected_filters_,
|
|
4144
|
-
i18n_: i18n_
|
|
4145
|
-
};
|
|
4146
|
-
const sorting_options = {
|
|
4147
|
-
current_sorting_: current_sorting_,
|
|
4300
|
+
const make_open_sorting_button = (adhere_to_width = false, is_tabbable = false)=>(0, $57o7A$solidjsweb.createComponent)($f8f64d05c525825b$var$OpenSortingButton, {
|
|
4301
|
+
tabindex_: is_tabbable ? 0 : -1,
|
|
4302
|
+
i18n_: i18n_,
|
|
4303
|
+
get_current_sorting_: get_current_sorting_,
|
|
4304
|
+
search_filters_open_: search_filters_open_,
|
|
4305
|
+
search_sorting_open_: search_sorting_open_,
|
|
4148
4306
|
available_sortings_: available_sortings_,
|
|
4307
|
+
sort_button_width_: adhere_to_width ? sort_button_width_ : undefined,
|
|
4149
4308
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
4150
|
-
};
|
|
4151
|
-
const make_open_filters_button = (adhere_to_width = false, is_tabbable = false)=>(0, $57o7A$solidjsweb.createComponent)($f8f64d05c525825b$var$OpenFiltersButton, {
|
|
4152
|
-
tabindex_: is_tabbable ? 0 : -1,
|
|
4153
|
-
i18n_: i18n_,
|
|
4154
|
-
search_filters_open_: search_filters_open_,
|
|
4155
|
-
search_sorting_open_: search_sorting_open_,
|
|
4156
|
-
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
4157
|
-
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
4158
|
-
});
|
|
4159
|
-
const make_open_sorting_button = (adhere_to_width = false, is_tabbable = false)=>(0, $57o7A$solidjsweb.createComponent)($f8f64d05c525825b$var$OpenSortingButton, {
|
|
4160
|
-
tabindex_: is_tabbable ? 0 : -1,
|
|
4161
|
-
i18n_: i18n_,
|
|
4162
|
-
get_current_sorting_: get_current_sorting_,
|
|
4163
|
-
search_filters_open_: search_filters_open_,
|
|
4164
|
-
search_sorting_open_: search_sorting_open_,
|
|
4165
|
-
available_sortings_: available_sortings_,
|
|
4166
|
-
sort_button_width_: adhere_to_width ? sort_button_width_ : undefined,
|
|
4167
|
-
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
4168
|
-
});
|
|
4169
|
-
let open_modal_;
|
|
4170
|
-
let close_modal_;
|
|
4171
|
-
let grid_is_in_original_state = true;
|
|
4172
|
-
(0, $57o7A$solidjs.createComputed)(()=>{
|
|
4173
|
-
const fi_o = filters_open();
|
|
4174
|
-
const so_o = sorting_open();
|
|
4175
|
-
const i_s = is_small();
|
|
4176
|
-
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4177
|
-
if ((fi_o || so_o) && !i_s) {
|
|
4178
|
-
if (!grid_is_in_original_state) return;
|
|
4179
|
-
set_sort_or_filter_open_(true);
|
|
4180
|
-
grid_is_in_original_state = false;
|
|
4181
|
-
} else if (!grid_is_in_original_state) {
|
|
4182
|
-
set_sort_or_filter_open_(false);
|
|
4183
|
-
grid_is_in_original_state = true;
|
|
4184
|
-
}
|
|
4185
4309
|
});
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4310
|
+
let open_modal_;
|
|
4311
|
+
let close_modal_;
|
|
4312
|
+
let grid_is_in_original_state = true;
|
|
4313
|
+
(0, $57o7A$solidjs.createComputed)(()=>{
|
|
4314
|
+
const fi_o = filters_open();
|
|
4315
|
+
const so_o = sorting_open();
|
|
4316
|
+
const i_s = is_small();
|
|
4317
|
+
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4318
|
+
if ((fi_o || so_o) && !i_s) {
|
|
4319
|
+
if (!grid_is_in_original_state) return;
|
|
4320
|
+
set_sort_or_filter_open_(true);
|
|
4321
|
+
grid_is_in_original_state = false;
|
|
4322
|
+
} else if (!grid_is_in_original_state) {
|
|
4323
|
+
set_sort_or_filter_open_(false);
|
|
4324
|
+
grid_is_in_original_state = true;
|
|
4325
|
+
}
|
|
4326
|
+
});
|
|
4327
|
+
(0, $57o7A$solidjs.createEffect)(()=>{
|
|
4328
|
+
if (!filters_open() && !sorting_open()) {
|
|
4329
|
+
close_modal_?.();
|
|
4330
|
+
set_extra_els_in_results_container_("");
|
|
4331
|
+
} else if (is_small()) {
|
|
4332
|
+
if ((0, $57o7A$solidjs.untrack)(()=>input_modal_open_?.())) {
|
|
4333
|
+
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
4334
|
+
set_filters_open(false);
|
|
4335
|
+
set_sorting_open(false);
|
|
4336
|
+
return;
|
|
4211
4337
|
}
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4338
|
+
open_modal_?.();
|
|
4339
|
+
set_extra_els_in_results_container_("");
|
|
4340
|
+
} else {
|
|
4341
|
+
close_modal_?.();
|
|
4342
|
+
if (filters_open()) set_extra_els_in_results_container_((()=>{
|
|
4343
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($f8f64d05c525825b$var$_tmpl$), _el$2 = _el$.firstChild;
|
|
4344
|
+
(0, $57o7A$solidjsweb.insert)(_el$2, (0, $57o7A$solidjsweb.createComponent)((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), filter_options));
|
|
4345
|
+
return _el$;
|
|
4346
|
+
})());
|
|
4347
|
+
else set_extra_els_in_results_container_((()=>{
|
|
4348
|
+
const _el$3 = (0, $57o7A$solidjsweb.getNextElement)($f8f64d05c525825b$var$_tmpl$2), _el$4 = _el$3.firstChild;
|
|
4349
|
+
(0, $57o7A$solidjsweb.insert)(_el$4, (0, $57o7A$solidjsweb.createComponent)((0, $be89be42ce9ea60f$export$1f1775a58da589b5), sorting_options));
|
|
4350
|
+
return _el$3;
|
|
4351
|
+
})());
|
|
4352
|
+
}
|
|
4353
|
+
});
|
|
4354
|
+
(0, $57o7A$depictaiutilishared.catchify)(async ()=>{
|
|
4355
|
+
({ open_modal_: open_modal_ , close_modal_: close_modal_ } = await (0, $9abb0a35d4b60ed3$export$79b1565500412d9b)((0, $1872ceb56ede7a52$export$9bf11afa910f536e), {
|
|
4356
|
+
args_for_sorting_: sorting_options,
|
|
4357
|
+
args_for_filtering_: filter_options,
|
|
4358
|
+
search_filters_open_: search_filters_open_,
|
|
4359
|
+
search_sorting_open_: search_sorting_open_,
|
|
4360
|
+
formatted_number_of_results_: formatted_number_of_results_,
|
|
4361
|
+
dismiss_modal_: dismiss_modal_,
|
|
4362
|
+
i18n_: i18n_
|
|
4363
|
+
}));
|
|
4364
|
+
const { remove: remove } = (0, $57o7A$depictaiutilishared.javascript_media_query)("(max-width:651px)", ({ matches: matches })=>set_is_small(matches));
|
|
4365
|
+
cleanup_promise.then(remove);
|
|
4366
|
+
})();
|
|
4367
|
+
get_extra_filters_button_?.(make_open_filters_button());
|
|
4368
|
+
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
4369
|
+
return (()=>{
|
|
4370
|
+
const _el$5 = (0, $57o7A$solidjsweb.getNextElement)($f8f64d05c525825b$var$_tmpl$3), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, [_el$9, _co$] = (0, $57o7A$solidjsweb.getNextMarker)(_el$8.nextSibling), _el$10 = _el$9.nextSibling, [_el$11, _co$2] = (0, $57o7A$solidjsweb.getNextMarker)(_el$10.nextSibling), _el$12 = _el$11.nextSibling, [_el$13, _co$3] = (0, $57o7A$solidjsweb.getNextMarker)(_el$12.nextSibling);
|
|
4371
|
+
const _ref$ = set_sort_and_filter_element_;
|
|
4372
|
+
typeof _ref$ === "function" ? (0, $57o7A$solidjsweb.use)(_ref$, _el$5) : set_sort_and_filter_element_ = _el$5;
|
|
4373
|
+
(0, $57o7A$solidjsweb.insert)(_el$7, ()=>make_open_filters_button(true, true), _el$9, _co$);
|
|
4374
|
+
(0, $57o7A$solidjsweb.insert)(_el$7, ()=>middle_elements_?.(), _el$11, _co$2);
|
|
4375
|
+
(0, $57o7A$solidjsweb.insert)(_el$7, ()=>make_open_sorting_button(true, true), _el$13, _co$3);
|
|
4376
|
+
return _el$5;
|
|
4377
|
+
})();
|
|
4378
|
+
};
|
|
4379
|
+
return (0, $57o7A$solidjsweb.createComponent)((0, $edafe91daf3091d7$export$b69d0d92862de18b), {
|
|
4380
|
+
message_: "Sorting and filters failed",
|
|
4381
|
+
severity_: "error",
|
|
4382
|
+
get children () {
|
|
4383
|
+
return (0, $57o7A$solidjsweb.createComponent)(Self, {});
|
|
4237
4384
|
}
|
|
4238
|
-
})
|
|
4385
|
+
});
|
|
4239
4386
|
}
|
|
4240
4387
|
function $f8f64d05c525825b$var$OpenFiltersButton({ i18n_: i18n_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , filter_button_width_: filter_button_width_ , tabindex_: tabindex_ , number_of_rendered_selected_filters_items_: [num_selected_filters] }) {
|
|
4241
4388
|
const filters_closed = (0, $57o7A$solidjs.createMemo)(()=>!search_filters_open_[0]());
|
|
@@ -4262,15 +4409,16 @@ function $f8f64d05c525825b$var$OpenFiltersButton({ i18n_: i18n_ , search_filters
|
|
|
4262
4409
|
search_sorting_open_[1](false);
|
|
4263
4410
|
})), true);
|
|
4264
4411
|
(0, $57o7A$solidjsweb.setAttribute)(_el$16, "tabindex", tabindex_);
|
|
4412
|
+
(0, $57o7A$solidjsweb.className)(_el$16, "filter toggle-button major-minor-transition" + ((0, $57o7A$solidjsweb.isServer) ? " minor" : ""));
|
|
4265
4413
|
(0, $57o7A$solidjsweb.insert)(_el$16, (0, $57o7A$solidjsweb.createComponent)((0, $57o7A$solidjs.Show), {
|
|
4266
4414
|
get when () {
|
|
4267
4415
|
return filters_closed();
|
|
4268
4416
|
},
|
|
4269
4417
|
get fallback () {
|
|
4270
|
-
return (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4418
|
+
return (0, $57o7A$solidjsweb.createComponent)((0, $f49857214f7675b1$export$cb808a3c41736d8e), {});
|
|
4271
4419
|
},
|
|
4272
4420
|
get children () {
|
|
4273
|
-
return (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4421
|
+
return (0, $57o7A$solidjsweb.createComponent)((0, $02215fefc955d01e$export$28f6150e232898de), {});
|
|
4274
4422
|
}
|
|
4275
4423
|
}), _el$19, _co$4);
|
|
4276
4424
|
(0, $57o7A$solidjsweb.insert)(_el$17, ()=>i18n_.filter_text_());
|
|
@@ -4319,10 +4467,10 @@ function $f8f64d05c525825b$var$OpenSortingButton({ i18n_: i18n_ , get_current_so
|
|
|
4319
4467
|
return sorting_closed();
|
|
4320
4468
|
},
|
|
4321
4469
|
get fallback () {
|
|
4322
|
-
return (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4470
|
+
return (0, $57o7A$solidjsweb.createComponent)((0, $f49857214f7675b1$export$cb808a3c41736d8e), {});
|
|
4323
4471
|
},
|
|
4324
4472
|
get children () {
|
|
4325
|
-
return (0, $57o7A$solidjsweb.memo)(()=>get_current_sorting_()?.order === "asc")() ? (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4473
|
+
return (0, $57o7A$solidjsweb.memo)(()=>get_current_sorting_()?.order === "asc")() ? (0, $57o7A$solidjsweb.createComponent)((0, $f958b5ac0e4a78da$export$da32f7add8a22e86), {}) : (0, $57o7A$solidjsweb.createComponent)((0, $046db47e0326c715$export$d10e63059ddb9fd4), {});
|
|
4326
4474
|
}
|
|
4327
4475
|
}), _el$25, _co$6);
|
|
4328
4476
|
(0, $57o7A$solidjsweb.effect)((_p$)=>{
|
|
@@ -4363,8 +4511,21 @@ function $f8f64d05c525825b$var$OpenSortingButton({ i18n_: i18n_ , get_current_so
|
|
|
4363
4511
|
|
|
4364
4512
|
|
|
4365
4513
|
|
|
4514
|
+
|
|
4515
|
+
|
|
4516
|
+
|
|
4517
|
+
|
|
4518
|
+
|
|
4519
|
+
const $084b6a0ee1d481de$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><path d="M6.402.453L2.203 4.652a.35.35 0 0 0 0 .496c.137.137.359.137.492 0l3.605-3.605v11.406a.35.35 0 0 0 .348.352.35.35 0 0 0 .352-.352V1.543l3.602 3.605a.35.35 0 0 0 .496 0c.066-.07.102-.16.102-.25a.35.35 0 0 0-.102-.246L6.895.453c-.133-.137-.355-.137-.492 0zm0 0"></path></svg>`, 4);
|
|
4520
|
+
function $084b6a0ee1d481de$export$2624c5890f1bbcf7() {
|
|
4521
|
+
return (0, $57o7A$solidjsweb.getNextElement)($084b6a0ee1d481de$var$_tmpl$);
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
|
|
4525
|
+
|
|
4366
4526
|
const $2fb324fbcc7b4a7b$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="floating-buttons"><button class="filter"><div></div></button><button class="sort"><div></div></button><button class="up"><div></div></button></div>`, 14);
|
|
4367
4527
|
function $2fb324fbcc7b4a7b$export$b23abd26de154ede(props) {
|
|
4528
|
+
if (0, $57o7A$solidjsweb.isServer) return; // won't show in initial render and need scroll position
|
|
4368
4529
|
const [is_small, set_is_small] = (0, $57o7A$solidjs.createSignal)(true);
|
|
4369
4530
|
(0, $57o7A$solidjs.onCleanup)((0, $57o7A$depictaiutilishared.javascript_media_query)("(max-width:651px)", ({ matches: matches })=>set_is_small(matches)).remove);
|
|
4370
4531
|
return (0, $57o7A$solidjsweb.createComponent)((0, $57o7A$solidjs.Show), {
|
|
@@ -4453,20 +4614,20 @@ function $2fb324fbcc7b4a7b$var$ActualFloatingButtons({ search_filters_open_: [ge
|
|
|
4453
4614
|
set_search_filters_open_(true);
|
|
4454
4615
|
set_search_sorting_open_(false);
|
|
4455
4616
|
}), true);
|
|
4456
|
-
(0, $57o7A$solidjsweb.insert)(_el$3, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4617
|
+
(0, $57o7A$solidjsweb.insert)(_el$3, (0, $57o7A$solidjsweb.createComponent)((0, $02215fefc955d01e$export$28f6150e232898de), {}));
|
|
4457
4618
|
(0, $57o7A$solidjsweb.addEventListener)(_el$4, "click", (0, $57o7A$depictaiutilishared.catchify)(()=>{
|
|
4458
4619
|
set_search_filters_open_(false);
|
|
4459
4620
|
set_search_sorting_open_(true);
|
|
4460
4621
|
}), true);
|
|
4461
4622
|
(0, $57o7A$solidjsweb.insert)(_el$5, (()=>{
|
|
4462
4623
|
const _c$ = (0, $57o7A$solidjsweb.memo)(()=>current_sorting_[0]()?.order === "asc");
|
|
4463
|
-
return ()=>_c$() ? (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4624
|
+
return ()=>_c$() ? (0, $57o7A$solidjsweb.createComponent)((0, $f958b5ac0e4a78da$export$da32f7add8a22e86), {}) : (0, $57o7A$solidjsweb.createComponent)((0, $046db47e0326c715$export$d10e63059ddb9fd4), {});
|
|
4464
4625
|
})());
|
|
4465
4626
|
(0, $57o7A$solidjsweb.addEventListener)(_el$6, "click", (0, $57o7A$depictaiutilishared.catchify)(()=>scrollTo({
|
|
4466
4627
|
top: 0,
|
|
4467
4628
|
behavior: "smooth"
|
|
4468
4629
|
})), true);
|
|
4469
|
-
(0, $57o7A$solidjsweb.insert)(_el$7, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
4630
|
+
(0, $57o7A$solidjsweb.insert)(_el$7, (0, $57o7A$solidjsweb.createComponent)((0, $084b6a0ee1d481de$export$2624c5890f1bbcf7), {}));
|
|
4470
4631
|
(0, $57o7A$solidjsweb.effect)((_p$)=>{
|
|
4471
4632
|
const _v$ = !!(is_scrolling_upwards() && modal_is_closed() && !regular_buttons_are_in_view() && !get_is_showing_toast()), _v$2 = i18n_.filter_text_(), _v$3 = i18n_.sorting_text_(), _v$4 = i18n_.scroll_to_top_();
|
|
4472
4633
|
_v$ !== _p$._v$ && _el$.classList.toggle("show-them", _p$._v$ = _v$);
|
|
@@ -4734,7 +4895,7 @@ function $e53b2e7e632ac4cb$export$5646050d516e06bc({ crumb_data_: get_api_crumb_
|
|
|
4734
4895
|
|
|
4735
4896
|
|
|
4736
4897
|
const $8cceb1d3a967f369$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<nav class="quicklinks"></nav>`, 2), $8cceb1d3a967f369$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div>QuickLinks failed</div>`, 2), $8cceb1d3a967f369$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<a class="quicklink"></a>`, 2);
|
|
4737
|
-
function $8cceb1d3a967f369$export$466cdc317043f6cb({ quicklinks_data_: quicklinks_data_ , router_: router_ , current_query_id_: current_query_id_ ,
|
|
4898
|
+
function $8cceb1d3a967f369$export$466cdc317043f6cb({ quicklinks_data_: quicklinks_data_ , router_: router_ , current_query_id_: current_query_id_ , breadcrumb_data_: breadcrumb_data_ , i18n_: i18n_ }) {
|
|
4738
4899
|
let scrolling_logic_ran_for_query_id = false;
|
|
4739
4900
|
let last_scroll_position;
|
|
4740
4901
|
let scroll_to_element_on_dom_insertion;
|
|
@@ -4791,7 +4952,6 @@ function $8cceb1d3a967f369$export$466cdc317043f6cb({ quicklinks_data_: quicklink
|
|
|
4791
4952
|
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($8cceb1d3a967f369$var$_tmpl$);
|
|
4792
4953
|
(0, $57o7A$solidjsweb.insert)(_el$, (0, $57o7A$solidjsweb.createComponent)((0, $a0e53f99354809d9$export$6649caad96ef8870), {
|
|
4793
4954
|
faded_opacity_: 0.5,
|
|
4794
|
-
button_: slider_arrow_button_,
|
|
4795
4955
|
mutation_plugins_: mutation_plugins,
|
|
4796
4956
|
slider_ref_: (slider)=>{
|
|
4797
4957
|
const { insert_here: insert_here , intersecting_items_object: intersecting_items_object } = slider;
|
|
@@ -5144,8 +5304,9 @@ function $cafad5eca9f09cb5$export$d4fc5c0e68a52116(el, query_id_, i18n_) {
|
|
|
5144
5304
|
|
|
5145
5305
|
|
|
5146
5306
|
|
|
5307
|
+
|
|
5147
5308
|
const $840d88a04b2d22a7$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="product-count"><!#><!/> <!#><!/></div>`, 6), $840d88a04b2d22a7$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div></div>`, 2), $840d88a04b2d22a7$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="filter-results-for-one-row"><!#><!/><!#><!/></div>`, 6), $840d88a04b2d22a7$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="depict plp category"><div class="listing-page"><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/></div><!#><!/><!#><!/></div>`, 20);
|
|
5148
|
-
function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , category_filters_open_: category_filters_open_ , category_sorting_open_: category_sorting_open_ , expanded_filters_: expanded_filters_ , selected_filters_: selected_filters_ , get_quicklinks_accessor_: get_quicklinks_accessor_ , i18n_: incoming_i18n , get_breadcrumb_accessor_: get_breadcrumb_accessor_ ,
|
|
5309
|
+
function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , category_filters_open_: category_filters_open_ , category_sorting_open_: category_sorting_open_ , expanded_filters_: expanded_filters_ , selected_filters_: selected_filters_ , get_quicklinks_accessor_: get_quicklinks_accessor_ , i18n_: incoming_i18n , get_breadcrumb_accessor_: get_breadcrumb_accessor_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , local_filter_cache_: local_filter_cache_ , tenant_: tenant_ , market_: market_ , router_: router_ , show_quicklinks_: show_quicklinks_ , category_title_: category_title_ , show_breadcrumbs_: show_breadcrumbs_ , layout_options_: layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ }) {
|
|
5149
5310
|
let results_for;
|
|
5150
5311
|
let only_show_filters_opener_;
|
|
5151
5312
|
let middle_elements_;
|
|
@@ -5297,17 +5458,18 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5297
5458
|
(0, $57o7A$solidjs.createRenderEffect)((0, $57o7A$depictaiutilishared.catchify)(async ()=>{
|
|
5298
5459
|
const slim = is_slim_();
|
|
5299
5460
|
const only_show_filters_opener = only_show_filters_opener_?.();
|
|
5461
|
+
const owner = (0, $57o7A$solidjs.getOwner)();
|
|
5300
5462
|
await set_results_filters(); // remove elements, wait one microtask for updates to have been committed to the DOM, otherwise we'd try to do illegal DOM operations
|
|
5301
5463
|
// signals can't be read reactively anymore after the await FYI
|
|
5302
|
-
set_results_filters(slim ? only_show_filters_opener ? filters_opener : [
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5464
|
+
(0, $57o7A$solidjs.runWithOwner)(owner, ()=>set_results_filters(slim ? only_show_filters_opener ? filters_opener : [
|
|
5465
|
+
results_for,
|
|
5466
|
+
filters_opener
|
|
5467
|
+
] : (()=>{
|
|
5468
|
+
const _el$8 = (0, $57o7A$solidjsweb.getNextElement)($840d88a04b2d22a7$var$_tmpl$3), _el$9 = _el$8.firstChild, [_el$10, _co$3] = (0, $57o7A$solidjsweb.getNextMarker)(_el$9.nextSibling), _el$11 = _el$10.nextSibling, [_el$12, _co$4] = (0, $57o7A$solidjsweb.getNextMarker)(_el$11.nextSibling);
|
|
5469
|
+
(0, $57o7A$solidjsweb.insert)(_el$8, results_for, _el$10, _co$3);
|
|
5470
|
+
(0, $57o7A$solidjsweb.insert)(_el$8, filters_opener, _el$12, _co$4);
|
|
5471
|
+
return _el$8;
|
|
5472
|
+
})()));
|
|
5311
5473
|
}));
|
|
5312
5474
|
(0, $6b384adf40a5f4d7$export$e702733a056c40d6)({
|
|
5313
5475
|
selected_filters_: selected_filters_,
|
|
@@ -5326,7 +5488,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5326
5488
|
get_breadcrumb_accessor_?.(crumb_data_);
|
|
5327
5489
|
get_quicklinks_accessor_?.(quicklinks_data_);
|
|
5328
5490
|
return [
|
|
5329
|
-
document.createComment("Category page based on Depict SDK"),
|
|
5491
|
+
(0, $57o7A$solidjsweb.isServer) ? "<!-- Category page based on Depict SDK -->" : document.createComment("Category page based on Depict SDK"),
|
|
5330
5492
|
(()=>{
|
|
5331
5493
|
const _el$13 = (0, $57o7A$solidjsweb.getNextElement)($840d88a04b2d22a7$var$_tmpl$4), _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, [_el$16, _co$5] = (0, $57o7A$solidjsweb.getNextMarker)(_el$15.nextSibling), _el$17 = _el$16.nextSibling, [_el$18, _co$6] = (0, $57o7A$solidjsweb.getNextMarker)(_el$17.nextSibling), _el$19 = _el$18.nextSibling, [_el$20, _co$7] = (0, $57o7A$solidjsweb.getNextMarker)(_el$19.nextSibling), _el$21 = _el$20.nextSibling, [_el$22, _co$8] = (0, $57o7A$solidjsweb.getNextMarker)(_el$21.nextSibling), _el$23 = _el$22.nextSibling, [_el$24, _co$9] = (0, $57o7A$solidjsweb.getNextMarker)(_el$23.nextSibling), _el$25 = _el$24.nextSibling, [_el$26, _co$10] = (0, $57o7A$solidjsweb.getNextMarker)(_el$25.nextSibling), _el$27 = _el$14.nextSibling, [_el$28, _co$11] = (0, $57o7A$solidjsweb.getNextMarker)(_el$27.nextSibling), _el$29 = _el$28.nextSibling, [_el$30, _co$12] = (0, $57o7A$solidjsweb.getNextMarker)(_el$29.nextSibling);
|
|
5332
5494
|
(0, $57o7A$solidjsweb.use)((el)=>process.env.NODE_ENV === "development" && (0, $cafad5eca9f09cb5$export$d4fc5c0e68a52116)(el, query_id_, i18n_), _el$13);
|
|
@@ -5347,7 +5509,6 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5347
5509
|
quicklinks_data_: quicklinks_data_,
|
|
5348
5510
|
current_query_id_: query_id_,
|
|
5349
5511
|
router_: router_,
|
|
5350
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
5351
5512
|
breadcrumb_data_: crumb_data_,
|
|
5352
5513
|
i18n_: i18n_
|
|
5353
5514
|
});
|
|
@@ -5368,7 +5529,6 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5368
5529
|
i18n_: i18n_,
|
|
5369
5530
|
selected_filters_: selected_filters_,
|
|
5370
5531
|
local_filter_cache_: local_filter_cache_,
|
|
5371
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
5372
5532
|
search_filters_open_: category_filters_open_,
|
|
5373
5533
|
search_sorting_open_: category_sorting_open_,
|
|
5374
5534
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
@@ -5441,7 +5601,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5441
5601
|
|
|
5442
5602
|
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
5443
5603
|
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
5444
|
-
if ($d84fe647b84b5dc5$var$has_ran) return;
|
|
5604
|
+
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
5445
5605
|
$d84fe647b84b5dc5$var$has_ran = true;
|
|
5446
5606
|
for (const function_name of [
|
|
5447
5607
|
"replaceState",
|
|
@@ -5547,8 +5707,7 @@ function $0785f4c9947d9b5f$export$f091cbac892643a4(obj) {
|
|
|
5547
5707
|
|
|
5548
5708
|
function $95837413165cc2df$export$23fca46f3143581f(component, error_message) {
|
|
5549
5709
|
const component_in_error_boundary = (do_with_elements)=>{
|
|
5550
|
-
|
|
5551
|
-
return (0, $edafe91daf3091d7$export$b69d0d92862de18b)({
|
|
5710
|
+
const error_boundary_wrapped = (0, $edafe91daf3091d7$export$b69d0d92862de18b)({
|
|
5552
5711
|
severity_: "error",
|
|
5553
5712
|
message_: error_message,
|
|
5554
5713
|
get children () {
|
|
@@ -5556,7 +5715,12 @@ function $95837413165cc2df$export$23fca46f3143581f(component, error_message) {
|
|
|
5556
5715
|
do_with_elements?.(elements);
|
|
5557
5716
|
return elements;
|
|
5558
5717
|
}
|
|
5559
|
-
})
|
|
5718
|
+
});
|
|
5719
|
+
// This might return an accessor, in that case we need to "unwrap" it since our SDK consumers expect HTML elements or arrays thereof
|
|
5720
|
+
if (typeof error_boundary_wrapped === "function") // @ts-ignore
|
|
5721
|
+
return error_boundary_wrapped();
|
|
5722
|
+
// On the server it returns a string, so we just return that
|
|
5723
|
+
return error_boundary_wrapped;
|
|
5560
5724
|
};
|
|
5561
5725
|
const owner = (0, $57o7A$solidjs.getOwner)();
|
|
5562
5726
|
if (owner == null) return (0, $57o7A$solidjs.createRoot)((dispose)=>{
|
|
@@ -5586,7 +5750,7 @@ function $c79fd10a3ab7d6e0$export$477caf01aecaeb2a(options) {
|
|
|
5586
5750
|
const [get_sorting_, set_sorting] = current_sorting_;
|
|
5587
5751
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
5588
5752
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
5589
|
-
const [get_current_href, set_current_href] = (0, $57o7A$solidjs.createSignal)(location.
|
|
5753
|
+
const [get_current_href, set_current_href] = (0, $57o7A$solidjs.createSignal)(globalThis?.location?.href ?? "https://example.com");
|
|
5590
5754
|
const history_change_handler = (0, $57o7A$depictaiutilishared.catchify)(()=>set_current_href(location.href));
|
|
5591
5755
|
const owner = (0, $57o7A$solidjs.getOwner)() || (0, $57o7A$solidjs.createRoot)(()=>(0, $57o7A$solidjs.getOwner)());
|
|
5592
5756
|
let writer_started = false;
|
|
@@ -5722,7 +5886,7 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
5722
5886
|
* Call this if you *just* want to replace the state object in history.state
|
|
5723
5887
|
*/ replace_state_: (new_state)=>{
|
|
5724
5888
|
// This doesn't break any router, so we just do this directly for now, since many don't expose an interface for changing the state
|
|
5725
|
-
history
|
|
5889
|
+
globalThis?.history?.replaceState(new_state, "");
|
|
5726
5890
|
},
|
|
5727
5891
|
/**
|
|
5728
5892
|
* Call this to change the URL
|
|
@@ -5764,6 +5928,7 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
5764
5928
|
}
|
|
5765
5929
|
|
|
5766
5930
|
|
|
5931
|
+
|
|
5767
5932
|
const $48567ac5b39bac56$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="depict plp category"></div>`, 2);
|
|
5768
5933
|
const $48567ac5b39bac56$var$min_products_to_fetch_ = 20;
|
|
5769
5934
|
const $48567ac5b39bac56$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
@@ -5815,7 +5980,8 @@ class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
|
5815
5980
|
constructor({ api: api , on_navigation: on_navigation , ...props_on_class }){
|
|
5816
5981
|
const owner = (0, $57o7A$solidjs.getOwner)() || (0, $57o7A$solidjs.createRoot)(()=>(0, $57o7A$solidjs.getOwner)()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
|
|
5817
5982
|
(0, $57o7A$solidjs.runWithOwner)(owner, ()=>{
|
|
5818
|
-
if ($48567ac5b39bac56$export$f34314aa9505732e.#has_been_constructed
|
|
5983
|
+
if ($48567ac5b39bac56$export$f34314aa9505732e.#has_been_constructed && !(0, $57o7A$solidjsweb.isServer)) // on the server we can't write stuff to history.state anyway so can have multiple
|
|
5984
|
+
throw new Error("You can only have one instance of DepictCategory due to state limitations");
|
|
5819
5985
|
$48567ac5b39bac56$export$f34314aa9505732e.#has_been_constructed = true;
|
|
5820
5986
|
Object.assign(this, props_on_class); // set initial signal values
|
|
5821
5987
|
(0, $d84fe647b84b5dc5$export$5162a71f252e6122)();
|
|
@@ -5843,11 +6009,7 @@ class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
|
5843
6009
|
router_: this.#router,
|
|
5844
6010
|
selected_filters_: selected_filters_,
|
|
5845
6011
|
current_sorting_: current_sorting_,
|
|
5846
|
-
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
5847
|
-
slider_arrow_button_: (0, $57o7A$depictaiutilishared.GenericSliderArrowButton)({
|
|
5848
|
-
height_: 12,
|
|
5849
|
-
width_: 6.46
|
|
5850
|
-
})
|
|
6012
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
5851
6013
|
});
|
|
5852
6014
|
});
|
|
5853
6015
|
}
|
|
@@ -5861,7 +6023,7 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5861
6023
|
grid_spacing: grid_spacing.horizontal
|
|
5862
6024
|
};
|
|
5863
6025
|
return (0, $95837413165cc2df$export$23fca46f3143581f)(()=>{
|
|
5864
|
-
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ ,
|
|
6026
|
+
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ } = shared_properties;
|
|
5865
6027
|
(0, $57o7A$solidjs.onCleanup)(reset_history_state_);
|
|
5866
6028
|
return (0, $840d88a04b2d22a7$export$f7d2f673fc2f091d)({
|
|
5867
6029
|
tenant_: ()=>depict_category.merchant,
|
|
@@ -5880,7 +6042,6 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5880
6042
|
get_quicklinks_accessor_: (accessor)=>(0, $57o7A$solidjs.createComputed)(()=>quicklinks_signal_[1](accessor())),
|
|
5881
6043
|
category_filters_open_: category_filters_open_,
|
|
5882
6044
|
category_sorting_open_: category_sorting_open_,
|
|
5883
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
5884
6045
|
expanded_filters_: expanded_filters_,
|
|
5885
6046
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
5886
6047
|
selected_filters_: selected_filters_,
|
|
@@ -5907,7 +6068,7 @@ function $48567ac5b39bac56$export$5b7c3ce0ebe51f86({ depict_category: depict_cat
|
|
|
5907
6068
|
});
|
|
5908
6069
|
}
|
|
5909
6070
|
function $48567ac5b39bac56$export$de035477d6fef996({ depict_category: depict_category }) {
|
|
5910
|
-
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , router_: router_
|
|
6071
|
+
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , router_: router_ } = $48567ac5b39bac56$var$get_shared_properties(depict_category);
|
|
5911
6072
|
return (0, $57o7A$solidjsweb.createComponent)($48567ac5b39bac56$var$InExternalAreaDiv, {
|
|
5912
6073
|
get children () {
|
|
5913
6074
|
return (0, $8cceb1d3a967f369$export$466cdc317043f6cb)({
|
|
@@ -5915,7 +6076,6 @@ function $48567ac5b39bac56$export$de035477d6fef996({ depict_category: depict_cat
|
|
|
5915
6076
|
quicklinks_data_: quicklinks_data_,
|
|
5916
6077
|
router_: router_,
|
|
5917
6078
|
current_query_id_: ()=>depict_category.category_id,
|
|
5918
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
5919
6079
|
breadcrumb_data_: breadcrumb_data_
|
|
5920
6080
|
});
|
|
5921
6081
|
}
|
|
@@ -6049,9 +6209,9 @@ const $93e94e7b0aa8ca88$export$824dde41348efed1 = /*@__PURE__*/ (()=>{
|
|
|
6049
6209
|
|
|
6050
6210
|
const $7b4bc889571cc67b$var$TEN_MINUTES = 600000;
|
|
6051
6211
|
const $7b4bc889571cc67b$var$TWENTY_FOUR_HOURS = 86400000;
|
|
6052
|
-
async function $7b4bc889571cc67b$export$643598a327b5833e(tenant, market) {
|
|
6212
|
+
async function $7b4bc889571cc67b$export$643598a327b5833e(tenant, market, type) {
|
|
6053
6213
|
let localstorage_value;
|
|
6054
|
-
const localstorage_key = `
|
|
6214
|
+
const localstorage_key = `depict_${tenant}_${type ?? "categories"}_` + market;
|
|
6055
6215
|
try {
|
|
6056
6216
|
const in_ls = localStorage[localstorage_key];
|
|
6057
6217
|
if (in_ls) localstorage_value = JSON.parse(in_ls);
|
|
@@ -6067,7 +6227,7 @@ async function $7b4bc889571cc67b$export$643598a327b5833e(tenant, market) {
|
|
|
6067
6227
|
return stored_queries;
|
|
6068
6228
|
else if (age < $7b4bc889571cc67b$var$TWENTY_FOUR_HOURS) {
|
|
6069
6229
|
// if younger than a day, return stored value but still trigger re-fetch, so we have fresh data next page load (stale data this one but never a delay)
|
|
6070
|
-
$7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market, localstorage_key).catch((e)=>(0, $57o7A$depictaiutilishared.report)([
|
|
6230
|
+
$7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market, localstorage_key, type).catch((e)=>(0, $57o7A$depictaiutilishared.report)([
|
|
6071
6231
|
e,
|
|
6072
6232
|
"couldn't fetch categories"
|
|
6073
6233
|
], "warning"));
|
|
@@ -6075,10 +6235,10 @@ async function $7b4bc889571cc67b$export$643598a327b5833e(tenant, market) {
|
|
|
6075
6235
|
}
|
|
6076
6236
|
// else: we are older and just fetch, store and return new queries
|
|
6077
6237
|
}
|
|
6078
|
-
return await $7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market, localstorage_key);
|
|
6238
|
+
return await $7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market, localstorage_key, type);
|
|
6079
6239
|
}
|
|
6080
|
-
async function $7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market, localstorage_key) {
|
|
6081
|
-
const new_categories = await $7b4bc889571cc67b$var$download_categories(tenant, market);
|
|
6240
|
+
async function $7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market, localstorage_key, type) {
|
|
6241
|
+
const new_categories = await $7b4bc889571cc67b$var$download_categories(tenant, market, type);
|
|
6082
6242
|
try {
|
|
6083
6243
|
localStorage[localstorage_key] = JSON.stringify({
|
|
6084
6244
|
updated: +new Date(),
|
|
@@ -6092,12 +6252,15 @@ async function $7b4bc889571cc67b$var$fetch_and_store_categories(tenant, market,
|
|
|
6092
6252
|
}
|
|
6093
6253
|
return new_categories;
|
|
6094
6254
|
}
|
|
6095
|
-
async function $7b4bc889571cc67b$var$download_categories(tenant, market) {
|
|
6255
|
+
async function $7b4bc889571cc67b$var$download_categories(tenant, market, type) {
|
|
6096
6256
|
const fetched = await (0, $57o7A$depictaiutilishared.fetch_retry)((0, $57o7A$depictaiutilishared.base_url) + "/v2/product-listing/queries", {
|
|
6097
6257
|
method: "POST",
|
|
6098
6258
|
body: JSON.stringify({
|
|
6099
6259
|
tenant: tenant,
|
|
6100
|
-
market: market
|
|
6260
|
+
market: market,
|
|
6261
|
+
...type ? {
|
|
6262
|
+
type: type
|
|
6263
|
+
} : {}
|
|
6101
6264
|
})
|
|
6102
6265
|
});
|
|
6103
6266
|
if (!fetched) return [];
|
|
@@ -6227,6 +6390,35 @@ function $dae23104ba8bb78c$export$d757d54550ebfb3d({ category_suggestion_: categ
|
|
|
6227
6390
|
|
|
6228
6391
|
|
|
6229
6392
|
|
|
6393
|
+
|
|
6394
|
+
|
|
6395
|
+
const $3df11fc61432d1fd$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><path d="M.773 7.371L7.98.176C8.098.059 8.238 0 8.402 0s.305.059.422.176S9 .434 9 .598s-.059.305-.176.422L2.648 7.195h19.547a.59.59 0 0 1 .609.609c0 .172-.059.305-.176.422s-.262.176-.434.176H2.648l6.176 6.176a.59.59 0 0 1 .176.426c0 .16-.059.301-.176.422-.055.059-.121.109-.199.137s-.148.039-.223.039-.156-.012-.234-.039a.54.54 0 0 1-.187-.137L.773 8.227c-.117-.117-.176-.258-.176-.422a.6.6 0 0 1 .176-.434zm0 0"></path></svg>`, 4);
|
|
6396
|
+
function $3df11fc61432d1fd$export$1c641004b5485fed() {
|
|
6397
|
+
return (0, $57o7A$solidjsweb.getNextElement)($3df11fc61432d1fd$var$_tmpl$);
|
|
6398
|
+
}
|
|
6399
|
+
|
|
6400
|
+
|
|
6401
|
+
|
|
6402
|
+
|
|
6403
|
+
|
|
6404
|
+
|
|
6405
|
+
|
|
6406
|
+
|
|
6407
|
+
const $87d7574e1d89d69b$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg><path d="M19.811 20.174l-6.234-6.809a7.96 7.96 0 0 0 .923-1.179c.274-.424.502-.865.687-1.323a8.04 8.04 0 0 0 .42-1.436 7.88 7.88 0 0 0 .144-1.507c0-.526-.051-1.042-.154-1.548-.096-.506-.243-.995-.441-1.466s-.441-.919-.728-1.343a8.28 8.28 0 0 0-.984-1.21 7.86 7.86 0 0 0-1.2-.984A7.56 7.56 0 0 0 10.89.651C10.418.453 9.929.302 9.423.2S8.401.046 7.875.046 6.833.097 6.327.2 5.332.453 4.86.651a7.56 7.56 0 0 0-1.354.718c-.431.287-.831.615-1.2.984a8.28 8.28 0 0 0-.984 1.21 7.73 7.73 0 0 0-.728 1.343c-.198.472-.349.96-.451 1.466A8.31 8.31 0 0 0 0 7.921a8.31 8.31 0 0 0 .144 1.548c.103.506.253.995.451 1.466a8.08 8.08 0 0 0 .728 1.354 7.86 7.86 0 0 0 .984 1.2 7.54 7.54 0 0 0 1.2.995c.431.287.882.53 1.354.728.472.191.96.338 1.466.441a8.31 8.31 0 0 0 1.548.144c.451 0 .896-.038 1.333-.113a7.83 7.83 0 0 0 1.282-.328 7.55 7.55 0 0 0 1.2-.533 8.08 8.08 0 0 0 1.107-.749l6.245 6.809a.45.45 0 0 0 .174.123.55.55 0 0 0 .205.041.61.61 0 0 0 .195-.031c.061-.021.116-.055.164-.102.109-.096.164-.219.164-.369.007-.144-.038-.267-.133-.369zM1.046 7.921c0-.937.178-1.818.533-2.646.362-.834.851-1.559 1.466-2.174.622-.615 1.347-1.101 2.174-1.456.827-.362 1.712-.543 2.656-.543s1.829.181 2.656.543c.827.355 1.548.841 2.164 1.456.622.615 1.111 1.34 1.466 2.174a6.52 6.52 0 0 1 .543 2.646c0 .943-.181 1.829-.543 2.656a6.89 6.89 0 0 1-1.466 2.174c-.615.615-1.336 1.104-2.164 1.466-.827.356-1.712.533-2.656.533s-1.829-.178-2.656-.533c-.827-.362-1.552-.851-2.174-1.466-.615-.622-1.104-1.347-1.466-2.174-.355-.827-.533-1.712-.533-2.656z"></path></svg>`, 4);
|
|
6408
|
+
function $87d7574e1d89d69b$export$82eafebb825fc23f(props = {}) {
|
|
6409
|
+
return (()=>{
|
|
6410
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($87d7574e1d89d69b$var$_tmpl$);
|
|
6411
|
+
(0, $57o7A$solidjsweb.spread)(_el$, (0, $57o7A$solidjsweb.mergeProps)(props, {
|
|
6412
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
6413
|
+
"width": "20",
|
|
6414
|
+
"height": "22"
|
|
6415
|
+
}), true, true);
|
|
6416
|
+
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
6417
|
+
return _el$;
|
|
6418
|
+
})();
|
|
6419
|
+
}
|
|
6420
|
+
|
|
6421
|
+
|
|
6230
6422
|
const $66b8b9a9613c141d$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<button class="back" type="button"></button>`, 2), $66b8b9a9613c141d$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="search-field"><!#><!/><div class="field"><input class="query" tabindex="0"><button type="button" class="clear"></button></div><button class="submit major" type="button"></button></div>`, 11);
|
|
6231
6423
|
function $66b8b9a9613c141d$export$b94867ecbd698f21({ search_field_value_: search_field_value_ , input_field_ref_: input_field_ref_ , field_element_ref_: field_element_ref_ , submit_query_: submit_query_ , override_on_enter_: override_on_enter_ , clear_filters_: clear_filters_ , disabled_: disabled_ = false , on_back_: on_back_ , i18n_: i18n_ , after_focusing_: after_focusing_ }) {
|
|
6232
6424
|
let input_element;
|
|
@@ -6247,7 +6439,7 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({ search_field_value_: search
|
|
|
6247
6439
|
get children () {
|
|
6248
6440
|
const _el$2 = (0, $57o7A$solidjsweb.getNextElement)($66b8b9a9613c141d$var$_tmpl$);
|
|
6249
6441
|
(0, $57o7A$solidjsweb.addEventListener)(_el$2, "click", (0, $57o7A$depictaiutilishared.catchify)(on_back_), true);
|
|
6250
|
-
(0, $57o7A$solidjsweb.insert)(_el$2, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
6442
|
+
(0, $57o7A$solidjsweb.insert)(_el$2, (0, $57o7A$solidjsweb.createComponent)((0, $3df11fc61432d1fd$export$1c641004b5485fed), {}));
|
|
6251
6443
|
(0, $57o7A$solidjsweb.effect)(()=>(0, $57o7A$solidjsweb.setAttribute)(_el$2, "aria-label", i18n_.back_()));
|
|
6252
6444
|
(0, $57o7A$solidjsweb.runHydrationEvents)();
|
|
6253
6445
|
return _el$2;
|
|
@@ -6304,9 +6496,9 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({ search_field_value_: search
|
|
|
6304
6496
|
clear_filters_(true);
|
|
6305
6497
|
if (!disabled_) input_element.focus();
|
|
6306
6498
|
}), true);
|
|
6307
|
-
(0, $57o7A$solidjsweb.insert)(_el$5, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
6499
|
+
(0, $57o7A$solidjsweb.insert)(_el$5, (0, $57o7A$solidjsweb.createComponent)((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}));
|
|
6308
6500
|
(0, $57o7A$solidjsweb.addEventListener)(_el$6, "click", (0, $57o7A$depictaiutilishared.catchify)(()=>submit_query_()), true);
|
|
6309
|
-
(0, $57o7A$solidjsweb.insert)(_el$6, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
6501
|
+
(0, $57o7A$solidjsweb.insert)(_el$6, (0, $57o7A$solidjsweb.createComponent)((0, $87d7574e1d89d69b$export$82eafebb825fc23f), {}));
|
|
6310
6502
|
(0, $57o7A$solidjsweb.effect)((_p$)=>{
|
|
6311
6503
|
const _v$ = i18n_.search_field_field_aria_label_(), _v$2 = i18n_.placeholder_text_(), _v$3 = i18n_.clear_filters_query_sorting_after_submit_(), _v$4 = (0, $57o7A$solidjs.createMemo)(()=>search_field_value_[0]() ? "" : "display: none")(), _v$5 = i18n_.search_submit_button_aria_label_();
|
|
6312
6504
|
_v$ !== _p$._v$ && (0, $57o7A$solidjsweb.setAttribute)(_el$4, "aria-label", _p$._v$ = _v$);
|
|
@@ -6520,7 +6712,7 @@ function $b34ce0b89e6db4e1$export$e026af0c7b64ea5f({ selected_filters_: selected
|
|
|
6520
6712
|
|
|
6521
6713
|
|
|
6522
6714
|
function $2b7a005a65221045$export$84bba84a7b837187(read_search_query) {
|
|
6523
|
-
const ls = localStorage;
|
|
6715
|
+
const ls = globalThis?.localStorage || {};
|
|
6524
6716
|
const key = "depict_searches";
|
|
6525
6717
|
const previous_searches = (0, $57o7A$solidjs.createSignal)(JSON.parse(ls[key] || "[]"));
|
|
6526
6718
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
@@ -6857,6 +7049,15 @@ function $496cde876b53ce1e$export$91c3b6774e8be0f5({ param_: param_ , value_: va
|
|
|
6857
7049
|
|
|
6858
7050
|
|
|
6859
7051
|
|
|
7052
|
+
|
|
7053
|
+
|
|
7054
|
+
const $9e30168c4b1661d2$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="13"><path d="M6 12.598a5.88 5.88 0 0 1-1.611-.223c-.52-.145-1.008-.352-1.465-.621s-.875-.605-1.254-.996-.693-.83-.955-1.318c-.039-.07-.047-.145-.023-.223s.072-.143.146-.182.145-.047.223-.023.143.072.182.146a5.54 5.54 0 0 0 .861 1.184c.34.352.715.65 1.125.897s.85.435 1.318.568A5.5 5.5 0 0 0 6 12a5.24 5.24 0 0 0 2.098-.422c.656-.285 1.229-.672 1.717-1.16s.879-1.061 1.16-1.717a5.22 5.22 0 0 0 .428-2.104c0-.742-.143-1.441-.428-2.098s-.668-1.229-1.16-1.717a5.42 5.42 0 0 0-1.717-1.154A5.18 5.18 0 0 0 6 1.201c-.496 0-.979.066-1.447.199s-.904.316-1.318.563-.785.539-1.125.891a5.31 5.31 0 0 0-.855 1.172.32.32 0 0 1-.164.141c-.066.023-.135.023-.205 0a.3.3 0 0 1-.158-.135C.691 3.965.682 3.895.697 3.82l.51-2.385c.016-.078.059-.141.129-.187a.28.28 0 0 1 .229-.041c.078.016.141.059.188.129a.28.28 0 0 1 .041.229l-.211.973a5.91 5.91 0 0 1 .926-.814 5.78 5.78 0 0 1 1.066-.609A5.79 5.79 0 0 1 4.746.732C5.156.643 5.574.598 6 .598c.402 0 .795.039 1.178.117s.76.191 1.119.34a5.95 5.95 0 0 1 1.031.551c.328.219.633.469.914.75s.535.592.75.92a5.77 5.77 0 0 1 .551 1.025 5.53 5.53 0 0 1 .34 1.119c.078.387.117.779.117 1.178s-.039.797-.117 1.184-.187.754-.34 1.113a5.96 5.96 0 0 1-.551 1.031 5.56 5.56 0 0 1-.75.914c-.281.285-.586.537-.914.756a5.95 5.95 0 0 1-1.031.551c-.359.148-.732.26-1.119.334s-.775.117-1.178.117zm0-5.695c-.023 0-.049-.004-.076-.012s-.047-.018-.07-.029l-2.701-1.5c-.07-.039-.117-.098-.141-.176a.29.29 0 0 1 .023-.229c.043-.074.104-.123.182-.146s.158-.014.229.029l2.543 1.412 3.152-2.004c.07-.047.145-.061.223-.041a.29.29 0 0 1 .188.135c.047.066.061.141.041.223a.27.27 0 0 1-.129.188L6.158 6.855a.27.27 0 0 1-.076.035c-.027.008-.055.012-.082.012z" fill="#0f0f0f"></path></svg>`, 4);
|
|
7055
|
+
function $9e30168c4b1661d2$export$5d2caaa6b530761c() {
|
|
7056
|
+
return (0, $57o7A$solidjsweb.getNextElement)($9e30168c4b1661d2$var$_tmpl$);
|
|
7057
|
+
}
|
|
7058
|
+
|
|
7059
|
+
|
|
7060
|
+
|
|
6860
7061
|
const $9a268bf73b31a717$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="previous-searches"><h2 class="text"></h2><div class="list"></div></div>`, 6), $9a268bf73b31a717$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<a class="item"><div class="left"><!#><!/><span></span></div><button class="delete"></button></a>`, 10);
|
|
6861
7062
|
function $9a268bf73b31a717$export$a146ac6fa8346a25({ text_: text_ , previous_searches_: previous_searches_ , search_query_param_name_: search_query_param_name_ , currently_showing_suggestions_: currently_showing_suggestions_ , set_unfiltered_previous_searches_: set_unfiltered_previous_searches_ , selected_index_: [read_selected_index_, write_selected_index_] , url_transformer_: url_transformer_ , i18n_: i18n_ , submit_query_: submit_query_ }) {
|
|
6862
7063
|
const has_entries = (0, $57o7A$solidjs.createMemo)(()=>previous_searches_().length >= 1);
|
|
@@ -6903,7 +7104,7 @@ function $9a268bf73b31a717$export$a146ac6fa8346a25({ text_: text_ , previous_sea
|
|
|
6903
7104
|
0,
|
|
6904
7105
|
index
|
|
6905
7106
|
])));
|
|
6906
|
-
(0, $57o7A$solidjsweb.insert)(_el$5, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
7107
|
+
(0, $57o7A$solidjsweb.insert)(_el$5, (0, $57o7A$solidjsweb.createComponent)((0, $9e30168c4b1661d2$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
6907
7108
|
(0, $57o7A$solidjsweb.insert)(_el$6, item);
|
|
6908
7109
|
(0, $57o7A$solidjsweb.use)((element)=>element.addEventListener("click", (0, $57o7A$depictaiutilishared.catchify)((e)=>{
|
|
6909
7110
|
// 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.
|
|
@@ -6920,7 +7121,7 @@ function $9a268bf73b31a717$export$a146ac6fa8346a25({ text_: text_ , previous_sea
|
|
|
6920
7121
|
e.stopPropagation();
|
|
6921
7122
|
e.preventDefault();
|
|
6922
7123
|
})), _el$9);
|
|
6923
|
-
(0, $57o7A$solidjsweb.insert)(_el$9, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
7124
|
+
(0, $57o7A$solidjsweb.insert)(_el$9, (0, $57o7A$solidjsweb.createComponent)((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}));
|
|
6924
7125
|
(0, $57o7A$solidjsweb.effect)((_p$)=>{
|
|
6925
7126
|
const _v$ = !!(0, $57o7A$solidjs.createMemo)(()=>read_selected_index_()?.[0] === 0 && read_selected_index_()?.[1] === index)(), _v$2 = href(), _v$3 = i18n_.previous_searches_delete_entry_from_history_();
|
|
6926
7127
|
_v$ !== _p$._v$ && _el$4.classList.toggle("selected", _p$._v$ = _v$);
|
|
@@ -7023,6 +7224,8 @@ function $d023ed916c84e75d$export$ba17c5b7e6dda39f({ whole_text_to_display_: who
|
|
|
7023
7224
|
}
|
|
7024
7225
|
|
|
7025
7226
|
|
|
7227
|
+
|
|
7228
|
+
|
|
7026
7229
|
const $6b65ba8af12c5a26$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<a class="suggestion"></a>`, 2), $6b65ba8af12c5a26$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="search-icon"></div>`, 2), $6b65ba8af12c5a26$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<span class="type"></span>`, 2), $6b65ba8af12c5a26$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div><!#><!/><span class="value"></span></div>`, 6), $6b65ba8af12c5a26$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<h2 class="text"></h2>`, 2), $6b65ba8af12c5a26$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="suggestion-container query"><!#><!/><!#><!/></div>`, 6), $6b65ba8af12c5a26$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="suggestion-container page"></div>`, 2), $6b65ba8af12c5a26$var$_tmpl$8 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="suggestions"><!#><!/><!#><!/><!#><!/></div>`, 8);
|
|
7027
7230
|
function $6b65ba8af12c5a26$export$e872e2339fb04a7f({ suggestion_memo_: suggestion_memo_ , search_query_url_param_name_: search_query_url_param_name_ , selected_index_: [read_selected_index_, write_selected_index_] , url_transformer_: url_transformer_ , filtered_previous_searches_: filtered_previous_searches_ , currently_showing_suggestions_: currently_showing_suggestions_ , on_previous_searches_page_: on_previous_searches_page_ , i18n_: i18n_ , include_category_suggestions_: include_category_suggestions_ , searching_for_value_: searching_for_value_ , router_: router_ , submit_query_: submit_query_ }) {
|
|
7028
7231
|
const queries_memo = (0, $57o7A$solidjs.createMemo)(()=>suggestion_memo_().filter(({ type: type , title: title })=>type === (0, $3ec9e21d6b6debdd$export$3cf9497e790da491) && !filtered_previous_searches_().includes(title) // don't show the ones we already show from the history
|
|
@@ -7066,12 +7269,12 @@ function $6b65ba8af12c5a26$export$e872e2339fb04a7f({ suggestion_memo_: suggestio
|
|
|
7066
7269
|
get fallback () {
|
|
7067
7270
|
return (()=>{
|
|
7068
7271
|
const _el$2 = (0, $57o7A$solidjsweb.getNextElement)($6b65ba8af12c5a26$var$_tmpl$2);
|
|
7069
|
-
(0, $57o7A$solidjsweb.insert)(_el$2, (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
7272
|
+
(0, $57o7A$solidjsweb.insert)(_el$2, (0, $57o7A$solidjsweb.createComponent)((0, $87d7574e1d89d69b$export$82eafebb825fc23f), {}));
|
|
7070
7273
|
return _el$2;
|
|
7071
7274
|
})();
|
|
7072
7275
|
},
|
|
7073
7276
|
get children () {
|
|
7074
|
-
return (0, $57o7A$solidjsweb.createComponent)((0, $
|
|
7277
|
+
return (0, $57o7A$solidjsweb.createComponent)((0, $9e30168c4b1661d2$export$5d2caaa6b530761c), {});
|
|
7075
7278
|
}
|
|
7076
7279
|
}),
|
|
7077
7280
|
(0, $57o7A$solidjsweb.createComponent)((0, $d023ed916c84e75d$export$ba17c5b7e6dda39f), {
|
|
@@ -7758,7 +7961,7 @@ function $f40a47a30a358305$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
7758
7961
|
|
|
7759
7962
|
|
|
7760
7963
|
const $04048c1bef16c249$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="category-suggestions"></div>`, 2), $04048c1bef16c249$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="category-suggestion"></div>`, 2);
|
|
7761
|
-
function $04048c1bef16c249$export$c05a196222ba1302({ suggestions_: suggestions_ , children: children
|
|
7964
|
+
function $04048c1bef16c249$export$c05a196222ba1302({ suggestions_: suggestions_ , children: children }) {
|
|
7762
7965
|
const category_suggestions_ = (0, $57o7A$solidjs.createMemo)(()=>suggestions_()?.suggestions.filter((s)=>s.type === "category"));
|
|
7763
7966
|
return (0, $57o7A$solidjsweb.createComponent)((0, $57o7A$solidjs.Show), {
|
|
7764
7967
|
get when () {
|
|
@@ -7767,7 +7970,6 @@ function $04048c1bef16c249$export$c05a196222ba1302({ suggestions_: suggestions_
|
|
|
7767
7970
|
get children () {
|
|
7768
7971
|
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($04048c1bef16c249$var$_tmpl$);
|
|
7769
7972
|
(0, $57o7A$solidjsweb.insert)(_el$, (0, $57o7A$solidjsweb.createComponent)((0, $a0e53f99354809d9$export$6649caad96ef8870), {
|
|
7770
|
-
button_: slider_arrow_button_,
|
|
7771
7973
|
faded_opacity_: 0.7,
|
|
7772
7974
|
get children () {
|
|
7773
7975
|
return (0, $57o7A$solidjsweb.createComponent)((0, $57o7A$solidjs.Show), {
|
|
@@ -7840,9 +8042,10 @@ function $65a0c4b1c2eb5d0b$export$9dd50d35b9d94fdf({ get_search_query_: get_sear
|
|
|
7840
8042
|
|
|
7841
8043
|
|
|
7842
8044
|
|
|
8045
|
+
|
|
7843
8046
|
const $f1d7cb69f839a526$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="filter-results-for-one-row"><!#><!/><!#><!/></div>`, 6), $f1d7cb69f839a526$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="depict plp search"><div class="listing-page"><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/></div><!#><!/><!#><!/></div>`, 20);
|
|
7844
8047
|
function $f1d7cb69f839a526$export$a54ec244c8863715(opts) {
|
|
7845
|
-
const { depict_api_: depict_api_ , search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ ,
|
|
8048
|
+
const { depict_api_: depict_api_ , search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ , make_category_suggestion_card_: make_category_suggestion_card_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , clear_filters_on_next_submit_: clear_filters_on_next_submit_ , local_filter_cache_: local_filter_cache_ , include_input_field_: include_input_field_ , tenant_: tenant_ , market_: market_ , showing_recommendation_rows_: showing_recommendation_rows_ , search_recs_view_more_: search_recs_view_more_ , disable_search_recommendations_: disable_search_recommendations_ , layout_options_: layout_options_ , recommendations_layout_options_: recommendations_layout_options_ = layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ } = opts;
|
|
7846
8049
|
const [get_sorting] = current_sorting_;
|
|
7847
8050
|
const all_products_loaded_ = (0, $57o7A$solidjs.createSignal)(false);
|
|
7848
8051
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
@@ -7962,18 +8165,19 @@ function $f1d7cb69f839a526$export$a54ec244c8863715(opts) {
|
|
|
7962
8165
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_
|
|
7963
8166
|
});
|
|
7964
8167
|
const results_filters = (0, $57o7A$solidjs.createSignal)();
|
|
8168
|
+
const owner = (0, $57o7A$solidjs.getOwner)();
|
|
7965
8169
|
(0, $57o7A$solidjs.onCleanup)((0, $57o7A$depictaiutilishared.javascript_media_query)("(max-width:600px)", async ({ matches: matches })=>{
|
|
7966
8170
|
results_filters[1]();
|
|
7967
8171
|
await new Promise((r)=>queueMicrotask(r));
|
|
7968
|
-
results_filters[1](matches ? [
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
8172
|
+
(0, $57o7A$solidjs.runWithOwner)(owner, ()=>results_filters[1](matches ? [
|
|
8173
|
+
results_for,
|
|
8174
|
+
filters_opener
|
|
8175
|
+
] : (()=>{
|
|
8176
|
+
const _el$ = (0, $57o7A$solidjsweb.getNextElement)($f1d7cb69f839a526$var$_tmpl$), _el$2 = _el$.firstChild, [_el$3, _co$] = (0, $57o7A$solidjsweb.getNextMarker)(_el$2.nextSibling), _el$4 = _el$3.nextSibling, [_el$5, _co$2] = (0, $57o7A$solidjsweb.getNextMarker)(_el$4.nextSibling);
|
|
8177
|
+
(0, $57o7A$solidjsweb.insert)(_el$, results_for, _el$3, _co$);
|
|
8178
|
+
(0, $57o7A$solidjsweb.insert)(_el$, filters_opener, _el$5, _co$2);
|
|
8179
|
+
return _el$;
|
|
8180
|
+
})()));
|
|
7977
8181
|
}).remove);
|
|
7978
8182
|
(0, $57o7A$depictaiutilishared.catchify)((0, $276380e4607fb9fb$export$6e49da55e449af7c))({
|
|
7979
8183
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
@@ -7995,7 +8199,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715(opts) {
|
|
|
7995
8199
|
(0, $341a019928b8b91e$export$c7e181728ad525f)(location);
|
|
7996
8200
|
});
|
|
7997
8201
|
return [
|
|
7998
|
-
document.createComment("Search page based on Depict SDK"),
|
|
8202
|
+
(0, $57o7A$solidjsweb.isServer) ? "<!-- Search page based on Depict SDK -->" : document.createComment("Search page based on Depict SDK"),
|
|
7999
8203
|
(()=>{
|
|
8000
8204
|
const _el$6 = (0, $57o7A$solidjsweb.getNextElement)($f1d7cb69f839a526$var$_tmpl$2), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, [_el$9, _co$3] = (0, $57o7A$solidjsweb.getNextMarker)(_el$8.nextSibling), _el$10 = _el$9.nextSibling, [_el$11, _co$4] = (0, $57o7A$solidjsweb.getNextMarker)(_el$10.nextSibling), _el$12 = _el$11.nextSibling, [_el$13, _co$5] = (0, $57o7A$solidjsweb.getNextMarker)(_el$12.nextSibling), _el$14 = _el$13.nextSibling, [_el$15, _co$6] = (0, $57o7A$solidjsweb.getNextMarker)(_el$14.nextSibling), _el$16 = _el$15.nextSibling, [_el$17, _co$7] = (0, $57o7A$solidjsweb.getNextMarker)(_el$16.nextSibling), _el$18 = _el$17.nextSibling, [_el$19, _co$8] = (0, $57o7A$solidjsweb.getNextMarker)(_el$18.nextSibling), _el$20 = _el$7.nextSibling, [_el$21, _co$9] = (0, $57o7A$solidjsweb.getNextMarker)(_el$20.nextSibling), _el$22 = _el$21.nextSibling, [_el$23, _co$10] = (0, $57o7A$solidjsweb.getNextMarker)(_el$22.nextSibling);
|
|
8001
8205
|
(0, $57o7A$solidjsweb.insert)(_el$7, search_field, _el$9, _co$3);
|
|
@@ -8005,7 +8209,6 @@ function $f1d7cb69f839a526$export$a54ec244c8863715(opts) {
|
|
|
8005
8209
|
get children () {
|
|
8006
8210
|
return (0, $57o7A$solidjsweb.createComponent)((0, $04048c1bef16c249$export$c05a196222ba1302), {
|
|
8007
8211
|
suggestions_: suggestions,
|
|
8008
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
8009
8212
|
children: make_category_suggestion_card_
|
|
8010
8213
|
});
|
|
8011
8214
|
}
|
|
@@ -8025,7 +8228,6 @@ function $f1d7cb69f839a526$export$a54ec244c8863715(opts) {
|
|
|
8025
8228
|
i18n_: i18n_,
|
|
8026
8229
|
selected_filters_: selected_filters_,
|
|
8027
8230
|
local_filter_cache_: local_filter_cache_,
|
|
8028
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
8029
8231
|
search_filters_open_: search_filters_open_,
|
|
8030
8232
|
search_sorting_open_: search_sorting_open_,
|
|
8031
8233
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
@@ -8151,6 +8353,7 @@ function $d8e94ea381ab57fa$export$828dcdd425fd3231(aligner) {
|
|
|
8151
8353
|
|
|
8152
8354
|
|
|
8153
8355
|
|
|
8356
|
+
|
|
8154
8357
|
const $2c61e4cd8229c49a$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$57o7A$solidjsweb.template)(`<div class="depict plp search"></div>`, 2);
|
|
8155
8358
|
/**
|
|
8156
8359
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
@@ -8168,7 +8371,8 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
8168
8371
|
disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal: bottom_distance_under_modal , render_instant_card: render_instant_card , ...props_on_class }){
|
|
8169
8372
|
const owner = (0, $57o7A$solidjs.getOwner)() || (0, $57o7A$solidjs.createRoot)(()=>(0, $57o7A$solidjs.getOwner)()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
|
|
8170
8373
|
(0, $57o7A$solidjs.runWithOwner)(owner, ()=>{
|
|
8171
|
-
if ($2c61e4cd8229c49a$export$ac6237957a15b3f0.#has_been_constructed)
|
|
8374
|
+
if ($2c61e4cd8229c49a$export$ac6237957a15b3f0.#has_been_constructed && !(0, $57o7A$solidjsweb.isServer)) // on the server we can't write stuff to history.state anyway so can have multiple
|
|
8375
|
+
throw new Error("You can only have one instance of DepictSearch");
|
|
8172
8376
|
Object.assign(this, props_on_class);
|
|
8173
8377
|
if (on_navigation) this.#router.on_navigation_ = on_navigation;
|
|
8174
8378
|
const { current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , search_query_accessor_: raw_search_query_accessor } = (0, $c79fd10a3ab7d6e0$export$477caf01aecaeb2a)({
|
|
@@ -8176,7 +8380,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
8176
8380
|
router_: this.#router
|
|
8177
8381
|
});
|
|
8178
8382
|
const [reset_history_state_, state_] = (0, $26a56f6b44703084$export$9862539c89138352)(()=>({
|
|
8179
|
-
search_field_value: new URLSearchParams(location.search).get(search_query_url_param_name_) ?? "",
|
|
8383
|
+
search_field_value: (globalThis?.location && new URLSearchParams(location.search).get(search_query_url_param_name_)) ?? "",
|
|
8180
8384
|
search_filters_open: false,
|
|
8181
8385
|
search_sorting_open: false,
|
|
8182
8386
|
search_expanded_filters: [],
|
|
@@ -8435,10 +8639,6 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
8435
8639
|
cols_at_size: (0, $4e04be41243c3d80$export$6daf8749b65a1b77)(extra_depict_options.recommendations_cols_at_size),
|
|
8436
8640
|
...grid_spacing_override
|
|
8437
8641
|
} : undefined,
|
|
8438
|
-
slider_arrow_button_: (0, $57o7A$depictaiutilishared.GenericSliderArrowButton)({
|
|
8439
|
-
height_: 12,
|
|
8440
|
-
width_: 6.46
|
|
8441
|
-
}),
|
|
8442
8642
|
product_card_template_: product_card_template
|
|
8443
8643
|
});
|
|
8444
8644
|
}, "Entire SearchPage failed");
|