@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/ES10/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var $bBfCy$solidjs = require("solid-js");
|
|
2
|
+
var $bBfCy$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
2
3
|
var $bBfCy$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
3
4
|
var $bBfCy$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
4
|
-
var $bBfCy$
|
|
5
|
+
var $bBfCy$solidjsweb = require("solid-js/web");
|
|
5
6
|
require("../multi_import_deduplicator.cjs").register_es_version("utilishared", "ES10");
|
|
6
7
|
function $parcel$exportWildcard(dest, source) {
|
|
7
8
|
Object.keys(source).forEach(function (key) {
|
|
@@ -273,7 +274,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
|
|
|
273
274
|
$parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
|
|
274
275
|
$parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
|
|
275
276
|
$parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
|
|
276
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.
|
|
277
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.3";
|
|
277
278
|
const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
|
|
278
279
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
279
280
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -332,6 +333,7 @@ class $1bf4c150117205e7$export$e2c811ae0eb35313 {
|
|
|
332
333
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "subscribers_", []);
|
|
333
334
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "waiting_for_update_", 0);
|
|
334
335
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "queue_", []);
|
|
336
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "last_processed_value_", void 0);
|
|
335
337
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "has_had_value_", false);
|
|
336
338
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "push_value_", value => {
|
|
337
339
|
this.queue_.push(value);
|
|
@@ -1006,6 +1008,7 @@ class $bd0a305620de4c2a$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
1006
1008
|
get: $bd0a305620de4c2a$var$_get_initial_reconnect_delay,
|
|
1007
1009
|
set: void 0
|
|
1008
1010
|
});
|
|
1011
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "current_socket", void 0);
|
|
1009
1012
|
$bd0a305620de4c2a$var$_classPrivateFieldInitSpec(this, $bd0a305620de4c2a$var$_ws_constructor_options, {
|
|
1010
1013
|
writable: true,
|
|
1011
1014
|
value: void 0
|
|
@@ -1018,6 +1021,7 @@ class $bd0a305620de4c2a$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
1018
1021
|
writable: true,
|
|
1019
1022
|
value: {}
|
|
1020
1023
|
});
|
|
1024
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "restart_ws", void 0);
|
|
1021
1025
|
$bd0a305620de4c2a$var$_classPrivateFieldInitSpec(this, $bd0a305620de4c2a$var$_try_again_in_ms, {
|
|
1022
1026
|
writable: true,
|
|
1023
1027
|
value: $parcel$interopDefault($bBfCy$babelruntimehelpersclassPrivateFieldGet)(this, $bd0a305620de4c2a$var$_initial_reconnect_delay)
|
|
@@ -4176,6 +4180,7 @@ class $bc463df3122a418b$export$3be7054c61590ee3 {
|
|
|
4176
4180
|
$bc463df3122a418b$var$_classPrivateMethodInitSpec(this, $bc463df3122a418b$var$_unload_images_and_add_load_listeners);
|
|
4177
4181
|
$bc463df3122a418b$var$_classPrivateMethodInitSpec(this, $bc463df3122a418b$var$_add_load_event_listener);
|
|
4178
4182
|
$bc463df3122a418b$var$_classPrivateMethodInitSpec(this, $bc463df3122a418b$var$_initiate_new_image);
|
|
4183
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "intersection_observer", void 0);
|
|
4179
4184
|
$bc463df3122a418b$var$_classPrivateFieldInitSpec(this, $bc463df3122a418b$var$_verbose, {
|
|
4180
4185
|
writable: true,
|
|
4181
4186
|
value: false
|
|
@@ -4394,59 +4399,10 @@ function $bc463df3122a418b$export$e4741190ccada479(element, selector) {
|
|
|
4394
4399
|
}
|
|
4395
4400
|
return result;
|
|
4396
4401
|
}
|
|
4397
|
-
const $
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
}
|
|
4402
|
-
const $51b78ec2cb40f07e$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
4403
|
-
const $f0d9ae7bf9bd697d$var$appendChild = (parent, child) => {
|
|
4404
|
-
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
4405
|
-
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
4406
|
-
if (child.length !== undefined)
|
|
4407
|
-
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
4408
|
-
for (let i = 0; i < child.length; i++) $f0d9ae7bf9bd697d$var$appendChild(parent, child[i]);else
|
|
4409
|
-
// fallback for things only implementing iterator interface
|
|
4410
|
-
for (const more_kids of child) $f0d9ae7bf9bd697d$var$appendChild(parent, more_kids);
|
|
4411
|
-
return;
|
|
4412
|
-
}
|
|
4413
|
-
parent.append(child);
|
|
4414
|
-
};
|
|
4415
|
-
const $f0d9ae7bf9bd697d$export$34b9dba7ce09269b = (tag, _ref, _unknown) => {
|
|
4416
|
-
let {
|
|
4417
|
-
children: children,
|
|
4418
|
-
...props
|
|
4419
|
-
} = _ref;
|
|
4420
|
-
if (typeof tag === "function") return tag({
|
|
4421
|
-
children: children,
|
|
4422
|
-
...props
|
|
4423
|
-
}, _unknown);
|
|
4424
|
-
// For partial SVG support
|
|
4425
|
-
// 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"]
|
|
4426
|
-
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";
|
|
4427
|
-
if (is_svg) var namespace = (props === null || props === void 0 ? void 0 : props.xmlns) || "http://www.w3.org/2000/svg";
|
|
4428
|
-
if (typeof document === "undefined") return {};
|
|
4429
|
-
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
4430
|
-
for (const key in props) {
|
|
4431
|
-
const value = props[key];
|
|
4432
|
-
if (key === "onClick") element.addEventListener("click", $3b52ccc10510b32a$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
4433
|
-
// https://stackoverflow.com/a/23142447
|
|
4434
|
-
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
4435
|
-
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]);
|
|
4436
|
-
}
|
|
4437
|
-
$f0d9ae7bf9bd697d$var$appendChild(element, children);
|
|
4438
|
-
return element;
|
|
4439
|
-
};
|
|
4440
|
-
const $f0d9ae7bf9bd697d$export$25062201e9e25d76 = $f0d9ae7bf9bd697d$export$34b9dba7ce09269b;
|
|
4441
|
-
const $f0d9ae7bf9bd697d$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
4442
|
-
let {
|
|
4443
|
-
children: children
|
|
4444
|
-
} = _ref2;
|
|
4445
|
-
if (typeof document === "undefined") return {};
|
|
4446
|
-
const df = document.createDocumentFragment();
|
|
4447
|
-
$f0d9ae7bf9bd697d$var$appendChild(df, children);
|
|
4448
|
-
return df;
|
|
4449
|
-
};
|
|
4402
|
+
const $08a94efe56c2b35f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class="depict-slider depict">`),
|
|
4403
|
+
$08a94efe56c2b35f$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=sliding>`),
|
|
4404
|
+
$08a94efe56c2b35f$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button aria-label="Scroll left"class="left d-navbutton"type=button>`),
|
|
4405
|
+
$08a94efe56c2b35f$var$_tmpl$4 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
|
|
4450
4406
|
function $08a94efe56c2b35f$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
4451
4407
|
$08a94efe56c2b35f$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
4452
4408
|
privateSet.add(obj);
|
|
@@ -4641,25 +4597,13 @@ class $08a94efe56c2b35f$export$692b27c28639e5b9 {
|
|
|
4641
4597
|
$08a94efe56c2b35f$var$_classPrivateMethodInitSpec(this, $08a94efe56c2b35f$var$_hide_buttons_if_needed);
|
|
4642
4598
|
$08a94efe56c2b35f$var$_classPrivateMethodInitSpec(this, $08a94efe56c2b35f$var$_observer_callback);
|
|
4643
4599
|
$08a94efe56c2b35f$var$_classPrivateMethodInitSpec(this, $08a94efe56c2b35f$var$_observe_element);
|
|
4644
|
-
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "container", $
|
|
4645
|
-
class: "depict-slider depict"
|
|
4646
|
-
}));
|
|
4600
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "container", $08a94efe56c2b35f$var$_tmpl$());
|
|
4647
4601
|
$08a94efe56c2b35f$var$_classPrivateFieldInitSpec(this, $08a94efe56c2b35f$var$_elements, {
|
|
4648
4602
|
writable: true,
|
|
4649
4603
|
value: {
|
|
4650
|
-
sliding_el_: $
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
left_: $f0d9ae7bf9bd697d$export$34b9dba7ce09269b("button", {
|
|
4654
|
-
"aria-label": "Scroll left",
|
|
4655
|
-
class: "left d-navbutton",
|
|
4656
|
-
type: "button"
|
|
4657
|
-
}),
|
|
4658
|
-
right_: $f0d9ae7bf9bd697d$export$34b9dba7ce09269b("button", {
|
|
4659
|
-
"aria-label": "Scroll right",
|
|
4660
|
-
class: "right d-navbutton",
|
|
4661
|
-
type: "button"
|
|
4662
|
-
})
|
|
4604
|
+
sliding_el_: $08a94efe56c2b35f$var$_tmpl$2(),
|
|
4605
|
+
left_: $08a94efe56c2b35f$var$_tmpl$3(),
|
|
4606
|
+
right_: $08a94efe56c2b35f$var$_tmpl$4()
|
|
4663
4607
|
}
|
|
4664
4608
|
});
|
|
4665
4609
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "insert_here", $parcel$interopDefault($bBfCy$babelruntimehelpersclassPrivateFieldGet)(this, $08a94efe56c2b35f$var$_elements).sliding_el_);
|
|
@@ -4673,6 +4617,7 @@ class $08a94efe56c2b35f$export$692b27c28639e5b9 {
|
|
|
4673
4617
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "dist_to_hide_right", 10);
|
|
4674
4618
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "center_target", false);
|
|
4675
4619
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "correct_bs_targets", true);
|
|
4620
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "snap_style", void 0);
|
|
4676
4621
|
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "on_elements_changed", [$08a94efe56c2b35f$var$_classPrivateMethodGet(this, $08a94efe56c2b35f$var$_observe_element, $08a94efe56c2b35f$var$_observe_element2)]);
|
|
4677
4622
|
$08a94efe56c2b35f$var$_classPrivateFieldInitSpec(this, $08a94efe56c2b35f$var$_index_cache, {
|
|
4678
4623
|
writable: true,
|
|
@@ -5189,6 +5134,9 @@ let $a782ed55f4206a68$var$pageview_sent = false;
|
|
|
5189
5134
|
var $a782ed55f4206a68$var$_dispatched_recs_inserted = /*#__PURE__*/new WeakMap();
|
|
5190
5135
|
class $a782ed55f4206a68$export$1a8782481a9af507 {
|
|
5191
5136
|
constructor(settings) {
|
|
5137
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "settings", void 0);
|
|
5138
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "data", void 0);
|
|
5139
|
+
$parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "tracker", void 0);
|
|
5192
5140
|
$a782ed55f4206a68$var$_classPrivateFieldInitSpec(this, $a782ed55f4206a68$var$_dispatched_recs_inserted, {
|
|
5193
5141
|
writable: true,
|
|
5194
5142
|
value: false
|
|
@@ -5230,6 +5178,7 @@ class $a782ed55f4206a68$export$1a8782481a9af507 {
|
|
|
5230
5178
|
}
|
|
5231
5179
|
trackGAEvent(action, index, product_id, ga_product_ids) {
|
|
5232
5180
|
if (this.settings.sendGa === false) return;
|
|
5181
|
+
// @ts-ignore
|
|
5233
5182
|
if (typeof ga !== "function") {
|
|
5234
5183
|
console.log("Could not send", action, "to GA. analytics.js not loaded.");
|
|
5235
5184
|
return;
|
|
@@ -5242,7 +5191,9 @@ class $a782ed55f4206a68$export$1a8782481a9af507 {
|
|
|
5242
5191
|
list_name: "depict_" + this.settings.type
|
|
5243
5192
|
});
|
|
5244
5193
|
}
|
|
5245
|
-
if (this.tracker === undefined)
|
|
5194
|
+
if (this.tracker === undefined)
|
|
5195
|
+
// @ts-ignore
|
|
5196
|
+
this.tracker = ga("create", this.settings.gaid, "auto", "depict");
|
|
5246
5197
|
$99b61a0622560fcf$export$f75172d2e289cd02(action);
|
|
5247
5198
|
}
|
|
5248
5199
|
trackPageView() {
|
|
@@ -5513,6 +5464,7 @@ async function $bbf8331c74194de9$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
5513
5464
|
elements: container ? container : [slider.container]
|
|
5514
5465
|
};
|
|
5515
5466
|
}
|
|
5467
|
+
const $14c1124272475590$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button class=load_more>`);
|
|
5516
5468
|
async function $14c1124272475590$export$30933c637c977eef(_ref) {
|
|
5517
5469
|
var _template_tool$data;
|
|
5518
5470
|
let {
|
|
@@ -5656,10 +5608,11 @@ function $14c1124272475590$var$setup_load_more(t, root, chunk_size) {
|
|
|
5656
5608
|
catchify: catchify
|
|
5657
5609
|
} = t,
|
|
5658
5610
|
load_more_cont = $8b27923e1d1e6b99$export$d3e2a0560cbf4787('<div class="load-more-container"></div>'),
|
|
5659
|
-
load_button = load_more_cont.appendChild(
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5611
|
+
load_button = load_more_cont.appendChild((() => {
|
|
5612
|
+
const _el$ = $14c1124272475590$var$_tmpl$();
|
|
5613
|
+
$bBfCy$solidjsweb.insert(_el$, view_more_text);
|
|
5614
|
+
return _el$;
|
|
5615
|
+
})());
|
|
5663
5616
|
load_button.addEventListener("click", catchify(load_more_recs_and_hide_button_if_needed));
|
|
5664
5617
|
root.after(load_more_cont);
|
|
5665
5618
|
load_more_recs_and_hide_button_if_needed();
|
|
@@ -5757,24 +5710,63 @@ async function $a68e8b02bee90bb2$var$send_sentry_422(response, body, stack) {
|
|
|
5757
5710
|
this.captureException(new Error(msg));
|
|
5758
5711
|
});
|
|
5759
5712
|
}
|
|
5760
|
-
const $
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
}
|
|
5713
|
+
const $51b78ec2cb40f07e$export$eb0b9ed911409b57 = (callback, element) => ($3b52ccc10510b32a$export$b3bbfd758f11cfa9(callback)(element), element);
|
|
5714
|
+
function $51b78ec2cb40f07e$export$f63fcc839cb0f734(event, handler, element) {
|
|
5715
|
+
element.addEventListener(event, $3b52ccc10510b32a$export$b3bbfd758f11cfa9(handler));
|
|
5716
|
+
return element;
|
|
5717
|
+
}
|
|
5718
|
+
const $51b78ec2cb40f07e$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
5719
|
+
const $f0d9ae7bf9bd697d$var$appendChild = (parent, child) => {
|
|
5720
|
+
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
5721
|
+
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
5722
|
+
if (child.length !== undefined)
|
|
5723
|
+
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
5724
|
+
for (let i = 0; i < child.length; i++) $f0d9ae7bf9bd697d$var$appendChild(parent, child[i]);else
|
|
5725
|
+
// fallback for things only implementing iterator interface
|
|
5726
|
+
for (const more_kids of child) $f0d9ae7bf9bd697d$var$appendChild(parent, more_kids);
|
|
5727
|
+
return;
|
|
5728
|
+
}
|
|
5729
|
+
parent.append(child);
|
|
5730
|
+
};
|
|
5731
|
+
const $f0d9ae7bf9bd697d$export$34b9dba7ce09269b = (tag, _ref, _unknown) => {
|
|
5732
|
+
let {
|
|
5733
|
+
children: children,
|
|
5734
|
+
...props
|
|
5735
|
+
} = _ref;
|
|
5736
|
+
if (typeof tag === "function") return tag({
|
|
5737
|
+
children: children,
|
|
5738
|
+
...props
|
|
5739
|
+
}, _unknown);
|
|
5740
|
+
// For partial SVG support
|
|
5741
|
+
// 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"]
|
|
5742
|
+
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";
|
|
5743
|
+
if (is_svg) var namespace = (props === null || props === void 0 ? void 0 : props.xmlns) || "http://www.w3.org/2000/svg";
|
|
5744
|
+
if (typeof document === "undefined") return {};
|
|
5745
|
+
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
5746
|
+
for (const key in props) {
|
|
5747
|
+
const value = props[key];
|
|
5748
|
+
if (key === "onClick") element.addEventListener("click", $3b52ccc10510b32a$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
5749
|
+
// https://stackoverflow.com/a/23142447
|
|
5750
|
+
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
5751
|
+
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]);
|
|
5752
|
+
}
|
|
5753
|
+
$f0d9ae7bf9bd697d$var$appendChild(element, children);
|
|
5754
|
+
return element;
|
|
5755
|
+
};
|
|
5756
|
+
const $f0d9ae7bf9bd697d$export$25062201e9e25d76 = $f0d9ae7bf9bd697d$export$34b9dba7ce09269b;
|
|
5757
|
+
const $f0d9ae7bf9bd697d$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
5758
|
+
let {
|
|
5759
|
+
children: children
|
|
5760
|
+
} = _ref2;
|
|
5761
|
+
if (typeof document === "undefined") return {};
|
|
5762
|
+
const df = document.createDocumentFragment();
|
|
5763
|
+
$f0d9ae7bf9bd697d$var$appendChild(df, children);
|
|
5764
|
+
return df;
|
|
5765
|
+
};
|
|
5766
|
+
const $5638de1dd37b2d4d$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.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">`),
|
|
5767
|
+
$5638de1dd37b2d4d$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.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">`);
|
|
5768
|
+
const $5638de1dd37b2d4d$export$dc84183312f0c201 = /*@__PURE__*/(() => $5638de1dd37b2d4d$var$_tmpl$())();
|
|
5769
|
+
const $5638de1dd37b2d4d$export$6038895ac52bd044 = /*@__PURE__*/(() => $5638de1dd37b2d4d$var$_tmpl$2())();
|
|
5778
5770
|
const $591ebabd2d3823ef$export$68c017fd93791405 = function () {
|
|
5779
5771
|
let {
|
|
5780
5772
|
duration = 500
|
|
@@ -5812,6 +5804,8 @@ function $12a8c4258d1dd80f$export$f8913c8a18f7ca21(iterables) {
|
|
|
5812
5804
|
return ourselves;
|
|
5813
5805
|
}
|
|
5814
5806
|
let $0c2e69f971c62390$var$_Symbol$iterator, $0c2e69f971c62390$var$_Symbol$toPrimitive;
|
|
5807
|
+
const $0c2e69f971c62390$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<style type=text/css>`),
|
|
5808
|
+
$0c2e69f971c62390$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`);
|
|
5815
5809
|
const $0c2e69f971c62390$export$717f13d9ba00ca19 = (min, max) => "@media ".concat(min ? "(min-width:".concat(min, ")") : "").concat(min && max ? " and " : "").concat(max ? "(max-width:".concat(max, ")") : "");
|
|
5816
5810
|
async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
|
|
5817
5811
|
let {
|
|
@@ -5833,9 +5827,7 @@ async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
|
|
|
5833
5827
|
ipns: ipns
|
|
5834
5828
|
} = rows_or_empty_object;
|
|
5835
5829
|
const is_static = !ipns && !button;
|
|
5836
|
-
const our_style_el = $
|
|
5837
|
-
type: "text/css"
|
|
5838
|
-
});
|
|
5830
|
+
const our_style_el = $0c2e69f971c62390$var$_tmpl$();
|
|
5839
5831
|
const container_class = $a13f25507f352177$export$a6db784f019668ba();
|
|
5840
5832
|
const selector_beginning = ".depict .".concat(container_class, ">");
|
|
5841
5833
|
const el_count_ipns = $76a59c6ce18c8fd3$export$e806c6c1615a59ae();
|
|
@@ -5874,13 +5866,15 @@ async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
|
|
|
5874
5866
|
});
|
|
5875
5867
|
if (button) {
|
|
5876
5868
|
button_class = $a13f25507f352177$export$a6db784f019668ba();
|
|
5877
|
-
const button_container =
|
|
5878
|
-
|
|
5879
|
-
|
|
5869
|
+
const button_container = (() => {
|
|
5870
|
+
const _el$2 = $0c2e69f971c62390$var$_tmpl$2();
|
|
5871
|
+
$bBfCy$solidjsweb.className(_el$2, "load-more-container " + button_class);
|
|
5872
|
+
$bBfCy$solidjsweb.insert(_el$2, () => $51b78ec2cb40f07e$export$f63fcc839cb0f734("click", () => {
|
|
5880
5873
|
var _rows_or_empty_object;
|
|
5881
5874
|
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));
|
|
5882
|
-
}, button)
|
|
5883
|
-
|
|
5875
|
+
}, button));
|
|
5876
|
+
return _el$2;
|
|
5877
|
+
})();
|
|
5884
5878
|
container_element.after(button_container);
|
|
5885
5879
|
}
|
|
5886
5880
|
(0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).oncreation(container_element, async () => {
|
|
@@ -6181,15 +6175,15 @@ function $554d31c9eaabf6ae$export$80039a49055269fb() {
|
|
|
6181
6175
|
};
|
|
6182
6176
|
return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
|
|
6183
6177
|
}
|
|
6178
|
+
const $e193cbc89f3a1c6f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
|
|
6184
6179
|
function $e193cbc89f3a1c6f$export$af88b4929c2dc86() {
|
|
6185
|
-
const img = $
|
|
6186
|
-
src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+"
|
|
6187
|
-
});
|
|
6180
|
+
const img = $e193cbc89f3a1c6f$var$_tmpl$();
|
|
6188
6181
|
return {
|
|
6189
6182
|
left: [img],
|
|
6190
6183
|
right: [img.cloneNode()]
|
|
6191
6184
|
};
|
|
6192
6185
|
}
|
|
6186
|
+
const $6f926ca76dc3b69a$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
|
|
6193
6187
|
function $6f926ca76dc3b69a$export$1d17a045bcc711b1(_ref) {
|
|
6194
6188
|
let {
|
|
6195
6189
|
t: t,
|
|
@@ -6282,15 +6276,12 @@ function $6f926ca76dc3b69a$export$1d17a045bcc711b1(_ref) {
|
|
|
6282
6276
|
};
|
|
6283
6277
|
}
|
|
6284
6278
|
function $6f926ca76dc3b69a$export$a09282b33e69b43f(unique_name) {
|
|
6285
|
-
return
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
class: "checkmark"
|
|
6292
|
-
})]
|
|
6293
|
-
});
|
|
6279
|
+
return (() => {
|
|
6280
|
+
const _el$ = $6f926ca76dc3b69a$var$_tmpl$(),
|
|
6281
|
+
_el$2 = _el$.firstChild;
|
|
6282
|
+
$bBfCy$solidjsweb.setAttribute(_el$2, "name", "radio-".concat(unique_name));
|
|
6283
|
+
return _el$;
|
|
6284
|
+
})();
|
|
6294
6285
|
}
|
|
6295
6286
|
|
|
6296
6287
|
// // You need to do this on all elements you insert into the slider before you insert them:
|
|
@@ -6464,15 +6455,13 @@ function $e243e127ad19fbf8$export$5723caf9a8335aa6(_t) {
|
|
|
6464
6455
|
mutation_plugin: mutation_plugin
|
|
6465
6456
|
};
|
|
6466
6457
|
}
|
|
6458
|
+
const $c051348670fb93e1$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict_slider_scroll_bar>`),
|
|
6459
|
+
$c051348670fb93e1$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict_slider_scroll_container>`);
|
|
6467
6460
|
function $c051348670fb93e1$export$93223e488e7ee078(options) {
|
|
6468
6461
|
function constructor_plugin(_slider_options) {
|
|
6469
6462
|
var _options$scroll_bar_c, _options$scroll_conta;
|
|
6470
|
-
const scroll_bar = $
|
|
6471
|
-
|
|
6472
|
-
});
|
|
6473
|
-
const scroll_container = $f0d9ae7bf9bd697d$export$34b9dba7ce09269b("div", {
|
|
6474
|
-
class: "depict_slider_scroll_container"
|
|
6475
|
-
});
|
|
6463
|
+
const scroll_bar = $c051348670fb93e1$var$_tmpl$();
|
|
6464
|
+
const scroll_container = $c051348670fb93e1$var$_tmpl$2();
|
|
6476
6465
|
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);
|
|
6477
6466
|
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);
|
|
6478
6467
|
// Default styles always present
|
|
@@ -6499,6 +6488,7 @@ function $c051348670fb93e1$export$93223e488e7ee078(options) {
|
|
|
6499
6488
|
mutation_plugin: mutation_plugin
|
|
6500
6489
|
};
|
|
6501
6490
|
}
|
|
6491
|
+
const $d46a5140a5630463$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
|
|
6502
6492
|
function $d46a5140a5630463$export$b36d2489a5a16728(_t) {
|
|
6503
6493
|
let {
|
|
6504
6494
|
snapEvery: snapEvery,
|
|
@@ -6529,13 +6519,7 @@ function $d46a5140a5630463$export$b36d2489a5a16728(_t) {
|
|
|
6529
6519
|
}
|
|
6530
6520
|
async function $d46a5140a5630463$export$49b950309ab787ad() {
|
|
6531
6521
|
if ("scrollBehavior" in document.documentElement.style) return true;
|
|
6532
|
-
const test_div = $
|
|
6533
|
-
style: "position: absolute; width: 1em; overflow: scroll; scroll-snap-type: x mandatory;",
|
|
6534
|
-
children: $f0d9ae7bf9bd697d$export$34b9dba7ce09269b("div", {
|
|
6535
|
-
style: "scroll-snap-align: start; color: transparent;",
|
|
6536
|
-
children: "test"
|
|
6537
|
-
})
|
|
6538
|
-
});
|
|
6522
|
+
const test_div = $d46a5140a5630463$var$_tmpl$();
|
|
6539
6523
|
const body = await (0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
6540
6524
|
body.append(test_div);
|
|
6541
6525
|
test_div.scrollLeft = 1;
|
|
@@ -7101,10 +7085,12 @@ function $78fd85c1f4513422$export$1ac466d53a6636ac(t, input_id) {
|
|
|
7101
7085
|
function $138f1061348967b4$export$1ff14fec60ed5697(t, filter) {
|
|
7102
7086
|
try {
|
|
7103
7087
|
$f812c921818adbe0$export$674d8cd8b6868154();
|
|
7088
|
+
// @ts-ignore
|
|
7104
7089
|
ga($3b52ccc10510b32a$export$b3bbfd758f11cfa9(async function (tracker) {
|
|
7105
7090
|
var _window, _window$ga;
|
|
7106
7091
|
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
|
|
7107
7092
|
if (typeof get_all_function !== "function") get_all_function = await $6bf620c74776aef6$export$2fc1a072736ae2f6(window, "ga", "getAll");
|
|
7093
|
+
// @ts-ignore
|
|
7108
7094
|
const all_trackers = get_all_function.call(ga);
|
|
7109
7095
|
$7f95f77417d06249$export$de56f1198d121036("we have trackers", all_trackers);
|
|
7110
7096
|
// @ts-ignore
|
|
@@ -7129,7 +7115,9 @@ function $138f1061348967b4$export$1ff14fec60ed5697(t, filter) {
|
|
|
7129
7115
|
$3b52ccc10510b32a$export$f18d5b0af29128b7(error, "error");
|
|
7130
7116
|
}
|
|
7131
7117
|
}
|
|
7132
|
-
function $138f1061348967b4$var$make_tracker_send_to_depict(
|
|
7118
|
+
function $138f1061348967b4$var$make_tracker_send_to_depict(
|
|
7119
|
+
// @ts-ignore
|
|
7120
|
+
ga_tracker, t, filter) {
|
|
7133
7121
|
// Docs for analytics.js Tasks:
|
|
7134
7122
|
// https://developers.google.com/analytics/devguides/collection/analyticsjs/tasks
|
|
7135
7123
|
const sendHitTask = "sendHitTask";
|
|
@@ -8098,19 +8086,26 @@ const $eedabd28f7a8a073$var$get_voyado_id = () => {
|
|
|
8098
8086
|
const $eedabd28f7a8a073$export$a739d9a07da7f9ce = /*@__PURE__*/$3b52ccc10510b32a$export$b3bbfd758f11cfa9(() => {
|
|
8099
8087
|
$335c248bb07a3509$export$93ae15b1ae509334($eedabd28f7a8a073$var$get_voyado_id);
|
|
8100
8088
|
});
|
|
8089
|
+
const $102c3c26150518b7$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button>`);
|
|
8101
8090
|
function $102c3c26150518b7$export$4a3043e508dd72f0(_ref) {
|
|
8102
8091
|
let {
|
|
8103
8092
|
children: children,
|
|
8104
8093
|
...attributes
|
|
8105
8094
|
} = _ref;
|
|
8106
|
-
const button =
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8095
|
+
const button = (() => {
|
|
8096
|
+
const _el$ = $102c3c26150518b7$var$_tmpl$();
|
|
8097
|
+
$bBfCy$solidjsweb.spread(_el$, $bBfCy$solidjsweb.mergeProps(attributes, {
|
|
8098
|
+
"type": "button"
|
|
8099
|
+
}), false, true);
|
|
8100
|
+
$bBfCy$solidjsweb.insert(_el$, children);
|
|
8101
|
+
return _el$;
|
|
8102
|
+
})();
|
|
8111
8103
|
button.classList.add("show-more");
|
|
8112
8104
|
return button;
|
|
8113
8105
|
}
|
|
8106
|
+
const $b99c603a5341f0ae$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=slidein-backdrop>`),
|
|
8107
|
+
$b99c603a5341f0ae$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
|
|
8108
|
+
$b99c603a5341f0ae$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict>`);
|
|
8114
8109
|
async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
8115
8110
|
let {
|
|
8116
8111
|
title_: title_,
|
|
@@ -8121,33 +8116,31 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
8121
8116
|
let close_;
|
|
8122
8117
|
const open_promise = new Promise(r => close_ = r);
|
|
8123
8118
|
const body = await (0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
8124
|
-
const backdrop =
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8119
|
+
const backdrop = (() => {
|
|
8120
|
+
const _el$ = $b99c603a5341f0ae$var$_tmpl$();
|
|
8121
|
+
$bBfCy$solidjsweb.addEventListener(_el$, "click", close_, true);
|
|
8122
|
+
return _el$;
|
|
8123
|
+
})();
|
|
8128
8124
|
const [exit_title_iterator, exitable_title_iterator] = $c0c977a0f691adf3$export$927664b47117acb0(title_);
|
|
8129
8125
|
const closing_handlers = [exit_title_iterator];
|
|
8130
|
-
const slidein =
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
class: "depict",
|
|
8149
|
-
children: [backdrop, slidein]
|
|
8150
|
-
});
|
|
8126
|
+
const slidein = (() => {
|
|
8127
|
+
const _el$2 = $b99c603a5341f0ae$var$_tmpl$2(),
|
|
8128
|
+
_el$3 = _el$2.firstChild,
|
|
8129
|
+
_el$4 = _el$3.firstChild,
|
|
8130
|
+
_el$5 = _el$4.nextSibling,
|
|
8131
|
+
_el$6 = _el$3.nextSibling;
|
|
8132
|
+
$bBfCy$solidjsweb.insert(_el$4, () => $fbf41b4abc726dbe$export$7c081fdbc65b6a2a(exitable_title_iterator, false));
|
|
8133
|
+
$bBfCy$solidjsweb.addEventListener(_el$5, "click", close_, true);
|
|
8134
|
+
$bBfCy$solidjsweb.insert(_el$5, CloseIcon);
|
|
8135
|
+
$bBfCy$solidjsweb.insert(_el$6, children);
|
|
8136
|
+
return _el$2;
|
|
8137
|
+
})();
|
|
8138
|
+
const elements_in_container = (() => {
|
|
8139
|
+
const _el$7 = $b99c603a5341f0ae$var$_tmpl$3();
|
|
8140
|
+
$bBfCy$solidjsweb.insert(_el$7, backdrop, null);
|
|
8141
|
+
$bBfCy$solidjsweb.insert(_el$7, slidein, null);
|
|
8142
|
+
return _el$7;
|
|
8143
|
+
})();
|
|
8151
8144
|
body.append(elements_in_container);
|
|
8152
8145
|
backdrop.animate({
|
|
8153
8146
|
opacity: [0, 1]
|
|
@@ -8196,6 +8189,10 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
8196
8189
|
on_close_: fn => closing_handlers.push(fn)
|
|
8197
8190
|
};
|
|
8198
8191
|
}
|
|
8192
|
+
$bBfCy$solidjsweb.delegateEvents(["click"]);
|
|
8193
|
+
const $468dbae10b24d59f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=option-list>`),
|
|
8194
|
+
$468dbae10b24d59f$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button type=button><span class=size>`),
|
|
8195
|
+
$468dbae10b24d59f$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<span class=sold-out>`);
|
|
8199
8196
|
async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
8200
8197
|
let {
|
|
8201
8198
|
title_: title_,
|
|
@@ -8212,40 +8209,44 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8212
8209
|
} = await $b99c603a5341f0ae$export$8a0e4d6f6abf7e90({
|
|
8213
8210
|
CloseIcon: CloseIcon,
|
|
8214
8211
|
title_: title_,
|
|
8215
|
-
children: [
|
|
8216
|
-
|
|
8217
|
-
|
|
8212
|
+
children: [(() => {
|
|
8213
|
+
const _el$ = $468dbae10b24d59f$var$_tmpl$();
|
|
8214
|
+
$bBfCy$solidjsweb.insert(_el$, () => items_.map(_ref2 => {
|
|
8218
8215
|
let {
|
|
8219
8216
|
size_name_: size_name_,
|
|
8220
8217
|
is_available_: is_available_,
|
|
8221
8218
|
id_: id_
|
|
8222
8219
|
} = _ref2;
|
|
8223
|
-
const button =
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8220
|
+
const button = (() => {
|
|
8221
|
+
const _el$2 = $468dbae10b24d59f$var$_tmpl$2(),
|
|
8222
|
+
_el$3 = _el$2.firstChild;
|
|
8223
|
+
_el$2.$$click = () => {
|
|
8227
8224
|
size_selected(id_);
|
|
8228
8225
|
close_();
|
|
8229
|
-
}
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
})
|
|
8237
|
-
|
|
8226
|
+
};
|
|
8227
|
+
$bBfCy$solidjsweb.className(_el$2, "option" + (is_available_ ? " available" : ""));
|
|
8228
|
+
$bBfCy$solidjsweb.insert(_el$3, size_name_);
|
|
8229
|
+
$bBfCy$solidjsweb.insert(_el$2, !is_available_ && (() => {
|
|
8230
|
+
const _el$4 = $468dbae10b24d59f$var$_tmpl$3();
|
|
8231
|
+
$bBfCy$solidjsweb.insert(_el$4, () => $fbf41b4abc726dbe$export$7c081fdbc65b6a2a(exitable_oos_iterator));
|
|
8232
|
+
return _el$4;
|
|
8233
|
+
})(), null);
|
|
8234
|
+
return _el$2;
|
|
8235
|
+
})();
|
|
8238
8236
|
if (!is_available_) button.disabled = true;
|
|
8239
8237
|
return button;
|
|
8240
|
-
})
|
|
8241
|
-
|
|
8238
|
+
}));
|
|
8239
|
+
return _el$;
|
|
8240
|
+
})()]
|
|
8242
8241
|
});
|
|
8243
8242
|
on_close_(size_selected);
|
|
8244
8243
|
on_close_(exit_oos_iterator);
|
|
8245
8244
|
}));
|
|
8246
8245
|
}
|
|
8246
|
+
$bBfCy$solidjsweb.delegateEvents(["click"]);
|
|
8247
8247
|
var $6c1103c313edcc81$exports = {};
|
|
8248
8248
|
$6c1103c313edcc81$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
8249
|
+
const $ba9b4cd7e24de87e$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`);
|
|
8249
8250
|
let $ba9b4cd7e24de87e$var$inserted = false;
|
|
8250
8251
|
const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
8251
8252
|
let {
|
|
@@ -8260,54 +8261,44 @@ const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
|
8260
8261
|
$e45474c7d6e21cfa$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($6c1103c313edcc81$exports)));
|
|
8261
8262
|
$ba9b4cd7e24de87e$var$inserted = true;
|
|
8262
8263
|
}
|
|
8263
|
-
return (
|
|
8264
|
-
|
|
8265
|
-
$
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
);
|
|
8264
|
+
return (() => {
|
|
8265
|
+
const _el$ = $ba9b4cd7e24de87e$var$_tmpl$();
|
|
8266
|
+
$bBfCy$solidjsweb.className(_el$, "depict-placeholder".concat(extra_classes ? " " + extra_classes : ""));
|
|
8267
|
+
$bBfCy$solidjsweb.spread(_el$, attributes, false, false);
|
|
8268
|
+
$bBfCy$solidjsweb.effect(_$p => $bBfCy$solidjsweb.style(_el$, style ? style : "width:".concat(width, ";height:").concat(height, ";"), _$p));
|
|
8269
|
+
return _el$;
|
|
8270
|
+
})();
|
|
8271
8271
|
};
|
|
8272
8272
|
const $ba9b4cd7e24de87e$export$d613f5b6d0a331a8 = _ref2 => {
|
|
8273
8273
|
let {
|
|
8274
8274
|
aspect_ratio: aspect_ratio,
|
|
8275
8275
|
...attributes
|
|
8276
8276
|
} = _ref2;
|
|
8277
|
-
return $
|
|
8278
|
-
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8279
|
-
|
|
8280
|
-
});
|
|
8277
|
+
return $bBfCy$solidjsweb.createComponent($ba9b4cd7e24de87e$export$84712d0562a614b8, $bBfCy$solidjsweb.mergeProps({
|
|
8278
|
+
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8279
|
+
}, attributes));
|
|
8281
8280
|
};
|
|
8281
|
+
const $d500491aef2925c7$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class="depict recommendation_container"><div class=grid>`),
|
|
8282
|
+
$d500491aef2925c7$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<h4 class=recs_header>`);
|
|
8282
8283
|
const $d500491aef2925c7$export$97f31f44c68c1d5 = function (title) {
|
|
8283
8284
|
let surface_classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
8284
|
-
return $51b78ec2cb40f07e$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes),
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
})
|
|
8292
|
-
|
|
8285
|
+
return $51b78ec2cb40f07e$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
|
|
8286
|
+
const _el$ = $d500491aef2925c7$var$_tmpl$(),
|
|
8287
|
+
_el$2 = _el$.firstChild;
|
|
8288
|
+
$bBfCy$solidjsweb.insert(_el$, title && typeof title === "string" ? (() => {
|
|
8289
|
+
const _el$3 = $d500491aef2925c7$var$_tmpl$2();
|
|
8290
|
+
$bBfCy$solidjsweb.insert(_el$3, title);
|
|
8291
|
+
return _el$3;
|
|
8292
|
+
})() : title, _el$2);
|
|
8293
|
+
return _el$;
|
|
8294
|
+
})());
|
|
8293
8295
|
};
|
|
8294
|
-
const $98ca99ff2fa5a542$
|
|
8295
|
-
viewBox
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
})]
|
|
8301
|
-
});
|
|
8302
|
-
const $98ca99ff2fa5a542$export$ddd70fdae1b350e6 = () => $f0d9ae7bf9bd697d$export$25062201e9e25d76("svg", {
|
|
8303
|
-
viewBox: "0 0 320 512",
|
|
8304
|
-
children: [$f0d9ae7bf9bd697d$export$34b9dba7ce09269b("desc", {
|
|
8305
|
-
children: "Left arrow"
|
|
8306
|
-
}), $f0d9ae7bf9bd697d$export$34b9dba7ce09269b("path", {
|
|
8307
|
-
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"
|
|
8308
|
-
})]
|
|
8309
|
-
});
|
|
8310
|
-
|
|
8296
|
+
const $98ca99ff2fa5a542$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.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">`),
|
|
8297
|
+
$98ca99ff2fa5a542$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.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">`);
|
|
8298
|
+
const $98ca99ff2fa5a542$export$32a55d57d151bc5a = () => $98ca99ff2fa5a542$var$_tmpl$();
|
|
8299
|
+
const $98ca99ff2fa5a542$export$ddd70fdae1b350e6 = () => $98ca99ff2fa5a542$var$_tmpl$2();
|
|
8300
|
+
const $57a111eb846a8d6a$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
|
|
8301
|
+
$57a111eb846a8d6a$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=color-picker role=form aria-label="Color picker">`);
|
|
8311
8302
|
/**
|
|
8312
8303
|
* Internal color circle used in ColorPicker
|
|
8313
8304
|
* @see {createColorPicker}
|
|
@@ -8318,19 +8309,26 @@ function $57a111eb846a8d6a$var$ColorCircle(_ref) {
|
|
|
8318
8309
|
onClick: onClick,
|
|
8319
8310
|
onHoverUpdate: onHoverUpdate
|
|
8320
8311
|
} = _ref;
|
|
8321
|
-
const button =
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8312
|
+
const button = (() => {
|
|
8313
|
+
const _el$ = $57a111eb846a8d6a$var$_tmpl$(),
|
|
8314
|
+
_el$2 = _el$.firstChild,
|
|
8315
|
+
_el$3 = _el$2.firstChild;
|
|
8316
|
+
_el$.$$click = e => onClick(e.currentTarget, color);
|
|
8317
|
+
$bBfCy$solidjsweb.effect(_p$ => {
|
|
8318
|
+
const _v$ = color.label || "",
|
|
8319
|
+
_v$2 = "border-color: ".concat(color.value, ";"),
|
|
8320
|
+
_v$3 = "background-color: ".concat(color.value, ";");
|
|
8321
|
+
_v$ !== _p$._v$ && $bBfCy$solidjsweb.setAttribute(_el$, "title", _p$._v$ = _v$);
|
|
8322
|
+
_p$._v$2 = $bBfCy$solidjsweb.style(_el$2, _v$2, _p$._v$2);
|
|
8323
|
+
_p$._v$3 = $bBfCy$solidjsweb.style(_el$3, _v$3, _p$._v$3);
|
|
8324
|
+
return _p$;
|
|
8325
|
+
}, {
|
|
8326
|
+
_v$: undefined,
|
|
8327
|
+
_v$2: undefined,
|
|
8328
|
+
_v$3: undefined
|
|
8329
|
+
});
|
|
8330
|
+
return _el$;
|
|
8331
|
+
})();
|
|
8334
8332
|
button.addEventListener("mouseenter", $3b52ccc10510b32a$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
|
|
8335
8333
|
button.addEventListener("mouseleave", $3b52ccc10510b32a$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, false)));
|
|
8336
8334
|
return button;
|
|
@@ -8389,7 +8387,7 @@ function $57a111eb846a8d6a$export$590326cc34f49e2d(_ref2) {
|
|
|
8389
8387
|
if (selectOnHover) handleSelectOnHover(hovered, color, hovering);
|
|
8390
8388
|
};
|
|
8391
8389
|
// Create the color circles
|
|
8392
|
-
const circles = colors.map(color => $
|
|
8390
|
+
const circles = colors.map(color => $bBfCy$solidjsweb.createComponent($57a111eb846a8d6a$var$ColorCircle, {
|
|
8393
8391
|
color: color,
|
|
8394
8392
|
onClick: handleClick,
|
|
8395
8393
|
onHoverUpdate: handleHoverUpdate
|
|
@@ -8400,15 +8398,17 @@ function $57a111eb846a8d6a$export$590326cc34f49e2d(_ref2) {
|
|
|
8400
8398
|
const initial_index = initialColor == undefined ? -1 : colors.findIndex(c => typeof initialColor === "string" ? c.value === initialColor : c.value === initialColor.value && c.label === initialColor.label);
|
|
8401
8399
|
if (initial_index > -1) setActiveIndex(initial_index);
|
|
8402
8400
|
if (onlyCircles) return circles;
|
|
8403
|
-
return
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
});
|
|
8401
|
+
return (() => {
|
|
8402
|
+
const _el$4 = $57a111eb846a8d6a$var$_tmpl$2();
|
|
8403
|
+
$bBfCy$solidjsweb.insert(_el$4, circles);
|
|
8404
|
+
return _el$4;
|
|
8405
|
+
})();
|
|
8409
8406
|
}
|
|
8410
8407
|
};
|
|
8411
8408
|
}
|
|
8409
|
+
$bBfCy$solidjsweb.delegateEvents(["click"]);
|
|
8410
|
+
const $151f8676c5d42e80$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`),
|
|
8411
|
+
$151f8676c5d42e80$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style=overflow:hidden;height:0px;visibility:hidden aria-hidden=true>`);
|
|
8412
8412
|
const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
8413
8413
|
let {
|
|
8414
8414
|
duration = 500,
|
|
@@ -8434,14 +8434,16 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
|
8434
8434
|
children: children
|
|
8435
8435
|
} = _ref;
|
|
8436
8436
|
if (Array.isArray(children) && children.length === 1) children = children[0];
|
|
8437
|
-
innerRef =
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8437
|
+
innerRef = (() => {
|
|
8438
|
+
const _el$ = $151f8676c5d42e80$var$_tmpl$();
|
|
8439
|
+
$bBfCy$solidjsweb.insert(_el$, children);
|
|
8440
|
+
return _el$;
|
|
8441
|
+
})();
|
|
8442
|
+
outerRef = (() => {
|
|
8443
|
+
const _el$2 = $151f8676c5d42e80$var$_tmpl$2();
|
|
8444
|
+
$bBfCy$solidjsweb.insert(_el$2, innerRef);
|
|
8445
|
+
return _el$2;
|
|
8446
|
+
})();
|
|
8445
8447
|
return outerRef;
|
|
8446
8448
|
};
|
|
8447
8449
|
const expand = $3b52ccc10510b32a$export$b3bbfd758f11cfa9(async function () {
|
|
@@ -8498,6 +8500,9 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
|
8498
8500
|
};
|
|
8499
8501
|
var $4f104a7ebe4cdc54$exports = {};
|
|
8500
8502
|
$4f104a7ebe4cdc54$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n";
|
|
8503
|
+
const $b42b9f62e8b6cb2d$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<img>`),
|
|
8504
|
+
$b42b9f62e8b6cb2d$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<source sizes=0px>`),
|
|
8505
|
+
$b42b9f62e8b6cb2d$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<picture>`);
|
|
8501
8506
|
const $b42b9f62e8b6cb2d$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
8502
8507
|
const $b42b9f62e8b6cb2d$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
8503
8508
|
function $b42b9f62e8b6cb2d$export$f39a7d0667e924a(what_to_watch) {
|
|
@@ -8580,9 +8585,11 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
|
|
|
8580
8585
|
if (!src) {
|
|
8581
8586
|
$7f95f77417d06249$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
|
|
8582
8587
|
$46b94b232dc792af$export$8048b892d651b310(new Error("no image src provided: " + src));
|
|
8583
|
-
return
|
|
8584
|
-
|
|
8585
|
-
|
|
8588
|
+
return (() => {
|
|
8589
|
+
const _el$ = $b42b9f62e8b6cb2d$var$_tmpl$();
|
|
8590
|
+
$bBfCy$solidjsweb.spread(_el$, image_options, false, false);
|
|
8591
|
+
return _el$;
|
|
8592
|
+
})(); // we don't want everything to fail if someone misused this component
|
|
8586
8593
|
}
|
|
8587
8594
|
// Create an array of elements that will get their `sizes` attribute updated when what_to_watch resizes
|
|
8588
8595
|
const sources = [];
|
|
@@ -8591,35 +8598,38 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
|
|
|
8591
8598
|
// Much faster than .map and this will run kinda often
|
|
8592
8599
|
const format = formats[i];
|
|
8593
8600
|
const srcset = $b42b9f62e8b6cb2d$var$make_srcset(src, format, resolutions);
|
|
8594
|
-
sources.push(
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
type: "image/".concat(format),
|
|
8599
|
-
...(set_dataset ? {
|
|
8601
|
+
sources.push((() => {
|
|
8602
|
+
const _el$2 = $b42b9f62e8b6cb2d$var$_tmpl$2();
|
|
8603
|
+
$bBfCy$solidjsweb.setAttribute(_el$2, "type", "image/".concat(format));
|
|
8604
|
+
$bBfCy$solidjsweb.spread(_el$2, set_dataset ? {
|
|
8600
8605
|
"data-srcset": srcset
|
|
8601
8606
|
} : {
|
|
8602
8607
|
srcset: srcset
|
|
8603
|
-
})
|
|
8604
|
-
|
|
8608
|
+
}, false, false);
|
|
8609
|
+
return _el$2;
|
|
8610
|
+
})());
|
|
8605
8611
|
}
|
|
8606
8612
|
const opts_without_src = {
|
|
8607
8613
|
...image_options
|
|
8608
8614
|
}; // Prevents the image from instantly loading the original source
|
|
8609
8615
|
delete opts_without_src["src"];
|
|
8610
8616
|
delete opts_without_src["srcset"];
|
|
8611
|
-
const the_image =
|
|
8612
|
-
|
|
8613
|
-
|
|
8617
|
+
const the_image = (() => {
|
|
8618
|
+
const _el$3 = $b42b9f62e8b6cb2d$var$_tmpl$();
|
|
8619
|
+
$bBfCy$solidjsweb.spread(_el$3, opts_without_src, false, false);
|
|
8620
|
+
return _el$3;
|
|
8621
|
+
})(); // create image
|
|
8614
8622
|
sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
|
|
8615
8623
|
what_to_watch || (what_to_watch = the_image);
|
|
8616
8624
|
sizes_setter_ || (sizes_setter_ = $b42b9f62e8b6cb2d$export$f39a7d0667e924a(what_to_watch, sizes_communicator, resolution_factor)); // now we can finally create the sizes_setter
|
|
8617
8625
|
// start a sizes_setter for every source (including fallback image)
|
|
8618
8626
|
for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $46b94b232dc792af$export$8048b892d651b310));
|
|
8619
8627
|
// embed all sources into a <picture> so that the browser understands they're "together"
|
|
8620
|
-
const picture =
|
|
8621
|
-
|
|
8622
|
-
|
|
8628
|
+
const picture = (() => {
|
|
8629
|
+
const _el$4 = $b42b9f62e8b6cb2d$var$_tmpl$3();
|
|
8630
|
+
$bBfCy$solidjsweb.insert(_el$4, sources);
|
|
8631
|
+
return _el$4;
|
|
8632
|
+
})();
|
|
8623
8633
|
// Create src and srcset for fallback image and set it.
|
|
8624
8634
|
// This is so that the browser doesn't start loading the fallback image for fun (chrome loads very eagerly)
|
|
8625
8635
|
const fallback_src = $b42b9f62e8b6cb2d$var$optimized_img_url_generator("png", src, 400);
|
|
@@ -8649,6 +8659,9 @@ function $b42b9f62e8b6cb2d$var$optimized_img_url_generator(format, url, width) {
|
|
|
8649
8659
|
// 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
|
|
8650
8660
|
return "".concat($b42b9f62e8b6cb2d$export$3d13beba9b52c947, "?format=").concat(format, "&url=").concat(encodeURIComponent(url), "&width=").concat(width);
|
|
8651
8661
|
}
|
|
8662
|
+
const $dfce76a4aeb41067$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`),
|
|
8663
|
+
$dfce76a4aeb41067$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<canvas class=depict-img-filler height=3000>`),
|
|
8664
|
+
$dfce76a4aeb41067$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont>`);
|
|
8652
8665
|
const $dfce76a4aeb41067$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
|
|
8653
8666
|
// Add nolazy to placeholders to avoid errors with the stupid lazyfier
|
|
8654
8667
|
const $dfce76a4aeb41067$var$add_nolazy_to_placeholder = type => type === "placeholder" ? "nolazy" : "";
|
|
@@ -8680,21 +8693,22 @@ function $dfce76a4aeb41067$var$Image(_ref2) {
|
|
|
8680
8693
|
init_with_placeholder: _,
|
|
8681
8694
|
...image_options
|
|
8682
8695
|
} = _ref2;
|
|
8683
|
-
const div =
|
|
8684
|
-
|
|
8685
|
-
|
|
8696
|
+
const div = (() => {
|
|
8697
|
+
const _el$ = $dfce76a4aeb41067$var$_tmpl$();
|
|
8698
|
+
$bBfCy$solidjsweb.effect(_$p => $bBfCy$solidjsweb.style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%"), _$p));
|
|
8699
|
+
return _el$;
|
|
8700
|
+
})();
|
|
8686
8701
|
const sourceset_component = $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, div);
|
|
8687
8702
|
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;
|
|
8688
|
-
div.append(
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
}));
|
|
8703
|
+
div.append($bBfCy$solidjsweb.createComponent(IMG_tag, $bBfCy$solidjsweb.mergeProps({
|
|
8704
|
+
alt: alt
|
|
8705
|
+
}, remove_on_error ? {
|
|
8706
|
+
onerror: "this.remove()"
|
|
8707
|
+
} : {}, image_options, {
|
|
8708
|
+
get ["class"]() {
|
|
8709
|
+
return $51b78ec2cb40f07e$export$22a65337c1b43b1f(["depict-img-mod ", image_options.class, $dfce76a4aeb41067$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
|
|
8710
|
+
}
|
|
8711
|
+
})));
|
|
8698
8712
|
return div;
|
|
8699
8713
|
}
|
|
8700
8714
|
function $dfce76a4aeb41067$var$CompatibleImage(_ref3) {
|
|
@@ -8707,27 +8721,28 @@ function $dfce76a4aeb41067$var$CompatibleImage(_ref3) {
|
|
|
8707
8721
|
srcset_opts: srcset_opts,
|
|
8708
8722
|
...image_options
|
|
8709
8723
|
} = _ref3;
|
|
8710
|
-
const canvas =
|
|
8711
|
-
|
|
8712
|
-
width
|
|
8713
|
-
|
|
8714
|
-
});
|
|
8724
|
+
const canvas = (() => {
|
|
8725
|
+
const _el$2 = $dfce76a4aeb41067$var$_tmpl$2();
|
|
8726
|
+
$bBfCy$solidjsweb.setAttribute(_el$2, "width", 3000 * aspect_ratio);
|
|
8727
|
+
return _el$2;
|
|
8728
|
+
})();
|
|
8715
8729
|
const sourceset_component = $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
|
|
8716
8730
|
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;
|
|
8717
|
-
return
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
+
return (() => {
|
|
8732
|
+
const _el$3 = $dfce76a4aeb41067$var$_tmpl$3(),
|
|
8733
|
+
_el$4 = _el$3.firstChild;
|
|
8734
|
+
$bBfCy$solidjsweb.insert(_el$4, $bBfCy$solidjsweb.createComponent(IMG_tag, $bBfCy$solidjsweb.mergeProps({
|
|
8735
|
+
alt: alt
|
|
8736
|
+
}, remove_on_error ? {
|
|
8737
|
+
onerror: "this.remove()"
|
|
8738
|
+
} : {}, image_options, {
|
|
8739
|
+
get ["class"]() {
|
|
8740
|
+
return $51b78ec2cb40f07e$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $dfce76a4aeb41067$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
|
|
8741
|
+
}
|
|
8742
|
+
})));
|
|
8743
|
+
$bBfCy$solidjsweb.insert(_el$3, canvas, null);
|
|
8744
|
+
return _el$3;
|
|
8745
|
+
})();
|
|
8731
8746
|
}
|
|
8732
8747
|
function $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
8733
8748
|
let srcset_opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -8749,7 +8764,8 @@ function $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8749
8764
|
}
|
|
8750
8765
|
var $be5deeed4683b89f$exports = {};
|
|
8751
8766
|
$be5deeed4683b89f$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
8752
|
-
|
|
8767
|
+
const $8928a1027461fba4$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=images-container><div class=main-image-container>`),
|
|
8768
|
+
$8928a1027461fba4$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=second-image-container>`);
|
|
8753
8769
|
// Saving bytez
|
|
8754
8770
|
// Maybe? @Daniel
|
|
8755
8771
|
const $8928a1027461fba4$var$TOUCHSTART = "touchstart";
|
|
@@ -8895,16 +8911,17 @@ const $8928a1027461fba4$export$2369f6fc1c911576 = _ref => {
|
|
|
8895
8911
|
srcset_opts: second_srcset_opts || {}
|
|
8896
8912
|
});
|
|
8897
8913
|
const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
|
|
8898
|
-
const images_container =
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8914
|
+
const images_container = (() => {
|
|
8915
|
+
const _el$ = $8928a1027461fba4$var$_tmpl$(),
|
|
8916
|
+
_el$2 = _el$.firstChild;
|
|
8917
|
+
$bBfCy$solidjsweb.insert(_el$, !no_second_img && (() => {
|
|
8918
|
+
const _el$3 = $8928a1027461fba4$var$_tmpl$2();
|
|
8919
|
+
$bBfCy$solidjsweb.insert(_el$3, second_image);
|
|
8920
|
+
return _el$3;
|
|
8921
|
+
})(), _el$2);
|
|
8922
|
+
$bBfCy$solidjsweb.insert(_el$2, main_image);
|
|
8923
|
+
return _el$;
|
|
8924
|
+
})();
|
|
8908
8925
|
if (no_second_img) return images_container;
|
|
8909
8926
|
const hover_element = images_container;
|
|
8910
8927
|
const event_handler_mouse = _ref2 => {
|