@cntrl-site/components 1.0.120 → 1.0.121

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.
Files changed (30) hide show
  1. package/dist/{Burger-C8JIQQwm.mjs → Burger-BKeZH3HS.mjs} +1 -1
  2. package/dist/{Burger-C_SjPZWp.js → Burger-DxjmS1t5.js} +1 -1
  3. package/dist/{Chronicles-BNvvaFYY.mjs → Chronicles-BXfNFANB.mjs} +1 -1
  4. package/dist/{Chronicles-Dj1gvNjE.js → Chronicles-mir8oCdq.js} +1 -1
  5. package/dist/{ChroniclesComponent-8lhIeord.mjs → ChroniclesComponent-CH-c7QBm.mjs} +18 -35
  6. package/dist/{ChroniclesComponent-5ZbqHNpi.js → ChroniclesComponent-D425pM5e.js} +1 -1
  7. package/dist/Components/Slider20/Slider20.d.ts +1 -2
  8. package/dist/{LightboxJournal-BDUs6T0B.mjs → LightboxJournal-By2sN-Ix.mjs} +1 -1
  9. package/dist/{LightboxJournal-Bf_rZzmz.js → LightboxJournal-DEQXz8wX.js} +1 -1
  10. package/dist/{LightboxStrip-Cuhb2fIR.mjs → LightboxStrip-GwaY8uLD.mjs} +1 -1
  11. package/dist/{LightboxStrip-RA4ABUC-.js → LightboxStrip-XbD9uQKr.js} +1 -1
  12. package/dist/Slider20-BOmjDRf2.js +272 -0
  13. package/dist/Slider20-DUi6qwnd.mjs +851 -0
  14. package/dist/{components-CBJ6asBX.mjs → components-BN4QKcJm.mjs} +1 -1
  15. package/dist/{components-BHB4G3ma.js → components-QZW1MaQM.js} +1 -1
  16. package/dist/elements.js +1 -1
  17. package/dist/elements.mjs +5 -5
  18. package/dist/elements.node.js +1 -1
  19. package/dist/elements.node.mjs +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.mjs +2 -2
  22. package/dist/sources.js +168 -213
  23. package/dist/sources.mjs +167 -212
  24. package/dist/useLightboxScrollLock-CjSZPvqJ.mjs +18 -0
  25. package/dist/useLightboxScrollLock-CmwKl-Vu.js +1 -0
  26. package/package.json +1 -1
  27. package/dist/Slider20-C2o_EB1I.mjs +0 -872
  28. package/dist/Slider20-DzxWCTg-.js +0 -273
  29. package/dist/useLightboxScrollLock-Hf16Eq4g.js +0 -1
  30. package/dist/useLightboxScrollLock-VQ07s7EJ.mjs +0 -18
