@depict-ai/utilishared 1.0.50 → 2.0.0
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 +55 -84
- package/ES10/index.d.ts +9 -22
- package/ES10/index.js +52 -76
- package/latest/index.cjs +54 -84
- package/latest/index.d.ts +9 -22
- package/latest/index.js +51 -76
- package/package.json +4 -4
package/ES10/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var $bBfCy$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/d
|
|
|
5
5
|
require("../multi_import_deduplicator.cjs").register_es_version("utilishared", "ES10");
|
|
6
6
|
function $parcel$exportWildcard(dest, source) {
|
|
7
7
|
Object.keys(source).forEach(function (key) {
|
|
8
|
-
if (key === 'default' || key === '__esModule' ||
|
|
8
|
+
if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
Object.defineProperty(dest, key, {
|
|
@@ -49,9 +49,9 @@ $parcel$export(module.exports, "simplified_template_tool", () => $ebe64dbcfb106f
|
|
|
49
49
|
$parcel$export(module.exports, "insert_styling_into_slider", () => $3f49f9b73bfc2a38$export$f1b8b9fd75ddcab1);
|
|
50
50
|
$parcel$export(module.exports, "RR_Slider", () => $bbf8331c74194de9$export$cd12721587f4f16d);
|
|
51
51
|
$parcel$export(module.exports, "Depict", () => $a782ed55f4206a68$export$1a8782481a9af507);
|
|
52
|
-
$parcel$export(module.exports, "get_recs_with_template", () => $
|
|
53
|
-
$parcel$export(module.exports, "default_post_processor", () => $
|
|
54
|
-
$parcel$export(module.exports, "default_pre_processor", () => $
|
|
52
|
+
$parcel$export(module.exports, "get_recs_with_template", () => $14c1124272475590$export$30933c637c977eef);
|
|
53
|
+
$parcel$export(module.exports, "default_post_processor", () => $14c1124272475590$export$c410ce1205e5118a);
|
|
54
|
+
$parcel$export(module.exports, "default_pre_processor", () => $14c1124272475590$export$4f39078bdc72ecd0);
|
|
55
55
|
$parcel$export(module.exports, "wpff", () => $a68e8b02bee90bb2$export$2e2bcd8739ae039);
|
|
56
56
|
$parcel$export(module.exports, "ElementObserver", () => $523564fcfb9c3bb9$export$12e07a2a9f87578a);
|
|
57
57
|
$parcel$export(module.exports, "observer", () => $03c157d68c9fcbac$export$b6ae1bc530f4c149);
|
|
@@ -119,10 +119,6 @@ $parcel$export(module.exports, "AIO", () => $7c971cc277292c10$export$29a6094e0bd
|
|
|
119
119
|
$parcel$export(module.exports, "paint_red", () => $7c971cc277292c10$export$6ebd242c09192cec);
|
|
120
120
|
$parcel$export(module.exports, "bind_to_a2c_button", () => $1ea91dfed6983398$export$2c34560c3749dc63);
|
|
121
121
|
$parcel$export(module.exports, "bind_tracking_to_link", () => $1ea91dfed6983398$export$82a685f2da2fb027);
|
|
122
|
-
$parcel$export(module.exports, "set_depict_id_fn", () => $335c248bb07a3509$export$336e7ad40bae0652);
|
|
123
|
-
$parcel$export(module.exports, "set_user_id_fn", () => $335c248bb07a3509$export$8a96793bf9f87d90);
|
|
124
|
-
$parcel$export(module.exports, "get_depict_id", () => $335c248bb07a3509$export$6399bdb2291895e0);
|
|
125
|
-
$parcel$export(module.exports, "get_user_id", () => $335c248bb07a3509$export$adc61a405a4cabed);
|
|
126
122
|
$parcel$export(module.exports, "depict_click", () => $335c248bb07a3509$export$15f8a0cd5a8c0ebb);
|
|
127
123
|
$parcel$export(module.exports, "depict_prefilled", () => $335c248bb07a3509$export$82badda1f9923310);
|
|
128
124
|
$parcel$export(module.exports, "depict_add_to_cart", () => $335c248bb07a3509$export$9028351cb994757e);
|
|
@@ -164,7 +160,6 @@ $parcel$export(module.exports, "datalayer_interceptor", () => $78fd85c1f4513422$
|
|
|
164
160
|
$parcel$export(module.exports, "datalayer_transaction_id_extractor", () => $78fd85c1f4513422$export$b11248fa13a8a86c);
|
|
165
161
|
$parcel$export(module.exports, "orderpage_transaction_id_extractor", () => $78fd85c1f4513422$export$3ebd86018b39d9d2);
|
|
166
162
|
$parcel$export(module.exports, "url_transaction_id_extractor", () => $78fd85c1f4513422$export$ff8673d5dea82bd4);
|
|
167
|
-
$parcel$export(module.exports, "send_product_unavailable_to_depict", () => $3cb1cfeb94b7f96b$export$d63b08f4f29ddba5);
|
|
168
163
|
$parcel$export(module.exports, "send_page_view_if_needed", () => $c15d2edce69e632a$export$eee4c4d924348b05);
|
|
169
164
|
$parcel$export(module.exports, "send_page_view_on_navigation", () => $c15d2edce69e632a$export$f7cb1bd47199ec38);
|
|
170
165
|
$parcel$export(module.exports, "DepictAPIWS", () => $bd0a305620de4c2a$export$1d9c6fddbff3441f);
|
|
@@ -279,7 +274,7 @@ $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$ex
|
|
|
279
274
|
$parcel$export(module.exports, "edit_current_page_meta_tags", () => $0126fdc29a9f7f2d$export$ef73ea4f975745ba);
|
|
280
275
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
|
|
281
276
|
$parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
|
|
282
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "
|
|
277
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.0";
|
|
283
278
|
const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
284
279
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
285
280
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -1302,7 +1297,7 @@ function $a13f25507f352177$export$a6db784f019668ba() {
|
|
|
1302
1297
|
const $62869a3ed703f236$export$362abebb4b313340 = process.env.BASE_URL || "https://api.depict.ai";
|
|
1303
1298
|
const $49880c4ce4bb7db2$var$c = (0, $3b52ccc10510b32a$export$b3bbfd758f11cfa9);
|
|
1304
1299
|
const $49880c4ce4bb7db2$var$ws_instance = /*@__PURE__*/$49880c4ce4bb7db2$var$c(() => new (0, $bd0a305620de4c2a$export$1d9c6fddbff3441f)("wss://ws.depict.ai/ws/create-events"))();
|
|
1305
|
-
const $49880c4ce4bb7db2$var$allowed_keys = ["tenant", "market", "type", "
|
|
1300
|
+
const $49880c4ce4bb7db2$var$allowed_keys = ["tenant", "market", "type", "session_id", "product_id", "entity_identifiers", "url", "entity_price", "currency", "document_referrer", "document_width", "attribution_id", "recommendation_id", "click_location", "ab_test_group", "variant_ids", "transaction_id", "error_type", "detail", "recommendation_type", "search_result_id", "product_listing_result_id"];
|
|
1306
1301
|
const $49880c4ce4bb7db2$export$72036d950e1fae95 = /*@__PURE__*/$49880c4ce4bb7db2$var$c(payload => {
|
|
1307
1302
|
if (process.env.DEPICT === "false") return;
|
|
1308
1303
|
return payload.map(body => Object.fromEntries(Object.entries(body).filter(_ref => {
|
|
@@ -1377,13 +1372,14 @@ const $49880c4ce4bb7db2$export$28cacbd9b4306ffc = /*@__PURE__*/$49880c4ce4bb7db2
|
|
|
1377
1372
|
// filter_depict_payload will only return undefined if process.env.DEPICT === "false"
|
|
1378
1373
|
return $49880c4ce4bb7db2$export$608478473a3304a0($49880c4ce4bb7db2$export$72036d950e1fae95(payload), use_ws);
|
|
1379
1374
|
});
|
|
1380
|
-
let $335c248bb07a3509$export$
|
|
1375
|
+
let $335c248bb07a3509$export$61e7e1f11e96692f = () => {
|
|
1381
1376
|
if (typeof document === "undefined") return "server";
|
|
1382
1377
|
let id = "";
|
|
1383
1378
|
let localstorage_error;
|
|
1384
1379
|
let cookie_error;
|
|
1385
1380
|
try {
|
|
1386
1381
|
var _localStorage;
|
|
1382
|
+
// localStorage._dep_id also accessed directly by depict-purchase-tracking Shopify web pixel
|
|
1387
1383
|
id = (_localStorage = localStorage)._dep_id || (_localStorage._dep_id = $a13f25507f352177$export$656831b7e9c341c3());
|
|
1388
1384
|
} catch (e) {
|
|
1389
1385
|
$7f95f77417d06249$export$de56f1198d121036("Can't use localStorage", e);
|
|
@@ -1417,17 +1413,11 @@ let $335c248bb07a3509$export$6399bdb2291895e0 = () => {
|
|
|
1417
1413
|
if (!id) id = $a13f25507f352177$export$656831b7e9c341c3();
|
|
1418
1414
|
return id;
|
|
1419
1415
|
};
|
|
1420
|
-
let $335c248bb07a3509$export$adc61a405a4cabed = $335c248bb07a3509$export$6399bdb2291895e0;
|
|
1421
|
-
let $335c248bb07a3509$export$61e7e1f11e96692f = () => undefined;
|
|
1422
|
-
const $335c248bb07a3509$export$336e7ad40bae0652 = /*@__PURE__*/$3b52ccc10510b32a$export$b3bbfd758f11cfa9(newfn => $335c248bb07a3509$export$6399bdb2291895e0 = newfn);
|
|
1423
|
-
const $335c248bb07a3509$export$8a96793bf9f87d90 = /*@__PURE__*/$3b52ccc10510b32a$export$b3bbfd758f11cfa9(newfn => $335c248bb07a3509$export$adc61a405a4cabed = newfn);
|
|
1424
1416
|
const $335c248bb07a3509$export$93ae15b1ae509334 = /*@__PURE__*/$3b52ccc10510b32a$export$b3bbfd758f11cfa9(newfn => $335c248bb07a3509$export$61e7e1f11e96692f = newfn);
|
|
1425
1417
|
const $335c248bb07a3509$export$8c6f26a5b6921b95 = /*@__PURE__*/() => {
|
|
1426
1418
|
var _document;
|
|
1427
1419
|
return {
|
|
1428
1420
|
session_id: $335c248bb07a3509$export$61e7e1f11e96692f(),
|
|
1429
|
-
user_id: $335c248bb07a3509$export$adc61a405a4cabed(),
|
|
1430
|
-
dsid: $335c248bb07a3509$export$6399bdb2291895e0(),
|
|
1431
1421
|
url: document.location.href,
|
|
1432
1422
|
document_width: window.innerWidth,
|
|
1433
1423
|
document_referrer: (_document = document) === null || _document === void 0 ? void 0 : _document.referrer
|
|
@@ -2808,14 +2798,12 @@ const $2e81c18d82b25372$export$abec7fd9f0b9cc22 = /*@__PURE__*/$3b52ccc10510b32a
|
|
|
2808
2798
|
let anon_id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "anonymous";
|
|
2809
2799
|
$7f95f77417d06249$export$de56f1198d121036("Initializing Cookiebot tracking");
|
|
2810
2800
|
if (!$2e81c18d82b25372$var$required_consent_level) return $7f95f77417d06249$export$de56f1198d121036("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
|
|
2811
|
-
const
|
|
2812
|
-
|
|
2813
|
-
$335c248bb07a3509$export$336e7ad40bae0652(() => $2e81c18d82b25372$var$has_consent ? original_get_depict_id() : anon_id);
|
|
2814
|
-
$335c248bb07a3509$export$8a96793bf9f87d90(() => $2e81c18d82b25372$var$has_consent ? original_get_user_id() : anon_id);
|
|
2801
|
+
const original_get_session_id = (0, $335c248bb07a3509$export$61e7e1f11e96692f);
|
|
2802
|
+
$335c248bb07a3509$export$93ae15b1ae509334(() => $2e81c18d82b25372$var$has_consent ? original_get_session_id() : anon_id);
|
|
2815
2803
|
for await (const consent_obj of $2e81c18d82b25372$export$8827362e5e938d26()) {
|
|
2816
2804
|
// Changing this will change the return value of function given to set_depict_id_fn above
|
|
2817
2805
|
$2e81c18d82b25372$var$has_consent = consent_obj[$2e81c18d82b25372$var$required_consent_level];
|
|
2818
|
-
if (!$2e81c18d82b25372$var$has_consent) $7f95f77417d06249$export$de56f1198d121036('dsid
|
|
2806
|
+
if (!$2e81c18d82b25372$var$has_consent) $7f95f77417d06249$export$de56f1198d121036('dsid will be set to, "'.concat(anon_id, '", until Cookiebot has consent for "').concat($2e81c18d82b25372$var$required_consent_level, '"'));else $7f95f77417d06249$export$de56f1198d121036('Cookiebot obtained consent for "'.concat($2e81c18d82b25372$var$required_consent_level, '", will use true dsid/session_id'));
|
|
2819
2807
|
}
|
|
2820
2808
|
});
|
|
2821
2809
|
const $e9ab1681652f3fca$var$required_consent_level = process.env.DEPICT_TRACKING_CONSENT_LEVEL;
|
|
@@ -2878,14 +2866,12 @@ const $e9ab1681652f3fca$export$f0f6c846d96fdbec = /*@__PURE__*/$3b52ccc10510b32a
|
|
|
2878
2866
|
let anon_id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "anonymous";
|
|
2879
2867
|
$7f95f77417d06249$export$de56f1198d121036("Initializing OptAnon tracking");
|
|
2880
2868
|
if (!$e9ab1681652f3fca$var$required_consent_level) return $7f95f77417d06249$export$de56f1198d121036("No consent level set for Depict tracking. Ignoring consent and tracking everything.");
|
|
2881
|
-
const
|
|
2882
|
-
|
|
2883
|
-
$335c248bb07a3509$export$336e7ad40bae0652(() => $e9ab1681652f3fca$var$has_consent ? original_get_depict_id() : anon_id);
|
|
2884
|
-
$335c248bb07a3509$export$8a96793bf9f87d90(() => $e9ab1681652f3fca$var$has_consent ? original_get_user_id() : anon_id);
|
|
2869
|
+
const original_get_session_id = (0, $335c248bb07a3509$export$61e7e1f11e96692f);
|
|
2870
|
+
$335c248bb07a3509$export$93ae15b1ae509334(() => $e9ab1681652f3fca$var$has_consent ? original_get_session_id() : anon_id);
|
|
2885
2871
|
for await (const consent_obj of $e9ab1681652f3fca$export$7e4427e80d5fc619()) {
|
|
2886
2872
|
// Changing this will change the return value of function given to set_depict_id_fn above
|
|
2887
2873
|
$e9ab1681652f3fca$var$has_consent = consent_obj[$e9ab1681652f3fca$var$required_consent_level];
|
|
2888
|
-
if (!$e9ab1681652f3fca$var$has_consent) $7f95f77417d06249$export$de56f1198d121036('dsid/
|
|
2874
|
+
if (!$e9ab1681652f3fca$var$has_consent) $7f95f77417d06249$export$de56f1198d121036('dsid/session_id will be set to, "'.concat(anon_id, '", until Optanon has consent for "').concat($e9ab1681652f3fca$var$required_consent_level, '"'));else $7f95f77417d06249$export$de56f1198d121036('Optanon obtained consent for "'.concat($e9ab1681652f3fca$var$required_consent_level, '", will use true dsid/session_id'));
|
|
2889
2875
|
}
|
|
2890
2876
|
});
|
|
2891
2877
|
const $99b61a0622560fcf$var$g = typeof globalThis == "object" && globalThis || window;
|
|
@@ -3505,15 +3491,11 @@ async function $d72c9a0d8e9c5a95$export$1bc0df10745d5412(t, options, headers) {
|
|
|
3505
3491
|
}
|
|
3506
3492
|
async function $d72c9a0d8e9c5a95$export$d40679eb4cf32f09(t, options, headers) {
|
|
3507
3493
|
let get_url = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : $d72c9a0d8e9c5a95$var$default_get_fetch_url;
|
|
3508
|
-
const dsid = $335c248bb07a3509$export$6399bdb2291895e0();
|
|
3509
3494
|
const session_id = options.session_id || $335c248bb07a3509$export$61e7e1f11e96692f();
|
|
3510
|
-
const user_id = options.user_id || dsid;
|
|
3511
3495
|
const body = {
|
|
3512
3496
|
tenant: t.tenant,
|
|
3513
3497
|
market: t.market,
|
|
3514
|
-
user_id: user_id,
|
|
3515
3498
|
session_id: session_id,
|
|
3516
|
-
dsid: dsid,
|
|
3517
3499
|
document_referrer: document.referrer,
|
|
3518
3500
|
...options
|
|
3519
3501
|
};
|
|
@@ -4153,7 +4135,7 @@ class $bc463df3122a418b$export$3be7054c61590ee3 {
|
|
|
4153
4135
|
for (let i = 0; i < mutations.length; i++) {
|
|
4154
4136
|
const matching_added_els = $8b27923e1d1e6b99$export$5e63aea0cac01fa0(mutations[i].addedNodes, this.selector);
|
|
4155
4137
|
if (matching_added_els.length) {
|
|
4156
|
-
if ($parcel$interopDefault($bBfCy$babelruntimehelpersclassPrivateFieldGet)(this, $bc463df3122a418b$var$_verbose)) $7f95f77417d06249$export$de56f1198d121036("New elements", matching_added_els, " matching selector", this.selector, "were aded to", container, "lazyloading
|
|
4138
|
+
if ($parcel$interopDefault($bBfCy$babelruntimehelpersclassPrivateFieldGet)(this, $bc463df3122a418b$var$_verbose)) $7f95f77417d06249$export$de56f1198d121036("New elements", matching_added_els, " matching selector", this.selector, "were aded to", container, "lazyloading\u2026");
|
|
4157
4139
|
this.lazyfinder.elements.push(...matching_added_els);
|
|
4158
4140
|
matching_added_els.forEach($bc463df3122a418b$var$_classPrivateMethodGet(this, $bc463df3122a418b$var$_initiate_new_image, $bc463df3122a418b$var$_initiate_new_image2).bind(this));
|
|
4159
4141
|
}
|
|
@@ -5357,7 +5339,7 @@ class $a782ed55f4206a68$export$1a8782481a9af507 {
|
|
|
5357
5339
|
let itemTemplate;
|
|
5358
5340
|
if (item.sale_price !== item.original_price) {
|
|
5359
5341
|
itemTemplate = template.replaceAll($a782ed55f4206a68$var$discountMatcher, "$1").replaceAll($a782ed55f4206a68$var$noDiscountMatcher, "");
|
|
5360
|
-
item.discount = "
|
|
5342
|
+
item.discount = "\u2013".concat(Math.round(100 * (1 - item.sale_price / item.original_price)), "%");
|
|
5361
5343
|
} else {
|
|
5362
5344
|
itemTemplate = template.replaceAll($a782ed55f4206a68$var$discountMatcher, "").replaceAll($a782ed55f4206a68$var$noDiscountMatcher, "$1");
|
|
5363
5345
|
item.discount = "";
|
|
@@ -5451,8 +5433,8 @@ $ebe64dbcfb106f16$export$2e2bcd8739ae039 = async options => {
|
|
|
5451
5433
|
};
|
|
5452
5434
|
|
|
5453
5435
|
// @ts-ignore
|
|
5454
|
-
var $
|
|
5455
|
-
$
|
|
5436
|
+
var $d64ae53fcd29bba1$exports = {};
|
|
5437
|
+
$d64ae53fcd29bba1$exports = ".depict .rec_outer.noautospacing {\n width: 6cm;\n max-width: 46vw;\n margin-left: 1%;\n margin-right: 1%;\n}\n\n.depict .rec_outer.noautospacing:nth-child(1) {\n margin-left: 0;\n}\n\n.depict .rec_outer.noautospacing:nth-last-child(1) {\n margin-right: 0;\n}\n\n.depict-slider .slider_snap {\n scroll-snap-type: x mandatory;\n}\n\n.depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n margin-top: -1%;\n margin-bottom: -2%;\n padding-top: 1%;\n padding-bottom: 2%;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n.depict-slider button.right {\n right: 0;\n}\n\n.depict-slider button.left, .depict-slider button.right {\n z-index: 2;\n touch-action: manipulation;\n width: 1cm;\n height: 1cm;\n cursor: pointer;\n background: #fff;\n border: none;\n padding: .5%;\n transition-duration: .2s;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.depict-slider button.left.hidden, .depict-slider button.right.hidden {\n opacity: 0;\n cursor: default;\n}\n\n.depict-slider button.left {\n left: 0;\n transform: translateY(-50%)rotate(180deg);\n}\n\n.depict-slider button.left img, .depict-slider button.right img {\n width: 100%;\n height: 100%;\n}\n\n.depict-slider .rec_outer {\n margin-top: 0 !important;\n}\n\n";
|
|
5456
5438
|
const $3f49f9b73bfc2a38$var$default_image_src = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjYsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iOSwyLjYgOC4zLDMuNCAxMi40LDcuNSAxLjYsNy41IDEuNiw4LjUgMTIuNCw4LjUgOC4zLDEyLjYgOSwxMy40IDE0LjQsOCAiLz4NCjwvc3ZnPg0K";
|
|
5457
5439
|
class $3f49f9b73bfc2a38$export$4d41c6499d53639c extends (0, $817cb0cb4b98187e$export$68babfc5be0de5da) {
|
|
5458
5440
|
constructor(static_options, override_lazyfier_options) {
|
|
@@ -5484,7 +5466,7 @@ class $3f49f9b73bfc2a38$export$4d41c6499d53639c extends (0, $817cb0cb4b98187e$ex
|
|
|
5484
5466
|
function $3f49f9b73bfc2a38$export$f1b8b9fd75ddcab1(slider) {
|
|
5485
5467
|
const style_elem = document.createElement("style");
|
|
5486
5468
|
style_elem.type = "text/css";
|
|
5487
|
-
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($
|
|
5469
|
+
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($d64ae53fcd29bba1$exports)));
|
|
5488
5470
|
slider.container.appendChild(style_elem);
|
|
5489
5471
|
}
|
|
5490
5472
|
async function $bbf8331c74194de9$export$cd12721587f4f16d(t, rendering_options, options_for_us, slider_options, override_lazyfier_options) {
|
|
@@ -5532,7 +5514,7 @@ async function $bbf8331c74194de9$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
5532
5514
|
elements: container ? container : [slider.container]
|
|
5533
5515
|
};
|
|
5534
5516
|
}
|
|
5535
|
-
async function $
|
|
5517
|
+
async function $14c1124272475590$export$30933c637c977eef(_ref) {
|
|
5536
5518
|
var _template_tool$data;
|
|
5537
5519
|
let {
|
|
5538
5520
|
t: t,
|
|
@@ -5551,7 +5533,8 @@ async function $51509cd9b5d4acc7$export$30933c637c977eef(_ref) {
|
|
|
5551
5533
|
template,
|
|
5552
5534
|
// recommendation template
|
|
5553
5535
|
chunk_size_for_load_more = 4,
|
|
5554
|
-
insertion_promise: insertion_promise
|
|
5536
|
+
insertion_promise: insertion_promise,
|
|
5537
|
+
view_more_text: view_more_text
|
|
5555
5538
|
} = _ref;
|
|
5556
5539
|
const {
|
|
5557
5540
|
catchify: catchify,
|
|
@@ -5623,8 +5606,8 @@ async function $51509cd9b5d4acc7$export$30933c637c977eef(_ref) {
|
|
|
5623
5606
|
}, items);
|
|
5624
5607
|
}
|
|
5625
5608
|
});
|
|
5626
|
-
if (with_loadmore) catchify($
|
|
5627
|
-
if (infinite_scroll) catchify($
|
|
5609
|
+
if (with_loadmore) catchify($14c1124272475590$var$setup_load_more)(t, root, chunk_size_for_load_more, view_more_text);
|
|
5610
|
+
if (infinite_scroll) catchify($14c1124272475590$var$setup_infinite_scroll)(t, root);
|
|
5628
5611
|
if (title) {
|
|
5629
5612
|
const [title_element] = $8b27923e1d1e6b99$export$5e63aea0cac01fa0(container, "h1.title, h2.title, h3.title, h4.title, h5.title, h6.title");
|
|
5630
5613
|
if (title_element) {
|
|
@@ -5633,7 +5616,7 @@ async function $51509cd9b5d4acc7$export$30933c637c977eef(_ref) {
|
|
|
5633
5616
|
}
|
|
5634
5617
|
if (template_tool !== null && template_tool !== void 0 && (_template_tool$data = template_tool.data) !== null && _template_tool$data !== void 0 && _template_tool$data.length) return container;else dlog("Didn't get recs from API", template_tool);
|
|
5635
5618
|
}
|
|
5636
|
-
function $
|
|
5619
|
+
function $14c1124272475590$var$setup_infinite_scroll(t, root) {
|
|
5637
5620
|
const {
|
|
5638
5621
|
dlog: dlog,
|
|
5639
5622
|
catchify: catchify
|
|
@@ -5649,14 +5632,14 @@ function $51509cd9b5d4acc7$var$setup_infinite_scroll(t, root) {
|
|
|
5649
5632
|
records.forEach(record => {
|
|
5650
5633
|
if (record.isIntersecting && record.target == get_last_visible_el()) {
|
|
5651
5634
|
dlog("Loading more recs because of", record);
|
|
5652
|
-
if ($
|
|
5635
|
+
if ($14c1124272475590$var$load_more_elements(root)) $14c1124272475590$var$setup_infinite_scroll(t, root);
|
|
5653
5636
|
}
|
|
5654
5637
|
});
|
|
5655
5638
|
}));
|
|
5656
5639
|
dlog("starting to intersection observe", last_visible_el, "for infinite scroll");
|
|
5657
5640
|
intersection_observer.observe(last_visible_el);
|
|
5658
5641
|
}
|
|
5659
|
-
function $
|
|
5642
|
+
function $14c1124272475590$var$load_more_elements(root) {
|
|
5660
5643
|
let chunk_size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
|
|
5661
5644
|
const hidden_elements = root.querySelectorAll("a.rec_outer.not_visible");
|
|
5662
5645
|
let i = 0;
|
|
@@ -5668,22 +5651,26 @@ function $51509cd9b5d4acc7$var$load_more_elements(root) {
|
|
|
5668
5651
|
const has_more = i >= chunk_size && hidden_elements.length > chunk_size;
|
|
5669
5652
|
return has_more;
|
|
5670
5653
|
}
|
|
5671
|
-
function $
|
|
5654
|
+
function $14c1124272475590$var$setup_load_more(t, root, chunk_size) {
|
|
5655
|
+
let view_more_text = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "Visa mer";
|
|
5672
5656
|
const {
|
|
5673
5657
|
catchify: catchify
|
|
5674
5658
|
} = t,
|
|
5675
5659
|
load_more_cont = $8b27923e1d1e6b99$export$d3e2a0560cbf4787('<div class="load-more-container"></div>'),
|
|
5676
|
-
load_button = load_more_cont.appendChild($
|
|
5660
|
+
load_button = load_more_cont.appendChild($f0d9ae7bf9bd697d$export$34b9dba7ce09269b("button", {
|
|
5661
|
+
class: "load_more",
|
|
5662
|
+
children: view_more_text
|
|
5663
|
+
}));
|
|
5677
5664
|
load_button.addEventListener("click", catchify(load_more_recs_and_hide_button_if_needed));
|
|
5678
5665
|
root.after(load_more_cont);
|
|
5679
5666
|
load_more_recs_and_hide_button_if_needed();
|
|
5680
5667
|
function load_more_recs_and_hide_button_if_needed() {
|
|
5681
|
-
if (!$
|
|
5668
|
+
if (!$14c1124272475590$var$load_more_elements(root, chunk_size))
|
|
5682
5669
|
// there aren't any recs left to display
|
|
5683
5670
|
load_button.classList.add("not_visible");
|
|
5684
5671
|
}
|
|
5685
5672
|
}
|
|
5686
|
-
function $
|
|
5673
|
+
function $14c1124272475590$export$4f39078bdc72ecd0(_t, d, i, with_loadmore, with_slider, infinite_scroll) {
|
|
5687
5674
|
d.class || (d.class = "");
|
|
5688
5675
|
if (infinite_scroll) d.class = i >= 4 ? "not_visible" : ""; // this will make it hold image loading until .load_image is called on .rec_outer
|
|
5689
5676
|
if (with_loadmore) d.class = "not_visible";
|
|
@@ -5691,7 +5678,7 @@ function $51509cd9b5d4acc7$export$4f39078bdc72ecd0(_t, d, i, with_loadmore, with
|
|
|
5691
5678
|
if (!d.percentage_off || d.percentage_off < 10) d.percentage_off = "";
|
|
5692
5679
|
return d;
|
|
5693
5680
|
}
|
|
5694
|
-
function $
|
|
5681
|
+
function $14c1124272475590$export$c410ce1205e5118a(_t, itms, d, slider) {
|
|
5695
5682
|
for (const item of itms) {
|
|
5696
5683
|
const {
|
|
5697
5684
|
image_url: image_url
|
|
@@ -6114,8 +6101,8 @@ async function $79e67f88d50f1879$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
6114
6101
|
}
|
|
6115
6102
|
|
|
6116
6103
|
// @ts-ignore
|
|
6117
|
-
var $
|
|
6118
|
-
$
|
|
6104
|
+
var $2f73869d45c5c974$exports = {};
|
|
6105
|
+
$2f73869d45c5c974$exports = ".depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n";
|
|
6119
6106
|
let $87dd73b8c244f3d2$var$slider_styling_was_inserted = false;
|
|
6120
6107
|
async function $87dd73b8c244f3d2$export$82cfdc85a4d15688(t, recommendation_renderer_options, _ref) {
|
|
6121
6108
|
let {
|
|
@@ -6139,7 +6126,7 @@ async function $87dd73b8c244f3d2$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
6139
6126
|
if (!elements) return rendering_result;
|
|
6140
6127
|
if (!$87dd73b8c244f3d2$var$slider_styling_was_inserted) {
|
|
6141
6128
|
$87dd73b8c244f3d2$var$slider_styling_was_inserted = true;
|
|
6142
|
-
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($
|
|
6129
|
+
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($2f73869d45c5c974$exports)));
|
|
6143
6130
|
}
|
|
6144
6131
|
insertion_point.replaceWith(slider.container);
|
|
6145
6132
|
slider.insert_here.append(...elements);
|
|
@@ -7056,7 +7043,7 @@ function $78fd85c1f4513422$export$3ebd86018b39d9d2(t, selector, filter) {
|
|
|
7056
7043
|
element: element
|
|
7057
7044
|
} = eoe;
|
|
7058
7045
|
const the_id = element.innerText;
|
|
7059
|
-
$78fd85c1f4513422$export$1ac466d53a6636ac(t, the_id, $335c248bb07a3509$export$
|
|
7046
|
+
$78fd85c1f4513422$export$1ac466d53a6636ac(t, the_id, $335c248bb07a3509$export$61e7e1f11e96692f(), filter);
|
|
7060
7047
|
});
|
|
7061
7048
|
}
|
|
7062
7049
|
function $78fd85c1f4513422$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
@@ -7093,7 +7080,7 @@ function $78fd85c1f4513422$export$ff8673d5dea82bd4(tenant, id_extractor) {
|
|
|
7093
7080
|
})().catch(e => $3b52ccc10510b32a$export$f18d5b0af29128b7([e, "Extracting and sending transaction IDs from URL failed"], "warning"));
|
|
7094
7081
|
}
|
|
7095
7082
|
function $78fd85c1f4513422$export$1ac466d53a6636ac(t, input_id) {
|
|
7096
|
-
let
|
|
7083
|
+
let session_id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : $335c248bb07a3509$export$61e7e1f11e96692f();
|
|
7097
7084
|
let filter = arguments.length > 3 ? arguments[3] : undefined;
|
|
7098
7085
|
const transaction_id = typeof filter == "function" ? filter(input_id) : input_id;
|
|
7099
7086
|
if (!transaction_id) {
|
|
@@ -7107,7 +7094,7 @@ function $78fd85c1f4513422$export$1ac466d53a6636ac(t, input_id) {
|
|
|
7107
7094
|
events: [{
|
|
7108
7095
|
event_type: "transaction_mapping",
|
|
7109
7096
|
transaction_id: transaction_id,
|
|
7110
|
-
|
|
7097
|
+
session_id: session_id
|
|
7111
7098
|
}]
|
|
7112
7099
|
};
|
|
7113
7100
|
$49880c4ce4bb7db2$export$cc3b6ddf805f6156((0, $62869a3ed703f236$export$362abebb4b313340) + "/v2/track", payload);
|
|
@@ -7152,7 +7139,7 @@ function $138f1061348967b4$var$make_tracker_send_to_depict(ga_tracker, t, filter
|
|
|
7152
7139
|
originalSendHitTask(model);
|
|
7153
7140
|
// console.log('Sent original hit, now sending to depict');
|
|
7154
7141
|
try {
|
|
7155
|
-
const dsid = $335c248bb07a3509$export$
|
|
7142
|
+
const dsid = $335c248bb07a3509$export$61e7e1f11e96692f();
|
|
7156
7143
|
const payload = model.get("hitPayload");
|
|
7157
7144
|
const sp = new URLSearchParams(payload);
|
|
7158
7145
|
const id = sp.get("ti");
|
|
@@ -7165,22 +7152,6 @@ function $138f1061348967b4$var$make_tracker_send_to_depict(ga_tracker, t, filter
|
|
|
7165
7152
|
}
|
|
7166
7153
|
});
|
|
7167
7154
|
}
|
|
7168
|
-
async function $3cb1cfeb94b7f96b$export$d63b08f4f29ddba5(t, unavailability_type) {
|
|
7169
|
-
const product_id = await t.get_product_id();
|
|
7170
|
-
$7f95f77417d06249$export$de56f1198d121036("Notifying Depict that product id: ".concat(product_id, " is ").concat(unavailability_type));
|
|
7171
|
-
const payload = {
|
|
7172
|
-
"tenant": t.tenant,
|
|
7173
|
-
"market": t.market,
|
|
7174
|
-
"events": [{
|
|
7175
|
-
event_type: "product_unavailable",
|
|
7176
|
-
product_id: product_id,
|
|
7177
|
-
unavailability_type: unavailability_type,
|
|
7178
|
-
user_id: $335c248bb07a3509$export$adc61a405a4cabed(),
|
|
7179
|
-
dsid: $335c248bb07a3509$export$6399bdb2291895e0()
|
|
7180
|
-
}]
|
|
7181
|
-
};
|
|
7182
|
-
$49880c4ce4bb7db2$export$cc3b6ddf805f6156((0, $62869a3ed703f236$export$362abebb4b313340) + "/v2/track", payload);
|
|
7183
|
-
}
|
|
7184
7155
|
function $89eca8044393f350$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
7185
7156
|
$89eca8044393f350$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
7186
7157
|
privateMap.set(obj, value);
|
|
@@ -7691,7 +7662,7 @@ function $51fea29d5f0a339b$var$deal_w_removal_of_node_array(node_array, push_dis
|
|
|
7691
7662
|
push_disconnector(disconnect_observer);
|
|
7692
7663
|
}
|
|
7693
7664
|
}
|
|
7694
|
-
const $bb8d2c77db19a4c0$export$3b75288f46cadd96 = () => new Array($c0c9a890763623b3$export$bb0a9c36cf454ea0(3, 8)).fill("
|
|
7665
|
+
const $bb8d2c77db19a4c0$export$3b75288f46cadd96 = () => new Array($c0c9a890763623b3$export$bb0a9c36cf454ea0(3, 8)).fill("\u2B1C").join("");
|
|
7695
7666
|
const $bb8d2c77db19a4c0$var$make_sel = (image_url, attribute) => "[".concat(attribute, "=").concat(JSON.stringify(image_url), "]");
|
|
7696
7667
|
const $bb8d2c77db19a4c0$export$a4eccf92efefa04d = function (image_width, image_height) {
|
|
7697
7668
|
let color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "#f6f7f8";
|
|
@@ -8123,10 +8094,10 @@ function $dc92594b01eacde3$export$cd1adfb8059b5fcd(promise, ms) {
|
|
|
8123
8094
|
const $eedabd28f7a8a073$var$get_voyado_id = () => {
|
|
8124
8095
|
var _exec;
|
|
8125
8096
|
const va = (_exec = /\b_vaI=([^;]+)/.exec(document.cookie)) === null || _exec === void 0 ? void 0 : _exec[1];
|
|
8126
|
-
return va || $335c248bb07a3509$export$
|
|
8097
|
+
return va || $335c248bb07a3509$export$61e7e1f11e96692f();
|
|
8127
8098
|
};
|
|
8128
8099
|
const $eedabd28f7a8a073$export$a739d9a07da7f9ce = /*@__PURE__*/$3b52ccc10510b32a$export$b3bbfd758f11cfa9(() => {
|
|
8129
|
-
$335c248bb07a3509$export$
|
|
8100
|
+
$335c248bb07a3509$export$93ae15b1ae509334($eedabd28f7a8a073$var$get_voyado_id);
|
|
8130
8101
|
});
|
|
8131
8102
|
function $102c3c26150518b7$export$4a3043e508dd72f0(_ref) {
|
|
8132
8103
|
let {
|
|
@@ -8274,8 +8245,8 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8274
8245
|
on_close_(exit_oos_iterator);
|
|
8275
8246
|
}));
|
|
8276
8247
|
}
|
|
8277
|
-
var $
|
|
8278
|
-
$
|
|
8248
|
+
var $6c1103c313edcc81$exports = {};
|
|
8249
|
+
$6c1103c313edcc81$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
8279
8250
|
let $ba9b4cd7e24de87e$var$inserted = false;
|
|
8280
8251
|
const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
8281
8252
|
let {
|
|
@@ -8287,7 +8258,7 @@ const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
|
8287
8258
|
} = _ref;
|
|
8288
8259
|
if (!$ba9b4cd7e24de87e$var$inserted) {
|
|
8289
8260
|
// Insert styling on first import
|
|
8290
|
-
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8261
|
+
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($6c1103c313edcc81$exports)));
|
|
8291
8262
|
$ba9b4cd7e24de87e$var$inserted = true;
|
|
8292
8263
|
}
|
|
8293
8264
|
return (
|
|
@@ -8526,8 +8497,8 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
|
8526
8497
|
collapse: collapse
|
|
8527
8498
|
};
|
|
8528
8499
|
};
|
|
8529
|
-
var $
|
|
8530
|
-
$
|
|
8500
|
+
var $4f104a7ebe4cdc54$exports = {};
|
|
8501
|
+
$4f104a7ebe4cdc54$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n";
|
|
8531
8502
|
const $b42b9f62e8b6cb2d$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
8532
8503
|
const $b42b9f62e8b6cb2d$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
8533
8504
|
function $b42b9f62e8b6cb2d$export$f39a7d0667e924a(what_to_watch) {
|
|
@@ -8690,7 +8661,7 @@ const $dfce76a4aeb41067$export$788756b42446dc2d = _ref => {
|
|
|
8690
8661
|
} = _ref;
|
|
8691
8662
|
if (!$dfce76a4aeb41067$var$inserted) {
|
|
8692
8663
|
// Insert styling on first import
|
|
8693
|
-
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8664
|
+
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($4f104a7ebe4cdc54$exports)));
|
|
8694
8665
|
$dfce76a4aeb41067$var$inserted = true;
|
|
8695
8666
|
}
|
|
8696
8667
|
const img = process.env.BUILD_TARGET === "modern" || process.env.BUILD_TARGET === "dev" ? $dfce76a4aeb41067$var$Image(options) : $dfce76a4aeb41067$var$CompatibleImage(options);
|
|
@@ -8777,8 +8748,8 @@ function $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8777
8748
|
}
|
|
8778
8749
|
return sourceset_component;
|
|
8779
8750
|
}
|
|
8780
|
-
var $
|
|
8781
|
-
$
|
|
8751
|
+
var $be5deeed4683b89f$exports = {};
|
|
8752
|
+
$be5deeed4683b89f$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
8782
8753
|
|
|
8783
8754
|
// Saving bytez
|
|
8784
8755
|
// Maybe? @Daniel
|
|
@@ -8912,7 +8883,7 @@ const $8928a1027461fba4$export$2369f6fc1c911576 = _ref => {
|
|
|
8912
8883
|
...options
|
|
8913
8884
|
} = _ref;
|
|
8914
8885
|
if (!$8928a1027461fba4$var$styling_inserted) {
|
|
8915
|
-
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8886
|
+
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($be5deeed4683b89f$exports)));
|
|
8916
8887
|
$8928a1027461fba4$var$styling_inserted = true;
|
|
8917
8888
|
}
|
|
8918
8889
|
const main_image = $dfce76a4aeb41067$export$788756b42446dc2d({
|
package/ES10/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference path="../jsx.d.ts" />
|
|
2
|
-
import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
|
|
3
2
|
import { Accessor } from "solid-js";
|
|
4
|
-
export const version = "
|
|
3
|
+
export const version = "2.0.0";
|
|
5
4
|
export const is_debug: boolean;
|
|
6
5
|
/**
|
|
7
6
|
* Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
|
|
@@ -221,7 +220,7 @@ export function random_string(): string;
|
|
|
221
220
|
export function make_random_classname(): string;
|
|
222
221
|
export const base_url: string;
|
|
223
222
|
export type event_types = "page_view" | "click" | "add_to_cart" | "purchase" | "element_visible";
|
|
224
|
-
declare const allowed_keys: readonly ["tenant", "market", "type", "
|
|
223
|
+
declare const allowed_keys: readonly ["tenant", "market", "type", "session_id", "product_id", "entity_identifiers", "url", "entity_price", "currency", "document_referrer", "document_width", "attribution_id", "recommendation_id", "click_location", "ab_test_group", "variant_ids", "transaction_id", "error_type", "detail", "recommendation_type", "search_result_id", "product_listing_result_id"];
|
|
225
224
|
export type depict_body = Partial<{ [K in (typeof allowed_keys)[number]]: any }>;
|
|
226
225
|
export type depict_payload = depict_body[];
|
|
227
226
|
type any_properties = {
|
|
@@ -235,16 +234,10 @@ export const foolproof_send_beacon: (url: string, payload: {
|
|
|
235
234
|
[key: string]: any;
|
|
236
235
|
}) => boolean | undefined;
|
|
237
236
|
export const send_depict: (payload: noisy_depict_payload, use_ws?: boolean | undefined) => boolean | Promise<void | undefined> | undefined;
|
|
238
|
-
export let
|
|
239
|
-
export let get_user_id: () => string;
|
|
240
|
-
export let get_session_id: () => string | undefined;
|
|
241
|
-
export const set_depict_id_fn: (newfn: () => string) => (() => string) | undefined;
|
|
242
|
-
export const set_user_id_fn: (newfn: () => string) => (() => string) | undefined;
|
|
237
|
+
export let get_session_id: () => string;
|
|
243
238
|
export const set_session_id_fn: (newfn: () => string) => (() => string) | undefined;
|
|
244
239
|
export type TrackingEventContextData = {
|
|
245
|
-
|
|
246
|
-
dsid: string;
|
|
247
|
-
session_id?: string;
|
|
240
|
+
session_id: string;
|
|
248
241
|
url: string;
|
|
249
242
|
document_width: number;
|
|
250
243
|
document_referrer: string;
|
|
@@ -260,7 +253,6 @@ export const depict_prefilled: (vars: Partial<{
|
|
|
260
253
|
currency: any;
|
|
261
254
|
tenant: any;
|
|
262
255
|
market: any;
|
|
263
|
-
user_id: any;
|
|
264
256
|
session_id: any;
|
|
265
257
|
product_id: any;
|
|
266
258
|
entity_identifiers: any;
|
|
@@ -272,7 +264,6 @@ export const depict_prefilled: (vars: Partial<{
|
|
|
272
264
|
click_location: any;
|
|
273
265
|
ab_test_group: any;
|
|
274
266
|
variant_ids: any;
|
|
275
|
-
dsid: any;
|
|
276
267
|
transaction_id: any;
|
|
277
268
|
error_type: any;
|
|
278
269
|
recommendation_type: any;
|
|
@@ -288,7 +279,6 @@ export const depict_click: (vars: Partial<{
|
|
|
288
279
|
currency: any;
|
|
289
280
|
tenant: any;
|
|
290
281
|
market: any;
|
|
291
|
-
user_id: any;
|
|
292
282
|
session_id: any;
|
|
293
283
|
product_id: any;
|
|
294
284
|
entity_identifiers: any;
|
|
@@ -300,7 +290,6 @@ export const depict_click: (vars: Partial<{
|
|
|
300
290
|
click_location: any;
|
|
301
291
|
ab_test_group: any;
|
|
302
292
|
variant_ids: any;
|
|
303
|
-
dsid: any;
|
|
304
293
|
transaction_id: any;
|
|
305
294
|
error_type: any;
|
|
306
295
|
recommendation_type: any;
|
|
@@ -316,7 +305,6 @@ export const depict_add_to_cart: (vars: Partial<{
|
|
|
316
305
|
currency: any;
|
|
317
306
|
tenant: any;
|
|
318
307
|
market: any;
|
|
319
|
-
user_id: any;
|
|
320
308
|
session_id: any;
|
|
321
309
|
product_id: any;
|
|
322
310
|
entity_identifiers: any;
|
|
@@ -328,7 +316,6 @@ export const depict_add_to_cart: (vars: Partial<{
|
|
|
328
316
|
click_location: any;
|
|
329
317
|
ab_test_group: any;
|
|
330
318
|
variant_ids: any;
|
|
331
|
-
dsid: any;
|
|
332
319
|
transaction_id: any;
|
|
333
320
|
error_type: any;
|
|
334
321
|
recommendation_type: any;
|
|
@@ -1006,6 +993,7 @@ type FetchRecsOptions = {
|
|
|
1006
993
|
metadata?: Record<string, any>;
|
|
1007
994
|
} & ExclusiveId;
|
|
1008
995
|
/**
|
|
996
|
+
* @deprecated, use fetchDepictRecommendations instead
|
|
1009
997
|
* Fetches recommendations from the depict v2 recommendation api.
|
|
1010
998
|
* Will select the endpoint after which id property is given.
|
|
1011
999
|
*
|
|
@@ -1153,8 +1141,6 @@ export type RecRendererResult<T extends Display> = Record<string, never> | {
|
|
|
1153
1141
|
export function queueMacroTask(callback: VoidFunction): void;
|
|
1154
1142
|
interface SDKRenderingInfo {
|
|
1155
1143
|
set_on_index_change: (fn: (index: number) => void) => void;
|
|
1156
|
-
merchant: string;
|
|
1157
|
-
market: string;
|
|
1158
1144
|
}
|
|
1159
1145
|
/**
|
|
1160
1146
|
* Creates a handler for sending the "recommendations_inserted" event on new results.
|
|
@@ -1528,7 +1514,8 @@ export function get_recs_with_template({
|
|
|
1528
1514
|
template,
|
|
1529
1515
|
// recommendation template
|
|
1530
1516
|
chunk_size_for_load_more,
|
|
1531
|
-
insertion_promise
|
|
1517
|
+
insertion_promise,
|
|
1518
|
+
view_more_text
|
|
1532
1519
|
}: {
|
|
1533
1520
|
t: Tenant;
|
|
1534
1521
|
recs?: any[];
|
|
@@ -1544,6 +1531,7 @@ export function get_recs_with_template({
|
|
|
1544
1531
|
template: string;
|
|
1545
1532
|
chunk_size_for_load_more?: number;
|
|
1546
1533
|
insertion_promise?: Promise<void | unknown>;
|
|
1534
|
+
view_more_text?: string;
|
|
1547
1535
|
}): Promise<ChildNode[] | void>;
|
|
1548
1536
|
export function default_pre_processor(_t: any, d: any, i: number, with_loadmore: boolean, with_slider: boolean, infinite_scroll: boolean): any;
|
|
1549
1537
|
export function default_post_processor(_t: any, itms: HTMLCollection, d: any, slider: Deprecated_Amazing_Slider | null): HTMLCollection;
|
|
@@ -1907,12 +1895,11 @@ export function datalayer_interceptor(interception_callback: (layer_entry: any)
|
|
|
1907
1895
|
* For example: url => url.searchParams.get("orderId")
|
|
1908
1896
|
*/
|
|
1909
1897
|
export function url_transaction_id_extractor(tenant: Tenant, id_extractor: (url: URL) => unknown): void;
|
|
1910
|
-
export function send_transaction_id_to_depict(t: Tenant, input_id: string,
|
|
1898
|
+
export function send_transaction_id_to_depict(t: Tenant, input_id: string, session_id?: string, filter?: (text: string) => string | undefined): void;
|
|
1911
1899
|
/**
|
|
1912
1900
|
* Intercepts google analytics events for transactions (e.g when payment is made) and also sends it to depict.
|
|
1913
1901
|
* */
|
|
1914
1902
|
export function ga_to_transaction_api(t: Tenant, filter?: (text: string) => string | undefined): void;
|
|
1915
|
-
export function send_product_unavailable_to_depict(t: Tenant, unavailability_type: EUnavailabilityType): Promise<void>;
|
|
1916
1903
|
export interface ListenableSetEvent<T> extends CustomEvent {
|
|
1917
1904
|
detail: T;
|
|
1918
1905
|
}
|