@cntrl-site/components 1.0.108-alpha.1 → 1.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chronicles-D7E1yVzl.mjs → Chronicles-Clc3aiGG.mjs} +176 -174
- package/dist/Chronicles-DBqZzhwf.js +198 -0
- package/dist/{ChroniclesComponent-9M_JIJlG.js → ChroniclesComponent-4QMq3nfr.js} +1 -1
- package/dist/{ChroniclesComponent-DrFDru99.mjs → ChroniclesComponent-CwSeQzn1.mjs} +25 -25
- package/dist/{ClickGallerie-CBquEuXQ.mjs → ClickGallerie-Cjc_1Gxy.mjs} +1 -1
- package/dist/{ClickGallerie-41L7IKhN.js → ClickGallerie-DYbc-rDp.js} +1 -1
- package/dist/Components/Chronicles/Chronicles.d.ts +7 -6
- package/dist/Components/utils/LinkWrapper.d.ts +0 -1
- package/dist/Components/utils/buildValidUrl.d.ts +1 -0
- package/dist/Components/utils/index.d.ts +1 -0
- package/dist/{ControlSlider-D91b53un.js → ControlSlider-C8ckUIDm.js} +1 -1
- package/dist/{ControlSlider-mp-LvrTR.mjs → ControlSlider-DqKfaKMG.mjs} +1 -1
- package/dist/{FAQ-KL9X1-xe.mjs → FAQ-BS-vO0l-.mjs} +1 -1
- package/dist/{FAQ-8goVE-aB.js → FAQ-Ct0YfqX1.js} +1 -1
- package/dist/{Grid-Dec4bMvK.js → Grid-CU1dsdoO.js} +1 -1
- package/dist/{Grid-wxlTwFLb.mjs → Grid-qbqchSLi.mjs} +1 -1
- package/dist/{ImageRevealSlider-K_nNoquq.mjs → ImageRevealSlider-DifEXySR.mjs} +1 -1
- package/dist/{ImageRevealSlider-Bv092gwv.js → ImageRevealSlider-DlxudBUy.js} +1 -1
- package/dist/{Lightbox-Cyvva2uu.mjs → Lightbox-BY99NS14.mjs} +1 -1
- package/dist/{Lightbox-C2r7Wt_8.js → Lightbox-DZckgBzK.js} +1 -1
- package/dist/LinkWrapper-5kQHiGJQ.mjs +10 -0
- package/dist/LinkWrapper-CTqM1ucO.js +1 -0
- package/dist/{Marquee-BacOdRJ9.js → Marquee-DDKigLBo.js} +1 -1
- package/dist/{Marquee-DGbeihUh.mjs → Marquee-_xVuf-zp.mjs} +1 -1
- package/dist/{MarqueeText-BuEx2FCt.js → MarqueeText-B5hqB0HA.js} +1 -1
- package/dist/{MarqueeText-DTlCevPX.mjs → MarqueeText-C2E6UDsb.mjs} +1 -1
- package/dist/{RichTextRenderer-DizfCZEz.mjs → RichTextRenderer-D52Xto59.mjs} +1 -1
- package/dist/{RichTextRenderer-CUEc4FaL.js → RichTextRenderer-DEFXh5o6.js} +1 -1
- package/dist/{Slider20-BdeHmG8C.js → Slider20-BOmjDRf2.js} +1 -1
- package/dist/{Slider20-DS-FTzQC.mjs → Slider20-DUi6qwnd.mjs} +1 -1
- package/dist/{TestimonialGrid-B0JHzqhv.js → TestimonialGrid-BHZazEVX.js} +1 -1
- package/dist/{TestimonialGrid-BOqSqVin.mjs → TestimonialGrid-C-8IDzWu.mjs} +1 -1
- package/dist/{TestimonialSingle-Bx_V-cYE.js → TestimonialSingle-BORQom3u.js} +1 -1
- package/dist/{TestimonialSingle-7-PMnQ7u.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
- package/dist/buildValidUrl-BbtqqeHr.mjs +7 -0
- package/dist/buildValidUrl-CtJWFCPi.js +1 -0
- package/dist/{components-BDWmQ4M_.js → components-CU9RB7sz.js} +1 -1
- package/dist/{components-D6aHWqNw.mjs → components-Dn_5L1zL.mjs} +4 -4
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +12 -12
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/sources.js +17 -20
- package/dist/sources.mjs +17 -20
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +19 -17
- package/package.json +1 -1
- package/dist/Chronicles-hsVYwlUI.js +0 -198
- package/dist/LinkWrapper-CFEH047t.mjs +0 -14
- package/dist/LinkWrapper-CzFwFtgU.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as p, jsxs as E, Fragment as
|
|
2
|
-
import { useMemo as se, useRef as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsx as p, jsxs as E, Fragment as zt } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as se, useRef as R, useState as f, useEffect as h, useCallback as kt, useLayoutEffect as ce, Fragment as At } from "react";
|
|
3
|
+
import { createPortal as Ht } from "react-dom";
|
|
4
4
|
import C from "classnames";
|
|
5
|
-
import { s as
|
|
6
|
-
import { b as
|
|
5
|
+
import { s as Ft } from "./scalingValue-C9JH5L6O.mjs";
|
|
6
|
+
import { b as Wt } from "./buildColorVars-CLyWQm5K.mjs";
|
|
7
7
|
import { u as Bt } from "./useScopedStyles-DhBG3557.mjs";
|
|
8
|
-
import { b as
|
|
8
|
+
import { b as Vt } from "./buildValidUrl-BbtqqeHr.mjs";
|
|
9
9
|
import { o as Xe, t as Ye } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
10
|
+
import { u as Dt } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
|
|
11
|
+
const jt = ["title2", "title3", "title4"], q = ["column1Width", "column2Width", "column3Width", "column4Width"], Gt = ["column1", "column2", "column3", "column4", "column5"], Kt = ["title", ...jt], Qe = {
|
|
12
12
|
center: { x: "50%", y: "50%" },
|
|
13
13
|
"left-top": { x: "0%", y: "0%" },
|
|
14
14
|
"top-center": { x: "50%", y: "0%" },
|
|
@@ -18,12 +18,12 @@ const Dt = ["title2", "title3", "title4"], Y = ["column1Width", "column2Width",
|
|
|
18
18
|
"left-bottom": { x: "0%", y: "100%" },
|
|
19
19
|
"bottom-center": { x: "50%", y: "100%" },
|
|
20
20
|
"right-bottom": { x: "100%", y: "100%" }
|
|
21
|
-
},
|
|
21
|
+
}, fo = Object.keys(Qe), V = 300, de = 300, Z = 4e-3, Ut = 20, qe = /\.(mp4|webm|ogg|mov)(\?|$)/i, Pe = [
|
|
22
22
|
"--cntrl-article-width",
|
|
23
23
|
"--cntrl-article-top",
|
|
24
24
|
"--cntrl-article-left",
|
|
25
25
|
"--cntrl-viewport-height"
|
|
26
|
-
],
|
|
26
|
+
], Xt = {
|
|
27
27
|
triggerColor: "trigger-color",
|
|
28
28
|
triggerHoverColor: "trigger-hover-color",
|
|
29
29
|
closeColor: "close-color",
|
|
@@ -32,46 +32,46 @@ const Dt = ["title2", "title3", "title4"], Y = ["column1Width", "column2Width",
|
|
|
32
32
|
textColor: "text-color",
|
|
33
33
|
textHoverColor: "text-hover-color",
|
|
34
34
|
overlayColor: "overlay-color"
|
|
35
|
-
},
|
|
35
|
+
}, Yt = [
|
|
36
36
|
{ side: "top", axis: "y", variant: "row-padding" },
|
|
37
37
|
{ side: "bottom", axis: "y", variant: "row-padding", reverse: !0 },
|
|
38
38
|
{ side: "left", axis: "x", variant: "column-padding", opposite: "right" },
|
|
39
39
|
{ side: "right", axis: "x", variant: "column-padding", opposite: "left", reverse: !0 }
|
|
40
40
|
];
|
|
41
|
-
function et({ columns: e, columnGap: o, panelWidth: n, panelPadding:
|
|
42
|
-
return Math.max(0, n -
|
|
41
|
+
function et({ columns: e, columnGap: o, panelWidth: n, panelPadding: l }) {
|
|
42
|
+
return Math.max(0, n - l.left - l.right - (e - 1) * o);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function qt(e) {
|
|
45
45
|
const o = et(e) / e.columns;
|
|
46
|
-
return Object.fromEntries(
|
|
46
|
+
return Object.fromEntries(q.slice(0, e.columns - 1).map((n) => [n, o]));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...
|
|
48
|
+
function go(e, o) {
|
|
49
|
+
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...qt({ ...o, ...e }) };
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const o = et(e), n =
|
|
51
|
+
function Zt(e) {
|
|
52
|
+
const o = et(e), n = q.slice(0, e.columns - 1).map((c) => {
|
|
53
53
|
const d = e[c];
|
|
54
54
|
return typeof d == "number" ? Math.max(0, d) : o / e.columns;
|
|
55
|
-
}),
|
|
56
|
-
return [...n.map((c) => c *
|
|
55
|
+
}), l = n.reduce((c, d) => c + d, 0), a = l > o ? o / l : 1;
|
|
56
|
+
return [...n.map((c) => c * a), Math.max(0, o - l * a)];
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const o = e.reduce((n,
|
|
58
|
+
function Jt(e) {
|
|
59
|
+
const o = e.reduce((n, l) => n + l, 0);
|
|
60
60
|
return e.map((n) => `minmax(0, ${o > 0 ? n / o * 100 : 1}fr)`).join(" ");
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Qt(e) {
|
|
63
63
|
const o = [];
|
|
64
|
-
return e.forEach((n,
|
|
64
|
+
return e.forEach((n, l) => {
|
|
65
65
|
var d;
|
|
66
|
-
const
|
|
67
|
-
if (!c ||
|
|
68
|
-
o.push({ label:
|
|
66
|
+
const a = ((d = n.group) == null ? void 0 : d.trim()) ?? "", c = o[o.length - 1];
|
|
67
|
+
if (!c || a !== "" && a !== c.label) {
|
|
68
|
+
o.push({ label: a, rows: [{ item: n, index: l }] });
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
c.rows.push({ item: n, index:
|
|
71
|
+
c.rows.push({ item: n, index: l });
|
|
72
72
|
}), o;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function B(e) {
|
|
75
75
|
return ((e == null ? void 0 : e.image) ?? []).filter((o) => !!(o != null && o.assetId));
|
|
76
76
|
}
|
|
77
77
|
function Ze(e, o, n) {
|
|
@@ -90,11 +90,11 @@ function ue(e) {
|
|
|
90
90
|
if (!o) return {};
|
|
91
91
|
const n = getComputedStyle(o);
|
|
92
92
|
return Object.fromEntries(
|
|
93
|
-
Pe.map((
|
|
93
|
+
Pe.map((l) => [l, n.getPropertyValue(l).trim()]).filter(([, l]) => l)
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
function Je(e, o) {
|
|
97
|
-
const n = (
|
|
97
|
+
const n = (l) => e[`${o}${l}`];
|
|
98
98
|
return {
|
|
99
99
|
fontSettings: { fontFamily: n("FontFamily"), ...n("FontSettings") },
|
|
100
100
|
fontSize: n("FontSize"),
|
|
@@ -106,7 +106,7 @@ function Je(e, o) {
|
|
|
106
106
|
color: "#000000"
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Pt(e) {
|
|
110
110
|
return `
|
|
111
111
|
.${e}-trigger,
|
|
112
112
|
.${e}-close {
|
|
@@ -124,7 +124,7 @@ function Qt(e) {
|
|
|
124
124
|
}
|
|
125
125
|
.${e}-trigger {
|
|
126
126
|
color: var(--${e}-trigger-color);
|
|
127
|
-
transition: color 150ms ease, opacity ${
|
|
127
|
+
transition: color 150ms ease, opacity ${V}ms ease;
|
|
128
128
|
}
|
|
129
129
|
.${e}-trigger-hidden {
|
|
130
130
|
opacity: 0;
|
|
@@ -161,7 +161,7 @@ function Qt(e) {
|
|
|
161
161
|
overscroll-behavior: none;
|
|
162
162
|
opacity: 0;
|
|
163
163
|
pointer-events: none;
|
|
164
|
-
transition: opacity ${
|
|
164
|
+
transition: opacity ${V}ms ease;
|
|
165
165
|
}
|
|
166
166
|
.${e}-inline-layer {
|
|
167
167
|
position: fixed;
|
|
@@ -235,7 +235,7 @@ function Qt(e) {
|
|
|
235
235
|
background-color: var(--${e}-panel-color);
|
|
236
236
|
color: var(--${e}-text-color);
|
|
237
237
|
overscroll-behavior: contain;
|
|
238
|
-
transition: transform ${
|
|
238
|
+
transition: transform ${V}ms cubic-bezier(0, 0, 0.58, 1);
|
|
239
239
|
}
|
|
240
240
|
.${e}-overlay-active .${e}-panel {
|
|
241
241
|
transform: translate(calc(-1 * var(--${e}-panel-x)), calc(-1 * var(--${e}-panel-y)));
|
|
@@ -306,20 +306,20 @@ a.${e}-row {
|
|
|
306
306
|
}
|
|
307
307
|
`;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
const x =
|
|
309
|
+
function eo({ P: e, media: o, isVisible: n, isLoaded: l, isCovered: a, isFading: c, onLoad: d }) {
|
|
310
|
+
const x = R(null), S = tt(o), r = C(
|
|
311
311
|
`${e}-media`,
|
|
312
312
|
o.objectFit === "contain" && `${e}-media-contain`,
|
|
313
|
-
n &&
|
|
314
|
-
|
|
313
|
+
n && l && `${e}-media-visible`,
|
|
314
|
+
a && `${e}-media-covered`,
|
|
315
315
|
c && `${e}-media-fading`
|
|
316
316
|
);
|
|
317
|
-
return
|
|
318
|
-
var
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
}) :
|
|
322
|
-
}, [n]),
|
|
317
|
+
return h(() => {
|
|
318
|
+
var A;
|
|
319
|
+
const k = x.current;
|
|
320
|
+
k && (n ? (A = k.play()) == null || A.catch(() => {
|
|
321
|
+
}) : k.pause());
|
|
322
|
+
}, [n]), S ? /* @__PURE__ */ p(
|
|
323
323
|
"video",
|
|
324
324
|
{
|
|
325
325
|
ref: x,
|
|
@@ -333,65 +333,65 @@ function Pt({ P: e, media: o, isVisible: n, isLoaded: a, isCovered: l, isFading:
|
|
|
333
333
|
}
|
|
334
334
|
) : /* @__PURE__ */ p("img", { className: r, src: o.assetId, alt: "", decoding: "async", onLoad: d });
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function to(e, o, n, l, a) {
|
|
337
337
|
const c = o[o.length - 1];
|
|
338
338
|
let d = n;
|
|
339
|
-
return o.slice(0, -1).map((x,
|
|
340
|
-
const r = d + x +
|
|
341
|
-
return d += x +
|
|
339
|
+
return o.slice(0, -1).map((x, S) => {
|
|
340
|
+
const r = d + x + l / 2;
|
|
341
|
+
return d += x + l, /* @__PURE__ */ p(
|
|
342
342
|
"div",
|
|
343
343
|
{
|
|
344
|
-
"data-controls":
|
|
344
|
+
"data-controls": q[S],
|
|
345
345
|
"data-controls-axis": "x",
|
|
346
346
|
"data-controls-variant": "column-width",
|
|
347
|
-
"data-controls-min": String(
|
|
347
|
+
"data-controls-min": String(Ut),
|
|
348
348
|
"data-controls-max-fraction": String(x + c),
|
|
349
349
|
className: `${e}-control-anchor`,
|
|
350
|
-
style: { top: 0, left:
|
|
350
|
+
style: { top: 0, left: a(r - Z / 2), width: a(Z), height: "100%" }
|
|
351
351
|
},
|
|
352
|
-
|
|
352
|
+
q[S]
|
|
353
353
|
);
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
return
|
|
358
|
-
const c =
|
|
356
|
+
function oo(e, o, n, l) {
|
|
357
|
+
return Yt.map((a) => {
|
|
358
|
+
const c = l(Math.max(n[a.side], Z)), d = a.axis === "x";
|
|
359
359
|
return /* @__PURE__ */ p(
|
|
360
360
|
"div",
|
|
361
361
|
{
|
|
362
|
-
"data-controls": `panelPadding.${
|
|
363
|
-
"data-controls-axis":
|
|
364
|
-
"data-controls-variant":
|
|
365
|
-
"data-controls-reverse": "reverse" in
|
|
362
|
+
"data-controls": `panelPadding.${a.side}`,
|
|
363
|
+
"data-controls-axis": a.axis,
|
|
364
|
+
"data-controls-variant": a.variant,
|
|
365
|
+
"data-controls-reverse": "reverse" in a ? "" : void 0,
|
|
366
366
|
"data-controls-min": "0",
|
|
367
|
-
"data-controls-max-fraction": "opposite" in
|
|
367
|
+
"data-controls-max-fraction": "opposite" in a ? String(Math.max(0, o - n[a.opposite])) : void 0,
|
|
368
368
|
className: `${e}-control-anchor`,
|
|
369
369
|
style: {
|
|
370
|
-
[
|
|
370
|
+
[a.side]: 0,
|
|
371
371
|
...d ? { top: 0, width: c, height: "100%" } : { left: 0, width: "100%", height: c }
|
|
372
372
|
}
|
|
373
373
|
},
|
|
374
|
-
|
|
374
|
+
a.side
|
|
375
375
|
);
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function vo({
|
|
379
379
|
settings: e,
|
|
380
380
|
content: o,
|
|
381
381
|
isEditor: n,
|
|
382
|
-
isEditMode:
|
|
383
|
-
isPreviewMode:
|
|
382
|
+
isEditMode: l,
|
|
383
|
+
isPreviewMode: a,
|
|
384
384
|
activeEvent: c,
|
|
385
385
|
portalId: d,
|
|
386
386
|
currentState: x,
|
|
387
|
-
unavailableStates:
|
|
387
|
+
unavailableStates: S
|
|
388
388
|
}) {
|
|
389
389
|
var Ge;
|
|
390
390
|
const { prefix: r } = Bt(), {
|
|
391
|
-
type:
|
|
392
|
-
triggerLabel:
|
|
391
|
+
type: k,
|
|
392
|
+
triggerLabel: A,
|
|
393
393
|
closeLabel: nt,
|
|
394
|
-
columns:
|
|
394
|
+
columns: J,
|
|
395
395
|
columnGap: pe,
|
|
396
396
|
hoverInterval: me,
|
|
397
397
|
panelPosition: rt,
|
|
@@ -399,64 +399,65 @@ function go({
|
|
|
399
399
|
panelPadding: O,
|
|
400
400
|
panelRadius: it,
|
|
401
401
|
groupGap: ge,
|
|
402
|
-
triggerColor:
|
|
403
|
-
triggerHoverColor:
|
|
402
|
+
triggerColor: lt,
|
|
403
|
+
triggerHoverColor: at,
|
|
404
404
|
closeColor: st,
|
|
405
405
|
closeHoverColor: ct,
|
|
406
406
|
panelColor: ut,
|
|
407
407
|
textColor: dt,
|
|
408
408
|
textHoverColor: pt,
|
|
409
409
|
overlayColor: mt
|
|
410
|
-
} = e,
|
|
411
|
-
|
|
412
|
-
_ && !
|
|
413
|
-
}, [_,
|
|
410
|
+
} = e, L = se(() => o ?? [], [o]), D = R(null), j = R(null), Q = R(null), ve = R(null), he = R(null), $e = R(null), ye = R(null), [ft, G] = f(!1), [N, we] = f(!1), [H, be] = f(!1), [Ce, xe] = f(!1), [g, T] = f(null), [Se, Le] = f(0), [P, gt] = f(() => /* @__PURE__ */ new Set()), [Ie, vt] = f(() => /* @__PURE__ */ new Set()), [K, Re] = f(null), [ht, $t] = f(null), [M, yt] = f(null), [ee, te] = f({}), [oe, ne] = f(null), [wt, Me] = f(!1), _ = n && !a, y = !_, m = k === "a", bt = _ && x === "open" && !(S != null && S.includes("open")), w = !m && (bt || (y || l) && ft), Ee = y && (m || w), $ = (t) => Ft(t, n ?? !1), Ct = se(() => Pt(r), [r]), Oe = Qe[rt], Ne = Zt(e), xt = Kt.slice(0, J - 1), F = J > 1, St = se(() => F ? Qt(L) : [{ label: "", rows: L.map((t, i) => ({ item: t, index: i })) }], [L, F]), U = g === null ? [] : B(L[g]), Te = U[Se], I = g !== null && Te ? Ze(g, Se, Te.assetId) : null, _e = I !== null && Ie.has(I);
|
|
411
|
+
Dt(w && !_), h(() => {
|
|
412
|
+
_ && !l && G(!1);
|
|
413
|
+
}, [_, l]), h(() => {
|
|
414
414
|
if (w) {
|
|
415
|
-
te(ue(
|
|
415
|
+
te(ue(D.current)), we(!0);
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
418
|
be(!1), T(null);
|
|
419
|
-
const t = window.setTimeout(() => we(!1),
|
|
419
|
+
const t = window.setTimeout(() => we(!1), V);
|
|
420
420
|
return () => window.clearTimeout(t);
|
|
421
|
-
}, [w]),
|
|
421
|
+
}, [w]), h(() => {
|
|
422
422
|
var i;
|
|
423
423
|
if (!w || !N) return;
|
|
424
424
|
(i = Q.current) == null || i.getBoundingClientRect();
|
|
425
425
|
const t = requestAnimationFrame(() => be(!0));
|
|
426
426
|
return () => cancelAnimationFrame(t);
|
|
427
|
-
}, [w, N]),
|
|
428
|
-
if (!
|
|
427
|
+
}, [w, N]), h(() => {
|
|
428
|
+
if (!H) {
|
|
429
429
|
xe(!1);
|
|
430
430
|
return;
|
|
431
431
|
}
|
|
432
|
-
const t = window.setTimeout(() => xe(!0),
|
|
432
|
+
const t = window.setTimeout(() => xe(!0), V);
|
|
433
433
|
return () => window.clearTimeout(t);
|
|
434
|
-
}, [
|
|
435
|
-
const
|
|
436
|
-
const t =
|
|
434
|
+
}, [H]);
|
|
435
|
+
const X = kt(() => {
|
|
436
|
+
const t = j.current, i = Q.current;
|
|
437
437
|
if (!t || !i) return;
|
|
438
438
|
const u = t.getBoundingClientRect(), s = i.getBoundingClientRect();
|
|
439
439
|
yt({ top: u.top - s.top, left: u.left - s.left });
|
|
440
440
|
}, []), ze = N || m && P.size > 0;
|
|
441
|
-
|
|
442
|
-
const t =
|
|
441
|
+
h(() => {
|
|
442
|
+
const t = D.current;
|
|
443
443
|
if (!ze || !t || typeof ResizeObserver > "u") return;
|
|
444
|
-
const i = () => te((
|
|
444
|
+
const i = () => te((v) => {
|
|
445
445
|
const b = ue(t);
|
|
446
|
-
return Pe.every((
|
|
446
|
+
return Pe.every((Y) => v[Y] === b[Y]) ? v : b;
|
|
447
447
|
}), u = new ResizeObserver(i);
|
|
448
448
|
u.observe(t);
|
|
449
449
|
const s = ot(t);
|
|
450
450
|
return s && s !== t && u.observe(s), () => u.disconnect();
|
|
451
451
|
}, [ze]), ce(() => {
|
|
452
452
|
if (N)
|
|
453
|
-
return
|
|
454
|
-
}, [N, ee,
|
|
453
|
+
return X(), window.addEventListener("resize", X), () => window.removeEventListener("resize", X);
|
|
454
|
+
}, [N, ee, X]), h(() => {
|
|
455
455
|
var i;
|
|
456
456
|
if (!w || !y) return;
|
|
457
457
|
(i = ve.current) == null || i.focus({ preventScroll: !0 });
|
|
458
458
|
const t = (u) => {
|
|
459
|
-
|
|
459
|
+
var s;
|
|
460
|
+
u.key === "Escape" && (G(!1), (s = j.current) == null || s.focus({ preventScroll: !0 }));
|
|
460
461
|
};
|
|
461
462
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
462
463
|
}, [w, y]), ce(() => {
|
|
@@ -465,13 +466,13 @@ function go({
|
|
|
465
466
|
if (!t || !i) return;
|
|
466
467
|
const u = t.getBoundingClientRect(), s = i.getBoundingClientRect();
|
|
467
468
|
ne({ top: u.top - s.top, left: u.left - s.left, width: u.width });
|
|
468
|
-
}, [m, g]),
|
|
469
|
+
}, [m, g]), h(() => {
|
|
469
470
|
if (g !== null) return;
|
|
470
471
|
const t = window.setTimeout(() => ne(null), de);
|
|
471
472
|
return () => window.clearTimeout(t);
|
|
472
473
|
}, [g]);
|
|
473
474
|
const ke = oe !== null;
|
|
474
|
-
|
|
475
|
+
h(() => {
|
|
475
476
|
if (!m || !ke) return;
|
|
476
477
|
const t = () => {
|
|
477
478
|
Me(!0), T(null), ne(null);
|
|
@@ -479,95 +480,95 @@ function go({
|
|
|
479
480
|
return document.addEventListener("scroll", t, { capture: !0, passive: !0 }), window.addEventListener("resize", t), () => {
|
|
480
481
|
document.removeEventListener("scroll", t, { capture: !0 }), window.removeEventListener("resize", t);
|
|
481
482
|
};
|
|
482
|
-
}, [m, ke]),
|
|
483
|
-
Ee &&
|
|
483
|
+
}, [m, ke]), h(() => {
|
|
484
|
+
Ee && L.forEach((t) => B(t).forEach((i) => {
|
|
484
485
|
tt(i) || (new Image().src = i.assetId);
|
|
485
486
|
}));
|
|
486
|
-
}, [Ee,
|
|
487
|
-
if (
|
|
487
|
+
}, [Ee, L]), h(() => {
|
|
488
|
+
if (U.length < 2) return;
|
|
488
489
|
const t = window.setInterval(() => {
|
|
489
|
-
|
|
490
|
+
Le((i) => (i + 1) % U.length);
|
|
490
491
|
}, me);
|
|
491
492
|
return () => window.clearInterval(t);
|
|
492
|
-
}, [g,
|
|
493
|
+
}, [g, U.length, me]), ce(() => {
|
|
493
494
|
const t = ye.current;
|
|
494
|
-
ye.current =
|
|
495
|
-
}, [
|
|
496
|
-
if (!_e ||
|
|
497
|
-
const t = window.setTimeout(() =>
|
|
495
|
+
ye.current = I, I !== null && ($t(I), Re(t));
|
|
496
|
+
}, [I]), h(() => {
|
|
497
|
+
if (!_e || K === null) return;
|
|
498
|
+
const t = window.setTimeout(() => Re(null), de);
|
|
498
499
|
return () => window.clearTimeout(t);
|
|
499
|
-
}, [_e,
|
|
500
|
+
}, [_e, K]);
|
|
500
501
|
const Ae = () => {
|
|
501
502
|
var t;
|
|
502
|
-
y && (
|
|
503
|
+
y && (G(!1), (t = j.current) == null || t.focus({ preventScroll: !0 }));
|
|
503
504
|
}, He = (t) => {
|
|
504
|
-
if (!y ||
|
|
505
|
+
if (!y || B(L[t]).length === 0) {
|
|
505
506
|
T(null);
|
|
506
507
|
return;
|
|
507
508
|
}
|
|
508
|
-
gt((i) => i.has(t) ? i : new Set(i).add(t)), m && g === null && te(ue(
|
|
509
|
+
gt((i) => i.has(t) ? i : new Set(i).add(t)), m && g === null && te(ue(D.current)), g !== t && Le(0), Me(!1), T(t);
|
|
509
510
|
}, Fe = (t) => {
|
|
510
511
|
T((i) => i === t ? null : i);
|
|
511
|
-
},
|
|
512
|
+
}, Lt = (t) => {
|
|
512
513
|
!y && t.target.closest("a") && t.preventDefault();
|
|
513
|
-
},
|
|
514
|
-
triggerColor:
|
|
515
|
-
triggerHoverColor:
|
|
514
|
+
}, We = Xe(Ye(Je(e, "trigger"), n)), W = Gt.slice(0, J).map((t) => Xe(Ye(Je(e, t), n))), Be = W[0].lineHeight, Ve = (Ge = W[1]) == null ? void 0 : Ge.lineHeight, It = Be !== void 0 && Ve !== void 0 ? `calc((${Ve} - ${Be}) / 2)` : void 0, re = Wt(r, {
|
|
515
|
+
triggerColor: lt,
|
|
516
|
+
triggerHoverColor: at,
|
|
516
517
|
closeColor: st,
|
|
517
518
|
closeHoverColor: ct,
|
|
518
519
|
panelColor: ut,
|
|
519
520
|
textColor: dt,
|
|
520
521
|
textHoverColor: pt,
|
|
521
522
|
overlayColor: mt
|
|
522
|
-
},
|
|
523
|
+
}, Xt, []), ie = c && c !== "default" ? `${r}-state-${c}` : "", le = y ? `${r}-interactive` : "", Rt = !!l && (m || Ce), De = /* @__PURE__ */ p("div", { className: C(`${r}-media-layer`, wt && `${r}-media-layer-instant`), "aria-hidden": "true", children: [...P].flatMap((t) => B(L[t]).map((i, u) => {
|
|
523
524
|
const s = Ze(t, u, i.assetId);
|
|
524
525
|
return /* @__PURE__ */ p(
|
|
525
|
-
|
|
526
|
+
eo,
|
|
526
527
|
{
|
|
527
528
|
P: r,
|
|
528
529
|
media: i,
|
|
529
|
-
isVisible: s ===
|
|
530
|
-
isLoaded:
|
|
531
|
-
isCovered: s ===
|
|
532
|
-
isFading:
|
|
533
|
-
onLoad: () => vt((
|
|
530
|
+
isVisible: s === I,
|
|
531
|
+
isLoaded: Ie.has(s),
|
|
532
|
+
isCovered: s === K,
|
|
533
|
+
isFading: I === null && (s === ht || s === K),
|
|
534
|
+
onLoad: () => vt((v) => v.has(s) ? v : new Set(v).add(s))
|
|
534
535
|
},
|
|
535
536
|
s
|
|
536
537
|
);
|
|
537
|
-
})) }),
|
|
538
|
-
const i = !t &&
|
|
538
|
+
})) }), ae = (t) => {
|
|
539
|
+
const i = !t && Rt;
|
|
539
540
|
return /* @__PURE__ */ E(
|
|
540
541
|
"div",
|
|
541
542
|
{
|
|
542
543
|
ref: t ? void 0 : he,
|
|
543
544
|
className: C(
|
|
544
545
|
`${r}-panel`,
|
|
545
|
-
|
|
546
|
+
H && Ce && `${r}-panel-settled`,
|
|
546
547
|
m && `${r}-panel-inline`,
|
|
547
548
|
t && `${r}-panel-copy`
|
|
548
549
|
),
|
|
549
550
|
style: {
|
|
550
|
-
width:
|
|
551
|
-
paddingTop:
|
|
552
|
-
paddingRight:
|
|
553
|
-
paddingBottom:
|
|
554
|
-
paddingLeft:
|
|
555
|
-
borderRadius:
|
|
556
|
-
[`--${r}-group-gap`]:
|
|
551
|
+
width: $(fe),
|
|
552
|
+
paddingTop: $(O.top),
|
|
553
|
+
paddingRight: $(O.right),
|
|
554
|
+
paddingBottom: $(O.bottom),
|
|
555
|
+
paddingLeft: $(O.left),
|
|
556
|
+
borderRadius: $(it),
|
|
557
|
+
[`--${r}-group-gap`]: $(ge),
|
|
557
558
|
[`--${r}-panel-x`]: Oe.x,
|
|
558
559
|
[`--${r}-panel-y`]: Oe.y,
|
|
559
|
-
[`--${r}-grid-columns`]:
|
|
560
|
-
[`--${r}-column-gap`]:
|
|
560
|
+
[`--${r}-grid-columns`]: Jt(Ne),
|
|
561
|
+
[`--${r}-column-gap`]: $(pe),
|
|
561
562
|
...t && oe
|
|
562
563
|
},
|
|
563
564
|
"data-lightbox-scrollable": m ? void 0 : "",
|
|
564
565
|
"aria-hidden": t || void 0,
|
|
565
566
|
onMouseLeave: t ? void 0 : () => T(null),
|
|
566
|
-
onClickCapture: t ? void 0 :
|
|
567
|
+
onClickCapture: t ? void 0 : Lt,
|
|
567
568
|
children: [
|
|
568
|
-
i &&
|
|
569
|
-
i &&
|
|
570
|
-
|
|
569
|
+
i && oo(r, fe, O, $),
|
|
570
|
+
i && to(r, Ne, O.left, pe, $),
|
|
571
|
+
St.map((u, s) => /* @__PURE__ */ E(At, { children: [
|
|
571
572
|
i && s > 0 && /* @__PURE__ */ p(
|
|
572
573
|
"div",
|
|
573
574
|
{
|
|
@@ -577,43 +578,44 @@ function go({
|
|
|
577
578
|
"data-controls-reverse": "",
|
|
578
579
|
"data-controls-min": "0",
|
|
579
580
|
className: `${r}-control-anchor`,
|
|
580
|
-
style: { left: 0, width: "100%", height:
|
|
581
|
+
style: { left: 0, width: "100%", height: $(Math.max(ge, Z)) }
|
|
581
582
|
}
|
|
582
583
|
),
|
|
583
584
|
/* @__PURE__ */ E(
|
|
584
585
|
"div",
|
|
585
586
|
{
|
|
586
|
-
className: C(`${r}-group`, !
|
|
587
|
+
className: C(`${r}-group`, !F && `${r}-group-unlabeled`),
|
|
587
588
|
style: { gridTemplateRows: `repeat(${u.rows.length}, auto) 1fr` },
|
|
588
589
|
children: [
|
|
589
|
-
|
|
590
|
+
F && /* @__PURE__ */ p(
|
|
590
591
|
"span",
|
|
591
592
|
{
|
|
592
593
|
className: `${r}-group-label`,
|
|
593
|
-
style: { ...
|
|
594
|
+
style: { ...W[0], gridRow: `1 / span ${u.rows.length + 1}`, marginTop: It },
|
|
594
595
|
children: u.label
|
|
595
596
|
}
|
|
596
597
|
),
|
|
597
|
-
u.rows.map(({ item:
|
|
598
|
+
u.rows.map(({ item: v, index: b }) => {
|
|
598
599
|
var Ke;
|
|
599
|
-
const
|
|
600
|
-
href:
|
|
601
|
-
...
|
|
602
|
-
} : {}, Nt = t ? {} : {
|
|
600
|
+
const z = !t && ((Ke = v.link) != null && Ke.value) ? v.link : void 0, Y = z ? "a" : "div", Ot = z ? {
|
|
601
|
+
href: Vt(z.value),
|
|
602
|
+
...z.target === "blank" && { target: "_blank", rel: "noreferrer" }
|
|
603
|
+
} : {}, Nt = !z && y && B(v).length > 0, Tt = t ? {} : {
|
|
604
|
+
tabIndex: Nt ? 0 : void 0,
|
|
603
605
|
onMouseEnter: () => He(b),
|
|
604
606
|
onMouseLeave: () => Fe(b),
|
|
605
607
|
onFocus: () => He(b),
|
|
606
608
|
onBlur: () => Fe(b)
|
|
607
609
|
};
|
|
608
610
|
return /* @__PURE__ */ E(
|
|
609
|
-
|
|
611
|
+
Y,
|
|
610
612
|
{
|
|
611
613
|
className: C(`${r}-row`, t && b === g && `${r}-row-active`),
|
|
612
614
|
...Ot,
|
|
613
|
-
...
|
|
615
|
+
...Tt,
|
|
614
616
|
children: [
|
|
615
|
-
!
|
|
616
|
-
xt.map((Ue,
|
|
617
|
+
!F && /* @__PURE__ */ p("div", { className: `${r}-title`, style: W[0], children: v.group }),
|
|
618
|
+
xt.map((Ue, _t) => /* @__PURE__ */ p("div", { className: `${r}-title`, style: W[_t + 1], children: v[Ue] }, Ue))
|
|
617
619
|
]
|
|
618
620
|
},
|
|
619
621
|
b
|
|
@@ -633,15 +635,15 @@ function go({
|
|
|
633
635
|
className: C(
|
|
634
636
|
`${r}-overlay`,
|
|
635
637
|
n && `${r}-overlay-editor`,
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
638
|
+
l && `${r}-overlay-edit-mode`,
|
|
639
|
+
H && `${r}-overlay-active`,
|
|
640
|
+
le,
|
|
639
641
|
ie
|
|
640
642
|
),
|
|
641
643
|
style: { ...re, ...ee },
|
|
642
644
|
role: "dialog",
|
|
643
645
|
"aria-modal": "true",
|
|
644
|
-
"aria-label":
|
|
646
|
+
"aria-label": A,
|
|
645
647
|
"data-selection": "none",
|
|
646
648
|
children: [
|
|
647
649
|
/* @__PURE__ */ p("div", { className: `${r}-backdrop`, "aria-hidden": "true", onClick: Ae }),
|
|
@@ -653,7 +655,7 @@ function go({
|
|
|
653
655
|
type: "button",
|
|
654
656
|
className: `${r}-close`,
|
|
655
657
|
style: {
|
|
656
|
-
...
|
|
658
|
+
...We,
|
|
657
659
|
top: (M == null ? void 0 : M.top) ?? 0,
|
|
658
660
|
left: (M == null ? void 0 : M.left) ?? 0,
|
|
659
661
|
visibility: M ? "visible" : "hidden"
|
|
@@ -662,60 +664,60 @@ function go({
|
|
|
662
664
|
children: nt
|
|
663
665
|
}
|
|
664
666
|
),
|
|
665
|
-
|
|
667
|
+
ae(!1)
|
|
666
668
|
]
|
|
667
669
|
}
|
|
668
670
|
) : null, Et = m && P.size > 0 ? /* @__PURE__ */ E(
|
|
669
671
|
"div",
|
|
670
672
|
{
|
|
671
673
|
ref: $e,
|
|
672
|
-
className: C(`${r}-inline-layer`, n && `${r}-overlay-editor`,
|
|
674
|
+
className: C(`${r}-inline-layer`, n && `${r}-overlay-editor`, le, ie),
|
|
673
675
|
style: { ...re, ...ee },
|
|
674
676
|
"aria-hidden": "true",
|
|
675
677
|
"data-selection": "none",
|
|
676
678
|
children: [
|
|
677
679
|
De,
|
|
678
|
-
oe &&
|
|
680
|
+
oe && ae(!0)
|
|
679
681
|
]
|
|
680
682
|
}
|
|
681
683
|
) : null, je = Mt ?? Et;
|
|
682
|
-
return /* @__PURE__ */ E(
|
|
684
|
+
return /* @__PURE__ */ E(zt, { children: [
|
|
683
685
|
/* @__PURE__ */ p("style", { dangerouslySetInnerHTML: { __html: Ct } }),
|
|
684
686
|
/* @__PURE__ */ p(
|
|
685
687
|
"div",
|
|
686
688
|
{
|
|
687
|
-
ref:
|
|
688
|
-
className: C(_ && `${r}-editor`,
|
|
689
|
+
ref: D,
|
|
690
|
+
className: C(_ && `${r}-editor`, le, ie),
|
|
689
691
|
style: re,
|
|
690
|
-
children: m ?
|
|
692
|
+
children: m ? ae(!1) : /* @__PURE__ */ p(
|
|
691
693
|
"button",
|
|
692
694
|
{
|
|
693
|
-
ref:
|
|
695
|
+
ref: j,
|
|
694
696
|
type: "button",
|
|
695
|
-
className: C(`${r}-trigger`,
|
|
696
|
-
style:
|
|
697
|
+
className: C(`${r}-trigger`, H && `${r}-trigger-hidden`),
|
|
698
|
+
style: We,
|
|
697
699
|
"aria-haspopup": "dialog",
|
|
698
700
|
"aria-expanded": w,
|
|
699
701
|
onClick: () => {
|
|
700
|
-
y &&
|
|
702
|
+
y && G(!0);
|
|
701
703
|
},
|
|
702
|
-
children:
|
|
704
|
+
children: A
|
|
703
705
|
}
|
|
704
706
|
)
|
|
705
707
|
}
|
|
706
708
|
),
|
|
707
|
-
je && typeof document < "u" &&
|
|
709
|
+
je && typeof document < "u" && Ht(
|
|
708
710
|
je,
|
|
709
711
|
(d ? document.getElementById(d) : null) ?? document.body
|
|
710
712
|
)
|
|
711
713
|
] });
|
|
712
714
|
}
|
|
713
715
|
export {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
716
|
+
Gt as CHRONICLES_COLUMN_STYLE_PREFIXES,
|
|
717
|
+
q as CHRONICLES_COLUMN_WIDTH_KEYS,
|
|
718
|
+
jt as CHRONICLES_EXTRA_TITLE_KEYS,
|
|
719
|
+
fo as CHRONICLES_PANEL_POSITIONS,
|
|
720
|
+
vo as Chronicles,
|
|
721
|
+
go as applyChroniclesColumnCountChange,
|
|
722
|
+
qt as getChroniclesEqualColumnWidths
|
|
721
723
|
};
|