@depict-ai/utilishared 2.0.1 → 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 +2 -2
package/ES10/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { onCleanup as $76EG6$onCleanup, createEffect as $76EG6$createEffect, createSignal as $76EG6$createSignal } from "solid-js";
|
|
2
|
+
import $76EG6$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import $76EG6$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
3
4
|
import $76EG6$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
4
|
-
import $76EG6$
|
|
5
|
+
import { template as $76EG6$template, insert as $76EG6$insert, className as $76EG6$className, setAttribute as $76EG6$setAttribute, spread as $76EG6$spread, mergeProps as $76EG6$mergeProps, addEventListener as $76EG6$addEventListener, delegateEvents as $76EG6$delegateEvents, effect as $76EG6$effect, style as $76EG6$style, createComponent as $76EG6$createComponent } from "solid-js/web";
|
|
5
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
6
7
|
register_es_version("utilishared", "ES10");
|
|
7
8
|
function $parcel$export(e, n, v, s) {
|
|
@@ -15,7 +16,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
15
16
|
function $parcel$interopDefault(a) {
|
|
16
17
|
return a && a.__esModule ? a.default : a;
|
|
17
18
|
}
|
|
18
|
-
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.
|
|
19
|
+
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.3";
|
|
19
20
|
const $a5a2bdb4ae93374b$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"))();
|
|
20
21
|
const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
|
|
21
22
|
let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
|
|
@@ -74,6 +75,7 @@ class $449d6683cecfa078$export$e2c811ae0eb35313 {
|
|
|
74
75
|
$76EG6$babelruntimehelpersdefineProperty(this, "subscribers_", []);
|
|
75
76
|
$76EG6$babelruntimehelpersdefineProperty(this, "waiting_for_update_", 0);
|
|
76
77
|
$76EG6$babelruntimehelpersdefineProperty(this, "queue_", []);
|
|
78
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "last_processed_value_", void 0);
|
|
77
79
|
$76EG6$babelruntimehelpersdefineProperty(this, "has_had_value_", false);
|
|
78
80
|
$76EG6$babelruntimehelpersdefineProperty(this, "push_value_", value => {
|
|
79
81
|
this.queue_.push(value);
|
|
@@ -748,6 +750,7 @@ class $f5a4b8e233f0e1cd$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
748
750
|
get: $f5a4b8e233f0e1cd$var$_get_initial_reconnect_delay,
|
|
749
751
|
set: void 0
|
|
750
752
|
});
|
|
753
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "current_socket", void 0);
|
|
751
754
|
$f5a4b8e233f0e1cd$var$_classPrivateFieldInitSpec(this, $f5a4b8e233f0e1cd$var$_ws_constructor_options, {
|
|
752
755
|
writable: true,
|
|
753
756
|
value: void 0
|
|
@@ -760,6 +763,7 @@ class $f5a4b8e233f0e1cd$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
760
763
|
writable: true,
|
|
761
764
|
value: {}
|
|
762
765
|
});
|
|
766
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "restart_ws", void 0);
|
|
763
767
|
$f5a4b8e233f0e1cd$var$_classPrivateFieldInitSpec(this, $f5a4b8e233f0e1cd$var$_try_again_in_ms, {
|
|
764
768
|
writable: true,
|
|
765
769
|
value: $76EG6$babelruntimehelpersclassPrivateFieldGet(this, $f5a4b8e233f0e1cd$var$_initial_reconnect_delay)
|
|
@@ -3918,6 +3922,7 @@ class $5f31622ffb78bc10$export$3be7054c61590ee3 {
|
|
|
3918
3922
|
$5f31622ffb78bc10$var$_classPrivateMethodInitSpec(this, $5f31622ffb78bc10$var$_unload_images_and_add_load_listeners);
|
|
3919
3923
|
$5f31622ffb78bc10$var$_classPrivateMethodInitSpec(this, $5f31622ffb78bc10$var$_add_load_event_listener);
|
|
3920
3924
|
$5f31622ffb78bc10$var$_classPrivateMethodInitSpec(this, $5f31622ffb78bc10$var$_initiate_new_image);
|
|
3925
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "intersection_observer", void 0);
|
|
3921
3926
|
$5f31622ffb78bc10$var$_classPrivateFieldInitSpec(this, $5f31622ffb78bc10$var$_verbose, {
|
|
3922
3927
|
writable: true,
|
|
3923
3928
|
value: false
|
|
@@ -4136,59 +4141,10 @@ function $5f31622ffb78bc10$export$e4741190ccada479(element, selector) {
|
|
|
4136
4141
|
}
|
|
4137
4142
|
return result;
|
|
4138
4143
|
}
|
|
4139
|
-
const $
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
}
|
|
4144
|
-
const $a285401a927e4306$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
4145
|
-
const $0f650018c3cbc373$var$appendChild = (parent, child) => {
|
|
4146
|
-
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
4147
|
-
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
4148
|
-
if (child.length !== undefined)
|
|
4149
|
-
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
4150
|
-
for (let i = 0; i < child.length; i++) $0f650018c3cbc373$var$appendChild(parent, child[i]);else
|
|
4151
|
-
// fallback for things only implementing iterator interface
|
|
4152
|
-
for (const more_kids of child) $0f650018c3cbc373$var$appendChild(parent, more_kids);
|
|
4153
|
-
return;
|
|
4154
|
-
}
|
|
4155
|
-
parent.append(child);
|
|
4156
|
-
};
|
|
4157
|
-
const $0f650018c3cbc373$export$34b9dba7ce09269b = (tag, _ref, _unknown) => {
|
|
4158
|
-
let {
|
|
4159
|
-
children: children,
|
|
4160
|
-
...props
|
|
4161
|
-
} = _ref;
|
|
4162
|
-
if (typeof tag === "function") return tag({
|
|
4163
|
-
children: children,
|
|
4164
|
-
...props
|
|
4165
|
-
}, _unknown);
|
|
4166
|
-
// For partial SVG support
|
|
4167
|
-
// 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"]
|
|
4168
|
-
const is_svg = (props === null || props === void 0 ? void 0 : props.xmlns) || tag == "defs" || tag == "filter" || tag == "fecolormatrix" || tag == "g" || tag == "circle" || tag == "circle" || tag == "svg" || tag == "path" || tag == "polygon";
|
|
4169
|
-
if (is_svg) var namespace = (props === null || props === void 0 ? void 0 : props.xmlns) || "http://www.w3.org/2000/svg";
|
|
4170
|
-
if (typeof document === "undefined") return {};
|
|
4171
|
-
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
4172
|
-
for (const key in props) {
|
|
4173
|
-
const value = props[key];
|
|
4174
|
-
if (key === "onClick") element.addEventListener("click", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
4175
|
-
// https://stackoverflow.com/a/23142447
|
|
4176
|
-
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
4177
|
-
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]);
|
|
4178
|
-
}
|
|
4179
|
-
$0f650018c3cbc373$var$appendChild(element, children);
|
|
4180
|
-
return element;
|
|
4181
|
-
};
|
|
4182
|
-
const $0f650018c3cbc373$export$25062201e9e25d76 = $0f650018c3cbc373$export$34b9dba7ce09269b;
|
|
4183
|
-
const $0f650018c3cbc373$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
4184
|
-
let {
|
|
4185
|
-
children: children
|
|
4186
|
-
} = _ref2;
|
|
4187
|
-
if (typeof document === "undefined") return {};
|
|
4188
|
-
const df = document.createDocumentFragment();
|
|
4189
|
-
$0f650018c3cbc373$var$appendChild(df, children);
|
|
4190
|
-
return df;
|
|
4191
|
-
};
|
|
4144
|
+
const $be288a83d9eabf2a$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class="depict-slider depict">`),
|
|
4145
|
+
$be288a83d9eabf2a$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=sliding>`),
|
|
4146
|
+
$be288a83d9eabf2a$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<button aria-label="Scroll left"class="left d-navbutton"type=button>`),
|
|
4147
|
+
$be288a83d9eabf2a$var$_tmpl$4 = /*#__PURE__*/$76EG6$template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
|
|
4192
4148
|
function $be288a83d9eabf2a$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
4193
4149
|
$be288a83d9eabf2a$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
4194
4150
|
privateSet.add(obj);
|
|
@@ -4383,25 +4339,13 @@ class $be288a83d9eabf2a$export$692b27c28639e5b9 {
|
|
|
4383
4339
|
$be288a83d9eabf2a$var$_classPrivateMethodInitSpec(this, $be288a83d9eabf2a$var$_hide_buttons_if_needed);
|
|
4384
4340
|
$be288a83d9eabf2a$var$_classPrivateMethodInitSpec(this, $be288a83d9eabf2a$var$_observer_callback);
|
|
4385
4341
|
$be288a83d9eabf2a$var$_classPrivateMethodInitSpec(this, $be288a83d9eabf2a$var$_observe_element);
|
|
4386
|
-
$76EG6$babelruntimehelpersdefineProperty(this, "container", $
|
|
4387
|
-
class: "depict-slider depict"
|
|
4388
|
-
}));
|
|
4342
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "container", $be288a83d9eabf2a$var$_tmpl$());
|
|
4389
4343
|
$be288a83d9eabf2a$var$_classPrivateFieldInitSpec(this, $be288a83d9eabf2a$var$_elements, {
|
|
4390
4344
|
writable: true,
|
|
4391
4345
|
value: {
|
|
4392
|
-
sliding_el_: $
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
left_: $0f650018c3cbc373$export$34b9dba7ce09269b("button", {
|
|
4396
|
-
"aria-label": "Scroll left",
|
|
4397
|
-
class: "left d-navbutton",
|
|
4398
|
-
type: "button"
|
|
4399
|
-
}),
|
|
4400
|
-
right_: $0f650018c3cbc373$export$34b9dba7ce09269b("button", {
|
|
4401
|
-
"aria-label": "Scroll right",
|
|
4402
|
-
class: "right d-navbutton",
|
|
4403
|
-
type: "button"
|
|
4404
|
-
})
|
|
4346
|
+
sliding_el_: $be288a83d9eabf2a$var$_tmpl$2(),
|
|
4347
|
+
left_: $be288a83d9eabf2a$var$_tmpl$3(),
|
|
4348
|
+
right_: $be288a83d9eabf2a$var$_tmpl$4()
|
|
4405
4349
|
}
|
|
4406
4350
|
});
|
|
4407
4351
|
$76EG6$babelruntimehelpersdefineProperty(this, "insert_here", $76EG6$babelruntimehelpersclassPrivateFieldGet(this, $be288a83d9eabf2a$var$_elements).sliding_el_);
|
|
@@ -4415,6 +4359,7 @@ class $be288a83d9eabf2a$export$692b27c28639e5b9 {
|
|
|
4415
4359
|
$76EG6$babelruntimehelpersdefineProperty(this, "dist_to_hide_right", 10);
|
|
4416
4360
|
$76EG6$babelruntimehelpersdefineProperty(this, "center_target", false);
|
|
4417
4361
|
$76EG6$babelruntimehelpersdefineProperty(this, "correct_bs_targets", true);
|
|
4362
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "snap_style", void 0);
|
|
4418
4363
|
$76EG6$babelruntimehelpersdefineProperty(this, "on_elements_changed", [$be288a83d9eabf2a$var$_classPrivateMethodGet(this, $be288a83d9eabf2a$var$_observe_element, $be288a83d9eabf2a$var$_observe_element2)]);
|
|
4419
4364
|
$be288a83d9eabf2a$var$_classPrivateFieldInitSpec(this, $be288a83d9eabf2a$var$_index_cache, {
|
|
4420
4365
|
writable: true,
|
|
@@ -4931,6 +4876,9 @@ let $eb252431088a7c2b$var$pageview_sent = false;
|
|
|
4931
4876
|
var $eb252431088a7c2b$var$_dispatched_recs_inserted = /*#__PURE__*/new WeakMap();
|
|
4932
4877
|
class $eb252431088a7c2b$export$1a8782481a9af507 {
|
|
4933
4878
|
constructor(settings) {
|
|
4879
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "settings", void 0);
|
|
4880
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "data", void 0);
|
|
4881
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "tracker", void 0);
|
|
4934
4882
|
$eb252431088a7c2b$var$_classPrivateFieldInitSpec(this, $eb252431088a7c2b$var$_dispatched_recs_inserted, {
|
|
4935
4883
|
writable: true,
|
|
4936
4884
|
value: false
|
|
@@ -4972,6 +4920,7 @@ class $eb252431088a7c2b$export$1a8782481a9af507 {
|
|
|
4972
4920
|
}
|
|
4973
4921
|
trackGAEvent(action, index, product_id, ga_product_ids) {
|
|
4974
4922
|
if (this.settings.sendGa === false) return;
|
|
4923
|
+
// @ts-ignore
|
|
4975
4924
|
if (typeof ga !== "function") {
|
|
4976
4925
|
console.log("Could not send", action, "to GA. analytics.js not loaded.");
|
|
4977
4926
|
return;
|
|
@@ -4984,7 +4933,9 @@ class $eb252431088a7c2b$export$1a8782481a9af507 {
|
|
|
4984
4933
|
list_name: "depict_" + this.settings.type
|
|
4985
4934
|
});
|
|
4986
4935
|
}
|
|
4987
|
-
if (this.tracker === undefined)
|
|
4936
|
+
if (this.tracker === undefined)
|
|
4937
|
+
// @ts-ignore
|
|
4938
|
+
this.tracker = ga("create", this.settings.gaid, "auto", "depict");
|
|
4988
4939
|
$3674b9afc9a63520$export$f75172d2e289cd02(action);
|
|
4989
4940
|
}
|
|
4990
4941
|
trackPageView() {
|
|
@@ -5255,6 +5206,7 @@ async function $b7b39b38d6e695e9$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
5255
5206
|
elements: container ? container : [slider.container]
|
|
5256
5207
|
};
|
|
5257
5208
|
}
|
|
5209
|
+
const $193ee64f5599f8a8$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<button class=load_more>`);
|
|
5258
5210
|
async function $193ee64f5599f8a8$export$30933c637c977eef(_ref) {
|
|
5259
5211
|
var _template_tool$data;
|
|
5260
5212
|
let {
|
|
@@ -5398,10 +5350,11 @@ function $193ee64f5599f8a8$var$setup_load_more(t, root, chunk_size) {
|
|
|
5398
5350
|
catchify: catchify
|
|
5399
5351
|
} = t,
|
|
5400
5352
|
load_more_cont = $652300c6621d5500$export$d3e2a0560cbf4787('<div class="load-more-container"></div>'),
|
|
5401
|
-
load_button = load_more_cont.appendChild(
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5353
|
+
load_button = load_more_cont.appendChild((() => {
|
|
5354
|
+
const _el$ = $193ee64f5599f8a8$var$_tmpl$();
|
|
5355
|
+
$76EG6$insert(_el$, view_more_text);
|
|
5356
|
+
return _el$;
|
|
5357
|
+
})());
|
|
5405
5358
|
load_button.addEventListener("click", catchify(load_more_recs_and_hide_button_if_needed));
|
|
5406
5359
|
root.after(load_more_cont);
|
|
5407
5360
|
load_more_recs_and_hide_button_if_needed();
|
|
@@ -5499,24 +5452,63 @@ async function $03021b39f80fac4b$var$send_sentry_422(response, body, stack) {
|
|
|
5499
5452
|
this.captureException(new Error(msg));
|
|
5500
5453
|
});
|
|
5501
5454
|
}
|
|
5502
|
-
const $
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
}
|
|
5455
|
+
const $a285401a927e4306$export$eb0b9ed911409b57 = (callback, element) => ($5e1f45affc1d7def$export$b3bbfd758f11cfa9(callback)(element), element);
|
|
5456
|
+
function $a285401a927e4306$export$f63fcc839cb0f734(event, handler, element) {
|
|
5457
|
+
element.addEventListener(event, $5e1f45affc1d7def$export$b3bbfd758f11cfa9(handler));
|
|
5458
|
+
return element;
|
|
5459
|
+
}
|
|
5460
|
+
const $a285401a927e4306$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
5461
|
+
const $0f650018c3cbc373$var$appendChild = (parent, child) => {
|
|
5462
|
+
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
5463
|
+
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
5464
|
+
if (child.length !== undefined)
|
|
5465
|
+
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
5466
|
+
for (let i = 0; i < child.length; i++) $0f650018c3cbc373$var$appendChild(parent, child[i]);else
|
|
5467
|
+
// fallback for things only implementing iterator interface
|
|
5468
|
+
for (const more_kids of child) $0f650018c3cbc373$var$appendChild(parent, more_kids);
|
|
5469
|
+
return;
|
|
5470
|
+
}
|
|
5471
|
+
parent.append(child);
|
|
5472
|
+
};
|
|
5473
|
+
const $0f650018c3cbc373$export$34b9dba7ce09269b = (tag, _ref, _unknown) => {
|
|
5474
|
+
let {
|
|
5475
|
+
children: children,
|
|
5476
|
+
...props
|
|
5477
|
+
} = _ref;
|
|
5478
|
+
if (typeof tag === "function") return tag({
|
|
5479
|
+
children: children,
|
|
5480
|
+
...props
|
|
5481
|
+
}, _unknown);
|
|
5482
|
+
// For partial SVG support
|
|
5483
|
+
// 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"]
|
|
5484
|
+
const is_svg = (props === null || props === void 0 ? void 0 : props.xmlns) || tag == "defs" || tag == "filter" || tag == "fecolormatrix" || tag == "g" || tag == "circle" || tag == "circle" || tag == "svg" || tag == "path" || tag == "polygon";
|
|
5485
|
+
if (is_svg) var namespace = (props === null || props === void 0 ? void 0 : props.xmlns) || "http://www.w3.org/2000/svg";
|
|
5486
|
+
if (typeof document === "undefined") return {};
|
|
5487
|
+
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
5488
|
+
for (const key in props) {
|
|
5489
|
+
const value = props[key];
|
|
5490
|
+
if (key === "onClick") element.addEventListener("click", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
5491
|
+
// https://stackoverflow.com/a/23142447
|
|
5492
|
+
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
5493
|
+
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]);
|
|
5494
|
+
}
|
|
5495
|
+
$0f650018c3cbc373$var$appendChild(element, children);
|
|
5496
|
+
return element;
|
|
5497
|
+
};
|
|
5498
|
+
const $0f650018c3cbc373$export$25062201e9e25d76 = $0f650018c3cbc373$export$34b9dba7ce09269b;
|
|
5499
|
+
const $0f650018c3cbc373$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
5500
|
+
let {
|
|
5501
|
+
children: children
|
|
5502
|
+
} = _ref2;
|
|
5503
|
+
if (typeof document === "undefined") return {};
|
|
5504
|
+
const df = document.createDocumentFragment();
|
|
5505
|
+
$0f650018c3cbc373$var$appendChild(df, children);
|
|
5506
|
+
return df;
|
|
5507
|
+
};
|
|
5508
|
+
const $c755e2b0d4b18501$var$_tmpl$ = /*#__PURE__*/$76EG6$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">`),
|
|
5509
|
+
$c755e2b0d4b18501$var$_tmpl$2 = /*#__PURE__*/$76EG6$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">`);
|
|
5510
|
+
const $c755e2b0d4b18501$export$dc84183312f0c201 = /*@__PURE__*/(() => $c755e2b0d4b18501$var$_tmpl$())();
|
|
5511
|
+
const $c755e2b0d4b18501$export$6038895ac52bd044 = /*@__PURE__*/(() => $c755e2b0d4b18501$var$_tmpl$2())();
|
|
5520
5512
|
const $0fe3923936d40f55$export$68c017fd93791405 = function () {
|
|
5521
5513
|
let {
|
|
5522
5514
|
duration = 500
|
|
@@ -5554,6 +5546,8 @@ function $07beada135e5f5e8$export$f8913c8a18f7ca21(iterables) {
|
|
|
5554
5546
|
return ourselves;
|
|
5555
5547
|
}
|
|
5556
5548
|
let $df6d080cba513381$var$_Symbol$iterator, $df6d080cba513381$var$_Symbol$toPrimitive;
|
|
5549
|
+
const $df6d080cba513381$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<style type=text/css>`),
|
|
5550
|
+
$df6d080cba513381$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div>`);
|
|
5557
5551
|
const $df6d080cba513381$export$717f13d9ba00ca19 = (min, max) => "@media ".concat(min ? "(min-width:".concat(min, ")") : "").concat(min && max ? " and " : "").concat(max ? "(max-width:".concat(max, ")") : "");
|
|
5558
5552
|
async function $df6d080cba513381$export$c84671f46d6a1ca(_ref) {
|
|
5559
5553
|
let {
|
|
@@ -5575,9 +5569,7 @@ async function $df6d080cba513381$export$c84671f46d6a1ca(_ref) {
|
|
|
5575
5569
|
ipns: ipns
|
|
5576
5570
|
} = rows_or_empty_object;
|
|
5577
5571
|
const is_static = !ipns && !button;
|
|
5578
|
-
const our_style_el = $
|
|
5579
|
-
type: "text/css"
|
|
5580
|
-
});
|
|
5572
|
+
const our_style_el = $df6d080cba513381$var$_tmpl$();
|
|
5581
5573
|
const container_class = $6cb4d83127e468ea$export$a6db784f019668ba();
|
|
5582
5574
|
const selector_beginning = ".depict .".concat(container_class, ">");
|
|
5583
5575
|
const el_count_ipns = $7ca6fdc721083788$export$e806c6c1615a59ae();
|
|
@@ -5616,13 +5608,15 @@ async function $df6d080cba513381$export$c84671f46d6a1ca(_ref) {
|
|
|
5616
5608
|
});
|
|
5617
5609
|
if (button) {
|
|
5618
5610
|
button_class = $6cb4d83127e468ea$export$a6db784f019668ba();
|
|
5619
|
-
const button_container =
|
|
5620
|
-
|
|
5621
|
-
|
|
5611
|
+
const button_container = (() => {
|
|
5612
|
+
const _el$2 = $df6d080cba513381$var$_tmpl$2();
|
|
5613
|
+
$76EG6$className(_el$2, "load-more-container " + button_class);
|
|
5614
|
+
$76EG6$insert(_el$2, () => $a285401a927e4306$export$f63fcc839cb0f734("click", () => {
|
|
5622
5615
|
var _rows_or_empty_object;
|
|
5623
5616
|
return ipns(ipns.state + ((_rows_or_empty_object = rows_or_empty_object.rows_per_click) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1));
|
|
5624
|
-
}, button)
|
|
5625
|
-
|
|
5617
|
+
}, button));
|
|
5618
|
+
return _el$2;
|
|
5619
|
+
})();
|
|
5626
5620
|
container_element.after(button_container);
|
|
5627
5621
|
}
|
|
5628
5622
|
(0, $90fa633a9564f115$export$b6ae1bc530f4c149).oncreation(container_element, async () => {
|
|
@@ -5923,15 +5917,15 @@ function $090af64928922937$export$80039a49055269fb() {
|
|
|
5923
5917
|
};
|
|
5924
5918
|
return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
|
|
5925
5919
|
}
|
|
5920
|
+
const $66c5b496f7887c00$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
|
|
5926
5921
|
function $66c5b496f7887c00$export$af88b4929c2dc86() {
|
|
5927
|
-
const img = $
|
|
5928
|
-
src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+"
|
|
5929
|
-
});
|
|
5922
|
+
const img = $66c5b496f7887c00$var$_tmpl$();
|
|
5930
5923
|
return {
|
|
5931
5924
|
left: [img],
|
|
5932
5925
|
right: [img.cloneNode()]
|
|
5933
5926
|
};
|
|
5934
5927
|
}
|
|
5928
|
+
const $d3c54fdf1bfb087a$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
|
|
5935
5929
|
function $d3c54fdf1bfb087a$export$1d17a045bcc711b1(_ref) {
|
|
5936
5930
|
let {
|
|
5937
5931
|
t: t,
|
|
@@ -6024,15 +6018,12 @@ function $d3c54fdf1bfb087a$export$1d17a045bcc711b1(_ref) {
|
|
|
6024
6018
|
};
|
|
6025
6019
|
}
|
|
6026
6020
|
function $d3c54fdf1bfb087a$export$a09282b33e69b43f(unique_name) {
|
|
6027
|
-
return
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
class: "checkmark"
|
|
6034
|
-
})]
|
|
6035
|
-
});
|
|
6021
|
+
return (() => {
|
|
6022
|
+
const _el$ = $d3c54fdf1bfb087a$var$_tmpl$(),
|
|
6023
|
+
_el$2 = _el$.firstChild;
|
|
6024
|
+
$76EG6$setAttribute(_el$2, "name", "radio-".concat(unique_name));
|
|
6025
|
+
return _el$;
|
|
6026
|
+
})();
|
|
6036
6027
|
}
|
|
6037
6028
|
|
|
6038
6029
|
// // You need to do this on all elements you insert into the slider before you insert them:
|
|
@@ -6206,15 +6197,13 @@ function $0cbf24ae3e670238$export$5723caf9a8335aa6(_t) {
|
|
|
6206
6197
|
mutation_plugin: mutation_plugin
|
|
6207
6198
|
};
|
|
6208
6199
|
}
|
|
6200
|
+
const $4837ebe61ecec421$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=depict_slider_scroll_bar>`),
|
|
6201
|
+
$4837ebe61ecec421$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=depict_slider_scroll_container>`);
|
|
6209
6202
|
function $4837ebe61ecec421$export$93223e488e7ee078(options) {
|
|
6210
6203
|
function constructor_plugin(_slider_options) {
|
|
6211
6204
|
var _options$scroll_bar_c, _options$scroll_conta;
|
|
6212
|
-
const scroll_bar = $
|
|
6213
|
-
|
|
6214
|
-
});
|
|
6215
|
-
const scroll_container = $0f650018c3cbc373$export$34b9dba7ce09269b("div", {
|
|
6216
|
-
class: "depict_slider_scroll_container"
|
|
6217
|
-
});
|
|
6205
|
+
const scroll_bar = $4837ebe61ecec421$var$_tmpl$();
|
|
6206
|
+
const scroll_container = $4837ebe61ecec421$var$_tmpl$2();
|
|
6218
6207
|
if ((_options$scroll_bar_c = options.scroll_bar_classes) !== null && _options$scroll_bar_c !== void 0 && _options$scroll_bar_c.length) scroll_bar.classList.add(...options.scroll_bar_classes);
|
|
6219
6208
|
if ((_options$scroll_conta = options.scroll_container_classes) !== null && _options$scroll_conta !== void 0 && _options$scroll_conta.length) scroll_container.classList.add(...options.scroll_container_classes);
|
|
6220
6209
|
// Default styles always present
|
|
@@ -6241,6 +6230,7 @@ function $4837ebe61ecec421$export$93223e488e7ee078(options) {
|
|
|
6241
6230
|
mutation_plugin: mutation_plugin
|
|
6242
6231
|
};
|
|
6243
6232
|
}
|
|
6233
|
+
const $ff905d87817a07f4$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
|
|
6244
6234
|
function $ff905d87817a07f4$export$b36d2489a5a16728(_t) {
|
|
6245
6235
|
let {
|
|
6246
6236
|
snapEvery: snapEvery,
|
|
@@ -6271,13 +6261,7 @@ function $ff905d87817a07f4$export$b36d2489a5a16728(_t) {
|
|
|
6271
6261
|
}
|
|
6272
6262
|
async function $ff905d87817a07f4$export$49b950309ab787ad() {
|
|
6273
6263
|
if ("scrollBehavior" in document.documentElement.style) return true;
|
|
6274
|
-
const test_div = $
|
|
6275
|
-
style: "position: absolute; width: 1em; overflow: scroll; scroll-snap-type: x mandatory;",
|
|
6276
|
-
children: $0f650018c3cbc373$export$34b9dba7ce09269b("div", {
|
|
6277
|
-
style: "scroll-snap-align: start; color: transparent;",
|
|
6278
|
-
children: "test"
|
|
6279
|
-
})
|
|
6280
|
-
});
|
|
6264
|
+
const test_div = $ff905d87817a07f4$var$_tmpl$();
|
|
6281
6265
|
const body = await (0, $90fa633a9564f115$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
6282
6266
|
body.append(test_div);
|
|
6283
6267
|
test_div.scrollLeft = 1;
|
|
@@ -6843,10 +6827,12 @@ function $f991aad8d6175c9b$export$1ac466d53a6636ac(t, input_id) {
|
|
|
6843
6827
|
function $ed8073ecbced6e7e$export$1ff14fec60ed5697(t, filter) {
|
|
6844
6828
|
try {
|
|
6845
6829
|
$799496226e956169$export$674d8cd8b6868154();
|
|
6830
|
+
// @ts-ignore
|
|
6846
6831
|
ga($5e1f45affc1d7def$export$b3bbfd758f11cfa9(async function (tracker) {
|
|
6847
6832
|
var _window, _window$ga;
|
|
6848
6833
|
let get_all_function = (_window = window) === null || _window === void 0 ? void 0 : (_window$ga = _window.ga) === null || _window$ga === void 0 ? void 0 : _window$ga.getAll; // https://sentry.io/organizations/depictai-0o/issues/3621911835/?project=5476183&referrer=slack
|
|
6849
6834
|
if (typeof get_all_function !== "function") get_all_function = await $2da62df28669a48a$export$2fc1a072736ae2f6(window, "ga", "getAll");
|
|
6835
|
+
// @ts-ignore
|
|
6850
6836
|
const all_trackers = get_all_function.call(ga);
|
|
6851
6837
|
$241f2f02cc612a49$export$de56f1198d121036("we have trackers", all_trackers);
|
|
6852
6838
|
// @ts-ignore
|
|
@@ -6871,7 +6857,9 @@ function $ed8073ecbced6e7e$export$1ff14fec60ed5697(t, filter) {
|
|
|
6871
6857
|
$5e1f45affc1d7def$export$f18d5b0af29128b7(error, "error");
|
|
6872
6858
|
}
|
|
6873
6859
|
}
|
|
6874
|
-
function $ed8073ecbced6e7e$var$make_tracker_send_to_depict(
|
|
6860
|
+
function $ed8073ecbced6e7e$var$make_tracker_send_to_depict(
|
|
6861
|
+
// @ts-ignore
|
|
6862
|
+
ga_tracker, t, filter) {
|
|
6875
6863
|
// Docs for analytics.js Tasks:
|
|
6876
6864
|
// https://developers.google.com/analytics/devguides/collection/analyticsjs/tasks
|
|
6877
6865
|
const sendHitTask = "sendHitTask";
|
|
@@ -7840,19 +7828,26 @@ const $8a812fa4638e2832$var$get_voyado_id = () => {
|
|
|
7840
7828
|
const $8a812fa4638e2832$export$a739d9a07da7f9ce = /*@__PURE__*/$5e1f45affc1d7def$export$b3bbfd758f11cfa9(() => {
|
|
7841
7829
|
$d5f7352b58e0d737$export$93ae15b1ae509334($8a812fa4638e2832$var$get_voyado_id);
|
|
7842
7830
|
});
|
|
7831
|
+
const $c40fc6dc2c22b3c4$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<button>`);
|
|
7843
7832
|
function $c40fc6dc2c22b3c4$export$4a3043e508dd72f0(_ref) {
|
|
7844
7833
|
let {
|
|
7845
7834
|
children: children,
|
|
7846
7835
|
...attributes
|
|
7847
7836
|
} = _ref;
|
|
7848
|
-
const button =
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7837
|
+
const button = (() => {
|
|
7838
|
+
const _el$ = $c40fc6dc2c22b3c4$var$_tmpl$();
|
|
7839
|
+
$76EG6$spread(_el$, $76EG6$mergeProps(attributes, {
|
|
7840
|
+
"type": "button"
|
|
7841
|
+
}), false, true);
|
|
7842
|
+
$76EG6$insert(_el$, children);
|
|
7843
|
+
return _el$;
|
|
7844
|
+
})();
|
|
7853
7845
|
button.classList.add("show-more");
|
|
7854
7846
|
return button;
|
|
7855
7847
|
}
|
|
7848
|
+
const $a59cde169150d10b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=slidein-backdrop>`),
|
|
7849
|
+
$a59cde169150d10b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
|
|
7850
|
+
$a59cde169150d10b$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<div class=depict>`);
|
|
7856
7851
|
async function $a59cde169150d10b$export$8a0e4d6f6abf7e90(_ref) {
|
|
7857
7852
|
let {
|
|
7858
7853
|
title_: title_,
|
|
@@ -7863,33 +7858,31 @@ async function $a59cde169150d10b$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
7863
7858
|
let close_;
|
|
7864
7859
|
const open_promise = new Promise(r => close_ = r);
|
|
7865
7860
|
const body = await (0, $90fa633a9564f115$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
7866
|
-
const backdrop =
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7861
|
+
const backdrop = (() => {
|
|
7862
|
+
const _el$ = $a59cde169150d10b$var$_tmpl$();
|
|
7863
|
+
$76EG6$addEventListener(_el$, "click", close_, true);
|
|
7864
|
+
return _el$;
|
|
7865
|
+
})();
|
|
7870
7866
|
const [exit_title_iterator, exitable_title_iterator] = $fee212025270d5b9$export$927664b47117acb0(title_);
|
|
7871
7867
|
const closing_handlers = [exit_title_iterator];
|
|
7872
|
-
const slidein =
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
class: "depict",
|
|
7891
|
-
children: [backdrop, slidein]
|
|
7892
|
-
});
|
|
7868
|
+
const slidein = (() => {
|
|
7869
|
+
const _el$2 = $a59cde169150d10b$var$_tmpl$2(),
|
|
7870
|
+
_el$3 = _el$2.firstChild,
|
|
7871
|
+
_el$4 = _el$3.firstChild,
|
|
7872
|
+
_el$5 = _el$4.nextSibling,
|
|
7873
|
+
_el$6 = _el$3.nextSibling;
|
|
7874
|
+
$76EG6$insert(_el$4, () => $332ef338faf216a4$export$7c081fdbc65b6a2a(exitable_title_iterator, false));
|
|
7875
|
+
$76EG6$addEventListener(_el$5, "click", close_, true);
|
|
7876
|
+
$76EG6$insert(_el$5, CloseIcon);
|
|
7877
|
+
$76EG6$insert(_el$6, children);
|
|
7878
|
+
return _el$2;
|
|
7879
|
+
})();
|
|
7880
|
+
const elements_in_container = (() => {
|
|
7881
|
+
const _el$7 = $a59cde169150d10b$var$_tmpl$3();
|
|
7882
|
+
$76EG6$insert(_el$7, backdrop, null);
|
|
7883
|
+
$76EG6$insert(_el$7, slidein, null);
|
|
7884
|
+
return _el$7;
|
|
7885
|
+
})();
|
|
7893
7886
|
body.append(elements_in_container);
|
|
7894
7887
|
backdrop.animate({
|
|
7895
7888
|
opacity: [0, 1]
|
|
@@ -7938,6 +7931,10 @@ async function $a59cde169150d10b$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
7938
7931
|
on_close_: fn => closing_handlers.push(fn)
|
|
7939
7932
|
};
|
|
7940
7933
|
}
|
|
7934
|
+
$76EG6$delegateEvents(["click"]);
|
|
7935
|
+
const $24f3fd73864991c0$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=option-list>`),
|
|
7936
|
+
$24f3fd73864991c0$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<button type=button><span class=size>`),
|
|
7937
|
+
$24f3fd73864991c0$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<span class=sold-out>`);
|
|
7941
7938
|
async function $24f3fd73864991c0$export$c068ad5361be7646(_ref) {
|
|
7942
7939
|
let {
|
|
7943
7940
|
title_: title_,
|
|
@@ -7954,40 +7951,44 @@ async function $24f3fd73864991c0$export$c068ad5361be7646(_ref) {
|
|
|
7954
7951
|
} = await $a59cde169150d10b$export$8a0e4d6f6abf7e90({
|
|
7955
7952
|
CloseIcon: CloseIcon,
|
|
7956
7953
|
title_: title_,
|
|
7957
|
-
children: [
|
|
7958
|
-
|
|
7959
|
-
|
|
7954
|
+
children: [(() => {
|
|
7955
|
+
const _el$ = $24f3fd73864991c0$var$_tmpl$();
|
|
7956
|
+
$76EG6$insert(_el$, () => items_.map(_ref2 => {
|
|
7960
7957
|
let {
|
|
7961
7958
|
size_name_: size_name_,
|
|
7962
7959
|
is_available_: is_available_,
|
|
7963
7960
|
id_: id_
|
|
7964
7961
|
} = _ref2;
|
|
7965
|
-
const button =
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7962
|
+
const button = (() => {
|
|
7963
|
+
const _el$2 = $24f3fd73864991c0$var$_tmpl$2(),
|
|
7964
|
+
_el$3 = _el$2.firstChild;
|
|
7965
|
+
_el$2.$$click = () => {
|
|
7969
7966
|
size_selected(id_);
|
|
7970
7967
|
close_();
|
|
7971
|
-
}
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
})
|
|
7979
|
-
|
|
7968
|
+
};
|
|
7969
|
+
$76EG6$className(_el$2, "option" + (is_available_ ? " available" : ""));
|
|
7970
|
+
$76EG6$insert(_el$3, size_name_);
|
|
7971
|
+
$76EG6$insert(_el$2, !is_available_ && (() => {
|
|
7972
|
+
const _el$4 = $24f3fd73864991c0$var$_tmpl$3();
|
|
7973
|
+
$76EG6$insert(_el$4, () => $332ef338faf216a4$export$7c081fdbc65b6a2a(exitable_oos_iterator));
|
|
7974
|
+
return _el$4;
|
|
7975
|
+
})(), null);
|
|
7976
|
+
return _el$2;
|
|
7977
|
+
})();
|
|
7980
7978
|
if (!is_available_) button.disabled = true;
|
|
7981
7979
|
return button;
|
|
7982
|
-
})
|
|
7983
|
-
|
|
7980
|
+
}));
|
|
7981
|
+
return _el$;
|
|
7982
|
+
})()]
|
|
7984
7983
|
});
|
|
7985
7984
|
on_close_(size_selected);
|
|
7986
7985
|
on_close_(exit_oos_iterator);
|
|
7987
7986
|
}));
|
|
7988
7987
|
}
|
|
7988
|
+
$76EG6$delegateEvents(["click"]);
|
|
7989
7989
|
var $aae9878972b17321$exports = {};
|
|
7990
7990
|
$aae9878972b17321$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";
|
|
7991
|
+
const $adc0bb548fdb574f$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div>`);
|
|
7991
7992
|
let $adc0bb548fdb574f$var$inserted = false;
|
|
7992
7993
|
const $adc0bb548fdb574f$export$84712d0562a614b8 = _ref => {
|
|
7993
7994
|
let {
|
|
@@ -8002,54 +8003,44 @@ const $adc0bb548fdb574f$export$84712d0562a614b8 = _ref => {
|
|
|
8002
8003
|
$1013f2e568f87406$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($aae9878972b17321$exports)));
|
|
8003
8004
|
$adc0bb548fdb574f$var$inserted = true;
|
|
8004
8005
|
}
|
|
8005
|
-
return (
|
|
8006
|
-
|
|
8007
|
-
$
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
);
|
|
8006
|
+
return (() => {
|
|
8007
|
+
const _el$ = $adc0bb548fdb574f$var$_tmpl$();
|
|
8008
|
+
$76EG6$className(_el$, "depict-placeholder".concat(extra_classes ? " " + extra_classes : ""));
|
|
8009
|
+
$76EG6$spread(_el$, attributes, false, false);
|
|
8010
|
+
$76EG6$effect(_$p => $76EG6$style(_el$, style ? style : "width:".concat(width, ";height:").concat(height, ";"), _$p));
|
|
8011
|
+
return _el$;
|
|
8012
|
+
})();
|
|
8013
8013
|
};
|
|
8014
8014
|
const $adc0bb548fdb574f$export$d613f5b6d0a331a8 = _ref2 => {
|
|
8015
8015
|
let {
|
|
8016
8016
|
aspect_ratio: aspect_ratio,
|
|
8017
8017
|
...attributes
|
|
8018
8018
|
} = _ref2;
|
|
8019
|
-
return $
|
|
8020
|
-
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8021
|
-
|
|
8022
|
-
});
|
|
8019
|
+
return $76EG6$createComponent($adc0bb548fdb574f$export$84712d0562a614b8, $76EG6$mergeProps({
|
|
8020
|
+
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8021
|
+
}, attributes));
|
|
8023
8022
|
};
|
|
8023
|
+
const $2e6ca552eb0e0b2b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class="depict recommendation_container"><div class=grid>`),
|
|
8024
|
+
$2e6ca552eb0e0b2b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<h4 class=recs_header>`);
|
|
8024
8025
|
const $2e6ca552eb0e0b2b$export$97f31f44c68c1d5 = function (title) {
|
|
8025
8026
|
let surface_classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
8026
|
-
return $a285401a927e4306$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes),
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
})
|
|
8034
|
-
|
|
8027
|
+
return $a285401a927e4306$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
|
|
8028
|
+
const _el$ = $2e6ca552eb0e0b2b$var$_tmpl$(),
|
|
8029
|
+
_el$2 = _el$.firstChild;
|
|
8030
|
+
$76EG6$insert(_el$, title && typeof title === "string" ? (() => {
|
|
8031
|
+
const _el$3 = $2e6ca552eb0e0b2b$var$_tmpl$2();
|
|
8032
|
+
$76EG6$insert(_el$3, title);
|
|
8033
|
+
return _el$3;
|
|
8034
|
+
})() : title, _el$2);
|
|
8035
|
+
return _el$;
|
|
8036
|
+
})());
|
|
8035
8037
|
};
|
|
8036
|
-
const $ad0b2591dac160be$
|
|
8037
|
-
viewBox
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
})]
|
|
8043
|
-
});
|
|
8044
|
-
const $ad0b2591dac160be$export$ddd70fdae1b350e6 = () => $0f650018c3cbc373$export$25062201e9e25d76("svg", {
|
|
8045
|
-
viewBox: "0 0 320 512",
|
|
8046
|
-
children: [$0f650018c3cbc373$export$34b9dba7ce09269b("desc", {
|
|
8047
|
-
children: "Left arrow"
|
|
8048
|
-
}), $0f650018c3cbc373$export$34b9dba7ce09269b("path", {
|
|
8049
|
-
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"
|
|
8050
|
-
})]
|
|
8051
|
-
});
|
|
8052
|
-
|
|
8038
|
+
const $ad0b2591dac160be$var$_tmpl$ = /*#__PURE__*/$76EG6$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">`),
|
|
8039
|
+
$ad0b2591dac160be$var$_tmpl$2 = /*#__PURE__*/$76EG6$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">`);
|
|
8040
|
+
const $ad0b2591dac160be$export$32a55d57d151bc5a = () => $ad0b2591dac160be$var$_tmpl$();
|
|
8041
|
+
const $ad0b2591dac160be$export$ddd70fdae1b350e6 = () => $ad0b2591dac160be$var$_tmpl$2();
|
|
8042
|
+
const $9a74c17d1ef21fdf$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
|
|
8043
|
+
$9a74c17d1ef21fdf$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=color-picker role=form aria-label="Color picker">`);
|
|
8053
8044
|
/**
|
|
8054
8045
|
* Internal color circle used in ColorPicker
|
|
8055
8046
|
* @see {createColorPicker}
|
|
@@ -8060,19 +8051,26 @@ function $9a74c17d1ef21fdf$var$ColorCircle(_ref) {
|
|
|
8060
8051
|
onClick: onClick,
|
|
8061
8052
|
onHoverUpdate: onHoverUpdate
|
|
8062
8053
|
} = _ref;
|
|
8063
|
-
const button =
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8054
|
+
const button = (() => {
|
|
8055
|
+
const _el$ = $9a74c17d1ef21fdf$var$_tmpl$(),
|
|
8056
|
+
_el$2 = _el$.firstChild,
|
|
8057
|
+
_el$3 = _el$2.firstChild;
|
|
8058
|
+
_el$.$$click = e => onClick(e.currentTarget, color);
|
|
8059
|
+
$76EG6$effect(_p$ => {
|
|
8060
|
+
const _v$ = color.label || "",
|
|
8061
|
+
_v$2 = "border-color: ".concat(color.value, ";"),
|
|
8062
|
+
_v$3 = "background-color: ".concat(color.value, ";");
|
|
8063
|
+
_v$ !== _p$._v$ && $76EG6$setAttribute(_el$, "title", _p$._v$ = _v$);
|
|
8064
|
+
_p$._v$2 = $76EG6$style(_el$2, _v$2, _p$._v$2);
|
|
8065
|
+
_p$._v$3 = $76EG6$style(_el$3, _v$3, _p$._v$3);
|
|
8066
|
+
return _p$;
|
|
8067
|
+
}, {
|
|
8068
|
+
_v$: undefined,
|
|
8069
|
+
_v$2: undefined,
|
|
8070
|
+
_v$3: undefined
|
|
8071
|
+
});
|
|
8072
|
+
return _el$;
|
|
8073
|
+
})();
|
|
8076
8074
|
button.addEventListener("mouseenter", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
|
|
8077
8075
|
button.addEventListener("mouseleave", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, false)));
|
|
8078
8076
|
return button;
|
|
@@ -8131,7 +8129,7 @@ function $9a74c17d1ef21fdf$export$590326cc34f49e2d(_ref2) {
|
|
|
8131
8129
|
if (selectOnHover) handleSelectOnHover(hovered, color, hovering);
|
|
8132
8130
|
};
|
|
8133
8131
|
// Create the color circles
|
|
8134
|
-
const circles = colors.map(color => $
|
|
8132
|
+
const circles = colors.map(color => $76EG6$createComponent($9a74c17d1ef21fdf$var$ColorCircle, {
|
|
8135
8133
|
color: color,
|
|
8136
8134
|
onClick: handleClick,
|
|
8137
8135
|
onHoverUpdate: handleHoverUpdate
|
|
@@ -8142,15 +8140,17 @@ function $9a74c17d1ef21fdf$export$590326cc34f49e2d(_ref2) {
|
|
|
8142
8140
|
const initial_index = initialColor == undefined ? -1 : colors.findIndex(c => typeof initialColor === "string" ? c.value === initialColor : c.value === initialColor.value && c.label === initialColor.label);
|
|
8143
8141
|
if (initial_index > -1) setActiveIndex(initial_index);
|
|
8144
8142
|
if (onlyCircles) return circles;
|
|
8145
|
-
return
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
});
|
|
8143
|
+
return (() => {
|
|
8144
|
+
const _el$4 = $9a74c17d1ef21fdf$var$_tmpl$2();
|
|
8145
|
+
$76EG6$insert(_el$4, circles);
|
|
8146
|
+
return _el$4;
|
|
8147
|
+
})();
|
|
8151
8148
|
}
|
|
8152
8149
|
};
|
|
8153
8150
|
}
|
|
8151
|
+
$76EG6$delegateEvents(["click"]);
|
|
8152
|
+
const $0f55c2bc0a7b363b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div>`),
|
|
8153
|
+
$0f55c2bc0a7b363b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div style=overflow:hidden;height:0px;visibility:hidden aria-hidden=true>`);
|
|
8154
8154
|
const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
8155
8155
|
let {
|
|
8156
8156
|
duration = 500,
|
|
@@ -8176,14 +8176,16 @@ const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
|
8176
8176
|
children: children
|
|
8177
8177
|
} = _ref;
|
|
8178
8178
|
if (Array.isArray(children) && children.length === 1) children = children[0];
|
|
8179
|
-
innerRef =
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8179
|
+
innerRef = (() => {
|
|
8180
|
+
const _el$ = $0f55c2bc0a7b363b$var$_tmpl$();
|
|
8181
|
+
$76EG6$insert(_el$, children);
|
|
8182
|
+
return _el$;
|
|
8183
|
+
})();
|
|
8184
|
+
outerRef = (() => {
|
|
8185
|
+
const _el$2 = $0f55c2bc0a7b363b$var$_tmpl$2();
|
|
8186
|
+
$76EG6$insert(_el$2, innerRef);
|
|
8187
|
+
return _el$2;
|
|
8188
|
+
})();
|
|
8187
8189
|
return outerRef;
|
|
8188
8190
|
};
|
|
8189
8191
|
const expand = $5e1f45affc1d7def$export$b3bbfd758f11cfa9(async function () {
|
|
@@ -8240,6 +8242,9 @@ const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
|
8240
8242
|
};
|
|
8241
8243
|
var $5305cfbbfffd9dc8$exports = {};
|
|
8242
8244
|
$5305cfbbfffd9dc8$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";
|
|
8245
|
+
const $9ef5ce4804a3b61b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<img>`),
|
|
8246
|
+
$9ef5ce4804a3b61b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<source sizes=0px>`),
|
|
8247
|
+
$9ef5ce4804a3b61b$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<picture>`);
|
|
8243
8248
|
const $9ef5ce4804a3b61b$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
8244
8249
|
const $9ef5ce4804a3b61b$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
8245
8250
|
function $9ef5ce4804a3b61b$export$f39a7d0667e924a(what_to_watch) {
|
|
@@ -8322,9 +8327,11 @@ function $9ef5ce4804a3b61b$export$a62825542f1bfcf5() {
|
|
|
8322
8327
|
if (!src) {
|
|
8323
8328
|
$241f2f02cc612a49$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
|
|
8324
8329
|
$b000f5ef6ce456d9$export$8048b892d651b310(new Error("no image src provided: " + src));
|
|
8325
|
-
return
|
|
8326
|
-
|
|
8327
|
-
|
|
8330
|
+
return (() => {
|
|
8331
|
+
const _el$ = $9ef5ce4804a3b61b$var$_tmpl$();
|
|
8332
|
+
$76EG6$spread(_el$, image_options, false, false);
|
|
8333
|
+
return _el$;
|
|
8334
|
+
})(); // we don't want everything to fail if someone misused this component
|
|
8328
8335
|
}
|
|
8329
8336
|
// Create an array of elements that will get their `sizes` attribute updated when what_to_watch resizes
|
|
8330
8337
|
const sources = [];
|
|
@@ -8333,35 +8340,38 @@ function $9ef5ce4804a3b61b$export$a62825542f1bfcf5() {
|
|
|
8333
8340
|
// Much faster than .map and this will run kinda often
|
|
8334
8341
|
const format = formats[i];
|
|
8335
8342
|
const srcset = $9ef5ce4804a3b61b$var$make_srcset(src, format, resolutions);
|
|
8336
|
-
sources.push(
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
type: "image/".concat(format),
|
|
8341
|
-
...(set_dataset ? {
|
|
8343
|
+
sources.push((() => {
|
|
8344
|
+
const _el$2 = $9ef5ce4804a3b61b$var$_tmpl$2();
|
|
8345
|
+
$76EG6$setAttribute(_el$2, "type", "image/".concat(format));
|
|
8346
|
+
$76EG6$spread(_el$2, set_dataset ? {
|
|
8342
8347
|
"data-srcset": srcset
|
|
8343
8348
|
} : {
|
|
8344
8349
|
srcset: srcset
|
|
8345
|
-
})
|
|
8346
|
-
|
|
8350
|
+
}, false, false);
|
|
8351
|
+
return _el$2;
|
|
8352
|
+
})());
|
|
8347
8353
|
}
|
|
8348
8354
|
const opts_without_src = {
|
|
8349
8355
|
...image_options
|
|
8350
8356
|
}; // Prevents the image from instantly loading the original source
|
|
8351
8357
|
delete opts_without_src["src"];
|
|
8352
8358
|
delete opts_without_src["srcset"];
|
|
8353
|
-
const the_image =
|
|
8354
|
-
|
|
8355
|
-
|
|
8359
|
+
const the_image = (() => {
|
|
8360
|
+
const _el$3 = $9ef5ce4804a3b61b$var$_tmpl$();
|
|
8361
|
+
$76EG6$spread(_el$3, opts_without_src, false, false);
|
|
8362
|
+
return _el$3;
|
|
8363
|
+
})(); // create image
|
|
8356
8364
|
sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
|
|
8357
8365
|
what_to_watch || (what_to_watch = the_image);
|
|
8358
8366
|
sizes_setter_ || (sizes_setter_ = $9ef5ce4804a3b61b$export$f39a7d0667e924a(what_to_watch, sizes_communicator, resolution_factor)); // now we can finally create the sizes_setter
|
|
8359
8367
|
// start a sizes_setter for every source (including fallback image)
|
|
8360
8368
|
for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $b000f5ef6ce456d9$export$8048b892d651b310));
|
|
8361
8369
|
// embed all sources into a <picture> so that the browser understands they're "together"
|
|
8362
|
-
const picture =
|
|
8363
|
-
|
|
8364
|
-
|
|
8370
|
+
const picture = (() => {
|
|
8371
|
+
const _el$4 = $9ef5ce4804a3b61b$var$_tmpl$3();
|
|
8372
|
+
$76EG6$insert(_el$4, sources);
|
|
8373
|
+
return _el$4;
|
|
8374
|
+
})();
|
|
8365
8375
|
// Create src and srcset for fallback image and set it.
|
|
8366
8376
|
// This is so that the browser doesn't start loading the fallback image for fun (chrome loads very eagerly)
|
|
8367
8377
|
const fallback_src = $9ef5ce4804a3b61b$var$optimized_img_url_generator("png", src, 400);
|
|
@@ -8391,6 +8401,9 @@ function $9ef5ce4804a3b61b$var$optimized_img_url_generator(format, url, width) {
|
|
|
8391
8401
|
// 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
|
|
8392
8402
|
return "".concat($9ef5ce4804a3b61b$export$3d13beba9b52c947, "?format=").concat(format, "&url=").concat(encodeURIComponent(url), "&width=").concat(width);
|
|
8393
8403
|
}
|
|
8404
|
+
const $c987460cedc0d7ec$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div>`),
|
|
8405
|
+
$c987460cedc0d7ec$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<canvas class=depict-img-filler height=3000>`),
|
|
8406
|
+
$c987460cedc0d7ec$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<div style=position:relative><div class=depict-img-cont>`);
|
|
8394
8407
|
const $c987460cedc0d7ec$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
|
|
8395
8408
|
// Add nolazy to placeholders to avoid errors with the stupid lazyfier
|
|
8396
8409
|
const $c987460cedc0d7ec$var$add_nolazy_to_placeholder = type => type === "placeholder" ? "nolazy" : "";
|
|
@@ -8422,21 +8435,22 @@ function $c987460cedc0d7ec$var$Image(_ref2) {
|
|
|
8422
8435
|
init_with_placeholder: _,
|
|
8423
8436
|
...image_options
|
|
8424
8437
|
} = _ref2;
|
|
8425
|
-
const div =
|
|
8426
|
-
|
|
8427
|
-
|
|
8438
|
+
const div = (() => {
|
|
8439
|
+
const _el$ = $c987460cedc0d7ec$var$_tmpl$();
|
|
8440
|
+
$76EG6$effect(_$p => $76EG6$style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%"), _$p));
|
|
8441
|
+
return _el$;
|
|
8442
|
+
})();
|
|
8428
8443
|
const sourceset_component = $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, div);
|
|
8429
8444
|
const IMG_tag = (_image_options$src = image_options.src) !== null && _image_options$src !== void 0 && _image_options$src.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
8430
|
-
div.append(
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
}));
|
|
8445
|
+
div.append($76EG6$createComponent(IMG_tag, $76EG6$mergeProps({
|
|
8446
|
+
alt: alt
|
|
8447
|
+
}, remove_on_error ? {
|
|
8448
|
+
onerror: "this.remove()"
|
|
8449
|
+
} : {}, image_options, {
|
|
8450
|
+
get ["class"]() {
|
|
8451
|
+
return $a285401a927e4306$export$22a65337c1b43b1f(["depict-img-mod ", image_options.class, $c987460cedc0d7ec$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
|
|
8452
|
+
}
|
|
8453
|
+
})));
|
|
8440
8454
|
return div;
|
|
8441
8455
|
}
|
|
8442
8456
|
function $c987460cedc0d7ec$var$CompatibleImage(_ref3) {
|
|
@@ -8449,27 +8463,28 @@ function $c987460cedc0d7ec$var$CompatibleImage(_ref3) {
|
|
|
8449
8463
|
srcset_opts: srcset_opts,
|
|
8450
8464
|
...image_options
|
|
8451
8465
|
} = _ref3;
|
|
8452
|
-
const canvas =
|
|
8453
|
-
|
|
8454
|
-
width
|
|
8455
|
-
|
|
8456
|
-
});
|
|
8466
|
+
const canvas = (() => {
|
|
8467
|
+
const _el$2 = $c987460cedc0d7ec$var$_tmpl$2();
|
|
8468
|
+
$76EG6$setAttribute(_el$2, "width", 3000 * aspect_ratio);
|
|
8469
|
+
return _el$2;
|
|
8470
|
+
})();
|
|
8457
8471
|
const sourceset_component = $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
|
|
8458
8472
|
const IMG_tag = (_image_options$src2 = image_options.src) !== null && _image_options$src2 !== void 0 && _image_options$src2.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
8459
|
-
return
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
+
return (() => {
|
|
8474
|
+
const _el$3 = $c987460cedc0d7ec$var$_tmpl$3(),
|
|
8475
|
+
_el$4 = _el$3.firstChild;
|
|
8476
|
+
$76EG6$insert(_el$4, $76EG6$createComponent(IMG_tag, $76EG6$mergeProps({
|
|
8477
|
+
alt: alt
|
|
8478
|
+
}, remove_on_error ? {
|
|
8479
|
+
onerror: "this.remove()"
|
|
8480
|
+
} : {}, image_options, {
|
|
8481
|
+
get ["class"]() {
|
|
8482
|
+
return $a285401a927e4306$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $c987460cedc0d7ec$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
|
|
8483
|
+
}
|
|
8484
|
+
})));
|
|
8485
|
+
$76EG6$insert(_el$3, canvas, null);
|
|
8486
|
+
return _el$3;
|
|
8487
|
+
})();
|
|
8473
8488
|
}
|
|
8474
8489
|
function $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
8475
8490
|
let srcset_opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -8491,7 +8506,8 @@ function $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8491
8506
|
}
|
|
8492
8507
|
var $8254bab8001eaa15$exports = {};
|
|
8493
8508
|
$8254bab8001eaa15$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";
|
|
8494
|
-
|
|
8509
|
+
const $73f0a7e385687d5d$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=images-container><div class=main-image-container>`),
|
|
8510
|
+
$73f0a7e385687d5d$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=second-image-container>`);
|
|
8495
8511
|
// Saving bytez
|
|
8496
8512
|
// Maybe? @Daniel
|
|
8497
8513
|
const $73f0a7e385687d5d$var$TOUCHSTART = "touchstart";
|
|
@@ -8637,16 +8653,17 @@ const $73f0a7e385687d5d$export$2369f6fc1c911576 = _ref => {
|
|
|
8637
8653
|
srcset_opts: second_srcset_opts || {}
|
|
8638
8654
|
});
|
|
8639
8655
|
const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
|
|
8640
|
-
const images_container =
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8656
|
+
const images_container = (() => {
|
|
8657
|
+
const _el$ = $73f0a7e385687d5d$var$_tmpl$(),
|
|
8658
|
+
_el$2 = _el$.firstChild;
|
|
8659
|
+
$76EG6$insert(_el$, !no_second_img && (() => {
|
|
8660
|
+
const _el$3 = $73f0a7e385687d5d$var$_tmpl$2();
|
|
8661
|
+
$76EG6$insert(_el$3, second_image);
|
|
8662
|
+
return _el$3;
|
|
8663
|
+
})(), _el$2);
|
|
8664
|
+
$76EG6$insert(_el$2, main_image);
|
|
8665
|
+
return _el$;
|
|
8666
|
+
})();
|
|
8650
8667
|
if (no_second_img) return images_container;
|
|
8651
8668
|
const hover_element = images_container;
|
|
8652
8669
|
const event_handler_mouse = _ref2 => {
|