@cntrl-site/components 1.0.104 → 1.0.106
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/ClickGallerie-CYQMgrIr.js +36 -0
- package/dist/ClickGallerie-o2U6oyOF.mjs +272 -0
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +2 -1
- package/dist/Components/Helix/Helix.d.ts +4 -1
- package/dist/Components/Hive/Hive.d.ts +4 -1
- package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +2 -1
- package/dist/Components/List/List.d.ts +6 -2
- package/dist/Components/Marquee/Marquee.d.ts +6 -2
- package/dist/Components/MarqueeText/MarqueeText.d.ts +2 -1
- package/dist/Components/Mercury/Mercury.d.ts +4 -1
- package/dist/Components/Waterfall/WaterfallLightbox.d.ts +4 -1
- package/dist/Components/utils/EmbedMediaFrame.d.ts +27 -0
- package/dist/Components/utils/LinkWrapper.d.ts +16 -0
- package/dist/Components/utils/embedMedia.d.ts +40 -0
- package/dist/Components/utils/index.d.ts +6 -0
- package/dist/Components/utils/observeIntersection.d.ts +4 -0
- package/dist/Components/utils/useLazyVideos.d.ts +0 -3
- package/dist/{ControlSlider-SiOt22l_.js → ControlSlider-Kkec-i14.js} +1 -1
- package/dist/{ControlSlider-pZv7H6BU.mjs → ControlSlider-LcZmviGX.mjs} +1 -1
- package/dist/EmbedMediaFrame-DsOTKE4i.js +1 -0
- package/dist/EmbedMediaFrame-DwHeOAy5.mjs +164 -0
- package/dist/{FAQ-C7823fyi.js → FAQ-BxhMo7T8.js} +1 -1
- package/dist/{FAQ-CZ39u4m8.mjs → FAQ-CdwSft5p.mjs} +1 -1
- package/dist/Grid-CFHTP3mb.js +378 -0
- package/dist/Grid-e-gLfsji.mjs +1590 -0
- package/dist/Helix-BpLo9FD3.js +43 -0
- package/dist/Helix-CidI3ucE.mjs +324 -0
- package/dist/{Hive-BusARSOi.mjs → Hive-BsmFHk2i.mjs} +505 -475
- package/dist/Hive-D1j6wZpV.js +321 -0
- package/dist/ImageRevealSlider-BuukTGAK.js +1 -0
- package/dist/{ImageRevealSlider-BdFGyVEP.mjs → ImageRevealSlider-Df9sygk9.mjs} +63 -70
- package/dist/{LazyVideo-D8eVYFyw.mjs → LazyVideo-CdAWymKO.mjs} +1 -1
- package/dist/{LazyVideo-Cn_vmMq8.js → LazyVideo-imbU18js.js} +1 -1
- package/dist/{Lightbox-eP9qAZzL.mjs → Lightbox-C_fXsfdz.mjs} +1 -1
- package/dist/{Lightbox-CIss_nOG.js → Lightbox-DaunVrkp.js} +1 -1
- package/dist/LinkWrapper-Ca84iPtg.js +1 -0
- package/dist/LinkWrapper-DZs9hlOn.mjs +13 -0
- package/dist/{List-DW7fyJbf.mjs → List-Bh_-l9vD.mjs} +532 -520
- package/dist/List-DVvpQ24J.js +377 -0
- package/dist/Marquee-DByooiWP.mjs +578 -0
- package/dist/Marquee-DfIP-tIN.js +133 -0
- package/dist/MarqueeText-D6FNCe6P.mjs +518 -0
- package/dist/MarqueeText-DsUiV6Zv.js +132 -0
- package/dist/Mercury-B-s2Kvuq.js +267 -0
- package/dist/Mercury-CCW0Es-s.mjs +1700 -0
- package/dist/PretextComponent-Dnbenstn.js +1 -0
- package/dist/{PretextComponent-s4DDfmzY.mjs → PretextComponent-OygSO3fr.mjs} +312 -269
- package/dist/{RichTextRenderer-B6WtTYlR.mjs → RichTextRenderer-BptwNpbJ.mjs} +10 -9
- package/dist/RichTextRenderer-K90Dd7pt.js +1 -0
- package/dist/{Slider20-Dm8BeCli.mjs → Slider20-CCzixTiN.mjs} +1 -1
- package/dist/{Slider20-C9o2REDl.js → Slider20-fMVeRfgx.js} +1 -1
- package/dist/{TestimonialGrid-CPu4qQ6B.mjs → TestimonialGrid-CbsVxSn9.mjs} +1 -1
- package/dist/{TestimonialGrid-D4ieiz9e.js → TestimonialGrid-CiCagfBU.js} +1 -1
- package/dist/{TestimonialSingle-DLdnAVF7.mjs → TestimonialSingle-BVm3Amrl.mjs} +1 -1
- package/dist/{TestimonialSingle-CVu15ZtV.js → TestimonialSingle-BWXynGjv.js} +1 -1
- package/dist/Waterfall-3kKioKh2.mjs +1432 -0
- package/dist/Waterfall-DII4-WV5.js +288 -0
- package/dist/{components-Yf9Zjska.mjs → components-BRmbflgg.mjs} +15 -15
- package/dist/components-nvbH4l0S.js +1 -0
- package/dist/content/postFieldBindings.d.ts +29 -0
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +16 -16
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +52 -15
- package/dist/observeIntersection-B0f3L2iK.mjs +23 -0
- package/dist/observeIntersection-DxGj9Ctt.js +1 -0
- package/dist/sources.js +335 -223
- package/dist/sources.mjs +339 -227
- package/dist/types/SchemaV1.d.ts +53 -1
- package/dist/useLazyVideos-CdCbc2j0.js +1 -0
- package/dist/useLazyVideos-CxXyEjRQ.mjs +52 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +30 -20
- package/package.json +1 -1
- package/dist/ClickGallerie-D7g093HX.js +0 -36
- package/dist/ClickGallerie-QSOQjSdv.mjs +0 -271
- package/dist/Grid-B2_o1dvz.mjs +0 -1576
- package/dist/Grid-Bq6bk2AQ.js +0 -374
- package/dist/Helix-B7rxlvKq.js +0 -43
- package/dist/Helix-BrKQzGX5.mjs +0 -315
- package/dist/Hive-Dh5nKPGm.js +0 -321
- package/dist/ImageRevealSlider-BBWtFjUF.js +0 -1
- package/dist/List-C32WImI3.js +0 -377
- package/dist/Marquee-CdtAqhQE.mjs +0 -563
- package/dist/Marquee-DUN8wUax.js +0 -133
- package/dist/MarqueeText-4Rip_sQX.mjs +0 -515
- package/dist/MarqueeText-E6OubMOG.js +0 -132
- package/dist/Mercury-BRqlbk4i.mjs +0 -1702
- package/dist/Mercury-C-O2VGkK.js +0 -267
- package/dist/PretextComponent-D5P0AjnL.js +0 -1
- package/dist/RichTextRenderer-CIy6yI8U.js +0 -1
- package/dist/Waterfall-DKuh4bnv.mjs +0 -1404
- package/dist/Waterfall-fdiHR0Rc.js +0 -287
- package/dist/components-DzNixU7Q.js +0 -1
- package/dist/useLazyVideos-BbgdvELi.js +0 -1
- package/dist/useLazyVideos-CZLyNolX.mjs +0 -72
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("react"),Pt=require("react-dom"),Et=require("./getImageRect-BQhQXvT8.js"),Je=require("./scalingValue-CSHYgTZl.js"),en=require("./useScopedStyles-Bf6yohVQ.js"),tn=require("./LazyVideo-Cn_vmMq8.js"),nn=require("./textStylesToCss-CNN3zZTV.js"),rn=require("./useLazyVideos-BbgdvELi.js"),on=require("./HiveLightboxTitles-DlyptAaK.js");function an(e){return`
|
|
2
|
-
.${e}-titles-row {
|
|
3
|
-
position: relative;
|
|
4
|
-
flex: 0 1 auto;
|
|
5
|
-
z-index: 2;
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
word-break: break-word;
|
|
9
|
-
min-width: 0;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
align-items: baseline;
|
|
13
|
-
}
|
|
14
|
-
.${e}-titles-row-header {
|
|
15
|
-
flex: 1;
|
|
16
|
-
align-items: baseline;
|
|
17
|
-
}
|
|
18
|
-
.${e}-titles-row-header-controls {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
align-items: baseline;
|
|
22
|
-
flex-shrink: 0;
|
|
23
|
-
}
|
|
24
|
-
.${e}-close-icon {
|
|
25
|
-
position: relative;
|
|
26
|
-
flex-shrink: 0;
|
|
27
|
-
align-self: center;
|
|
28
|
-
pointer-events: auto;
|
|
29
|
-
z-index: 2;
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
justify-content: center;
|
|
33
|
-
border: none;
|
|
34
|
-
background-color: transparent;
|
|
35
|
-
padding: 0;
|
|
36
|
-
}
|
|
37
|
-
.${e}-close-icon-inner {
|
|
38
|
-
all: unset;
|
|
39
|
-
position: relative;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
pointer-events: auto;
|
|
44
|
-
}
|
|
45
|
-
.${e}-close-icon-img {
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 50%;
|
|
48
|
-
left: 50%;
|
|
49
|
-
transform: translate(-50%, -50%);
|
|
50
|
-
}
|
|
51
|
-
.${e}-titles-baseline-strut {
|
|
52
|
-
width: 0;
|
|
53
|
-
overflow: hidden;
|
|
54
|
-
flex-shrink: 0;
|
|
55
|
-
pointer-events: none;
|
|
56
|
-
white-space: nowrap;
|
|
57
|
-
}
|
|
58
|
-
.${e}-titles-row-titles {
|
|
59
|
-
position: relative;
|
|
60
|
-
flex: 1;
|
|
61
|
-
min-width: 0;
|
|
62
|
-
align-self: flex-start;
|
|
63
|
-
}
|
|
64
|
-
.${e}-titles-stack {
|
|
65
|
-
position: relative;
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: row;
|
|
68
|
-
align-items: baseline;
|
|
69
|
-
align-self: flex-start;
|
|
70
|
-
min-width: 0;
|
|
71
|
-
}
|
|
72
|
-
.${e}-titles-row-two-row {
|
|
73
|
-
display: flex;
|
|
74
|
-
flex: 1;
|
|
75
|
-
height: 100%;
|
|
76
|
-
min-height: 0;
|
|
77
|
-
align-self: stretch;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
width: 100%;
|
|
80
|
-
}
|
|
81
|
-
.${e}-titles-row-top {
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: row;
|
|
84
|
-
align-items: baseline;
|
|
85
|
-
width: 100%;
|
|
86
|
-
flex-shrink: 0;
|
|
87
|
-
margin-bottom: 0;
|
|
88
|
-
}
|
|
89
|
-
.${e}-titles-row-top .${e}-title-cell[data-title="title1"] {
|
|
90
|
-
flex: 0 0 auto;
|
|
91
|
-
min-width: 0;
|
|
92
|
-
}
|
|
93
|
-
.${e}-titles-row-bottom-wrap {
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
width: 100%;
|
|
97
|
-
margin-top: auto;
|
|
98
|
-
flex-shrink: 0;
|
|
99
|
-
}
|
|
100
|
-
.${e}-titles-row-bottom-area {
|
|
101
|
-
position: relative;
|
|
102
|
-
flex: 1;
|
|
103
|
-
min-height: 0;
|
|
104
|
-
display: flex;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
width: 100%;
|
|
107
|
-
}
|
|
108
|
-
.${e}-titles-row-bottom {
|
|
109
|
-
position: relative;
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-direction: row;
|
|
112
|
-
align-items: flex-end;
|
|
113
|
-
width: 100%;
|
|
114
|
-
}
|
|
115
|
-
.${e}-titles-row-bottom .${e}-title-cell {
|
|
116
|
-
flex: 0 0 auto;
|
|
117
|
-
}
|
|
118
|
-
.${e}-title-cell {
|
|
119
|
-
position: relative;
|
|
120
|
-
flex: 0 0 auto;
|
|
121
|
-
min-width: 0;
|
|
122
|
-
box-sizing: border-box;
|
|
123
|
-
}
|
|
124
|
-
.${e}-text-bar-cell {
|
|
125
|
-
position: relative;
|
|
126
|
-
flex: 0 1 auto;
|
|
127
|
-
min-width: 0;
|
|
128
|
-
display: flex;
|
|
129
|
-
align-items: baseline;
|
|
130
|
-
}
|
|
131
|
-
.${e}-title1,
|
|
132
|
-
.${e}-title2,
|
|
133
|
-
.${e}-title3 {
|
|
134
|
-
margin: 0;
|
|
135
|
-
min-width: 0;
|
|
136
|
-
}
|
|
137
|
-
.${e}-title-resize-handle {
|
|
138
|
-
background: transparent;
|
|
139
|
-
}
|
|
140
|
-
.${e}-lightbox {
|
|
141
|
-
position: fixed;
|
|
142
|
-
inset: 0;
|
|
143
|
-
z-index: 9997;
|
|
144
|
-
overscroll-behavior: none;
|
|
145
|
-
overflow: hidden;
|
|
146
|
-
}
|
|
147
|
-
.${e}-lightbox-editor {
|
|
148
|
-
inset: auto;
|
|
149
|
-
top: var(--cntrl-article-top, 0);
|
|
150
|
-
left: var(--cntrl-article-left, 0);
|
|
151
|
-
width: var(--cntrl-article-width, 100vw) !important;
|
|
152
|
-
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
153
|
-
}
|
|
154
|
-
.${e}-lightbox-edit-mode {
|
|
155
|
-
z-index: 1;
|
|
156
|
-
}
|
|
157
|
-
.${e}-lightbox-dismiss-area {
|
|
158
|
-
position: relative;
|
|
159
|
-
width: 100%;
|
|
160
|
-
height: 100%;
|
|
161
|
-
}
|
|
162
|
-
.${e}-lightbox-overlay-content {
|
|
163
|
-
position: absolute;
|
|
164
|
-
inset: 0;
|
|
165
|
-
z-index: 3;
|
|
166
|
-
pointer-events: none;
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-direction: column;
|
|
169
|
-
isolation: isolate;
|
|
170
|
-
}
|
|
171
|
-
.${e}-lightbox-content-area {
|
|
172
|
-
position: relative;
|
|
173
|
-
display: flex;
|
|
174
|
-
flex-direction: row;
|
|
175
|
-
align-items: flex-start;
|
|
176
|
-
flex: 1;
|
|
177
|
-
min-width: 0;
|
|
178
|
-
min-height: 0;
|
|
179
|
-
}
|
|
180
|
-
.${e}-lightbox-content-area-stacked {
|
|
181
|
-
align-items: stretch;
|
|
182
|
-
align-self: stretch;
|
|
183
|
-
}
|
|
184
|
-
.${e}-text-bar-cell-stacked {
|
|
185
|
-
align-self: stretch;
|
|
186
|
-
flex: 1;
|
|
187
|
-
min-width: 0;
|
|
188
|
-
min-height: 0;
|
|
189
|
-
height: 100%;
|
|
190
|
-
flex-direction: column;
|
|
191
|
-
align-items: stretch;
|
|
192
|
-
}
|
|
193
|
-
.${e}-control {
|
|
194
|
-
position: relative;
|
|
195
|
-
z-index: 2;
|
|
196
|
-
pointer-events: auto;
|
|
197
|
-
flex-shrink: 0;
|
|
198
|
-
}
|
|
199
|
-
`}const Z=500,Ne=650,_="cubic-bezier(0.22, 1, 0.36, 1)",ln=72,cn=50,sn=1e4,un=650,fn=500;function dn(e,n){const r=e.width/n.width,i=e.height/n.height,a=e.left-n.left,c=e.top-n.top;return`translate(${a}px, ${c}px) scale(${r}, ${i})`}function Ft(e,n){if(n==="contain"&&e instanceof HTMLImageElement){const i=Et.getDisplayedImageRect(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const r=e.getBoundingClientRect();return{left:r.left,top:r.top,width:r.width,height:r.height}}function hn(e,n,r){const i=e.querySelector(`[data-waterfall-index="${n}"]`);return i instanceof HTMLElement?Ft(i,r):null}function pn(e){return e.reduce((n,r,i)=>{var a;return(a=r.image)!=null&&a.assetId&&n.push({gridIndex:i,items:[r.image],entry:{title1:r.title??"",title2:r.subtitle??"",title3:r.caption??""}}),n},[])}function We(e,n,r){var a;if(e.length<=1)return null;const i=(n+r+e.length)%e.length;return((a=e[i])==null?void 0:a.items[0])??null}function Ht(e,n,r){if(e.length<=2)return null;const i=(n+r+e.length)%e.length;return We(e,i,r)}const gn=.03;function Nt(e){return e.width*gn}const ft={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Ze(e,n){return{left:e.left-n.left,top:e.top-n.top,width:e.width,height:e.height}}function At(e){const n=e.getBoundingClientRect();return{width:n.width,height:n.height,left:n.left,top:n.top}}function mn(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function dt(e,n,r){const i=e.getBoundingClientRect(),a=i.width,c=i.height,g=n/r,f=a/c;if(g>f){const y=a/g;return{width:a,height:y,left:i.left,top:i.top+(c-y)/2}}const $=c*g;return{width:$,height:c,left:i.left+(a-$)/2,top:i.top}}function wn(e,n){return!e||!(n!=null&&n.width)||!(n!=null&&n.height)?null:dt(e,n.width,n.height)}function vn(e,n){if(Pe(e)){const i=document.createElement("video"),a=()=>{i.videoWidth>0&&i.videoHeight>0&&n(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",a)};i.addEventListener("loadedmetadata",a),i.preload="auto",i.src=e.assetId,i.load();return}const r=new Image;r.onload=()=>{r.naturalWidth>0&&r.naturalHeight>0&&n(e.assetId,r.naturalWidth,r.naturalHeight)},r.src=e.assetId}function xn(e){const n=new Set,r=[];for(const i of e){const a=i.image;!(a!=null&&a.assetId)||n.has(a.assetId)||(n.add(a.assetId),r.push(a))}return r}function yn({mediaList:e}){const[n,r]=o.useState(null);return rn.useLazyVideos(n,{preload:"metadata"}),e.length===0?null:s.jsx("div",{ref:r,"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(i=>Pe(i)?s.jsx("video",{src:i.assetId,preload:"none",muted:!0,playsInline:!0},i.assetId):s.jsx("img",{src:i.assetId,alt:""},i.assetId))})}function Ce(e,n,r){const{width:i,height:a,top:c}=e,{left:g,width:f}=r,$=Nt(r);return n==="left"?{left:g+$-i,top:c,width:i,height:a}:{left:g+f-$,top:c,width:i,height:a}}function Qe(e,n,r){const i=Ce(e,n,r);return{...i,left:2*i.left-e.left}}function bn(e,n,r){const{left:i,width:a}=r,c=Nt(r);return n==="left"?{left:i,top:e.top,width:c,height:e.height}:{left:i+a-c,top:e.top,width:c,height:e.height}}function Wt(e,n,r,i){const a=Ce(e,"left",i),c=Ce(e,"right",i),g=Qe(e,"left",i),f=Qe(e,"right",i);if(r===1)switch(n){case"center":return{start:e,end:a};case"right-adjacent":return{start:c,end:e};case"left-adjacent":return{start:a,end:g};case"far-right":return{start:f,end:c};default:return{start:e,end:e}}switch(n){case"center":return{start:e,end:c};case"left-adjacent":return{start:a,end:e};case"right-adjacent":return{start:c,end:f};case"far-left":return{start:g,end:a};default:return{start:e,end:e}}}function $n(e,n,r,i){const{start:a,end:c}=Wt(e,n,r,i);return{x:c.left-a.left,y:c.top-a.top}}function Sn(e,n,r){const i=Ce(e,n,r),a=Qe(e,n,r);return{x:a.left-i.left,y:a.top-i.top}}function Pe(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function In({src:e,phase:n,onMediaElement:r,wrapperStyle:i,videoStyle:a,onLoadedMetadata:c,onTransitionEnd:g}){const f=o.useRef(null);return o.useEffect(()=>{const $=f.current;return r==null||r($??null),()=>{$==null||$.pause(),r==null||r(null)}},[e,r]),s.jsx("div",{style:i,onTransitionEnd:g,children:s.jsx("video",{ref:f,src:e,controls:n==="open",playsInline:!0,preload:"auto",onLoadedMetadata:c,onClick:$=>$.stopPropagation(),style:a},e)})}function Ke({media:e,style:n,onTransitionEnd:r,onMeasure:i}){return Pe(e)?s.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:n,onLoadedMetadata:a=>{const c=a.currentTarget;c.videoWidth>0&&c.videoHeight>0&&(i==null||i(e.assetId,c.videoWidth,c.videoHeight))},onTransitionEnd:r}):s.jsx("img",{src:e.assetId,alt:e.name,style:n,onLoad:a=>{const c=a.currentTarget;c.naturalWidth>0&&c.naturalHeight>0&&(i==null||i(e.assetId,c.naturalWidth,c.naturalHeight))},onTransitionEnd:r})}function Ln({prefix:e,items:n,index:r,entry:i,settings:a,isEditor:c,isEditMode:g,isPreviewMode:f,canNavigate:$,lightboxEntries:y,entryIdx:K,layoutId:et,sourceRect:ae,resolveCloseSourceRect:ge,onClose:ze,onPrev:J,onNext:je}){const He=o.useRef(null),V=o.useRef(null),M=o.useRef(null),Q=o.useRef(new Map),[le,Oe]=o.useState(0),P=o.useRef(null),ee=o.useRef(0),L=o.useRef(0),C=o.useRef("none"),A=o.useRef(!1),me=o.useRef(!1),we=o.useRef(!1),ce=o.useRef(null),W=o.useRef(null),xe=o.useRef(null),te=o.useRef(()=>{}),se=o.useRef(null),ue=o.useRef(null),fe=o.useRef(null),ne=o.useRef(!1),[j,ve]=o.useState(null),[H,E]=o.useState(ft),[tt,nt]=o.useState(0),[m,ye]=o.useState("opening"),[B,be]=o.useState(0),[h,v]=o.useState(0),[b,z]=o.useState(!1),[F,re]=o.useState(null),[de,$e]=o.useState(null),[De,Se]=o.useState(null),[zt,rt]=o.useState(!1),[Ot,Dt]=o.useState(null),[ht,ot]=o.useState(!1),_e=o.useRef(!1),[q,Ie]=o.useState(!1),[_t,pt]=o.useState(!1),gt=o.useRef(r),mt=o.useRef(void 0),p=n[r],Ve=p?Pe(p):!1,G=h!==0||b,it=!g&&(!c||!!f),oe=$&&!g,he=y.length>1,Le=o.useCallback((t,l)=>n.length<=1?null:n[(t+l+n.length)%n.length]??null,[n]),k=he?We(y,K,-1):Le(r,-1),R=he?We(y,K,1):Le(r,1),at=F===-1&&G?he&&de!==null?We(y,de,-1):De!==null?Le(De,-1):null:null,lt=F===1&&G?he&&de!==null?We(y,de,1):De!==null?Le(De,1):null:null,Vt=at&&at.assetId!==(k==null?void 0:k.assetId)?at:null,Mt=lt&<.assetId!==(R==null?void 0:R.assetId)?lt:null,Bt=k&&oe?(()=>{const t=he?Ht(y,K,-1):n.length>2?Le((r-1+n.length)%n.length,-1):null;return t&&t.assetId!==k.assetId?t:null})():null,qt=R&&oe?(()=>{const t=he?Ht(y,K,1):n.length>2?Le((r+1)%n.length,1):null;return t&&t.assetId!==R.assetId?t:null})():null,Me=Vt??Bt,Be=Mt??qt,pe=o.useCallback((t,l,d)=>{if(!t||!l||!d)return;const u=Q.current,x=u.get(t);(x==null?void 0:x.width)===l&&(x==null?void 0:x.height)===d||(u.set(t,{width:l,height:d}),Oe(D=>D+1))},[]),ke=o.useCallback(t=>{if(!(t!=null&&t.assetId))return null;const l=Q.current.get(t.assetId);return wn(V.current,l)},[le,tt]),qe=o.useCallback(()=>{if(!p)return;const t=ke(p);if(t){ve(t);return}const l=V.current;l&&ve(At(l))},[p,ke]),Ge=o.useCallback(t=>{if(he){const l=y.length;$e((K+t+l)%l),Se(null);return}n.length>1&&(Se((r+t+n.length)%n.length),$e(null))},[he,y.length,K,n.length,r]),T=o.useCallback(t=>{we.current=t,z(t)},[]),S=o.useCallback(()=>{ce.current!==null&&(window.clearTimeout(ce.current),ce.current=null)},[]),wt=o.useCallback(()=>{S(),ce.current=window.setTimeout(()=>{S(),T(!1)},Ne+32)},[S,T]),vt=o.useCallback(()=>{const t=He.current;if(!t){E({left:0,top:0,width:typeof window<"u"?window.innerWidth:ft.width,height:typeof window<"u"?window.innerHeight:ft.height});return}const l=t.getBoundingClientRect();E({left:l.left,top:l.top,width:l.width,height:l.height})},[]),xt=o.useCallback((t,l)=>{if(G){if(q&&!b)return`translate(${h}px, 0px)`;if(b&&F!==null){const d=ke(t);if(!d)return;const{x:u,y:x}=$n(d,l,F,H);return`translate(${u}px, ${x}px)`}if(b)return"translate(0px, 0px)"}},[G,q,b,h,F,H,ke]),Re=o.useCallback(()=>{const t=W.current;W.current=null,S(),T(!1),re(null),$e(null),Se(null),v(0),Ie(!1),A.current=!1,L.current=0,C.current="none",t===-1?J():t===1&&je()},[S,T,J,je]),Xe=o.useCallback(()=>{S(),ce.current=window.setTimeout(()=>{W.current!==null&&Re()},Ne+32)},[S,Re]),yt=o.useCallback(()=>{S(),W.current=null,T(!1),re(null),$e(null),Se(null),v(0),Ie(!1),A.current=!1,L.current=0,C.current="none"},[S,T]),bt=o.useCallback(t=>{if(!(!oe||!j)){if(we.current){if(W.current===t){xe.current=t,Re();return}yt()}S(),Ge(t),W.current=t,re(t),T(!0),Xe()}},[oe,j,Re,yt,S,Ge,T,Xe]);te.current=bt;const ie=o.useCallback(()=>{se.current=null,ne.current=!1,ue.current!==null&&(window.clearInterval(ue.current),ue.current=null),fe.current!==null&&(window.clearTimeout(fe.current),fe.current=null)},[]),ct=o.useCallback(t=>{ue.current!==null&&window.clearInterval(ue.current);const l=ne.current?fn:un;ue.current=window.setInterval(()=>{te.current(t)},l)},[]),$t=o.useCallback(t=>{se.current!==t&&(ie(),se.current=t,ne.current=!1,te.current(t),ct(t),fe.current=window.setTimeout(()=>{fe.current=null,se.current===t&&(ne.current=!0,ct(t))},sn))},[ie,ct]),X=o.useCallback(()=>{const t=V.current;if(!t)return;const l=p==null?void 0:p.assetId,d=l?Q.current.get(l):void 0;if(d!=null&&d.width&&(d!=null&&d.height)){ve(dt(t,d.width,d.height));return}const u=M.current;if(u&&l&&(u.src===l||u.currentSrc===l)){const{width:D,height:w}=mn(u);if(D&&w){pe(l,D,w),ve(dt(t,D,w));return}}const x=At(t);!x.width||!x.height||ve(x)},[p==null?void 0:p.assetId,pe]),St=o.useCallback(t=>{if(M.current=t,!!t){if(t instanceof HTMLVideoElement){t.readyState>=1&&t.videoWidth>0&&X();return}t.complete&&t.naturalWidth>0&&X()}},[X]),Ae=o.useCallback(()=>{vt(),X(),nt(t=>t+1)},[vt,X]);o.useEffect(()=>{Ae();const t=V.current,l=He.current,d=new ResizeObserver(()=>Ae());return t&&d.observe(t),l&&d.observe(l),window.addEventListener("resize",Ae),()=>{d.disconnect(),window.removeEventListener("resize",Ae)}},[Ae,r,et]),o.useLayoutEffect(()=>{if(!p)return;const t=M.current;if(t){if(t instanceof HTMLImageElement&&t.complete&&t.naturalWidth>0){X();return}t instanceof HTMLVideoElement&&t.readyState>=1&&t.videoWidth>0&&X()}},[p==null?void 0:p.assetId,r,X]),o.useEffect(()=>{qe()},[qe,le]),o.useEffect(()=>{const t=new Set,l=[],d=u=>{!(u!=null&&u.assetId)||t.has(u.assetId)||(t.add(u.assetId),l.push(u))};n.forEach(d),y.forEach(u=>u.items.forEach(d)),l.forEach(u=>{Q.current.has(u.assetId)||vn(u,pe)})},[n,y,pe]),o.useEffect(()=>{if(m!=="opening"||!j)return;if(!ae){ye("open");return}rt(!1);const t=requestAnimationFrame(()=>{requestAnimationFrame(()=>{rt(!0),ye("open")})});return()=>cancelAnimationFrame(t)},[m,j,ae]),o.useEffect(()=>{if(m!=="closing")return;const t=setTimeout(()=>ze(),Z);return()=>clearTimeout(t)},[m,ze]),o.useEffect(()=>()=>{S()},[S]),o.useLayoutEffect(()=>{gt.current===r&&mt.current===(p==null?void 0:p.assetId)||(S(),W.current=null,re(null),$e(null),Se(null),be(0),v(0),T(!1),pt(!1),Ie(!1),ee.current=0,L.current=0,C.current="none",A.current=!1,P.current=null,me.current=!1,M.current=null,qe(),gt.current=r,mt.current=p==null?void 0:p.assetId)},[r,p==null?void 0:p.assetId,T,S,qe]),o.useLayoutEffect(()=>{const t=xe.current;t!==null&&(xe.current=null,requestAnimationFrame(()=>{te.current(t)}))},[r,K,p==null?void 0:p.assetId]),o.useLayoutEffect(()=>{if(m==="opening"){_e.current=!1,ot(!1);return}if(m!=="open"||_e.current)return;if(!k&&!R){_e.current=!0;return}ot(!1);const t=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ot(!0),_e.current=!0})});return()=>cancelAnimationFrame(t)},[m,k==null?void 0:k.assetId,R==null?void 0:R.assetId]),o.useEffect(()=>{if(m!=="open")return;const t=()=>{const w=I=>{I.stopPropagation(),I.preventDefault(),document.removeEventListener("click",w,!0)};document.addEventListener("click",w,!0)},l=w=>{const I=w<0?1:-1;S(),Ge(I),W.current=I,re(I),T(!0),Xe()},d=w=>{if(Math.abs(w)>cn&&oe){l(w);return}W.current=null,re(null),$e(null),Se(null),T(!0),v(0),wt()},u=w=>{if(w.touches.length!==1||we.current)return;const I=w.touches[0];me.current=!0,P.current={x:I.clientX,y:I.clientY},C.current="none",L.current=0,A.current=!1},x=w=>{if(!P.current||w.touches.length!==1||we.current)return;const I=w.touches[0],Y=I.clientX-P.current.x,U=I.clientY-P.current.y;if(C.current==="none"){if(Math.abs(Y)<10&&Math.abs(U)<10)return;if(Math.abs(Y)>Math.abs(U)){if(!oe)return;C.current="horizontal"}else if(U>0){if(!it)return;C.current="vertical"}else return}if(C.current==="horizontal"){A.current=!0,Ie(!0),L.current=Y,v(Y),w.preventDefault();return}C.current==="vertical"&&(A.current=!0,Ie(!0),ee.current=U,be(U),w.preventDefault())},D=()=>{if(!P.current)return;const w=C.current,I=A.current;if(I&&w==="horizontal")d(L.current),t();else if(I&&w==="vertical"){const Y=ee.current;if(it&&Y>ln){const U=window.innerHeight;ee.current=U,pt(!0),be(U),ye("closing")}else ee.current=0,be(0);t()}else w==="horizontal"&&Math.abs(L.current)>0&&(d(L.current),t());P.current=null,C.current="none",L.current=0,A.current=!1,Ie(!1)};return document.addEventListener("touchstart",u,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",D),document.addEventListener("touchcancel",D),()=>{document.removeEventListener("touchstart",u),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",D),document.removeEventListener("touchcancel",D)}},[m,oe,T,wt,S,it,Xe,Ge]);const st=o.useCallback(()=>{const t=(ge==null?void 0:ge())??ae??null;t&&j&&(Dt(t),rt(!0)),ye("closing")},[ge,ae,j]);o.useEffect(()=>{const t=u=>{if(u.key==="Escape"){if(c&&f||m==="closing")return;ie(),st();return}if(u.key!=="ArrowLeft"&&u.key!=="ArrowRight"||m!=="open"||!oe)return;u.preventDefault();const x=u.key==="ArrowLeft"?-1:1;u.repeat&&se.current===x||$t(x)},l=u=>{if(u.key!=="ArrowLeft"&&u.key!=="ArrowRight")return;const x=u.key==="ArrowLeft"?-1:1;se.current===x&&ie()},d=()=>{ie()};return window.addEventListener("keydown",t),window.addEventListener("keyup",l),window.addEventListener("blur",d),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",l),window.removeEventListener("blur",d),ie()}},[m,c,f,st,oe,$t,ie]),o.useEffect(()=>{m!=="open"&&ie()},[m,ie]);const It=()=>{m==="closing"||g||st()},N=m==="open",Ye=m==="closing",Gt=B>0?Math.max(0,1-B/500):1,Xt=B>0?Math.max(.35,1-B/500):1,Te=o.useCallback(t=>{if(!(t.propertyName!=="transform"||!we.current)){if(W.current!==null){Re();return}S(),T(!1)}},[S,T,Re]),ut=m==="closing"?Ot??ae:ae,Yt=ut&&j&&(m==="opening"||Ye)?dn(ut,j):void 0,Ut=G&&p?xt(p,"center"):B>0?`translateY(${B}px)`:Yt,O=j?Ze(j,H):null,Lt=!!(ut&&j),Zt=Lt&&(m==="closing"||m==="open"&&zt),kt={position:"absolute",top:O==null?void 0:O.top,left:O==null?void 0:O.left,width:O==null?void 0:O.width,height:O==null?void 0:O.height,objectFit:"contain",transformOrigin:"top left",transform:Ut,opacity:B>0?Xt:Lt?1:m==="opening"||Ye?0:1,transition:q&&!b?"none":b?`transform ${Ne}ms ${_}`:_t?`transform ${Z}ms ${_}, opacity ${Z}ms ${_}`:Zt?`transform ${Z}ms ${_}`:m==="opening"||Ye?`opacity ${Z}ms ${_}`:"none",pointerEvents:Ve&&N&&!G?"auto":"none",touchAction:Ve&&N?"none":void 0,zIndex:1,overflow:Ve?"hidden":void 0},Kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:N&&!G?"auto":"none"},Ue=(t,l,d="adjacent")=>{const u=ke(t);if(!u)return{display:"none"};const x=d==="far"?l==="left"?"far-left":"far-right":l==="left"?"left-adjacent":"right-adjacent",{start:D}=F!==null?Wt(u,x,F,H):{start:d==="far"?Qe(u,l,H):Ce(u,l,H)},w=Ze(D,H),I=xt(t,x),Y=!G&&d==="adjacent"&&N&&!ht?Sn(u,l,H):null,U=d==="far"&&G&&F===(l==="left"?-1:1),Jt=q&&!b?!1:b,Qt=d==="adjacent"&&N&&ht&&!G;return{position:"absolute",top:w.top,left:w.left,width:w.width,height:w.height,objectFit:"contain",transform:I??(Y?`translate(${Y.x}px, ${Y.y}px)`:void 0),opacity:d==="far"?N&&U?1:0:N?1:0,transition:Jt?d==="far"?`transform ${Ne}ms ${_}`:`transform ${Ne}ms ${_}, opacity ${Z}ms ${_}`:Qt?`transform ${Z}ms ${_}`:m==="opening"||Ye?`opacity ${Z}ms ${_}`:"none",pointerEvents:"none",zIndex:1}},Rt=(t,l)=>{const d=ke(t);return d?bn(Ce(d,l,H),l,H):null},Tt=t=>l=>{if(!g){if(me.current){me.current=!1;return}l.stopPropagation(),bt(t)}},Ct=k?Rt(k,"left"):null,jt=R?Rt(R,"right"):null,Ee=Ct?Ze(Ct,H):null,Fe=jt?Ze(jt,H):null;return s.jsxs("div",{ref:He,className:[`${e}-lightbox`,c?`${e}-lightbox-editor`:"",g?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:m==="open"?"none":void 0},onClick:It,children:[s.jsx("div",{style:{position:"absolute",inset:0,background:a.backgroundColor??"#FFFFFF",opacity:N?Gt:0,transition:q?"none":`opacity ${Z}ms ${_}`,pointerEvents:"none"}}),s.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[s.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[s.jsx("div",{style:{height:"10%"}}),s.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:s.jsx("div",{ref:V,style:{width:"100%",height:"100%"}})}),s.jsx("div",{style:{height:"10%"}})]}),s.jsx("div",{style:{position:"absolute",inset:0,opacity:N?1:0,transition:q?"none":`opacity ${Z}ms ${_}`,pointerEvents:"none"},children:s.jsx(on.HiveLightboxTitles,{prefix:e,entry:i,settings:a,isEditor:c,isEditMode:g,isPreviewMode:f,onClose:It})})]}),N&&Me&&s.jsx(Ke,{media:Me,style:Ue(Me,"left","far"),onMeasure:pe,onTransitionEnd:Te},`far-prev-${Me.assetId}`),N&&k&&s.jsxs(s.Fragment,{children:[s.jsx(Ke,{media:k,style:Ue(k,"left"),onMeasure:pe,onTransitionEnd:Te},`prev-${k.assetId}`),Ee&&s.jsx("div",{style:{position:"absolute",top:Ee.top,left:Ee.left,width:Ee.width,height:Ee.height,cursor:g||q?"default":"pointer",pointerEvents:g||q?"none":"auto",zIndex:3},onClick:Tt(-1)})]}),N&&R&&s.jsxs(s.Fragment,{children:[s.jsx(Ke,{media:R,style:Ue(R,"right"),onMeasure:pe,onTransitionEnd:Te},`next-${R.assetId}`),Fe&&s.jsx("div",{style:{position:"absolute",top:Fe.top,left:Fe.left,width:Fe.width,height:Fe.height,cursor:g||q?"default":"pointer",pointerEvents:g||q?"none":"auto",zIndex:3},onClick:Tt(1)})]}),N&&Be&&s.jsx(Ke,{media:Be,style:Ue(Be,"right","far"),onMeasure:pe,onTransitionEnd:Te},`far-next-${Be.assetId}`),j&&p&&(Ve?s.jsx(In,{src:p.assetId,phase:m,onMediaElement:St,wrapperStyle:kt,videoStyle:Kt,onLoadedMetadata:X,onTransitionEnd:Te},`${r}-${p.assetId}`):s.jsx("img",{ref:St,src:p.assetId,alt:p.name,onLoad:X,onTransitionEnd:Te,style:kt},`${r}-${p.assetId}`))]})}const kn=20,Rn=.18;function Tn(e){return`
|
|
200
|
-
.${e}-wrapper {
|
|
201
|
-
box-sizing: border-box;
|
|
202
|
-
max-width: 100%;
|
|
203
|
-
overflow: visible;
|
|
204
|
-
overflow-wrap: anywhere;
|
|
205
|
-
word-break: break-word;
|
|
206
|
-
}
|
|
207
|
-
.${e}-item {
|
|
208
|
-
display: inline;
|
|
209
|
-
white-space: normal;
|
|
210
|
-
max-width: 100%;
|
|
211
|
-
}
|
|
212
|
-
.${e}-item-title {
|
|
213
|
-
display: inline;
|
|
214
|
-
white-space: pre-wrap;
|
|
215
|
-
overflow-wrap: anywhere;
|
|
216
|
-
word-break: break-word;
|
|
217
|
-
}
|
|
218
|
-
.${e}-type-a.${e}-wrapper,
|
|
219
|
-
.${e}-type-a .${e}-item-title {
|
|
220
|
-
text-align: left;
|
|
221
|
-
}
|
|
222
|
-
.${e}-type-b.${e}-wrapper,
|
|
223
|
-
.${e}-type-b .${e}-item-title {
|
|
224
|
-
text-align: center;
|
|
225
|
-
}
|
|
226
|
-
.${e}-type-c.${e}-wrapper,
|
|
227
|
-
.${e}-type-c .${e}-item-title {
|
|
228
|
-
text-align: right;
|
|
229
|
-
}
|
|
230
|
-
.${e}-item-image {
|
|
231
|
-
display: inline-block;
|
|
232
|
-
vertical-align: baseline;
|
|
233
|
-
position: relative;
|
|
234
|
-
z-index: 1;
|
|
235
|
-
height: 0;
|
|
236
|
-
width: calc(1cap * var(--${e}-image-aspect));
|
|
237
|
-
margin: 0 var(--${e}-image-inline-gap);
|
|
238
|
-
}
|
|
239
|
-
.${e}-item-image-fit {
|
|
240
|
-
width: calc(1cap * var(--${e}-item-media-aspect, var(--${e}-image-aspect)));
|
|
241
|
-
}
|
|
242
|
-
.${e}-item-image img,
|
|
243
|
-
.${e}-item-image video {
|
|
244
|
-
position: absolute;
|
|
245
|
-
left: 0;
|
|
246
|
-
bottom: 0;
|
|
247
|
-
display: block;
|
|
248
|
-
height: 1cap;
|
|
249
|
-
width: 100%;
|
|
250
|
-
max-height: none;
|
|
251
|
-
object-position: bottom;
|
|
252
|
-
}
|
|
253
|
-
.${e}-item-image-hover-scale img,
|
|
254
|
-
.${e}-item-image-hover-scale video {
|
|
255
|
-
transition: transform 0.3s ease;
|
|
256
|
-
}
|
|
257
|
-
.${e}-item-image-hover-scale:hover {
|
|
258
|
-
z-index: 10;
|
|
259
|
-
}
|
|
260
|
-
.${e}-item-image-hover-scale:hover img,
|
|
261
|
-
.${e}-item-image-hover-scale:hover video {
|
|
262
|
-
transform: scale(var(--${e}-image-hover-scale, 1.2));
|
|
263
|
-
}
|
|
264
|
-
.${e}-item-image-hover-saturate img,
|
|
265
|
-
.${e}-item-image-hover-saturate video {
|
|
266
|
-
filter: grayscale(100%);
|
|
267
|
-
transition: filter 0.3s ease;
|
|
268
|
-
}
|
|
269
|
-
.${e}-item-image-hover-saturate:hover img,
|
|
270
|
-
.${e}-item-image-hover-saturate:hover video {
|
|
271
|
-
filter: grayscale(0%);
|
|
272
|
-
}
|
|
273
|
-
.${e}-item-gap-host {
|
|
274
|
-
display: inline-block;
|
|
275
|
-
vertical-align: top;
|
|
276
|
-
height: var(--${e}-line-height);
|
|
277
|
-
position: relative;
|
|
278
|
-
flex-shrink: 0;
|
|
279
|
-
}
|
|
280
|
-
.${e}-item-gap-control {
|
|
281
|
-
position: absolute;
|
|
282
|
-
top: 0;
|
|
283
|
-
z-index: 2;
|
|
284
|
-
pointer-events: auto;
|
|
285
|
-
}
|
|
286
|
-
${an(e)}
|
|
287
|
-
`}function Cn(e){const{imageDisplay:n}=e??{},r=(n==null?void 0:n.ratioValue)??"1:1",i=(n==null?void 0:n.reversed)??!1,[a,c]=r.split(":").map(Number),g=i?c:a,f=i?a:c;return f>0?g/f:1}function jn(e){const n=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!n||!r?null:n/r}function Hn(e,n,r){const i=(e==null?void 0:e.titleFontSize)??.07,a=(e==null?void 0:e.titleLineHeight)??i;return{[`--${n}-line-height`]:Je.scalingValue(a,r??!1),[`--${n}-image-inline-gap`]:Je.scalingValue(i*Rn,r??!1),[`--${n}-image-aspect`]:Cn(e)}}function An(e,n){var i,a;const r={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((a=e==null?void 0:e.titleFontSettings)==null?void 0:a.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn.textStylesToCss(r,n)}function En(e){var a;const n=((a=e==null?void 0:e.imageDisplay)==null?void 0:a.display)==="cover",r=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:n?"cover":"contain",pointerEvents:"auto",...r?{cursor:"pointer"}:null};return{objectFitMode:n?"cover":"contain",imageStyle:i}}function Fn(e,n,r,i,a,c){if(!(!e||!n))return g=>{var $;const f=(($=g.currentTarget.closest(`.${i}-item`))==null?void 0:$.querySelector(`[data-waterfall-index="${r}"]`))??(g.currentTarget instanceof HTMLImageElement||g.currentTarget instanceof HTMLVideoElement?g.currentTarget:null);c(r,f?Ft(f,a):void 0)}}function Nn({settings:e,content:n,isEditor:r,isPreviewMode:i,isEditMode:a,layoutId:c,portalId:g}){const{prefix:f}=en.useScopedStyles(),$=o.useMemo(()=>Tn(f),[f]),y=n??[],K=(e==null?void 0:e.type)??"a",et=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,ae=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,ge=Je.scalingValue(ae,r??!1),ze=`max(${ge}, ${kn}px)`,{objectFitMode:J,imageStyle:je}=En(e),He=An(e,r),V=o.useRef(null),[M,Q]=o.useState(!1),[le,Oe]=o.useState([]),[P,ee]=o.useState(0),[L,C]=o.useState(0),[A,me]=o.useState(null),[we,ce]=o.useState({title1:"",title2:"",title3:""}),W=(!r||i)&&!M,xe=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},te=xe.sizeType??"none",se=W&&te!=="none"?`${f}-item-image-hover-${te}`:void 0,ue=(xe.value??120)/100,fe=o.useCallback(h=>{!h||te!=="scale"||(h.style.transformOrigin=Et.getContainedMediaTransformOrigin(h))},[te]),ne=o.useCallback(h=>{if(h){if(J==="contain"){const v=jn(h);if(v){const b=h.closest(`.${f}-item-image`);b instanceof HTMLElement&&b.style.setProperty(`--${f}-item-media-aspect`,String(v))}}fe(h)}},[f,fe,J]),j={width:Je.scalingValue(et,r??!1),...He,...Hn(e,f,r),[`--${f}-image-hover-scale`]:String(ue)},ve=(()=>{const h={},v=V.current?getComputedStyle(V.current).getPropertyValue("--cntrl-article-width").trim():"";return v&&(h["--cntrl-article-width"]=v),h})(),H=((e==null?void 0:e.lightbox)??"on")==="on"&&(!r||i||a),E=o.useMemo(()=>pn(y),[y]),tt=o.useMemo(()=>xn(y),[y]),nt=(h,v)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||r&&!a&&!i)return;const b=E.findIndex(F=>F.gridIndex===h);if(b<0)return;const z=E[b];C(b),Oe(z.items),ee(0),ce(z.entry),me(v??null),Q(!0)},m=o.useCallback(()=>{Q(!1),me(null)},[]),ye=o.useCallback(()=>{const h=E[L];return!h||!V.current?A:hn(V.current,h.gridIndex,J)??A},[E,L,A,J]),B=o.useCallback(h=>{if(E.length>1){const v=E.length,b=(L+h+v)%v,z=E[b];C(b),Oe(z.items),ee(0),ce(z.entry);return}ee(v=>(v+h+le.length)%le.length)},[E,L,le.length]),be=E.length>1||le.length>1;return o.useEffect(()=>{if(!M||typeof document>"u")return;const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}},[M]),o.useEffect(()=>{!r||a||i||Q(!1)},[r,a,i]),o.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&Q(!1)},[e==null?void 0:e.lightbox]),s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:$}}),s.jsx(yn,{mediaList:tt}),s.jsx("div",{ref:V,className:`${f}-wrapper ${f}-type-${K}`,style:j,children:y.map((h,v)=>{var F,re;const b=!!((F=h.image)!=null&&F.assetId),z=Fn(!!H,b,v,f,J,nt);return s.jsxs("div",{className:`${f}-item`,children:[h.title?s.jsx("span",{className:`${f}-item-title`,onClick:z,style:z?{cursor:"pointer"}:void 0,children:h.title}):null,(re=h.image)!=null&&re.assetId?s.jsx("span",{className:[`${f}-item-image`,J==="contain"?`${f}-item-image-fit`:void 0,se].filter(Boolean).join(" "),children:h.image.type==="video"?s.jsx(tn.LazyVideo,{ref:ne,src:h.image.assetId,"data-waterfall-index":v,style:je,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:z,onLoadedMetadata:de=>ne(de.currentTarget)}):s.jsx("img",{ref:ne,src:h.image.assetId,alt:h.image.name??"","data-waterfall-index":v,style:je,onClick:z,onLoad:de=>ne(de.currentTarget)})}):null,v<y.length-1&&s.jsx("div",{className:`${f}-item-gap-host`,style:{width:ge},children:a&&!M&&s.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${f}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:ze,height:"100%"}})})]},v)})}),M&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const h=(g?document.getElementById(g):null)??document.body;return Pt.createPortal(s.jsx("div",{style:ve,"data-selection":"none",children:s.jsx(Ln,{prefix:f,items:le,index:P,entry:we,settings:e,isEditor:r,isEditMode:a,isPreviewMode:i,canNavigate:be,lightboxEntries:E,entryIdx:L,layoutId:c,sourceRect:A,resolveCloseSourceRect:ye,onClose:m,onPrev:()=>B(-1),onNext:()=>B(1)})}),h)})()]})}exports.Waterfall=Nn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("./ControlSlider-SiOt22l_.js"),n=require("./ImageRevealSlider-BBWtFjUF.js"),p=require("./Lightbox-CIss_nOG.js"),e=require("./PretextComponent-D5P0AjnL.js"),t={element:r.ControlSlider,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},i={element:n.ImageRevealSlider,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},o={element:p.LightboxGallery,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},l=[t,i,e.ClickGallerieComponent,o,e.FormComponent,e.OnelinerFormComponent,e.MarqueeComponent,e.MarqueeTextComponent,e.TestimonialGridComponent,e.TestimonialSingleComponent,e.GridComponent,e.HiveComponent,e.ListComponent,e.FAQComponent,e.LightboxStripComponent,e.LightboxJournalComponent,e.ScaleComponent,e.WaterfallComponent,e.SimpleButtonComponent,e.Slider20Component,e.MercuryComponent,e.HelixComponent,e.BurgerComponent,e.PretextComponent];exports.ControlImageRevealSliderComponent=i;exports.ControlSliderComponent=t;exports.LightboxComponent=o;exports.components=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const w=require("react"),I="100% 0px",V=new Map;function A(e){const t=V.get(e);if(t)return t;const r=new Map,o=new Map,c={observer:new IntersectionObserver(n=>{var a;for(const f of n)o.set(f.target,f.isIntersecting),(a=r.get(f.target))==null||a.forEach(d=>d(f.isIntersecting))},{rootMargin:e}),listeners:r,states:o};return V.set(e,c),c}function b(e,t,r){const{observer:o,listeners:i,states:c}=A(t),n=i.get(e)??new Set;n.size===0&&(i.set(e,n),o.observe(e)),n.add(r);const a=c.get(e);return a!==void 0&&r(a),()=>{n.delete(r),!(n.size>0)&&(i.delete(e),c.delete(e),o.unobserve(e))}}const g=["none","metadata","auto"];function E(e,t){g.indexOf(e.preload)<g.indexOf(t)&&(e.preload=t)}function R(e){const t=e.play();t&&t.catch(()=>{})}function l(e){e.paused||e.pause()}function N(e){return e.localName==="video"}function y(e,{autoPlay:t=!1,preload:r="auto",selector:o="video",shouldPlay:i}={}){w.useEffect(()=>{if(!e)return;const c=N(e),n=()=>c?[e]:Array.from(e.querySelectorAll(o));if(typeof IntersectionObserver>"u"){n().forEach(s=>{E(s,r),s.autoplay=t});return}let a=!1,f=!1;const d=()=>{n().forEach(s=>{a&&E(s,r),t&&(f&&(!i||i(s))?(s.muted=!0,s.paused&&R(s)):l(s))})},O=b(e,I,s=>{a=s,d()}),p=t?b(e,"0px",s=>{f=s,d()}):null,u=c?null:new MutationObserver(d);return u==null||u.observe(e,{childList:!0,subtree:!0,...i?{attributes:!0,attributeFilter:["class"]}:{}}),()=>{O(),p==null||p(),u==null||u.disconnect()}},[e,t,r,o,i])}exports.NEAR_VIEWPORT_MARGIN=I;exports.observeIntersection=b;exports.pauseVideo=l;exports.playVideo=R;exports.raisePreload=E;exports.useLazyVideos=y;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { useEffect as O } from "react";
|
|
2
|
-
const V = "100% 0px", b = /* @__PURE__ */ new Map();
|
|
3
|
-
function l(e) {
|
|
4
|
-
const s = b.get(e);
|
|
5
|
-
if (s) return s;
|
|
6
|
-
const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), c = { observer: new IntersectionObserver((n) => {
|
|
7
|
-
var a;
|
|
8
|
-
for (const f of n)
|
|
9
|
-
o.set(f.target, f.isIntersecting), (a = r.get(f.target)) == null || a.forEach((p) => p(f.isIntersecting));
|
|
10
|
-
}, { rootMargin: e }), listeners: r, states: o };
|
|
11
|
-
return b.set(e, c), c;
|
|
12
|
-
}
|
|
13
|
-
function g(e, s, r) {
|
|
14
|
-
const { observer: o, listeners: i, states: c } = l(s), n = i.get(e) ?? /* @__PURE__ */ new Set();
|
|
15
|
-
n.size === 0 && (i.set(e, n), o.observe(e)), n.add(r);
|
|
16
|
-
const a = c.get(e);
|
|
17
|
-
return a !== void 0 && r(a), () => {
|
|
18
|
-
n.delete(r), !(n.size > 0) && (i.delete(e), c.delete(e), o.unobserve(e));
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const E = ["none", "metadata", "auto"];
|
|
22
|
-
function w(e, s) {
|
|
23
|
-
E.indexOf(e.preload) < E.indexOf(s) && (e.preload = s);
|
|
24
|
-
}
|
|
25
|
-
function x(e) {
|
|
26
|
-
const s = e.play();
|
|
27
|
-
s && s.catch(() => {
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function N(e) {
|
|
31
|
-
e.paused || e.pause();
|
|
32
|
-
}
|
|
33
|
-
function R(e) {
|
|
34
|
-
return e.localName === "video";
|
|
35
|
-
}
|
|
36
|
-
function A(e, { autoPlay: s = !1, preload: r = "auto", selector: o = "video", shouldPlay: i } = {}) {
|
|
37
|
-
O(() => {
|
|
38
|
-
if (!e) return;
|
|
39
|
-
const c = R(e), n = () => c ? [e] : Array.from(e.querySelectorAll(o));
|
|
40
|
-
if (typeof IntersectionObserver > "u") {
|
|
41
|
-
n().forEach((t) => {
|
|
42
|
-
w(t, r), t.autoplay = s;
|
|
43
|
-
});
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
let a = !1, f = !1;
|
|
47
|
-
const p = () => {
|
|
48
|
-
n().forEach((t) => {
|
|
49
|
-
a && w(t, r), s && (f && (!i || i(t)) ? (t.muted = !0, t.paused && x(t)) : N(t));
|
|
50
|
-
});
|
|
51
|
-
}, I = g(e, V, (t) => {
|
|
52
|
-
a = t, p();
|
|
53
|
-
}), d = s ? g(e, "0px", (t) => {
|
|
54
|
-
f = t, p();
|
|
55
|
-
}) : null, u = c ? null : new MutationObserver(p);
|
|
56
|
-
return u == null || u.observe(e, {
|
|
57
|
-
childList: !0,
|
|
58
|
-
subtree: !0,
|
|
59
|
-
...i ? { attributes: !0, attributeFilter: ["class"] } : {}
|
|
60
|
-
}), () => {
|
|
61
|
-
I(), d == null || d(), u == null || u.disconnect();
|
|
62
|
-
};
|
|
63
|
-
}, [e, s, r, o, i]);
|
|
64
|
-
}
|
|
65
|
-
export {
|
|
66
|
-
V as N,
|
|
67
|
-
x as a,
|
|
68
|
-
g as o,
|
|
69
|
-
N as p,
|
|
70
|
-
w as r,
|
|
71
|
-
A as u
|
|
72
|
-
};
|