@cntrl-site/components 1.0.101 → 1.0.102
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/README.md +25 -1
- package/dist/Burger-C6jI6C1c.js +661 -0
- package/dist/Burger-EMSn7TPB.mjs +1807 -0
- package/dist/ClickGallerie-D_O1XhAO.mjs +270 -0
- package/dist/ClickGallerie-M9xdGR1G.js +36 -0
- package/dist/Components/Burger/BurgerComponent.d.ts +0 -1
- package/dist/Components/ClickGallerie/ClickGallerieComponent.d.ts +0 -1
- package/dist/Components/FAQ/FAQComponent.d.ts +0 -1
- package/dist/Components/Form/FormComponent.d.ts +0 -1
- package/dist/Components/Grid/GridComponent.d.ts +0 -1
- package/dist/Components/Helix/HelixComponent.d.ts +0 -1
- package/dist/Components/Hive/HiveComponent.d.ts +0 -1
- package/dist/Components/LightboxJournal/LightboxJournalComponent.d.ts +0 -1
- package/dist/Components/LightboxStrip/LightboxStripComponent.d.ts +0 -1
- package/dist/Components/List/ListComponent.d.ts +0 -1
- package/dist/Components/Marquee/MarqueeComponent.d.ts +0 -1
- package/dist/Components/MarqueeText/MarqueeTextComponent.d.ts +0 -1
- package/dist/Components/Mercury/MercuryComponent.d.ts +0 -1
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +0 -1
- package/dist/Components/Pretext/PretextComponent.d.ts +0 -1
- package/dist/Components/Scale/ScaleComponent.d.ts +0 -1
- package/dist/Components/SimpleButton/SimpleButtonComponent.d.ts +0 -1
- package/dist/Components/Slider20/Slider20Component.d.ts +0 -1
- package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +0 -1
- package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +0 -1
- package/dist/Components/Waterfall/WaterfallComponent.d.ts +0 -1
- package/dist/ControlSlider-SiOt22l_.js +1 -0
- package/dist/ControlSlider-pZv7H6BU.mjs +334 -0
- package/dist/FAQ-C7823fyi.js +166 -0
- package/dist/FAQ-CZ39u4m8.mjs +588 -0
- package/dist/Form-BX5_41nb.mjs +472 -0
- package/dist/Form-Dn-6A1He.js +153 -0
- package/dist/Grid-CemGhf3F.js +374 -0
- package/dist/Grid-cfQsXW3b.mjs +1553 -0
- package/dist/Helix-2Vr-9WBa.js +43 -0
- package/dist/Helix-BmkAKT1G.mjs +315 -0
- package/dist/Hive-BC6zQBsv.js +321 -0
- package/dist/Hive-BGMWinrW.mjs +1425 -0
- package/dist/HiveLightboxTitles-DhEeFKWs.mjs +507 -0
- package/dist/HiveLightboxTitles-DlyptAaK.js +1 -0
- package/dist/ImageRevealSlider-BBWtFjUF.js +1 -0
- package/dist/ImageRevealSlider-BdFGyVEP.mjs +184 -0
- package/dist/Lightbox-CIss_nOG.js +1 -0
- package/dist/Lightbox-eP9qAZzL.mjs +665 -0
- package/dist/LightboxJournal-D59ex6wH.mjs +1613 -0
- package/dist/LightboxJournal-DAEZOPDi.js +523 -0
- package/dist/LightboxStrip-BDjI1jyH.js +386 -0
- package/dist/LightboxStrip-YspzBP8N.mjs +1574 -0
- package/dist/List-C32WImI3.js +377 -0
- package/dist/List-DW7fyJbf.mjs +1891 -0
- package/dist/Marquee-BYClHHws.mjs +551 -0
- package/dist/Marquee-vmHaTGIP.js +133 -0
- package/dist/MarqueeText-4Rip_sQX.mjs +515 -0
- package/dist/MarqueeText-E6OubMOG.js +132 -0
- package/dist/Mercury-BwF_XW2w.js +267 -0
- package/dist/Mercury-DuKJQ1Zo.mjs +1701 -0
- package/dist/OnelinerForm-BEu7_sho.mjs +434 -0
- package/dist/OnelinerForm-C2Y_XMCY.js +194 -0
- package/dist/Pretext-10CcyP1E.mjs +2762 -0
- package/dist/Pretext-DvQ3xsni.js +231 -0
- package/dist/PretextComponent-C3YFICy8.js +1 -0
- package/dist/PretextComponent-Ct0newmn.mjs +11624 -0
- package/dist/RichTextRenderer-B6WtTYlR.mjs +32 -0
- package/dist/RichTextRenderer-CIy6yI8U.js +1 -0
- package/dist/Scale-976sjO8e.js +111 -0
- package/dist/Scale-rLNT4KAk.mjs +345 -0
- package/dist/SimpleButton-C-o2W9bS.mjs +451 -0
- package/dist/SimpleButton-nGEcO2gB.js +243 -0
- package/dist/Slider20-C9o2REDl.js +272 -0
- package/dist/Slider20-Dm8BeCli.mjs +851 -0
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/TestimonialGrid-CPu4qQ6B.mjs +492 -0
- package/dist/TestimonialGrid-D4ieiz9e.js +90 -0
- package/dist/TestimonialSingle-CVu15ZtV.js +125 -0
- package/dist/TestimonialSingle-DLdnAVF7.mjs +391 -0
- package/dist/Waterfall-A0FjM2my.mjs +1400 -0
- package/dist/Waterfall-DnPDHbCL.js +287 -0
- package/dist/buildColorVars-CE2D5cQV.js +1 -0
- package/dist/buildColorVars-CLyWQm5K.mjs +21 -0
- package/dist/components-OE3ac1dr.js +1 -0
- package/dist/components-w-jHX-2U.mjs +2053 -0
- package/dist/components.css +1 -1
- package/dist/elements.d.ts +7 -0
- package/dist/elements.js +1 -0
- package/dist/elements.mjs +63 -0
- package/dist/elements.node.d.ts +6 -0
- package/dist/elements.node.js +1 -0
- package/dist/elements.node.mjs +21 -0
- package/dist/forking.d.ts +1 -0
- package/dist/formFieldValidation-DZl2KVaF.js +1 -0
- package/dist/formFieldValidation-DvihFrq5.mjs +21 -0
- package/dist/getColorAlpha-BVBY0N5x.mjs +39 -0
- package/dist/getColorAlpha-CoSseoCn.js +1 -0
- package/dist/getImageRect-BQhQXvT8.js +1 -0
- package/dist/getImageRect-CBMhFNHM.mjs +109 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -28862
- package/dist/index.mjs +16 -62473
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/panelAvailability-D179wwJx.mjs +27 -0
- package/dist/panelAvailability-DnOe0rQ4.js +1 -0
- package/dist/react-splide.esm-CabaEmHi.js +6 -0
- package/dist/react-splide.esm-DQqds4PL.mjs +1750 -0
- package/dist/readTestimonialTextMeasure-BIXpGFEt.mjs +13 -0
- package/dist/readTestimonialTextMeasure-CEPaB4Sy.js +1 -0
- package/dist/scalingValue-C9JH5L6O.mjs +6 -0
- package/dist/scalingValue-CSHYgTZl.js +1 -0
- package/dist/sources.d.ts +1 -0
- package/dist/sources.js +23753 -0
- package/dist/sources.mjs +23779 -0
- package/dist/textStylesToCss-05Mn6I_2.mjs +32 -0
- package/dist/textStylesToCss-CNN3zZTV.js +1 -0
- package/dist/types/Component.d.ts +0 -1
- package/dist/useLightboxScrollLock-Hf16Eq4g.js +1 -0
- package/dist/useLightboxScrollLock-VQ07s7EJ.mjs +18 -0
- package/dist/useLightboxSwipeDismiss-Br9uE5G0.js +1 -0
- package/dist/useLightboxSwipeDismiss-SGv6Ra33.mjs +95 -0
- package/dist/useScopedStyles-Bf6yohVQ.js +1 -0
- package/dist/useScopedStyles-DhBG3557.mjs +11 -0
- package/dist/utils-033j3qNL.js +1 -0
- package/dist/utils-FxC9rcxw.mjs +247 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +17 -11
- package/package.json +31 -2
- package/dist/index-2JTNRDR1.js +0 -1
- package/dist/index-DA8t6EZ4.mjs +0 -255
- package/dist/panelAvailability-CgSic84c.mjs +0 -126
- package/dist/panelAvailability-D8c7cdbu.js +0 -1
|
@@ -0,0 +1,1425 @@
|
|
|
1
|
+
import { jsxs as kt, Fragment as be, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { s as se } from "./scalingValue-C9JH5L6O.mjs";
|
|
3
|
+
import { u as un } from "./useScopedStyles-DhBG3557.mjs";
|
|
4
|
+
import { useRef as w, useState as $, useMemo as $e, useCallback as m, useEffect as G, useLayoutEffect as le } from "react";
|
|
5
|
+
import { createPortal as dn } from "react-dom";
|
|
6
|
+
import { H as fn } from "./HiveLightboxTitles-DhEeFKWs.mjs";
|
|
7
|
+
import { g as hn } from "./getImageRect-CBMhFNHM.mjs";
|
|
8
|
+
function gn(t) {
|
|
9
|
+
return `calc(var(--cntrl-article-width, 100vw) * ${t / 1440})`;
|
|
10
|
+
}
|
|
11
|
+
function pn(t) {
|
|
12
|
+
return `
|
|
13
|
+
.${t}-wrapper {
|
|
14
|
+
display: grid;
|
|
15
|
+
align-items: start;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
min-height: ${gn(48)};
|
|
18
|
+
}
|
|
19
|
+
.${t}-item {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
.${t}-item-inner {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
outline: 1px solid #FF5C02;
|
|
30
|
+
}
|
|
31
|
+
.${t}-item-inner-hidden {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
.${t}-item-image-wrapper {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
align-self: center;
|
|
41
|
+
}
|
|
42
|
+
.${t}-item-image-link {
|
|
43
|
+
width: 100%;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
.${t}-item-image {
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
display: block;
|
|
52
|
+
max-width: 100%;
|
|
53
|
+
}
|
|
54
|
+
.${t}-item-video {
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
display: block;
|
|
58
|
+
max-width: 100%;
|
|
59
|
+
}
|
|
60
|
+
.${t}-image-align-top .${t}-item-image-wrapper {
|
|
61
|
+
align-items: flex-start;
|
|
62
|
+
}
|
|
63
|
+
.${t}-image-align-center .${t}-item-image-wrapper {
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
.${t}-image-align-bottom .${t}-item-image-wrapper {
|
|
67
|
+
align-items: flex-end;
|
|
68
|
+
}
|
|
69
|
+
.${t}-align-entries .${t}-item {
|
|
70
|
+
display: contents;
|
|
71
|
+
}
|
|
72
|
+
.${t}-align-entries .${t}-item-inner,
|
|
73
|
+
.${t}-align-entries .${t}-item-inner-hidden {
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-rows: subgrid;
|
|
76
|
+
grid-row: span 3;
|
|
77
|
+
justify-self: center;
|
|
78
|
+
margin-bottom: var(--${t}-align-entries-row-gap, 0);
|
|
79
|
+
}
|
|
80
|
+
.${t}-align-entries .${t}-item-inner-last-row {
|
|
81
|
+
margin-bottom: 0;
|
|
82
|
+
}
|
|
83
|
+
.${t}-align-entries .${t}-item-title-row,
|
|
84
|
+
.${t}-align-entries .${t}-item-subtitle-row {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
align-items: center;
|
|
88
|
+
width: 100%;
|
|
89
|
+
min-height: 100%;
|
|
90
|
+
}
|
|
91
|
+
.${t}-align-entries .${t}-item-image-link {
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: 100%;
|
|
94
|
+
min-height: 100%;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: flex-start;
|
|
99
|
+
}
|
|
100
|
+
.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
height: auto;
|
|
103
|
+
align-self: auto;
|
|
104
|
+
}
|
|
105
|
+
.${t}-image-align-top.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
106
|
+
margin-top: 0;
|
|
107
|
+
margin-bottom: auto;
|
|
108
|
+
}
|
|
109
|
+
.${t}-image-align-center.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
110
|
+
margin-top: auto;
|
|
111
|
+
margin-bottom: auto;
|
|
112
|
+
}
|
|
113
|
+
.${t}-image-align-bottom.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
114
|
+
margin-top: auto;
|
|
115
|
+
margin-bottom: 0;
|
|
116
|
+
}
|
|
117
|
+
.${t}-image-align-top.${t}-align-entries .${t}-item-image-wrapper {
|
|
118
|
+
align-items: flex-start;
|
|
119
|
+
}
|
|
120
|
+
.${t}-image-align-center.${t}-align-entries .${t}-item-image-wrapper {
|
|
121
|
+
align-items: center;
|
|
122
|
+
}
|
|
123
|
+
.${t}-image-align-bottom.${t}-align-entries .${t}-item-image-wrapper {
|
|
124
|
+
align-items: flex-end;
|
|
125
|
+
}
|
|
126
|
+
.${t}-image-align-top.${t}-align-entries .${t}-item-image-link {
|
|
127
|
+
justify-content: flex-start;
|
|
128
|
+
}
|
|
129
|
+
.${t}-image-align-center.${t}-align-entries .${t}-item-image-link {
|
|
130
|
+
justify-content: center;
|
|
131
|
+
}
|
|
132
|
+
.${t}-image-align-bottom.${t}-align-entries .${t}-item-image-link {
|
|
133
|
+
justify-content: flex-end;
|
|
134
|
+
}
|
|
135
|
+
.${t}-titles-row {
|
|
136
|
+
position: relative;
|
|
137
|
+
flex: 0 1 auto;
|
|
138
|
+
z-index: 2;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
pointer-events: none;
|
|
141
|
+
word-break: break-word;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: row;
|
|
145
|
+
align-items: baseline;
|
|
146
|
+
}
|
|
147
|
+
.${t}-titles-row-header {
|
|
148
|
+
flex: 1;
|
|
149
|
+
align-items: baseline;
|
|
150
|
+
}
|
|
151
|
+
.${t}-titles-row-header-controls {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: row;
|
|
154
|
+
align-items: baseline;
|
|
155
|
+
flex-shrink: 0;
|
|
156
|
+
}
|
|
157
|
+
.${t}-close-icon {
|
|
158
|
+
position: relative;
|
|
159
|
+
flex-shrink: 0;
|
|
160
|
+
align-self: center;
|
|
161
|
+
pointer-events: auto;
|
|
162
|
+
z-index: 2;
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
border: none;
|
|
167
|
+
background-color: transparent;
|
|
168
|
+
padding: 0;
|
|
169
|
+
}
|
|
170
|
+
.${t}-close-icon-inner {
|
|
171
|
+
all: unset;
|
|
172
|
+
position: relative;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
width: 100%;
|
|
175
|
+
height: 100%;
|
|
176
|
+
pointer-events: auto;
|
|
177
|
+
}
|
|
178
|
+
.${t}-close-icon-img {
|
|
179
|
+
position: absolute;
|
|
180
|
+
top: 50%;
|
|
181
|
+
left: 50%;
|
|
182
|
+
transform: translate(-50%, -50%);
|
|
183
|
+
}
|
|
184
|
+
.${t}-titles-baseline-strut {
|
|
185
|
+
width: 0;
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
pointer-events: none;
|
|
189
|
+
white-space: nowrap;
|
|
190
|
+
}
|
|
191
|
+
.${t}-titles-row-titles {
|
|
192
|
+
position: relative;
|
|
193
|
+
flex: 1;
|
|
194
|
+
min-width: 0;
|
|
195
|
+
align-self: flex-start;
|
|
196
|
+
}
|
|
197
|
+
.${t}-titles-stack {
|
|
198
|
+
position: relative;
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: row;
|
|
201
|
+
align-items: baseline;
|
|
202
|
+
align-self: flex-start;
|
|
203
|
+
min-width: 0;
|
|
204
|
+
}
|
|
205
|
+
.${t}-titles-row-two-row {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex: 1;
|
|
208
|
+
height: 100%;
|
|
209
|
+
min-height: 0;
|
|
210
|
+
align-self: stretch;
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
width: 100%;
|
|
213
|
+
}
|
|
214
|
+
.${t}-titles-row-top {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: row;
|
|
217
|
+
align-items: baseline;
|
|
218
|
+
width: 100%;
|
|
219
|
+
flex-shrink: 0;
|
|
220
|
+
margin-bottom: 0;
|
|
221
|
+
}
|
|
222
|
+
.${t}-titles-row-top .${t}-title-cell[data-title="title1"] {
|
|
223
|
+
flex: 0 0 auto;
|
|
224
|
+
min-width: 0;
|
|
225
|
+
}
|
|
226
|
+
.${t}-titles-row-bottom-wrap {
|
|
227
|
+
display: flex;
|
|
228
|
+
flex-direction: column;
|
|
229
|
+
width: 100%;
|
|
230
|
+
margin-top: auto;
|
|
231
|
+
flex-shrink: 0;
|
|
232
|
+
}
|
|
233
|
+
.${t}-titles-row-bottom-area {
|
|
234
|
+
position: relative;
|
|
235
|
+
flex: 1;
|
|
236
|
+
min-height: 0;
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-direction: column;
|
|
239
|
+
width: 100%;
|
|
240
|
+
}
|
|
241
|
+
.${t}-titles-row-bottom {
|
|
242
|
+
position: relative;
|
|
243
|
+
display: flex;
|
|
244
|
+
flex-direction: row;
|
|
245
|
+
align-items: flex-end;
|
|
246
|
+
width: 100%;
|
|
247
|
+
}
|
|
248
|
+
.${t}-titles-row-bottom .${t}-title-cell {
|
|
249
|
+
flex: 0 0 auto;
|
|
250
|
+
}
|
|
251
|
+
.${t}-title-cell {
|
|
252
|
+
position: relative;
|
|
253
|
+
flex: 0 0 auto;
|
|
254
|
+
min-width: 0;
|
|
255
|
+
box-sizing: border-box;
|
|
256
|
+
}
|
|
257
|
+
.${t}-text-bar-cell {
|
|
258
|
+
position: relative;
|
|
259
|
+
flex: 0 1 auto;
|
|
260
|
+
min-width: 0;
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: baseline;
|
|
263
|
+
}
|
|
264
|
+
.${t}-title1,
|
|
265
|
+
.${t}-title2,
|
|
266
|
+
.${t}-title3 {
|
|
267
|
+
margin: 0;
|
|
268
|
+
min-width: 0;
|
|
269
|
+
}
|
|
270
|
+
.${t}-title-resize-handle {
|
|
271
|
+
background: transparent;
|
|
272
|
+
}
|
|
273
|
+
.${t}-lightbox {
|
|
274
|
+
position: fixed;
|
|
275
|
+
inset: 0;
|
|
276
|
+
z-index: 9997;
|
|
277
|
+
overscroll-behavior: none;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
}
|
|
280
|
+
.${t}-lightbox-editor {
|
|
281
|
+
inset: auto;
|
|
282
|
+
top: var(--cntrl-article-top, 0);
|
|
283
|
+
left: var(--cntrl-article-left, 0);
|
|
284
|
+
width: var(--cntrl-article-width, 100vw) !important;
|
|
285
|
+
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
286
|
+
}
|
|
287
|
+
.${t}-lightbox-edit-mode {
|
|
288
|
+
z-index: 1;
|
|
289
|
+
}
|
|
290
|
+
.${t}-lightbox-dismiss-area {
|
|
291
|
+
position: relative;
|
|
292
|
+
width: 100%;
|
|
293
|
+
height: 100%;
|
|
294
|
+
}
|
|
295
|
+
.${t}-lightbox-overlay-content {
|
|
296
|
+
position: absolute;
|
|
297
|
+
inset: 0;
|
|
298
|
+
z-index: 3;
|
|
299
|
+
pointer-events: none;
|
|
300
|
+
display: flex;
|
|
301
|
+
flex-direction: column;
|
|
302
|
+
isolation: isolate;
|
|
303
|
+
}
|
|
304
|
+
.${t}-lightbox-content-area {
|
|
305
|
+
position: relative;
|
|
306
|
+
display: flex;
|
|
307
|
+
flex-direction: row;
|
|
308
|
+
align-items: flex-start;
|
|
309
|
+
flex: 1;
|
|
310
|
+
min-width: 0;
|
|
311
|
+
min-height: 0;
|
|
312
|
+
}
|
|
313
|
+
.${t}-lightbox-content-area-stacked {
|
|
314
|
+
align-items: stretch;
|
|
315
|
+
align-self: stretch;
|
|
316
|
+
}
|
|
317
|
+
.${t}-text-bar-cell-stacked {
|
|
318
|
+
align-self: stretch;
|
|
319
|
+
flex: 1;
|
|
320
|
+
min-width: 0;
|
|
321
|
+
min-height: 0;
|
|
322
|
+
height: 100%;
|
|
323
|
+
flex-direction: column;
|
|
324
|
+
align-items: stretch;
|
|
325
|
+
}
|
|
326
|
+
.${t}-control {
|
|
327
|
+
position: relative;
|
|
328
|
+
z-index: 2;
|
|
329
|
+
pointer-events: auto;
|
|
330
|
+
flex-shrink: 0;
|
|
331
|
+
}
|
|
332
|
+
`;
|
|
333
|
+
}
|
|
334
|
+
const Ve = { assetId: "", name: "", objectFit: "cover" }, rt = 500, Ut = 650, V = "cubic-bezier(0.22, 1, 0.36, 1)", mn = 72, wn = 50, vn = 1e4, yn = 650, $n = 500;
|
|
335
|
+
function xn(t, e) {
|
|
336
|
+
const i = t.width / e.width, r = t.height / e.height, o = t.left - e.left, l = t.top - e.top;
|
|
337
|
+
return `translate(${o}px, ${l}px) scale(${i}, ${r})`;
|
|
338
|
+
}
|
|
339
|
+
function Ye(t, e) {
|
|
340
|
+
if (e === "contain" && t instanceof HTMLImageElement) {
|
|
341
|
+
const r = hn(t);
|
|
342
|
+
return { left: r.x, top: r.y, width: r.width, height: r.height };
|
|
343
|
+
}
|
|
344
|
+
const i = t.getBoundingClientRect();
|
|
345
|
+
return { left: i.left, top: i.top, width: i.width, height: i.height };
|
|
346
|
+
}
|
|
347
|
+
function bn(t, e, i) {
|
|
348
|
+
const r = t.querySelector(`[data-hive-grid-index="${e}"]`);
|
|
349
|
+
return r instanceof HTMLElement ? Ye(r, i) : null;
|
|
350
|
+
}
|
|
351
|
+
function In(t) {
|
|
352
|
+
return t.reduce((e, i, r) => {
|
|
353
|
+
const o = Se(i.gallery), g = Le(o).filter((a) => a.lightboxMedia).map((a) => a.lightboxMedia);
|
|
354
|
+
return g.length === 0 || e.push({
|
|
355
|
+
gridIndex: r,
|
|
356
|
+
items: g,
|
|
357
|
+
entry: {
|
|
358
|
+
title1: i.title1 ?? "",
|
|
359
|
+
title2: i.title2 ?? "",
|
|
360
|
+
title3: i.title3 ?? ""
|
|
361
|
+
}
|
|
362
|
+
}), e;
|
|
363
|
+
}, []);
|
|
364
|
+
}
|
|
365
|
+
function Zt(t, e, i) {
|
|
366
|
+
var o;
|
|
367
|
+
if (t.length <= 1) return null;
|
|
368
|
+
const r = (e + i + t.length) % t.length;
|
|
369
|
+
return ((o = t[r]) == null ? void 0 : o.items[0]) ?? null;
|
|
370
|
+
}
|
|
371
|
+
function Ge(t, e, i) {
|
|
372
|
+
if (t.length <= 2) return null;
|
|
373
|
+
const r = (e + i + t.length) % t.length;
|
|
374
|
+
return Zt(t, r, i);
|
|
375
|
+
}
|
|
376
|
+
const Sn = 0.03;
|
|
377
|
+
function qe(t) {
|
|
378
|
+
return t.width * Sn;
|
|
379
|
+
}
|
|
380
|
+
const xe = {
|
|
381
|
+
left: 0,
|
|
382
|
+
top: 0,
|
|
383
|
+
width: typeof window < "u" ? window.innerWidth : 1440,
|
|
384
|
+
height: typeof window < "u" ? window.innerHeight : 900
|
|
385
|
+
};
|
|
386
|
+
function ae(t, e) {
|
|
387
|
+
return {
|
|
388
|
+
left: t.left - e.left,
|
|
389
|
+
top: t.top - e.top,
|
|
390
|
+
width: t.width,
|
|
391
|
+
height: t.height
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
function Xe(t) {
|
|
395
|
+
const e = t.getBoundingClientRect();
|
|
396
|
+
return { width: e.width, height: e.height, left: e.left, top: e.top };
|
|
397
|
+
}
|
|
398
|
+
function Ln(t) {
|
|
399
|
+
return t instanceof HTMLVideoElement ? { width: t.videoWidth, height: t.videoHeight } : { width: t.naturalWidth, height: t.naturalHeight };
|
|
400
|
+
}
|
|
401
|
+
function Ie(t, e, i) {
|
|
402
|
+
const r = t.getBoundingClientRect(), o = r.width, l = r.height, g = e / i, a = o / l;
|
|
403
|
+
if (g > a) {
|
|
404
|
+
const L = o / g;
|
|
405
|
+
return { width: o, height: L, left: r.left, top: r.top + (l - L) / 2 };
|
|
406
|
+
}
|
|
407
|
+
const b = l * g;
|
|
408
|
+
return { width: b, height: l, left: r.left + (o - b) / 2, top: r.top };
|
|
409
|
+
}
|
|
410
|
+
function kn(t, e) {
|
|
411
|
+
return !t || !(e != null && e.width) || !(e != null && e.height) ? null : Ie(t, e.width, e.height);
|
|
412
|
+
}
|
|
413
|
+
function An(t, e) {
|
|
414
|
+
if (Dt(t)) {
|
|
415
|
+
const r = document.createElement("video"), o = () => {
|
|
416
|
+
r.videoWidth > 0 && r.videoHeight > 0 && e(t.assetId, r.videoWidth, r.videoHeight), r.removeEventListener("loadedmetadata", o);
|
|
417
|
+
};
|
|
418
|
+
r.addEventListener("loadedmetadata", o), r.preload = "auto", r.src = t.assetId, r.load();
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
const i = new Image();
|
|
422
|
+
i.onload = () => {
|
|
423
|
+
i.naturalWidth > 0 && i.naturalHeight > 0 && e(t.assetId, i.naturalWidth, i.naturalHeight);
|
|
424
|
+
}, i.src = t.assetId;
|
|
425
|
+
}
|
|
426
|
+
function Rn(t) {
|
|
427
|
+
const e = /* @__PURE__ */ new Set(), i = [];
|
|
428
|
+
for (const r of t) {
|
|
429
|
+
const o = Se(r.gallery), l = Le(o);
|
|
430
|
+
for (const g of l)
|
|
431
|
+
for (const a of [g.displayMedia, g.lightboxMedia])
|
|
432
|
+
a != null && a.assetId && !e.has(a.assetId) && (e.add(a.assetId), i.push(a));
|
|
433
|
+
}
|
|
434
|
+
return i;
|
|
435
|
+
}
|
|
436
|
+
function Tn({ mediaList: t }) {
|
|
437
|
+
return t.length === 0 ? null : /* @__PURE__ */ d(
|
|
438
|
+
"div",
|
|
439
|
+
{
|
|
440
|
+
"aria-hidden": !0,
|
|
441
|
+
style: {
|
|
442
|
+
position: "absolute",
|
|
443
|
+
width: 0,
|
|
444
|
+
height: 0,
|
|
445
|
+
overflow: "hidden",
|
|
446
|
+
opacity: 0,
|
|
447
|
+
pointerEvents: "none"
|
|
448
|
+
},
|
|
449
|
+
children: t.map((e) => Dt(e) ? /* @__PURE__ */ d(
|
|
450
|
+
"video",
|
|
451
|
+
{
|
|
452
|
+
src: e.assetId,
|
|
453
|
+
preload: "auto",
|
|
454
|
+
muted: !0,
|
|
455
|
+
playsInline: !0
|
|
456
|
+
},
|
|
457
|
+
e.assetId
|
|
458
|
+
) : /* @__PURE__ */ d(
|
|
459
|
+
"img",
|
|
460
|
+
{
|
|
461
|
+
src: e.assetId,
|
|
462
|
+
alt: ""
|
|
463
|
+
},
|
|
464
|
+
e.assetId
|
|
465
|
+
))
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
function Ot(t, e, i) {
|
|
470
|
+
const { width: r, height: o, top: l } = t, { left: g, width: a } = i, b = qe(i);
|
|
471
|
+
return e === "left" ? {
|
|
472
|
+
left: g + b - r,
|
|
473
|
+
top: l,
|
|
474
|
+
width: r,
|
|
475
|
+
height: o
|
|
476
|
+
} : {
|
|
477
|
+
left: g + a - b,
|
|
478
|
+
top: l,
|
|
479
|
+
width: r,
|
|
480
|
+
height: o
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
function ue(t, e, i) {
|
|
484
|
+
const r = Ot(t, e, i);
|
|
485
|
+
return {
|
|
486
|
+
...r,
|
|
487
|
+
left: 2 * r.left - t.left
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
function Hn(t, e, i) {
|
|
491
|
+
const { left: r, width: o } = i, l = qe(i);
|
|
492
|
+
return e === "left" ? {
|
|
493
|
+
left: r,
|
|
494
|
+
top: t.top,
|
|
495
|
+
width: l,
|
|
496
|
+
height: t.height
|
|
497
|
+
} : {
|
|
498
|
+
left: r + o - l,
|
|
499
|
+
top: t.top,
|
|
500
|
+
width: l,
|
|
501
|
+
height: t.height
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function Ue(t, e, i, r) {
|
|
505
|
+
const o = Ot(t, "left", r), l = Ot(t, "right", r), g = ue(t, "left", r), a = ue(t, "right", r);
|
|
506
|
+
if (i === 1)
|
|
507
|
+
switch (e) {
|
|
508
|
+
case "center":
|
|
509
|
+
return { start: t, end: o };
|
|
510
|
+
case "right-adjacent":
|
|
511
|
+
return { start: l, end: t };
|
|
512
|
+
case "left-adjacent":
|
|
513
|
+
return { start: o, end: g };
|
|
514
|
+
case "far-right":
|
|
515
|
+
return { start: a, end: l };
|
|
516
|
+
default:
|
|
517
|
+
return { start: t, end: t };
|
|
518
|
+
}
|
|
519
|
+
switch (e) {
|
|
520
|
+
case "center":
|
|
521
|
+
return { start: t, end: l };
|
|
522
|
+
case "left-adjacent":
|
|
523
|
+
return { start: o, end: t };
|
|
524
|
+
case "right-adjacent":
|
|
525
|
+
return { start: l, end: a };
|
|
526
|
+
case "far-left":
|
|
527
|
+
return { start: g, end: o };
|
|
528
|
+
default:
|
|
529
|
+
return { start: t, end: t };
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function Cn(t, e, i, r) {
|
|
533
|
+
const { start: o, end: l } = Ue(t, e, i, r);
|
|
534
|
+
return {
|
|
535
|
+
x: l.left - o.left,
|
|
536
|
+
y: l.top - o.top
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
function Nn(t, e, i) {
|
|
540
|
+
const r = Ot(t, e, i), o = ue(t, e, i);
|
|
541
|
+
return {
|
|
542
|
+
x: o.left - r.left,
|
|
543
|
+
y: o.top - r.top
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
function Ze(t) {
|
|
547
|
+
if (!Array.isArray(t) || t.length === 0) return !1;
|
|
548
|
+
const e = t[0];
|
|
549
|
+
return e !== null && typeof e == "object" && "media" in e && Array.isArray(e.media);
|
|
550
|
+
}
|
|
551
|
+
function Se(t) {
|
|
552
|
+
if (!t) return;
|
|
553
|
+
if (Ze(t)) return t;
|
|
554
|
+
if (!Array.isArray(t)) return;
|
|
555
|
+
const [e, i] = t, r = e != null && e.assetId ? e : void 0, o = i != null && i.assetId ? i : void 0;
|
|
556
|
+
if (!(!r && !o))
|
|
557
|
+
return [{
|
|
558
|
+
media: [
|
|
559
|
+
o ?? r ?? Ve,
|
|
560
|
+
r ?? o ?? Ve
|
|
561
|
+
]
|
|
562
|
+
}];
|
|
563
|
+
}
|
|
564
|
+
function Fn(t) {
|
|
565
|
+
const [e, i] = t.media;
|
|
566
|
+
return i != null && i.assetId ? i : e != null && e.assetId ? e : null;
|
|
567
|
+
}
|
|
568
|
+
function En(t) {
|
|
569
|
+
const [e] = t.media;
|
|
570
|
+
return e != null && e.assetId ? e : null;
|
|
571
|
+
}
|
|
572
|
+
function Le(t) {
|
|
573
|
+
if (!Array.isArray(t) || t.length === 0) return [];
|
|
574
|
+
if (Ze(t)) {
|
|
575
|
+
const e = [];
|
|
576
|
+
for (const i of t) {
|
|
577
|
+
const r = Fn(i);
|
|
578
|
+
if (!r) continue;
|
|
579
|
+
const o = En(i);
|
|
580
|
+
e.push({
|
|
581
|
+
displayMedia: r,
|
|
582
|
+
lightboxMedia: o != null && o.assetId ? o : null
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
return e;
|
|
586
|
+
}
|
|
587
|
+
return t.filter((e) => e == null ? void 0 : e.assetId).map((e) => ({
|
|
588
|
+
displayMedia: e,
|
|
589
|
+
lightboxMedia: e
|
|
590
|
+
}));
|
|
591
|
+
}
|
|
592
|
+
function Dt(t) {
|
|
593
|
+
return t.type === "video" ? !0 : /\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(t.assetId);
|
|
594
|
+
}
|
|
595
|
+
function Wn({
|
|
596
|
+
media: t,
|
|
597
|
+
className: e,
|
|
598
|
+
style: i,
|
|
599
|
+
gridIndex: r,
|
|
600
|
+
onMediaClick: o
|
|
601
|
+
}) {
|
|
602
|
+
return Dt(t) ? /* @__PURE__ */ d(
|
|
603
|
+
"video",
|
|
604
|
+
{
|
|
605
|
+
src: t.assetId,
|
|
606
|
+
className: e,
|
|
607
|
+
"data-hive-grid-index": r,
|
|
608
|
+
style: {
|
|
609
|
+
...i,
|
|
610
|
+
cursor: o ? "pointer" : "default"
|
|
611
|
+
},
|
|
612
|
+
muted: !0,
|
|
613
|
+
autoPlay: !0,
|
|
614
|
+
loop: !0,
|
|
615
|
+
playsInline: !0,
|
|
616
|
+
preload: "auto",
|
|
617
|
+
onClick: o
|
|
618
|
+
}
|
|
619
|
+
) : /* @__PURE__ */ d(
|
|
620
|
+
"img",
|
|
621
|
+
{
|
|
622
|
+
src: t.assetId,
|
|
623
|
+
alt: t.name,
|
|
624
|
+
className: e,
|
|
625
|
+
"data-hive-grid-index": r,
|
|
626
|
+
style: {
|
|
627
|
+
...i,
|
|
628
|
+
cursor: o ? "pointer" : "default"
|
|
629
|
+
},
|
|
630
|
+
onClick: o
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
function jn({
|
|
635
|
+
src: t,
|
|
636
|
+
phase: e,
|
|
637
|
+
onMediaElement: i,
|
|
638
|
+
wrapperStyle: r,
|
|
639
|
+
videoStyle: o,
|
|
640
|
+
onLoadedMetadata: l,
|
|
641
|
+
onTransitionEnd: g
|
|
642
|
+
}) {
|
|
643
|
+
const a = w(null);
|
|
644
|
+
return G(() => {
|
|
645
|
+
const b = a.current;
|
|
646
|
+
return i == null || i(b ?? null), () => {
|
|
647
|
+
b == null || b.pause(), i == null || i(null);
|
|
648
|
+
};
|
|
649
|
+
}, [t, i]), /* @__PURE__ */ d("div", { style: r, onTransitionEnd: g, children: /* @__PURE__ */ d(
|
|
650
|
+
"video",
|
|
651
|
+
{
|
|
652
|
+
ref: a,
|
|
653
|
+
src: t,
|
|
654
|
+
controls: e === "open",
|
|
655
|
+
playsInline: !0,
|
|
656
|
+
preload: "auto",
|
|
657
|
+
onLoadedMetadata: l,
|
|
658
|
+
onClick: (b) => b.stopPropagation(),
|
|
659
|
+
style: o
|
|
660
|
+
},
|
|
661
|
+
t
|
|
662
|
+
) });
|
|
663
|
+
}
|
|
664
|
+
function ce({
|
|
665
|
+
media: t,
|
|
666
|
+
style: e,
|
|
667
|
+
onTransitionEnd: i,
|
|
668
|
+
onMeasure: r
|
|
669
|
+
}) {
|
|
670
|
+
return Dt(t) ? /* @__PURE__ */ d(
|
|
671
|
+
"video",
|
|
672
|
+
{
|
|
673
|
+
src: t.assetId,
|
|
674
|
+
muted: !0,
|
|
675
|
+
playsInline: !0,
|
|
676
|
+
preload: "auto",
|
|
677
|
+
style: e,
|
|
678
|
+
onLoadedMetadata: (o) => {
|
|
679
|
+
const l = o.currentTarget;
|
|
680
|
+
l.videoWidth > 0 && l.videoHeight > 0 && (r == null || r(t.assetId, l.videoWidth, l.videoHeight));
|
|
681
|
+
},
|
|
682
|
+
onTransitionEnd: i
|
|
683
|
+
}
|
|
684
|
+
) : /* @__PURE__ */ d(
|
|
685
|
+
"img",
|
|
686
|
+
{
|
|
687
|
+
src: t.assetId,
|
|
688
|
+
alt: t.name,
|
|
689
|
+
style: e,
|
|
690
|
+
onLoad: (o) => {
|
|
691
|
+
const l = o.currentTarget;
|
|
692
|
+
l.naturalWidth > 0 && l.naturalHeight > 0 && (r == null || r(t.assetId, l.naturalWidth, l.naturalHeight));
|
|
693
|
+
},
|
|
694
|
+
onTransitionEnd: i
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
function On({
|
|
699
|
+
prefix: t,
|
|
700
|
+
items: e,
|
|
701
|
+
index: i,
|
|
702
|
+
entry: r,
|
|
703
|
+
settings: o,
|
|
704
|
+
isEditor: l,
|
|
705
|
+
isEditMode: g,
|
|
706
|
+
isPreviewMode: a,
|
|
707
|
+
canNavigate: b,
|
|
708
|
+
lightboxEntries: L,
|
|
709
|
+
entryIdx: ot,
|
|
710
|
+
layoutId: X,
|
|
711
|
+
sourceRect: O,
|
|
712
|
+
resolveCloseSourceRect: At,
|
|
713
|
+
onClose: zt,
|
|
714
|
+
onPrev: Mt,
|
|
715
|
+
onNext: _t
|
|
716
|
+
}) {
|
|
717
|
+
const Kt = w(null), Rt = w(null), Tt = w(null), Ht = w(/* @__PURE__ */ new Map()), [q, Ct] = $(0), st = w(null), xt = w(0), D = w(0), W = w("none"), U = w(!1), Z = w(!1), lt = w(!1), at = w(null), k = w(null), Nt = w(null), ft = w(() => {
|
|
718
|
+
}), K = w(null), z = w(null), ht = w(null), ct = w(!1), [R, bt] = $(null), [T, Jt] = $(xe), [de, fe] = $(0), [f, gt] = $("opening"), [J, It] = $(0), [Bt, A] = $(0), [Y, he] = $(!1), [Q, pt] = $(null), [St, mt] = $(null), [x, v] = $(null), [wt, H] = $(!1), [vt, Vt] = $(null), [Gt, P] = $(!1), Lt = w(!1), [M, E] = $(!1), [Ke, ke] = $(!1), Ae = w(i), Re = w(void 0), h = e[i], Qt = h ? Dt(h) : !1, tt = Bt !== 0 || Y, ge = !g && (!l || !!a), ut = b && !g, yt = L.length > 1, Ft = m((n, s) => e.length <= 1 ? null : e[(n + s + e.length) % e.length] ?? null, [e]), C = yt ? Zt(L, ot, -1) : Ft(i, -1), N = yt ? Zt(L, ot, 1) : Ft(i, 1), pe = Q === -1 && tt ? yt && St !== null ? Zt(L, St, -1) : x !== null ? Ft(x, -1) : null : null, me = Q === 1 && tt ? yt && St !== null ? Zt(L, St, 1) : x !== null ? Ft(x, 1) : null : null, Je = pe && pe.assetId !== (C == null ? void 0 : C.assetId) ? pe : null, Qe = me && me.assetId !== (N == null ? void 0 : N.assetId) ? me : null, Pe = C && ut ? (() => {
|
|
719
|
+
const n = yt ? Ge(L, ot, -1) : e.length > 2 ? Ft((i - 1 + e.length) % e.length, -1) : null;
|
|
720
|
+
return n && n.assetId !== C.assetId ? n : null;
|
|
721
|
+
})() : null, tn = N && ut ? (() => {
|
|
722
|
+
const n = yt ? Ge(L, ot, 1) : e.length > 2 ? Ft((i + 1) % e.length, 1) : null;
|
|
723
|
+
return n && n.assetId !== N.assetId ? n : null;
|
|
724
|
+
})() : null, Pt = Je ?? Pe, te = Qe ?? tn, $t = m((n, s, u) => {
|
|
725
|
+
if (!n || !s || !u) return;
|
|
726
|
+
const c = Ht.current, y = c.get(n);
|
|
727
|
+
(y == null ? void 0 : y.width) === s && (y == null ? void 0 : y.height) === u || (c.set(n, { width: s, height: u }), Ct((B) => B + 1));
|
|
728
|
+
}, []), Et = m((n) => {
|
|
729
|
+
if (!(n != null && n.assetId)) return null;
|
|
730
|
+
const s = Ht.current.get(n.assetId);
|
|
731
|
+
return kn(Rt.current, s);
|
|
732
|
+
}, [q, de]), ee = m(() => {
|
|
733
|
+
if (!h) return;
|
|
734
|
+
const n = Et(h);
|
|
735
|
+
if (n) {
|
|
736
|
+
bt(n);
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
const s = Rt.current;
|
|
740
|
+
s && bt(Xe(s));
|
|
741
|
+
}, [h, Et]), ne = m((n) => {
|
|
742
|
+
if (yt) {
|
|
743
|
+
const s = L.length;
|
|
744
|
+
mt((ot + n + s) % s), v(null);
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
e.length > 1 && (v((i + n + e.length) % e.length), mt(null));
|
|
748
|
+
}, [yt, L.length, ot, e.length, i]), F = m((n) => {
|
|
749
|
+
lt.current = n, he(n);
|
|
750
|
+
}, []), I = m(() => {
|
|
751
|
+
at.current !== null && (window.clearTimeout(at.current), at.current = null);
|
|
752
|
+
}, []), Te = m(() => {
|
|
753
|
+
I(), at.current = window.setTimeout(() => {
|
|
754
|
+
I(), F(!1);
|
|
755
|
+
}, Ut + 32);
|
|
756
|
+
}, [I, F]), He = m(() => {
|
|
757
|
+
const n = Kt.current;
|
|
758
|
+
if (!n) {
|
|
759
|
+
Jt({
|
|
760
|
+
left: 0,
|
|
761
|
+
top: 0,
|
|
762
|
+
width: typeof window < "u" ? window.innerWidth : xe.width,
|
|
763
|
+
height: typeof window < "u" ? window.innerHeight : xe.height
|
|
764
|
+
});
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
const s = n.getBoundingClientRect();
|
|
768
|
+
Jt({
|
|
769
|
+
left: s.left,
|
|
770
|
+
top: s.top,
|
|
771
|
+
width: s.width,
|
|
772
|
+
height: s.height
|
|
773
|
+
});
|
|
774
|
+
}, []), Ce = m((n, s) => {
|
|
775
|
+
if (tt) {
|
|
776
|
+
if (M && !Y)
|
|
777
|
+
return `translate(${Bt}px, 0px)`;
|
|
778
|
+
if (Y && Q !== null) {
|
|
779
|
+
const u = Et(n);
|
|
780
|
+
if (!u) return;
|
|
781
|
+
const { x: c, y } = Cn(u, s, Q, T);
|
|
782
|
+
return `translate(${c}px, ${y}px)`;
|
|
783
|
+
}
|
|
784
|
+
if (Y)
|
|
785
|
+
return "translate(0px, 0px)";
|
|
786
|
+
}
|
|
787
|
+
}, [
|
|
788
|
+
tt,
|
|
789
|
+
M,
|
|
790
|
+
Y,
|
|
791
|
+
Bt,
|
|
792
|
+
Q,
|
|
793
|
+
T,
|
|
794
|
+
Et
|
|
795
|
+
]), Wt = m(() => {
|
|
796
|
+
const n = k.current;
|
|
797
|
+
k.current = null, I(), F(!1), pt(null), mt(null), v(null), A(0), E(!1), U.current = !1, D.current = 0, W.current = "none", n === -1 ? Mt() : n === 1 && _t();
|
|
798
|
+
}, [I, F, Mt, _t]), ie = m(() => {
|
|
799
|
+
I(), at.current = window.setTimeout(() => {
|
|
800
|
+
k.current !== null && Wt();
|
|
801
|
+
}, Ut + 32);
|
|
802
|
+
}, [I, Wt]), Ne = m(() => {
|
|
803
|
+
I(), k.current = null, F(!1), pt(null), mt(null), v(null), A(0), E(!1), U.current = !1, D.current = 0, W.current = "none";
|
|
804
|
+
}, [I, F]), Fe = m((n) => {
|
|
805
|
+
if (!(!ut || !R)) {
|
|
806
|
+
if (lt.current) {
|
|
807
|
+
if (k.current === n) {
|
|
808
|
+
Nt.current = n, Wt();
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
Ne();
|
|
812
|
+
}
|
|
813
|
+
I(), ne(n), k.current = n, pt(n), F(!0), ie();
|
|
814
|
+
}
|
|
815
|
+
}, [
|
|
816
|
+
ut,
|
|
817
|
+
R,
|
|
818
|
+
Wt,
|
|
819
|
+
Ne,
|
|
820
|
+
I,
|
|
821
|
+
ne,
|
|
822
|
+
F,
|
|
823
|
+
ie
|
|
824
|
+
]);
|
|
825
|
+
ft.current = Fe;
|
|
826
|
+
const dt = m(() => {
|
|
827
|
+
K.current = null, ct.current = !1, z.current !== null && (window.clearInterval(z.current), z.current = null), ht.current !== null && (window.clearTimeout(ht.current), ht.current = null);
|
|
828
|
+
}, []), we = m((n) => {
|
|
829
|
+
z.current !== null && window.clearInterval(z.current);
|
|
830
|
+
const s = ct.current ? $n : yn;
|
|
831
|
+
z.current = window.setInterval(() => {
|
|
832
|
+
ft.current(n);
|
|
833
|
+
}, s);
|
|
834
|
+
}, []), Ee = m((n) => {
|
|
835
|
+
K.current !== n && (dt(), K.current = n, ct.current = !1, ft.current(n), we(n), ht.current = window.setTimeout(() => {
|
|
836
|
+
ht.current = null, K.current === n && (ct.current = !0, we(n));
|
|
837
|
+
}, vn));
|
|
838
|
+
}, [dt, we]), et = m(() => {
|
|
839
|
+
const n = Rt.current;
|
|
840
|
+
if (!n) return;
|
|
841
|
+
const s = h == null ? void 0 : h.assetId, u = s ? Ht.current.get(s) : void 0;
|
|
842
|
+
if (u != null && u.width && (u != null && u.height)) {
|
|
843
|
+
bt(Ie(n, u.width, u.height));
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
const c = Tt.current;
|
|
847
|
+
if (c && s && (c.src === s || c.currentSrc === s)) {
|
|
848
|
+
const { width: B, height: p } = Ln(c);
|
|
849
|
+
if (B && p) {
|
|
850
|
+
$t(s, B, p), bt(Ie(n, B, p));
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
const y = Xe(n);
|
|
855
|
+
!y.width || !y.height || bt(y);
|
|
856
|
+
}, [h == null ? void 0 : h.assetId, $t]), We = m((n) => {
|
|
857
|
+
if (Tt.current = n, !!n) {
|
|
858
|
+
if (n instanceof HTMLVideoElement) {
|
|
859
|
+
n.readyState >= 1 && n.videoWidth > 0 && et();
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
n.complete && n.naturalWidth > 0 && et();
|
|
863
|
+
}
|
|
864
|
+
}, [et]), Xt = m(() => {
|
|
865
|
+
He(), et(), fe((n) => n + 1);
|
|
866
|
+
}, [He, et]);
|
|
867
|
+
G(() => {
|
|
868
|
+
Xt();
|
|
869
|
+
const n = Rt.current, s = Kt.current, u = new ResizeObserver(() => Xt());
|
|
870
|
+
return n && u.observe(n), s && u.observe(s), window.addEventListener("resize", Xt), () => {
|
|
871
|
+
u.disconnect(), window.removeEventListener("resize", Xt);
|
|
872
|
+
};
|
|
873
|
+
}, [Xt, i, X]), le(() => {
|
|
874
|
+
if (!h) return;
|
|
875
|
+
const n = Tt.current;
|
|
876
|
+
if (n) {
|
|
877
|
+
if (n instanceof HTMLImageElement && n.complete && n.naturalWidth > 0) {
|
|
878
|
+
et();
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
n instanceof HTMLVideoElement && n.readyState >= 1 && n.videoWidth > 0 && et();
|
|
882
|
+
}
|
|
883
|
+
}, [h == null ? void 0 : h.assetId, i, et]), G(() => {
|
|
884
|
+
ee();
|
|
885
|
+
}, [ee, q]), G(() => {
|
|
886
|
+
const n = /* @__PURE__ */ new Set(), s = [], u = (c) => {
|
|
887
|
+
!(c != null && c.assetId) || n.has(c.assetId) || (n.add(c.assetId), s.push(c));
|
|
888
|
+
};
|
|
889
|
+
e.forEach(u), L.forEach((c) => c.items.forEach(u)), s.forEach((c) => {
|
|
890
|
+
Ht.current.has(c.assetId) || An(c, $t);
|
|
891
|
+
});
|
|
892
|
+
}, [e, L, $t]), G(() => {
|
|
893
|
+
if (f !== "opening" || !R) return;
|
|
894
|
+
if (!O) {
|
|
895
|
+
gt("open");
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
898
|
+
H(!1);
|
|
899
|
+
const n = requestAnimationFrame(() => {
|
|
900
|
+
requestAnimationFrame(() => {
|
|
901
|
+
H(!0), gt("open");
|
|
902
|
+
});
|
|
903
|
+
});
|
|
904
|
+
return () => cancelAnimationFrame(n);
|
|
905
|
+
}, [f, R, O]), G(() => {
|
|
906
|
+
if (f !== "closing") return;
|
|
907
|
+
const n = setTimeout(() => zt(), rt);
|
|
908
|
+
return () => clearTimeout(n);
|
|
909
|
+
}, [f, zt]), G(() => () => {
|
|
910
|
+
I();
|
|
911
|
+
}, [I]), le(() => {
|
|
912
|
+
Ae.current === i && Re.current === (h == null ? void 0 : h.assetId) || (I(), k.current = null, pt(null), mt(null), v(null), It(0), A(0), F(!1), ke(!1), E(!1), xt.current = 0, D.current = 0, W.current = "none", U.current = !1, st.current = null, Z.current = !1, Tt.current = null, ee(), Ae.current = i, Re.current = h == null ? void 0 : h.assetId);
|
|
913
|
+
}, [i, h == null ? void 0 : h.assetId, F, I, ee]), le(() => {
|
|
914
|
+
const n = Nt.current;
|
|
915
|
+
n !== null && (Nt.current = null, requestAnimationFrame(() => {
|
|
916
|
+
ft.current(n);
|
|
917
|
+
}));
|
|
918
|
+
}, [i, ot, h == null ? void 0 : h.assetId]), le(() => {
|
|
919
|
+
if (f === "opening") {
|
|
920
|
+
Lt.current = !1, P(!1);
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
if (f !== "open" || Lt.current) return;
|
|
924
|
+
if (!C && !N) {
|
|
925
|
+
Lt.current = !0;
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
P(!1);
|
|
929
|
+
const n = requestAnimationFrame(() => {
|
|
930
|
+
requestAnimationFrame(() => {
|
|
931
|
+
P(!0), Lt.current = !0;
|
|
932
|
+
});
|
|
933
|
+
});
|
|
934
|
+
return () => cancelAnimationFrame(n);
|
|
935
|
+
}, [f, C == null ? void 0 : C.assetId, N == null ? void 0 : N.assetId]), G(() => {
|
|
936
|
+
if (f !== "open") return;
|
|
937
|
+
const n = () => {
|
|
938
|
+
const p = (S) => {
|
|
939
|
+
S.stopPropagation(), S.preventDefault(), document.removeEventListener("click", p, !0);
|
|
940
|
+
};
|
|
941
|
+
document.addEventListener("click", p, !0);
|
|
942
|
+
}, s = (p) => {
|
|
943
|
+
const S = p < 0 ? 1 : -1;
|
|
944
|
+
I(), ne(S), k.current = S, pt(S), F(!0), ie();
|
|
945
|
+
}, u = (p) => {
|
|
946
|
+
if (Math.abs(p) > wn && ut) {
|
|
947
|
+
s(p);
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
k.current = null, pt(null), mt(null), v(null), F(!0), A(0), Te();
|
|
951
|
+
}, c = (p) => {
|
|
952
|
+
if (p.touches.length !== 1 || lt.current) return;
|
|
953
|
+
const S = p.touches[0];
|
|
954
|
+
Z.current = !0, st.current = { x: S.clientX, y: S.clientY }, W.current = "none", D.current = 0, U.current = !1;
|
|
955
|
+
}, y = (p) => {
|
|
956
|
+
if (!st.current || p.touches.length !== 1 || lt.current) return;
|
|
957
|
+
const S = p.touches[0], nt = S.clientX - st.current.x, it = S.clientY - st.current.y;
|
|
958
|
+
if (W.current === "none") {
|
|
959
|
+
if (Math.abs(nt) < 10 && Math.abs(it) < 10) return;
|
|
960
|
+
if (Math.abs(nt) > Math.abs(it)) {
|
|
961
|
+
if (!ut) return;
|
|
962
|
+
W.current = "horizontal";
|
|
963
|
+
} else if (it > 0) {
|
|
964
|
+
if (!ge) return;
|
|
965
|
+
W.current = "vertical";
|
|
966
|
+
} else
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
if (W.current === "horizontal") {
|
|
970
|
+
U.current = !0, E(!0), D.current = nt, A(nt), p.preventDefault();
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
W.current === "vertical" && (U.current = !0, E(!0), xt.current = it, It(it), p.preventDefault());
|
|
974
|
+
}, B = () => {
|
|
975
|
+
if (!st.current) return;
|
|
976
|
+
const p = W.current, S = U.current;
|
|
977
|
+
if (S && p === "horizontal")
|
|
978
|
+
u(D.current), n();
|
|
979
|
+
else if (S && p === "vertical") {
|
|
980
|
+
const nt = xt.current;
|
|
981
|
+
if (ge && nt > mn) {
|
|
982
|
+
const it = window.innerHeight;
|
|
983
|
+
xt.current = it, ke(!0), It(it), gt("closing");
|
|
984
|
+
} else
|
|
985
|
+
xt.current = 0, It(0);
|
|
986
|
+
n();
|
|
987
|
+
} else p === "horizontal" && Math.abs(D.current) > 0 && (u(D.current), n());
|
|
988
|
+
st.current = null, W.current = "none", D.current = 0, U.current = !1, E(!1);
|
|
989
|
+
};
|
|
990
|
+
return document.addEventListener("touchstart", c, { passive: !0 }), document.addEventListener("touchmove", y, { passive: !1 }), document.addEventListener("touchend", B), document.addEventListener("touchcancel", B), () => {
|
|
991
|
+
document.removeEventListener("touchstart", c), document.removeEventListener("touchmove", y), document.removeEventListener("touchend", B), document.removeEventListener("touchcancel", B);
|
|
992
|
+
};
|
|
993
|
+
}, [f, ut, F, Te, I, ge, ie, ne]);
|
|
994
|
+
const ve = m(() => {
|
|
995
|
+
const n = (At == null ? void 0 : At()) ?? O ?? null;
|
|
996
|
+
n && R && (Vt(n), H(!0)), gt("closing");
|
|
997
|
+
}, [At, O, R]);
|
|
998
|
+
G(() => {
|
|
999
|
+
const n = (c) => {
|
|
1000
|
+
if (c.key === "Escape") {
|
|
1001
|
+
if (l && a || f === "closing") return;
|
|
1002
|
+
dt(), ve();
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
if (c.key !== "ArrowLeft" && c.key !== "ArrowRight" || f !== "open" || !ut) return;
|
|
1006
|
+
c.preventDefault();
|
|
1007
|
+
const y = c.key === "ArrowLeft" ? -1 : 1;
|
|
1008
|
+
c.repeat && K.current === y || Ee(y);
|
|
1009
|
+
}, s = (c) => {
|
|
1010
|
+
if (c.key !== "ArrowLeft" && c.key !== "ArrowRight") return;
|
|
1011
|
+
const y = c.key === "ArrowLeft" ? -1 : 1;
|
|
1012
|
+
K.current === y && dt();
|
|
1013
|
+
}, u = () => {
|
|
1014
|
+
dt();
|
|
1015
|
+
};
|
|
1016
|
+
return window.addEventListener("keydown", n), window.addEventListener("keyup", s), window.addEventListener("blur", u), () => {
|
|
1017
|
+
window.removeEventListener("keydown", n), window.removeEventListener("keyup", s), window.removeEventListener("blur", u), dt();
|
|
1018
|
+
};
|
|
1019
|
+
}, [
|
|
1020
|
+
f,
|
|
1021
|
+
l,
|
|
1022
|
+
a,
|
|
1023
|
+
ve,
|
|
1024
|
+
ut,
|
|
1025
|
+
Ee,
|
|
1026
|
+
dt
|
|
1027
|
+
]), G(() => {
|
|
1028
|
+
f !== "open" && dt();
|
|
1029
|
+
}, [f, dt]);
|
|
1030
|
+
const je = () => {
|
|
1031
|
+
f === "closing" || g || ve();
|
|
1032
|
+
}, j = f === "open", re = f === "closing", en = J > 0 ? Math.max(0, 1 - J / 500) : 1, nn = J > 0 ? Math.max(0.35, 1 - J / 500) : 1, jt = m((n) => {
|
|
1033
|
+
if (!(n.propertyName !== "transform" || !lt.current)) {
|
|
1034
|
+
if (k.current !== null) {
|
|
1035
|
+
Wt();
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
I(), F(!1);
|
|
1039
|
+
}
|
|
1040
|
+
}, [I, F, Wt]), ye = f === "closing" ? vt ?? O : O, rn = ye && R && (f === "opening" || re) ? xn(ye, R) : void 0, on = tt && h ? Ce(h, "center") : J > 0 ? `translateY(${J}px)` : rn, _ = R ? ae(R, T) : null, Oe = !!(ye && R), sn = Oe && (f === "closing" || f === "open" && wt), De = {
|
|
1041
|
+
position: "absolute",
|
|
1042
|
+
top: _ == null ? void 0 : _.top,
|
|
1043
|
+
left: _ == null ? void 0 : _.left,
|
|
1044
|
+
width: _ == null ? void 0 : _.width,
|
|
1045
|
+
height: _ == null ? void 0 : _.height,
|
|
1046
|
+
objectFit: "contain",
|
|
1047
|
+
transformOrigin: "top left",
|
|
1048
|
+
transform: on,
|
|
1049
|
+
opacity: J > 0 ? nn : Oe ? 1 : f === "opening" || re ? 0 : 1,
|
|
1050
|
+
transition: M && !Y ? "none" : Y ? `transform ${Ut}ms ${V}` : Ke ? `transform ${rt}ms ${V}, opacity ${rt}ms ${V}` : sn ? `transform ${rt}ms ${V}` : f === "opening" || re ? `opacity ${rt}ms ${V}` : "none",
|
|
1051
|
+
pointerEvents: Qt && j && !tt ? "auto" : "none",
|
|
1052
|
+
touchAction: Qt && j ? "none" : void 0,
|
|
1053
|
+
zIndex: 1,
|
|
1054
|
+
overflow: Qt ? "hidden" : void 0
|
|
1055
|
+
}, ln = {
|
|
1056
|
+
width: "100%",
|
|
1057
|
+
height: "100%",
|
|
1058
|
+
display: "block",
|
|
1059
|
+
objectFit: "contain",
|
|
1060
|
+
pointerEvents: j && !tt ? "auto" : "none"
|
|
1061
|
+
}, oe = (n, s, u = "adjacent") => {
|
|
1062
|
+
const c = Et(n);
|
|
1063
|
+
if (!c) return { display: "none" };
|
|
1064
|
+
const y = u === "far" ? s === "left" ? "far-left" : "far-right" : s === "left" ? "left-adjacent" : "right-adjacent", { start: B } = Q !== null ? Ue(c, y, Q, T) : {
|
|
1065
|
+
start: u === "far" ? ue(c, s, T) : Ot(c, s, T)
|
|
1066
|
+
}, p = ae(B, T), S = Ce(n, y), nt = !tt && u === "adjacent" && j && !Gt ? Nn(c, s, T) : null, it = u === "far" && tt && Q === (s === "left" ? -1 : 1), an = M && !Y ? !1 : Y, cn = u === "adjacent" && j && Gt && !tt;
|
|
1067
|
+
return {
|
|
1068
|
+
position: "absolute",
|
|
1069
|
+
top: p.top,
|
|
1070
|
+
left: p.left,
|
|
1071
|
+
width: p.width,
|
|
1072
|
+
height: p.height,
|
|
1073
|
+
objectFit: "contain",
|
|
1074
|
+
transform: S ?? (nt ? `translate(${nt.x}px, ${nt.y}px)` : void 0),
|
|
1075
|
+
opacity: u === "far" ? j && it ? 1 : 0 : j ? 1 : 0,
|
|
1076
|
+
transition: an ? u === "far" ? `transform ${Ut}ms ${V}` : `transform ${Ut}ms ${V}, opacity ${rt}ms ${V}` : cn ? `transform ${rt}ms ${V}` : f === "opening" || re ? `opacity ${rt}ms ${V}` : "none",
|
|
1077
|
+
pointerEvents: "none",
|
|
1078
|
+
zIndex: 1
|
|
1079
|
+
};
|
|
1080
|
+
}, ze = (n, s) => {
|
|
1081
|
+
const u = Et(n);
|
|
1082
|
+
return u ? Hn(Ot(u, s, T), s, T) : null;
|
|
1083
|
+
}, Me = (n) => (s) => {
|
|
1084
|
+
if (!g) {
|
|
1085
|
+
if (Z.current) {
|
|
1086
|
+
Z.current = !1;
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
s.stopPropagation(), Fe(n);
|
|
1090
|
+
}
|
|
1091
|
+
}, _e = C ? ze(C, "left") : null, Be = N ? ze(N, "right") : null, Yt = _e ? ae(_e, T) : null, qt = Be ? ae(Be, T) : null;
|
|
1092
|
+
return /* @__PURE__ */ kt(
|
|
1093
|
+
"div",
|
|
1094
|
+
{
|
|
1095
|
+
ref: Kt,
|
|
1096
|
+
className: [
|
|
1097
|
+
`${t}-lightbox`,
|
|
1098
|
+
l ? `${t}-lightbox-editor` : "",
|
|
1099
|
+
g ? `${t}-lightbox-edit-mode` : ""
|
|
1100
|
+
].filter(Boolean).join(" "),
|
|
1101
|
+
style: {
|
|
1102
|
+
touchAction: f === "open" ? "none" : void 0
|
|
1103
|
+
},
|
|
1104
|
+
onClick: je,
|
|
1105
|
+
children: [
|
|
1106
|
+
/* @__PURE__ */ d(
|
|
1107
|
+
"div",
|
|
1108
|
+
{
|
|
1109
|
+
style: {
|
|
1110
|
+
position: "absolute",
|
|
1111
|
+
inset: 0,
|
|
1112
|
+
background: o.backgroundColor ?? "#FFFFFF",
|
|
1113
|
+
opacity: j ? en : 0,
|
|
1114
|
+
transition: M ? "none" : `opacity ${rt}ms ${V}`,
|
|
1115
|
+
pointerEvents: "none"
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
),
|
|
1119
|
+
/* @__PURE__ */ kt("div", { className: `${t}-lightbox-dismiss-area`, children: [
|
|
1120
|
+
/* @__PURE__ */ kt(
|
|
1121
|
+
"div",
|
|
1122
|
+
{
|
|
1123
|
+
style: {
|
|
1124
|
+
position: "relative",
|
|
1125
|
+
width: "100%",
|
|
1126
|
+
height: "100%",
|
|
1127
|
+
display: "flex",
|
|
1128
|
+
flexDirection: "column",
|
|
1129
|
+
alignItems: "center",
|
|
1130
|
+
justifyContent: "center"
|
|
1131
|
+
},
|
|
1132
|
+
children: [
|
|
1133
|
+
/* @__PURE__ */ d("div", { style: { height: "10%" } }),
|
|
1134
|
+
/* @__PURE__ */ d(
|
|
1135
|
+
"div",
|
|
1136
|
+
{
|
|
1137
|
+
style: {
|
|
1138
|
+
width: "70%",
|
|
1139
|
+
height: "80%",
|
|
1140
|
+
display: "flex",
|
|
1141
|
+
justifyContent: "center",
|
|
1142
|
+
alignItems: "center"
|
|
1143
|
+
},
|
|
1144
|
+
children: /* @__PURE__ */ d("div", { ref: Rt, style: { width: "100%", height: "100%" } })
|
|
1145
|
+
}
|
|
1146
|
+
),
|
|
1147
|
+
/* @__PURE__ */ d("div", { style: { height: "10%" } })
|
|
1148
|
+
]
|
|
1149
|
+
}
|
|
1150
|
+
),
|
|
1151
|
+
/* @__PURE__ */ d(
|
|
1152
|
+
"div",
|
|
1153
|
+
{
|
|
1154
|
+
style: {
|
|
1155
|
+
position: "absolute",
|
|
1156
|
+
inset: 0,
|
|
1157
|
+
opacity: j ? 1 : 0,
|
|
1158
|
+
transition: M ? "none" : `opacity ${rt}ms ${V}`,
|
|
1159
|
+
pointerEvents: "none"
|
|
1160
|
+
},
|
|
1161
|
+
children: /* @__PURE__ */ d(
|
|
1162
|
+
fn,
|
|
1163
|
+
{
|
|
1164
|
+
prefix: t,
|
|
1165
|
+
entry: r,
|
|
1166
|
+
settings: o,
|
|
1167
|
+
isEditor: l,
|
|
1168
|
+
isEditMode: g,
|
|
1169
|
+
isPreviewMode: a,
|
|
1170
|
+
onClose: je
|
|
1171
|
+
}
|
|
1172
|
+
)
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1175
|
+
] }),
|
|
1176
|
+
j && Pt && /* @__PURE__ */ d(
|
|
1177
|
+
ce,
|
|
1178
|
+
{
|
|
1179
|
+
media: Pt,
|
|
1180
|
+
style: oe(Pt, "left", "far"),
|
|
1181
|
+
onMeasure: $t,
|
|
1182
|
+
onTransitionEnd: jt
|
|
1183
|
+
},
|
|
1184
|
+
`far-prev-${Pt.assetId}`
|
|
1185
|
+
),
|
|
1186
|
+
j && C && /* @__PURE__ */ kt(be, { children: [
|
|
1187
|
+
/* @__PURE__ */ d(
|
|
1188
|
+
ce,
|
|
1189
|
+
{
|
|
1190
|
+
media: C,
|
|
1191
|
+
style: oe(C, "left"),
|
|
1192
|
+
onMeasure: $t,
|
|
1193
|
+
onTransitionEnd: jt
|
|
1194
|
+
},
|
|
1195
|
+
`prev-${C.assetId}`
|
|
1196
|
+
),
|
|
1197
|
+
Yt && /* @__PURE__ */ d(
|
|
1198
|
+
"div",
|
|
1199
|
+
{
|
|
1200
|
+
style: {
|
|
1201
|
+
position: "absolute",
|
|
1202
|
+
top: Yt.top,
|
|
1203
|
+
left: Yt.left,
|
|
1204
|
+
width: Yt.width,
|
|
1205
|
+
height: Yt.height,
|
|
1206
|
+
cursor: g || M ? "default" : "pointer",
|
|
1207
|
+
pointerEvents: g || M ? "none" : "auto",
|
|
1208
|
+
zIndex: 3
|
|
1209
|
+
},
|
|
1210
|
+
onClick: Me(-1)
|
|
1211
|
+
}
|
|
1212
|
+
)
|
|
1213
|
+
] }),
|
|
1214
|
+
j && N && /* @__PURE__ */ kt(be, { children: [
|
|
1215
|
+
/* @__PURE__ */ d(
|
|
1216
|
+
ce,
|
|
1217
|
+
{
|
|
1218
|
+
media: N,
|
|
1219
|
+
style: oe(N, "right"),
|
|
1220
|
+
onMeasure: $t,
|
|
1221
|
+
onTransitionEnd: jt
|
|
1222
|
+
},
|
|
1223
|
+
`next-${N.assetId}`
|
|
1224
|
+
),
|
|
1225
|
+
qt && /* @__PURE__ */ d(
|
|
1226
|
+
"div",
|
|
1227
|
+
{
|
|
1228
|
+
style: {
|
|
1229
|
+
position: "absolute",
|
|
1230
|
+
top: qt.top,
|
|
1231
|
+
left: qt.left,
|
|
1232
|
+
width: qt.width,
|
|
1233
|
+
height: qt.height,
|
|
1234
|
+
cursor: g || M ? "default" : "pointer",
|
|
1235
|
+
pointerEvents: g || M ? "none" : "auto",
|
|
1236
|
+
zIndex: 3
|
|
1237
|
+
},
|
|
1238
|
+
onClick: Me(1)
|
|
1239
|
+
}
|
|
1240
|
+
)
|
|
1241
|
+
] }),
|
|
1242
|
+
j && te && /* @__PURE__ */ d(
|
|
1243
|
+
ce,
|
|
1244
|
+
{
|
|
1245
|
+
media: te,
|
|
1246
|
+
style: oe(te, "right", "far"),
|
|
1247
|
+
onMeasure: $t,
|
|
1248
|
+
onTransitionEnd: jt
|
|
1249
|
+
},
|
|
1250
|
+
`far-next-${te.assetId}`
|
|
1251
|
+
),
|
|
1252
|
+
R && h && (Qt ? /* @__PURE__ */ d(
|
|
1253
|
+
jn,
|
|
1254
|
+
{
|
|
1255
|
+
src: h.assetId,
|
|
1256
|
+
phase: f,
|
|
1257
|
+
onMediaElement: We,
|
|
1258
|
+
wrapperStyle: De,
|
|
1259
|
+
videoStyle: ln,
|
|
1260
|
+
onLoadedMetadata: et,
|
|
1261
|
+
onTransitionEnd: jt
|
|
1262
|
+
},
|
|
1263
|
+
`${i}-${h.assetId}`
|
|
1264
|
+
) : /* @__PURE__ */ d(
|
|
1265
|
+
"img",
|
|
1266
|
+
{
|
|
1267
|
+
ref: We,
|
|
1268
|
+
src: h.assetId,
|
|
1269
|
+
alt: h.name,
|
|
1270
|
+
onLoad: et,
|
|
1271
|
+
onTransitionEnd: jt,
|
|
1272
|
+
style: De
|
|
1273
|
+
},
|
|
1274
|
+
`${i}-${h.assetId}`
|
|
1275
|
+
))
|
|
1276
|
+
]
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1279
|
+
}
|
|
1280
|
+
function Xn({
|
|
1281
|
+
settings: t,
|
|
1282
|
+
content: e,
|
|
1283
|
+
isEditor: i,
|
|
1284
|
+
isPreviewMode: r,
|
|
1285
|
+
isEditMode: o,
|
|
1286
|
+
layoutId: l,
|
|
1287
|
+
portalId: g
|
|
1288
|
+
}) {
|
|
1289
|
+
const { prefix: a } = un(), { gridLayout: b, verticalGap: L, align: ot = "top", imageDisplay: X } = t, O = (X == null ? void 0 : X.display) === "cover", At = (X == null ? void 0 : X.ratioValue) ?? "1:1", zt = (X == null ? void 0 : X.reversed) ?? !1, [Mt, _t] = At.split(":").map(Number), Tt = `${zt ? _t : Mt} / ${zt ? Mt : _t}`, Ht = b.entryWidth ?? 0.2, q = b.columnsCount, Ct = se(Ht, i), st = se(b.horizontalGap ?? 0, i), xt = Ct, D = Ct, W = {
|
|
1290
|
+
width: xt,
|
|
1291
|
+
...O ? { aspectRatio: Tt, height: "auto", overflow: "hidden" } : { height: "auto" }
|
|
1292
|
+
}, U = O ? {
|
|
1293
|
+
objectFit: "cover",
|
|
1294
|
+
pointerEvents: "auto",
|
|
1295
|
+
width: "100%",
|
|
1296
|
+
height: "100%",
|
|
1297
|
+
maxWidth: "100%"
|
|
1298
|
+
} : {
|
|
1299
|
+
objectFit: "contain",
|
|
1300
|
+
pointerEvents: "auto",
|
|
1301
|
+
width: "auto",
|
|
1302
|
+
height: "auto",
|
|
1303
|
+
maxWidth: "100%"
|
|
1304
|
+
}, Z = w(null), [lt, at] = $(!1), [k, Nt] = $([]), [ft, K] = $(0), [z, ht] = $(0), [ct, R] = $(null), [bt, T] = $({
|
|
1305
|
+
title1: "",
|
|
1306
|
+
title2: "",
|
|
1307
|
+
title3: ""
|
|
1308
|
+
}), Jt = (() => {
|
|
1309
|
+
const x = {}, v = Z.current ? getComputedStyle(Z.current).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
1310
|
+
return v && (x["--cntrl-article-width"] = v), x;
|
|
1311
|
+
})(), de = !i || r || o, fe = $e(() => pn(a), [a]), f = e ?? [], gt = f.length % q || q, J = gt < q && f.length > 0, It = f.length - gt, Bt = J ? Math.floor((q - gt) / 2) + 1 : 1, A = $e(() => In(f), [f]), Y = $e(() => Rn(f), [f]), he = (x, v, wt) => {
|
|
1312
|
+
if (i && !o && !r) return;
|
|
1313
|
+
const H = A.findIndex((Vt) => Vt.gridIndex === x);
|
|
1314
|
+
if (H < 0) return;
|
|
1315
|
+
const vt = A[H];
|
|
1316
|
+
ht(H), Nt(vt.items), K(v), T(vt.entry), R(wt ?? null), at(!0);
|
|
1317
|
+
}, Q = m(() => {
|
|
1318
|
+
at(!1), R(null);
|
|
1319
|
+
}, []), pt = m(() => {
|
|
1320
|
+
const x = A[z];
|
|
1321
|
+
return !x || !Z.current ? ct : bn(
|
|
1322
|
+
Z.current,
|
|
1323
|
+
x.gridIndex,
|
|
1324
|
+
O ? "cover" : "contain"
|
|
1325
|
+
) ?? ct;
|
|
1326
|
+
}, [A, z, ct, O]), St = m((x) => {
|
|
1327
|
+
if (A.length > 1) {
|
|
1328
|
+
const v = A.length, wt = (z + x + v) % v, H = A[wt], vt = Math.min(ft, H.items.length - 1);
|
|
1329
|
+
ht(wt), Nt(H.items), K(vt), T(H.entry);
|
|
1330
|
+
return;
|
|
1331
|
+
}
|
|
1332
|
+
K((v) => (v + x + k.length) % k.length);
|
|
1333
|
+
}, [A, z, ft, k.length]), mt = A.length > 1 || k.length > 1;
|
|
1334
|
+
return G(() => {
|
|
1335
|
+
if (!lt || typeof document > "u") return;
|
|
1336
|
+
const x = document.body.style.overflow;
|
|
1337
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1338
|
+
document.body.style.overflow = x;
|
|
1339
|
+
};
|
|
1340
|
+
}, [lt]), G(() => {
|
|
1341
|
+
!i || o || r || at(!1);
|
|
1342
|
+
}, [i, o, r]), /* @__PURE__ */ kt(be, { children: [
|
|
1343
|
+
/* @__PURE__ */ d("style", { dangerouslySetInnerHTML: { __html: fe } }),
|
|
1344
|
+
/* @__PURE__ */ d(Tn, { mediaList: Y }),
|
|
1345
|
+
/* @__PURE__ */ d(
|
|
1346
|
+
"div",
|
|
1347
|
+
{
|
|
1348
|
+
ref: Z,
|
|
1349
|
+
className: `${a}-wrapper ${a}-align-entries ${a}-image-align-${ot}`.trim(),
|
|
1350
|
+
style: {
|
|
1351
|
+
gridTemplateColumns: `repeat(${q}, ${Ct})`,
|
|
1352
|
+
rowGap: 0,
|
|
1353
|
+
columnGap: st,
|
|
1354
|
+
width: se(b.wrapperWidth ?? 0, i),
|
|
1355
|
+
[`--${a}-align-entries-row-gap`]: se(L ?? 0, i)
|
|
1356
|
+
},
|
|
1357
|
+
children: f.map((x, v) => {
|
|
1358
|
+
const wt = Se(x.gallery), H = Le(wt), vt = H.filter((E) => E.lightboxMedia).map((E) => E.lightboxMedia), Vt = Math.floor(v / q) === Math.ceil(f.length / q) - 1, Gt = J && v >= It ? `${Bt + (v - It)}` : void 0, P = H[0], Lt = P != null && P.lightboxMedia ? vt.findIndex((E) => E.assetId === P.lightboxMedia.assetId) : -1, M = /* @__PURE__ */ d("div", { className: `${a}-item-image-wrapper`, style: W, children: H.length > 0 && /* @__PURE__ */ d(
|
|
1359
|
+
Wn,
|
|
1360
|
+
{
|
|
1361
|
+
media: P.displayMedia,
|
|
1362
|
+
gridIndex: v,
|
|
1363
|
+
className: `${a}-item-${Dt(P.displayMedia) ? "video" : "image"}`.trim(),
|
|
1364
|
+
style: U,
|
|
1365
|
+
onMediaClick: de && Lt >= 0 ? (E) => he(
|
|
1366
|
+
v,
|
|
1367
|
+
Lt,
|
|
1368
|
+
Ye(E.currentTarget, O ? "cover" : "contain")
|
|
1369
|
+
) : void 0
|
|
1370
|
+
}
|
|
1371
|
+
) });
|
|
1372
|
+
return /* @__PURE__ */ d("div", { className: `${a}-item`, children: /* @__PURE__ */ kt(
|
|
1373
|
+
"div",
|
|
1374
|
+
{
|
|
1375
|
+
className: [
|
|
1376
|
+
o ? `${a}-item-inner` : `${a}-item-inner-hidden`,
|
|
1377
|
+
Vt ? `${a}-item-inner-last-row` : ""
|
|
1378
|
+
].filter(Boolean).join(" "),
|
|
1379
|
+
style: {
|
|
1380
|
+
width: Ct,
|
|
1381
|
+
...Gt ? { gridColumn: Gt } : {}
|
|
1382
|
+
},
|
|
1383
|
+
children: [
|
|
1384
|
+
/* @__PURE__ */ d("div", { className: `${a}-item-title-row`, children: /* @__PURE__ */ d("div", { style: { height: 0, width: D } }) }),
|
|
1385
|
+
/* @__PURE__ */ d("a", { className: `${a}-item-image-link`, children: M }),
|
|
1386
|
+
/* @__PURE__ */ d("div", { className: `${a}-item-subtitle-row`, children: /* @__PURE__ */ d("div", { style: { height: 0, width: D } }) })
|
|
1387
|
+
]
|
|
1388
|
+
}
|
|
1389
|
+
) }, v);
|
|
1390
|
+
})
|
|
1391
|
+
}
|
|
1392
|
+
),
|
|
1393
|
+
lt && typeof document < "u" && (() => {
|
|
1394
|
+
const x = (g ? document.getElementById(g) : null) ?? document.body;
|
|
1395
|
+
return dn(
|
|
1396
|
+
/* @__PURE__ */ d("div", { style: Jt, "data-selection": "none", children: /* @__PURE__ */ d(
|
|
1397
|
+
On,
|
|
1398
|
+
{
|
|
1399
|
+
prefix: a,
|
|
1400
|
+
items: k,
|
|
1401
|
+
index: ft,
|
|
1402
|
+
entry: bt,
|
|
1403
|
+
settings: t,
|
|
1404
|
+
isEditor: i,
|
|
1405
|
+
isEditMode: o,
|
|
1406
|
+
isPreviewMode: r,
|
|
1407
|
+
canNavigate: mt,
|
|
1408
|
+
lightboxEntries: A,
|
|
1409
|
+
entryIdx: z,
|
|
1410
|
+
layoutId: l,
|
|
1411
|
+
sourceRect: ct,
|
|
1412
|
+
resolveCloseSourceRect: pt,
|
|
1413
|
+
onClose: Q,
|
|
1414
|
+
onPrev: () => St(-1),
|
|
1415
|
+
onNext: () => St(1)
|
|
1416
|
+
}
|
|
1417
|
+
) }),
|
|
1418
|
+
x
|
|
1419
|
+
);
|
|
1420
|
+
})()
|
|
1421
|
+
] });
|
|
1422
|
+
}
|
|
1423
|
+
export {
|
|
1424
|
+
Xn as Hive
|
|
1425
|
+
};
|