@depict-ai/utilishared 2.0.2 → 2.0.3
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 +319 -302
- package/ES10/index.d.ts +15 -15
- package/ES10/index.js +319 -302
- package/latest/index.cjs +307 -298
- package/latest/index.d.ts +15 -15
- package/latest/index.js +307 -298
- package/package.json +1 -1
package/latest/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { onCleanup as $qgKv4$onCleanup, createEffect as $qgKv4$createEffect, createSignal as $qgKv4$createSignal } from "solid-js";
|
|
2
|
+
import { template as $qgKv4$template, insert as $qgKv4$insert, className as $qgKv4$className, setAttribute as $qgKv4$setAttribute, spread as $qgKv4$spread, mergeProps as $qgKv4$mergeProps, addEventListener as $qgKv4$addEventListener, delegateEvents as $qgKv4$delegateEvents, effect as $qgKv4$effect, style as $qgKv4$style, createComponent as $qgKv4$createComponent } from "solid-js/web";
|
|
2
3
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
3
4
|
register_es_version("utilishared", "latest");
|
|
4
5
|
function $parcel$export(e, n, v, s) {
|
|
@@ -12,7 +13,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
13
|
function $parcel$interopDefault(a) {
|
|
13
14
|
return a && a.__esModule ? a.default : a;
|
|
14
15
|
}
|
|
15
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "2.0.
|
|
16
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "2.0.3";
|
|
16
17
|
const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
17
18
|
const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
|
|
18
19
|
let $649f456f663da9fc$var$browser_prefix = "[Depict]";
|
|
@@ -3735,76 +3736,17 @@ function $b83068cbd26dcc41$export$e4741190ccada479(element, selector) {
|
|
|
3735
3736
|
}
|
|
3736
3737
|
return result;
|
|
3737
3738
|
}
|
|
3738
|
-
const $
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
}
|
|
3743
|
-
const $b9b0dba897847b2a$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
3744
|
-
const $63cbb5de51d11596$var$appendChild = (parent, child) => {
|
|
3745
|
-
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
3746
|
-
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
3747
|
-
if (child.length !== undefined)
|
|
3748
|
-
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
3749
|
-
for (let i = 0; i < child.length; i++) $63cbb5de51d11596$var$appendChild(parent, child[i]);else
|
|
3750
|
-
// fallback for things only implementing iterator interface
|
|
3751
|
-
for (const more_kids of child) $63cbb5de51d11596$var$appendChild(parent, more_kids);
|
|
3752
|
-
return;
|
|
3753
|
-
}
|
|
3754
|
-
parent.append(child);
|
|
3755
|
-
};
|
|
3756
|
-
const $63cbb5de51d11596$export$34b9dba7ce09269b = (tag, {
|
|
3757
|
-
children: children,
|
|
3758
|
-
...props
|
|
3759
|
-
}, _unknown) => {
|
|
3760
|
-
if (typeof tag === "function") return tag({
|
|
3761
|
-
children: children,
|
|
3762
|
-
...props
|
|
3763
|
-
}, _unknown);
|
|
3764
|
-
// For partial SVG support
|
|
3765
|
-
// Exhaustive list (I think) for these checks should be ["svg","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","switch","symbol","text","textPath","tspan","use","view"]
|
|
3766
|
-
const is_svg = props?.xmlns || tag == "defs" || tag == "filter" || tag == "fecolormatrix" || tag == "g" || tag == "circle" || tag == "circle" || tag == "svg" || tag == "path" || tag == "polygon";
|
|
3767
|
-
if (is_svg) var namespace = props?.xmlns || "http://www.w3.org/2000/svg";
|
|
3768
|
-
if (typeof document === "undefined") return {};
|
|
3769
|
-
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
3770
|
-
for (const key in props) {
|
|
3771
|
-
const value = props[key];
|
|
3772
|
-
if (key === "onClick") element.addEventListener("click", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
3773
|
-
// https://stackoverflow.com/a/23142447
|
|
3774
|
-
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
3775
|
-
element.setAttributeNS("http://www.w3.org/1999/xlink", key, value);else if (key == "xmlns" || key.startsWith("xmlns:")) element.setAttributeNS("http://www.w3.org/2000/xmlns/", key, value);else if (key.startsWith("xml:")) element.setAttributeNS("http://www.w3.org/XML/1998/namespace", key, value);else element.setAttribute(key, props[key]);
|
|
3776
|
-
}
|
|
3777
|
-
$63cbb5de51d11596$var$appendChild(element, children);
|
|
3778
|
-
return element;
|
|
3779
|
-
};
|
|
3780
|
-
const $63cbb5de51d11596$export$25062201e9e25d76 = $63cbb5de51d11596$export$34b9dba7ce09269b;
|
|
3781
|
-
const $63cbb5de51d11596$export$ffb0004e005737fa = ({
|
|
3782
|
-
children: children
|
|
3783
|
-
}, _unknown) => {
|
|
3784
|
-
if (typeof document === "undefined") return {};
|
|
3785
|
-
const df = document.createDocumentFragment();
|
|
3786
|
-
$63cbb5de51d11596$var$appendChild(df, children);
|
|
3787
|
-
return df;
|
|
3788
|
-
};
|
|
3739
|
+
const $ef9394fafebd5eab$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div class="depict-slider depict">`),
|
|
3740
|
+
$ef9394fafebd5eab$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div class=sliding>`),
|
|
3741
|
+
$ef9394fafebd5eab$var$_tmpl$3 = /*#__PURE__*/$qgKv4$template(`<button aria-label="Scroll left"class="left d-navbutton"type=button>`),
|
|
3742
|
+
$ef9394fafebd5eab$var$_tmpl$4 = /*#__PURE__*/$qgKv4$template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
|
|
3789
3743
|
class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
3790
3744
|
// this is just here because it's often needed together with the slider
|
|
3791
|
-
container = $
|
|
3792
|
-
class: "depict-slider depict"
|
|
3793
|
-
});
|
|
3745
|
+
container = $ef9394fafebd5eab$var$_tmpl$();
|
|
3794
3746
|
#elements = {
|
|
3795
|
-
sliding_el_: $
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
left_: $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
3799
|
-
"aria-label": "Scroll left",
|
|
3800
|
-
class: "left d-navbutton",
|
|
3801
|
-
type: "button"
|
|
3802
|
-
}),
|
|
3803
|
-
right_: $63cbb5de51d11596$export$34b9dba7ce09269b("button", {
|
|
3804
|
-
"aria-label": "Scroll right",
|
|
3805
|
-
class: "right d-navbutton",
|
|
3806
|
-
type: "button"
|
|
3807
|
-
})
|
|
3747
|
+
sliding_el_: $ef9394fafebd5eab$var$_tmpl$2(),
|
|
3748
|
+
left_: $ef9394fafebd5eab$var$_tmpl$3(),
|
|
3749
|
+
right_: $ef9394fafebd5eab$var$_tmpl$4()
|
|
3808
3750
|
};
|
|
3809
3751
|
insert_here = this.#elements.sliding_el_;
|
|
3810
3752
|
intersecting_items_object = {};
|
|
@@ -4489,6 +4431,7 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4489
4431
|
}
|
|
4490
4432
|
trackGAEvent(action, index, product_id, ga_product_ids) {
|
|
4491
4433
|
if (this.settings.sendGa === false) return;
|
|
4434
|
+
// @ts-ignore
|
|
4492
4435
|
if (typeof ga !== "function") {
|
|
4493
4436
|
console.log("Could not send", action, "to GA. analytics.js not loaded.");
|
|
4494
4437
|
return;
|
|
@@ -4501,7 +4444,9 @@ class $366fff12da348e66$export$1a8782481a9af507 {
|
|
|
4501
4444
|
list_name: "depict_" + this.settings.type
|
|
4502
4445
|
});
|
|
4503
4446
|
}
|
|
4504
|
-
if (this.tracker === undefined)
|
|
4447
|
+
if (this.tracker === undefined)
|
|
4448
|
+
// @ts-ignore
|
|
4449
|
+
this.tracker = ga("create", this.settings.gaid, "auto", "depict");
|
|
4505
4450
|
$c749fe63b72056ef$export$f75172d2e289cd02(action);
|
|
4506
4451
|
}
|
|
4507
4452
|
trackPageView() {
|
|
@@ -4769,6 +4714,7 @@ async function $e61f371a9bcdeb2f$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
4769
4714
|
elements: container ? container : [slider.container]
|
|
4770
4715
|
};
|
|
4771
4716
|
}
|
|
4717
|
+
const $d352a8202024de5c$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<button class=load_more>`);
|
|
4772
4718
|
async function $d352a8202024de5c$export$30933c637c977eef({
|
|
4773
4719
|
t: t,
|
|
4774
4720
|
recs: recs,
|
|
@@ -4908,10 +4854,11 @@ function $d352a8202024de5c$var$setup_load_more(t, root, chunk_size, view_more_te
|
|
|
4908
4854
|
catchify: catchify
|
|
4909
4855
|
} = t,
|
|
4910
4856
|
load_more_cont = $0bdb8dbcf1bc7f34$export$d3e2a0560cbf4787(`<div class="load-more-container"></div>`),
|
|
4911
|
-
load_button = load_more_cont.appendChild(
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4857
|
+
load_button = load_more_cont.appendChild((() => {
|
|
4858
|
+
const _el$ = $d352a8202024de5c$var$_tmpl$();
|
|
4859
|
+
$qgKv4$insert(_el$, view_more_text);
|
|
4860
|
+
return _el$;
|
|
4861
|
+
})());
|
|
4915
4862
|
load_button.addEventListener("click", catchify(load_more_recs_and_hide_button_if_needed));
|
|
4916
4863
|
root.after(load_more_cont);
|
|
4917
4864
|
load_more_recs_and_hide_button_if_needed();
|
|
@@ -5006,24 +4953,61 @@ async function $acf11540344875ed$var$send_sentry_422(response, body, stack) {
|
|
|
5006
4953
|
this.captureException(new Error(msg));
|
|
5007
4954
|
});
|
|
5008
4955
|
}
|
|
5009
|
-
const $
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
}
|
|
4956
|
+
const $b9b0dba897847b2a$export$eb0b9ed911409b57 = (callback, element) => ($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(callback)(element), element);
|
|
4957
|
+
function $b9b0dba897847b2a$export$f63fcc839cb0f734(event, handler, element) {
|
|
4958
|
+
element.addEventListener(event, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(handler));
|
|
4959
|
+
return element;
|
|
4960
|
+
}
|
|
4961
|
+
const $b9b0dba897847b2a$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
4962
|
+
const $63cbb5de51d11596$var$appendChild = (parent, child) => {
|
|
4963
|
+
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
4964
|
+
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
4965
|
+
if (child.length !== undefined)
|
|
4966
|
+
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
4967
|
+
for (let i = 0; i < child.length; i++) $63cbb5de51d11596$var$appendChild(parent, child[i]);else
|
|
4968
|
+
// fallback for things only implementing iterator interface
|
|
4969
|
+
for (const more_kids of child) $63cbb5de51d11596$var$appendChild(parent, more_kids);
|
|
4970
|
+
return;
|
|
4971
|
+
}
|
|
4972
|
+
parent.append(child);
|
|
4973
|
+
};
|
|
4974
|
+
const $63cbb5de51d11596$export$34b9dba7ce09269b = (tag, {
|
|
4975
|
+
children: children,
|
|
4976
|
+
...props
|
|
4977
|
+
}, _unknown) => {
|
|
4978
|
+
if (typeof tag === "function") return tag({
|
|
4979
|
+
children: children,
|
|
4980
|
+
...props
|
|
4981
|
+
}, _unknown);
|
|
4982
|
+
// For partial SVG support
|
|
4983
|
+
// Exhaustive list (I think) for these checks should be ["svg","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","switch","symbol","text","textPath","tspan","use","view"]
|
|
4984
|
+
const is_svg = props?.xmlns || tag == "defs" || tag == "filter" || tag == "fecolormatrix" || tag == "g" || tag == "circle" || tag == "circle" || tag == "svg" || tag == "path" || tag == "polygon";
|
|
4985
|
+
if (is_svg) var namespace = props?.xmlns || "http://www.w3.org/2000/svg";
|
|
4986
|
+
if (typeof document === "undefined") return {};
|
|
4987
|
+
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
4988
|
+
for (const key in props) {
|
|
4989
|
+
const value = props[key];
|
|
4990
|
+
if (key === "onClick") element.addEventListener("click", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
4991
|
+
// https://stackoverflow.com/a/23142447
|
|
4992
|
+
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
4993
|
+
element.setAttributeNS("http://www.w3.org/1999/xlink", key, value);else if (key == "xmlns" || key.startsWith("xmlns:")) element.setAttributeNS("http://www.w3.org/2000/xmlns/", key, value);else if (key.startsWith("xml:")) element.setAttributeNS("http://www.w3.org/XML/1998/namespace", key, value);else element.setAttribute(key, props[key]);
|
|
4994
|
+
}
|
|
4995
|
+
$63cbb5de51d11596$var$appendChild(element, children);
|
|
4996
|
+
return element;
|
|
4997
|
+
};
|
|
4998
|
+
const $63cbb5de51d11596$export$25062201e9e25d76 = $63cbb5de51d11596$export$34b9dba7ce09269b;
|
|
4999
|
+
const $63cbb5de51d11596$export$ffb0004e005737fa = ({
|
|
5000
|
+
children: children
|
|
5001
|
+
}, _unknown) => {
|
|
5002
|
+
if (typeof document === "undefined") return {};
|
|
5003
|
+
const df = document.createDocumentFragment();
|
|
5004
|
+
$63cbb5de51d11596$var$appendChild(df, children);
|
|
5005
|
+
return df;
|
|
5006
|
+
};
|
|
5007
|
+
const $ca66c9553e84df02$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
|
|
5008
|
+
$ca66c9553e84df02$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
|
|
5009
|
+
const $ca66c9553e84df02$export$dc84183312f0c201 = /*@__PURE__*/(() => $ca66c9553e84df02$var$_tmpl$())();
|
|
5010
|
+
const $ca66c9553e84df02$export$6038895ac52bd044 = /*@__PURE__*/(() => $ca66c9553e84df02$var$_tmpl$2())();
|
|
5027
5011
|
const $9a744f57ab06c32e$export$68c017fd93791405 = ({
|
|
5028
5012
|
duration = 500
|
|
5029
5013
|
} = {
|
|
@@ -5059,6 +5043,8 @@ function $693e2a1517bef984$export$f8913c8a18f7ca21(iterables) {
|
|
|
5059
5043
|
}))).then($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(ourselves.exit));
|
|
5060
5044
|
return ourselves;
|
|
5061
5045
|
}
|
|
5046
|
+
const $30e801eaa3dc319e$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<style type=text/css>`),
|
|
5047
|
+
$30e801eaa3dc319e$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div>`);
|
|
5062
5048
|
const $30e801eaa3dc319e$export$717f13d9ba00ca19 = (min, max) => `@media ${min ? `(min-width:${min})` : ``}${min && max ? ` and ` : ``}${max ? `(max-width:${max})` : ``}`;
|
|
5063
5049
|
async function $30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
5064
5050
|
rows: rows,
|
|
@@ -5079,9 +5065,7 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
|
5079
5065
|
ipns: ipns
|
|
5080
5066
|
} = rows_or_empty_object;
|
|
5081
5067
|
const is_static = !ipns && !button;
|
|
5082
|
-
const our_style_el = $
|
|
5083
|
-
type: "text/css"
|
|
5084
|
-
});
|
|
5068
|
+
const our_style_el = $30e801eaa3dc319e$var$_tmpl$();
|
|
5085
5069
|
const container_class = $460df8550f9d084d$export$a6db784f019668ba();
|
|
5086
5070
|
const selector_beginning = `.depict .${container_class}>`;
|
|
5087
5071
|
const el_count_ipns = $607fc90221d440a6$export$e806c6c1615a59ae();
|
|
@@ -5118,10 +5102,12 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({
|
|
|
5118
5102
|
});
|
|
5119
5103
|
if (button) {
|
|
5120
5104
|
button_class = $460df8550f9d084d$export$a6db784f019668ba();
|
|
5121
|
-
const button_container =
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5105
|
+
const button_container = (() => {
|
|
5106
|
+
const _el$2 = $30e801eaa3dc319e$var$_tmpl$2();
|
|
5107
|
+
$qgKv4$className(_el$2, "load-more-container " + button_class);
|
|
5108
|
+
$qgKv4$insert(_el$2, () => $b9b0dba897847b2a$export$f63fcc839cb0f734("click", () => ipns(ipns.state + (rows_or_empty_object.rows_per_click ?? 1)), button));
|
|
5109
|
+
return _el$2;
|
|
5110
|
+
})();
|
|
5125
5111
|
container_element.after(button_container);
|
|
5126
5112
|
}
|
|
5127
5113
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).oncreation(container_element, async () => {
|
|
@@ -5417,15 +5403,15 @@ function $d31b48b85102c1ec$export$80039a49055269fb() {
|
|
|
5417
5403
|
};
|
|
5418
5404
|
return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
|
|
5419
5405
|
}
|
|
5406
|
+
const $a75adf1478c4522f$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
|
|
5420
5407
|
function $a75adf1478c4522f$export$af88b4929c2dc86() {
|
|
5421
|
-
const img = $
|
|
5422
|
-
src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+"
|
|
5423
|
-
});
|
|
5408
|
+
const img = $a75adf1478c4522f$var$_tmpl$();
|
|
5424
5409
|
return {
|
|
5425
5410
|
left: [img],
|
|
5426
5411
|
right: [img.cloneNode()]
|
|
5427
5412
|
};
|
|
5428
5413
|
}
|
|
5414
|
+
const $2436f68ea927d4a8$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
|
|
5429
5415
|
function $2436f68ea927d4a8$export$1d17a045bcc711b1({
|
|
5430
5416
|
t: t,
|
|
5431
5417
|
navcont_insertion_fn: navcont_insertion_fn,
|
|
@@ -5513,15 +5499,12 @@ function $2436f68ea927d4a8$export$1d17a045bcc711b1({
|
|
|
5513
5499
|
};
|
|
5514
5500
|
}
|
|
5515
5501
|
function $2436f68ea927d4a8$export$a09282b33e69b43f(unique_name) {
|
|
5516
|
-
return
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
class: "checkmark"
|
|
5523
|
-
})]
|
|
5524
|
-
});
|
|
5502
|
+
return (() => {
|
|
5503
|
+
const _el$ = $2436f68ea927d4a8$var$_tmpl$(),
|
|
5504
|
+
_el$2 = _el$.firstChild;
|
|
5505
|
+
$qgKv4$setAttribute(_el$2, "name", `radio-${unique_name}`);
|
|
5506
|
+
return _el$;
|
|
5507
|
+
})();
|
|
5525
5508
|
}
|
|
5526
5509
|
|
|
5527
5510
|
// // You need to do this on all elements you insert into the slider before you insert them:
|
|
@@ -5690,14 +5673,12 @@ function $52292921bc0fc31f$export$5723caf9a8335aa6(_t, fraction = 1, max_steps,
|
|
|
5690
5673
|
mutation_plugin: mutation_plugin
|
|
5691
5674
|
};
|
|
5692
5675
|
}
|
|
5676
|
+
const $f78bc6a06402a6cf$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div class=depict_slider_scroll_bar>`),
|
|
5677
|
+
$f78bc6a06402a6cf$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div class=depict_slider_scroll_container>`);
|
|
5693
5678
|
function $f78bc6a06402a6cf$export$93223e488e7ee078(options) {
|
|
5694
5679
|
function constructor_plugin(_slider_options) {
|
|
5695
|
-
const scroll_bar = $
|
|
5696
|
-
|
|
5697
|
-
});
|
|
5698
|
-
const scroll_container = $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5699
|
-
class: "depict_slider_scroll_container"
|
|
5700
|
-
});
|
|
5680
|
+
const scroll_bar = $f78bc6a06402a6cf$var$_tmpl$();
|
|
5681
|
+
const scroll_container = $f78bc6a06402a6cf$var$_tmpl$2();
|
|
5701
5682
|
if (options.scroll_bar_classes?.length) scroll_bar.classList.add(...options.scroll_bar_classes);
|
|
5702
5683
|
if (options.scroll_container_classes?.length) scroll_container.classList.add(...options.scroll_container_classes);
|
|
5703
5684
|
// Default styles always present
|
|
@@ -5724,6 +5705,7 @@ function $f78bc6a06402a6cf$export$93223e488e7ee078(options) {
|
|
|
5724
5705
|
mutation_plugin: mutation_plugin
|
|
5725
5706
|
};
|
|
5726
5707
|
}
|
|
5708
|
+
const $06fe260f91efff62$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
|
|
5727
5709
|
function $06fe260f91efff62$export$b36d2489a5a16728(_t, {
|
|
5728
5710
|
snapEvery: snapEvery,
|
|
5729
5711
|
align: align
|
|
@@ -5753,13 +5735,7 @@ function $06fe260f91efff62$export$b36d2489a5a16728(_t, {
|
|
|
5753
5735
|
}
|
|
5754
5736
|
async function $06fe260f91efff62$export$49b950309ab787ad() {
|
|
5755
5737
|
if ("scrollBehavior" in document.documentElement.style) return true;
|
|
5756
|
-
const test_div = $
|
|
5757
|
-
style: "position: absolute; width: 1em; overflow: scroll; scroll-snap-type: x mandatory;",
|
|
5758
|
-
children: $63cbb5de51d11596$export$34b9dba7ce09269b("div", {
|
|
5759
|
-
style: "scroll-snap-align: start; color: transparent;",
|
|
5760
|
-
children: "test"
|
|
5761
|
-
})
|
|
5762
|
-
});
|
|
5738
|
+
const test_div = $06fe260f91efff62$var$_tmpl$();
|
|
5763
5739
|
const body = await (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
5764
5740
|
body.append(test_div);
|
|
5765
5741
|
test_div.scrollLeft = 1;
|
|
@@ -6306,9 +6282,11 @@ function $847e4a06ea6767c0$export$1ac466d53a6636ac(t, input_id, session_id = $43
|
|
|
6306
6282
|
function $3abef00489070e23$export$1ff14fec60ed5697(t, filter) {
|
|
6307
6283
|
try {
|
|
6308
6284
|
$42bbbba8196bd057$export$674d8cd8b6868154();
|
|
6285
|
+
// @ts-ignore
|
|
6309
6286
|
ga($b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async function (tracker) {
|
|
6310
6287
|
let get_all_function = window?.ga?.getAll; // https://sentry.io/organizations/depictai-0o/issues/3621911835/?project=5476183&referrer=slack
|
|
6311
6288
|
if (typeof get_all_function !== "function") get_all_function = await $d0e7629fb3179e02$export$2fc1a072736ae2f6(window, "ga", "getAll");
|
|
6289
|
+
// @ts-ignore
|
|
6312
6290
|
const all_trackers = get_all_function.call(ga);
|
|
6313
6291
|
$649f456f663da9fc$export$de56f1198d121036("we have trackers", all_trackers);
|
|
6314
6292
|
// @ts-ignore
|
|
@@ -6333,7 +6311,9 @@ function $3abef00489070e23$export$1ff14fec60ed5697(t, filter) {
|
|
|
6333
6311
|
$b04e44fad5ea42c7$export$f18d5b0af29128b7(error, "error");
|
|
6334
6312
|
}
|
|
6335
6313
|
}
|
|
6336
|
-
function $3abef00489070e23$var$make_tracker_send_to_depict(
|
|
6314
|
+
function $3abef00489070e23$var$make_tracker_send_to_depict(
|
|
6315
|
+
// @ts-ignore
|
|
6316
|
+
ga_tracker, t, filter) {
|
|
6337
6317
|
// Docs for analytics.js Tasks:
|
|
6338
6318
|
// https://developers.google.com/analytics/devguides/collection/analyticsjs/tasks
|
|
6339
6319
|
const sendHitTask = "sendHitTask";
|
|
@@ -7255,18 +7235,25 @@ const $690d8897acf7a743$var$get_voyado_id = () => {
|
|
|
7255
7235
|
const $690d8897acf7a743$export$a739d9a07da7f9ce = /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => {
|
|
7256
7236
|
$43683b1103edab15$export$93ae15b1ae509334($690d8897acf7a743$var$get_voyado_id);
|
|
7257
7237
|
});
|
|
7238
|
+
const $769ce417b39aa7d3$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<button>`);
|
|
7258
7239
|
function $769ce417b39aa7d3$export$4a3043e508dd72f0({
|
|
7259
7240
|
children: children,
|
|
7260
7241
|
...attributes
|
|
7261
7242
|
}) {
|
|
7262
|
-
const button =
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7243
|
+
const button = (() => {
|
|
7244
|
+
const _el$ = $769ce417b39aa7d3$var$_tmpl$();
|
|
7245
|
+
$qgKv4$spread(_el$, $qgKv4$mergeProps(attributes, {
|
|
7246
|
+
"type": "button"
|
|
7247
|
+
}), false, true);
|
|
7248
|
+
$qgKv4$insert(_el$, children);
|
|
7249
|
+
return _el$;
|
|
7250
|
+
})();
|
|
7267
7251
|
button.classList.add("show-more");
|
|
7268
7252
|
return button;
|
|
7269
7253
|
}
|
|
7254
|
+
const $cf7ca80454d7b4c0$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div class=slidein-backdrop>`),
|
|
7255
|
+
$cf7ca80454d7b4c0$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
|
|
7256
|
+
$cf7ca80454d7b4c0$var$_tmpl$3 = /*#__PURE__*/$qgKv4$template(`<div class=depict>`);
|
|
7270
7257
|
async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
7271
7258
|
title_: title_,
|
|
7272
7259
|
children: children,
|
|
@@ -7276,33 +7263,31 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
|
7276
7263
|
let close_;
|
|
7277
7264
|
const open_promise = new Promise(r => close_ = r);
|
|
7278
7265
|
const body = await (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
7279
|
-
const backdrop =
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7266
|
+
const backdrop = (() => {
|
|
7267
|
+
const _el$ = $cf7ca80454d7b4c0$var$_tmpl$();
|
|
7268
|
+
$qgKv4$addEventListener(_el$, "click", close_, true);
|
|
7269
|
+
return _el$;
|
|
7270
|
+
})();
|
|
7283
7271
|
const [exit_title_iterator, exitable_title_iterator] = $b8270fcf290bb3af$export$927664b47117acb0(title_);
|
|
7284
7272
|
const closing_handlers = [exit_title_iterator];
|
|
7285
|
-
const slidein =
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
class: "depict",
|
|
7304
|
-
children: [backdrop, slidein]
|
|
7305
|
-
});
|
|
7273
|
+
const slidein = (() => {
|
|
7274
|
+
const _el$2 = $cf7ca80454d7b4c0$var$_tmpl$2(),
|
|
7275
|
+
_el$3 = _el$2.firstChild,
|
|
7276
|
+
_el$4 = _el$3.firstChild,
|
|
7277
|
+
_el$5 = _el$4.nextSibling,
|
|
7278
|
+
_el$6 = _el$3.nextSibling;
|
|
7279
|
+
$qgKv4$insert(_el$4, () => $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a(exitable_title_iterator, false));
|
|
7280
|
+
$qgKv4$addEventListener(_el$5, "click", close_, true);
|
|
7281
|
+
$qgKv4$insert(_el$5, CloseIcon);
|
|
7282
|
+
$qgKv4$insert(_el$6, children);
|
|
7283
|
+
return _el$2;
|
|
7284
|
+
})();
|
|
7285
|
+
const elements_in_container = (() => {
|
|
7286
|
+
const _el$7 = $cf7ca80454d7b4c0$var$_tmpl$3();
|
|
7287
|
+
$qgKv4$insert(_el$7, backdrop, null);
|
|
7288
|
+
$qgKv4$insert(_el$7, slidein, null);
|
|
7289
|
+
return _el$7;
|
|
7290
|
+
})();
|
|
7306
7291
|
body.append(elements_in_container);
|
|
7307
7292
|
backdrop.animate({
|
|
7308
7293
|
opacity: [0, 1]
|
|
@@ -7350,6 +7335,10 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
|
7350
7335
|
on_close_: fn => closing_handlers.push(fn)
|
|
7351
7336
|
};
|
|
7352
7337
|
}
|
|
7338
|
+
$qgKv4$delegateEvents(["click"]);
|
|
7339
|
+
const $72d170fd5c7cb3fe$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div class=option-list>`),
|
|
7340
|
+
$72d170fd5c7cb3fe$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<button type=button><span class=size>`),
|
|
7341
|
+
$72d170fd5c7cb3fe$var$_tmpl$3 = /*#__PURE__*/$qgKv4$template(`<span class=sold-out>`);
|
|
7353
7342
|
async function $72d170fd5c7cb3fe$export$c068ad5361be7646({
|
|
7354
7343
|
title_: title_,
|
|
7355
7344
|
items_: items_,
|
|
@@ -7365,39 +7354,43 @@ async function $72d170fd5c7cb3fe$export$c068ad5361be7646({
|
|
|
7365
7354
|
} = await $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({
|
|
7366
7355
|
CloseIcon: CloseIcon,
|
|
7367
7356
|
title_: title_,
|
|
7368
|
-
children: [
|
|
7369
|
-
|
|
7370
|
-
|
|
7357
|
+
children: [(() => {
|
|
7358
|
+
const _el$ = $72d170fd5c7cb3fe$var$_tmpl$();
|
|
7359
|
+
$qgKv4$insert(_el$, () => items_.map(({
|
|
7371
7360
|
size_name_: size_name_,
|
|
7372
7361
|
is_available_: is_available_,
|
|
7373
7362
|
id_: id_
|
|
7374
7363
|
}) => {
|
|
7375
|
-
const button =
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7364
|
+
const button = (() => {
|
|
7365
|
+
const _el$2 = $72d170fd5c7cb3fe$var$_tmpl$2(),
|
|
7366
|
+
_el$3 = _el$2.firstChild;
|
|
7367
|
+
_el$2.$$click = () => {
|
|
7379
7368
|
size_selected(id_);
|
|
7380
7369
|
close_();
|
|
7381
|
-
}
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
})
|
|
7389
|
-
|
|
7370
|
+
};
|
|
7371
|
+
$qgKv4$className(_el$2, "option" + (is_available_ ? " available" : ""));
|
|
7372
|
+
$qgKv4$insert(_el$3, size_name_);
|
|
7373
|
+
$qgKv4$insert(_el$2, !is_available_ && (() => {
|
|
7374
|
+
const _el$4 = $72d170fd5c7cb3fe$var$_tmpl$3();
|
|
7375
|
+
$qgKv4$insert(_el$4, () => $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a(exitable_oos_iterator));
|
|
7376
|
+
return _el$4;
|
|
7377
|
+
})(), null);
|
|
7378
|
+
return _el$2;
|
|
7379
|
+
})();
|
|
7390
7380
|
if (!is_available_) button.disabled = true;
|
|
7391
7381
|
return button;
|
|
7392
|
-
})
|
|
7393
|
-
|
|
7382
|
+
}));
|
|
7383
|
+
return _el$;
|
|
7384
|
+
})()]
|
|
7394
7385
|
});
|
|
7395
7386
|
on_close_(size_selected);
|
|
7396
7387
|
on_close_(exit_oos_iterator);
|
|
7397
7388
|
}));
|
|
7398
7389
|
}
|
|
7390
|
+
$qgKv4$delegateEvents(["click"]);
|
|
7399
7391
|
var $895e8df2e6c8982e$exports = {};
|
|
7400
7392
|
$895e8df2e6c8982e$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";
|
|
7393
|
+
const $ad592d9ddbcffe72$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div>`);
|
|
7401
7394
|
let $ad592d9ddbcffe72$var$inserted = false;
|
|
7402
7395
|
const $ad592d9ddbcffe72$export$84712d0562a614b8 = ({
|
|
7403
7396
|
width: width,
|
|
@@ -7411,50 +7404,40 @@ const $ad592d9ddbcffe72$export$84712d0562a614b8 = ({
|
|
|
7411
7404
|
$0a581f1dfa083522$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($895e8df2e6c8982e$exports)));
|
|
7412
7405
|
$ad592d9ddbcffe72$var$inserted = true;
|
|
7413
7406
|
}
|
|
7414
|
-
return (
|
|
7415
|
-
|
|
7416
|
-
$
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
);
|
|
7407
|
+
return (() => {
|
|
7408
|
+
const _el$ = $ad592d9ddbcffe72$var$_tmpl$();
|
|
7409
|
+
$qgKv4$className(_el$, `depict-placeholder${extra_classes ? " " + extra_classes : ""}`);
|
|
7410
|
+
$qgKv4$spread(_el$, attributes, false, false);
|
|
7411
|
+
$qgKv4$effect(_$p => $qgKv4$style(_el$, style ? style : `width:${width};height:${height};`, _$p));
|
|
7412
|
+
return _el$;
|
|
7413
|
+
})();
|
|
7422
7414
|
};
|
|
7423
7415
|
const $ad592d9ddbcffe72$export$d613f5b6d0a331a8 = ({
|
|
7424
7416
|
aspect_ratio: aspect_ratio,
|
|
7425
7417
|
...attributes
|
|
7426
7418
|
}) => {
|
|
7427
|
-
return $
|
|
7428
|
-
style: `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}
|
|
7429
|
-
|
|
7430
|
-
});
|
|
7419
|
+
return $qgKv4$createComponent($ad592d9ddbcffe72$export$84712d0562a614b8, $qgKv4$mergeProps({
|
|
7420
|
+
style: `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`
|
|
7421
|
+
}, attributes));
|
|
7431
7422
|
};
|
|
7432
|
-
const $fbe64cf2cf408e4f$
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
viewBox: "0 0 320 512",
|
|
7451
|
-
children: [$63cbb5de51d11596$export$34b9dba7ce09269b("desc", {
|
|
7452
|
-
children: "Left arrow"
|
|
7453
|
-
}), $63cbb5de51d11596$export$34b9dba7ce09269b("path", {
|
|
7454
|
-
d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"
|
|
7455
|
-
})]
|
|
7456
|
-
});
|
|
7457
|
-
|
|
7423
|
+
const $fbe64cf2cf408e4f$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div class="depict recommendation_container"><div class=grid>`),
|
|
7424
|
+
$fbe64cf2cf408e4f$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<h4 class=recs_header>`);
|
|
7425
|
+
const $fbe64cf2cf408e4f$export$97f31f44c68c1d5 = (title, surface_classes = []) => $b9b0dba897847b2a$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
|
|
7426
|
+
const _el$ = $fbe64cf2cf408e4f$var$_tmpl$(),
|
|
7427
|
+
_el$2 = _el$.firstChild;
|
|
7428
|
+
$qgKv4$insert(_el$, title && typeof title === "string" ? (() => {
|
|
7429
|
+
const _el$3 = $fbe64cf2cf408e4f$var$_tmpl$2();
|
|
7430
|
+
$qgKv4$insert(_el$3, title);
|
|
7431
|
+
return _el$3;
|
|
7432
|
+
})() : title, _el$2);
|
|
7433
|
+
return _el$;
|
|
7434
|
+
})());
|
|
7435
|
+
const $7693290d077384da$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
|
|
7436
|
+
$7693290d077384da$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
|
|
7437
|
+
const $7693290d077384da$export$32a55d57d151bc5a = () => $7693290d077384da$var$_tmpl$();
|
|
7438
|
+
const $7693290d077384da$export$ddd70fdae1b350e6 = () => $7693290d077384da$var$_tmpl$2();
|
|
7439
|
+
const $6f1582c15e13f2f0$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
|
|
7440
|
+
$6f1582c15e13f2f0$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div class=color-picker role=form aria-label="Color picker">`);
|
|
7458
7441
|
/**
|
|
7459
7442
|
* Internal color circle used in ColorPicker
|
|
7460
7443
|
* @see {createColorPicker}
|
|
@@ -7464,19 +7447,26 @@ function $6f1582c15e13f2f0$var$ColorCircle({
|
|
|
7464
7447
|
onClick: onClick,
|
|
7465
7448
|
onHoverUpdate: onHoverUpdate
|
|
7466
7449
|
}) {
|
|
7467
|
-
const button =
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7450
|
+
const button = (() => {
|
|
7451
|
+
const _el$ = $6f1582c15e13f2f0$var$_tmpl$(),
|
|
7452
|
+
_el$2 = _el$.firstChild,
|
|
7453
|
+
_el$3 = _el$2.firstChild;
|
|
7454
|
+
_el$.$$click = e => onClick(e.currentTarget, color);
|
|
7455
|
+
$qgKv4$effect(_p$ => {
|
|
7456
|
+
const _v$ = color.label || "",
|
|
7457
|
+
_v$2 = `border-color: ${color.value};`,
|
|
7458
|
+
_v$3 = `background-color: ${color.value};`;
|
|
7459
|
+
_v$ !== _p$._v$ && $qgKv4$setAttribute(_el$, "title", _p$._v$ = _v$);
|
|
7460
|
+
_p$._v$2 = $qgKv4$style(_el$2, _v$2, _p$._v$2);
|
|
7461
|
+
_p$._v$3 = $qgKv4$style(_el$3, _v$3, _p$._v$3);
|
|
7462
|
+
return _p$;
|
|
7463
|
+
}, {
|
|
7464
|
+
_v$: undefined,
|
|
7465
|
+
_v$2: undefined,
|
|
7466
|
+
_v$3: undefined
|
|
7467
|
+
});
|
|
7468
|
+
return _el$;
|
|
7469
|
+
})();
|
|
7480
7470
|
button.addEventListener("mouseenter", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
|
|
7481
7471
|
button.addEventListener("mouseleave", $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, false)));
|
|
7482
7472
|
return button;
|
|
@@ -7531,7 +7521,7 @@ function $6f1582c15e13f2f0$export$590326cc34f49e2d({
|
|
|
7531
7521
|
if (selectOnHover) handleSelectOnHover(hovered, color, hovering);
|
|
7532
7522
|
};
|
|
7533
7523
|
// Create the color circles
|
|
7534
|
-
const circles = colors.map(color => $
|
|
7524
|
+
const circles = colors.map(color => $qgKv4$createComponent($6f1582c15e13f2f0$var$ColorCircle, {
|
|
7535
7525
|
color: color,
|
|
7536
7526
|
onClick: handleClick,
|
|
7537
7527
|
onHoverUpdate: handleHoverUpdate
|
|
@@ -7542,15 +7532,17 @@ function $6f1582c15e13f2f0$export$590326cc34f49e2d({
|
|
|
7542
7532
|
const initial_index = initialColor == undefined ? -1 : colors.findIndex(c => typeof initialColor === "string" ? c.value === initialColor : c.value === initialColor.value && c.label === initialColor.label);
|
|
7543
7533
|
if (initial_index > -1) setActiveIndex(initial_index);
|
|
7544
7534
|
if (onlyCircles) return circles;
|
|
7545
|
-
return
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
});
|
|
7535
|
+
return (() => {
|
|
7536
|
+
const _el$4 = $6f1582c15e13f2f0$var$_tmpl$2();
|
|
7537
|
+
$qgKv4$insert(_el$4, circles);
|
|
7538
|
+
return _el$4;
|
|
7539
|
+
})();
|
|
7551
7540
|
}
|
|
7552
7541
|
};
|
|
7553
7542
|
}
|
|
7543
|
+
$qgKv4$delegateEvents(["click"]);
|
|
7544
|
+
const $7f57d546b5d5b3d6$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div>`),
|
|
7545
|
+
$7f57d546b5d5b3d6$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div style=overflow:hidden;height:0px;visibility:hidden aria-hidden=true>`);
|
|
7554
7546
|
const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
7555
7547
|
duration = 500,
|
|
7556
7548
|
delay = 0
|
|
@@ -7574,14 +7566,16 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7574
7566
|
children: children
|
|
7575
7567
|
}) => {
|
|
7576
7568
|
if (Array.isArray(children) && children.length === 1) children = children[0];
|
|
7577
|
-
innerRef =
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7569
|
+
innerRef = (() => {
|
|
7570
|
+
const _el$ = $7f57d546b5d5b3d6$var$_tmpl$();
|
|
7571
|
+
$qgKv4$insert(_el$, children);
|
|
7572
|
+
return _el$;
|
|
7573
|
+
})();
|
|
7574
|
+
outerRef = (() => {
|
|
7575
|
+
const _el$2 = $7f57d546b5d5b3d6$var$_tmpl$2();
|
|
7576
|
+
$qgKv4$insert(_el$2, innerRef);
|
|
7577
|
+
return _el$2;
|
|
7578
|
+
})();
|
|
7585
7579
|
return outerRef;
|
|
7586
7580
|
};
|
|
7587
7581
|
const expand = $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(async (expanding_delay = delay, time_to_expand = duration) => {
|
|
@@ -7632,6 +7626,9 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7632
7626
|
};
|
|
7633
7627
|
var $0ffb759867ae20fc$exports = {};
|
|
7634
7628
|
$0ffb759867ae20fc$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 inset: 0;\n}\n\n";
|
|
7629
|
+
const $45af9e834781a9bc$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<img>`),
|
|
7630
|
+
$45af9e834781a9bc$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<source sizes=0px>`),
|
|
7631
|
+
$45af9e834781a9bc$var$_tmpl$3 = /*#__PURE__*/$qgKv4$template(`<picture>`);
|
|
7635
7632
|
const $45af9e834781a9bc$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
7636
7633
|
const $45af9e834781a9bc$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
7637
7634
|
function $45af9e834781a9bc$export$f39a7d0667e924a(what_to_watch, sizes_communicator = $607fc90221d440a6$export$e806c6c1615a59ae(), resolution_factor = 1) {
|
|
@@ -7709,9 +7706,11 @@ function $45af9e834781a9bc$export$a62825542f1bfcf5({
|
|
|
7709
7706
|
if (!src) {
|
|
7710
7707
|
$649f456f663da9fc$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
|
|
7711
7708
|
$7547e32486a3abc0$export$8048b892d651b310(new Error("no image src provided: " + src));
|
|
7712
|
-
return
|
|
7713
|
-
|
|
7714
|
-
|
|
7709
|
+
return (() => {
|
|
7710
|
+
const _el$ = $45af9e834781a9bc$var$_tmpl$();
|
|
7711
|
+
$qgKv4$spread(_el$, image_options, false, false);
|
|
7712
|
+
return _el$;
|
|
7713
|
+
})(); // we don't want everything to fail if someone misused this component
|
|
7715
7714
|
}
|
|
7716
7715
|
// Create an array of elements that will get their `sizes` attribute updated when what_to_watch resizes
|
|
7717
7716
|
const sources = [];
|
|
@@ -7720,35 +7719,38 @@ function $45af9e834781a9bc$export$a62825542f1bfcf5({
|
|
|
7720
7719
|
// Much faster than .map and this will run kinda often
|
|
7721
7720
|
const format = formats[i];
|
|
7722
7721
|
const srcset = $45af9e834781a9bc$var$make_srcset(src, format, resolutions);
|
|
7723
|
-
sources.push(
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
type: `image/${format}`,
|
|
7728
|
-
...(set_dataset ? {
|
|
7722
|
+
sources.push((() => {
|
|
7723
|
+
const _el$2 = $45af9e834781a9bc$var$_tmpl$2();
|
|
7724
|
+
$qgKv4$setAttribute(_el$2, "type", `image/${format}`);
|
|
7725
|
+
$qgKv4$spread(_el$2, set_dataset ? {
|
|
7729
7726
|
"data-srcset": srcset
|
|
7730
7727
|
} : {
|
|
7731
7728
|
srcset: srcset
|
|
7732
|
-
})
|
|
7733
|
-
|
|
7729
|
+
}, false, false);
|
|
7730
|
+
return _el$2;
|
|
7731
|
+
})());
|
|
7734
7732
|
}
|
|
7735
7733
|
const opts_without_src = {
|
|
7736
7734
|
...image_options
|
|
7737
7735
|
}; // Prevents the image from instantly loading the original source
|
|
7738
7736
|
delete opts_without_src["src"];
|
|
7739
7737
|
delete opts_without_src["srcset"];
|
|
7740
|
-
const the_image =
|
|
7741
|
-
|
|
7742
|
-
|
|
7738
|
+
const the_image = (() => {
|
|
7739
|
+
const _el$3 = $45af9e834781a9bc$var$_tmpl$();
|
|
7740
|
+
$qgKv4$spread(_el$3, opts_without_src, false, false);
|
|
7741
|
+
return _el$3;
|
|
7742
|
+
})(); // create image
|
|
7743
7743
|
sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
|
|
7744
7744
|
what_to_watch ||= the_image;
|
|
7745
7745
|
sizes_setter_ ||= $45af9e834781a9bc$export$f39a7d0667e924a(what_to_watch, sizes_communicator, resolution_factor); // now we can finally create the sizes_setter
|
|
7746
7746
|
// start a sizes_setter for every source (including fallback image)
|
|
7747
7747
|
for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $7547e32486a3abc0$export$8048b892d651b310));
|
|
7748
7748
|
// embed all sources into a <picture> so that the browser understands they're "together"
|
|
7749
|
-
const picture =
|
|
7750
|
-
|
|
7751
|
-
|
|
7749
|
+
const picture = (() => {
|
|
7750
|
+
const _el$4 = $45af9e834781a9bc$var$_tmpl$3();
|
|
7751
|
+
$qgKv4$insert(_el$4, sources);
|
|
7752
|
+
return _el$4;
|
|
7753
|
+
})();
|
|
7752
7754
|
// Create src and srcset for fallback image and set it.
|
|
7753
7755
|
// This is so that the browser doesn't start loading the fallback image for fun (chrome loads very eagerly)
|
|
7754
7756
|
const fallback_src = $45af9e834781a9bc$var$optimized_img_url_generator("png", src, 400);
|
|
@@ -7777,6 +7779,9 @@ function $45af9e834781a9bc$var$optimized_img_url_generator(format, url, width) {
|
|
|
7777
7779
|
// using make_url_with_query_params takes ~100ms on CDON with 2 surfaces and hover images, we can't afford that when it could be essentially free
|
|
7778
7780
|
return `${$45af9e834781a9bc$export$3d13beba9b52c947}?format=${format}&url=${encodeURIComponent(url)}&width=${width}`;
|
|
7779
7781
|
}
|
|
7782
|
+
const $914971fb43986a16$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div>`),
|
|
7783
|
+
$914971fb43986a16$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<canvas class=depict-img-filler height=3000>`),
|
|
7784
|
+
$914971fb43986a16$var$_tmpl$3 = /*#__PURE__*/$qgKv4$template(`<div style=position:relative><div class=depict-img-cont>`);
|
|
7780
7785
|
const $914971fb43986a16$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
|
|
7781
7786
|
// Add nolazy to placeholders to avoid errors with the stupid lazyfier
|
|
7782
7787
|
const $914971fb43986a16$var$add_nolazy_to_placeholder = type => type === "placeholder" ? "nolazy" : "";
|
|
@@ -7805,21 +7810,22 @@ function $914971fb43986a16$var$Image({
|
|
|
7805
7810
|
init_with_placeholder: _,
|
|
7806
7811
|
...image_options
|
|
7807
7812
|
}) {
|
|
7808
|
-
const div =
|
|
7809
|
-
|
|
7810
|
-
|
|
7813
|
+
const div = (() => {
|
|
7814
|
+
const _el$ = $914971fb43986a16$var$_tmpl$();
|
|
7815
|
+
$qgKv4$effect(_$p => $qgKv4$style(_el$, `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`, _$p));
|
|
7816
|
+
return _el$;
|
|
7817
|
+
})();
|
|
7811
7818
|
const sourceset_component = $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, div);
|
|
7812
7819
|
const IMG_tag = image_options.src?.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
7813
|
-
div.append(
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
}));
|
|
7820
|
+
div.append($qgKv4$createComponent(IMG_tag, $qgKv4$mergeProps({
|
|
7821
|
+
alt: alt
|
|
7822
|
+
}, remove_on_error ? {
|
|
7823
|
+
onerror: "this.remove()"
|
|
7824
|
+
} : {}, image_options, {
|
|
7825
|
+
get ["class"]() {
|
|
7826
|
+
return $b9b0dba897847b2a$export$22a65337c1b43b1f(["depict-img-mod ", image_options.class, $914971fb43986a16$var$add_nolazy_to_placeholder(rendering_options?.type)]);
|
|
7827
|
+
}
|
|
7828
|
+
})));
|
|
7823
7829
|
return div;
|
|
7824
7830
|
}
|
|
7825
7831
|
function $914971fb43986a16$var$CompatibleImage({
|
|
@@ -7830,27 +7836,28 @@ function $914971fb43986a16$var$CompatibleImage({
|
|
|
7830
7836
|
srcset_opts: srcset_opts,
|
|
7831
7837
|
...image_options
|
|
7832
7838
|
}) {
|
|
7833
|
-
const canvas =
|
|
7834
|
-
|
|
7835
|
-
width
|
|
7836
|
-
|
|
7837
|
-
});
|
|
7839
|
+
const canvas = (() => {
|
|
7840
|
+
const _el$2 = $914971fb43986a16$var$_tmpl$2();
|
|
7841
|
+
$qgKv4$setAttribute(_el$2, "width", 3000 * aspect_ratio);
|
|
7842
|
+
return _el$2;
|
|
7843
|
+
})();
|
|
7838
7844
|
const sourceset_component = $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
|
|
7839
7845
|
const IMG_tag = image_options.src?.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
7840
|
-
return
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7846
|
+
return (() => {
|
|
7847
|
+
const _el$3 = $914971fb43986a16$var$_tmpl$3(),
|
|
7848
|
+
_el$4 = _el$3.firstChild;
|
|
7849
|
+
$qgKv4$insert(_el$4, $qgKv4$createComponent(IMG_tag, $qgKv4$mergeProps({
|
|
7850
|
+
alt: alt
|
|
7851
|
+
}, remove_on_error ? {
|
|
7852
|
+
onerror: "this.remove()"
|
|
7853
|
+
} : {}, image_options, {
|
|
7854
|
+
get ["class"]() {
|
|
7855
|
+
return $b9b0dba897847b2a$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $914971fb43986a16$var$add_nolazy_to_placeholder(rendering_options?.type)]);
|
|
7856
|
+
}
|
|
7857
|
+
})));
|
|
7858
|
+
$qgKv4$insert(_el$3, canvas, null);
|
|
7859
|
+
return _el$3;
|
|
7860
|
+
})();
|
|
7854
7861
|
}
|
|
7855
7862
|
function $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts = {}, canvas) {
|
|
7856
7863
|
let sourceset_component;
|
|
@@ -7869,7 +7876,8 @@ function $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, sr
|
|
|
7869
7876
|
}
|
|
7870
7877
|
var $504e2aac6aea7baf$exports = {};
|
|
7871
7878
|
$504e2aac6aea7baf$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";
|
|
7872
|
-
|
|
7879
|
+
const $8483d1d9fcee52ec$var$_tmpl$ = /*#__PURE__*/$qgKv4$template(`<div class=images-container><div class=main-image-container>`),
|
|
7880
|
+
$8483d1d9fcee52ec$var$_tmpl$2 = /*#__PURE__*/$qgKv4$template(`<div class=second-image-container>`);
|
|
7873
7881
|
// Saving bytez
|
|
7874
7882
|
// Maybe? @Daniel
|
|
7875
7883
|
const $8483d1d9fcee52ec$var$TOUCHSTART = "touchstart";
|
|
@@ -8009,16 +8017,17 @@ const $8483d1d9fcee52ec$export$2369f6fc1c911576 = ({
|
|
|
8009
8017
|
srcset_opts: second_srcset_opts || {}
|
|
8010
8018
|
});
|
|
8011
8019
|
const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
|
|
8012
|
-
const images_container =
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8020
|
+
const images_container = (() => {
|
|
8021
|
+
const _el$ = $8483d1d9fcee52ec$var$_tmpl$(),
|
|
8022
|
+
_el$2 = _el$.firstChild;
|
|
8023
|
+
$qgKv4$insert(_el$, !no_second_img && (() => {
|
|
8024
|
+
const _el$3 = $8483d1d9fcee52ec$var$_tmpl$2();
|
|
8025
|
+
$qgKv4$insert(_el$3, second_image);
|
|
8026
|
+
return _el$3;
|
|
8027
|
+
})(), _el$2);
|
|
8028
|
+
$qgKv4$insert(_el$2, main_image);
|
|
8029
|
+
return _el$;
|
|
8030
|
+
})();
|
|
8022
8031
|
if (no_second_img) return images_container;
|
|
8023
8032
|
const hover_element = images_container;
|
|
8024
8033
|
const event_handler_mouse = ({
|