@depict-ai/utilishared 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +228 -110
- package/dist/main.js +53 -43
- package/dist/module.js +53 -43
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const process = { env: {} }; // In case that the code using this wasn't built with "node emulation", just make process.env accesses become undefined.
|
|
1
2
|
function $parcel$exportWildcard(dest, source) {
|
|
2
3
|
Object.keys(source).forEach(function(key) {
|
|
3
4
|
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
@@ -294,6 +295,9 @@ function $e6c6e7929ea385ae$export$997143d41f6a0c9b(...args) {
|
|
|
294
295
|
}
|
|
295
296
|
|
|
296
297
|
|
|
298
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.41";
|
|
299
|
+
|
|
300
|
+
|
|
297
301
|
/**
|
|
298
302
|
* @deprecated this was a stupid idea, it's much easier to read if one just does a quick arrow function that provides the wanted arguments
|
|
299
303
|
*/ function $ee1d22bd1fcdd4e1$export$6e7454c733fa1fb2(fn, ...args) {
|
|
@@ -835,18 +839,16 @@ function $61a34358bf0d3d8b$var$fakesentry() {
|
|
|
835
839
|
}
|
|
836
840
|
|
|
837
841
|
|
|
838
|
-
function $268cbd9e4ade92db$export$b3bbfd758f11cfa9(fn,
|
|
839
|
-
const report_w_severity = (e)=>$268cbd9e4ade92db$export$f18d5b0af29128b7(msg ? [
|
|
840
|
-
e,
|
|
841
|
-
msg
|
|
842
|
-
] : e, severity);
|
|
842
|
+
function $268cbd9e4ade92db$export$b3bbfd758f11cfa9(fn, message, severity = "error") {
|
|
843
843
|
return function() {
|
|
844
|
+
const report_w_severity = (e)=>$268cbd9e4ade92db$export$f18d5b0af29128b7(message ? [
|
|
845
|
+
e,
|
|
846
|
+
message
|
|
847
|
+
] : e, severity);
|
|
844
848
|
try {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
if (typeof maybe_promise?.catch == "function") return maybe_promise.catch(report_w_severity);
|
|
849
|
-
return maybe_promise;
|
|
849
|
+
const return_value = Reflect.apply(fn, this, arguments);
|
|
850
|
+
if (fn?.constructor?.name === "AsyncFunction" || typeof return_value?.then === "function") return return_value.catch(report_w_severity);
|
|
851
|
+
return return_value;
|
|
850
852
|
} catch (e) {
|
|
851
853
|
report_w_severity(e);
|
|
852
854
|
}
|
|
@@ -1090,11 +1092,13 @@ class $9043c64496e3375f$export$12e07a2a9f87578a {
|
|
|
1090
1092
|
ifexists: (selector, callback)=>{
|
|
1091
1093
|
this.#check_observer_args(selector, callback, true);
|
|
1092
1094
|
if (selector instanceof Node) {
|
|
1093
|
-
if (document.documentElement.contains(selector))
|
|
1095
|
+
if (document.documentElement.contains(selector)) // When the selector is a node the selector and the element are the same, dunno how we could reflect that in the typing though
|
|
1096
|
+
this.#call_callbacks([
|
|
1094
1097
|
callback
|
|
1095
1098
|
], (callback_)=>({
|
|
1096
1099
|
element_: selector,
|
|
1097
1100
|
selector_: selector,
|
|
1101
|
+
// ts is being stupid here because it doesn't understand that everything in string | Text | Element | Comment that's a node is Text | Element | Comment
|
|
1098
1102
|
disconnector_: this.#disconnect_fn({
|
|
1099
1103
|
event_: "exists",
|
|
1100
1104
|
selector_: new WeakRef(selector),
|
|
@@ -1722,10 +1726,11 @@ class $d10801050840d92b$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
1722
1726
|
get: ()=>this.#ons[ev],
|
|
1723
1727
|
set: (v)=>this.#ons[ev] = v
|
|
1724
1728
|
});
|
|
1725
|
-
this.addEventListener(ev, (
|
|
1729
|
+
this.addEventListener(ev, (e)=>{
|
|
1730
|
+
// e can be MessageEvent | CloseEvent | ErrorEvent I think
|
|
1726
1731
|
const on_fn = this.#ons[ev];
|
|
1727
1732
|
if (typeof on_fn === "function") (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(on_fn).call(ev, e);
|
|
1728
|
-
})
|
|
1733
|
+
});
|
|
1729
1734
|
}
|
|
1730
1735
|
}
|
|
1731
1736
|
async #ensure_connection() {
|
|
@@ -1956,7 +1961,7 @@ const $0c84f8e99aac5765$export$aa26019042811d4f = /*@__PURE__*/ $0c84f8e99aac576
|
|
|
1956
1961
|
if (process.env.DEPICT === "false") return;
|
|
1957
1962
|
for(let i = 0; i < bodies.length; i++){
|
|
1958
1963
|
const id = (0, $650b64c1b384c895$export$656831b7e9c341c3)();
|
|
1959
|
-
$0c84f8e99aac5765$var$ws_instance
|
|
1964
|
+
$0c84f8e99aac5765$var$ws_instance?.ensure_sent({
|
|
1960
1965
|
id: id,
|
|
1961
1966
|
event: bodies[i]
|
|
1962
1967
|
}).catch((e)=>(0, $268cbd9e4ade92db$export$f18d5b0af29128b7)(e, "error"));
|
|
@@ -2026,7 +2031,7 @@ const $0c84f8e99aac5765$export$28cacbd9b4306ffc = /*@__PURE__*/ $0c84f8e99aac576
|
|
|
2026
2031
|
|
|
2027
2032
|
|
|
2028
2033
|
|
|
2029
|
-
let $e0a87646d12cb987$export$6399bdb2291895e0 =
|
|
2034
|
+
let $e0a87646d12cb987$export$6399bdb2291895e0 = ()=>{
|
|
2030
2035
|
let id = "";
|
|
2031
2036
|
let localstorage_error;
|
|
2032
2037
|
let cookie_error;
|
|
@@ -2063,7 +2068,7 @@ let $e0a87646d12cb987$export$6399bdb2291895e0 = /*@__PURE__*/ (0, /*@__PURE__*/$
|
|
|
2063
2068
|
}
|
|
2064
2069
|
if (!id) id = (0, $650b64c1b384c895$export$656831b7e9c341c3)();
|
|
2065
2070
|
return id;
|
|
2066
|
-
}
|
|
2071
|
+
};
|
|
2067
2072
|
let $e0a87646d12cb987$export$adc61a405a4cabed = $e0a87646d12cb987$export$6399bdb2291895e0;
|
|
2068
2073
|
let $e0a87646d12cb987$export$61e7e1f11e96692f = ()=>undefined;
|
|
2069
2074
|
const $e0a87646d12cb987$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9)((newfn)=>$e0a87646d12cb987$export$6399bdb2291895e0 = newfn);
|
|
@@ -2661,7 +2666,8 @@ function $2026711c6c2d6204$export$7e4427e80d5fc619() {
|
|
|
2661
2666
|
const existing_consent = $2026711c6c2d6204$var$consent_from_cookie();
|
|
2662
2667
|
if (existing_consent?.necessary) // If "necessary" isn't set, user hasn't actually given/withold consent yet.
|
|
2663
2668
|
$2026711c6c2d6204$var$cookie_ipns(existing_consent);
|
|
2664
|
-
window.addEventListener("consent.onetrust", (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((
|
|
2669
|
+
window.addEventListener("consent.onetrust", (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((evt)=>{
|
|
2670
|
+
const c = evt;
|
|
2665
2671
|
// Cast because TS doesn't know about the forEach coming up
|
|
2666
2672
|
const consent_obj = {};
|
|
2667
2673
|
Object.keys($2026711c6c2d6204$var$OPTANON_TO_COOKIEBOT).forEach((k)=>{
|
|
@@ -2857,7 +2863,7 @@ const $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2857
2863
|
const style_tag = await ($e4bebbfa0f0b1454$var$existing_style_tag ||= (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("head").then((head)=>{
|
|
2858
2864
|
const tag = document.createElement("style");
|
|
2859
2865
|
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onremoved(// reinsertion for next.js's "portable" <head>
|
|
2860
|
-
tag, (
|
|
2866
|
+
tag, (eoe)=>{
|
|
2861
2867
|
if (document.head.contains(tag)) // just make sure to not freak out if it's already been added again
|
|
2862
2868
|
return;
|
|
2863
2869
|
if ($e4bebbfa0f0b1454$var$reactions_in_last_s >= 10) {
|
|
@@ -2868,14 +2874,14 @@ const $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2868
2874
|
$e4bebbfa0f0b1454$var$reactions_in_last_s++;
|
|
2869
2875
|
setTimeout(()=>$e4bebbfa0f0b1454$var$reactions_in_last_s--, 1000);
|
|
2870
2876
|
document.head.append(tag); // we're sure that head exists now since we inserted it there previously
|
|
2871
|
-
})
|
|
2877
|
+
});
|
|
2872
2878
|
(0, $e6c6e7929ea385ae$export$de56f1198d121036)("inserting", tag, "into", head);
|
|
2873
2879
|
return head.appendChild(tag);
|
|
2874
2880
|
}));
|
|
2875
2881
|
style_tag.append(css);
|
|
2876
2882
|
});
|
|
2877
2883
|
const $e4bebbfa0f0b1454$export$a96c18473f2af463 = (tenant, selector, validator)=>{
|
|
2878
|
-
return (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, (
|
|
2884
|
+
return (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, ({ element: element })=>(0, $c8263a2185830bf1$export$2c34560c3749dc63)(element, tenant.get_product_id, (p_id, r_id, was_unmatching, event)=>{
|
|
2879
2885
|
if (typeof validator === "function" && !validator(event)) return;
|
|
2880
2886
|
if (!was_unmatching) (0, $cc7abb54d64ac1e3$export$bf205937e5e012cb)();
|
|
2881
2887
|
(0, $e0a87646d12cb987$export$9028351cb994757e)({
|
|
@@ -2887,7 +2893,7 @@ const $e4bebbfa0f0b1454$export$a96c18473f2af463 = (tenant, selector, validator)=
|
|
|
2887
2893
|
recommendation_id: r_id
|
|
2888
2894
|
}
|
|
2889
2895
|
});
|
|
2890
|
-
}, true))
|
|
2896
|
+
}, true));
|
|
2891
2897
|
};
|
|
2892
2898
|
const $e4bebbfa0f0b1454$export$a4f97b27a0592e6c = (url)=>(url ? new URL(url, window.location.origin) : window.location).pathname.split("/").filter((a)=>a).pop()?.replace(/\.html?$/i, "") || "";
|
|
2893
2899
|
const $e4bebbfa0f0b1454$export$692b606677218a16 = (callback)=>{
|
|
@@ -3349,6 +3355,7 @@ async function $558ccd2de887e6d9$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3349
3355
|
}
|
|
3350
3356
|
const { template: template , post_processors: post_processors = [] } = rendering_options;
|
|
3351
3357
|
const caught_post_processing_functions = post_processors.map((post_pro)=>(0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(post_pro));
|
|
3358
|
+
let a;
|
|
3352
3359
|
const caught_html2elems = (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((0, $bf7f12fe044e41b2$export$44951404cb8d0583));
|
|
3353
3360
|
let output_elements;
|
|
3354
3361
|
if (typeof template === "function") {
|
|
@@ -3359,7 +3366,7 @@ async function $558ccd2de887e6d9$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3359
3366
|
const info = new $558ccd2de887e6d9$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3360
3367
|
const template_result = await caught_template(display, info);
|
|
3361
3368
|
if (!keep) throw keep;
|
|
3362
|
-
const elements = typeof template_result == "string" ? caught_html2elems(template_result) : template_result;
|
|
3369
|
+
const elements = (typeof template_result == "string" ? caught_html2elems(template_result) : template_result) || [];
|
|
3363
3370
|
const post_processed_elements = await $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements, event_listeners);
|
|
3364
3371
|
return Array.from(post_processed_elements);
|
|
3365
3372
|
}))).filter((p)=>p.status === "fulfilled").map((p)=>p.value).flat();
|
|
@@ -3368,7 +3375,7 @@ async function $558ccd2de887e6d9$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3368
3375
|
// we don't know how this will be used and want it to be robust
|
|
3369
3376
|
} else output_elements = (await Promise.all(processed_displays.map(async (display, index)=>{
|
|
3370
3377
|
const html = $558ccd2de887e6d9$export$e0009e7da572f99b(template, display);
|
|
3371
|
-
const elements = caught_html2elems(html);
|
|
3378
|
+
const elements = caught_html2elems(html) || [];
|
|
3372
3379
|
const post_processed_elements = await $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements);
|
|
3373
3380
|
return Array.from(post_processed_elements);
|
|
3374
3381
|
}))).flat();
|
|
@@ -3412,8 +3419,8 @@ function $558ccd2de887e6d9$export$c42139a43c877ecd(obj) {
|
|
|
3412
3419
|
}
|
|
3413
3420
|
return obj;
|
|
3414
3421
|
}
|
|
3415
|
-
async function $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions,
|
|
3416
|
-
|
|
3422
|
+
async function $558ccd2de887e6d9$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions, elements, event_listeners = []) {
|
|
3423
|
+
let b;
|
|
3417
3424
|
let keep = true;
|
|
3418
3425
|
const info = new $558ccd2de887e6d9$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3419
3426
|
for(let i = 0; i < functions.length; i++){
|
|
@@ -3438,7 +3445,7 @@ async function $558ccd2de887e6d9$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3438
3445
|
for(let j = 0; j < caught_pre_processors.length; j++){
|
|
3439
3446
|
const pre_processor = caught_pre_processors[j];
|
|
3440
3447
|
const result = await pre_processor(display, info_for_pre_pro);
|
|
3441
|
-
if (result) display = result;
|
|
3448
|
+
if (result) display = result; // Don't understand why this cast is needed
|
|
3442
3449
|
if (!keep) break;
|
|
3443
3450
|
}
|
|
3444
3451
|
if (keep) processed_displays.push(display);
|
|
@@ -3447,7 +3454,6 @@ async function $558ccd2de887e6d9$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3447
3454
|
return processed_displays;
|
|
3448
3455
|
}
|
|
3449
3456
|
class $558ccd2de887e6d9$export$da854280fb61cd32 {
|
|
3450
|
-
// maybe not ideal? idk
|
|
3451
3457
|
constructor(t, rendering_options, displays, index, remove_display, event_listeners){
|
|
3452
3458
|
this.t = t;
|
|
3453
3459
|
this.rendering_options = rendering_options;
|
|
@@ -4247,7 +4253,10 @@ function $1da560af170fb839$export$e4741190ccada479(element, selector) {
|
|
|
4247
4253
|
|
|
4248
4254
|
|
|
4249
4255
|
const $90e0b983530610e7$export$eb0b9ed911409b57 = (callback, element)=>((0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(callback)(element), element);
|
|
4250
|
-
|
|
4256
|
+
function $90e0b983530610e7$export$f63fcc839cb0f734(event, handler, element) {
|
|
4257
|
+
element.addEventListener(event, (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(handler));
|
|
4258
|
+
return element;
|
|
4259
|
+
}
|
|
4251
4260
|
const $90e0b983530610e7$export$22a65337c1b43b1f = /* @PURE */ (classes)=>classes.filter((c)=>c !== undefined).join(" ");
|
|
4252
4261
|
|
|
4253
4262
|
|
|
@@ -4685,7 +4694,7 @@ class $a69a5236b5814082$export$68babfc5be0de5da extends (0, $1683d0164abd7c1d$ex
|
|
|
4685
4694
|
constructor(options, lazyfier_options){
|
|
4686
4695
|
super(options);
|
|
4687
4696
|
const lazy_promise = new Promise((r)=>{
|
|
4688
|
-
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(this.insert_here, (
|
|
4697
|
+
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(this.insert_here, ({ element: element , disconnector: disconnector })=>{
|
|
4689
4698
|
const i_o = new IntersectionObserver((0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)((records)=>{
|
|
4690
4699
|
for (const record of records)if (record.intersectionRatio > 0) {
|
|
4691
4700
|
r(true);
|
|
@@ -4695,7 +4704,7 @@ class $a69a5236b5814082$export$68babfc5be0de5da extends (0, $1683d0164abd7c1d$ex
|
|
|
4695
4704
|
}
|
|
4696
4705
|
}));
|
|
4697
4706
|
i_o.observe(element);
|
|
4698
|
-
})
|
|
4707
|
+
});
|
|
4699
4708
|
});
|
|
4700
4709
|
this.lazyfier = new (0, $1da560af170fb839$export$3be7054c61590ee3)({
|
|
4701
4710
|
container: this.insert_here,
|
|
@@ -4763,7 +4772,7 @@ function $04d2f7d9126af667$export$1bffac19f9f0d6fc(elements, _display, info) {
|
|
|
4763
4772
|
$04d2f7d9126af667$export$3777a14dd8c2363d.add(displays);
|
|
4764
4773
|
const { get_product_id: get_product_id } = info.t;
|
|
4765
4774
|
const { type: type } = rendering_options;
|
|
4766
|
-
(0, $cc7abb54d64ac1e3$export$7babcd5d4056b2ca)(displays, get_product_id, {
|
|
4775
|
+
(0, $cc7abb54d64ac1e3$export$7babcd5d4056b2ca)(displays, get_product_id /* yes this might create errors if there's no page_url in the display but don't have time to fix, sorry */ , {
|
|
4767
4776
|
list_name: "depict_" + type
|
|
4768
4777
|
});
|
|
4769
4778
|
}
|
|
@@ -5627,7 +5636,9 @@ async function $1cc2444a0f1b992e$export$c84671f46d6a1ca({ rows: rows , container
|
|
|
5627
5636
|
for await (const [currently_showing_rows, number_of_els] of (0, $ef237c2bba47492f$export$f8913c8a18f7ca21)([
|
|
5628
5637
|
// start for await loop when the container element gets inserted into the DOM
|
|
5629
5638
|
// the loop is broken by an observer.onremoved above calling .exit on the IPNS this depends on
|
|
5639
|
+
// @ts-ignore
|
|
5630
5640
|
ipns,
|
|
5641
|
+
// @ts-ignore too complicated to fix this IMO
|
|
5631
5642
|
el_count_ipns
|
|
5632
5643
|
])){
|
|
5633
5644
|
our_style_el.innerText = col_styling + cols_at_size.map((options)=>{
|
|
@@ -6569,7 +6580,7 @@ function $3d8df0a23b9bebac$var$scroll_idle(slider, chunk_size, clones_per_side)
|
|
|
6569
6580
|
];
|
|
6570
6581
|
const { intersecting_items_object: intersecting_items_object } = slider;
|
|
6571
6582
|
const index_of_first_intersecting = slider.first_intersecting_index();
|
|
6572
|
-
const index_of_last_intersecting = Math.max(...Object.keys(
|
|
6583
|
+
const index_of_last_intersecting = Math.max(...Object.keys(intersecting_items_object).map((v)=>+v));
|
|
6573
6584
|
const post_move = (direction)=>{
|
|
6574
6585
|
// slider.invalidate_cache();
|
|
6575
6586
|
// for (const key in intersecting_items_object) {
|
|
@@ -6798,12 +6809,12 @@ function $bf76a92ec2055e1a$export$be95cb0e8cfd099e() {
|
|
|
6798
6809
|
|
|
6799
6810
|
|
|
6800
6811
|
function $0c9d834f187cc4ff$export$3ebd86018b39d9d2(t, selector, filter) {
|
|
6801
|
-
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, (
|
|
6812
|
+
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(selector, (eoe)=>{
|
|
6802
6813
|
(0, $e6c6e7929ea385ae$export$de56f1198d121036)("Order confirmation element showed up!", eoe);
|
|
6803
6814
|
const { element: element } = eoe;
|
|
6804
6815
|
const the_id = element.innerText;
|
|
6805
6816
|
$0c9d834f187cc4ff$export$1ac466d53a6636ac(t, the_id, (0, $e0a87646d12cb987$export$6399bdb2291895e0)(), filter);
|
|
6806
|
-
})
|
|
6817
|
+
});
|
|
6807
6818
|
}
|
|
6808
6819
|
function $0c9d834f187cc4ff$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
6809
6820
|
// Use the given extractor to find a transaction ID from each entry pushed to dataLayer.
|
|
@@ -6811,7 +6822,7 @@ function $0c9d834f187cc4ff$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
|
6811
6822
|
const maybe_send_entries = (entries)=>entries.map(id_extractor).filter((id)=>id && typeof id === "string").forEach((id)=>{
|
|
6812
6823
|
$0c9d834f187cc4ff$export$1ac466d53a6636ac(tenant, id);
|
|
6813
6824
|
});
|
|
6814
|
-
const dataLayer =
|
|
6825
|
+
const dataLayer = globalThis.dataLayer ||= [];
|
|
6815
6826
|
// Process entries that are already queued at this point
|
|
6816
6827
|
maybe_send_entries(dataLayer);
|
|
6817
6828
|
// And then process any future entries, making sure to pass them on to other potential proxies to the push function
|
|
@@ -7086,7 +7097,7 @@ function $23d6393391c08860$export$ab0f802c05dd969b(on_request) {
|
|
|
7086
7097
|
const response_promise = target.apply(this_arg, argument_list);
|
|
7087
7098
|
try {
|
|
7088
7099
|
const input = argument_list[0];
|
|
7089
|
-
const url = input instanceof Request ? input.url : input;
|
|
7100
|
+
const url = input instanceof Request ? input.url : input instanceof URL ? input.href : input;
|
|
7090
7101
|
// TODO, doing it like this doesn't feel very robust.
|
|
7091
7102
|
// And what if the developer wants to override which url's corespond to which events?
|
|
7092
7103
|
const url_segement_to_type = [
|
|
@@ -7323,7 +7334,7 @@ const $c693a2d89c78efe6$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
7323
7334
|
});
|
|
7324
7335
|
};
|
|
7325
7336
|
if (typeof target == "string") {
|
|
7326
|
-
const disconnect_observer = (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(target, (
|
|
7337
|
+
const disconnect_observer = (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).onexists(target, ({ element: element , disconnector: disconnector })=>per_el_fn(element, disconnector));
|
|
7327
7338
|
(0, $69f7524c8bdd85b4$export$1cd22bab0d2c3b0b)(disconnect_observer);
|
|
7328
7339
|
} else {
|
|
7329
7340
|
let did_already_fail = false;
|
|
@@ -7493,6 +7504,7 @@ const $fac9c96b6bbe43cd$export$a4eccf92efefa04d = (image_width, image_height, co
|
|
|
7493
7504
|
async function $fac9c96b6bbe43cd$export$2dd69958012e3e49({ override_rec_renderer: override_rec_renderer = (0, $92bde32714bb1e07$export$50ce83ace0cdd87e) , image_width: image_width = 2000 , image_height: image_height = 2000 , num_items: num_items = 10 , color: color = "#d9d9d9" , on_no_rendering_result: on_no_rendering_result , post_rendering: post_rendering } = {}) {
|
|
7494
7505
|
const image_url = $fac9c96b6bbe43cd$export$a4eccf92efefa04d(image_width, image_height, color);
|
|
7495
7506
|
return async (t, rendering_options)=>{
|
|
7507
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7496
7508
|
const actual_rendering = override_rec_renderer(t, rendering_options).catch((0, $548fd58b14b25a52$export$8048b892d651b310)); // start rendering first
|
|
7497
7509
|
const placeholder_opts = {
|
|
7498
7510
|
...rendering_options,
|
|
@@ -7528,6 +7540,7 @@ async function $fac9c96b6bbe43cd$export$2dd69958012e3e49({ override_rec_renderer
|
|
|
7528
7540
|
}
|
|
7529
7541
|
]
|
|
7530
7542
|
};
|
|
7543
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7531
7544
|
const placeholder_rendering = await override_rec_renderer(t, placeholder_opts).catch((0, $548fd58b14b25a52$export$8048b892d651b310));
|
|
7532
7545
|
let set_should_stay_inserted;
|
|
7533
7546
|
const should_stay_inserted = new Promise((r)=>set_should_stay_inserted = r);
|
|
@@ -7945,9 +7958,9 @@ const $5185cc9bd668b8f9$var$get_voyado_id = ()=>{
|
|
|
7945
7958
|
const va = /\b_vaI=([^;]+)/.exec(document.cookie)?.[1];
|
|
7946
7959
|
return va || $5185cc9bd668b8f9$var$default_id;
|
|
7947
7960
|
};
|
|
7948
|
-
const $5185cc9bd668b8f9$export$a739d9a07da7f9ce = ()=>{
|
|
7949
|
-
|
|
7950
|
-
};
|
|
7961
|
+
const $5185cc9bd668b8f9$export$a739d9a07da7f9ce = (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(()=>{
|
|
7962
|
+
(0, $e0a87646d12cb987$export$336e7ad40bae0652)($5185cc9bd668b8f9$var$get_voyado_id);
|
|
7963
|
+
});
|
|
7951
7964
|
|
|
7952
7965
|
|
|
7953
7966
|
|
|
@@ -8931,9 +8944,6 @@ function $12c29616944c2fb7$export$f2ca6fc699ca1fb4(props = {}) {
|
|
|
8931
8944
|
|
|
8932
8945
|
|
|
8933
8946
|
|
|
8934
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.40";
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
8947
|
|
|
8938
8948
|
/**
|
|
8939
8949
|
* Shallowly converts all keys in an object from snake_case to camelCase.
|