@depict-ai/ui 4.0.23 → 4.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ES10/index.cjs +66 -62
- package/ES10/index.d.ts +13 -3
- package/ES10/index.js +65 -64
- package/latest/index.cjs +68 -57
- package/latest/index.d.ts +13 -3
- package/latest/index.js +67 -59
- package/package.json +1 -1
- package/server/ES10/index.cjs +61 -57
- package/server/ES10/index.d.ts +13 -3
- package/server/ES10/index.js +60 -59
- package/server/latest/index.cjs +63 -52
- package/server/latest/index.d.ts +13 -3
- package/server/latest/index.js +62 -54
package/server/ES10/index.cjs
CHANGED
|
@@ -18,6 +18,9 @@ function $parcel$export(e, n, v, s) {
|
|
|
18
18
|
function $parcel$interopDefault(a) {
|
|
19
19
|
return a && a.__esModule ? a.default : a;
|
|
20
20
|
}
|
|
21
|
+
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $cfcd56242923775d$export$5162a71f252e6122);
|
|
22
|
+
$parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $cfcd56242923775d$export$3064e1e8c6513da3);
|
|
23
|
+
$parcel$export(module.exports, "allowNativeNavigation", () => $9ca08bcacbc598ce$export$29d28dadc2d6b631);
|
|
21
24
|
$parcel$export(module.exports, "modalVersionSymbol", () => $072ab198d82c3eb7$export$1ea76ea778b880dd);
|
|
22
25
|
$parcel$export(module.exports, "createDeparallelizedNoDropResource", () => $a28000bc10de28ad$export$e417c49320921907);
|
|
23
26
|
$parcel$export(module.exports, "throw_globally", () => $bdea39a75c454f4f$export$f50b88e2a00918b5);
|
|
@@ -95,7 +98,56 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
95
98
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
96
99
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
97
100
|
/*! Depict.ai search and product listing SDK */
|
|
98
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.
|
|
101
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.25";
|
|
102
|
+
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
103
|
+
let $cfcd56242923775d$var$has_ran = false;
|
|
104
|
+
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
105
|
+
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
106
|
+
$cfcd56242923775d$var$has_ran = true;
|
|
107
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
108
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
109
|
+
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
113
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
114
|
+
apply(target, this_arg, arg_list) {
|
|
115
|
+
try {
|
|
116
|
+
const old_state = history.state;
|
|
117
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
118
|
+
var _arg_list$;
|
|
119
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
120
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
121
|
+
const cloned_object = {
|
|
122
|
+
...intended_new_value_as_obj
|
|
123
|
+
};
|
|
124
|
+
for (const key in old_state) {
|
|
125
|
+
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
126
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
127
|
+
}
|
|
128
|
+
arg_list[0] = cloned_object;
|
|
129
|
+
}
|
|
130
|
+
} catch (e) {
|
|
131
|
+
$3hooq$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
132
|
+
}
|
|
133
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
138
|
+
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
139
|
+
if (key.startsWith(prefix)) return true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
145
|
+
* @param clickEvent The click event that triggered the navigation
|
|
146
|
+
*/
|
|
147
|
+
function $9ca08bcacbc598ce$export$29d28dadc2d6b631(clickEvent) {
|
|
148
|
+
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
149
|
+
);
|
|
150
|
+
}
|
|
99
151
|
|
|
100
152
|
/**
|
|
101
153
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -1009,8 +1061,8 @@ function $210882b9ebe2b1d8$export$e872e2339fb04a7f(_ref) {
|
|
|
1009
1061
|
}
|
|
1010
1062
|
var $1730e5b4d47679a3$var$_tmpl$ = ["<a", ' target="_blank"></a>'];
|
|
1011
1063
|
function $1730e5b4d47679a3$export$1efe1013da60d0e4(e, href) {
|
|
1012
|
-
if (e.metaKey || e.ctrlKey) {
|
|
1013
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1064
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1065
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
1014
1066
|
const link = $3hooq$solidjsweb.ssr($1730e5b4d47679a3$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey() + $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(href, true), false));
|
|
1015
1067
|
document.body.append(link);
|
|
1016
1068
|
link.click();
|
|
@@ -3429,46 +3481,6 @@ function $367b536a2a94d24e$var$history_state_change(signals, entries, state) {
|
|
|
3429
3481
|
}
|
|
3430
3482
|
});
|
|
3431
3483
|
}
|
|
3432
|
-
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
3433
|
-
let $cfcd56242923775d$var$has_ran = false;
|
|
3434
|
-
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
3435
|
-
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
3436
|
-
$cfcd56242923775d$var$has_ran = true;
|
|
3437
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
3438
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
3439
|
-
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
3440
|
-
}
|
|
3441
|
-
}
|
|
3442
|
-
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
3443
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
3444
|
-
apply(target, this_arg, arg_list) {
|
|
3445
|
-
try {
|
|
3446
|
-
const old_state = history.state;
|
|
3447
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
3448
|
-
var _arg_list$;
|
|
3449
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3450
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
3451
|
-
const cloned_object = {
|
|
3452
|
-
...intended_new_value_as_obj
|
|
3453
|
-
};
|
|
3454
|
-
for (const key in old_state) {
|
|
3455
|
-
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
3456
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3457
|
-
}
|
|
3458
|
-
arg_list[0] = cloned_object;
|
|
3459
|
-
}
|
|
3460
|
-
} catch (e) {
|
|
3461
|
-
$3hooq$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
3462
|
-
}
|
|
3463
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
3464
|
-
}
|
|
3465
|
-
});
|
|
3466
|
-
}
|
|
3467
|
-
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
3468
|
-
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
3469
|
-
if (key.startsWith(prefix)) return true;
|
|
3470
|
-
}
|
|
3471
|
-
}
|
|
3472
3484
|
function $73014ff36186a4dd$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
3473
3485
|
$73014ff36186a4dd$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
3474
3486
|
privateSet.add(obj);
|
|
@@ -3481,7 +3493,6 @@ function $73014ff36186a4dd$var$_classPrivateMethodGet(receiver, privateSet, fn)
|
|
|
3481
3493
|
return fn;
|
|
3482
3494
|
}
|
|
3483
3495
|
var $73014ff36186a4dd$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
3484
|
-
var $73014ff36186a4dd$var$_dont_attempt_navigation = /*#__PURE__*/new WeakSet();
|
|
3485
3496
|
var $73014ff36186a4dd$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
3486
3497
|
class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
|
|
3487
3498
|
/**
|
|
@@ -3489,14 +3500,11 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
|
|
|
3489
3500
|
*/ /**
|
|
3490
3501
|
* We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
|
|
3491
3502
|
*/ /**
|
|
3492
|
-
*
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
* This standardises waiting for all kinds of routers
|
|
3496
|
-
*/
|
|
3503
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
3504
|
+
* This standardises waiting for all kinds of routers
|
|
3505
|
+
*/
|
|
3497
3506
|
constructor(on_navigation, listing_query_state_key) {
|
|
3498
3507
|
$73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_get_navigation_happened_promise);
|
|
3499
|
-
$73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_dont_attempt_navigation);
|
|
3500
3508
|
$73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_throwing_on_navigation);
|
|
3501
3509
|
$parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "on_navigation_", void 0);
|
|
3502
3510
|
$parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "listing_query_state_key", void 0);
|
|
@@ -3528,7 +3536,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
|
|
|
3528
3536
|
} = _ref;
|
|
3529
3537
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
3530
3538
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
3531
|
-
if ($
|
|
3539
|
+
if ($9ca08bcacbc598ce$export$29d28dadc2d6b631(event_)) return;
|
|
3532
3540
|
const different_origin = new_url_.origin !== location.origin;
|
|
3533
3541
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
3534
3542
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -3576,9 +3584,6 @@ function $73014ff36186a4dd$var$_throwing_on_navigation2() {
|
|
|
3576
3584
|
});
|
|
3577
3585
|
}
|
|
3578
3586
|
}
|
|
3579
|
-
function $73014ff36186a4dd$var$_dont_attempt_navigation2(ev) {
|
|
3580
|
-
return (ev === null || ev === void 0 ? void 0 : ev.button) || (ev === null || ev === void 0 ? void 0 : ev.metaKey) || (ev === null || ev === void 0 ? void 0 : ev.ctrlKey);
|
|
3581
|
-
}
|
|
3582
3587
|
function $73014ff36186a4dd$var$_get_navigation_happened_promise2(is_replace) {
|
|
3583
3588
|
return new Promise(resolve => {
|
|
3584
3589
|
const handler = what_happened => {
|
|
@@ -7288,7 +7293,6 @@ async function $e270e9f953fcbc58$var$_run_display_transformers_for_rest2(merchan
|
|
|
7288
7293
|
const {
|
|
7289
7294
|
display_transformers: display_transformers
|
|
7290
7295
|
} = this;
|
|
7291
|
-
if (!display_transformers) return input_data;
|
|
7292
7296
|
const product_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.products;
|
|
7293
7297
|
const category_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.categories;
|
|
7294
7298
|
const content_result_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.contentResults;
|
|
@@ -7918,7 +7922,7 @@ function $c749e60bca5000cb$export$cb5808ba002cdeed(_ref) {
|
|
|
7918
7922
|
}) : when_filters_closed_cols;
|
|
7919
7923
|
});
|
|
7920
7924
|
}
|
|
7921
|
-
function $
|
|
7925
|
+
function $478e5a09664da64c$export$a79e666719b3647c(cols_at_size_) {
|
|
7922
7926
|
const size_active = $3hooq$solidjs.createMemo(() => cols_at_size_().map(_ref => {
|
|
7923
7927
|
let [n_cols, min_width, max_width] = _ref;
|
|
7924
7928
|
const media_query = $3hooq$depictaiutilishared.layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
@@ -7948,7 +7952,7 @@ function $f8f375d6245ffff2$export$791ef57e62e21c3f(_ref) {
|
|
|
7948
7952
|
} = _ref;
|
|
7949
7953
|
// these are by row
|
|
7950
7954
|
const [content_blocks, set_content_blocks] = $3hooq$solidjsstore.createStore([]);
|
|
7951
|
-
const n_cols_currently_showing_ = $
|
|
7955
|
+
const n_cols_currently_showing_ = $478e5a09664da64c$export$a79e666719b3647c(cols_at_size_);
|
|
7952
7956
|
$3hooq$solidjs.createEffect(() => {
|
|
7953
7957
|
const incoming_value = incoming_content_blocks();
|
|
7954
7958
|
if (!incoming_value) {
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,17 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.25";
|
|
14
|
+
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
|
17
|
+
*/
|
|
18
|
+
export function preserve_items_in_history_dot_state(): void;
|
|
19
|
+
/**
|
|
20
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
21
|
+
* @param clickEvent The click event that triggered the navigation
|
|
22
|
+
*/
|
|
23
|
+
export function allowNativeNavigation(clickEvent?: MouseEvent): number | boolean | undefined;
|
|
14
24
|
/**
|
|
15
25
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
16
26
|
*/
|
|
@@ -1211,7 +1221,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1211
1221
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
1212
1222
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1213
1223
|
layout?: PossibleLayout;
|
|
1214
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1224
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1215
1225
|
export function BreadCrumbs<T extends Display>({
|
|
1216
1226
|
depict_category
|
|
1217
1227
|
}: {
|
|
@@ -1351,7 +1361,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1351
1361
|
* Open the modal with support for alignment.
|
|
1352
1362
|
* @returns {void}
|
|
1353
1363
|
*/
|
|
1354
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1364
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1355
1365
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1356
1366
|
export interface PageReplacer {
|
|
1357
1367
|
readonly render_: () => Node_Array;
|
package/server/ES10/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info, deparallelize_no_drop as $b8hua$deparallelize_no_drop, catchify as $b8hua$catchify, make_random_classname as $b8hua$make_random_classname, ContainedImage as $b8hua$ContainedImage, standard_price_format as $b8hua$standard_price_format, javascript_media_query as $b8hua$javascript_media_query, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, observer as $b8hua$observer,
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, report as $b8hua$report, deparallelize_no_drop as $b8hua$deparallelize_no_drop, catchify as $b8hua$catchify, make_random_classname as $b8hua$make_random_classname, ContainedImage as $b8hua$ContainedImage, standard_price_format as $b8hua$standard_price_format, javascript_media_query as $b8hua$javascript_media_query, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, observer as $b8hua$observer, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, dwarn as $b8hua$dwarn, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, base_url as $b8hua$base_url, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, slider_fractional_factory as $b8hua$slider_fractional_factory, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, fetch_retry as $b8hua$fetch_retry, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { createSignal as $b8hua$createSignal, createResource as $b8hua$createResource, createEffect as $b8hua$createEffect, untrack as $b8hua$untrack, createMemo as $b8hua$createMemo, onCleanup as $b8hua$onCleanup, Show as $b8hua$Show, createComputed as $b8hua$createComputed, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createContext as $b8hua$createContext, useContext as $b8hua$useContext, on as $b8hua$on, Index as $b8hua$Index, batch as $b8hua$batch, ErrorBoundary as $b8hua$ErrorBoundary, splitProps as $b8hua$splitProps, mergeProps as $b8hua$mergeProps1, createUniqueId as $b8hua$createUniqueId, createRenderEffect as $b8hua$createRenderEffect, createSelector as $b8hua$createSelector, children as $b8hua$children, createRoot as $b8hua$createRoot, Suspense as $b8hua$Suspense, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
3
3
|
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, createComponent as $b8hua$createComponent, ssrAttribute as $b8hua$ssrAttribute, ssrClassList as $b8hua$ssrClassList, ssrStyle as $b8hua$ssrStyle, ssrElement as $b8hua$ssrElement, mergeProps as $b8hua$mergeProps, insert as $b8hua$insert, spread as $b8hua$spread, isServer as $b8hua$isServer, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
4
4
|
import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
@@ -10,7 +10,56 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.25";
|
|
14
|
+
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
15
|
+
let $68e6625c8d51f847$var$has_ran = false;
|
|
16
|
+
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
17
|
+
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
18
|
+
$68e6625c8d51f847$var$has_ran = true;
|
|
19
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
20
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
21
|
+
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
25
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
26
|
+
apply(target, this_arg, arg_list) {
|
|
27
|
+
try {
|
|
28
|
+
const old_state = history.state;
|
|
29
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
30
|
+
var _arg_list$;
|
|
31
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
32
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
33
|
+
const cloned_object = {
|
|
34
|
+
...intended_new_value_as_obj
|
|
35
|
+
};
|
|
36
|
+
for (const key in old_state) {
|
|
37
|
+
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
38
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
39
|
+
}
|
|
40
|
+
arg_list[0] = cloned_object;
|
|
41
|
+
}
|
|
42
|
+
} catch (e) {
|
|
43
|
+
$b8hua$report([e, "Failed to preserve items in history.state"], "error");
|
|
44
|
+
}
|
|
45
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
50
|
+
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
51
|
+
if (key.startsWith(prefix)) return true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
57
|
+
* @param clickEvent The click event that triggered the navigation
|
|
58
|
+
*/
|
|
59
|
+
function $9b35d1384e31813a$export$29d28dadc2d6b631(clickEvent) {
|
|
60
|
+
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
61
|
+
);
|
|
62
|
+
}
|
|
14
63
|
|
|
15
64
|
/**
|
|
16
65
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -924,8 +973,8 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
924
973
|
}
|
|
925
974
|
var $76b6e14a50da4597$var$_tmpl$ = ["<a", ' target="_blank"></a>'];
|
|
926
975
|
function $76b6e14a50da4597$export$1efe1013da60d0e4(e, href) {
|
|
927
|
-
if (e.metaKey || e.ctrlKey) {
|
|
928
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
976
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
977
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
929
978
|
const link = $b8hua$ssr($76b6e14a50da4597$var$_tmpl$, $b8hua$ssrHydrationKey() + $b8hua$ssrAttribute("href", $b8hua$escape(href, true), false));
|
|
930
979
|
document.body.append(link);
|
|
931
980
|
link.click();
|
|
@@ -3344,46 +3393,6 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
3344
3393
|
}
|
|
3345
3394
|
});
|
|
3346
3395
|
}
|
|
3347
|
-
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
3348
|
-
let $68e6625c8d51f847$var$has_ran = false;
|
|
3349
|
-
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
3350
|
-
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
3351
|
-
$68e6625c8d51f847$var$has_ran = true;
|
|
3352
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
3353
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
3354
|
-
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
3355
|
-
}
|
|
3356
|
-
}
|
|
3357
|
-
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
3358
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
3359
|
-
apply(target, this_arg, arg_list) {
|
|
3360
|
-
try {
|
|
3361
|
-
const old_state = history.state;
|
|
3362
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
3363
|
-
var _arg_list$;
|
|
3364
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3365
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
3366
|
-
const cloned_object = {
|
|
3367
|
-
...intended_new_value_as_obj
|
|
3368
|
-
};
|
|
3369
|
-
for (const key in old_state) {
|
|
3370
|
-
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
3371
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3372
|
-
}
|
|
3373
|
-
arg_list[0] = cloned_object;
|
|
3374
|
-
}
|
|
3375
|
-
} catch (e) {
|
|
3376
|
-
$b8hua$report([e, "Failed to preserve items in history.state"], "error");
|
|
3377
|
-
}
|
|
3378
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
3379
|
-
}
|
|
3380
|
-
});
|
|
3381
|
-
}
|
|
3382
|
-
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
3383
|
-
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
3384
|
-
if (key.startsWith(prefix)) return true;
|
|
3385
|
-
}
|
|
3386
|
-
}
|
|
3387
3396
|
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
3388
3397
|
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
3389
3398
|
privateSet.add(obj);
|
|
@@ -3396,7 +3405,6 @@ function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn)
|
|
|
3396
3405
|
return fn;
|
|
3397
3406
|
}
|
|
3398
3407
|
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
3399
|
-
var $ac571292d606f30b$var$_dont_attempt_navigation = /*#__PURE__*/new WeakSet();
|
|
3400
3408
|
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
3401
3409
|
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
3402
3410
|
/**
|
|
@@ -3404,14 +3412,11 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
3404
3412
|
*/ /**
|
|
3405
3413
|
* We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
|
|
3406
3414
|
*/ /**
|
|
3407
|
-
*
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
* This standardises waiting for all kinds of routers
|
|
3411
|
-
*/
|
|
3415
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
3416
|
+
* This standardises waiting for all kinds of routers
|
|
3417
|
+
*/
|
|
3412
3418
|
constructor(on_navigation, listing_query_state_key) {
|
|
3413
3419
|
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
3414
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_dont_attempt_navigation);
|
|
3415
3420
|
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
3416
3421
|
$b8hua$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
3417
3422
|
$b8hua$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
@@ -3443,7 +3448,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
3443
3448
|
} = _ref;
|
|
3444
3449
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
3445
3450
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
3446
|
-
if ($
|
|
3451
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
3447
3452
|
const different_origin = new_url_.origin !== location.origin;
|
|
3448
3453
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
3449
3454
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -3491,9 +3496,6 @@ function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
|
3491
3496
|
});
|
|
3492
3497
|
}
|
|
3493
3498
|
}
|
|
3494
|
-
function $ac571292d606f30b$var$_dont_attempt_navigation2(ev) {
|
|
3495
|
-
return (ev === null || ev === void 0 ? void 0 : ev.button) || (ev === null || ev === void 0 ? void 0 : ev.metaKey) || (ev === null || ev === void 0 ? void 0 : ev.ctrlKey);
|
|
3496
|
-
}
|
|
3497
3499
|
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
3498
3500
|
return new Promise(resolve => {
|
|
3499
3501
|
const handler = what_happened => {
|
|
@@ -7203,7 +7205,6 @@ async function $284849364a6ef73a$var$_run_display_transformers_for_rest2(merchan
|
|
|
7203
7205
|
const {
|
|
7204
7206
|
display_transformers: display_transformers
|
|
7205
7207
|
} = this;
|
|
7206
|
-
if (!display_transformers) return input_data;
|
|
7207
7208
|
const product_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.products;
|
|
7208
7209
|
const category_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.categories;
|
|
7209
7210
|
const content_result_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.contentResults;
|
|
@@ -7833,7 +7834,7 @@ function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
|
7833
7834
|
}) : when_filters_closed_cols;
|
|
7834
7835
|
});
|
|
7835
7836
|
}
|
|
7836
|
-
function $
|
|
7837
|
+
function $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_) {
|
|
7837
7838
|
const size_active = $b8hua$createMemo(() => cols_at_size_().map(_ref => {
|
|
7838
7839
|
let [n_cols, min_width, max_width] = _ref;
|
|
7839
7840
|
const media_query = $b8hua$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
@@ -7863,7 +7864,7 @@ function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
|
|
|
7863
7864
|
} = _ref;
|
|
7864
7865
|
// these are by row
|
|
7865
7866
|
const [content_blocks, set_content_blocks] = $b8hua$createStore([]);
|
|
7866
|
-
const n_cols_currently_showing_ = $
|
|
7867
|
+
const n_cols_currently_showing_ = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
7867
7868
|
$b8hua$createEffect(() => {
|
|
7868
7869
|
const incoming_value = incoming_content_blocks();
|
|
7869
7870
|
if (!incoming_value) {
|
|
@@ -12716,4 +12717,4 @@ function $a3026fb727bc7550$var$align_field_modal(alignmentSignals, input, modalV
|
|
|
12716
12717
|
});
|
|
12717
12718
|
}
|
|
12718
12719
|
$b8hua$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
12719
|
-
export { $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField };
|
|
12720
|
+
export { $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField };
|
package/server/latest/index.cjs
CHANGED
|
@@ -12,6 +12,9 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
12
|
configurable: true
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
+
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $d84fe647b84b5dc5$export$5162a71f252e6122);
|
|
16
|
+
$parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $d84fe647b84b5dc5$export$3064e1e8c6513da3);
|
|
17
|
+
$parcel$export(module.exports, "allowNativeNavigation", () => $747421cd28dec5b5$export$29d28dadc2d6b631);
|
|
15
18
|
$parcel$export(module.exports, "modalVersionSymbol", () => $ad1fa088e5509cca$export$1ea76ea778b880dd);
|
|
16
19
|
$parcel$export(module.exports, "createDeparallelizedNoDropResource", () => $53df95e470b2f8d2$export$e417c49320921907);
|
|
17
20
|
$parcel$export(module.exports, "throw_globally", () => $deaaf04362a1bc71$export$f50b88e2a00918b5);
|
|
@@ -89,7 +92,61 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
89
92
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
90
93
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
91
94
|
/*! Depict.ai search and product listing SDK */
|
|
92
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.
|
|
95
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.25";
|
|
96
|
+
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
97
|
+
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
98
|
+
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
99
|
+
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
100
|
+
$d84fe647b84b5dc5$var$has_ran = true;
|
|
101
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
102
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
103
|
+
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
107
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
108
|
+
apply(target, this_arg, arg_list) {
|
|
109
|
+
try {
|
|
110
|
+
const old_state = history.state;
|
|
111
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
112
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
113
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
114
|
+
const cloned_object = {
|
|
115
|
+
...intended_new_value_as_obj
|
|
116
|
+
};
|
|
117
|
+
for (const key in old_state) {
|
|
118
|
+
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
119
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
120
|
+
}
|
|
121
|
+
arg_list[0] = cloned_object;
|
|
122
|
+
}
|
|
123
|
+
} catch (e) {
|
|
124
|
+
$5vyXB$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
125
|
+
}
|
|
126
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
131
|
+
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
132
|
+
if (key.startsWith(prefix)) return true;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
138
|
+
* @param clickEvent The click event that triggered the navigation
|
|
139
|
+
*/
|
|
140
|
+
function $747421cd28dec5b5$export$29d28dadc2d6b631(clickEvent) {
|
|
141
|
+
return clickEvent?.button ||
|
|
142
|
+
// if not zero it's a wheel click which opens in new tab
|
|
143
|
+
clickEvent?.metaKey ||
|
|
144
|
+
// if true, cmd button on macOS which opens in new tab
|
|
145
|
+
clickEvent?.ctrlKey ||
|
|
146
|
+
// if true, ctrl button on windows or linux which opens in new tab
|
|
147
|
+
clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
148
|
+
;
|
|
149
|
+
}
|
|
93
150
|
|
|
94
151
|
/**
|
|
95
152
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -956,8 +1013,8 @@ function $1dbed937c406bdf0$export$e872e2339fb04a7f({
|
|
|
956
1013
|
}
|
|
957
1014
|
var $b8700779b3e745de$var$_tmpl$ = ["<a", ' target="_blank"></a>'];
|
|
958
1015
|
function $b8700779b3e745de$export$1efe1013da60d0e4(e, href) {
|
|
959
|
-
if (e.metaKey || e.ctrlKey) {
|
|
960
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1016
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1017
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
961
1018
|
const link = $5vyXB$solidjsweb.ssr($b8700779b3e745de$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey() + $5vyXB$solidjsweb.ssrAttribute("href", $5vyXB$solidjsweb.escape(href, true), false));
|
|
962
1019
|
document.body.append(link);
|
|
963
1020
|
link.click();
|
|
@@ -3272,45 +3329,6 @@ function $6e22b5314fb52f4c$var$history_state_change(signals, entries, state) {
|
|
|
3272
3329
|
}
|
|
3273
3330
|
});
|
|
3274
3331
|
}
|
|
3275
|
-
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
3276
|
-
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
3277
|
-
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
3278
|
-
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
3279
|
-
$d84fe647b84b5dc5$var$has_ran = true;
|
|
3280
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
3281
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
3282
|
-
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
3286
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
3287
|
-
apply(target, this_arg, arg_list) {
|
|
3288
|
-
try {
|
|
3289
|
-
const old_state = history.state;
|
|
3290
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
3291
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3292
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
3293
|
-
const cloned_object = {
|
|
3294
|
-
...intended_new_value_as_obj
|
|
3295
|
-
};
|
|
3296
|
-
for (const key in old_state) {
|
|
3297
|
-
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
3298
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3299
|
-
}
|
|
3300
|
-
arg_list[0] = cloned_object;
|
|
3301
|
-
}
|
|
3302
|
-
} catch (e) {
|
|
3303
|
-
$5vyXB$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
3304
|
-
}
|
|
3305
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
3306
|
-
}
|
|
3307
|
-
});
|
|
3308
|
-
}
|
|
3309
|
-
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
3310
|
-
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
3311
|
-
if (key.startsWith(prefix)) return true;
|
|
3312
|
-
}
|
|
3313
|
-
}
|
|
3314
3332
|
class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
3315
3333
|
/**
|
|
3316
3334
|
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
@@ -3332,12 +3350,6 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
3332
3350
|
}
|
|
3333
3351
|
}
|
|
3334
3352
|
/**
|
|
3335
|
-
* Checks if this tab shouldn't navigate because user wants to open in new tab
|
|
3336
|
-
*/
|
|
3337
|
-
#dont_attempt_navigation(ev) {
|
|
3338
|
-
return ev?.button || ev?.metaKey || ev?.ctrlKey;
|
|
3339
|
-
}
|
|
3340
|
-
/**
|
|
3341
3353
|
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
3342
3354
|
* This standardises waiting for all kinds of routers
|
|
3343
3355
|
*/
|
|
@@ -3378,7 +3390,7 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
3378
3390
|
}) => {
|
|
3379
3391
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
3380
3392
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
3381
|
-
if (
|
|
3393
|
+
if ($747421cd28dec5b5$export$29d28dadc2d6b631(event_)) return;
|
|
3382
3394
|
const different_origin = new_url_.origin !== location.origin;
|
|
3383
3395
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
3384
3396
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -6721,7 +6733,6 @@ class $e1d6c0f3d89d531c$export$e015ed2f2950f2e3 {
|
|
|
6721
6733
|
const {
|
|
6722
6734
|
display_transformers: display_transformers
|
|
6723
6735
|
} = this;
|
|
6724
|
-
if (!display_transformers) return input_data;
|
|
6725
6736
|
const product_transformer = display_transformers?.products;
|
|
6726
6737
|
const category_transformer = display_transformers?.categories;
|
|
6727
6738
|
const content_result_transformer = display_transformers?.contentResults;
|
|
@@ -7423,7 +7434,7 @@ function $738c3a81fc46a340$export$cb5808ba002cdeed({
|
|
|
7423
7434
|
}) : when_filters_closed_cols;
|
|
7424
7435
|
});
|
|
7425
7436
|
}
|
|
7426
|
-
function $
|
|
7437
|
+
function $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_) {
|
|
7427
7438
|
const size_active = $5vyXB$solidjs.createMemo(() => cols_at_size_().map(([n_cols, min_width, max_width]) => {
|
|
7428
7439
|
const media_query = $5vyXB$depictaiutilishared.layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
7429
7440
|
const matches = $b54e6192d0caa293$export$d9f36cf74e24d595(media_query);
|
|
@@ -7448,7 +7459,7 @@ function $d92f338ba8f9da9b$export$791ef57e62e21c3f({
|
|
|
7448
7459
|
}) {
|
|
7449
7460
|
// these are by row
|
|
7450
7461
|
const [content_blocks, set_content_blocks] = $5vyXB$solidjsstore.createStore([]);
|
|
7451
|
-
const n_cols_currently_showing_ = $
|
|
7462
|
+
const n_cols_currently_showing_ = $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_);
|
|
7452
7463
|
$5vyXB$solidjs.createEffect(() => {
|
|
7453
7464
|
const incoming_value = incoming_content_blocks();
|
|
7454
7465
|
if (!incoming_value) {
|