@@ -0,0 +1,851 @@
1
+ import { jsxs as R, Fragment as zo, jsx as s } from "react/jsx-runtime";
2
+ import { useState as D, useRef as k, useCallback as E, useEffect as B } from "react";
3
+ import x from "classnames";
4
+ import { R as te } from "./RichTextRenderer-D52Xto59.mjs";
5
+ import { s as C } from "./scalingValue-C9JH5L6O.mjs";
6
+ import { S as Oo } from "./SvgImage-B5mR9y6q.mjs";
7
+ import { t as re } from "./textStylesToCss-05Mn6I_2.mjs";
8
+ import { u as ne } from "./useScopedStyles-DhBG3557.mjs";
9
+ const j = 500, Ho = "cubic-bezier(0.25, 1, 0.5, 1)", ae = 300, ie = 5, ce = 0.15, le = 0.4, se = 100, W = 100, _o = {
10
+ color: "#000000",
11
+ hover: "#cccccc"
12
+ }, J = {
13
+ offset: { x: 0, y: 0 },
14
+ colors: {
15
+ pagination: "#cccccc",
16
+ inactive: "#cccccc",
17
+ background: "#000000"
18
+ }
19
+ }, de = {
20
+ s: {
21
+ paddingY: 5,
22
+ paddingActive: 5,
23
+ borderRadius: 9,
24
+ dot: 4,
25
+ activeDot: 8,
26
+ gapInactive: 9,
27
+ inset: 5
28
+ },
29
+ m: {
30
+ paddingY: 7,
31
+ paddingActive: 7,
32
+ borderRadius: 17,
33
+ dot: 8,
34
+ activeDot: 20,
35
+ gapInactive: 22,
36
+ inset: 7
37
+ },
38
+ l: {
39
+ paddingY: 10,
40
+ paddingActive: 10,
41
+ borderRadius: 29,
42
+ dot: 20,
43
+ activeDot: 38,
44
+ gapInactive: 26,
45
+ inset: 10
46
+ }
47
+ }, $o = {
48
+ offset: { x: 0, y: 0 },
49
+ linkColor: "#cccccc"
50
+ }, Fo = {
51
+ sizeType: "drag",
52
+ value: 3
53
+ }, pe = "left";
54
+ function ue(o, a) {
55
+ var b, u;
56
+ const n = {
57
+ fontSettings: {
58
+ fontFamily: (o == null ? void 0 : o.titleFontFamily) ?? "Arial",
59
+ fontWeight: ((b = o == null ? void 0 : o.titleFontSettings) == null ? void 0 : b.fontWeight) ?? 400,
60
+ fontStyle: ((u = o == null ? void 0 : o.titleFontSettings) == null ? void 0 : u.fontStyle) ?? "normal"
61
+ },
62
+ fontSize: (o == null ? void 0 : o.titleFontSize) ?? 0.02,
63
+ lineHeight: (o == null ? void 0 : o.titleLineHeight) ?? 0.02,
64
+ letterSpacing: (o == null ? void 0 : o.titleLetterSpacing) ?? 0,
65
+ wordSpacing: (o == null ? void 0 : o.titleWordSpacing) ?? 0,
66
+ textAppearance: o == null ? void 0 : o.titleTextAppearance,
67
+ textAlign: pe,
68
+ color: (o == null ? void 0 : o.titleColor) ?? "#000000"
69
+ };
70
+ return re(n, a);
71
+ }
72
+ function G(o, a, n) {
73
+ return `${o}: ${C(a / 1440, n)};`;
74
+ }
75
+ function Q(o, a) {
76
+ return a <= 0 ? 0 : (o % a + a) % a;
77
+ }
78
+ function fe(o, a, n, b) {
79
+ if (!b)
80
+ return { position: Q(o + a, n), hitBoundary: !1 };
81
+ const u = o + a;
82
+ return u >= 0 && u <= n + 1 ? { position: u, hitBoundary: !1 } : {
83
+ position: a > 0 ? n + 1 : 0,
84
+ hitBoundary: !0
85
+ };
86
+ }
87
+ function me(o, a) {
88
+ const n = new DOMMatrixReadOnly(window.getComputedStyle(o).transform);
89
+ return a ? n.m41 : n.m42;
90
+ }
91
+ function he(o, a) {
92
+ const n = document.createElement("div");
93
+ n.className = a, n.setAttribute("aria-hidden", "true"), o.appendChild(n);
94
+ const b = (U, eo) => {
95
+ n.style.transform = `translate(${U}px, ${eo}px)`;
96
+ const K = n.getBoundingClientRect();
97
+ return { x: K.left, y: K.top };
98
+ }, u = b(0, 0), r = b(W, 0), P = b(0, W);
99
+ o.removeChild(n);
100
+ const g = {
101
+ x: (r.x - u.x) / W,
102
+ y: (r.y - u.y) / W
103
+ }, c = {
104
+ x: (P.x - u.x) / W,
105
+ y: (P.y - u.y) / W
106
+ }, oo = g.x * c.y - c.x * g.y;
107
+ return { ex: g, ey: c, det: oo };
108
+ }
109
+ function ve(o, a, n) {
110
+ const { ex: b, ey: u, det: r } = o;
111
+ return {
112
+ x: (a * u.y - n * u.x) / r,
113
+ y: (b.x * n - b.y * a) / r
114
+ };
115
+ }
116
+ function $e(o, a) {
117
+ return `
118
+ .${o}-wrapper {
119
+ position: relative;
120
+ width: 100%;
121
+ height: 100%;
122
+ overflow: visible;
123
+ }
124
+ .${o}-wrapper:hover .${o}-hover-arrow {
125
+ opacity: 1 !important;
126
+ }
127
+ .${o}-slider-inner {
128
+ position: relative;
129
+ width: 100%;
130
+ height: 100%;
131
+ }
132
+ .${o}-track {
133
+ position: absolute;
134
+ top: 0;
135
+ left: 0;
136
+ width: 100%;
137
+ height: 100%;
138
+ overflow: hidden;
139
+ }
140
+ .${o}-axis-probe {
141
+ position: absolute;
142
+ top: 0;
143
+ left: 0;
144
+ width: 0;
145
+ height: 0;
146
+ pointer-events: none;
147
+ visibility: hidden;
148
+ }
149
+ .${o}-track-draggable {
150
+ touch-action: pan-y;
151
+ }
152
+ .${o}-track-draggable-vertical {
153
+ touch-action: pan-x;
154
+ }
155
+ .${o}-track-draggable .${o}-list {
156
+ user-select: none;
157
+ -webkit-user-select: none;
158
+ }
159
+ .${o}-track-draggable .${o}-slider-image {
160
+ -webkit-user-drag: none;
161
+ }
162
+ .${o}-list {
163
+ position: relative;
164
+ width: 100%;
165
+ height: 100%;
166
+ }
167
+ .${o}-list-slide {
168
+ display: flex;
169
+ flex-direction: row;
170
+ will-change: transform;
171
+ }
172
+ .${o}-list-slide-vertical {
173
+ flex-direction: column;
174
+ }
175
+ .${o}-list-fade {
176
+ display: block;
177
+ }
178
+ .${o}-slide {
179
+ position: relative;
180
+ flex: 0 0 100%;
181
+ width: 100%;
182
+ height: 100%;
183
+ }
184
+ .${o}-list-fade .${o}-slide {
185
+ position: absolute;
186
+ top: 0;
187
+ left: 0;
188
+ opacity: 0;
189
+ transition: opacity ${j}ms ${Ho};
190
+ }
191
+ .${o}-list-fade .${o}-slide.${o}-is-active {
192
+ opacity: 1;
193
+ z-index: 1;
194
+ }
195
+ .${o}-slider-item {
196
+ width: 100%;
197
+ height: 100%;
198
+ display: flex;
199
+ position: relative;
200
+ }
201
+ .${o}-slider-image {
202
+ width: 100%;
203
+ height: 100%;
204
+ object-fit: cover;
205
+ }
206
+ .${o}-arrow {
207
+ position: absolute;
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ border: none;
212
+ background-color: transparent;
213
+ top: 50%;
214
+ z-index: 3;
215
+ padding: 0;
216
+ ${G("width", 30, a)}
217
+ ${G("height", 30, a)}
218
+ transition: opacity 0.15s ease-in-out;
219
+ }
220
+ .${o}-arrow-prev {
221
+ ${G("left", -20, a)}
222
+ transform: translate3d(-50%, -50%, 0);
223
+ }
224
+ .${o}-arrow-next {
225
+ left: unset;
226
+ ${G("right", -20, a)}
227
+ transform: translate3d(50%, -50%, 0);
228
+ }
229
+ .${o}-arrow-prev-vertical {
230
+ left: 50%;
231
+ ${G("top", -20, a)}
232
+ transform: translate3d(-50%, -50%, 0);
233
+ }
234
+ .${o}-arrow-next-vertical {
235
+ left: 50%;
236
+ right: unset;
237
+ top: unset;
238
+ ${G("bottom", -20, a)}
239
+ transform: translate3d(-50%, 50%, 0);
240
+ }
241
+ .${o}-arrow-hidden {
242
+ opacity: 0;
243
+ pointer-events: none;
244
+ }
245
+ .${o}-hover-arrow {
246
+ opacity: 0;
247
+ transition: opacity 0.15s ease-in-out;
248
+ }
249
+ .${o}-hover-arrow:hover {
250
+ opacity: 1;
251
+ }
252
+ .${o}-arrow-inner {
253
+ all: unset;
254
+ cursor: pointer;
255
+ width: 100%;
256
+ height: 100%;
257
+ }
258
+ .${o}-arrow-inner:hover .${o}-arrow-icon path {
259
+ fill: var(--arrow-hover-color) !important;
260
+ }
261
+ .${o}-arrow-img {
262
+ position: absolute;
263
+ top: 50%;
264
+ left: 50%;
265
+ transform: translate(-50%, -50%);
266
+ }
267
+ .${o}-arrow-icon {
268
+ width: 100%;
269
+ height: 100%;
270
+ overflow: visible;
271
+ }
272
+ .${o}-arrow-icon path {
273
+ transition: fill 0.15s ease-in-out;
274
+ }
275
+ .${o}-mirror {
276
+ transform: translate(-50%, -50%) scaleX(-1) !important;
277
+ }
278
+ .${o}-pagination {
279
+ position: absolute;
280
+ z-index: 3;
281
+ border-radius: 50%;
282
+ }
283
+ .${o}-pagination-inner {
284
+ display: flex;
285
+ align-items: center;
286
+ box-sizing: border-box;
287
+ }
288
+ .${o}-pagination-vertical {
289
+ flex-direction: column;
290
+ }
291
+ .${o}-pagination-item {
292
+ all: unset;
293
+ flex-shrink: 0;
294
+ position: relative;
295
+ display: flex;
296
+ align-items: center;
297
+ justify-content: center;
298
+ cursor: pointer;
299
+ aspect-ratio: 1;
300
+ height: auto;
301
+ }
302
+ .${o}-dot {
303
+ border-radius: 50%;
304
+ aspect-ratio: 1;
305
+ height: auto;
306
+ transition: background-color 0.3s ease-in-out;
307
+ }
308
+ .${o}-animate-dots .${o}-dot {
309
+ transition: background-color 0.3s ease-in-out, width 0.3s ease-in-out;
310
+ }
311
+ .${o}-pagination-inside-bottom {
312
+ left: 50%;
313
+ transform: translate3d(-50%, 0, 0);
314
+ }
315
+ .${o}-pagination-inside-left {
316
+ top: 50%;
317
+ transform: translate3d(0, -50%, 0);
318
+ }
319
+ .${o}-img-wrapper {
320
+ width: 100%;
321
+ height: 100%;
322
+ }
323
+ .${o}-control {
324
+ position: relative;
325
+ z-index: 2;
326
+ width: 100%;
327
+ }
328
+ .${o}-caption-block {
329
+ pointer-events: none;
330
+ position: absolute;
331
+ top: 100%;
332
+ left: 0;
333
+ right: 0;
334
+ z-index: 1;
335
+ }
336
+ .${o}-caption-text-wrapper {
337
+ position: relative;
338
+ width: 100%;
339
+ }
340
+ .${o}-caption-text {
341
+ pointer-events: none;
342
+ max-width: 100%;
343
+ transition-property: opacity;
344
+ transition-timing-function: ease-in-out;
345
+ position: absolute;
346
+ top: 0;
347
+ left: 0;
348
+ display: inline-block;
349
+ white-space: pre-wrap;
350
+ overflow-wrap: break-word;
351
+ opacity: 0;
352
+ }
353
+ .${o}-caption-text.${o}-active {
354
+ opacity: 1;
355
+ }
356
+ .${o}-with-pointer-events {
357
+ pointer-events: auto;
358
+ }
359
+ .${o}-click-overlay {
360
+ position: absolute;
361
+ top: 0;
362
+ left: 0;
363
+ width: 100%;
364
+ height: 100%;
365
+ cursor: pointer;
366
+ z-index: 2;
367
+ }
368
+ .${o}-contain {
369
+ object-fit: contain;
370
+ }
371
+ .${o}-cover {
372
+ object-fit: cover;
373
+ }
374
+ .${o}-transition-reveal .${o}-slide.${o}-is-active .${o}-slider-image {
375
+ animation: ${o}-reveal-horizontal ${j}ms ease;
376
+ }
377
+ .${o}-transition-reveal-vertical .${o}-slide.${o}-is-active .${o}-slider-image {
378
+ animation: ${o}-reveal-vertical ${j}ms ease;
379
+ }
380
+ @keyframes ${o}-reveal-horizontal {
381
+ from { clip-path: inset(0 100% 0 0); }
382
+ to { clip-path: inset(0 0 0 0); }
383
+ }
384
+ @keyframes ${o}-reveal-vertical {
385
+ from { clip-path: inset(100% 0 0 0); }
386
+ to { clip-path: inset(0 0 0 0); }
387
+ }
388
+ `;
389
+ }
390
+ function Te({ settings: o, content: a, isEditor: n, isPreviewMode: b, isEditMode: u }) {
391
+ const { prefix: r } = ne(), P = ue(o, n), g = a ?? [], c = g.length, oo = (o == null ? void 0 : o.trigger) ?? Fo, U = oo.sizeType ?? "drag", eo = oo.value ?? Fo.value, K = (o == null ? void 0 : o.direction) ?? "horizontal", lo = (o == null ? void 0 : o.transition) ?? "slide", Xo = (o == null ? void 0 : o.nav) ?? "classic", wo = (o == null ? void 0 : o.navSize) ?? "m", p = de[wo], Bo = typeof (o == null ? void 0 : o.navUnit) == "number" ? o.navUnit : 1 / 1440, m = (e) => C(e * Bo, n), yo = (o == null ? void 0 : o.show) ?? "always", _ = (o == null ? void 0 : o.controls) ?? null, bo = typeof (o == null ? void 0 : o.controlsMaxWidth) == "number" ? o.controlsMaxWidth : 65 / 1440, xo = typeof (o == null ? void 0 : o.paddingX) == "number" ? o.paddingX : 0, Co = typeof (o == null ? void 0 : o.paddingY) == "number" ? o.paddingY : 0, F = (o == null ? void 0 : o.controlsColor) ?? _o.color, to = (o == null ? void 0 : o.controlsHoverColor) ?? _o.hover, Wo = (o == null ? void 0 : o.navColor) ?? J.colors.inactive, Go = (o == null ? void 0 : o.navPaginationColor) ?? J.colors.pagination, jo = (o == null ? void 0 : o.navBackgroundColor) ?? J.colors.background, go = (o == null ? void 0 : o.linkColor) ?? $o.linkColor, Uo = typeof (o == null ? void 0 : o.captionMarginTop) == "number" ? o.captionMarginTop : 0, d = K === "horizontal", Ko = U === "click", so = U === "drag", Io = U === "auto" && (!n || !!b), So = !n, h = lo === "slide", Vo = Xo === "classic", qo = yo !== "never" && bo > 0, To = yo === "on hover", po = C(bo, n), ro = {
392
+ width: po,
393
+ height: po,
394
+ maxWidth: po
395
+ }, v = h && c > 1, [$, no] = D(0), [L, A] = D(v ? 1 : 0), [ko, Zo] = D(!1), [uo, N] = D(!1), [Eo, fo] = D(!1), [Ao, z] = D(0), [mo, ho] = D(!1), [No, Mo] = D(!1), vo = k(!1), M = k(L);
396
+ M.current = L;
397
+ const Y = k(null), V = k(0), ao = k(null), Ro = k(null), H = k(null), O = k(null), S = E((e) => {
398
+ vo.current = e, Zo(e);
399
+ }, []), X = E((e) => {
400
+ if (c < 2 || e === 0) return;
401
+ const t = e > 0 ? 1 : -1, i = Math.abs(e);
402
+ if (ho(!0), S(!0), !h) {
403
+ no((T) => Q(T + e, c));
404
+ return;
405
+ }
406
+ let l = M.current;
407
+ const w = v && (l === 0 || l === c + 1), y = w ? $ + 1 : null;
408
+ w && (l = $ + 1);
409
+ let f = i;
410
+ for (; f > 0; ) {
411
+ const T = fe(l, t, c, v);
412
+ if (l = T.position, f -= 1, T.hitBoundary) {
413
+ V.current = f * t;
414
+ break;
415
+ }
416
+ }
417
+ const I = i - f;
418
+ if (I > 0 && no((T) => Q(T + I * t, c)), M.current = l, y !== null) {
419
+ if (M.current = y, l === y) {
420
+ N(!0), A(l);
421
+ return;
422
+ }
423
+ Y.current = l, N(!0), A(y);
424
+ return;
425
+ }
426
+ N(!1), A(l);
427
+ }, [$, c, v, h, S]), q = E((e) => {
428
+ X(e);
429
+ }, [X]), Jo = E((e) => {
430
+ if (c < 2) return;
431
+ const t = Q(e, c);
432
+ if (!(t === $ && !vo.current) && (ho(!0), S(!0), no(t), h)) {
433
+ const i = t + (v ? 1 : 0);
434
+ Y.current = null, V.current = 0, M.current = i, N(!1), A(i);
435
+ }
436
+ }, [$, c, v, h, S]);
437
+ B(() => {
438
+ if (!ko) return;
439
+ const e = window.setTimeout(() => {
440
+ if (v && (L === 0 || L === c + 1)) {
441
+ Y.current = null, N(!0), A($ + 1);
442
+ return;
443
+ }
444
+ S(!1);
445
+ }, j);
446
+ return () => window.clearTimeout(e);
447
+ }, [$, c, v, ko, S, L]), B(() => {
448
+ if (!uo) return;
449
+ let e = 0;
450
+ const t = requestAnimationFrame(() => {
451
+ e = requestAnimationFrame(() => {
452
+ const i = Y.current;
453
+ Y.current = null;
454
+ const l = V.current;
455
+ if (V.current = 0, N(!1), i !== null) {
456
+ M.current = i, A(i);
457
+ return;
458
+ }
459
+ if (l !== 0) {
460
+ X(l);
461
+ return;
462
+ }
463
+ S(!1);
464
+ });
465
+ });
466
+ return () => {
467
+ cancelAnimationFrame(t), cancelAnimationFrame(e);
468
+ };
469
+ }, [X, S, uo]);
470
+ const io = `${v}:${c}`, Do = k(io);
471
+ B(() => {
472
+ if (Do.current === io) return;
473
+ Do.current = io;
474
+ const e = c > 0 ? Math.min($, c - 1) : 0;
475
+ H.current = null, O.current = null, fo(!1), z(0), no(e), N(!0), A(e + (v ? 1 : 0));
476
+ }, [$, c, v, io]), B(() => {
477
+ if (!mo) return;
478
+ const e = window.setTimeout(() => ho(!1), ae);
479
+ return () => window.clearTimeout(e);
480
+ }, [mo, $]), B(() => {
481
+ if (!Io || c < 2) return;
482
+ const e = Math.max(eo, 0.1) * 1e3, t = window.setInterval(() => {
483
+ So && No || q(1);
484
+ }, e);
485
+ return () => window.clearInterval(t);
486
+ }, [eo, c, q, Io, No, So]);
487
+ const Z = E((e) => {
488
+ const t = H.current;
489
+ if (!t || t.pointerId !== e.pointerId) return;
490
+ H.current = null, O.current = null;
491
+ const i = ao.current;
492
+ if (i != null && i.hasPointerCapture(e.pointerId) && i.releasePointerCapture(e.pointerId), !t.isActive) {
493
+ h && z(0);
494
+ return;
495
+ }
496
+ const w = !(e.timeStamp - t.lastTime > se) && Math.abs(t.velocity) > le, y = t.size > 0 && Math.abs(t.offset - t.baseOffset) > t.size * ce;
497
+ if (fo(!1), !w && !y) {
498
+ z(0);
499
+ return;
500
+ }
501
+ const f = y ? t.offset - t.baseOffset : t.velocity;
502
+ let I = 1;
503
+ y && t.size > 0 && (I = Math.max(1, Math.round(Math.abs(f) / t.size))), z(0), X(f < 0 ? I : -I);
504
+ }, [X, h]);
505
+ B(() => {
506
+ const e = (t) => {
507
+ O.current === null || t.pointerId !== O.current || Z(t);
508
+ };
509
+ return window.addEventListener("pointerup", e), window.addEventListener("pointercancel", e), () => {
510
+ window.removeEventListener("pointerup", e), window.removeEventListener("pointercancel", e);
511
+ };
512
+ }, [Z]);
513
+ const Qo = (e) => {
514
+ const t = ao.current;
515
+ if (!so || c < 2 || !t || e.pointerType === "mouse" && e.button !== 0) return;
516
+ Y.current = null, V.current = 0, vo.current && S(!1);
517
+ let i = 0;
518
+ const l = Ro.current;
519
+ if (h && l) {
520
+ const w = d ? l.offsetWidth : l.offsetHeight;
521
+ if (w > 0) {
522
+ const y = me(l, d);
523
+ let f = M.current;
524
+ v && (f === 0 || f === c + 1) ? (f = $ + 1, M.current = f, N(!0), A(f), i = 0) : i = y + f * w, z(i);
525
+ }
526
+ }
527
+ t.setPointerCapture(e.pointerId), O.current = e.pointerId, H.current = {
528
+ pointerId: e.pointerId,
529
+ startClientX: e.clientX,
530
+ startClientY: e.clientY,
531
+ axes: he(t, `${r}-axis-probe`),
532
+ size: d ? t.offsetWidth : t.offsetHeight,
533
+ isActive: !1,
534
+ baseOffset: i,
535
+ offset: i,
536
+ lastTime: e.timeStamp,
537
+ velocity: 0
538
+ };
539
+ }, Po = (e) => {
540
+ const t = H.current;
541
+ if (!t || t.pointerId !== e.pointerId) return;
542
+ if (e.pointerType === "mouse" && e.buttons === 0) {
543
+ Z(e);
544
+ return;
545
+ }
546
+ const i = e.clientX - t.startClientX, l = e.clientY - t.startClientY, w = t.axes ? ve(t.axes, i, l) : { x: i, y: l }, y = d ? w.x : w.y, f = d ? w.y : w.x, I = t.baseOffset + y;
547
+ if (!t.isActive) {
548
+ if (Math.max(Math.abs(y), Math.abs(f)) < ie) return;
549
+ if (Math.abs(f) > Math.abs(y)) {
550
+ const co = ao.current;
551
+ co != null && co.hasPointerCapture(t.pointerId) && co.releasePointerCapture(t.pointerId), H.current = null, O.current = null, h && z(0);
552
+ return;
553
+ }
554
+ t.isActive = !0, fo(!0);
555
+ }
556
+ const T = e.timeStamp - t.lastTime;
557
+ T > 0 && (t.velocity = (I - t.offset) / T, t.lastTime = e.timeStamp), t.offset = I, h && z(I);
558
+ }, Lo = (e) => {
559
+ Z(e);
560
+ }, oe = d ? `translate3d(calc(${-L * 100}% + ${Ao}px), 0, 0)` : `translate3d(0, calc(${-L * 100}% + ${Ao}px), 0)`, ee = v ? [g[c - 1], ...g, g[0]] : g;
561
+ return /* @__PURE__ */ R(zo, { children: [
562
+ /* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: $e(r, n) } }),
563
+ /* @__PURE__ */ R(
564
+ "div",
565
+ {
566
+ className: x(`${r}-wrapper`, {
567
+ [`${r}-transition-reveal`]: lo === "reveal",
568
+ [`${r}-transition-reveal-vertical`]: lo === "reveal" && !d
569
+ }),
570
+ onMouseEnter: () => Mo(!0),
571
+ onMouseLeave: () => Mo(!1),
572
+ children: [
573
+ /* @__PURE__ */ R(
574
+ "div",
575
+ {
576
+ className: `${r}-slider-inner`,
577
+ style: {
578
+ backgroundColor: "transparent"
579
+ },
580
+ children: [
581
+ /* @__PURE__ */ R(
582
+ "div",
583
+ {
584
+ ref: ao,
585
+ className: x(`${r}-track`, {
586
+ [`${r}-track-draggable`]: so,
587
+ [`${r}-track-draggable-vertical`]: so && !d
588
+ }),
589
+ onPointerDown: Qo,
590
+ onPointerMove: Po,
591
+ onPointerUp: Lo,
592
+ onPointerCancel: Lo,
593
+ onLostPointerCapture: (e) => {
594
+ O.current === e.pointerId && Z(e);
595
+ },
596
+ children: [
597
+ /* @__PURE__ */ s(
598
+ "div",
599
+ {
600
+ ref: Ro,
601
+ className: x(`${r}-list`, {
602
+ [`${r}-list-slide`]: h,
603
+ [`${r}-list-slide-vertical`]: h && !d,
604
+ [`${r}-list-fade`]: !h
605
+ }),
606
+ style: h ? {
607
+ transform: oe,
608
+ transition: Eo || uo ? "none" : `transform ${j}ms ${Ho}`
609
+ } : void 0,
610
+ children: ee.map((e, t) => {
611
+ const i = v ? Q(t - 1, c) : t, w = v && (t === 0 || t === c + 1) ? `clone-${t === 0 ? "start" : "end"}` : `slide-${i}`;
612
+ return /* @__PURE__ */ s(
613
+ "div",
614
+ {
615
+ className: x(`${r}-slide`, {
616
+ [`${r}-is-active`]: !h && i === $
617
+ }),
618
+ children: /* @__PURE__ */ s("div", { className: `${r}-slider-item`, children: /* @__PURE__ */ s("div", { className: `${r}-img-wrapper`, children: /* @__PURE__ */ s(
619
+ "img",
620
+ {
621
+ className: x(`${r}-slider-image`, {
622
+ [`${r}-contain`]: e.image.objectFit === "contain",
623
+ [`${r}-cover`]: e.image.objectFit === "cover"
624
+ }),
625
+ src: e.image.assetId,
626
+ alt: e.image.name ?? "",
627
+ draggable: !1
628
+ }
629
+ ) }) })
630
+ },
631
+ w
632
+ );
633
+ })
634
+ }
635
+ ),
636
+ Ko && /* @__PURE__ */ s(
637
+ "div",
638
+ {
639
+ className: `${r}-click-overlay`,
640
+ onClick: () => q(1)
641
+ }
642
+ )
643
+ ]
644
+ }
645
+ ),
646
+ qo && /* @__PURE__ */ R(zo, { children: [
647
+ /* @__PURE__ */ s(
648
+ "div",
649
+ {
650
+ className: x(`${r}-arrow`, {
651
+ [`${r}-arrow-prev`]: d,
652
+ [`${r}-arrow-prev-vertical`]: !d,
653
+ [`${r}-hover-arrow`]: To
654
+ }),
655
+ style: {
656
+ color: F,
657
+ "--arrow-hover-color": to,
658
+ ...ro
659
+ },
660
+ children: /* @__PURE__ */ R(
661
+ "button",
662
+ {
663
+ onClick: (e) => {
664
+ e.stopPropagation(), q(-1);
665
+ },
666
+ className: `${r}-arrow-inner`,
667
+ style: {
668
+ transform: `translate(${C(xo, n)}, ${C(Co * (d ? 1 : -1), n)}) rotate(${d ? "0deg" : "90deg"})`
669
+ },
670
+ children: [
671
+ _ && /* @__PURE__ */ s(
672
+ Oo,
673
+ {
674
+ url: _,
675
+ fill: F,
676
+ hoverFill: to,
677
+ className: x(`${r}-arrow-img`, `${r}-mirror`),
678
+ style: ro
679
+ }
680
+ ),
681
+ !_ && /* @__PURE__ */ s(
682
+ Yo,
683
+ {
684
+ color: F,
685
+ className: x(`${r}-arrow-icon`, `${r}-arrow-img`, `${r}-mirror`)
686
+ }
687
+ )
688
+ ]
689
+ }
690
+ )
691
+ }
692
+ ),
693
+ /* @__PURE__ */ s(
694
+ "div",
695
+ {
696
+ className: x(`${r}-arrow`, {
697
+ [`${r}-arrow-next`]: d,
698
+ [`${r}-arrow-next-vertical`]: !d,
699
+ [`${r}-hover-arrow`]: To
700
+ }),
701
+ style: {
702
+ color: F,
703
+ "--arrow-hover-color": to,
704
+ ...ro
705
+ },
706
+ children: /* @__PURE__ */ R(
707
+ "button",
708
+ {
709
+ className: `${r}-arrow-inner`,
710
+ onClick: (e) => {
711
+ e.stopPropagation(), q(1);
712
+ },
713
+ style: {
714
+ transform: `translate(${C(xo * (d ? -1 : 1), n)}, ${C(Co, n)}) rotate(${d ? "0deg" : "90deg"})`
715
+ },
716
+ children: [
717
+ _ && /* @__PURE__ */ s(
718
+ Oo,
719
+ {
720
+ url: _,
721
+ fill: F,
722
+ hoverFill: to,
723
+ className: `${r}-arrow-img`,
724
+ style: ro
725
+ }
726
+ ),
727
+ !_ && /* @__PURE__ */ s(Yo, { color: F, className: x(`${r}-arrow-icon`, `${r}-arrow-img`) })
728
+ ]
729
+ }
730
+ )
731
+ }
732
+ )
733
+ ] }),
734
+ Vo && /* @__PURE__ */ s(
735
+ "div",
736
+ {
737
+ className: x(`${r}-pagination`, {
738
+ [`${r}-pagination-inside-bottom`]: d,
739
+ [`${r}-pagination-inside-left`]: !d
740
+ }),
741
+ style: d ? { bottom: m(p.inset) } : { left: m(p.inset) },
742
+ children: /* @__PURE__ */ s(
743
+ "div",
744
+ {
745
+ className: x(`${r}-pagination-inner`, {
746
+ [`${r}-pagination-vertical`]: !d,
747
+ [`${r}-animate-dots`]: mo
748
+ }),
749
+ style: {
750
+ backgroundColor: jo,
751
+ gap: m(p.gapInactive - p.activeDot + p.dot),
752
+ ...d ? {
753
+ height: m(p.activeDot + p.paddingY * 2),
754
+ paddingTop: m(p.paddingY),
755
+ paddingBottom: m(p.paddingY),
756
+ paddingLeft: m(p.paddingActive),
757
+ paddingRight: m(p.paddingActive)
758
+ } : {
759
+ width: m(p.activeDot + p.paddingY * 2),
760
+ paddingLeft: m(p.paddingY),
761
+ paddingRight: m(p.paddingY),
762
+ paddingTop: m(p.paddingActive),
763
+ paddingBottom: m(p.paddingActive)
764
+ },
765
+ borderRadius: m(p.borderRadius),
766
+ transform: `translate(${C(J.offset.x, n)}, ${C(J.offset.y, n)})`
767
+ },
768
+ children: g.map((e, t) => {
769
+ const i = t === $, l = i ? p.activeDot : p.dot;
770
+ return /* @__PURE__ */ s(
771
+ "button",
772
+ {
773
+ onClick: () => Jo(t),
774
+ className: `${r}-pagination-item`,
775
+ style: {
776
+ width: m(p.activeDot)
777
+ },
778
+ children: /* @__PURE__ */ s(
779
+ "div",
780
+ {
781
+ className: `${r}-dot`,
782
+ style: {
783
+ backgroundColor: i ? Go : Wo,
784
+ width: m(l)
785
+ }
786
+ }
787
+ )
788
+ },
789
+ t
790
+ );
791
+ })
792
+ },
793
+ `${wo}-${K}`
794
+ )
795
+ }
796
+ )
797
+ ]
798
+ }
799
+ ),
800
+ /* @__PURE__ */ R("div", { className: `${r}-caption-block`, children: [
801
+ /* @__PURE__ */ s(
802
+ "div",
803
+ {
804
+ "data-controls": u ? "captionMarginTop" : void 0,
805
+ className: u ? `${r}-control` : void 0,
806
+ style: {
807
+ height: C(Uo, n)
808
+ }
809
+ }
810
+ ),
811
+ /* @__PURE__ */ s("div", { className: `${r}-caption-text-wrapper`, children: g.map((e, t) => /* @__PURE__ */ s(
812
+ "div",
813
+ {
814
+ className: x(`${r}-caption-text`, {
815
+ [`${r}-with-pointer-events`]: t === $ && n,
816
+ [`${r}-active`]: t === $
817
+ }),
818
+ style: {
819
+ ...P,
820
+ width: "max-content",
821
+ transitionDuration: `${Math.round(j / 2)}ms`
822
+ },
823
+ children: /* @__PURE__ */ s(
824
+ "div",
825
+ {
826
+ className: `${r}-caption-text-inner`,
827
+ style: {
828
+ "--link-color": go,
829
+ "--link-hover-color": go,
830
+ position: "relative",
831
+ top: C($o.offset.y, n),
832
+ left: C($o.offset.x, n)
833
+ },
834
+ children: /* @__PURE__ */ s(te, { content: e.imageCaption })
835
+ }
836
+ )
837
+ },
838
+ t
839
+ )) })
840
+ ] })
841
+ ]
842
+ }
843
+ )
844
+ ] });
845
+ }
846
+ function Yo({ color: o, className: a }) {
847
+ return /* @__PURE__ */ s("svg", { viewBox: "0 0 10 18", className: a, children: /* @__PURE__ */ s("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ s("path", { d: "M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z", id: "Shape-Copy", fill: o, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
848
+ }
849
+ export {
850
+ Te as Slider20
851
+ };