@cntrl-site/components 1.0.43-alpha.0 → 1.0.43-alpha.2

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/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),it=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Wi=require("react-dom");function Xl(e){return e.type==="object"&&e.version===1}const Yl="ControlSlider-module__wrapper___sHEkd",Jl="ControlSlider-module__hoverArrow___A-dOH",Zl="ControlSlider-module__sliderItem___QQSkR",Ql="ControlSlider-module__sliderImage___9hRl-",ec="ControlSlider-module__arrow___05ghY",tc="ControlSlider-module__arrowVertical___tBfVN",nc="ControlSlider-module__nextArrow___-30Yc",ic="ControlSlider-module__arrowInner___aEra3",oc="ControlSlider-module__arrowIcon___S4ztF",rc="ControlSlider-module__arrowImg___2dwJW",ac="ControlSlider-module__mirror___brd6U",sc="ControlSlider-module__pagination___bicLF",lc="ControlSlider-module__paginationInner___bT-P-",cc="ControlSlider-module__paginationVertical___zYqKw",dc="ControlSlider-module__paginationItem___nTRbk",uc="ControlSlider-module__dot___p1Qun",pc="ControlSlider-module__activeDot___LHFaj",mc="ControlSlider-module__paginationInsideBottom___R3FWn",gc="ControlSlider-module__paginationInsideTop___V-qb-",hc="ControlSlider-module__paginationOutsideBottom___14w8D",fc="ControlSlider-module__paginationOutsideTop___SCLqB",yc="ControlSlider-module__paginationInsideLeft___yOBRZ",vc="ControlSlider-module__paginationInsideRight___Rtt3o",xc="ControlSlider-module__paginationOutsideLeft___lahaw",bc="ControlSlider-module__paginationOutsideRight___EtuQa",wc="ControlSlider-module__imgWrapper___UjEgB",$c="ControlSlider-module__captionBlock___dJ6-j",Sc="ControlSlider-module__captionTextWrapper___HFlpf",Cc="ControlSlider-module__captionText___uGBVc",Tc="ControlSlider-module__active___WZK4G",Lc="ControlSlider-module__withPointerEvents___t-18M",Ic="ControlSlider-module__topLeftAlignment___zjnGM",Rc="ControlSlider-module__topCenterAlignment___gD1xW",Ec="ControlSlider-module__topRightAlignment___NMapS",Mc="ControlSlider-module__middleLeftAlignment___OnUrY",kc="ControlSlider-module__middleCenterAlignment___Tdkl0",Pc="ControlSlider-module__middleRightAlignment___wEbfX",Ac="ControlSlider-module__bottomLeftAlignment___cTP2-",Wc="ControlSlider-module__bottomCenterAlignment___c54fB",Fc="ControlSlider-module__bottomRightAlignment___kEwrz",_c="ControlSlider-module__clickOverlay___DZA28",Nc="ControlSlider-module__contain___pLyq7",Hc="ControlSlider-module__cover___KdDat",Be={wrapper:Yl,hoverArrow:Jl,sliderItem:Zl,sliderImage:Ql,arrow:ec,arrowVertical:tc,nextArrow:nc,arrowInner:ic,arrowIcon:oc,arrowImg:rc,mirror:ac,pagination:sc,paginationInner:lc,paginationVertical:cc,paginationItem:dc,dot:uc,activeDot:pc,paginationInsideBottom:mc,paginationInsideTop:gc,paginationOutsideBottom:hc,paginationOutsideTop:fc,paginationInsideLeft:yc,paginationInsideRight:vc,paginationOutsideLeft:xc,paginationOutsideRight:bc,imgWrapper:wc,captionBlock:$c,captionTextWrapper:Sc,captionText:Cc,active:Tc,withPointerEvents:Lc,topLeftAlignment:Ic,topCenterAlignment:Rc,topRightAlignment:Ec,middleLeftAlignment:Mc,middleCenterAlignment:kc,middleRightAlignment:Pc,bottomLeftAlignment:Ac,bottomCenterAlignment:Wc,bottomRightAlignment:Fc,clickOverlay:_c,contain:Nc,cover:Hc};function Oc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Bc(e,t,n){return t&&Oc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ma="(prefers-reduced-motion: reduce)",vi=1,jc=2,$i=3,Fi=4,so=5,Wo=6,zo=7,zc={CREATED:vi,MOUNTED:jc,IDLE:$i,MOVING:Fi,SCROLLING:so,DRAGGING:Wo,DESTROYED:zo};function An(e){e.length=0}function Gn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Mt(e){return e.bind.apply(e,[null].concat(Gn(arguments,1)))}var Os=setTimeout,Hr=function(){};function ka(e){return requestAnimationFrame(e)}function Yo(e,t){return typeof t===e}function Xi(e){return!Qr(e)&&Yo("object",e)}var Zr=Array.isArray,Bs=Mt(Yo,"function"),zn=Mt(Yo,"string"),lo=Mt(Yo,"undefined");function Qr(e){return e===null}function js(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function co(e){return Zr(e)?e:[e]}function hn(e,t){co(e).forEach(t)}function ea(e,t){return e.indexOf(t)>-1}function Fo(e,t){return e.push.apply(e,co(t)),e}function Rn(e,t,n){e&&hn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Sn(e,t){Rn(e,zn(t)?t.split(" "):t,!0)}function uo(e,t){hn(t,e.appendChild.bind(e))}function ta(e,t){hn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Yi(e,t){return js(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function zs(e,t){var n=e?Gn(e.children):[];return t?n.filter(function(i){return Yi(i,t)}):n}function po(e,t){return t?zs(e,t)[0]:e.firstElementChild}var Ji=Object.keys;function ai(e,t,n){return e&&(n?Ji(e).reverse():Ji(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Zi(e){return Gn(arguments,1).forEach(function(t){ai(t,function(n,i){e[i]=t[i]})}),e}function Hn(e){return Gn(arguments,1).forEach(function(t){ai(t,function(n,i){Zr(n)?e[i]=n.slice():Xi(n)?e[i]=Hn({},Xi(e[i])?e[i]:{},n):e[i]=n})}),e}function Pa(e,t){hn(t||Ji(e),function(n){delete e[n]})}function Cn(e,t){hn(e,function(n){hn(t,function(i){n&&n.removeAttribute(i)})})}function nt(e,t,n){Xi(t)?ai(t,function(i,o){nt(e,o,i)}):hn(e,function(i){Qr(n)||n===""?Cn(i,t):i.setAttribute(t,String(n))})}function xi(e,t,n){var i=document.createElement(e);return t&&(zn(t)?Sn(i,t):nt(i,t)),n&&uo(n,i),i}function yn(e,t,n){if(lo(n))return getComputedStyle(e)[t];Qr(n)||(e.style[t]=""+n)}function Qi(e,t){yn(e,"display",t)}function Ds(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function vn(e,t){return e.getAttribute(t)}function Aa(e,t){return e&&e.classList.contains(t)}function un(e){return e.getBoundingClientRect()}function si(e){hn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Vs(e){return po(new DOMParser().parseFromString(e,"text/html").body)}function In(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Gs(e,t){return e&&e.querySelector(t)}function na(e,t){return t?Gn(e.querySelectorAll(t)):[]}function En(e,t){Rn(e,t,!1)}function Or(e){return e.timeStamp}function Jn(e){return zn(e)?e:e?e+"px":""}var mo="splide",ia="data-"+mo;function Vi(e,t){if(!e)throw new Error("["+mo+"] "+(t||""))}var Dn=Math.min,Do=Math.max,Vo=Math.floor,eo=Math.ceil,rn=Math.abs;function qs(e,t,n){return rn(e-t)<n}function _o(e,t,n,i){var o=Dn(t,n),l=Do(t,n);return i?o<e&&e<l:o<=e&&e<=l}function hi(e,t,n){var i=Dn(t,n),o=Do(t,n);return Dn(Do(i,e),o)}function Br(e){return+(e>0)-+(e<0)}function jr(e,t){return hn(t,function(n){e=e.replace("%s",""+n)}),e}function oa(e){return e<10?"0"+e:""+e}var Wa={};function Dc(e){return""+e+oa(Wa[e]=(Wa[e]||0)+1)}function Ks(){var e=[];function t(s,d,c,u){o(s,d,function(m,v,w){var C="addEventListener"in m,h=C?m.removeEventListener.bind(m,v,c,u):m.removeListener.bind(m,c);C?m.addEventListener(v,c,u):m.addListener(c),e.push([m,v,w,c,h])})}function n(s,d,c){o(s,d,function(u,m,v){e=e.filter(function(w){return w[0]===u&&w[1]===m&&w[2]===v&&(!c||w[3]===c)?(w[4](),!1):!0})})}function i(s,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),s.dispatchEvent(u),u}function o(s,d,c){hn(s,function(u){u&&hn(d,function(m){m.split(" ").forEach(function(v){var w=v.split(".");c(u,w[0],w[1])})})})}function l(){e.forEach(function(s){s[4]()}),An(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var qn="mounted",zr="ready",Wn="move",_i="moved",ra="click",Us="active",Xs="inactive",Ys="visible",Js="hidden",Vt="refresh",nn="updated",Si="resize",Jo="resized",Zs="drag",Qs="dragging",el="dragged",Zo="scroll",di="scrolled",Vc="overflow",aa="destroy",tl="arrows:mounted",nl="arrows:updated",il="pagination:mounted",ol="pagination:updated",sa="navigation:mounted",la="autoplay:play",rl="autoplay:playing",ca="autoplay:pause",da="lazyload:loaded",al="sk",sl="sh",Go="ei";function Nt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ks();function i(l,s){n.bind(t,co(l).join(" "),function(d){s.apply(s,Zr(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Gn(arguments,1))}return e&&e.event.on(aa,n.destroy),Zi(n,{bus:t,on:i,off:Mt(n.unbind,t),emit:o})}function Qo(e,t,n,i){var o=Date.now,l,s=0,d,c=!0,u=0;function m(){if(!c){if(s=e?Dn((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++u>=i))return w();d=ka(m)}}function v(T){T||h(),l=o()-(T?s*e:0),c=!1,d=ka(m)}function w(){c=!0}function C(){l=o(),s=0,n&&n(s)}function h(){d&&cancelAnimationFrame(d),s=0,d=0,c=!0}function x(T){e=T}function $(){return c}return{start:v,rewind:C,pause:w,cancel:h,set:x,isPaused:$}}function Gc(e){var t=e;function n(o){t=o}function i(o){return ea(co(o),t)}return{set:n,is:i}}function qc(e,t){var n=Qo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Kc(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=Ks(),d=[];function c(){var h=n.mediaQuery==="min";Ji(o).sort(function(x,$){return h?+x-+$:+$-+x}).forEach(function(x){m(o[x],"("+(h?"min":"max")+"-width:"+x+"px)")}),m(l,Ma),v()}function u(h){h&&s.destroy()}function m(h,x){var $=matchMedia(x);s.bind($,"change",v),d.push([h,$])}function v(){var h=i.is(zo),x=n.direction,$=d.reduce(function(T,I){return Hn(T,I[1].matches?I[0]:{})},{});Pa(n),C($),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function w(h){matchMedia(Ma).matches&&(h?Hn(n,l):Pa(n,Ji(l)))}function C(h,x,$){Hn(n,h),x&&Hn(Object.getPrototypeOf(n),h),($||!i.is(vi))&&e.emit(nn,n)}return{setup:c,destroy:u,reduce:w,set:C}}var er="Arrow",tr=er+"Left",nr=er+"Right",ll=er+"Up",cl=er+"Down",Fa="rtl",ir="ttb",fr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ll,nr],ArrowRight:[cl,tr]};function Uc(e,t,n){function i(l,s,d){d=d||n.direction;var c=d===Fa&&!s?1:d===ir?0:-1;return fr[l]&&fr[l][c]||l.replace(/width|left|right/i,function(u,m){var v=fr[u.toLowerCase()][c]||u;return m>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(l){return l*(n.direction===Fa?1:-1)}return{resolve:i,orient:o}}var Mn="role",bi="tabindex",Xc="disabled",xn="aria-",go=xn+"controls",dl=xn+"current",_a=xn+"selected",mn=xn+"label",ua=xn+"labelledby",ul=xn+"hidden",pa=xn+"orientation",to=xn+"roledescription",Na=xn+"live",Ha=xn+"busy",Oa=xn+"atomic",ma=[Mn,bi,Xc,go,dl,mn,ua,ul,pa,to],Tn=mo+"__",Kn="is-",yr=mo,Ba=Tn+"track",Yc=Tn+"list",or=Tn+"slide",pl=or+"--clone",Jc=or+"__container",ga=Tn+"arrows",rr=Tn+"arrow",ml=rr+"--prev",gl=rr+"--next",ar=Tn+"pagination",hl=ar+"__page",Zc=Tn+"progress",Qc=Zc+"__bar",ed=Tn+"toggle",td=Tn+"spinner",nd=Tn+"sr",id=Kn+"initialized",li=Kn+"active",fl=Kn+"prev",yl=Kn+"next",Dr=Kn+"visible",Vr=Kn+"loading",vl=Kn+"focus-in",xl=Kn+"overflow",od=[li,Dr,fl,yl,Vr,vl,xl],rd={slide:or,clone:pl,arrows:ga,arrow:rr,prev:ml,next:gl,pagination:ar,page:hl,spinner:td};function ad(e,t){if(Bs(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Yi(n,t);)n=n.parentElement;return n}var sd=5,ja=200,bl="touchstart mousedown",vr="touchmove mousemove",xr="touchend touchcancel mouseup click";function ld(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=e.root,d=n.i18n,c={},u=[],m=[],v=[],w,C,h;function x(){k(),H(),I()}function $(){o(Vt,T),o(Vt,x),o(nn,I),l(document,bl+" keydown",function(P){h=P.type==="keydown"},{capture:!0}),l(s,"focusin",function(){Rn(s,vl,!!h)})}function T(P){var b=ma.concat("style");An(u),En(s,m),En(w,v),Cn([w,C],b),Cn(s,P?b:["style",to])}function I(){En(s,m),En(w,v),m=B(yr),v=B(Ba),Sn(s,m),Sn(w,v),nt(s,mn,n.label),nt(s,ua,n.labelledby)}function k(){w=M("."+Ba),C=po(w,"."+Yc),Vi(w&&C,"A track/list element is missing."),Fo(u,zs(C,"."+or+":not(."+pl+")")),ai({arrows:ga,pagination:ar,prev:ml,next:gl,bar:Qc,toggle:ed},function(P,b){c[b]=M("."+P)}),Zi(c,{root:s,track:w,list:C,slides:u})}function H(){var P=s.id||Dc(mo),b=n.role;s.id=P,w.id=w.id||P+"-track",C.id=C.id||P+"-list",!vn(s,Mn)&&s.tagName!=="SECTION"&&b&&nt(s,Mn,b),nt(s,to,d.carousel),nt(C,Mn,"presentation")}function M(P){var b=Gs(s,P);return b&&ad(b,"."+yr)===s?b:void 0}function B(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===yr&&li]}return Zi(c,{setup:x,mount:$,destroy:T})}var Ci="slide",Ni="loop",ho="fade";function cd(e,t,n,i){var o=Nt(e),l=o.on,s=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,v=m.isNavigation,w=m.updateOnMove,C=m.i18n,h=m.pagination,x=m.slideFocus,$=c.Direction.resolve,T=vn(i,"style"),I=vn(i,mn),k=n>-1,H=po(i,"."+Jc),M;function B(){k||(i.id=u.id+"-slide"+oa(t+1),nt(i,Mn,h?"tabpanel":"group"),nt(i,to,C.slide),nt(i,mn,I||jr(C.slideLabel,[t+1,e.length]))),P()}function P(){d(i,"click",Mt(s,ra,_)),d(i,"keydown",Mt(s,al,_)),l([_i,sl,di],R),l(sa,G),w&&l(Wn,f)}function b(){M=!0,o.destroy(),En(i,od),Cn(i,ma),nt(i,"style",T),nt(i,mn,I||"")}function G(){var L=e.splides.map(function(E){var D=E.splide.Components.Slides.getAt(t);return D?D.slide.id:""}).join(" ");nt(i,mn,jr(C.slideX,(k?n:t)+1)),nt(i,go,L),nt(i,Mn,x?"button":""),x&&Cn(i,to)}function f(){M||R()}function R(){if(!M){var L=e.index;A(),j(),Rn(i,fl,t===L-1),Rn(i,yl,t===L+1)}}function A(){var L=le();L!==Aa(i,li)&&(Rn(i,li,L),nt(i,dl,v&&L||""),s(L?Us:Xs,_))}function j(){var L=X(),E=!L&&(!le()||k);if(e.state.is([Fi,so])||nt(i,ul,E||""),nt(na(i,m.focusableNodes||""),bi,E?-1:""),x&&nt(i,bi,E?-1:0),L!==Aa(i,Dr)&&(Rn(i,Dr,L),s(L?Ys:Js,_)),!L&&document.activeElement===i){var D=c.Slides.getAt(e.index);D&&Ds(D.slide)}}function K(L,E,D){yn(D&&H||i,L,E)}function le(){var L=e.index;return L===t||m.cloneStatus&&L===n}function X(){if(e.is(ho))return le();var L=un(c.Elements.track),E=un(i),D=$("left",!0),U=$("right",!0);return Vo(L[D])<=eo(E[D])&&Vo(E[U])<=eo(L[U])}function z(L,E){var D=rn(L-t);return!k&&(m.rewind||e.is(Ni))&&(D=Dn(D,e.length-D)),D<=E}var _={index:t,slideIndex:n,slide:i,container:H,isClone:k,mount:B,destroy:b,update:R,style:K,isWithin:z};return _}function dd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function v(){w(),o(Vt,C),o(Vt,w)}function w(){c.forEach(function(R,A){x(R,A,-1)})}function C(){M(function(R){R.destroy()}),An(m)}function h(){M(function(R){R.update()})}function x(R,A,j){var K=cd(e,A,j,R);K.mount(),m.push(K),m.sort(function(le,X){return le.index-X.index})}function $(R){return R?B(function(A){return!A.isClone}):m}function T(R){var A=t.Controller,j=A.toIndex(R),K=A.hasFocus()?1:n.perPage;return B(function(le){return _o(le.index,j,j+K-1)})}function I(R){return B(R)[0]}function k(R,A){hn(R,function(j){if(zn(j)&&(j=Vs(j)),js(j)){var K=c[A];K?ta(j,K):uo(u,j),Sn(j,n.classes.slide),b(j,Mt(l,Si))}}),l(Vt)}function H(R){si(B(R).map(function(A){return A.slide})),l(Vt)}function M(R,A){$(A).forEach(R)}function B(R){return m.filter(Bs(R)?R:function(A){return zn(R)?Yi(A.slide,R):ea(co(R),A.index)})}function P(R,A,j){M(function(K){K.style(R,A,j)})}function b(R,A){var j=na(R,"img"),K=j.length;K?j.forEach(function(le){s(le,"load error",function(){--K||A()})}):A()}function G(R){return R?c.length:m.length}function f(){return m.length>n.perPage}return{mount:v,destroy:C,update:h,register:x,get:$,getIn:T,getAt:I,add:k,remove:H,forEach:M,filter:B,style:P,getLength:G,isEnough:f}}function ud(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,v=u.track,w=u.list,C=d.getAt,h=d.style,x,$,T;function I(){k(),l(window,"resize load",qc(Mt(s,Si))),o([nn,Vt],k),o(Si,H)}function k(){x=n.direction===ir,yn(m,"maxWidth",Jn(n.width)),yn(v,c("paddingLeft"),M(!1)),yn(v,c("paddingRight"),M(!0)),H(!0)}function H(_){var L=un(m);(_||$.width!==L.width||$.height!==L.height)&&(yn(v,"height",B()),h(c("marginRight"),Jn(n.gap)),h("width",b()),h("height",G(),!0),$=L,s(Jo),T!==(T=z())&&(Rn(m,xl,T),s(Vc,T)))}function M(_){var L=n.padding,E=c(_?"right":"left");return L&&Jn(L[E]||(Xi(L)?0:L))||"0px"}function B(){var _="";return x&&(_=P(),Vi(_,"height or heightRatio is missing."),_="calc("+_+" - "+M(!1)+" - "+M(!0)+")"),_}function P(){return Jn(n.height||un(w).width*n.heightRatio)}function b(){return n.autoWidth?null:Jn(n.fixedWidth)||(x?"":f())}function G(){return Jn(n.fixedHeight)||(x?n.autoHeight?null:f():P())}function f(){var _=Jn(n.gap);return"calc((100%"+(_&&" + "+_)+")/"+(n.perPage||1)+(_&&" - "+_)+")"}function R(){return un(w)[c("width")]}function A(_,L){var E=C(_||0);return E?un(E.slide)[c("width")]+(L?0:le()):0}function j(_,L){var E=C(_);if(E){var D=un(E.slide)[c("right")],U=un(w)[c("left")];return rn(D-U)+(L?0:le())}return 0}function K(_){return j(e.length-1)-j(0)+A(0,_)}function le(){var _=C(0);return _&&parseFloat(yn(_.slide,c("marginRight")))||0}function X(_){return parseFloat(yn(v,c("padding"+(_?"Right":"Left"))))||0}function z(){return e.is(ho)||K(!0)>R()}return{mount:I,resize:H,listSize:R,slideSize:A,sliderSize:K,totalSize:j,getPadding:X,isOverflow:z}}var pd=2;function md(e,t,n){var i=Nt(e),o=i.on,l=t.Elements,s=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Vt,v),o([nn,Si],C),(u=$())&&(h(u),t.Layout.resize(!0))}function v(){w(),m()}function w(){si(c),An(c),i.destroy()}function C(){var T=$();u!==T&&(u<T||!T)&&i.emit(Vt)}function h(T){var I=s.get().slice(),k=I.length;if(k){for(;I.length<T;)Fo(I,I);Fo(I.slice(-T),I.slice(0,T)).forEach(function(H,M){var B=M<T,P=x(H.slide,M);B?ta(P,I[0].slide):uo(l.list,P),Fo(c,P),s.register(P,M-T+(B?0:k),H.index)})}}function x(T,I){var k=T.cloneNode(!0);return Sn(k,n.classes.clone),k.id=e.root.id+"-clone"+oa(I+1),k}function $(){var T=n.clones;if(!e.is(Ni))T=0;else if(lo(T)){var I=n[d("fixedWidth")]&&t.Layout.slideSize(0),k=I&&eo(un(l.track)[d("width")]/I);T=k||n[d("autoWidth")]&&e.length||n.perPage*pd}return T}return{mount:m,destroy:w}}function gd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,v=d.listSize,w=d.sliderSize,C=t.Direction,h=C.resolve,x=C.orient,$=t.Elements,T=$.list,I=$.track,k;function H(){k=t.Transition,o([qn,Jo,nn,Vt],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function B(E,D,U,Q){E!==D&&_(E>U)&&(R(),b(f(K(),E>U),!0)),s(Fi),l(Wn,D,U,E),k.start(D,function(){s($i),l(_i,D,U,E),Q&&Q()})}function P(E){b(j(E,!0))}function b(E,D){if(!e.is(ho)){var U=D?E:G(E);yn(T,"transform","translate"+h("X")+"("+U+"px)"),E!==U&&l(sl)}}function G(E){if(e.is(Ni)){var D=A(E),U=D>t.Controller.getEnd(),Q=D<0;(Q||U)&&(E=f(E,U))}return E}function f(E,D){var U=E-z(D),Q=w();return E-=x(Q*(eo(rn(U)/Q)||1))*(D?1:-1),E}function R(){b(K(),!0),k.cancel()}function A(E){for(var D=t.Slides.get(),U=0,Q=1/0,O=0;O<D.length;O++){var ge=D[O].index,g=rn(j(ge,!0)-E);if(g<=Q)Q=g,U=ge;else break}return U}function j(E,D){var U=x(m(E-1)-X(E));return D?le(U):U}function K(){var E=h("left");return un(T)[E]-un(I)[E]+x(u(!1))}function le(E){return n.trimSpace&&e.is(Ci)&&(E=hi(E,0,x(w(!0)-v()))),E}function X(E){var D=n.focus;return D==="center"?(v()-c(E,!0))/2:+D*c(E)||0}function z(E){return j(E?t.Controller.getEnd():0,!!n.trimSpace)}function _(E){var D=x(f(K(),E));return E?D>=0:D<=T[h("scrollWidth")]-un(I)[h("width")]}function L(E,D){D=lo(D)?K():D;var U=E!==!0&&x(D)<x(z(!1)),Q=E!==!1&&x(D)>x(z(!0));return U||Q}return{mount:H,move:B,jump:P,translate:b,shift:f,cancel:R,toIndex:A,toPosition:j,getPosition:K,getLimit:z,exceededLimit:L,reposition:M}}function hd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=t.Move,d=s.getPosition,c=s.getLimit,u=s.toPosition,m=t.Slides,v=m.isEnough,w=m.getLength,C=n.omitEnd,h=e.is(Ni),x=e.is(Ci),$=Mt(K,!1),T=Mt(K,!0),I=n.start||0,k,H=I,M,B,P;function b(){G(),o([nn,Vt,Go],G),o(Jo,f)}function G(){M=w(!0),B=n.perMove,P=n.perPage,k=_();var g=hi(I,0,C?k:M-1);g!==I&&(I=g,s.reposition())}function f(){k!==_()&&l(Go)}function R(g,he,se){if(!ge()){var ve=j(g),Ee=z(ve);Ee>-1&&(he||Ee!==I)&&(U(Ee),s.move(ve,Ee,H,se))}}function A(g,he,se,ve){t.Scroll.scroll(g,he,se,function(){var Ee=z(s.toIndex(d()));U(C?Dn(Ee,k):Ee),ve&&ve()})}function j(g){var he=I;if(zn(g)){var se=g.match(/([+\-<>])(\d+)?/)||[],ve=se[1],Ee=se[2];ve==="+"||ve==="-"?he=le(I+ +(""+ve+(+Ee||1)),I):ve===">"?he=Ee?L(+Ee):$(!0):ve==="<"&&(he=T(!0))}else he=h?g:hi(g,0,k);return he}function K(g,he){var se=B||(O()?1:P),ve=le(I+se*(g?-1:1),I,!(B||O()));return ve===-1&&x&&!qs(d(),c(!g),1)?g?0:k:he?ve:z(ve)}function le(g,he,se){if(v()||O()){var ve=X(g);ve!==g&&(he=g,g=ve,se=!1),g<0||g>k?!B&&(_o(0,g,he,!0)||_o(k,he,g,!0))?g=L(E(g)):h?g=se?g<0?-(M%P||P):M:g:n.rewind?g=g<0?k:0:g=-1:se&&g!==he&&(g=L(E(he)+(g<he?-1:1)))}else g=-1;return g}function X(g){if(x&&n.trimSpace==="move"&&g!==I)for(var he=d();he===u(g,!0)&&_o(g,0,e.length-1,!n.rewind);)g<I?--g:++g;return g}function z(g){return h?(g+M)%M||0:g}function _(){for(var g=M-(O()||h&&B?1:P);C&&g-- >0;)if(u(M-1,!0)!==u(g,!0)){g++;break}return hi(g,0,M-1)}function L(g){return hi(O()?g:P*g,0,k)}function E(g){return O()?Dn(g,k):Vo((g>=k?M-1:g)/P)}function D(g){var he=s.toIndex(g);return x?hi(he,0,k):he}function U(g){g!==I&&(H=I,I=g)}function Q(g){return g?H:I}function O(){return!lo(n.focus)||n.isNavigation}function ge(){return e.state.is([Fi,so])&&!!n.waitForTransition}return{mount:b,go:R,scroll:A,getNext:$,getPrev:T,getAdjacent:K,getEnd:_,setIndex:U,getIndex:Q,toIndex:L,toPage:E,toDest:D,hasFocus:O,isBusy:ge}}var fd="http://www.w3.org/2000/svg",yd="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",wo=40;function vd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,v=u.arrows,w=u.track,C=v,h=u.prev,x=u.next,$,T,I={};function k(){M(),o(nn,H)}function H(){B(),k()}function M(){var A=n.arrows;A&&!(h&&x)&&G(),h&&x&&(Zi(I,{prev:h,next:x}),Qi(C,A?"":"none"),Sn(C,T=ga+"--"+n.direction),A&&(P(),R(),nt([h,x],go,w.id),s(tl,h,x)))}function B(){i.destroy(),En(C,T),$?(si(v?[h,x]:C),h=x=null):Cn([h,x],ma)}function P(){o([qn,_i,Vt,di,Go],R),l(x,"click",Mt(b,">")),l(h,"click",Mt(b,"<"))}function b(A){m.go(A,!0)}function G(){C=v||xi("div",d.arrows),h=f(!0),x=f(!1),$=!0,uo(C,[h,x]),!v&&ta(C,w)}function f(A){var j='<button class="'+d.arrow+" "+(A?d.prev:d.next)+'" type="button"><svg xmlns="'+fd+'" viewBox="0 0 '+wo+" "+wo+'" width="'+wo+'" height="'+wo+'" focusable="false"><path d="'+(n.arrowPath||yd)+'" />';return Vs(j)}function R(){if(h&&x){var A=e.index,j=m.getPrev(),K=m.getNext(),le=j>-1&&A<j?c.last:c.prev,X=K>-1&&A>K?c.first:c.next;h.disabled=j<0,x.disabled=K<0,nt(h,mn,le),nt(x,mn,X),s(nl,h,x,j,K)}}return{arrows:I,mount:k,destroy:B,update:R}}var xd=ia+"-interval";function bd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=Qo(n.interval,e.go.bind(e,">"),P),c=d.isPaused,u=t.Elements,m=t.Elements,v=m.root,w=m.toggle,C=n.autoplay,h,x,$=C==="pause";function T(){C&&(I(),w&&nt(w,go,u.track.id),$||k(),B())}function I(){n.pauseOnHover&&l(v,"mouseenter mouseleave",function(G){h=G.type==="mouseenter",M()}),n.pauseOnFocus&&l(v,"focusin focusout",function(G){x=G.type==="focusin",M()}),w&&l(w,"click",function(){$?k():H(!0)}),o([Wn,Zo,Vt],d.rewind),o(Wn,b)}function k(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),x=h=$=!1,B(),s(la))}function H(G){G===void 0&&(G=!0),$=!!G,B(),c()||(d.pause(),s(ca))}function M(){$||(h||x?H(!1):k())}function B(){w&&(Rn(w,li,!$),nt(w,mn,n.i18n[$?"play":"pause"]))}function P(G){var f=u.bar;f&&yn(f,"width",G*100+"%"),s(rl,G)}function b(G){var f=t.Slides.getAt(G);d.set(f&&+vn(f.slide,xd)||n.interval)}return{mount:T,destroy:d.cancel,play:k,pause:H,isPaused:c}}function wd(e,t,n){var i=Nt(e),o=i.on;function l(){n.cover&&(o(da,Mt(d,!0)),o([qn,nn,Vt],Mt(s,!0)))}function s(c){t.Slides.forEach(function(u){var m=po(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),Qi(u,c?"none":"")}return{mount:l,destroy:Mt(s,!1)}}var $d=10,Sd=600,Cd=.6,Td=1.5,Ld=800;function Id(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,v=d.translate,w=e.is(Ci),C,h,x=1;function $(){o(Wn,H),o([nn,Vt],M)}function T(P,b,G,f,R){var A=c();if(H(),G&&(!w||!m())){var j=t.Layout.sliderSize(),K=Br(P)*j*Vo(rn(P)/j)||0;P=d.toPosition(t.Controller.toDest(P%j))+K}var le=qs(A,P,1);x=1,b=le?0:b||Do(rn(P-A)/Td,Ld),h=f,C=Qo(b,I,Mt(k,A,P,R),1),s(so),l(Zo),C.start()}function I(){s($i),h&&h(),l(di)}function k(P,b,G,f){var R=c(),A=P+(b-P)*B(f),j=(A-R)*x;v(R+j),w&&!G&&m()&&(x*=Cd,rn(j)<$d&&T(u(m(!0)),Sd,!1,h,!0))}function H(){C&&C.cancel()}function M(){C&&!C.isPaused()&&(H(),I())}function B(P){var b=n.easingFunc;return b?b(P):1-Math.pow(1-P,4)}return{mount:$,destroy:H,scroll:T,cancel:M}}var fi={passive:!1,capture:!0};function Rd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,v=t.Controller,w=t.Elements.track,C=t.Media.reduce,h=t.Direction,x=h.resolve,$=h.orient,T=u.getPosition,I=u.exceededLimit,k,H,M,B,P,b=!1,G,f,R;function A(){s(w,vr,Hr,fi),s(w,xr,Hr,fi),s(w,bl,K,fi),s(w,"click",z,{capture:!0}),s(w,"dragstart",In),o([qn,nn],j)}function j(){var Y=n.drag;xe(!Y),B=Y==="free"}function K(Y){if(G=!1,!f){var be=Ee(Y);ve(Y.target)&&(be||!Y.button)&&(v.isBusy()?In(Y,!0):(R=be?w:window,P=c.is([Fi,so]),M=null,s(R,vr,le,fi),s(R,xr,X,fi),u.cancel(),m.cancel(),_(Y)))}}function le(Y){if(c.is(Wo)||(c.set(Wo),l(Zs)),Y.cancelable)if(P){u.translate(k+se(O(Y)));var be=ge(Y)>ja,me=b!==(b=I());(be||me)&&_(Y),G=!0,l(Qs),In(Y)}else D(Y)&&(P=E(Y),In(Y))}function X(Y){c.is(Wo)&&(c.set($i),l(el)),P&&(L(Y),In(Y)),d(R,vr,le),d(R,xr,X),P=!1}function z(Y){!f&&G&&In(Y,!0)}function _(Y){M=H,H=Y,k=T()}function L(Y){var be=U(Y),me=Q(be),ue=n.rewind&&n.rewindByDrag;C(!1),B?v.scroll(me,0,n.snap):e.is(ho)?v.go($(Br(be))<0?ue?"<":"-":ue?">":"+"):e.is(Ci)&&b&&ue?v.go(I(!0)?">":"<"):v.go(v.toDest(me),!0),C(!0)}function E(Y){var be=n.dragMinThreshold,me=Xi(be),ue=me&&be.mouse||0,re=(me?be.touch:+be)||10;return rn(O(Y))>(Ee(Y)?re:ue)}function D(Y){return rn(O(Y))>rn(O(Y,!0))}function U(Y){if(e.is(Ni)||!b){var be=ge(Y);if(be&&be<ja)return O(Y)/be}return 0}function Q(Y){return T()+Br(Y)*Dn(rn(Y)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(Y,be){return he(Y,be)-he(g(Y),be)}function ge(Y){return Or(Y)-Or(g(Y))}function g(Y){return H===Y&&M||H}function he(Y,be){return(Ee(Y)?Y.changedTouches[0]:Y)["page"+x(be?"Y":"X")]}function se(Y){return Y/(b&&e.is(Ci)?sd:1)}function ve(Y){var be=n.noDrag;return!Yi(Y,"."+hl+", ."+rr)&&(!be||!Yi(Y,be))}function Ee(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function oe(){return P}function xe(Y){f=Y}return{mount:A,disable:xe,isDragging:oe}}var Ed={Spacebar:" ",Right:nr,Left:tr,Up:ll,Down:cl};function ha(e){return e=zn(e)?e:e.key,Ed[e]||e}var za="keydown";function Md(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function v(){w(),o(nn,C),o(nn,w),o(Wn,x)}function w(){var T=n.keyboard;T&&(u=T==="global"?window:d,l(u,za,$))}function C(){s(u,za)}function h(T){m=T}function x(){var T=m;m=!0,Os(function(){m=T})}function $(T){if(!m){var I=ha(T);I===c(tr)?e.go("<"):I===c(nr)&&e.go(">")}}return{mount:v,destroy:C,disable:h}}var Gi=ia+"-lazy",No=Gi+"-srcset",kd="["+Gi+"], ["+No+"]";function Pd(e,t,n){var i=Nt(e),o=i.on,l=i.off,s=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[_i,di],m=[];function v(){n.lazyLoad&&(w(),o(Vt,w))}function w(){An(m),C(),c?T():(l(u),o(u,h),h())}function C(){t.Slides.forEach(function(I){na(I.slide,kd).forEach(function(k){var H=vn(k,Gi),M=vn(k,No);if(H!==k.src||M!==k.srcset){var B=n.classes.spinner,P=k.parentElement,b=po(P,"."+B)||xi("span",B,P);m.push([k,I,b]),k.src||Qi(k,"none")}})})}function h(){m=m.filter(function(I){var k=n.perPage*((n.preloadPages||1)+1)-1;return I[1].isWithin(e.index,k)?x(I):!0}),m.length||l(u)}function x(I){var k=I[0];Sn(I[1].slide,Vr),s(k,"load error",Mt($,I)),nt(k,"src",vn(k,Gi)),nt(k,"srcset",vn(k,No)),Cn(k,Gi),Cn(k,No)}function $(I,k){var H=I[0],M=I[1];En(M.slide,Vr),k.type!=="error"&&(si(I[2]),Qi(H,""),d(da,H,M),d(Si)),c&&T()}function T(){m.length&&x(m.shift())}return{mount:v,destroy:Mt(An,m),check:h}}function Ad(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,v=u.getIndex,w=u.go,C=t.Direction.resolve,h=c.pagination,x=[],$,T;function I(){k(),o([nn,Vt,Go],I);var f=n.pagination;h&&Qi(h,f?"":"none"),f&&(o([Wn,Zo,di],G),H(),G(),l(il,{list:$,items:x},b(e.index)))}function k(){$&&(si(h?Gn($.children):$),En($,T),An(x),$=null),i.destroy()}function H(){var f=e.length,R=n.classes,A=n.i18n,j=n.perPage,K=m()?u.getEnd()+1:eo(f/j);$=h||xi("ul",R.pagination,c.track.parentElement),Sn($,T=ar+"--"+P()),nt($,Mn,"tablist"),nt($,mn,A.select),nt($,pa,P()===ir?"vertical":"");for(var le=0;le<K;le++){var X=xi("li",null,$),z=xi("button",{class:R.page,type:"button"},X),_=d.getIn(le).map(function(E){return E.slide.id}),L=!m()&&j>1?A.pageX:A.slideX;s(z,"click",Mt(M,le)),n.paginationKeyboard&&s(z,"keydown",Mt(B,le)),nt(X,Mn,"presentation"),nt(z,Mn,"tab"),nt(z,go,_.join(" ")),nt(z,mn,jr(L,le+1)),nt(z,bi,-1),x.push({li:X,button:z,page:le})}}function M(f){w(">"+f,!0)}function B(f,R){var A=x.length,j=ha(R),K=P(),le=-1;j===C(nr,!1,K)?le=++f%A:j===C(tr,!1,K)?le=(--f+A)%A:j==="Home"?le=0:j==="End"&&(le=A-1);var X=x[le];X&&(Ds(X.button),w(">"+le),In(R,!0))}function P(){return n.paginationDirection||n.direction}function b(f){return x[u.toPage(f)]}function G(){var f=b(v(!0)),R=b(v());if(f){var A=f.button;En(A,li),Cn(A,_a),nt(A,bi,-1)}if(R){var j=R.button;Sn(j,li),nt(j,_a,!0),nt(j,bi,"")}l(ol,{list:$,items:x},f,R)}return{items:x,mount:I,destroy:k,getAt:b,update:G}}var Wd=[" ","Enter"];function Fd(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&m()}function d(){l.forEach(function(h){h.destroy()}),An(l)}function c(){d(),s()}function u(h,x){var $=Nt(h);$.on(Wn,function(T,I,k){x.go(x.is(Ni)?k:T)}),l.push($)}function m(){var h=Nt(e),x=h.on;x(ra,w),x(al,C),x([qn,nn],v),l.push(h),h.emit(sa,e.splides)}function v(){nt(t.Elements.list,pa,n.direction===ir?"vertical":"")}function w(h){e.go(h.index)}function C(h,x){ea(Wd,ha(x))&&(w(h),In(x))}return{setup:Mt(t.Media.set,{slideFocus:lo(o)?i:o},!0),mount:s,destroy:d,remount:c}}function _d(e,t,n){var i=Nt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",d,fi)}function d(u){if(u.cancelable){var m=u.deltaY,v=m<0,w=Or(u),C=n.wheelMinThreshold||0,h=n.wheelSleep||0;rn(m)>C&&w-l>h&&(e.go(v?"<":">"),l=w),c(v)&&In(u)}}function c(u){return!n.releaseWheel||e.state.is(Fi)||t.Controller.getAdjacent(u)!==-1}return{mount:s}}var Nd=90;function Hd(e,t,n){var i=Nt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,d=xi("span",nd),c=Qo(Nd,Mt(m,!1));function u(){s&&(w(!t.Autoplay.isPaused()),nt(l,Oa,!0),d.textContent="…",o(la,Mt(w,!0)),o(ca,Mt(w,!1)),o([_i,di],Mt(m,!0)))}function m(C){nt(l,Ha,C),C?(uo(l,d),c.start()):(si(d),c.cancel())}function v(){Cn(l,[Na,Oa,Ha]),si(d)}function w(C){s&&nt(l,Na,C?"off":"polite")}return{mount:u,disable:w,destroy:v}}var Od=Object.freeze({__proto__:null,Media:Kc,Direction:Uc,Elements:ld,Slides:dd,Layout:ud,Clones:md,Move:gd,Controller:hd,Arrows:vd,Autoplay:bd,Cover:wd,Scroll:Id,Drag:Rd,Keyboard:Md,LazyLoad:Pd,Pagination:Ad,Sync:Fd,Wheel:_d,Live:Hd}),Bd={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},jd={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:rd,i18n:Bd,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function zd(e,t,n){var i=t.Slides;function o(){Nt(e).on([qn,Vt],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Os(c)}return{mount:o,start:s,cancel:Hr}}function Dd(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,d=Mt(yn,s,"transition"),c;function u(){Nt(e).bind(s,"transitionend",function(C){C.target===s&&c&&(v(),c())})}function m(C,h){var x=i.toPosition(C,!0),$=i.getPosition(),T=w(C);rn(x-$)>=1&&T>=1?n.useScroll?l.scroll(x,T,!1,h):(d("transform "+T+"ms "+n.easing),i.translate(x,!0),c=h):(i.jump(C),h())}function v(){d(""),l.cancel()}function w(C){var h=n.rewindSpeed;if(e.is(Ci)&&h){var x=o.getIndex(!0),$=o.getEnd();if(x===0&&C>=$||x>=$&&C===0)return h}return n.speed}return{mount:u,start:m,cancel:v}}var Vd=(function(){function e(n,i){this.event=Nt(),this.Components={},this.state=Gc(vi),this.splides=[],this._o={},this._E={};var o=zn(n)?Gs(document,n):n;Vi(o,o+" is invalid."),this.root=o,i=Hn({label:vn(o,mn)||"",labelledby:vn(o,ua)||""},jd,e.defaults,i||{});try{Hn(i,JSON.parse(vn(o,ia)))}catch{Vi(!1,"Invalid JSON")}this._o=Object.create(Hn({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,d=this.Components;Vi(s.is([vi,zo]),"Already mounted!"),s.set(vi),this._C=d,this._T=o||this._T||(this.is(ho)?zd:Dd),this._E=i||this._E;var c=Zi({},Od,this._E,{Transition:this._T});return ai(c,function(u,m){var v=u(l,d,l._o);d[m]=v,v.setup&&v.setup()}),ai(d,function(u){u.mount&&u.mount()}),this.emit(qn),Sn(this.root,id),s.set($i),this.emit(zr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is($i)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Gn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Vt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(vi)?Nt(this).on(zr,this.destroy.bind(this,i)):(ai(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(aa),o.destroy(),i&&An(this.splides),l.set(zo)),this},Bc(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),fa=Vd;fa.defaults={};fa.STATES=zc;var Da=[[qn,"onMounted"],[zr,"onReady"],[Wn,"onMove"],[_i,"onMoved"],[ra,"onClick"],[Us,"onActive"],[Xs,"onInactive"],[Ys,"onVisible"],[Js,"onHidden"],[Vt,"onRefresh"],[nn,"onUpdated"],[Si,"onResize"],[Jo,"onResized"],[Zs,"onDrag"],[Qs,"onDragging"],[el,"onDragged"],[Zo,"onScroll"],[di,"onScrolled"],[aa,"onDestroy"],[tl,"onArrowsMounted"],[nl,"onArrowsUpdated"],[il,"onPaginationMounted"],[ol,"onPaginationUpdated"],[sa,"onNavigationMounted"],[la,"onAutoplayPlay"],[rl,"onAutoplayPlaying"],[ca,"onAutoplayPause"],[da,"onLazyLoadLoaded"]];function ya(...e){return e.filter(Boolean).join(" ")}function qo(e){return e!==null&&typeof e=="object"}function Gr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Gr(n,t[i]));if(qo(e)&&qo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Gr(e[o],t[o]))}return e===t}function Gd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function qd(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function qr(e,t){const n=e;return qd(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():qo(i)?n[o]=qr(qo(n[o])?n[o]:{},i):n[o]=i}),n}var Kd=({children:e,className:t,...n})=>a.createElement("div",{className:ya("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),va=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new fa(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=qr({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Gr(this.options,e)&&(this.splide.options=e,this.options=qr({},e));const t=this.getSlides();Gd(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){Da.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:ya("splide",e),ref:this.splideRef,...this.omit(o,["options",...Da.map(l=>l[1])])},n?a.createElement(Kd,null,i):i)}},xa=({children:e,className:t,...n})=>a.createElement("li",{className:ya("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),it=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Wi=require("react-dom");function Xl(e){return e.type==="object"&&e.version===1}const Yl="ControlSlider-module__wrapper___sHEkd",Jl="ControlSlider-module__hoverArrow___A-dOH",Zl="ControlSlider-module__sliderItem___QQSkR",Ql="ControlSlider-module__sliderImage___9hRl-",ec="ControlSlider-module__arrow___05ghY",tc="ControlSlider-module__arrowVertical___tBfVN",nc="ControlSlider-module__nextArrow___-30Yc",ic="ControlSlider-module__arrowInner___aEra3",oc="ControlSlider-module__arrowIcon___S4ztF",rc="ControlSlider-module__arrowImg___2dwJW",ac="ControlSlider-module__mirror___brd6U",sc="ControlSlider-module__pagination___bicLF",lc="ControlSlider-module__paginationInner___bT-P-",cc="ControlSlider-module__paginationVertical___zYqKw",dc="ControlSlider-module__paginationItem___nTRbk",uc="ControlSlider-module__dot___p1Qun",pc="ControlSlider-module__activeDot___LHFaj",mc="ControlSlider-module__paginationInsideBottom___R3FWn",gc="ControlSlider-module__paginationInsideTop___V-qb-",hc="ControlSlider-module__paginationOutsideBottom___14w8D",fc="ControlSlider-module__paginationOutsideTop___SCLqB",yc="ControlSlider-module__paginationInsideLeft___yOBRZ",vc="ControlSlider-module__paginationInsideRight___Rtt3o",xc="ControlSlider-module__paginationOutsideLeft___lahaw",bc="ControlSlider-module__paginationOutsideRight___EtuQa",wc="ControlSlider-module__imgWrapper___UjEgB",$c="ControlSlider-module__captionBlock___dJ6-j",Sc="ControlSlider-module__captionTextWrapper___HFlpf",Cc="ControlSlider-module__captionText___uGBVc",Tc="ControlSlider-module__active___WZK4G",Lc="ControlSlider-module__withPointerEvents___t-18M",Ic="ControlSlider-module__topLeftAlignment___zjnGM",Rc="ControlSlider-module__topCenterAlignment___gD1xW",Ec="ControlSlider-module__topRightAlignment___NMapS",Mc="ControlSlider-module__middleLeftAlignment___OnUrY",kc="ControlSlider-module__middleCenterAlignment___Tdkl0",Pc="ControlSlider-module__middleRightAlignment___wEbfX",Ac="ControlSlider-module__bottomLeftAlignment___cTP2-",Wc="ControlSlider-module__bottomCenterAlignment___c54fB",Fc="ControlSlider-module__bottomRightAlignment___kEwrz",_c="ControlSlider-module__clickOverlay___DZA28",Nc="ControlSlider-module__contain___pLyq7",Hc="ControlSlider-module__cover___KdDat",Be={wrapper:Yl,hoverArrow:Jl,sliderItem:Zl,sliderImage:Ql,arrow:ec,arrowVertical:tc,nextArrow:nc,arrowInner:ic,arrowIcon:oc,arrowImg:rc,mirror:ac,pagination:sc,paginationInner:lc,paginationVertical:cc,paginationItem:dc,dot:uc,activeDot:pc,paginationInsideBottom:mc,paginationInsideTop:gc,paginationOutsideBottom:hc,paginationOutsideTop:fc,paginationInsideLeft:yc,paginationInsideRight:vc,paginationOutsideLeft:xc,paginationOutsideRight:bc,imgWrapper:wc,captionBlock:$c,captionTextWrapper:Sc,captionText:Cc,active:Tc,withPointerEvents:Lc,topLeftAlignment:Ic,topCenterAlignment:Rc,topRightAlignment:Ec,middleLeftAlignment:Mc,middleCenterAlignment:kc,middleRightAlignment:Pc,bottomLeftAlignment:Ac,bottomCenterAlignment:Wc,bottomRightAlignment:Fc,clickOverlay:_c,contain:Nc,cover:Hc};function Oc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Bc(e,t,n){return t&&Oc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ma="(prefers-reduced-motion: reduce)",vi=1,jc=2,$i=3,Fi=4,so=5,Wo=6,zo=7,zc={CREATED:vi,MOUNTED:jc,IDLE:$i,MOVING:Fi,SCROLLING:so,DRAGGING:Wo,DESTROYED:zo};function An(e){e.length=0}function Gn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Mt(e){return e.bind.apply(e,[null].concat(Gn(arguments,1)))}var Os=setTimeout,Hr=function(){};function ka(e){return requestAnimationFrame(e)}function Yo(e,t){return typeof t===e}function Xi(e){return!Qr(e)&&Yo("object",e)}var Zr=Array.isArray,Bs=Mt(Yo,"function"),zn=Mt(Yo,"string"),lo=Mt(Yo,"undefined");function Qr(e){return e===null}function js(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function co(e){return Zr(e)?e:[e]}function hn(e,t){co(e).forEach(t)}function ea(e,t){return e.indexOf(t)>-1}function Fo(e,t){return e.push.apply(e,co(t)),e}function Rn(e,t,n){e&&hn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Sn(e,t){Rn(e,zn(t)?t.split(" "):t,!0)}function uo(e,t){hn(t,e.appendChild.bind(e))}function ta(e,t){hn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Yi(e,t){return js(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function zs(e,t){var n=e?Gn(e.children):[];return t?n.filter(function(i){return Yi(i,t)}):n}function po(e,t){return t?zs(e,t)[0]:e.firstElementChild}var Ji=Object.keys;function ai(e,t,n){return e&&(n?Ji(e).reverse():Ji(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Zi(e){return Gn(arguments,1).forEach(function(t){ai(t,function(n,i){e[i]=t[i]})}),e}function Hn(e){return Gn(arguments,1).forEach(function(t){ai(t,function(n,i){Zr(n)?e[i]=n.slice():Xi(n)?e[i]=Hn({},Xi(e[i])?e[i]:{},n):e[i]=n})}),e}function Pa(e,t){hn(t||Ji(e),function(n){delete e[n]})}function Cn(e,t){hn(e,function(n){hn(t,function(i){n&&n.removeAttribute(i)})})}function nt(e,t,n){Xi(t)?ai(t,function(i,o){nt(e,o,i)}):hn(e,function(i){Qr(n)||n===""?Cn(i,t):i.setAttribute(t,String(n))})}function xi(e,t,n){var i=document.createElement(e);return t&&(zn(t)?Sn(i,t):nt(i,t)),n&&uo(n,i),i}function yn(e,t,n){if(lo(n))return getComputedStyle(e)[t];Qr(n)||(e.style[t]=""+n)}function Qi(e,t){yn(e,"display",t)}function Ds(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function vn(e,t){return e.getAttribute(t)}function Aa(e,t){return e&&e.classList.contains(t)}function un(e){return e.getBoundingClientRect()}function si(e){hn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Vs(e){return po(new DOMParser().parseFromString(e,"text/html").body)}function In(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Gs(e,t){return e&&e.querySelector(t)}function na(e,t){return t?Gn(e.querySelectorAll(t)):[]}function En(e,t){Rn(e,t,!1)}function Or(e){return e.timeStamp}function Jn(e){return zn(e)?e:e?e+"px":""}var mo="splide",ia="data-"+mo;function Vi(e,t){if(!e)throw new Error("["+mo+"] "+(t||""))}var Dn=Math.min,Do=Math.max,Vo=Math.floor,eo=Math.ceil,rn=Math.abs;function qs(e,t,n){return rn(e-t)<n}function _o(e,t,n,i){var o=Dn(t,n),l=Do(t,n);return i?o<e&&e<l:o<=e&&e<=l}function hi(e,t,n){var i=Dn(t,n),o=Do(t,n);return Dn(Do(i,e),o)}function Br(e){return+(e>0)-+(e<0)}function jr(e,t){return hn(t,function(n){e=e.replace("%s",""+n)}),e}function oa(e){return e<10?"0"+e:""+e}var Wa={};function Dc(e){return""+e+oa(Wa[e]=(Wa[e]||0)+1)}function Ks(){var e=[];function t(s,d,c,u){o(s,d,function(m,v,w){var C="addEventListener"in m,h=C?m.removeEventListener.bind(m,v,c,u):m.removeListener.bind(m,c);C?m.addEventListener(v,c,u):m.addListener(c),e.push([m,v,w,c,h])})}function n(s,d,c){o(s,d,function(u,m,v){e=e.filter(function(w){return w[0]===u&&w[1]===m&&w[2]===v&&(!c||w[3]===c)?(w[4](),!1):!0})})}function i(s,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),s.dispatchEvent(u),u}function o(s,d,c){hn(s,function(u){u&&hn(d,function(m){m.split(" ").forEach(function(v){var w=v.split(".");c(u,w[0],w[1])})})})}function l(){e.forEach(function(s){s[4]()}),An(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var qn="mounted",zr="ready",Wn="move",_i="moved",ra="click",Us="active",Xs="inactive",Ys="visible",Js="hidden",Vt="refresh",nn="updated",Si="resize",Jo="resized",Zs="drag",Qs="dragging",el="dragged",Zo="scroll",di="scrolled",Vc="overflow",aa="destroy",tl="arrows:mounted",nl="arrows:updated",il="pagination:mounted",ol="pagination:updated",sa="navigation:mounted",la="autoplay:play",rl="autoplay:playing",ca="autoplay:pause",da="lazyload:loaded",al="sk",sl="sh",Go="ei";function Nt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ks();function i(l,s){n.bind(t,co(l).join(" "),function(d){s.apply(s,Zr(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Gn(arguments,1))}return e&&e.event.on(aa,n.destroy),Zi(n,{bus:t,on:i,off:Mt(n.unbind,t),emit:o})}function Qo(e,t,n,i){var o=Date.now,l,s=0,d,c=!0,u=0;function m(){if(!c){if(s=e?Dn((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++u>=i))return w();d=ka(m)}}function v(T){T||h(),l=o()-(T?s*e:0),c=!1,d=ka(m)}function w(){c=!0}function C(){l=o(),s=0,n&&n(s)}function h(){d&&cancelAnimationFrame(d),s=0,d=0,c=!0}function x(T){e=T}function $(){return c}return{start:v,rewind:C,pause:w,cancel:h,set:x,isPaused:$}}function Gc(e){var t=e;function n(o){t=o}function i(o){return ea(co(o),t)}return{set:n,is:i}}function qc(e,t){var n=Qo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Kc(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=Ks(),d=[];function c(){var h=n.mediaQuery==="min";Ji(o).sort(function(x,$){return h?+x-+$:+$-+x}).forEach(function(x){m(o[x],"("+(h?"min":"max")+"-width:"+x+"px)")}),m(l,Ma),v()}function u(h){h&&s.destroy()}function m(h,x){var $=matchMedia(x);s.bind($,"change",v),d.push([h,$])}function v(){var h=i.is(zo),x=n.direction,$=d.reduce(function(T,I){return Hn(T,I[1].matches?I[0]:{})},{});Pa(n),C($),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function w(h){matchMedia(Ma).matches&&(h?Hn(n,l):Pa(n,Ji(l)))}function C(h,x,$){Hn(n,h),x&&Hn(Object.getPrototypeOf(n),h),($||!i.is(vi))&&e.emit(nn,n)}return{setup:c,destroy:u,reduce:w,set:C}}var er="Arrow",tr=er+"Left",nr=er+"Right",ll=er+"Up",cl=er+"Down",Fa="rtl",ir="ttb",fr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ll,nr],ArrowRight:[cl,tr]};function Uc(e,t,n){function i(l,s,d){d=d||n.direction;var c=d===Fa&&!s?1:d===ir?0:-1;return fr[l]&&fr[l][c]||l.replace(/width|left|right/i,function(u,m){var v=fr[u.toLowerCase()][c]||u;return m>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(l){return l*(n.direction===Fa?1:-1)}return{resolve:i,orient:o}}var Mn="role",bi="tabindex",Xc="disabled",xn="aria-",go=xn+"controls",dl=xn+"current",_a=xn+"selected",mn=xn+"label",ua=xn+"labelledby",ul=xn+"hidden",pa=xn+"orientation",to=xn+"roledescription",Na=xn+"live",Ha=xn+"busy",Oa=xn+"atomic",ma=[Mn,bi,Xc,go,dl,mn,ua,ul,pa,to],Tn=mo+"__",Kn="is-",yr=mo,Ba=Tn+"track",Yc=Tn+"list",or=Tn+"slide",pl=or+"--clone",Jc=or+"__container",ga=Tn+"arrows",rr=Tn+"arrow",ml=rr+"--prev",gl=rr+"--next",ar=Tn+"pagination",hl=ar+"__page",Zc=Tn+"progress",Qc=Zc+"__bar",ed=Tn+"toggle",td=Tn+"spinner",nd=Tn+"sr",id=Kn+"initialized",li=Kn+"active",fl=Kn+"prev",yl=Kn+"next",Dr=Kn+"visible",Vr=Kn+"loading",vl=Kn+"focus-in",xl=Kn+"overflow",od=[li,Dr,fl,yl,Vr,vl,xl],rd={slide:or,clone:pl,arrows:ga,arrow:rr,prev:ml,next:gl,pagination:ar,page:hl,spinner:td};function ad(e,t){if(Bs(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Yi(n,t);)n=n.parentElement;return n}var sd=5,ja=200,bl="touchstart mousedown",vr="touchmove mousemove",xr="touchend touchcancel mouseup click";function ld(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=e.root,d=n.i18n,c={},u=[],m=[],v=[],w,C,h;function x(){k(),N(),I()}function $(){o(Vt,T),o(Vt,x),o(nn,I),l(document,bl+" keydown",function(P){h=P.type==="keydown"},{capture:!0}),l(s,"focusin",function(){Rn(s,vl,!!h)})}function T(P){var b=ma.concat("style");An(u),En(s,m),En(w,v),Cn([w,C],b),Cn(s,P?b:["style",to])}function I(){En(s,m),En(w,v),m=B(yr),v=B(Ba),Sn(s,m),Sn(w,v),nt(s,mn,n.label),nt(s,ua,n.labelledby)}function k(){w=M("."+Ba),C=po(w,"."+Yc),Vi(w&&C,"A track/list element is missing."),Fo(u,zs(C,"."+or+":not(."+pl+")")),ai({arrows:ga,pagination:ar,prev:ml,next:gl,bar:Qc,toggle:ed},function(P,b){c[b]=M("."+P)}),Zi(c,{root:s,track:w,list:C,slides:u})}function N(){var P=s.id||Dc(mo),b=n.role;s.id=P,w.id=w.id||P+"-track",C.id=C.id||P+"-list",!vn(s,Mn)&&s.tagName!=="SECTION"&&b&&nt(s,Mn,b),nt(s,to,d.carousel),nt(C,Mn,"presentation")}function M(P){var b=Gs(s,P);return b&&ad(b,"."+yr)===s?b:void 0}function B(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===yr&&li]}return Zi(c,{setup:x,mount:$,destroy:T})}var Ci="slide",Ni="loop",ho="fade";function cd(e,t,n,i){var o=Nt(e),l=o.on,s=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,v=m.isNavigation,w=m.updateOnMove,C=m.i18n,h=m.pagination,x=m.slideFocus,$=c.Direction.resolve,T=vn(i,"style"),I=vn(i,mn),k=n>-1,N=po(i,"."+Jc),M;function B(){k||(i.id=u.id+"-slide"+oa(t+1),nt(i,Mn,h?"tabpanel":"group"),nt(i,to,C.slide),nt(i,mn,I||jr(C.slideLabel,[t+1,e.length]))),P()}function P(){d(i,"click",Mt(s,ra,H)),d(i,"keydown",Mt(s,al,H)),l([_i,sl,di],R),l(sa,X),w&&l(Wn,f)}function b(){M=!0,o.destroy(),En(i,od),Cn(i,ma),nt(i,"style",T),nt(i,mn,I||"")}function X(){var L=e.splides.map(function(E){var D=E.splide.Components.Slides.getAt(t);return D?D.slide.id:""}).join(" ");nt(i,mn,jr(C.slideX,(k?n:t)+1)),nt(i,go,L),nt(i,Mn,x?"button":""),x&&Cn(i,to)}function f(){M||R()}function R(){if(!M){var L=e.index;A(),j(),Rn(i,fl,t===L-1),Rn(i,yl,t===L+1)}}function A(){var L=le();L!==Aa(i,li)&&(Rn(i,li,L),nt(i,dl,v&&L||""),s(L?Us:Xs,H))}function j(){var L=Y(),E=!L&&(!le()||k);if(e.state.is([Fi,so])||nt(i,ul,E||""),nt(na(i,m.focusableNodes||""),bi,E?-1:""),x&&nt(i,bi,E?-1:0),L!==Aa(i,Dr)&&(Rn(i,Dr,L),s(L?Ys:Js,H)),!L&&document.activeElement===i){var D=c.Slides.getAt(e.index);D&&Ds(D.slide)}}function q(L,E,D){yn(D&&N||i,L,E)}function le(){var L=e.index;return L===t||m.cloneStatus&&L===n}function Y(){if(e.is(ho))return le();var L=un(c.Elements.track),E=un(i),D=$("left",!0),K=$("right",!0);return Vo(L[D])<=eo(E[D])&&Vo(E[K])<=eo(L[K])}function z(L,E){var D=rn(L-t);return!k&&(m.rewind||e.is(Ni))&&(D=Dn(D,e.length-D)),D<=E}var H={index:t,slideIndex:n,slide:i,container:N,isClone:k,mount:B,destroy:b,update:R,style:q,isWithin:z};return H}function dd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function v(){w(),o(Vt,C),o(Vt,w)}function w(){c.forEach(function(R,A){x(R,A,-1)})}function C(){M(function(R){R.destroy()}),An(m)}function h(){M(function(R){R.update()})}function x(R,A,j){var q=cd(e,A,j,R);q.mount(),m.push(q),m.sort(function(le,Y){return le.index-Y.index})}function $(R){return R?B(function(A){return!A.isClone}):m}function T(R){var A=t.Controller,j=A.toIndex(R),q=A.hasFocus()?1:n.perPage;return B(function(le){return _o(le.index,j,j+q-1)})}function I(R){return B(R)[0]}function k(R,A){hn(R,function(j){if(zn(j)&&(j=Vs(j)),js(j)){var q=c[A];q?ta(j,q):uo(u,j),Sn(j,n.classes.slide),b(j,Mt(l,Si))}}),l(Vt)}function N(R){si(B(R).map(function(A){return A.slide})),l(Vt)}function M(R,A){$(A).forEach(R)}function B(R){return m.filter(Bs(R)?R:function(A){return zn(R)?Yi(A.slide,R):ea(co(R),A.index)})}function P(R,A,j){M(function(q){q.style(R,A,j)})}function b(R,A){var j=na(R,"img"),q=j.length;q?j.forEach(function(le){s(le,"load error",function(){--q||A()})}):A()}function X(R){return R?c.length:m.length}function f(){return m.length>n.perPage}return{mount:v,destroy:C,update:h,register:x,get:$,getIn:T,getAt:I,add:k,remove:N,forEach:M,filter:B,style:P,getLength:X,isEnough:f}}function ud(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,v=u.track,w=u.list,C=d.getAt,h=d.style,x,$,T;function I(){k(),l(window,"resize load",qc(Mt(s,Si))),o([nn,Vt],k),o(Si,N)}function k(){x=n.direction===ir,yn(m,"maxWidth",Jn(n.width)),yn(v,c("paddingLeft"),M(!1)),yn(v,c("paddingRight"),M(!0)),N(!0)}function N(H){var L=un(m);(H||$.width!==L.width||$.height!==L.height)&&(yn(v,"height",B()),h(c("marginRight"),Jn(n.gap)),h("width",b()),h("height",X(),!0),$=L,s(Jo),T!==(T=z())&&(Rn(m,xl,T),s(Vc,T)))}function M(H){var L=n.padding,E=c(H?"right":"left");return L&&Jn(L[E]||(Xi(L)?0:L))||"0px"}function B(){var H="";return x&&(H=P(),Vi(H,"height or heightRatio is missing."),H="calc("+H+" - "+M(!1)+" - "+M(!0)+")"),H}function P(){return Jn(n.height||un(w).width*n.heightRatio)}function b(){return n.autoWidth?null:Jn(n.fixedWidth)||(x?"":f())}function X(){return Jn(n.fixedHeight)||(x?n.autoHeight?null:f():P())}function f(){var H=Jn(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function R(){return un(w)[c("width")]}function A(H,L){var E=C(H||0);return E?un(E.slide)[c("width")]+(L?0:le()):0}function j(H,L){var E=C(H);if(E){var D=un(E.slide)[c("right")],K=un(w)[c("left")];return rn(D-K)+(L?0:le())}return 0}function q(H){return j(e.length-1)-j(0)+A(0,H)}function le(){var H=C(0);return H&&parseFloat(yn(H.slide,c("marginRight")))||0}function Y(H){return parseFloat(yn(v,c("padding"+(H?"Right":"Left"))))||0}function z(){return e.is(ho)||q(!0)>R()}return{mount:I,resize:N,listSize:R,slideSize:A,sliderSize:q,totalSize:j,getPadding:Y,isOverflow:z}}var pd=2;function md(e,t,n){var i=Nt(e),o=i.on,l=t.Elements,s=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Vt,v),o([nn,Si],C),(u=$())&&(h(u),t.Layout.resize(!0))}function v(){w(),m()}function w(){si(c),An(c),i.destroy()}function C(){var T=$();u!==T&&(u<T||!T)&&i.emit(Vt)}function h(T){var I=s.get().slice(),k=I.length;if(k){for(;I.length<T;)Fo(I,I);Fo(I.slice(-T),I.slice(0,T)).forEach(function(N,M){var B=M<T,P=x(N.slide,M);B?ta(P,I[0].slide):uo(l.list,P),Fo(c,P),s.register(P,M-T+(B?0:k),N.index)})}}function x(T,I){var k=T.cloneNode(!0);return Sn(k,n.classes.clone),k.id=e.root.id+"-clone"+oa(I+1),k}function $(){var T=n.clones;if(!e.is(Ni))T=0;else if(lo(T)){var I=n[d("fixedWidth")]&&t.Layout.slideSize(0),k=I&&eo(un(l.track)[d("width")]/I);T=k||n[d("autoWidth")]&&e.length||n.perPage*pd}return T}return{mount:m,destroy:w}}function gd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,v=d.listSize,w=d.sliderSize,C=t.Direction,h=C.resolve,x=C.orient,$=t.Elements,T=$.list,I=$.track,k;function N(){k=t.Transition,o([qn,Jo,nn,Vt],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function B(E,D,K,Q){E!==D&&H(E>K)&&(R(),b(f(q(),E>K),!0)),s(Fi),l(Wn,D,K,E),k.start(D,function(){s($i),l(_i,D,K,E),Q&&Q()})}function P(E){b(j(E,!0))}function b(E,D){if(!e.is(ho)){var K=D?E:X(E);yn(T,"transform","translate"+h("X")+"("+K+"px)"),E!==K&&l(sl)}}function X(E){if(e.is(Ni)){var D=A(E),K=D>t.Controller.getEnd(),Q=D<0;(Q||K)&&(E=f(E,K))}return E}function f(E,D){var K=E-z(D),Q=w();return E-=x(Q*(eo(rn(K)/Q)||1))*(D?1:-1),E}function R(){b(q(),!0),k.cancel()}function A(E){for(var D=t.Slides.get(),K=0,Q=1/0,O=0;O<D.length;O++){var he=D[O].index,g=rn(j(he,!0)-E);if(g<=Q)Q=g,K=he;else break}return K}function j(E,D){var K=x(m(E-1)-Y(E));return D?le(K):K}function q(){var E=h("left");return un(T)[E]-un(I)[E]+x(u(!1))}function le(E){return n.trimSpace&&e.is(Ci)&&(E=hi(E,0,x(w(!0)-v()))),E}function Y(E){var D=n.focus;return D==="center"?(v()-c(E,!0))/2:+D*c(E)||0}function z(E){return j(E?t.Controller.getEnd():0,!!n.trimSpace)}function H(E){var D=x(f(q(),E));return E?D>=0:D<=T[h("scrollWidth")]-un(I)[h("width")]}function L(E,D){D=lo(D)?q():D;var K=E!==!0&&x(D)<x(z(!1)),Q=E!==!1&&x(D)>x(z(!0));return K||Q}return{mount:N,move:B,jump:P,translate:b,shift:f,cancel:R,toIndex:A,toPosition:j,getPosition:q,getLimit:z,exceededLimit:L,reposition:M}}function hd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=t.Move,d=s.getPosition,c=s.getLimit,u=s.toPosition,m=t.Slides,v=m.isEnough,w=m.getLength,C=n.omitEnd,h=e.is(Ni),x=e.is(Ci),$=Mt(q,!1),T=Mt(q,!0),I=n.start||0,k,N=I,M,B,P;function b(){X(),o([nn,Vt,Go],X),o(Jo,f)}function X(){M=w(!0),B=n.perMove,P=n.perPage,k=H();var g=hi(I,0,C?k:M-1);g!==I&&(I=g,s.reposition())}function f(){k!==H()&&l(Go)}function R(g,me,ae){if(!he()){var we=j(g),ke=z(we);ke>-1&&(me||ke!==I)&&(K(ke),s.move(we,ke,N,ae))}}function A(g,me,ae,we){t.Scroll.scroll(g,me,ae,function(){var ke=z(s.toIndex(d()));K(C?Dn(ke,k):ke),we&&we()})}function j(g){var me=I;if(zn(g)){var ae=g.match(/([+\-<>])(\d+)?/)||[],we=ae[1],ke=ae[2];we==="+"||we==="-"?me=le(I+ +(""+we+(+ke||1)),I):we===">"?me=ke?L(+ke):$(!0):we==="<"&&(me=T(!0))}else me=h?g:hi(g,0,k);return me}function q(g,me){var ae=B||(O()?1:P),we=le(I+ae*(g?-1:1),I,!(B||O()));return we===-1&&x&&!qs(d(),c(!g),1)?g?0:k:me?we:z(we)}function le(g,me,ae){if(v()||O()){var we=Y(g);we!==g&&(me=g,g=we,ae=!1),g<0||g>k?!B&&(_o(0,g,me,!0)||_o(k,me,g,!0))?g=L(E(g)):h?g=ae?g<0?-(M%P||P):M:g:n.rewind?g=g<0?k:0:g=-1:ae&&g!==me&&(g=L(E(me)+(g<me?-1:1)))}else g=-1;return g}function Y(g){if(x&&n.trimSpace==="move"&&g!==I)for(var me=d();me===u(g,!0)&&_o(g,0,e.length-1,!n.rewind);)g<I?--g:++g;return g}function z(g){return h?(g+M)%M||0:g}function H(){for(var g=M-(O()||h&&B?1:P);C&&g-- >0;)if(u(M-1,!0)!==u(g,!0)){g++;break}return hi(g,0,M-1)}function L(g){return hi(O()?g:P*g,0,k)}function E(g){return O()?Dn(g,k):Vo((g>=k?M-1:g)/P)}function D(g){var me=s.toIndex(g);return x?hi(me,0,k):me}function K(g){g!==I&&(N=I,I=g)}function Q(g){return g?N:I}function O(){return!lo(n.focus)||n.isNavigation}function he(){return e.state.is([Fi,so])&&!!n.waitForTransition}return{mount:b,go:R,scroll:A,getNext:$,getPrev:T,getAdjacent:q,getEnd:H,setIndex:K,getIndex:Q,toIndex:L,toPage:E,toDest:D,hasFocus:O,isBusy:he}}var fd="http://www.w3.org/2000/svg",yd="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",wo=40;function vd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,v=u.arrows,w=u.track,C=v,h=u.prev,x=u.next,$,T,I={};function k(){M(),o(nn,N)}function N(){B(),k()}function M(){var A=n.arrows;A&&!(h&&x)&&X(),h&&x&&(Zi(I,{prev:h,next:x}),Qi(C,A?"":"none"),Sn(C,T=ga+"--"+n.direction),A&&(P(),R(),nt([h,x],go,w.id),s(tl,h,x)))}function B(){i.destroy(),En(C,T),$?(si(v?[h,x]:C),h=x=null):Cn([h,x],ma)}function P(){o([qn,_i,Vt,di,Go],R),l(x,"click",Mt(b,">")),l(h,"click",Mt(b,"<"))}function b(A){m.go(A,!0)}function X(){C=v||xi("div",d.arrows),h=f(!0),x=f(!1),$=!0,uo(C,[h,x]),!v&&ta(C,w)}function f(A){var j='<button class="'+d.arrow+" "+(A?d.prev:d.next)+'" type="button"><svg xmlns="'+fd+'" viewBox="0 0 '+wo+" "+wo+'" width="'+wo+'" height="'+wo+'" focusable="false"><path d="'+(n.arrowPath||yd)+'" />';return Vs(j)}function R(){if(h&&x){var A=e.index,j=m.getPrev(),q=m.getNext(),le=j>-1&&A<j?c.last:c.prev,Y=q>-1&&A>q?c.first:c.next;h.disabled=j<0,x.disabled=q<0,nt(h,mn,le),nt(x,mn,Y),s(nl,h,x,j,q)}}return{arrows:I,mount:k,destroy:B,update:R}}var xd=ia+"-interval";function bd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=Qo(n.interval,e.go.bind(e,">"),P),c=d.isPaused,u=t.Elements,m=t.Elements,v=m.root,w=m.toggle,C=n.autoplay,h,x,$=C==="pause";function T(){C&&(I(),w&&nt(w,go,u.track.id),$||k(),B())}function I(){n.pauseOnHover&&l(v,"mouseenter mouseleave",function(X){h=X.type==="mouseenter",M()}),n.pauseOnFocus&&l(v,"focusin focusout",function(X){x=X.type==="focusin",M()}),w&&l(w,"click",function(){$?k():N(!0)}),o([Wn,Zo,Vt],d.rewind),o(Wn,b)}function k(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),x=h=$=!1,B(),s(la))}function N(X){X===void 0&&(X=!0),$=!!X,B(),c()||(d.pause(),s(ca))}function M(){$||(h||x?N(!1):k())}function B(){w&&(Rn(w,li,!$),nt(w,mn,n.i18n[$?"play":"pause"]))}function P(X){var f=u.bar;f&&yn(f,"width",X*100+"%"),s(rl,X)}function b(X){var f=t.Slides.getAt(X);d.set(f&&+vn(f.slide,xd)||n.interval)}return{mount:T,destroy:d.cancel,play:k,pause:N,isPaused:c}}function wd(e,t,n){var i=Nt(e),o=i.on;function l(){n.cover&&(o(da,Mt(d,!0)),o([qn,nn,Vt],Mt(s,!0)))}function s(c){t.Slides.forEach(function(u){var m=po(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),Qi(u,c?"none":"")}return{mount:l,destroy:Mt(s,!1)}}var $d=10,Sd=600,Cd=.6,Td=1.5,Ld=800;function Id(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,v=d.translate,w=e.is(Ci),C,h,x=1;function $(){o(Wn,N),o([nn,Vt],M)}function T(P,b,X,f,R){var A=c();if(N(),X&&(!w||!m())){var j=t.Layout.sliderSize(),q=Br(P)*j*Vo(rn(P)/j)||0;P=d.toPosition(t.Controller.toDest(P%j))+q}var le=qs(A,P,1);x=1,b=le?0:b||Do(rn(P-A)/Td,Ld),h=f,C=Qo(b,I,Mt(k,A,P,R),1),s(so),l(Zo),C.start()}function I(){s($i),h&&h(),l(di)}function k(P,b,X,f){var R=c(),A=P+(b-P)*B(f),j=(A-R)*x;v(R+j),w&&!X&&m()&&(x*=Cd,rn(j)<$d&&T(u(m(!0)),Sd,!1,h,!0))}function N(){C&&C.cancel()}function M(){C&&!C.isPaused()&&(N(),I())}function B(P){var b=n.easingFunc;return b?b(P):1-Math.pow(1-P,4)}return{mount:$,destroy:N,scroll:T,cancel:M}}var fi={passive:!1,capture:!0};function Rd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,v=t.Controller,w=t.Elements.track,C=t.Media.reduce,h=t.Direction,x=h.resolve,$=h.orient,T=u.getPosition,I=u.exceededLimit,k,N,M,B,P,b=!1,X,f,R;function A(){s(w,vr,Hr,fi),s(w,xr,Hr,fi),s(w,bl,q,fi),s(w,"click",z,{capture:!0}),s(w,"dragstart",In),o([qn,nn],j)}function j(){var U=n.drag;ye(!U),B=U==="free"}function q(U){if(X=!1,!f){var be=ke(U);we(U.target)&&(be||!U.button)&&(v.isBusy()?In(U,!0):(R=be?w:window,P=c.is([Fi,so]),M=null,s(R,vr,le,fi),s(R,xr,Y,fi),u.cancel(),m.cancel(),H(U)))}}function le(U){if(c.is(Wo)||(c.set(Wo),l(Zs)),U.cancelable)if(P){u.translate(k+ae(O(U)));var be=he(U)>ja,ge=b!==(b=I());(be||ge)&&H(U),X=!0,l(Qs),In(U)}else D(U)&&(P=E(U),In(U))}function Y(U){c.is(Wo)&&(c.set($i),l(el)),P&&(L(U),In(U)),d(R,vr,le),d(R,xr,Y),P=!1}function z(U){!f&&X&&In(U,!0)}function H(U){M=N,N=U,k=T()}function L(U){var be=K(U),ge=Q(be),pe=n.rewind&&n.rewindByDrag;C(!1),B?v.scroll(ge,0,n.snap):e.is(ho)?v.go($(Br(be))<0?pe?"<":"-":pe?">":"+"):e.is(Ci)&&b&&pe?v.go(I(!0)?">":"<"):v.go(v.toDest(ge),!0),C(!0)}function E(U){var be=n.dragMinThreshold,ge=Xi(be),pe=ge&&be.mouse||0,oe=(ge?be.touch:+be)||10;return rn(O(U))>(ke(U)?oe:pe)}function D(U){return rn(O(U))>rn(O(U,!0))}function K(U){if(e.is(Ni)||!b){var be=he(U);if(be&&be<ja)return O(U)/be}return 0}function Q(U){return T()+Br(U)*Dn(rn(U)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(U,be){return me(U,be)-me(g(U),be)}function he(U){return Or(U)-Or(g(U))}function g(U){return N===U&&M||N}function me(U,be){return(ke(U)?U.changedTouches[0]:U)["page"+x(be?"Y":"X")]}function ae(U){return U/(b&&e.is(Ci)?sd:1)}function we(U){var be=n.noDrag;return!Yi(U,"."+hl+", ."+rr)&&(!be||!Yi(U,be))}function ke(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function ne(){return P}function ye(U){f=U}return{mount:A,disable:ye,isDragging:ne}}var Ed={Spacebar:" ",Right:nr,Left:tr,Up:ll,Down:cl};function ha(e){return e=zn(e)?e:e.key,Ed[e]||e}var za="keydown";function Md(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function v(){w(),o(nn,C),o(nn,w),o(Wn,x)}function w(){var T=n.keyboard;T&&(u=T==="global"?window:d,l(u,za,$))}function C(){s(u,za)}function h(T){m=T}function x(){var T=m;m=!0,Os(function(){m=T})}function $(T){if(!m){var I=ha(T);I===c(tr)?e.go("<"):I===c(nr)&&e.go(">")}}return{mount:v,destroy:C,disable:h}}var Gi=ia+"-lazy",No=Gi+"-srcset",kd="["+Gi+"], ["+No+"]";function Pd(e,t,n){var i=Nt(e),o=i.on,l=i.off,s=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[_i,di],m=[];function v(){n.lazyLoad&&(w(),o(Vt,w))}function w(){An(m),C(),c?T():(l(u),o(u,h),h())}function C(){t.Slides.forEach(function(I){na(I.slide,kd).forEach(function(k){var N=vn(k,Gi),M=vn(k,No);if(N!==k.src||M!==k.srcset){var B=n.classes.spinner,P=k.parentElement,b=po(P,"."+B)||xi("span",B,P);m.push([k,I,b]),k.src||Qi(k,"none")}})})}function h(){m=m.filter(function(I){var k=n.perPage*((n.preloadPages||1)+1)-1;return I[1].isWithin(e.index,k)?x(I):!0}),m.length||l(u)}function x(I){var k=I[0];Sn(I[1].slide,Vr),s(k,"load error",Mt($,I)),nt(k,"src",vn(k,Gi)),nt(k,"srcset",vn(k,No)),Cn(k,Gi),Cn(k,No)}function $(I,k){var N=I[0],M=I[1];En(M.slide,Vr),k.type!=="error"&&(si(I[2]),Qi(N,""),d(da,N,M),d(Si)),c&&T()}function T(){m.length&&x(m.shift())}return{mount:v,destroy:Mt(An,m),check:h}}function Ad(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,v=u.getIndex,w=u.go,C=t.Direction.resolve,h=c.pagination,x=[],$,T;function I(){k(),o([nn,Vt,Go],I);var f=n.pagination;h&&Qi(h,f?"":"none"),f&&(o([Wn,Zo,di],X),N(),X(),l(il,{list:$,items:x},b(e.index)))}function k(){$&&(si(h?Gn($.children):$),En($,T),An(x),$=null),i.destroy()}function N(){var f=e.length,R=n.classes,A=n.i18n,j=n.perPage,q=m()?u.getEnd()+1:eo(f/j);$=h||xi("ul",R.pagination,c.track.parentElement),Sn($,T=ar+"--"+P()),nt($,Mn,"tablist"),nt($,mn,A.select),nt($,pa,P()===ir?"vertical":"");for(var le=0;le<q;le++){var Y=xi("li",null,$),z=xi("button",{class:R.page,type:"button"},Y),H=d.getIn(le).map(function(E){return E.slide.id}),L=!m()&&j>1?A.pageX:A.slideX;s(z,"click",Mt(M,le)),n.paginationKeyboard&&s(z,"keydown",Mt(B,le)),nt(Y,Mn,"presentation"),nt(z,Mn,"tab"),nt(z,go,H.join(" ")),nt(z,mn,jr(L,le+1)),nt(z,bi,-1),x.push({li:Y,button:z,page:le})}}function M(f){w(">"+f,!0)}function B(f,R){var A=x.length,j=ha(R),q=P(),le=-1;j===C(nr,!1,q)?le=++f%A:j===C(tr,!1,q)?le=(--f+A)%A:j==="Home"?le=0:j==="End"&&(le=A-1);var Y=x[le];Y&&(Ds(Y.button),w(">"+le),In(R,!0))}function P(){return n.paginationDirection||n.direction}function b(f){return x[u.toPage(f)]}function X(){var f=b(v(!0)),R=b(v());if(f){var A=f.button;En(A,li),Cn(A,_a),nt(A,bi,-1)}if(R){var j=R.button;Sn(j,li),nt(j,_a,!0),nt(j,bi,"")}l(ol,{list:$,items:x},f,R)}return{items:x,mount:I,destroy:k,getAt:b,update:X}}var Wd=[" ","Enter"];function Fd(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&m()}function d(){l.forEach(function(h){h.destroy()}),An(l)}function c(){d(),s()}function u(h,x){var $=Nt(h);$.on(Wn,function(T,I,k){x.go(x.is(Ni)?k:T)}),l.push($)}function m(){var h=Nt(e),x=h.on;x(ra,w),x(al,C),x([qn,nn],v),l.push(h),h.emit(sa,e.splides)}function v(){nt(t.Elements.list,pa,n.direction===ir?"vertical":"")}function w(h){e.go(h.index)}function C(h,x){ea(Wd,ha(x))&&(w(h),In(x))}return{setup:Mt(t.Media.set,{slideFocus:lo(o)?i:o},!0),mount:s,destroy:d,remount:c}}function _d(e,t,n){var i=Nt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",d,fi)}function d(u){if(u.cancelable){var m=u.deltaY,v=m<0,w=Or(u),C=n.wheelMinThreshold||0,h=n.wheelSleep||0;rn(m)>C&&w-l>h&&(e.go(v?"<":">"),l=w),c(v)&&In(u)}}function c(u){return!n.releaseWheel||e.state.is(Fi)||t.Controller.getAdjacent(u)!==-1}return{mount:s}}var Nd=90;function Hd(e,t,n){var i=Nt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,d=xi("span",nd),c=Qo(Nd,Mt(m,!1));function u(){s&&(w(!t.Autoplay.isPaused()),nt(l,Oa,!0),d.textContent="…",o(la,Mt(w,!0)),o(ca,Mt(w,!1)),o([_i,di],Mt(m,!0)))}function m(C){nt(l,Ha,C),C?(uo(l,d),c.start()):(si(d),c.cancel())}function v(){Cn(l,[Na,Oa,Ha]),si(d)}function w(C){s&&nt(l,Na,C?"off":"polite")}return{mount:u,disable:w,destroy:v}}var Od=Object.freeze({__proto__:null,Media:Kc,Direction:Uc,Elements:ld,Slides:dd,Layout:ud,Clones:md,Move:gd,Controller:hd,Arrows:vd,Autoplay:bd,Cover:wd,Scroll:Id,Drag:Rd,Keyboard:Md,LazyLoad:Pd,Pagination:Ad,Sync:Fd,Wheel:_d,Live:Hd}),Bd={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},jd={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:rd,i18n:Bd,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function zd(e,t,n){var i=t.Slides;function o(){Nt(e).on([qn,Vt],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Os(c)}return{mount:o,start:s,cancel:Hr}}function Dd(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,d=Mt(yn,s,"transition"),c;function u(){Nt(e).bind(s,"transitionend",function(C){C.target===s&&c&&(v(),c())})}function m(C,h){var x=i.toPosition(C,!0),$=i.getPosition(),T=w(C);rn(x-$)>=1&&T>=1?n.useScroll?l.scroll(x,T,!1,h):(d("transform "+T+"ms "+n.easing),i.translate(x,!0),c=h):(i.jump(C),h())}function v(){d(""),l.cancel()}function w(C){var h=n.rewindSpeed;if(e.is(Ci)&&h){var x=o.getIndex(!0),$=o.getEnd();if(x===0&&C>=$||x>=$&&C===0)return h}return n.speed}return{mount:u,start:m,cancel:v}}var Vd=(function(){function e(n,i){this.event=Nt(),this.Components={},this.state=Gc(vi),this.splides=[],this._o={},this._E={};var o=zn(n)?Gs(document,n):n;Vi(o,o+" is invalid."),this.root=o,i=Hn({label:vn(o,mn)||"",labelledby:vn(o,ua)||""},jd,e.defaults,i||{});try{Hn(i,JSON.parse(vn(o,ia)))}catch{Vi(!1,"Invalid JSON")}this._o=Object.create(Hn({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,d=this.Components;Vi(s.is([vi,zo]),"Already mounted!"),s.set(vi),this._C=d,this._T=o||this._T||(this.is(ho)?zd:Dd),this._E=i||this._E;var c=Zi({},Od,this._E,{Transition:this._T});return ai(c,function(u,m){var v=u(l,d,l._o);d[m]=v,v.setup&&v.setup()}),ai(d,function(u){u.mount&&u.mount()}),this.emit(qn),Sn(this.root,id),s.set($i),this.emit(zr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is($i)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Gn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Vt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(vi)?Nt(this).on(zr,this.destroy.bind(this,i)):(ai(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(aa),o.destroy(),i&&An(this.splides),l.set(zo)),this},Bc(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),fa=Vd;fa.defaults={};fa.STATES=zc;var Da=[[qn,"onMounted"],[zr,"onReady"],[Wn,"onMove"],[_i,"onMoved"],[ra,"onClick"],[Us,"onActive"],[Xs,"onInactive"],[Ys,"onVisible"],[Js,"onHidden"],[Vt,"onRefresh"],[nn,"onUpdated"],[Si,"onResize"],[Jo,"onResized"],[Zs,"onDrag"],[Qs,"onDragging"],[el,"onDragged"],[Zo,"onScroll"],[di,"onScrolled"],[aa,"onDestroy"],[tl,"onArrowsMounted"],[nl,"onArrowsUpdated"],[il,"onPaginationMounted"],[ol,"onPaginationUpdated"],[sa,"onNavigationMounted"],[la,"onAutoplayPlay"],[rl,"onAutoplayPlaying"],[ca,"onAutoplayPause"],[da,"onLazyLoadLoaded"]];function ya(...e){return e.filter(Boolean).join(" ")}function qo(e){return e!==null&&typeof e=="object"}function Gr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Gr(n,t[i]));if(qo(e)&&qo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Gr(e[o],t[o]))}return e===t}function Gd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function qd(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function qr(e,t){const n=e;return qd(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():qo(i)?n[o]=qr(qo(n[o])?n[o]:{},i):n[o]=i}),n}var Kd=({children:e,className:t,...n})=>a.createElement("div",{className:ya("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),va=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new fa(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=qr({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Gr(this.options,e)&&(this.splide.options=e,this.options=qr({},e));const t=this.getSlides();Gd(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){Da.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:ya("splide",e),ref:this.splideRef,...this.omit(o,["options",...Da.map(l=>l[1])])},n?a.createElement(Kd,null,i):i)}},xa=({children:e,className:t,...n})=>a.createElement("li",{className:ya("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const Ud="RichTextRenderer-module__link___BWeZ2",Xd={link:Ud},Yd=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},sr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Yd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ln(e){const{color:t,...n}=e;return n}function Kt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:sr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Ti=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Xd.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Jd(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Jd(e){return{...e.fontFamily&&{fontFamily:sr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Zd="SvgImage-module__svg___q3xE-",Qd="SvgImage-module__img___VsTm-",Va={svg:Zd,img:Qd},eu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},tu=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,cn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[l,s]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(d)}},[]),!eu(e)||!l?r.jsx("img",{src:e,alt:"",className:it(Va.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:it(Va.svg,i),style:{"--svg":tu(e),"--fill":t,"--hover-fill":n,...o??{}}})},nu={"top-left":Be.topLeftAlignment,"top-center":Be.topCenterAlignment,"top-right":Be.topRightAlignment,"middle-left":Be.middleLeftAlignment,"middle-center":Be.middleCenterAlignment,"middle-right":Be.middleRightAlignment,"bottom-left":Be.bottomLeftAlignment,"bottom-center":Be.bottomCenterAlignment,"bottom-right":Be.bottomRightAlignment};function iu({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=a.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:v,textAppearance:w,color:C}=n.imageCaption??{},[h,x]=a.useState(void 0),[$,T]=a.useState(null),[I,k]=a.useState(0),[H,M]=a.useState(0),{direction:B,transition:P,controls:b,pagination:G,imageCaption:f,triggers:R}=e,A=a.useRef(P.type),{x:j,y:K}=e.controls.offset,le=X=>{o&&o.go(X)};return a.useEffect(()=>{if(!$)return;const X=new ResizeObserver(z=>{if(!o)return;const[_]=z;x({width:Math.round(_.contentRect.width),height:Math.round(_.contentRect.height)})});return X.observe($),()=>X.unobserve($)},[$]),a.useEffect(()=>{!o||A.current===P.type||(M(X=>X+1),A.current=P.type)},[P.type]),r.jsx("div",{className:it(Be.wrapper,{[Be.editor]:i}),ref:T,children:r.jsxs("div",{className:Be.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:it(Be.captionBlock),children:r.jsx("div",{className:Be.captionTextWrapper,children:t.map((X,z)=>r.jsx("div",{className:it(Be.captionText,nu[f.alignment],{[Be.withPointerEvents]:z===I&&i,[Be.active]:z===I}),style:{fontFamily:sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(v.fontSize,i),lineHeight:y.scalingValue(v.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:C,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Be.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:y.scalingValue(f.offset.y,i),left:y.scalingValue(f.offset.x,i)},children:r.jsx(Ti,{content:X.imageCaption})})},z))})}),r.jsx(va,{onMove:X=>{k(X.index)},ref:l,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:B==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((X,z)=>r.jsx(xa,{children:r.jsx("div",{className:Be.sliderItem,children:r.jsx("div",{className:Be.imgWrapper,children:r.jsx("img",{className:it(Be.sliderImage,{[Be.contain]:X.image.objectFit==="contain",[Be.cover]:X.image.objectFit==="cover"}),src:X.image.url,alt:X.image.name??""})})})},z))},H),b.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:it(Be.arrow,{[Be.arrowVertical]:B==="vert",[Be.hoverArrow]:b.show==="on hover"}),style:{color:b.color,"--arrow-hover-color":b.hover},children:r.jsxs("button",{onClick:()=>{le("-1")},className:Be.arrowInner,style:{transform:`translate(${y.scalingValue(j,i)}, ${y.scalingValue(K*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[b.arrowsImgUrl&&r.jsx(cn,{url:b.arrowsImgUrl,fill:b.color,hoverFill:b.hover,className:it(Be.arrowImg,Be.mirror)}),!b.arrowsImgUrl&&r.jsx(Ga,{color:b.color,className:it(Be.arrowIcon,Be.arrowImg,Be.mirror)})]})}),r.jsx("div",{className:it(Be.arrow,Be.nextArrow,{[Be.arrowVertical]:B==="vert",[Be.hoverArrow]:b.show==="on hover"}),style:{color:b.color,"--arrow-hover-color":b.hover},children:r.jsxs("button",{className:Be.arrowInner,onClick:()=>le("+1"),style:{transform:`translate(${y.scalingValue(j*(B==="horiz"?-1:1),i)}, ${y.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[b.arrowsImgUrl&&r.jsx(cn,{url:b.arrowsImgUrl,fill:b.color,hoverFill:b.hover,className:Be.arrowImg}),!b.arrowsImgUrl&&r.jsx(Ga,{color:b.color,className:it(Be.arrowIcon,Be.arrowImg)})]})})]}),R.triggersList.click&&r.jsx("div",{className:Be.clickOverlay,onClick:()=>{o&&o.go("+1")}}),G.isActive&&r.jsx("div",{className:it(Be.pagination,{[Be.paginationInsideBottom]:G.position==="inside-1"&&B==="horiz",[Be.paginationInsideTop]:G.position==="inside-2"&&B==="horiz",[Be.paginationOutsideBottom]:G.position==="outside-1"&&B==="horiz",[Be.paginationOutsideTop]:G.position==="outside-2"&&B==="horiz",[Be.paginationInsideLeft]:G.position==="inside-1"&&B==="vert",[Be.paginationInsideRight]:G.position==="inside-2"&&B==="vert",[Be.paginationOutsideLeft]:G.position==="outside-1"&&B==="vert",[Be.paginationOutsideRight]:G.position==="outside-2"&&B==="vert",[Be.paginationVertical]:B==="vert"}),children:r.jsx("div",{className:Be.paginationInner,style:{backgroundColor:G.colors[2],transform:`scale(${G.scale/100}) translate(${y.scalingValue(G.offset.x,i)}, ${y.scalingValue(G.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((X,z)=>r.jsx("button",{onClick:()=>{o&&o.go(z)},className:it(Be.paginationItem),children:r.jsx("div",{className:it(Be.dot,{[Be.activeDot]:z===I}),style:{backgroundColor:z===I?G.colors[0]:G.colors[1],"--pagination-hover-color":G.hover}})},z))})})]})})}function Ga({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const ou={element:iu,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.url",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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",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"]}},ru="ImageRevealSlider-module__imageRevealSlider___UE5Ob",au="ImageRevealSlider-module__image___Qjt-e",su="ImageRevealSlider-module__link___N-iLG",lu="ImageRevealSlider-module__cursor___2U03d",mi={imageRevealSlider:ru,image:au,link:su,cursor:lu};function qa(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const l=i.width?Number.parseFloat(i.width):o.naturalWidth,s=o.naturalHeight/o.naturalWidth*l,d=l/2,c=s/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function br(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function cu(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await br(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await br(e);l=s.height/s.width*o}else{const s=await br(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function du({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[l,s]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,v]=a.useState({x:0,y:0}),[w,C]=a.useState(1),[h,x]=a.useState("none"),$=a.useRef({x:0,y:0}),[T,I]=a.useState(!1),{sizeType:k,imageWidth:H,randomRangeImageWidth:M}=e.imageSize,{revealPosition:B,visible:P}=e.position,{cursorType:b,target:G,defaultCursorScale:f,defaultCursor:R,hoverCursorScale:A,hoverCursor:j}=e.cursor;a.useEffect(()=>{if(!i)return;const X=(L,E)=>{const D=i.getBoundingClientRect(),U=L-D.left,Q=E-D.top;if(v({x:U,y:Q}),b==="system"){x("none"),C(1);return}const O=U,ge=Q,g=document.elementFromPoint(D.left+O,D.top+ge);if(g&&g.closest("a")){x("none"),C(1);return}const he=qa(O,ge,l)||G==="area"?{img:j??"none",scale:A}:{img:R??"none",scale:f};x(he.img),C(he.scale)},z=L=>{L.stopPropagation(),$.current={x:L.clientX,y:L.clientY},X(L.clientX,L.clientY)},_=()=>{T&&X($.current.x,$.current.y)};return i.addEventListener("mousemove",z),window.addEventListener("scroll",_,!0),()=>{i.removeEventListener("mousemove",z),window.removeEventListener("scroll",_,!0)}},[i,T,m,b,G,j,R,A,f,l]),a.useEffect(()=>{T||(x("none"),C(0))},[T]);const K=async(X,z,_,L={})=>{const{width:E,height:D,finalWidth:U}=await cu(X.image.url,k,H,M);let Q=0,O=0;B==="same"?(Q=z/2,O=_/2):(Q=L.x??Math.random()*z,O=L.y??Math.random()*_);const ge=Math.min(Math.max(Q,E/2),z-E/2),g=Math.min(Math.max(O,D/2),_-D/2);return{id:u.current++,url:X.image.url,link:X.link,name:X.image.name,x:ge,y:g,width:U}};a.useEffect(()=>{if(!i||t.length===0)return;const X=i.getBoundingClientRect(),z=X.width,_=X.height,L=[];(async()=>{const D=t[0],U=await K(D,z,_);L.push(U),s(L),c(1)})()},[k,H,M,B,i]),a.useEffect(()=>{P==="last One"&&s(X=>X.length>0?[X[X.length-1]]:[])},[P]);const le=async X=>{if(!i)return;const z=i.getBoundingClientRect(),_=X.clientX-z.left,L=X.clientY-z.top;if(G==="image"&&!qa(_,L,l))return;let E=0,D=0;B==="on Click"?(E=_,D=L):B==="same"?(E=z.width/2,D=z.height/2):(E=Math.random()*z.width,D=Math.random()*z.height);const U=t[d],Q=await K(U,z.width,z.height,{x:E,y:D});s(O=>P==="all"?[...O,Q]:[Q]),c(O=>O>=t.length-1?0:O+1)};return r.jsxs("div",{ref:o,onClick:le,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:mi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[l.map(X=>r.jsx("div",{className:mi.wrapper,style:{top:`${X.y}px`,left:`${X.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:X.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:G==="area"&&X.link?r.jsx("a",{href:X.link,target:"_blank",className:mi.link,children:r.jsx("img",{src:X.url,alt:X.name,className:mi.image},X.id)}):r.jsx("img",{src:X.url,alt:X.name,className:mi.image},X.id)},X.id)),T&&r.jsx("div",{className:mi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const uu={element:du,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.url",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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},pu="LightBox-module__hidden___9s-9x",mu="LightBox-module__heroImage___sTxNF",gu="LightBox-module__background___rm9ml",hu="LightBox-module__editor___4ACaY",fu="LightBox-module__contentStyle___Bgnsq",yu="LightBox-module__imageStyle___tLIlB",vu="LightBox-module__imgWrapper___LuFUp",xu="LightBox-module__contain___8-yaS",bu="LightBox-module__cover___hNvOG",wu="LightBox-module__caption___b6L2I",$u="LightBox-module__captionTextInner___rCGNH",Su="LightBox-module__lightboxSplide___XFuWC",Cu="LightBox-module__arrow___iz38X",Tu="LightBox-module__arrowVertical___Zfz81",Lu="LightBox-module__nextArrow___zkAQN",Iu="LightBox-module__arrowInner___p48sW",Ru="LightBox-module__arrowIcon___3VaFf",Eu="LightBox-module__arrowImg___pNV88",Mu="LightBox-module__mirror___pjeXc",ku="LightBox-module__thumbsWrapper___GB-nU",Pu="LightBox-module__thumbsContainerVertical___wttk5",Au="LightBox-module__thumbsContainer___osSma",Wu="LightBox-module__thumbsAlignStart___MO6tY",Fu="LightBox-module__thumbsAlignCenter___Q4sUx",_u="LightBox-module__thumbsAlignEnd___p4y9R",Nu="LightBox-module__thumbItem___HvnF3",Hu="LightBox-module__closeButton___g2khP",Ou="LightBox-module__fadeIn___0m5GW",Bu="LightBox-module__slideInLeft___gPYwC",ju="LightBox-module__slideInRight___S-pPp",zu="LightBox-module__slideInTop___DFdAj",Du="LightBox-module__slideInBottom___m27kZ",Vu="LightBox-module__fadeOut___55qBR",Gu="LightBox-module__slideOutLeft___NvU7P",qu="LightBox-module__slideOutRight___SK7eC",Ku="LightBox-module__slideOutTop___Vgg0z",Uu="LightBox-module__slideOutBottom___nJ0Ef",Xu="LightBox-module__scaleSlide___vZriG",Re={hidden:pu,heroImage:mu,background:gu,editor:hu,contentStyle:fu,imageStyle:yu,imgWrapper:vu,contain:xu,cover:bu,caption:wu,captionTextInner:$u,lightboxSplide:Su,arrow:Cu,arrowVertical:Tu,nextArrow:Lu,arrowInner:Iu,arrowIcon:Ru,arrowImg:Eu,mirror:Mu,thumbsWrapper:ku,thumbsContainerVertical:Pu,thumbsContainer:Au,thumbsAlignStart:Wu,thumbsAlignCenter:Fu,thumbsAlignEnd:_u,thumbItem:Nu,closeButton:Hu,fadeIn:Ou,slideInLeft:Bu,slideInRight:ju,slideInTop:zu,slideInBottom:Du,fadeOut:Vu,slideOutLeft:Gu,slideOutRight:qu,slideOutTop:Ku,slideOutBottom:Uu,scaleSlide:Xu},$o=(e,t,n)=>{const i={},[o,l]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),o==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function wl(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function Kr(e){const t=e.getBoundingClientRect(),n=wl(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,s=e.naturalHeight,d=i/o,c=l/s;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const v=t.left+n.left,w=t.top+n.top,C=(i-u)/2+v,h=(o-m)/2+w;return{x:C,y:h,width:u,height:m}}function Ka(e){const t=e.getBoundingClientRect(),n=wl(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ua(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Yu(e,t){const n=(()=>{if(e==="fade in")return Re.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Re.slideInLeft;case"right":return Re.slideInRight;case"top":return Re.slideInTop;case"bottom":return Re.slideInBottom;default:return Re.slideInRight}return Re.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Re.fadeIn;if(e==="slide in")switch(t){case"left":return Re.slideInLeft;case"right":return Re.slideInRight;case"top":return Re.slideInTop;case"bottom":return Re.slideInBottom;default:return Re.slideInRight}return Re.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Re.fadeOut;if(e==="slide in")switch(t){case"left":return Re.slideOutLeft;case"right":return Re.slideOutRight;case"top":return Re.slideOutTop;case"bottom":return Re.slideOutBottom;default:return Re.slideOutRight}return Re.fadeOut})(),l=(()=>{if(e==="fade in")return Re.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Re.slideOutLeft;case"right":return Re.slideOutRight;case"top":return Re.slideOutTop;case"bottom":return Re.slideOutBottom;default:return Re.slideOutRight}return Re.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const Ju=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Re.heroImage,onClick:()=>c(!0)}),r.jsx(Zu,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},Zu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:d})=>{var $e;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:v,wordSpacing:w,fontSizeLineHeight:C,textAppearance:h,color:x}=i.imageCaption??{},[$,T]=a.useState(0),[I,k]=a.useState(0),[H,M]=a.useState(!1),[B,P]=a.useState(!1),[b,G]=a.useState({}),f=a.useRef(null),R=a.useRef(null),A=a.useRef(null),j=a.useRef(!1),K=a.useRef(null),le=a.useRef(null),X=a.useRef(null),z=a.useRef(null),_=a.useRef(!1),L=a.useRef(null),[E,D]=a.useState(!1),{appear:U,triggers:Q,slider:O,thumbnail:ge,controls:g,area:he,caption:se,layout:ve}=o.lightboxBlock,{appearClass:Ee,backdropAppearClass:oe,backdropDisappearClass:xe,disappearClass:Y}=Yu(U.type,U.direction),be=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const N=()=>{setTimeout(()=>{var W,J;(J=(W=f.current)==null?void 0:W.splide)==null||J.refresh()},16)},te=()=>{k(W=>W+1)};return window.addEventListener("ArticleEditor.Layout:change",N),window.addEventListener("ArticleEditor.ComponentContent:change",te),()=>{window.removeEventListener("ArticleEditor.Layout:change",N),window.removeEventListener("ArticleEditor.ComponentContent:change",te)}},[]),a.useEffect(()=>{if(!e||!ge.isActive){D(!1);return}const N=L.current;if(!N)return;const te=()=>{O.direction==="horiz"?D(N.scrollWidth>N.clientWidth):D(N.scrollHeight>N.clientHeight)};te();const W=new ResizeObserver(te);return W.observe(N),()=>W.disconnect()},[e,ge.isActive,n.length,b,O.direction]);const me=a.useCallback(()=>{const N=window.matchMedia("(max-width: 768px)").matches,te=Ua(he.color);N&&!s&&te>.9&&(document.body.style.backgroundColor=""),M(!0),j.current=!0;const W=J=>{J.target===K.current&&J.animationName&&(K.current&&le.current&&K.current.removeEventListener("animationend",le.current),le.current=null,j.current&&(j.current=!1,t()),M(!1))};K.current&&(le.current=W,K.current.addEventListener("animationend",W))},[t,he.color,s]),ue=(N,te,W)=>{var J,Z;if(N){if(Q.type==="click"&&Q.switch==="image")Q.repeat==="close"&&$===n.length-1?me():(J=f.current)==null||J.go("+1");else if(Q.type==="click"&&Q.switch==="50/50"){const ce=N.getBoundingClientRect(),pe=te-ce.left,ye=W-ce.top,Ie=ce.width,q=ce.height;let de;O.direction==="horiz"?de=pe<Ie/2?"-1":"+1":de=ye<q/2?"-1":"+1",(Z=f.current)==null||Z.go(de)}}},re=N=>{if(_.current){_.current=!1;return}const te=n[$],W=(te==null?void 0:te.image.objectFit)==="cover";let J,Z;if("changedTouches"in N&&N.changedTouches.length>0)J=N.changedTouches[0].clientX,Z=N.changedTouches[0].clientY;else if("clientX"in N)J=N.clientX,Z=N.clientY;else return;let ce;if(W&&A.current){const pe=Ka(A.current);ce=J>=pe.left&&J<=pe.right&&Z>=pe.top&&Z<=pe.bottom}else{const pe=A.current?Kr(A.current):null;if(!pe){N.target===N.currentTarget&&me();return}ce=J>=pe.x&&J<=pe.x+pe.width&&Z>=pe.y&&Z<=pe.y+pe.height}ce?ue(A.current,J,Z):me()},Le=N=>{const te=N.target;(te.classList.contains(Re.thumbsWrapper)||te.classList.contains(Re.thumbsContainer))&&re(N)};a.useEffect(()=>{if(!e)return;const N=te=>{var W,J;if(te.key==="Escape"){me();return}if(te.key==="ArrowRight"){T(Z=>(Z+1)%Math.max(n.length,1)),(W=f.current)==null||W.go("+1");return}te.key==="ArrowLeft"&&(T(Z=>(Z-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",N),()=>{window.removeEventListener("keydown",N)}},[e,me,n.length]),a.useEffect(()=>{if(e){if(T(0),k(te=>te+1),j.current=!1,M(!1),P(!1),G({}),!be)return;const N=new CustomEvent("page-overlay",{detail:{itemId:be}});window.dispatchEvent(N)}return()=>{K.current&&le.current&&(K.current.removeEventListener("animationend",le.current),le.current=null),P(!1)}},[e,be]),a.useEffect(()=>{R.current!==null&&R.current!==O.type&&k(N=>N+1),R.current=O.type},[O.type]),a.useEffect(()=>{if(!e)return;const N=document.body.style.overflow,te=window.matchMedia("(max-width: 768px)").matches,W=Ua(he.color);document.body.style.overflow="hidden",P(!1);const J=ce=>{ce.target===K.current&&!j.current&&ce.animationName&&(te&&!s&&W>.9&&(document.body.style.backgroundColor=he.color),P(!0),K.current&&X.current&&K.current.removeEventListener("animationend",X.current),X.current=null)};K.current&&(X.current=J,K.current.addEventListener("animationend",J));const Z=ce=>{const pe=ce.target;pe&&(pe.closest(`.${Re.thumbsWrapper}`)||pe.closest(`.${Re.thumbsContainer}`))||O.type!=="slide"&&ce.preventDefault()};return document.addEventListener("touchmove",Z,{passive:!1}),()=>{document.body.style.overflow=N,document.removeEventListener("touchmove",Z),K.current&&X.current&&(K.current.removeEventListener("animationend",X.current),X.current=null),P(!1)}},[e,s,he.color,O.type]),a.useEffect(()=>{if(!e)return;const N=te=>{var J,Z;if(j.current){te.stopPropagation();return}if(_.current){_.current=!1;return}const W=te.target;if(!(W&&(W.closest(`.${Re.thumbsContainer}`)||W.closest(`.${Re.thumbItem}`)||W.closest(`.${Re.arrow}`)||W.closest(`.${Re.closeButton}`)||W.closest(`.${Re.caption}`)))){if(O.type==="slide"&&Q.type==="drag"&&((Z=(J=f.current)==null?void 0:J.splide)!=null&&Z.root)){const ce=f.current.splide.root;if(W&&(ce.contains(W)||ce===W))return}if(te.touches.length===0&&te.changedTouches.length>0){const ce=n[$],pe=(ce==null?void 0:ce.image.objectFit)==="cover",ye=te.changedTouches[0];let Ie;if(pe&&A.current){const q=Ka(A.current);Ie=ye.clientX>=q.left&&ye.clientX<=q.right&&ye.clientY>=q.top&&ye.clientY<=q.bottom}else{const q=A.current?Kr(A.current):null;if(!q)return;Ie=ye.clientX>=q.x&&ye.clientX<=q.x+q.width&&ye.clientY>=q.y&&ye.clientY<=q.y+q.height}if(!Ie){te.stopPropagation(),j.current=!0;const q=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",q,!0)};document.addEventListener("click",q,!0),me()}}}};return document.addEventListener("touchend",N,{passive:!0}),()=>{document.removeEventListener("touchend",N)}},[e,me,$,n]);const Ce=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&Q.type==="drag";a.useEffect(()=>{var de,Me;if(!e||!Ce||!((Me=(de=f.current)==null?void 0:de.splide)!=null&&Me.root))return;const N=f.current.splide.root,te=30,W=(ee,ne)=>{if(z.current){const Fe=Math.abs(ee-z.current.x),We=Math.abs(ne-z.current.y);(Fe>0||We>0)&&(_.current=!0)}},J=ee=>{z.current&&(ee.preventDefault(),W(ee.clientX,ee.clientY))},Z=ee=>{z.current&&ee.touches.length>0&&(ee.preventDefault(),W(ee.touches[0].clientX,ee.touches[0].clientY))},ce=(ee,ne)=>{if(!z.current||!f.current){z.current=null;return}const Fe=Math.abs(ee-z.current.x),We=Math.abs(ne-z.current.y);We>te&&We>Fe&&f.current.go(ne<z.current.y?"+1":"-1"),z.current=null},pe=ee=>{z.current&&ce(ee.clientX,ee.clientY),document.removeEventListener("pointerup",pe),document.removeEventListener("pointercancel",pe),document.removeEventListener("pointermove",J)},ye=ee=>{if(z.current){if(ee.changedTouches.length>0){const ne=ee.changedTouches[0];ce(ne.clientX,ne.clientY)}document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),document.removeEventListener("touchmove",Z)}},Ie=ee=>{z.current={x:ee.clientX,y:ee.clientY},_.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",pe),document.addEventListener("pointercancel",pe)},q=ee=>{ee.touches.length>0&&(z.current={x:ee.touches[0].clientX,y:ee.touches[0].clientY},_.current=!1,document.addEventListener("touchmove",Z,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye))};return N.addEventListener("pointerdown",Ie),N.addEventListener("touchstart",q),()=>{N.removeEventListener("pointerdown",Ie),N.removeEventListener("touchstart",q),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",pe),document.removeEventListener("pointercancel",pe),document.removeEventListener("touchmove",Z),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),z.current=null,_.current=!1}},[e,Ce,I]);const fe={backgroundColor:he.color,backdropFilter:`blur(${he.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Wi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:K,className:it(Re.background,H?xe:oe,{[Re.editor]:s},{[Re.hidden]:!e}),style:{...fe,...B&&!s&&!H?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?K:null,className:it(Re.contentStyle,H?Y:Ee,{[Re.editor]:s},{[Re.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(va,{onMove:N=>T(N.index),ref:f,className:Re.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:Q.type==="drag"&&!Ce,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:Q.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((N,te)=>{const W=$o(ve.position,ve.offset,s),J=`${y.scalingValue(ve.padding.top,s)} ${y.scalingValue(ve.padding.right,s)} ${y.scalingValue(ve.padding.bottom,s)} ${y.scalingValue(ve.padding.left,s)}`,Z=O.type==="scale"?(()=>{const{transform:ce,...pe}=W;return{...pe,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ce||"none"}})():{...W,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(xa,{children:r.jsx("div",{className:Re.imgWrapper,onClick:re,children:r.jsx("img",{ref:te===$?A:null,className:it(Re.imageStyle,{[Re.contain]:N.image.objectFit==="contain",[Re.cover]:N.image.objectFit==="cover",[Re.scaleSlide]:O.type==="scale"}),src:N.image.url,alt:N.image.name??"",style:{...Z,pointerEvents:N.image.objectFit==="contain"?"none":"auto"}})})},te)})},I),g.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:it(Re.arrow,{[Re.arrowVertical]:O.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:Re.arrowInner,style:{transform:`translate(${y.scalingValue(g.offset.x,s)}, ${y.scalingValue(g.offset.y*(O.direction==="horiz"?1:-1),s)}) scale(${g.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var N;return(N=f.current)==null?void 0:N.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&r.jsx(cn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:it(Re.arrowImg,Re.mirror)}),!g.arrowsImgUrl&&r.jsx(Xa,{color:g.color,className:it(Re.arrowIcon,Re.arrowImg,Re.mirror)})]})}),r.jsx("div",{className:it(Re.arrow,Re.nextArrow,{[Re.arrowVertical]:O.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:Re.arrowInner,style:{transform:`translate(${y.scalingValue(g.offset.x*(O.direction==="horiz"?-1:1),s)}, ${y.scalingValue(g.offset.y,s)}) scale(${g.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var N;return(N=f.current)==null?void 0:N.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&r.jsx(cn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Re.arrowImg}),!g.arrowsImgUrl&&r.jsx(Xa,{color:g.color,className:it(Re.arrowIcon,Re.arrowImg)})]})})]}),he.closeIconUrl&&(()=>{const N=$o(he.closeIconAlign,he.closeIconOffset,s),te=`scale(${he.closeIconScale})`,W=N.transform?`${N.transform} ${te}`:te;return r.jsx("button",{className:Re.closeButton,style:{...N,transform:W},onClick:me,"aria-label":"Close lightbox",children:r.jsx(cn,{url:he.closeIconUrl,fill:he.closeIconColor??"#000000",hoverFill:he.closeIconHover??"#cccccc"})})})(),se&&se.isActive&&i.imageCaption&&(($e=n[$])==null?void 0:$e.imageCaption)&&r.jsx("div",{className:Re.caption,style:{...$o(se.alignment,se.offset,s),fontFamily:sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,s),letterSpacing:y.scalingValue(m,s),wordSpacing:y.scalingValue(w,s),textAlign:v,fontSize:y.scalingValue(C.fontSize,s),lineHeight:y.scalingValue(C.lineHeight,s),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:x},onClick:N=>N.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Re.captionTextInner,style:{"--link-color":se.linkColor,"--link-hover-color":se.linkHoverColor},children:r.jsx(Ti,{content:n[$].imageCaption})})}),ge.isActive&&(()=>{const[N,te]=ge.position.split("-"),W=O.direction==="horiz"?`${N}-left`:ge.position,J=$o(W,ge.offset,s),Z=()=>{if(O.direction==="horiz"){if(te==="left")return"flex-start";if(te==="center")return"center";if(te==="right")return"flex-end"}else{if(N==="top")return"flex-start";if(N==="middle")return"center";if(N==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:L,className:Re.thumbsWrapper,onClick:ce=>Le(ce),style:{position:s?"absolute":"fixed",...J,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:it(Re.thumbsContainer,{[Re.thumbsContainerVertical]:O.direction==="vert",[Re.thumbsAlignStart]:ge.align==="start",[Re.thumbsAlignCenter]:ge.align==="center",[Re.thumbsAlignEnd]:ge.align==="end"}),style:{gap:y.scalingValue(ge.grid.gap,s),justifyContent:E?"flex-start":Z()},children:n.map((ce,pe)=>{const ye=pe===$,Ie=b[pe],de=ge.grid.size*(ye?ge.activeState.scale:1),Me=()=>{if(ge.fit!=="fit")return{};if(!Ie)return O.direction==="horiz"?{height:y.scalingValue(de,s)}:{width:y.scalingValue(de,s)};const ee=Ie.width/Ie.height;if(O.direction==="horiz"){const ne=de,Fe=ne*ee;return{width:y.scalingValue(Fe,s),height:y.scalingValue(ne,s)}}else{const ne=de,Fe=ne/ee;return{width:y.scalingValue(ne,s),height:y.scalingValue(Fe,s)}}};return r.jsx("button",{className:Re.thumbItem,style:{...O.direction==="horiz"&&ge.fit!=="fit"?{height:y.scalingValue(de,s)}:{},...O.direction==="vert"&&ge.fit!=="fit"?{width:y.scalingValue(de,s)}:{},...ge.fit==="cover"?{width:y.scalingValue(de,s),height:y.scalingValue(de,s)}:{},...Me(),transition:ye?"all 0.25s ease-out":"none",opacity:ye?ge.activeState.opacity/100:ge.opacity/100,"--thumb-hover":ge.activeState.opacity/100},onClick:ee=>{var ne;ee.stopPropagation(),T(pe),(ne=f.current)==null||ne.go(pe)},onMouseEnter:()=>{var ee;ge.triggers==="hov"&&((ee=f.current)==null||ee.go(pe))},children:r.jsx("img",{src:ce.image.url,alt:ce.image.name??"",onLoad:ee=>{const ne=ee.currentTarget;ne.naturalWidth&&ne.naturalHeight&&G(Fe=>({...Fe,[pe]:{width:ne.naturalWidth,height:ne.naturalHeight}}))},style:{objectFit:ge.fit==="cover"?"cover":"contain",...ge.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ge.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ce.image.name}-${pe}`)})})})})()]})]}),document.getElementById(l))};function Xa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Qu={element:Ju,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.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",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:{url:{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:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},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:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},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:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",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"]}};function So(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ep(e){return`
6
+ */const Ud="RichTextRenderer-module__link___BWeZ2",Xd={link:Ud},Yd=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},sr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Yd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ln(e){const{color:t,...n}=e;return n}function Kt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:sr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Ti=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Xd.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Jd(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Jd(e){return{...e.fontFamily&&{fontFamily:sr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Zd="SvgImage-module__svg___q3xE-",Qd="SvgImage-module__img___VsTm-",Va={svg:Zd,img:Qd},eu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},tu=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,cn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[l,s]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(d)}},[]),!eu(e)||!l?r.jsx("img",{src:e,alt:"",className:it(Va.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:it(Va.svg,i),style:{"--svg":tu(e),"--fill":t,"--hover-fill":n,...o??{}}})},nu={"top-left":Be.topLeftAlignment,"top-center":Be.topCenterAlignment,"top-right":Be.topRightAlignment,"middle-left":Be.middleLeftAlignment,"middle-center":Be.middleCenterAlignment,"middle-right":Be.middleRightAlignment,"bottom-left":Be.bottomLeftAlignment,"bottom-center":Be.bottomCenterAlignment,"bottom-right":Be.bottomRightAlignment};function iu({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=a.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:v,textAppearance:w,color:C}=n.imageCaption??{},[h,x]=a.useState(void 0),[$,T]=a.useState(null),[I,k]=a.useState(0),[N,M]=a.useState(0),{direction:B,transition:P,controls:b,pagination:X,imageCaption:f,triggers:R}=e,A=a.useRef(P.type),{x:j,y:q}=e.controls.offset,le=Y=>{o&&o.go(Y)};return a.useEffect(()=>{if(!$)return;const Y=new ResizeObserver(z=>{if(!o)return;const[H]=z;x({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return Y.observe($),()=>Y.unobserve($)},[$]),a.useEffect(()=>{!o||A.current===P.type||(M(Y=>Y+1),A.current=P.type)},[P.type]),r.jsx("div",{className:it(Be.wrapper,{[Be.editor]:i}),ref:T,children:r.jsxs("div",{className:Be.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:it(Be.captionBlock),children:r.jsx("div",{className:Be.captionTextWrapper,children:t.map((Y,z)=>r.jsx("div",{className:it(Be.captionText,nu[f.alignment],{[Be.withPointerEvents]:z===I&&i,[Be.active]:z===I}),style:{fontFamily:sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(v.fontSize,i),lineHeight:y.scalingValue(v.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:C,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Be.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:y.scalingValue(f.offset.y,i),left:y.scalingValue(f.offset.x,i)},children:r.jsx(Ti,{content:Y.imageCaption})})},z))})}),r.jsx(va,{onMove:Y=>{k(Y.index)},ref:l,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:B==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Y,z)=>r.jsx(xa,{children:r.jsx("div",{className:Be.sliderItem,children:r.jsx("div",{className:Be.imgWrapper,children:r.jsx("img",{className:it(Be.sliderImage,{[Be.contain]:Y.image.objectFit==="contain",[Be.cover]:Y.image.objectFit==="cover"}),src:Y.image.url,alt:Y.image.name??""})})})},z))},N),b.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:it(Be.arrow,{[Be.arrowVertical]:B==="vert",[Be.hoverArrow]:b.show==="on hover"}),style:{color:b.color,"--arrow-hover-color":b.hover},children:r.jsxs("button",{onClick:()=>{le("-1")},className:Be.arrowInner,style:{transform:`translate(${y.scalingValue(j,i)}, ${y.scalingValue(q*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[b.arrowsImgUrl&&r.jsx(cn,{url:b.arrowsImgUrl,fill:b.color,hoverFill:b.hover,className:it(Be.arrowImg,Be.mirror)}),!b.arrowsImgUrl&&r.jsx(Ga,{color:b.color,className:it(Be.arrowIcon,Be.arrowImg,Be.mirror)})]})}),r.jsx("div",{className:it(Be.arrow,Be.nextArrow,{[Be.arrowVertical]:B==="vert",[Be.hoverArrow]:b.show==="on hover"}),style:{color:b.color,"--arrow-hover-color":b.hover},children:r.jsxs("button",{className:Be.arrowInner,onClick:()=>le("+1"),style:{transform:`translate(${y.scalingValue(j*(B==="horiz"?-1:1),i)}, ${y.scalingValue(q,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[b.arrowsImgUrl&&r.jsx(cn,{url:b.arrowsImgUrl,fill:b.color,hoverFill:b.hover,className:Be.arrowImg}),!b.arrowsImgUrl&&r.jsx(Ga,{color:b.color,className:it(Be.arrowIcon,Be.arrowImg)})]})})]}),R.triggersList.click&&r.jsx("div",{className:Be.clickOverlay,onClick:()=>{o&&o.go("+1")}}),X.isActive&&r.jsx("div",{className:it(Be.pagination,{[Be.paginationInsideBottom]:X.position==="inside-1"&&B==="horiz",[Be.paginationInsideTop]:X.position==="inside-2"&&B==="horiz",[Be.paginationOutsideBottom]:X.position==="outside-1"&&B==="horiz",[Be.paginationOutsideTop]:X.position==="outside-2"&&B==="horiz",[Be.paginationInsideLeft]:X.position==="inside-1"&&B==="vert",[Be.paginationInsideRight]:X.position==="inside-2"&&B==="vert",[Be.paginationOutsideLeft]:X.position==="outside-1"&&B==="vert",[Be.paginationOutsideRight]:X.position==="outside-2"&&B==="vert",[Be.paginationVertical]:B==="vert"}),children:r.jsx("div",{className:Be.paginationInner,style:{backgroundColor:X.colors[2],transform:`scale(${X.scale/100}) translate(${y.scalingValue(X.offset.x,i)}, ${y.scalingValue(X.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((Y,z)=>r.jsx("button",{onClick:()=>{o&&o.go(z)},className:it(Be.paginationItem),children:r.jsx("div",{className:it(Be.dot,{[Be.activeDot]:z===I}),style:{backgroundColor:z===I?X.colors[0]:X.colors[1],"--pagination-hover-color":X.hover}})},z))})})]})})}function Ga({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const ou={element:iu,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.url",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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",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"]}},ru="ImageRevealSlider-module__imageRevealSlider___UE5Ob",au="ImageRevealSlider-module__image___Qjt-e",su="ImageRevealSlider-module__link___N-iLG",lu="ImageRevealSlider-module__cursor___2U03d",mi={imageRevealSlider:ru,image:au,link:su,cursor:lu};function qa(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const l=i.width?Number.parseFloat(i.width):o.naturalWidth,s=o.naturalHeight/o.naturalWidth*l,d=l/2,c=s/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function br(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function cu(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await br(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await br(e);l=s.height/s.width*o}else{const s=await br(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function du({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[l,s]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,v]=a.useState({x:0,y:0}),[w,C]=a.useState(1),[h,x]=a.useState("none"),$=a.useRef({x:0,y:0}),[T,I]=a.useState(!1),{sizeType:k,imageWidth:N,randomRangeImageWidth:M}=e.imageSize,{revealPosition:B,visible:P}=e.position,{cursorType:b,target:X,defaultCursorScale:f,defaultCursor:R,hoverCursorScale:A,hoverCursor:j}=e.cursor;a.useEffect(()=>{if(!i)return;const Y=(L,E)=>{const D=i.getBoundingClientRect(),K=L-D.left,Q=E-D.top;if(v({x:K,y:Q}),b==="system"){x("none"),C(1);return}const O=K,he=Q,g=document.elementFromPoint(D.left+O,D.top+he);if(g&&g.closest("a")){x("none"),C(1);return}const me=qa(O,he,l)||X==="area"?{img:j??"none",scale:A}:{img:R??"none",scale:f};x(me.img),C(me.scale)},z=L=>{L.stopPropagation(),$.current={x:L.clientX,y:L.clientY},Y(L.clientX,L.clientY)},H=()=>{T&&Y($.current.x,$.current.y)};return i.addEventListener("mousemove",z),window.addEventListener("scroll",H,!0),()=>{i.removeEventListener("mousemove",z),window.removeEventListener("scroll",H,!0)}},[i,T,m,b,X,j,R,A,f,l]),a.useEffect(()=>{T||(x("none"),C(0))},[T]);const q=async(Y,z,H,L={})=>{const{width:E,height:D,finalWidth:K}=await cu(Y.image.url,k,N,M);let Q=0,O=0;B==="same"?(Q=z/2,O=H/2):(Q=L.x??Math.random()*z,O=L.y??Math.random()*H);const he=Math.min(Math.max(Q,E/2),z-E/2),g=Math.min(Math.max(O,D/2),H-D/2);return{id:u.current++,url:Y.image.url,link:Y.link,name:Y.image.name,x:he,y:g,width:K}};a.useEffect(()=>{if(!i||t.length===0)return;const Y=i.getBoundingClientRect(),z=Y.width,H=Y.height,L=[];(async()=>{const D=t[0],K=await q(D,z,H);L.push(K),s(L),c(1)})()},[k,N,M,B,i]),a.useEffect(()=>{P==="last One"&&s(Y=>Y.length>0?[Y[Y.length-1]]:[])},[P]);const le=async Y=>{if(!i)return;const z=i.getBoundingClientRect(),H=Y.clientX-z.left,L=Y.clientY-z.top;if(X==="image"&&!qa(H,L,l))return;let E=0,D=0;B==="on Click"?(E=H,D=L):B==="same"?(E=z.width/2,D=z.height/2):(E=Math.random()*z.width,D=Math.random()*z.height);const K=t[d],Q=await q(K,z.width,z.height,{x:E,y:D});s(O=>P==="all"?[...O,Q]:[Q]),c(O=>O>=t.length-1?0:O+1)};return r.jsxs("div",{ref:o,onClick:le,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:mi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[l.map(Y=>r.jsx("div",{className:mi.wrapper,style:{top:`${Y.y}px`,left:`${Y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Y.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:X==="area"&&Y.link?r.jsx("a",{href:Y.link,target:"_blank",className:mi.link,children:r.jsx("img",{src:Y.url,alt:Y.name,className:mi.image},Y.id)}):r.jsx("img",{src:Y.url,alt:Y.name,className:mi.image},Y.id)},Y.id)),T&&r.jsx("div",{className:mi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const uu={element:du,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.url",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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},pu="LightBox-module__hidden___9s-9x",mu="LightBox-module__heroImage___sTxNF",gu="LightBox-module__background___rm9ml",hu="LightBox-module__editor___4ACaY",fu="LightBox-module__contentStyle___Bgnsq",yu="LightBox-module__imageStyle___tLIlB",vu="LightBox-module__imgWrapper___LuFUp",xu="LightBox-module__contain___8-yaS",bu="LightBox-module__cover___hNvOG",wu="LightBox-module__caption___b6L2I",$u="LightBox-module__captionTextInner___rCGNH",Su="LightBox-module__lightboxSplide___XFuWC",Cu="LightBox-module__arrow___iz38X",Tu="LightBox-module__arrowVertical___Zfz81",Lu="LightBox-module__nextArrow___zkAQN",Iu="LightBox-module__arrowInner___p48sW",Ru="LightBox-module__arrowIcon___3VaFf",Eu="LightBox-module__arrowImg___pNV88",Mu="LightBox-module__mirror___pjeXc",ku="LightBox-module__thumbsWrapper___GB-nU",Pu="LightBox-module__thumbsContainerVertical___wttk5",Au="LightBox-module__thumbsContainer___osSma",Wu="LightBox-module__thumbsAlignStart___MO6tY",Fu="LightBox-module__thumbsAlignCenter___Q4sUx",_u="LightBox-module__thumbsAlignEnd___p4y9R",Nu="LightBox-module__thumbItem___HvnF3",Hu="LightBox-module__closeButton___g2khP",Ou="LightBox-module__fadeIn___0m5GW",Bu="LightBox-module__slideInLeft___gPYwC",ju="LightBox-module__slideInRight___S-pPp",zu="LightBox-module__slideInTop___DFdAj",Du="LightBox-module__slideInBottom___m27kZ",Vu="LightBox-module__fadeOut___55qBR",Gu="LightBox-module__slideOutLeft___NvU7P",qu="LightBox-module__slideOutRight___SK7eC",Ku="LightBox-module__slideOutTop___Vgg0z",Uu="LightBox-module__slideOutBottom___nJ0Ef",Xu="LightBox-module__scaleSlide___vZriG",Re={hidden:pu,heroImage:mu,background:gu,editor:hu,contentStyle:fu,imageStyle:yu,imgWrapper:vu,contain:xu,cover:bu,caption:wu,captionTextInner:$u,lightboxSplide:Su,arrow:Cu,arrowVertical:Tu,nextArrow:Lu,arrowInner:Iu,arrowIcon:Ru,arrowImg:Eu,mirror:Mu,thumbsWrapper:ku,thumbsContainerVertical:Pu,thumbsContainer:Au,thumbsAlignStart:Wu,thumbsAlignCenter:Fu,thumbsAlignEnd:_u,thumbItem:Nu,closeButton:Hu,fadeIn:Ou,slideInLeft:Bu,slideInRight:ju,slideInTop:zu,slideInBottom:Du,fadeOut:Vu,slideOutLeft:Gu,slideOutRight:qu,slideOutTop:Ku,slideOutBottom:Uu,scaleSlide:Xu},$o=(e,t,n)=>{const i={},[o,l]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),o==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function wl(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function Kr(e){const t=e.getBoundingClientRect(),n=wl(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,s=e.naturalHeight,d=i/o,c=l/s;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const v=t.left+n.left,w=t.top+n.top,C=(i-u)/2+v,h=(o-m)/2+w;return{x:C,y:h,width:u,height:m}}function Ka(e){const t=e.getBoundingClientRect(),n=wl(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ua(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Yu(e,t){const n=(()=>{if(e==="fade in")return Re.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Re.slideInLeft;case"right":return Re.slideInRight;case"top":return Re.slideInTop;case"bottom":return Re.slideInBottom;default:return Re.slideInRight}return Re.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Re.fadeIn;if(e==="slide in")switch(t){case"left":return Re.slideInLeft;case"right":return Re.slideInRight;case"top":return Re.slideInTop;case"bottom":return Re.slideInBottom;default:return Re.slideInRight}return Re.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Re.fadeOut;if(e==="slide in")switch(t){case"left":return Re.slideOutLeft;case"right":return Re.slideOutRight;case"top":return Re.slideOutTop;case"bottom":return Re.slideOutBottom;default:return Re.slideOutRight}return Re.fadeOut})(),l=(()=>{if(e==="fade in")return Re.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Re.slideOutLeft;case"right":return Re.slideOutRight;case"top":return Re.slideOutTop;case"bottom":return Re.slideOutBottom;default:return Re.slideOutRight}return Re.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const Ju=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Re.heroImage,onClick:()=>c(!0)}),r.jsx(Zu,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},Zu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:d})=>{var xe;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:v,wordSpacing:w,fontSizeLineHeight:C,textAppearance:h,color:x}=i.imageCaption??{},[$,T]=a.useState(0),[I,k]=a.useState(0),[N,M]=a.useState(!1),[B,P]=a.useState(!1),[b,X]=a.useState({}),f=a.useRef(null),R=a.useRef(null),A=a.useRef(null),j=a.useRef(!1),q=a.useRef(null),le=a.useRef(null),Y=a.useRef(null),z=a.useRef(null),H=a.useRef(!1),L=a.useRef(null),[E,D]=a.useState(!1),{appear:K,triggers:Q,slider:O,thumbnail:he,controls:g,area:me,caption:ae,layout:we}=o.lightboxBlock,{appearClass:ke,backdropAppearClass:ne,backdropDisappearClass:ye,disappearClass:U}=Yu(K.type,K.direction),be=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const _=()=>{setTimeout(()=>{var W,J;(J=(W=f.current)==null?void 0:W.splide)==null||J.refresh()},16)},ee=()=>{k(W=>W+1)};return window.addEventListener("ArticleEditor.Layout:change",_),window.addEventListener("ArticleEditor.ComponentContent:change",ee),()=>{window.removeEventListener("ArticleEditor.Layout:change",_),window.removeEventListener("ArticleEditor.ComponentContent:change",ee)}},[]),a.useEffect(()=>{if(!e||!he.isActive){D(!1);return}const _=L.current;if(!_)return;const ee=()=>{O.direction==="horiz"?D(_.scrollWidth>_.clientWidth):D(_.scrollHeight>_.clientHeight)};ee();const W=new ResizeObserver(ee);return W.observe(_),()=>W.disconnect()},[e,he.isActive,n.length,b,O.direction]);const ge=a.useCallback(()=>{const _=window.matchMedia("(max-width: 768px)").matches,ee=Ua(me.color);_&&!s&&ee>.9&&(document.body.style.backgroundColor=""),M(!0),j.current=!0;const W=J=>{J.target===q.current&&J.animationName&&(q.current&&le.current&&q.current.removeEventListener("animationend",le.current),le.current=null,j.current&&(j.current=!1,t()),M(!1))};q.current&&(le.current=W,q.current.addEventListener("animationend",W))},[t,me.color,s]),pe=(_,ee,W)=>{var J,Z;if(_){if(Q.type==="click"&&Q.switch==="image")Q.repeat==="close"&&$===n.length-1?ge():(J=f.current)==null||J.go("+1");else if(Q.type==="click"&&Q.switch==="50/50"){const ce=_.getBoundingClientRect(),ue=ee-ce.left,ve=W-ce.top,Le=ce.width,G=ce.height;let de;O.direction==="horiz"?de=ue<Le/2?"-1":"+1":de=ve<G/2?"-1":"+1",(Z=f.current)==null||Z.go(de)}}},oe=_=>{if(H.current){H.current=!1;return}const ee=n[$],W=(ee==null?void 0:ee.image.objectFit)==="cover";let J,Z;if("changedTouches"in _&&_.changedTouches.length>0)J=_.changedTouches[0].clientX,Z=_.changedTouches[0].clientY;else if("clientX"in _)J=_.clientX,Z=_.clientY;else return;let ce;if(W&&A.current){const ue=Ka(A.current);ce=J>=ue.left&&J<=ue.right&&Z>=ue.top&&Z<=ue.bottom}else{const ue=A.current?Kr(A.current):null;if(!ue){_.target===_.currentTarget&&ge();return}ce=J>=ue.x&&J<=ue.x+ue.width&&Z>=ue.y&&Z<=ue.y+ue.height}ce?pe(A.current,J,Z):ge()},Se=_=>{const ee=_.target;(ee.classList.contains(Re.thumbsWrapper)||ee.classList.contains(Re.thumbsContainer))&&oe(_)};a.useEffect(()=>{if(!e)return;const _=ee=>{var W,J;if(ee.key==="Escape"){ge();return}if(ee.key==="ArrowRight"){T(Z=>(Z+1)%Math.max(n.length,1)),(W=f.current)==null||W.go("+1");return}ee.key==="ArrowLeft"&&(T(Z=>(Z-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[e,ge,n.length]),a.useEffect(()=>{if(e){if(T(0),k(ee=>ee+1),j.current=!1,M(!1),P(!1),X({}),!be)return;const _=new CustomEvent("page-overlay",{detail:{itemId:be}});window.dispatchEvent(_)}return()=>{q.current&&le.current&&(q.current.removeEventListener("animationend",le.current),le.current=null),P(!1)}},[e,be]),a.useEffect(()=>{R.current!==null&&R.current!==O.type&&k(_=>_+1),R.current=O.type},[O.type]),a.useEffect(()=>{if(!e)return;const _=document.body.style.overflow,ee=window.matchMedia("(max-width: 768px)").matches,W=Ua(me.color);document.body.style.overflow="hidden",P(!1);const J=ce=>{ce.target===q.current&&!j.current&&ce.animationName&&(ee&&!s&&W>.9&&(document.body.style.backgroundColor=me.color),P(!0),q.current&&Y.current&&q.current.removeEventListener("animationend",Y.current),Y.current=null)};q.current&&(Y.current=J,q.current.addEventListener("animationend",J));const Z=ce=>{const ue=ce.target;ue&&(ue.closest(`.${Re.thumbsWrapper}`)||ue.closest(`.${Re.thumbsContainer}`))||O.type!=="slide"&&ce.preventDefault()};return document.addEventListener("touchmove",Z,{passive:!1}),()=>{document.body.style.overflow=_,document.removeEventListener("touchmove",Z),q.current&&Y.current&&(q.current.removeEventListener("animationend",Y.current),Y.current=null),P(!1)}},[e,s,me.color,O.type]),a.useEffect(()=>{if(!e)return;const _=ee=>{var J,Z;if(j.current){ee.stopPropagation();return}if(H.current){H.current=!1;return}const W=ee.target;if(!(W&&(W.closest(`.${Re.thumbsContainer}`)||W.closest(`.${Re.thumbItem}`)||W.closest(`.${Re.arrow}`)||W.closest(`.${Re.closeButton}`)||W.closest(`.${Re.caption}`)))){if(O.type==="slide"&&Q.type==="drag"&&((Z=(J=f.current)==null?void 0:J.splide)!=null&&Z.root)){const ce=f.current.splide.root;if(W&&(ce.contains(W)||ce===W))return}if(ee.touches.length===0&&ee.changedTouches.length>0){const ce=n[$],ue=(ce==null?void 0:ce.image.objectFit)==="cover",ve=ee.changedTouches[0];let Le;if(ue&&A.current){const G=Ka(A.current);Le=ve.clientX>=G.left&&ve.clientX<=G.right&&ve.clientY>=G.top&&ve.clientY<=G.bottom}else{const G=A.current?Kr(A.current):null;if(!G)return;Le=ve.clientX>=G.x&&ve.clientX<=G.x+G.width&&ve.clientY>=G.y&&ve.clientY<=G.y+G.height}if(!Le){ee.stopPropagation(),j.current=!0;const G=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",G,!0)};document.addEventListener("click",G,!0),ge()}}}};return document.addEventListener("touchend",_,{passive:!0}),()=>{document.removeEventListener("touchend",_)}},[e,ge,$,n]);const Ie=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&Q.type==="drag";a.useEffect(()=>{var de,Ee;if(!e||!Ie||!((Ee=(de=f.current)==null?void 0:de.splide)!=null&&Ee.root))return;const _=f.current.splide.root,ee=30,W=(te,ie)=>{if(z.current){const Fe=Math.abs(te-z.current.x),We=Math.abs(ie-z.current.y);(Fe>0||We>0)&&(H.current=!0)}},J=te=>{z.current&&(te.preventDefault(),W(te.clientX,te.clientY))},Z=te=>{z.current&&te.touches.length>0&&(te.preventDefault(),W(te.touches[0].clientX,te.touches[0].clientY))},ce=(te,ie)=>{if(!z.current||!f.current){z.current=null;return}const Fe=Math.abs(te-z.current.x),We=Math.abs(ie-z.current.y);We>ee&&We>Fe&&f.current.go(ie<z.current.y?"+1":"-1"),z.current=null},ue=te=>{z.current&&ce(te.clientX,te.clientY),document.removeEventListener("pointerup",ue),document.removeEventListener("pointercancel",ue),document.removeEventListener("pointermove",J)},ve=te=>{if(z.current){if(te.changedTouches.length>0){const ie=te.changedTouches[0];ce(ie.clientX,ie.clientY)}document.removeEventListener("touchend",ve),document.removeEventListener("touchcancel",ve),document.removeEventListener("touchmove",Z)}},Le=te=>{z.current={x:te.clientX,y:te.clientY},H.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ue),document.addEventListener("pointercancel",ue)},G=te=>{te.touches.length>0&&(z.current={x:te.touches[0].clientX,y:te.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",Z,{passive:!1}),document.addEventListener("touchend",ve),document.addEventListener("touchcancel",ve))};return _.addEventListener("pointerdown",Le),_.addEventListener("touchstart",G),()=>{_.removeEventListener("pointerdown",Le),_.removeEventListener("touchstart",G),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ue),document.removeEventListener("pointercancel",ue),document.removeEventListener("touchmove",Z),document.removeEventListener("touchend",ve),document.removeEventListener("touchcancel",ve),z.current=null,H.current=!1}},[e,Ie,I]);const fe={backgroundColor:me.color,backdropFilter:`blur(${me.blur}px)`,animationDuration:`${parseInt(K.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Wi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:q,className:it(Re.background,N?ye:ne,{[Re.editor]:s},{[Re.hidden]:!e}),style:{...fe,...B&&!s&&!N?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?q:null,className:it(Re.contentStyle,N?U:ke,{[Re.editor]:s},{[Re.hidden]:!e}),style:{animationDuration:`${parseInt(K.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(va,{onMove:_=>T(_.index),ref:f,className:Re.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:Q.type==="drag"&&!Ie,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:Q.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((_,ee)=>{const W=$o(we.position,we.offset,s),J=`${y.scalingValue(we.padding.top,s)} ${y.scalingValue(we.padding.right,s)} ${y.scalingValue(we.padding.bottom,s)} ${y.scalingValue(we.padding.left,s)}`,Z=O.type==="scale"?(()=>{const{transform:ce,...ue}=W;return{...ue,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ce||"none"}})():{...W,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(xa,{children:r.jsx("div",{className:Re.imgWrapper,onClick:oe,children:r.jsx("img",{ref:ee===$?A:null,className:it(Re.imageStyle,{[Re.contain]:_.image.objectFit==="contain",[Re.cover]:_.image.objectFit==="cover",[Re.scaleSlide]:O.type==="scale"}),src:_.image.url,alt:_.image.name??"",style:{...Z,pointerEvents:_.image.objectFit==="contain"?"none":"auto"}})})},ee)})},I),g.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:it(Re.arrow,{[Re.arrowVertical]:O.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:Re.arrowInner,style:{transform:`translate(${y.scalingValue(g.offset.x,s)}, ${y.scalingValue(g.offset.y*(O.direction==="horiz"?1:-1),s)}) scale(${g.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=f.current)==null?void 0:_.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&r.jsx(cn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:it(Re.arrowImg,Re.mirror)}),!g.arrowsImgUrl&&r.jsx(Xa,{color:g.color,className:it(Re.arrowIcon,Re.arrowImg,Re.mirror)})]})}),r.jsx("div",{className:it(Re.arrow,Re.nextArrow,{[Re.arrowVertical]:O.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:Re.arrowInner,style:{transform:`translate(${y.scalingValue(g.offset.x*(O.direction==="horiz"?-1:1),s)}, ${y.scalingValue(g.offset.y,s)}) scale(${g.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=f.current)==null?void 0:_.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&r.jsx(cn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Re.arrowImg}),!g.arrowsImgUrl&&r.jsx(Xa,{color:g.color,className:it(Re.arrowIcon,Re.arrowImg)})]})})]}),me.closeIconUrl&&(()=>{const _=$o(me.closeIconAlign,me.closeIconOffset,s),ee=`scale(${me.closeIconScale})`,W=_.transform?`${_.transform} ${ee}`:ee;return r.jsx("button",{className:Re.closeButton,style:{..._,transform:W},onClick:ge,"aria-label":"Close lightbox",children:r.jsx(cn,{url:me.closeIconUrl,fill:me.closeIconColor??"#000000",hoverFill:me.closeIconHover??"#cccccc"})})})(),ae&&ae.isActive&&i.imageCaption&&((xe=n[$])==null?void 0:xe.imageCaption)&&r.jsx("div",{className:Re.caption,style:{...$o(ae.alignment,ae.offset,s),fontFamily:sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,s),letterSpacing:y.scalingValue(m,s),wordSpacing:y.scalingValue(w,s),textAlign:v,fontSize:y.scalingValue(C.fontSize,s),lineHeight:y.scalingValue(C.lineHeight,s),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:x},onClick:_=>_.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Re.captionTextInner,style:{"--link-color":ae.linkColor,"--link-hover-color":ae.linkHoverColor},children:r.jsx(Ti,{content:n[$].imageCaption})})}),he.isActive&&(()=>{const[_,ee]=he.position.split("-"),W=O.direction==="horiz"?`${_}-left`:he.position,J=$o(W,he.offset,s),Z=()=>{if(O.direction==="horiz"){if(ee==="left")return"flex-start";if(ee==="center")return"center";if(ee==="right")return"flex-end"}else{if(_==="top")return"flex-start";if(_==="middle")return"center";if(_==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:L,className:Re.thumbsWrapper,onClick:ce=>Se(ce),style:{position:s?"absolute":"fixed",...J,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:it(Re.thumbsContainer,{[Re.thumbsContainerVertical]:O.direction==="vert",[Re.thumbsAlignStart]:he.align==="start",[Re.thumbsAlignCenter]:he.align==="center",[Re.thumbsAlignEnd]:he.align==="end"}),style:{gap:y.scalingValue(he.grid.gap,s),justifyContent:E?"flex-start":Z()},children:n.map((ce,ue)=>{const ve=ue===$,Le=b[ue],de=he.grid.size*(ve?he.activeState.scale:1),Ee=()=>{if(he.fit!=="fit")return{};if(!Le)return O.direction==="horiz"?{height:y.scalingValue(de,s)}:{width:y.scalingValue(de,s)};const te=Le.width/Le.height;if(O.direction==="horiz"){const ie=de,Fe=ie*te;return{width:y.scalingValue(Fe,s),height:y.scalingValue(ie,s)}}else{const ie=de,Fe=ie/te;return{width:y.scalingValue(ie,s),height:y.scalingValue(Fe,s)}}};return r.jsx("button",{className:Re.thumbItem,style:{...O.direction==="horiz"&&he.fit!=="fit"?{height:y.scalingValue(de,s)}:{},...O.direction==="vert"&&he.fit!=="fit"?{width:y.scalingValue(de,s)}:{},...he.fit==="cover"?{width:y.scalingValue(de,s),height:y.scalingValue(de,s)}:{},...Ee(),transition:ve?"all 0.25s ease-out":"none",opacity:ve?he.activeState.opacity/100:he.opacity/100,"--thumb-hover":he.activeState.opacity/100},onClick:te=>{var ie;te.stopPropagation(),T(ue),(ie=f.current)==null||ie.go(ue)},onMouseEnter:()=>{var te;he.triggers==="hov"&&((te=f.current)==null||te.go(ue))},children:r.jsx("img",{src:ce.image.url,alt:ce.image.name??"",onLoad:te=>{const ie=te.currentTarget;ie.naturalWidth&&ie.naturalHeight&&X(Fe=>({...Fe,[ue]:{width:ie.naturalWidth,height:ie.naturalHeight}}))},style:{objectFit:he.fit==="cover"?"cover":"contain",...he.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...he.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ce.image.name}-${ue}`)})})})})()]})]}),document.getElementById(l))};function Xa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Qu={element:Ju,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.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",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:{url:{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:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},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:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},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:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},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:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",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"]}};function So(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ep(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function tp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:v=[],buttonLabel:w,gap:C,fieldsGap:h,buttonCorners:x,buttonStroke:$,buttonPadding:T,isButtonFullWidth:I,inputCorners:k,inputStroke:H,inputPadding:M,inputColor:B,inputTextColor:P,inputBorderColor:b,placeholderColor:G,buttonColor:f,buttonTextColor:R,buttonBorderColor:A,labelTextColor:j,successColor:K,errorColor:le,fontFamily:X,inputFontSettings:z,inputFontSize:_,inputLineHeight:L,inputLetterSpacing:E,inputWordSpacing:D,inputTextAppearance:U,buttonFontSettings:Q,buttonFontSize:O,buttonLineHeight:ge,buttonLetterSpacing:g,buttonWordSpacing:he,buttonTextAppearance:se,labelFontSettings:ve,labelFontSize:Ee,labelLineHeight:oe,labelLetterSpacing:xe,labelWordSpacing:Y,labelTextAppearance:be,statusFontSettings:me,statusFontSize:ue,statusLineHeight:re,statusLetterSpacing:Le,statusWordSpacing:Ce,statusTextAppearance:fe,successMessage:$e,errorMessage:N,stateOverrides:te}=e,W=u==="B",J=v.slice(0,Math.min(m,v.length)),Z={fontSettings:{fontFamily:X,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:_??.01,lineHeight:L,letterSpacing:E??0,wordSpacing:D??0,textAppearance:U,color:P},ce=ln(Kt(Z,t)),pe=y.scalingValue(H??0,t),ye=y.scalingValue((L??_??.01)+((M==null?void 0:M.top)??0)+((M==null?void 0:M.bottom)??0)+(u==="C"?H??0:(H??0)*2),t),Ie={...ce,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(k??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pe,borderLeftWidth:0}:{borderWidth:pe},paddingTop:y.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:y.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:y.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:y.scalingValue((M==null?void 0:M.left)??0,t),height:ye,minHeight:ye},q={fontSettings:{fontFamily:X,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ge,letterSpacing:g??0,wordSpacing:he??0,textAppearance:se,color:R},de=ln(Kt(q,t)),Me=y.scalingValue($??0,t),ee={fontSettings:{fontFamily:X,fontWeight:(ve==null?void 0:ve.fontWeight)??400,fontStyle:(ve==null?void 0:ve.fontStyle)??"normal"},fontSize:Ee??.01,lineHeight:oe,letterSpacing:xe??0,wordSpacing:Y??0,textAppearance:be,color:j},ne=Kt(ee,t),Fe={fontSettings:{fontFamily:X,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:ue??.01,lineHeight:re,letterSpacing:Le??0,wordSpacing:Ce??0,textAppearance:fe,color:K},We=ln(Kt(Fe,t)),qe=y.buildColorVars(c,{inputColor:B,inputTextColor:P,inputBorderColor:b,placeholderColor:G!=null&&G.trim()?G:"#cccccc",buttonColor:f,buttonTextColor:R,buttonBorderColor:A,labelTextColor:j,successColor:K,errorColor:le},np,ip,te),[Ze,ct]=a.useState(()=>Object.fromEntries(J.map(ze=>[ze.name,""]))),[pt,Xe]=a.useState("idle"),[vt,$t]=a.useState(null),et=l==="success"?"success":l==="error"?"error":pt,je=l==="error"?N:vt,dt=l==="filled",mt=a.useMemo(()=>{if(!dt)return Ze;let ze=null;for(const Qe of J)(Ze[Qe.name]??"").trim().length>0||(ze=ze??{...Ze},ze[Qe.name]="Filled");return ze??Ze},[Ze,dt,J]),ot=et==="error"?y.getFormFieldValidationError(J,mt):null,Ht=`${l&&l!=="default"?`${c}-state-${l}`:""}`.trim(),tt=o==null?void 0:o.submitUrl,At=(ze,Qe)=>{ct(He=>({...He,[ze]:Qe}))},It=async ze=>{if(ze.preventDefault(),!d)return;const Qe=Object.fromEntries(J.map(st=>{var St;return[st.name,((St=Ze[st.name])==null?void 0:St.trim())??""]}).filter(([,st])=>st));if(!tt){Xe("error"),$t("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const He=y.getFormFieldValidationError(J,Ze);if(He){Xe("error"),$t(He);return}Xe("submitting"),$t(null);try{const st=await fetch(tt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!st.ok){const St=await st.text();throw new Error(St||`Request failed: ${st.status}`)}Xe("success"),ct(Object.fromEntries(J.map(St=>[St.name,""])))}catch(st){Xe("error"),$t(st instanceof Error?st.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ht}`.trim(),style:qe,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ep(c)}}),r.jsxs("form",{onSubmit:It,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:J.map((ze,Qe)=>r.jsxs(a.Fragment,{children:[Qe>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${c}-control`:void 0,style:{height:y.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${W?` ${c}-labeled`:""}`,children:[W&&r.jsx("span",{className:`${c}-field-label`,style:ne?{...ne,lineHeight:ne.fontSize}:void 0,children:ze.label||ze.name}),ze.type==="textarea"?r.jsx("textarea",{name:ze.name,autoComplete:"off",value:mt[ze.name]??"",onChange:He=>At(ze.name,He.target.value),placeholder:ze.placeholder,className:`${c}-input`,style:Ie,rows:1,"data-filled":dt||(mt[ze.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:ze.type==="phone"?"tel":ze.type==="email"?"email":"text",name:ze.name,autoComplete:"off",value:mt[ze.name]??"",onChange:He=>At(ze.name,He.target.value),placeholder:ze.placeholder,required:ze.isRequired??ze.type==="email",className:`${c}-input`,style:Ie,"data-filled":dt||(mt[ze.name]??"").trim().length>0})]})]},Qe))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${c}-control`:void 0,style:{height:y.scalingValue(C??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(x??0,t),borderWidth:Me,paddingTop:y.scalingValue((T==null?void 0:T.top)??0,t),paddingRight:y.scalingValue((T==null?void 0:T.right)??0,t),paddingBottom:y.scalingValue((T==null?void 0:T.bottom)??0,t),paddingLeft:y.scalingValue((T==null?void 0:T.left)??0,t),pointerEvents:d?"auto":void 0,...de,...I?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:I?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:pt==="submitting"?"...":w})})})]}),et==="success"&&r.jsx("p",{className:`${c}-success`,style:{...We},children:$e}),et==="error"&&r.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:ot??je??N})]})}const np={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},ip=["hover","focus","filled","success","error"],op=`import React, { useMemo, useState } from 'react';
158
+ `}function tp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:v=[],buttonLabel:w,gap:C,fieldsGap:h,buttonCorners:x,buttonStroke:$,buttonPadding:T,isButtonFullWidth:I,inputCorners:k,inputStroke:N,inputPadding:M,inputColor:B,inputTextColor:P,inputBorderColor:b,placeholderColor:X,buttonColor:f,buttonTextColor:R,buttonBorderColor:A,labelTextColor:j,successColor:q,errorColor:le,fontFamily:Y,inputFontSettings:z,inputFontSize:H,inputLineHeight:L,inputLetterSpacing:E,inputWordSpacing:D,inputTextAppearance:K,buttonFontSettings:Q,buttonFontSize:O,buttonLineHeight:he,buttonLetterSpacing:g,buttonWordSpacing:me,buttonTextAppearance:ae,labelFontSettings:we,labelFontSize:ke,labelLineHeight:ne,labelLetterSpacing:ye,labelWordSpacing:U,labelTextAppearance:be,statusFontSettings:ge,statusFontSize:pe,statusLineHeight:oe,statusLetterSpacing:Se,statusWordSpacing:Ie,statusTextAppearance:fe,successMessage:xe,errorMessage:_,stateOverrides:ee}=e,W=u==="B",J=v.slice(0,Math.min(m,v.length)),Z={fontSettings:{fontFamily:Y,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:H??.01,lineHeight:L,letterSpacing:E??0,wordSpacing:D??0,textAppearance:K,color:P},ce=ln(Kt(Z,t)),ue=y.scalingValue(N??0,t),ve=y.scalingValue((L??H??.01)+((M==null?void 0:M.top)??0)+((M==null?void 0:M.bottom)??0)+(u==="C"?N??0:(N??0)*2),t),Le={...ce,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(k??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ue,borderLeftWidth:0}:{borderWidth:ue},paddingTop:y.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:y.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:y.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:y.scalingValue((M==null?void 0:M.left)??0,t),height:ve,minHeight:ve},G={fontSettings:{fontFamily:Y,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:O??.01,lineHeight:he,letterSpacing:g??0,wordSpacing:me??0,textAppearance:ae,color:R},de=ln(Kt(G,t)),Ee=y.scalingValue($??0,t),te={fontSettings:{fontFamily:Y,fontWeight:(we==null?void 0:we.fontWeight)??400,fontStyle:(we==null?void 0:we.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:ne,letterSpacing:ye??0,wordSpacing:U??0,textAppearance:be,color:j},ie=Kt(te,t),Fe={fontSettings:{fontFamily:Y,fontWeight:(ge==null?void 0:ge.fontWeight)??400,fontStyle:(ge==null?void 0:ge.fontStyle)??"normal"},fontSize:pe??.01,lineHeight:oe,letterSpacing:Se??0,wordSpacing:Ie??0,textAppearance:fe,color:q},We=ln(Kt(Fe,t)),qe=y.buildColorVars(c,{inputColor:B,inputTextColor:P,inputBorderColor:b,placeholderColor:X!=null&&X.trim()?X:"#cccccc",buttonColor:f,buttonTextColor:R,buttonBorderColor:A,labelTextColor:j,successColor:q,errorColor:le},np,ip,ee),[Ze,ct]=a.useState(()=>Object.fromEntries(J.map(ze=>[ze.name,""]))),[pt,Xe]=a.useState("idle"),[vt,$t]=a.useState(null),et=l==="success"?"success":l==="error"?"error":pt,je=l==="error"?_:vt,dt=l==="filled",mt=a.useMemo(()=>{if(!dt)return Ze;let ze=null;for(const Qe of J)(Ze[Qe.name]??"").trim().length>0||(ze=ze??{...Ze},ze[Qe.name]="Filled");return ze??Ze},[Ze,dt,J]),ot=et==="error"?y.getFormFieldValidationError(J,mt):null,Ht=`${l&&l!=="default"?`${c}-state-${l}`:""}`.trim(),tt=o==null?void 0:o.submitUrl,At=(ze,Qe)=>{ct(He=>({...He,[ze]:Qe}))},It=async ze=>{if(ze.preventDefault(),!d)return;const Qe=Object.fromEntries(J.map(st=>{var St;return[st.name,((St=Ze[st.name])==null?void 0:St.trim())??""]}).filter(([,st])=>st));if(!tt){Xe("error"),$t("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const He=y.getFormFieldValidationError(J,Ze);if(He){Xe("error"),$t(He);return}Xe("submitting"),$t(null);try{const st=await fetch(tt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!st.ok){const St=await st.text();throw new Error(St||`Request failed: ${st.status}`)}Xe("success"),ct(Object.fromEntries(J.map(St=>[St.name,""])))}catch(st){Xe("error"),$t(st instanceof Error?st.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ht}`.trim(),style:qe,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ep(c)}}),r.jsxs("form",{onSubmit:It,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:J.map((ze,Qe)=>r.jsxs(a.Fragment,{children:[Qe>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${c}-control`:void 0,style:{height:y.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${W?` ${c}-labeled`:""}`,children:[W&&r.jsx("span",{className:`${c}-field-label`,style:ie?{...ie,lineHeight:ie.fontSize}:void 0,children:ze.label||ze.name}),ze.type==="textarea"?r.jsx("textarea",{name:ze.name,autoComplete:"off",value:mt[ze.name]??"",onChange:He=>At(ze.name,He.target.value),placeholder:ze.placeholder,className:`${c}-input`,style:Le,rows:1,"data-filled":dt||(mt[ze.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:ze.type==="phone"?"tel":ze.type==="email"?"email":"text",name:ze.name,autoComplete:"off",value:mt[ze.name]??"",onChange:He=>At(ze.name,He.target.value),placeholder:ze.placeholder,required:ze.isRequired??ze.type==="email",className:`${c}-input`,style:Le,"data-filled":dt||(mt[ze.name]??"").trim().length>0})]})]},Qe))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${c}-control`:void 0,style:{height:y.scalingValue(C??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(x??0,t),borderWidth:Ee,paddingTop:y.scalingValue((T==null?void 0:T.top)??0,t),paddingRight:y.scalingValue((T==null?void 0:T.right)??0,t),paddingBottom:y.scalingValue((T==null?void 0:T.bottom)??0,t),paddingLeft:y.scalingValue((T==null?void 0:T.left)??0,t),pointerEvents:d?"auto":void 0,...de,...I?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:I?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:pt==="submitting"?"...":w})})})]}),et==="success"&&r.jsx("p",{className:`${c}-success`,style:{...We},children:xe}),et==="error"&&r.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:ot??je??_})]})}const np={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},ip=["hover","focus","filled","success","error"],op=`import React, { useMemo, useState } from 'react';
159
159
  import { CommonComponentProps } from '../props';
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
980
980
  font-size: ${To(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const dp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=y.useScopedStyles(),s=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:v,inputFontSettings:w,inputFontSize:C,inputLineHeight:h,inputLetterSpacing:x,inputWordSpacing:$,inputTextAppearance:T,buttonFontSettings:I,buttonFontSize:k,buttonLineHeight:H,buttonLetterSpacing:M,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:b,statusFontSize:G,statusLineHeight:f,statusLetterSpacing:R,statusWordSpacing:A,statusTextAppearance:j,iconMaxWidth:K,minHeight:le,corners:X,stroke:z,stateOverrides:_,inputPadding:L,buttonPadding:E,successMessage:D="Thanks for subscribing!",errorMessage:U="Please, fill all required fields."}=e,Q=d.slice(0,Math.min(m,d.length)),[O,ge]=a.useState(()=>Object.fromEntries(Q.map(ee=>[ee.name,""]))),[g,he]=a.useState("idle"),[se,ve]=a.useState(null),Ee=o==="success"?"success":o==="error"?"error":g,oe=o==="error"?U:se,xe=o==="filled",Y=a.useMemo(()=>{if(!xe)return O;let ee=null;for(const ne of Q)(O[ne.name]??"").trim().length>0||(ee=ee??{...O},ee[ne.name]="Filled");return ee??O},[xe,O,Q]),be=Ee==="error"?y.getFormFieldValidationError(Q,Y):null,me=o&&o!=="default"?`${l}-state-${o}`:"",ue=Q.some(ee=>(Y[ee.name]??"").trim().length>0),re=me!==`${l}-state-filled`&&ue?`${l}-state-filled`:"",Le=`${me} ${re}`.trim(),Ce=i==null?void 0:i.submitUrl,fe=u??"",$e=(c==null?void 0:c.icon)??"",N=(c==null?void 0:c.mode)==="On",te=fe||"Submit",W={fontSettings:{fontFamily:v,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:C??.01,lineHeight:h,letterSpacing:x??0,wordSpacing:$??0,textAppearance:T,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:v,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:k??.01,lineHeight:H,letterSpacing:M??0,wordSpacing:B??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:v,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:G??.01,lineHeight:f,letterSpacing:R??0,wordSpacing:A??0,textAppearance:j,color:e.successColor??"#22c55e"},ce=ln(Kt(W,t)),pe=ln(Kt(J,t)),ye=ln(Kt(Z,t)),Ie=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(W==null?void 0:W.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},up,pp,_),q={borderRadius:y.scalingValue(X,t),borderWidth:y.scalingValue(z,t),borderStyle:"solid"},de={borderLeftWidth:y.scalingValue(z,t)},Me=async ee=>{if(ee.preventDefault(),!s)return;const ne=Object.fromEntries(Q.map(We=>{var qe;return[We.name,((qe=O[We.name])==null?void 0:qe.trim())??""]}).filter(([,We])=>We));if(!Ce){he("error"),ve("No integrations were found for this form.");return}if(Object.keys(ne).length===0)return;const Fe=y.getFormFieldValidationError(Q,O);if(Fe){he("error"),ve(Fe);return}he("submitting"),ve(null);try{const We=await fetch(Ce,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)});if(!We.ok){const qe=await We.text();throw new Error(qe||`Request failed: ${We.status}`)}he("success"),ge(Object.fromEntries(Q.map(qe=>[qe.name,""])))}catch(We){he("error"),ve(We instanceof Error?We.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${Le}`.trim(),style:Ie,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:cp(l)}}),r.jsxs("form",{onSubmit:Me,className:`${l}-form`,style:{...q,height:y.scalingValue(le,t),minHeight:y.scalingValue(le,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Q.map(ee=>r.jsx("input",{type:ee.type==="email"?"email":ee.type==="phone"?"tel":"text",name:ee.name,autoComplete:"off",value:Y[ee.name]??"",onChange:ne=>ge(Fe=>({...Fe,[ee.name]:ne.target.value})),placeholder:ee.placeholder,required:ee.isRequired??ee.type==="email",className:`${l}-input`,style:{...ce,paddingRight:y.scalingValue(L.right,t),paddingLeft:y.scalingValue(L.left,t),paddingTop:y.scalingValue(L.top,t),paddingBottom:y.scalingValue(L.bottom,t)}},ee.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":te,style:{...pe,...de,paddingRight:y.scalingValue(E.right,t),paddingLeft:y.scalingValue(E.left,t),paddingTop:y.scalingValue(E.top,t),paddingBottom:y.scalingValue(E.bottom,t),pointerEvents:s?"auto":void 0},children:g==="submitting"?"...":N?$e&&r.jsx(cn,{url:$e,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):fe})})]}),Ee==="success"&&r.jsx("p",{className:`${l}-success`,style:{...ye},children:D}),Ee==="error"&&r.jsx("p",{className:`${l}-error`,style:{...ye},role:"alert",children:be??oe??U})]})},up={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},pp=["hover","focus","filled","success","error"],mp=`import React, { useMemo, useState } from 'react';
983
+ `}const dp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=y.useScopedStyles(),s=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:v,inputFontSettings:w,inputFontSize:C,inputLineHeight:h,inputLetterSpacing:x,inputWordSpacing:$,inputTextAppearance:T,buttonFontSettings:I,buttonFontSize:k,buttonLineHeight:N,buttonLetterSpacing:M,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:b,statusFontSize:X,statusLineHeight:f,statusLetterSpacing:R,statusWordSpacing:A,statusTextAppearance:j,iconMaxWidth:q,minHeight:le,corners:Y,stroke:z,stateOverrides:H,inputPadding:L,buttonPadding:E,successMessage:D="Thanks for subscribing!",errorMessage:K="Please, fill all required fields."}=e,Q=d.slice(0,Math.min(m,d.length)),[O,he]=a.useState(()=>Object.fromEntries(Q.map(te=>[te.name,""]))),[g,me]=a.useState("idle"),[ae,we]=a.useState(null),ke=o==="success"?"success":o==="error"?"error":g,ne=o==="error"?K:ae,ye=o==="filled",U=a.useMemo(()=>{if(!ye)return O;let te=null;for(const ie of Q)(O[ie.name]??"").trim().length>0||(te=te??{...O},te[ie.name]="Filled");return te??O},[ye,O,Q]),be=ke==="error"?y.getFormFieldValidationError(Q,U):null,ge=o&&o!=="default"?`${l}-state-${o}`:"",pe=Q.some(te=>(U[te.name]??"").trim().length>0),oe=ge!==`${l}-state-filled`&&pe?`${l}-state-filled`:"",Se=`${ge} ${oe}`.trim(),Ie=i==null?void 0:i.submitUrl,fe=u??"",xe=(c==null?void 0:c.icon)??"",_=(c==null?void 0:c.mode)==="On",ee=fe||"Submit",W={fontSettings:{fontFamily:v,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:C??.01,lineHeight:h,letterSpacing:x??0,wordSpacing:$??0,textAppearance:T,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:v,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:k??.01,lineHeight:N,letterSpacing:M??0,wordSpacing:B??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:v,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:X??.01,lineHeight:f,letterSpacing:R??0,wordSpacing:A??0,textAppearance:j,color:e.successColor??"#22c55e"},ce=ln(Kt(W,t)),ue=ln(Kt(J,t)),ve=ln(Kt(Z,t)),Le=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(W==null?void 0:W.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},up,pp,H),G={borderRadius:y.scalingValue(Y,t),borderWidth:y.scalingValue(z,t),borderStyle:"solid"},de={borderLeftWidth:y.scalingValue(z,t)},Ee=async te=>{if(te.preventDefault(),!s)return;const ie=Object.fromEntries(Q.map(We=>{var qe;return[We.name,((qe=O[We.name])==null?void 0:qe.trim())??""]}).filter(([,We])=>We));if(!Ie){me("error"),we("No integrations were found for this form.");return}if(Object.keys(ie).length===0)return;const Fe=y.getFormFieldValidationError(Q,O);if(Fe){me("error"),we(Fe);return}me("submitting"),we(null);try{const We=await fetch(Ie,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ie)});if(!We.ok){const qe=await We.text();throw new Error(qe||`Request failed: ${We.status}`)}me("success"),he(Object.fromEntries(Q.map(qe=>[qe.name,""])))}catch(We){me("error"),we(We instanceof Error?We.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${Se}`.trim(),style:Le,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:cp(l)}}),r.jsxs("form",{onSubmit:Ee,className:`${l}-form`,style:{...G,height:y.scalingValue(le,t),minHeight:y.scalingValue(le,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Q.map(te=>r.jsx("input",{type:te.type==="email"?"email":te.type==="phone"?"tel":"text",name:te.name,autoComplete:"off",value:U[te.name]??"",onChange:ie=>he(Fe=>({...Fe,[te.name]:ie.target.value})),placeholder:te.placeholder,required:te.isRequired??te.type==="email",className:`${l}-input`,style:{...ce,paddingRight:y.scalingValue(L.right,t),paddingLeft:y.scalingValue(L.left,t),paddingTop:y.scalingValue(L.top,t),paddingBottom:y.scalingValue(L.bottom,t)}},te.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":ee,style:{...ue,...de,paddingRight:y.scalingValue(E.right,t),paddingLeft:y.scalingValue(E.left,t),paddingTop:y.scalingValue(E.top,t),paddingBottom:y.scalingValue(E.bottom,t),pointerEvents:s?"auto":void 0},children:g==="submitting"?"...":_?xe&&r.jsx(cn,{url:xe,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(q??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):fe})})]}),ke==="success"&&r.jsx("p",{className:`${l}-success`,style:{...ve},children:D}),ke==="error"&&r.jsx("p",{className:`${l}-error`,style:{...ve},role:"alert",children:be??ne??K})]})},up={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},pp=["hover","focus","filled","success","error"],mp=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1685,7 +1685,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1685
1685
  .${e}-image-hover-grayscale:hover img {
1686
1686
  filter: grayscale(100%);
1687
1687
  }
1688
- `}const bp=30,wp=20,$r=3,$p=12,Sp=32,Cp=3,Tp=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Lp=(e,t)=>Array.from({length:t},()=>e).flat(),Ip=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},$l=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Ya=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(s>0)return s;const d=Array.from({length:t},(u,m)=>e.children[m]),c=$l(d);return c<=0?0:c+l*Math.max(0,t-1)},Rp=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=$l(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=Number.parseFloat(o.paddingRight)||0;return i+l*Math.max(0,e.children.length-1)+s},Ep=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Mp=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Ep(i,e))},kp=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:l,isFirstSet:s,scaled:d,onFirstSetImageDone:c})=>{var b,G,f;const u=a.useRef(null);a.useLayoutEffect(()=>{if(!s)return;const R=u.current;R!=null&&R.complete&&(c==null||c())},[s,(b=e.image)==null?void 0:b.url,c]);const m=n.display==="cover",v=n.ratioValue??"1:1",w=n.reversed??!1,[C,h]=v.split(":").map(Number),T=(w?h:C)/(w?C:h),I=i/T,k=I>o?o:I,H=I>o?o*T:i,M=d(H),B=d(k),P=((G=e.image)==null?void 0:G.url)&&r.jsx("img",{ref:u,src:e.image.url,alt:((f=e.image)==null?void 0:f.name)??"",style:m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:s?c:void 0,onError:s?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:M}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...m?{width:M,height:B,overflow:"hidden"}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:P&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:it(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:P}):P})})},Pp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),[s,d]=a.useState(0),c=s>0?Math.round(s):0,u=a.useMemo(()=>xp(l,c),[l,c]),{speed:m,direction:v,pauseOnHover:w,gap:C,imageMaxWidth:h,imageMaxHeight:x,hoverEffect:$}=e,T=a.useMemo(()=>Ip(e.imageFit),[e.imageFit]),I=(t==null?void 0:t.length)??0,k=!!o,H=!n||!!i,M=H&&$!=="off"&&$!=="randomize"?`${l}-image-hover-${$}`:void 0,B=n?!!i:!0,b=((t==null?void 0:t.length)??0)>0&&(B||!!n),G=Math.max(0,m)*bp,f=ue=>y.scalingValue(ue,n??!1),R=a.useRef(null),A=a.useRef(null),j=a.useRef(null),[K,le]=a.useState(0),X=B&&w==="on",[z,_]=a.useState(!1),[L,E]=a.useState({}),D=a.useRef(L);D.current=L;const U=a.useRef(null),Q=a.useRef(0),O=a.useRef(null),ge=a.useMemo(()=>(t??[]).map(ue=>{var re;return((re=ue.image)==null?void 0:re.url)??""}).join("\0"),[t]),[g,he]=a.useState($r),se=a.useMemo(()=>{const ue=t??[];return ue.length===0||!(B||!!n)?ue:Lp(ue,g)},[t,B,g,n]),ve=a.useMemo(()=>(t??[]).filter(ue=>{var re;return!!((re=ue.image)!=null&&re.url)}).length,[t]),Ee=b?Cp:1;a.useLayoutEffect(()=>{Q.current=0,E({}),U.current=null,he($r),d(0)},[ge]),a.useEffect(()=>{if(!H||$!=="randomize")return;const ue=R.current;if(!ue)return;const re=$e=>{E(N=>{const te=Array.from($e).filter(J=>J in N&&!Mp(ue,J));if(te.length===0)return N;const W={...N};return te.forEach(J=>{delete W[J]}),W})},Le=new IntersectionObserver($e=>{const N=new Set;for(const te of $e){const W=te.target.dataset.marqueeItemIndex,J=W!==void 0?Number(W):NaN;Number.isNaN(J)||N.add(J)}N.size>0&&re(N)},{root:ue,threshold:0});Object.keys(L).forEach($e=>{const N=Number($e);ue.querySelectorAll(`[data-marquee-item-index="${N}"]`).forEach(te=>Le.observe(te))});const Ce={current:0},fe=()=>{const $e=Object.keys(D.current);$e.length!==0&&(re($e.map(Number)),Ce.current=requestAnimationFrame(fe))};return Object.keys(D.current).length>0&&(Ce.current=requestAnimationFrame(fe)),()=>{cancelAnimationFrame(Ce.current),Le.disconnect()}},[$,L,H]),a.useLayoutEffect(()=>{if(!b)return;const ue=R.current,re=j.current;if(!ue||!re)return;const Le={current:0},Ce=()=>{const N=ue.getBoundingClientRect().width||ue.offsetWidth,te=Rp(re),W=U.current,J=typeof W=="number"&&Math.abs(W-te)<=.25;U.current=te;let Z=g,ce=0;if((B||n)&&I>0&&N>0){const Ie=Ya(re,I);if(Ie>=Sp){ce=Ie;const q=Math.min($p,Math.max($r,Math.ceil(N/Ie)+1));Z=q,q!==g&&he(q)}}const ye=Z!==g&&ce>0?ce*Z:te>0?te:ce>0?ce*Z:(()=>{const Ie=Ya(re,I);return Ie>0?Ie*Z:0})();ye>0?d(Ie=>Ie<=0?ye:!J||Math.round(Ie)===Math.round(ye)?Ie:ye):!J&&s<=0&&(cancelAnimationFrame(Le.current),Le.current=requestAnimationFrame(Ce))},fe=()=>{cancelAnimationFrame(Le.current),Le.current=requestAnimationFrame(Ce)};O.current=fe,fe();const $e=new ResizeObserver(fe);return $e.observe(ue),$e.observe(re),()=>{O.current=null,cancelAnimationFrame(Le.current),$e.disconnect()}},[B,b,s,ge,g,I,n]),a.useLayoutEffect(()=>{if(!b||c<=0)return;const ue=A.current;ue&&Tp(ue)},[b,c,v,G]),a.useLayoutEffect(()=>{if(!b||s<=0){le(0);return}const ue=A.current,re=j.current;if(!ue||!re)return;const Le=()=>{const fe=ue.offsetHeight||ue.getBoundingClientRect().height,$e=Array.from(re.children).reduce((te,W)=>Math.max(te,W.offsetHeight||W.getBoundingClientRect().height),0),N=fe>0?fe:$e;le(N>0?N:0)};Le();const Ce=new ResizeObserver(Le);return Ce.observe(ue),Ce.observe(re),()=>Ce.disconnect()},[b,Ee,se,n,C,h,x,s,T,L]),a.useLayoutEffect(()=>{if(!n||!k||!b||typeof window>"u")return;const ue=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(ue)},[n,k,b,v,s,K,C,se]);const oe=()=>{X&&_(!0)},xe=()=>{X&&_(!1)},Y=a.useCallback(()=>{var ue;Q.current=Math.min(ve,Q.current+1),(ue=O.current)==null||ue.call(O)},[ve]),be=a.useCallback((ue,re)=>{E(Le=>{const Ce=Le[ue]??re,fe=(t??[]).filter(N=>N!==Ce);if(fe.length===0)return Le;const $e=fe[Math.floor(Math.random()*fe.length)];return{...Le,[ue]:$e}})},[t]),me=(ue,re,Le,Ce)=>{const fe=H&&$==="randomize"&&T.display==="cover"?L[Le]??ue:ue,$e=`max(${f(C)}, ${wp}px)`,N=`calc(-0.5 * (${$e} + ${f(C)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":Le,onMouseEnter:H&&$==="randomize"&&T.display==="cover"?()=>be(Le,ue):void 0,children:[r.jsx(kp,{item:fe,prefix:l,imageFit:T,imageMaxWidth:h,imageMaxHeight:x,imageHoverClass:M,isEditor:n,isFirstSet:Ce,scaled:f,onFirstSetImageDone:Y}),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:N,width:$e,height:"100%"}})]},`${re}-${Le}`)};if(b){const ue=B?X&&z?"paused":"running":"paused",re=c>0&&G>0?c/G*1e3:0,Le=`${Math.max(0,re)/1e3}s`;return r.jsxs("div",{ref:R,className:it(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:K>0?{height:K}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":v,onMouseEnter:oe,onMouseLeave:xe,style:{WebkitAnimationDuration:Le,animationDuration:Le,WebkitAnimationPlayState:ue,animationPlayState:ue},children:Array.from({length:Ee},(Ce,fe)=>r.jsx("div",{ref:fe===0?j:void 0,className:it(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:f(C),paddingRight:f(C)},"aria-hidden":fe>0,children:se.map(($e,N)=>me($e,fe,N,fe===0&&N<I))},`set-${fe}`))})]})}return r.jsxs("div",{ref:R,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:it(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:f(C),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((ue,re)=>me(ue,0,re))},"marquee-static")]})},Ap=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1688
+ `}const bp=30,wp=20,$r=3,$p=12,Sp=32,Cp=3,Tp=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Lp=(e,t)=>Array.from({length:t},()=>e).flat(),Ip=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},$l=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Ya=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(s>0)return s;const d=Array.from({length:t},(u,m)=>e.children[m]),c=$l(d);return c<=0?0:c+l*Math.max(0,t-1)},Rp=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=$l(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=Number.parseFloat(o.paddingRight)||0;return i+l*Math.max(0,e.children.length-1)+s},Ep=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Mp=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Ep(i,e))},kp=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:l,isFirstSet:s,scaled:d,onFirstSetImageDone:c})=>{var b,X,f;const u=a.useRef(null);a.useLayoutEffect(()=>{if(!s)return;const R=u.current;R!=null&&R.complete&&(c==null||c())},[s,(b=e.image)==null?void 0:b.url,c]);const m=n.display==="cover",v=n.ratioValue??"1:1",w=n.reversed??!1,[C,h]=v.split(":").map(Number),T=(w?h:C)/(w?C:h),I=i/T,k=I>o?o:I,N=I>o?o*T:i,M=d(N),B=d(k),P=((X=e.image)==null?void 0:X.url)&&r.jsx("img",{ref:u,src:e.image.url,alt:((f=e.image)==null?void 0:f.name)??"",style:m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:s?c:void 0,onError:s?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:M}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...m?{width:M,height:B,overflow:"hidden"}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:P&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:it(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:P}):P})})},Pp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),[s,d]=a.useState(0),c=s>0?Math.round(s):0,u=a.useMemo(()=>xp(l,c),[l,c]),{speed:m,direction:v,pauseOnHover:w,gap:C,imageMaxWidth:h,imageMaxHeight:x,hoverEffect:$}=e,T=a.useMemo(()=>Ip(e.imageFit),[e.imageFit]),I=(t==null?void 0:t.length)??0,k=!!o,N=!n||!!i,M=N&&$!=="off"&&$!=="randomize"?`${l}-image-hover-${$}`:void 0,B=n?!!i:!0,b=((t==null?void 0:t.length)??0)>0&&(B||!!n),X=Math.max(0,m)*bp,f=pe=>y.scalingValue(pe,n??!1),R=a.useRef(null),A=a.useRef(null),j=a.useRef(null),[q,le]=a.useState(0),Y=B&&w==="on",[z,H]=a.useState(!1),[L,E]=a.useState({}),D=a.useRef(L);D.current=L;const K=a.useRef(null),Q=a.useRef(0),O=a.useRef(null),he=a.useMemo(()=>(t??[]).map(pe=>{var oe;return((oe=pe.image)==null?void 0:oe.url)??""}).join("\0"),[t]),[g,me]=a.useState($r),ae=a.useMemo(()=>{const pe=t??[];return pe.length===0||!(B||!!n)?pe:Lp(pe,g)},[t,B,g,n]),we=a.useMemo(()=>(t??[]).filter(pe=>{var oe;return!!((oe=pe.image)!=null&&oe.url)}).length,[t]),ke=b?Cp:1;a.useLayoutEffect(()=>{Q.current=0,E({}),K.current=null,me($r),d(0)},[he]),a.useEffect(()=>{if(!N||$!=="randomize")return;const pe=R.current;if(!pe)return;const oe=xe=>{E(_=>{const ee=Array.from(xe).filter(J=>J in _&&!Mp(pe,J));if(ee.length===0)return _;const W={..._};return ee.forEach(J=>{delete W[J]}),W})},Se=new IntersectionObserver(xe=>{const _=new Set;for(const ee of xe){const W=ee.target.dataset.marqueeItemIndex,J=W!==void 0?Number(W):NaN;Number.isNaN(J)||_.add(J)}_.size>0&&oe(_)},{root:pe,threshold:0});Object.keys(L).forEach(xe=>{const _=Number(xe);pe.querySelectorAll(`[data-marquee-item-index="${_}"]`).forEach(ee=>Se.observe(ee))});const Ie={current:0},fe=()=>{const xe=Object.keys(D.current);xe.length!==0&&(oe(xe.map(Number)),Ie.current=requestAnimationFrame(fe))};return Object.keys(D.current).length>0&&(Ie.current=requestAnimationFrame(fe)),()=>{cancelAnimationFrame(Ie.current),Se.disconnect()}},[$,L,N]),a.useLayoutEffect(()=>{if(!b)return;const pe=R.current,oe=j.current;if(!pe||!oe)return;const Se={current:0},Ie=()=>{const _=pe.getBoundingClientRect().width||pe.offsetWidth,ee=Rp(oe),W=K.current,J=typeof W=="number"&&Math.abs(W-ee)<=.25;K.current=ee;let Z=g,ce=0;if((B||n)&&I>0&&_>0){const Le=Ya(oe,I);if(Le>=Sp){ce=Le;const G=Math.min($p,Math.max($r,Math.ceil(_/Le)+1));Z=G,G!==g&&me(G)}}const ve=Z!==g&&ce>0?ce*Z:ee>0?ee:ce>0?ce*Z:(()=>{const Le=Ya(oe,I);return Le>0?Le*Z:0})();ve>0?d(Le=>Le<=0?ve:!J||Math.round(Le)===Math.round(ve)?Le:ve):!J&&s<=0&&(cancelAnimationFrame(Se.current),Se.current=requestAnimationFrame(Ie))},fe=()=>{cancelAnimationFrame(Se.current),Se.current=requestAnimationFrame(Ie)};O.current=fe,fe();const xe=new ResizeObserver(fe);return xe.observe(pe),xe.observe(oe),()=>{O.current=null,cancelAnimationFrame(Se.current),xe.disconnect()}},[B,b,s,he,g,I,n]),a.useLayoutEffect(()=>{if(!b||c<=0)return;const pe=A.current;pe&&Tp(pe)},[b,c,v,X]),a.useLayoutEffect(()=>{if(!b||s<=0){le(0);return}const pe=A.current,oe=j.current;if(!pe||!oe)return;const Se=()=>{const fe=pe.offsetHeight||pe.getBoundingClientRect().height,xe=Array.from(oe.children).reduce((ee,W)=>Math.max(ee,W.offsetHeight||W.getBoundingClientRect().height),0),_=fe>0?fe:xe;le(_>0?_:0)};Se();const Ie=new ResizeObserver(Se);return Ie.observe(pe),Ie.observe(oe),()=>Ie.disconnect()},[b,ke,ae,n,C,h,x,s,T,L]),a.useLayoutEffect(()=>{if(!n||!k||!b||typeof window>"u")return;const pe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(pe)},[n,k,b,v,s,q,C,ae]);const ne=()=>{Y&&H(!0)},ye=()=>{Y&&H(!1)},U=a.useCallback(()=>{var pe;Q.current=Math.min(we,Q.current+1),(pe=O.current)==null||pe.call(O)},[we]),be=a.useCallback((pe,oe)=>{E(Se=>{const Ie=Se[pe]??oe,fe=(t??[]).filter(_=>_!==Ie);if(fe.length===0)return Se;const xe=fe[Math.floor(Math.random()*fe.length)];return{...Se,[pe]:xe}})},[t]),ge=(pe,oe,Se,Ie)=>{const fe=N&&$==="randomize"&&T.display==="cover"?L[Se]??pe:pe,xe=`max(${f(C)}, ${wp}px)`,_=`calc(-0.5 * (${xe} + ${f(C)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":Se,onMouseEnter:N&&$==="randomize"&&T.display==="cover"?()=>be(Se,pe):void 0,children:[r.jsx(kp,{item:fe,prefix:l,imageFit:T,imageMaxWidth:h,imageMaxHeight:x,imageHoverClass:M,isEditor:n,isFirstSet:Ie,scaled:f,onFirstSetImageDone:U}),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:_,width:xe,height:"100%"}})]},`${oe}-${Se}`)};if(b){const pe=B?Y&&z?"paused":"running":"paused",oe=c>0&&X>0?c/X*1e3:0,Se=`${Math.max(0,oe)/1e3}s`;return r.jsxs("div",{ref:R,className:it(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:q>0?{height:q}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":v,onMouseEnter:ne,onMouseLeave:ye,style:{WebkitAnimationDuration:Se,animationDuration:Se,WebkitAnimationPlayState:pe,animationPlayState:pe},children:Array.from({length:ke},(Ie,fe)=>r.jsx("div",{ref:fe===0?j:void 0,className:it(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:f(C),paddingRight:f(C)},"aria-hidden":fe>0,children:ae.map((xe,_)=>ge(xe,fe,_,fe===0&&_<I))},`set-${fe}`))})]})}return r.jsxs("div",{ref:R,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:it(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:f(C),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((pe,oe)=>ge(pe,0,oe))},"marquee-static")]})},Ap=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1689
1689
  import cn from 'classnames';
1690
1690
  import { CommonComponentProps } from '../props';
1691
1691
  import { scalingValue } from '../utils/scalingValue';
@@ -2498,7 +2498,7 @@ type MarqueeProps = {
2498
2498
  pointer-events: auto;
2499
2499
  z-index: 10;
2500
2500
  }
2501
- `}const _p=30,Za=2,Np=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),{align:s,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:v,corners:w,stroke:C,strokeColor:h,bgColor:x,padding:$,logoMarginTop:T,logoWidth:I,logoHeight:k,captionMarginTop:H}=e,M=!!o,B=((t==null?void 0:t.length)??0)>0,P=d>0&&(!n||i),b=B&&(P||n),G=Math.max(0,d)*_p,f=W=>y.scalingValue(W,n??!1),R=a.useRef(null),A=a.useRef(null),j=a.useRef(null),[K,le]=a.useState(0),[X,z]=a.useState(0),[_,L]=a.useState(0),E=P&&u==="on",[D,U]=a.useState(!1),Q=a.useRef(null),[O,ge]=a.useState(0),[g,he]=a.useState(0),se=a.useRef(null),ve=W=>{var Z,ce,pe,ye,Ie;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${W}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((ce=e==null?void 0:e[`${W}FontSettings`])==null?void 0:ce.fontStyle)??"normal"},textAppearance:{textTransform:((pe=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:pe.textTransform)??"none",textDecoration:((ye=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:ye.textDecoration)??"none",fontVariant:((Ie=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:Ie.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},Ee=ve("text"),oe=ve("caption"),xe=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(W=>{var J,Z;return(((J=W.text)==null?void 0:J.length)??0)>0||(((Z=W.caption)==null?void 0:Z.length)??0)>0}),[t]),Y=a.useMemo(()=>!b||(t==null?void 0:t.length)===0?1:X<=0||K<=0?Za:Math.max(Za,Math.ceil(K/X)+1),[b,t==null?void 0:t.length,X,K]);a.useLayoutEffect(()=>{if(!b)return;const W=R.current,J=j.current;if(!W||!J)return;let Z=0;const ce=()=>{const Ie=W.getBoundingClientRect().width,q=J.getBoundingClientRect().width,de=se.current,Me=typeof de=="number"&&Math.abs(de-q)<=.25;if(se.current=q,le(Ie),typeof q=="number"&&q>0&&X<=0){z(q);return}Me&&q!==X?z(q):!Me&&X<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(ce))},pe=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(ce)};pe();const ye=new ResizeObserver(pe);return ye.observe(W),ye.observe(J),()=>{cancelAnimationFrame(Z),ye.disconnect()}},[P,b,X]),a.useLayoutEffect(()=>{const W=A.current;if(!b||!W)return;const J=X>0?X:0,Z=J>0&&G>0?J/G*1e3:0,ce=`${Math.max(0,Z)/1e3}s`;W.style.setProperty("--marquee-distance",`${J}px`),W.style.setProperty("--marquee-duration",ce)},[P,b,G,X]),a.useLayoutEffect(()=>{if(!b){L(0);return}const W=j.current,J=A.current;if(!W||!J)return;const Z=()=>{let pe=0;for(let ye=0;ye<W.children.length;ye++){const q=W.children[ye].firstElementChild;q&&(pe=Math.max(pe,q.offsetHeight))}pe<=0&&(pe=J.offsetHeight),L(pe>0?pe:0)};Z();const ce=new ResizeObserver(Z);return ce.observe(W),ce.observe(J),()=>{ce.disconnect()}},[b,Y,t,n,m,v,$,C,w,I,k,O,g]);const be=()=>{E&&U(!0)},me=()=>{E&&U(!1)},ue=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),re=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Le=a.useCallback((W,J,Z,ce)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ue,width:"100%"},children:[r.jsx("div",{"data-controls":M?ce==null?void 0:ce.controlsName:void 0,"data-controls-axis":M?"y":void 0,className:M?`${l}-control`:void 0,style:{height:f((ce==null?void 0:ce.marginTop)??0)}}),r.jsx("div",{...ce!=null&&ce.dataMeasureKind?{"data-testimonial-measure":ce.dataMeasureKind}:{},style:{...Kt(W,n),textAlign:re,pointerEvents:"auto",...typeof(ce==null?void 0:ce.minHeightPx)=="number"&&ce.minHeightPx>0?{minHeight:ce.minHeightPx}:{}},children:r.jsx(Ti,{content:J})})]},Z),[ue,re,n,M,l,f]),Ce=a.useCallback((W,J,Z)=>{var ce,pe,ye;return r.jsxs("div",{style:{padding:`${f($.top)} ${f($.right)} ${f($.bottom)} ${f($.left)}`,width:f(v+C*2),height:"100%",borderRadius:f(w),border:`${f(C)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:x}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:ue,textAlign:re},children:[W.text&&Le(Ee,W.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ue,width:"100%"},children:[r.jsx("div",{"data-controls":M&&!(Z!=null&&Z.dataMeasureAttrs)?"logoMarginTop":void 0,className:M&&!(Z!=null&&Z.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:f(T)}}),r.jsx("div",{style:{width:f(I),height:f(k)},children:((ce=W.logo)==null?void 0:ce.url)&&r.jsx("img",{src:W.logo.url,alt:((pe=W.logo)==null?void 0:pe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ye=W.logo)==null?void 0:ye.objectFit)||"contain"}})})]}),W.caption&&Le(oe,W.caption,"caption",{...Z!=null&&Z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:H,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},J)},[x,H,oe,v,w,k,T,I,ue,re,$.bottom,$.left,$.right,$.top,Le,C,h,Ee,n,M,l]),fe=a.useCallback(W=>{ge(W.maxTextPx),he(W.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!xe){fe({maxTextPx:0,maxCaptionPx:0});return}const W=Q.current;if(!W)return;const J=()=>{y.readTestimonialTextMeasure(W,fe)};J();const Z=new ResizeObserver(J);return Z.observe(W),()=>{Z.disconnect()}},[xe,fe,t,Ce]);const $e=xe?{textMinHeightPx:O,captionMinHeightPx:g}:void 0,N=xe?r.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((W,J)=>Ce(W,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,te=(W,J)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ce(W,`card-${J}`,$e),M&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);if(b){const W=P?E&&D?"paused":"running":"paused";return r.jsxs("div",{ref:R,className:it(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",..._>0?{height:_}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ja(l)}}),N,r.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":c,onMouseEnter:be,onMouseLeave:me,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":W},children:Array.from({length:Y},(J,Z)=>r.jsx("div",{ref:Z===0?j:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(m),paddingRight:f(m)},"aria-hidden":Z>0,children:t==null?void 0:t.map((ce,pe)=>te(ce,`${Z}-${pe}`))},`set-${Z}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ja(l)}}),N,r.jsx("div",{style:{gap:f(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((W,J)=>te(W,J))})]})},Hp=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2501
+ `}const _p=30,Za=2,Np=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),{align:s,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:v,corners:w,stroke:C,strokeColor:h,bgColor:x,padding:$,logoMarginTop:T,logoWidth:I,logoHeight:k,captionMarginTop:N}=e,M=!!o,B=((t==null?void 0:t.length)??0)>0,P=d>0&&(!n||i),b=B&&(P||n),X=Math.max(0,d)*_p,f=W=>y.scalingValue(W,n??!1),R=a.useRef(null),A=a.useRef(null),j=a.useRef(null),[q,le]=a.useState(0),[Y,z]=a.useState(0),[H,L]=a.useState(0),E=P&&u==="on",[D,K]=a.useState(!1),Q=a.useRef(null),[O,he]=a.useState(0),[g,me]=a.useState(0),ae=a.useRef(null),we=W=>{var Z,ce,ue,ve,Le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${W}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((ce=e==null?void 0:e[`${W}FontSettings`])==null?void 0:ce.fontStyle)??"normal"},textAppearance:{textTransform:((ue=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:ue.textTransform)??"none",textDecoration:((ve=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:ve.textDecoration)??"none",fontVariant:((Le=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:Le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},ke=we("text"),ne=we("caption"),ye=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(W=>{var J,Z;return(((J=W.text)==null?void 0:J.length)??0)>0||(((Z=W.caption)==null?void 0:Z.length)??0)>0}),[t]),U=a.useMemo(()=>!b||(t==null?void 0:t.length)===0?1:Y<=0||q<=0?Za:Math.max(Za,Math.ceil(q/Y)+1),[b,t==null?void 0:t.length,Y,q]);a.useLayoutEffect(()=>{if(!b)return;const W=R.current,J=j.current;if(!W||!J)return;let Z=0;const ce=()=>{const Le=W.getBoundingClientRect().width,G=J.getBoundingClientRect().width,de=ae.current,Ee=typeof de=="number"&&Math.abs(de-G)<=.25;if(ae.current=G,le(Le),typeof G=="number"&&G>0&&Y<=0){z(G);return}Ee&&G!==Y?z(G):!Ee&&Y<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(ce))},ue=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(ce)};ue();const ve=new ResizeObserver(ue);return ve.observe(W),ve.observe(J),()=>{cancelAnimationFrame(Z),ve.disconnect()}},[P,b,Y]),a.useLayoutEffect(()=>{const W=A.current;if(!b||!W)return;const J=Y>0?Y:0,Z=J>0&&X>0?J/X*1e3:0,ce=`${Math.max(0,Z)/1e3}s`;W.style.setProperty("--marquee-distance",`${J}px`),W.style.setProperty("--marquee-duration",ce)},[P,b,X,Y]),a.useLayoutEffect(()=>{if(!b){L(0);return}const W=j.current,J=A.current;if(!W||!J)return;const Z=()=>{let ue=0;for(let ve=0;ve<W.children.length;ve++){const G=W.children[ve].firstElementChild;G&&(ue=Math.max(ue,G.offsetHeight))}ue<=0&&(ue=J.offsetHeight),L(ue>0?ue:0)};Z();const ce=new ResizeObserver(Z);return ce.observe(W),ce.observe(J),()=>{ce.disconnect()}},[b,U,t,n,m,v,$,C,w,I,k,O,g]);const be=()=>{E&&K(!0)},ge=()=>{E&&K(!1)},pe=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),oe=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Se=a.useCallback((W,J,Z,ce)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:pe,width:"100%"},children:[r.jsx("div",{"data-controls":M?ce==null?void 0:ce.controlsName:void 0,"data-controls-axis":M?"y":void 0,className:M?`${l}-control`:void 0,style:{height:f((ce==null?void 0:ce.marginTop)??0)}}),r.jsx("div",{...ce!=null&&ce.dataMeasureKind?{"data-testimonial-measure":ce.dataMeasureKind}:{},style:{...Kt(W,n),textAlign:oe,pointerEvents:"auto",...typeof(ce==null?void 0:ce.minHeightPx)=="number"&&ce.minHeightPx>0?{minHeight:ce.minHeightPx}:{}},children:r.jsx(Ti,{content:J})})]},Z),[pe,oe,n,M,l,f]),Ie=a.useCallback((W,J,Z)=>{var ce,ue,ve;return r.jsxs("div",{style:{padding:`${f($.top)} ${f($.right)} ${f($.bottom)} ${f($.left)}`,width:f(v+C*2),height:"100%",borderRadius:f(w),border:`${f(C)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:x}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:pe,textAlign:oe},children:[W.text&&Se(ke,W.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:pe,width:"100%"},children:[r.jsx("div",{"data-controls":M&&!(Z!=null&&Z.dataMeasureAttrs)?"logoMarginTop":void 0,className:M&&!(Z!=null&&Z.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:f(T)}}),r.jsx("div",{style:{width:f(I),height:f(k)},children:((ce=W.logo)==null?void 0:ce.url)&&r.jsx("img",{src:W.logo.url,alt:((ue=W.logo)==null?void 0:ue.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ve=W.logo)==null?void 0:ve.objectFit)||"contain"}})})]}),W.caption&&Se(ne,W.caption,"caption",{...Z!=null&&Z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},J)},[x,N,ne,v,w,k,T,I,pe,oe,$.bottom,$.left,$.right,$.top,Se,C,h,ke,n,M,l]),fe=a.useCallback(W=>{he(W.maxTextPx),me(W.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ye){fe({maxTextPx:0,maxCaptionPx:0});return}const W=Q.current;if(!W)return;const J=()=>{y.readTestimonialTextMeasure(W,fe)};J();const Z=new ResizeObserver(J);return Z.observe(W),()=>{Z.disconnect()}},[ye,fe,t,Ie]);const xe=ye?{textMinHeightPx:O,captionMinHeightPx:g}:void 0,_=ye?r.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((W,J)=>Ie(W,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,ee=(W,J)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ie(W,`card-${J}`,xe),M&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);if(b){const W=P?E&&D?"paused":"running":"paused";return r.jsxs("div",{ref:R,className:it(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ja(l)}}),_,r.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":c,onMouseEnter:be,onMouseLeave:ge,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":W},children:Array.from({length:U},(J,Z)=>r.jsx("div",{ref:Z===0?j:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(m),paddingRight:f(m)},"aria-hidden":Z>0,children:t==null?void 0:t.map((ce,ue)=>ee(ce,`${Z}-${ue}`))},`set-${Z}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ja(l)}}),_,r.jsx("div",{style:{gap:f(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((W,J)=>ee(W,J))})]})},Hp=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2502
2502
  import cn from 'classnames';
2503
2503
  import { CommonComponentProps } from '../props';
2504
2504
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3237,7 +3237,7 @@ type TestimonialsSettings = {
3237
3237
  width: 100%;
3238
3238
  height: 100%;
3239
3239
  }
3240
- `}const zp=3e3,Dp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),s=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:v,captionMarginTop:w,imageWidth:C,imageHeight:h,controlsWidth:x,controlsColor:$,controlsHoverColor:T}=e,I=d>0&&(!n||!!i),[k,H]=a.useState(0),[M,B]=a.useState(null),[P,b]=a.useState(!1),G=a.useRef(null),f=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),R=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{H(0),B(null),b(!1)},[s.length]);const A=s[k],j=M===null?null:s[M],K=oe=>{var Y,be,me,ue,re;return{fontSettings:{fontFamily:(e==null?void 0:e[`${oe}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((be=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:be.fontStyle)??"normal"},textAppearance:{textTransform:((me=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:me.textTransform)??"none",textDecoration:((ue=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:ue.textDecoration)??"none",fontVariant:((re=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:re.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${oe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${oe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${oe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${oe}WordSpacing`])??0,color:(e==null?void 0:e[`${oe}Color`])??"#000000"}},le=K("text"),X=K("caption"),z=s.length>1&&s.some(oe=>{var xe,Y;return(((xe=oe.text)==null?void 0:xe.length)??0)>0||(((Y=oe.caption)==null?void 0:Y.length)??0)>0}),_=a.useRef(null),[L,E]=a.useState(0),[D,U]=a.useState(0),Q=e.controls??{mode:"Off",icon:null},O=s.length>1,ge=a.useCallback((oe,xe)=>!O||xe===oe?oe:(G.current&&window.clearTimeout(G.current),B(oe),b(!0),G.current=window.setTimeout(()=>{B(null),b(!1),G.current=null},300),xe),[O]),g=a.useCallback(()=>{O&&H(oe=>ge(oe,(oe-1+s.length)%s.length))},[O,ge,s.length]),he=a.useCallback(()=>{O&&H(oe=>ge(oe,(oe+1)%s.length))},[O,ge,s.length]);a.useEffect(()=>{if(!I||!O)return;const oe=Math.max(300,zp/d),xe=window.setInterval(()=>{H(Y=>ge(Y,(Y+1)%s.length))},oe);return()=>{window.clearInterval(xe)}},[I,O,ge,s.length,d]),a.useEffect(()=>()=>{G.current&&window.clearTimeout(G.current)},[]);const se=(oe,xe)=>{var re,Le,Ce,fe;const Y=xe==null?void 0:xe.textMinHeightPx,be=xe==null?void 0:xe.captionMinHeightPx,me=xe==null?void 0:xe.dataMeasureAttrs,ue=o&&!(xe!=null&&xe.dataMeasureAttrs)&&!(xe!=null&&xe.hideControls);return r.jsxs(r.Fragment,{children:[oe.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ue?"textMarginTop":void 0,className:ue?`${l}-control`:void 0,style:{height:y.scalingValue(v??0,n??!1)}}),r.jsx("div",{...me&&{"data-testimonial-measure":"text"},style:{...Kt(le,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(Ti,{content:oe.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ue?"imageMarginTop":void 0,className:ue?`${l}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(C??0,n??!1),height:y.scalingValue(h??0,n??!1)},children:((re=oe.image)==null?void 0:re.url)&&r.jsx("img",{src:(Le=oe.image)==null?void 0:Le.url,alt:((Ce=oe.image)==null?void 0:Ce.name)??"",className:`${l}-icon`,style:{objectFit:((fe=oe.image)==null?void 0:fe.objectFit)||"contain"}})})]}),oe.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":ue?"captionMarginTop":void 0,className:ue?`${l}-control`:void 0,style:{height:y.scalingValue(w??0,n??!1)}}),r.jsx("div",{...me?{"data-testimonial-measure":"caption"}:{},style:{...Kt(X,n),...be&&be>0?{minHeight:be}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(Ti,{content:oe.caption})})]})]})},ve=a.useCallback(oe=>{E(oe.maxTextPx),U(oe.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!z){ve({maxTextPx:0,maxCaptionPx:0});return}const oe=_.current;if(!oe)return;const xe=()=>{y.readTestimonialTextMeasure(oe,ve)};xe();const Y=new ResizeObserver(xe);return Y.observe(oe),()=>{Y.disconnect()}},[z,ve,t]),!A)return r.jsx(r.Fragment,{});const Ee=z?{textMinHeightPx:L,captionMinHeightPx:D}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jp(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:f},children:[z&&r.jsx("div",{ref:_,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((oe,xe)=>r.jsx("div",{style:{width:"100%"},children:se(oe,{dataMeasureAttrs:!0})},xe))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[j&&P&&r.jsx("div",{className:it(`${l}-fade-item-prev`,`${l}-fade-out`),children:se(j,{...Ee,hideControls:!0})}),r.jsx("div",{className:it(`${l}-fade-item-current`,P?`${l}-fade-in`:void 0),children:se(A,Ee)})]})]}),Q.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(x??.02,n??!1),height:y.scalingValue(x??.02,n??!1),"--arrow-hover-color":T},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:g,disabled:!O,"aria-label":"Previous testimonial",children:Q.icon&&r.jsx(cn,{url:Q.icon,fill:$,hoverFill:T,className:it(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:it(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(x??.02,n??!1),height:y.scalingValue(x??.02,n??!1),"--arrow-hover-color":T},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:he,disabled:!O,"aria-label":"Next testimonial",children:Q.icon&&r.jsx(cn,{url:Q.icon,fill:$,hoverFill:T,className:`${l}-arrow-img`})})})]})]})})},Vp=`import cn from 'classnames';
3240
+ `}const zp=3e3,Dp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),s=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:v,captionMarginTop:w,imageWidth:C,imageHeight:h,controlsWidth:x,controlsColor:$,controlsHoverColor:T}=e,I=d>0&&(!n||!!i),[k,N]=a.useState(0),[M,B]=a.useState(null),[P,b]=a.useState(!1),X=a.useRef(null),f=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),R=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{N(0),B(null),b(!1)},[s.length]);const A=s[k],j=M===null?null:s[M],q=ne=>{var U,be,ge,pe,oe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ne}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((be=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:be.fontStyle)??"normal"},textAppearance:{textTransform:((ge=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:ge.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((oe=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:oe.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ne}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ne}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ne}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ne}WordSpacing`])??0,color:(e==null?void 0:e[`${ne}Color`])??"#000000"}},le=q("text"),Y=q("caption"),z=s.length>1&&s.some(ne=>{var ye,U;return(((ye=ne.text)==null?void 0:ye.length)??0)>0||(((U=ne.caption)==null?void 0:U.length)??0)>0}),H=a.useRef(null),[L,E]=a.useState(0),[D,K]=a.useState(0),Q=e.controls??{mode:"Off",icon:null},O=s.length>1,he=a.useCallback((ne,ye)=>!O||ye===ne?ne:(X.current&&window.clearTimeout(X.current),B(ne),b(!0),X.current=window.setTimeout(()=>{B(null),b(!1),X.current=null},300),ye),[O]),g=a.useCallback(()=>{O&&N(ne=>he(ne,(ne-1+s.length)%s.length))},[O,he,s.length]),me=a.useCallback(()=>{O&&N(ne=>he(ne,(ne+1)%s.length))},[O,he,s.length]);a.useEffect(()=>{if(!I||!O)return;const ne=Math.max(300,zp/d),ye=window.setInterval(()=>{N(U=>he(U,(U+1)%s.length))},ne);return()=>{window.clearInterval(ye)}},[I,O,he,s.length,d]),a.useEffect(()=>()=>{X.current&&window.clearTimeout(X.current)},[]);const ae=(ne,ye)=>{var oe,Se,Ie,fe;const U=ye==null?void 0:ye.textMinHeightPx,be=ye==null?void 0:ye.captionMinHeightPx,ge=ye==null?void 0:ye.dataMeasureAttrs,pe=o&&!(ye!=null&&ye.dataMeasureAttrs)&&!(ye!=null&&ye.hideControls);return r.jsxs(r.Fragment,{children:[ne.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"textMarginTop":void 0,className:pe?`${l}-control`:void 0,style:{height:y.scalingValue(v??0,n??!1)}}),r.jsx("div",{...ge&&{"data-testimonial-measure":"text"},style:{...Kt(le,n),...U&&U>0?{minHeight:U}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(Ti,{content:ne.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"imageMarginTop":void 0,className:pe?`${l}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(C??0,n??!1),height:y.scalingValue(h??0,n??!1)},children:((oe=ne.image)==null?void 0:oe.url)&&r.jsx("img",{src:(Se=ne.image)==null?void 0:Se.url,alt:((Ie=ne.image)==null?void 0:Ie.name)??"",className:`${l}-icon`,style:{objectFit:((fe=ne.image)==null?void 0:fe.objectFit)||"contain"}})})]}),ne.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"captionMarginTop":void 0,className:pe?`${l}-control`:void 0,style:{height:y.scalingValue(w??0,n??!1)}}),r.jsx("div",{...ge?{"data-testimonial-measure":"caption"}:{},style:{...Kt(Y,n),...be&&be>0?{minHeight:be}:{},textAlign:R,pointerEvents:"auto"},children:r.jsx(Ti,{content:ne.caption})})]})]})},we=a.useCallback(ne=>{E(ne.maxTextPx),K(ne.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!z){we({maxTextPx:0,maxCaptionPx:0});return}const ne=H.current;if(!ne)return;const ye=()=>{y.readTestimonialTextMeasure(ne,we)};ye();const U=new ResizeObserver(ye);return U.observe(ne),()=>{U.disconnect()}},[z,we,t]),!A)return r.jsx(r.Fragment,{});const ke=z?{textMinHeightPx:L,captionMinHeightPx:D}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jp(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:f},children:[z&&r.jsx("div",{ref:H,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((ne,ye)=>r.jsx("div",{style:{width:"100%"},children:ae(ne,{dataMeasureAttrs:!0})},ye))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[j&&P&&r.jsx("div",{className:it(`${l}-fade-item-prev`,`${l}-fade-out`),children:ae(j,{...ke,hideControls:!0})}),r.jsx("div",{className:it(`${l}-fade-item-current`,P?`${l}-fade-in`:void 0),children:ae(A,ke)})]})]}),Q.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(x??.02,n??!1),height:y.scalingValue(x??.02,n??!1),"--arrow-hover-color":T},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:g,disabled:!O,"aria-label":"Previous testimonial",children:Q.icon&&r.jsx(cn,{url:Q.icon,fill:$,hoverFill:T,className:it(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:it(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(x??.02,n??!1),height:y.scalingValue(x??.02,n??!1),"--arrow-hover-color":T},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:me,disabled:!O,"aria-label":"Next testimonial",children:Q.icon&&r.jsx(cn,{url:Q.icon,fill:$,hoverFill:T,className:`${l}-arrow-img`})})})]})]})})},Vp=`import cn from 'classnames';
3241
3241
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3242
3242
  import { CommonComponentProps } from '../props';
3243
3243
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4075,7 +4075,7 @@ type TestimonialsSettings = {
4075
4075
  pointer-events: auto;
4076
4076
  z-index: 10;
4077
4077
  }
4078
- `}const Ln=500,Yp=750,Zn="cubic-bezier(0.22, 1, 0.36, 1)",Jp=72,Zp=50;function Qp(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function em(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function tm(e){const[t]=e.media;return t!=null&&t.url?t:null}function nm(e){return!Array.isArray(e)||e.length===0?[]:Qp(e)?e.flatMap(t=>{const n=em(t);if(!n)return[];const i=tm(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function qi(e){return e.type==="video"}function im(e){e.pause(),e.removeAttribute("src"),e.load()}function ns({media:e,className:t,style:n,onMediaClick:i}){return qi(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Lo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function om(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function rm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{im(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d,style:i})}function am({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:l,counterClassName:s,counterStyle:d}){const c=n==="cover",u=a.useRef(null),m=a.useRef(null),v=a.useRef(null),w=a.useRef(null),C=a.useRef(0),h=a.useRef(0),x=a.useRef("none"),$=a.useRef(!1),T=a.useRef(!1),I=a.useRef(!1),k=a.useRef(null),[H,M]=a.useState(null),[B,P]=a.useState("opening"),[b,G]=a.useState(0),[f,R]=a.useState(0),[A,j]=a.useState(!1),[K,le]=a.useState(!1),[X,z]=a.useState(!1),_=a.useRef(t),L=e[t],E=L?qi(L):!1,D=f!==0||A,U=a.useCallback(re=>{I.current=re,j(re)},[]),Q=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),O=a.useCallback(()=>{Q(),k.current=window.setTimeout(()=>{Q(),U(!1)},Ln+32)},[Q,U]),ge=a.useCallback(()=>{const re=m.current,Le=v.current;if(!re)return;const Ce=re.getBoundingClientRect(),fe=Ce.width,$e=Ce.height;if(!fe||!$e)return;if(n==="cover"){M({width:fe,height:$e,left:Ce.left,top:Ce.top});return}if(!Le){M(Lo(re));return}const{width:N,height:te}=om(Le);if(!N||!te){M(Lo(re));return}const W=N/te,J=fe/$e;if(W>J){const Z=fe/W;M({width:fe,height:Z,left:Ce.left,top:Ce.top+($e-Z)/2})}else{const Z=$e*W;M({width:Z,height:$e,left:Ce.left+(fe-Z)/2,top:Ce.top})}},[n]);a.useEffect(()=>{ge();const re=m.current;if(!re)return;const Le=new ResizeObserver(()=>ge());return Le.observe(re),()=>Le.disconnect()},[ge,t]),a.useEffect(()=>{B==="opening"&&H&&P("open")},[B,H]),a.useEffect(()=>{if(B!=="closing")return;const re=setTimeout(()=>i(),Ln);return()=>clearTimeout(re)},[B,i]),a.useEffect(()=>()=>{Q()},[Q]),a.useLayoutEffect(()=>{if(_.current===t)return;Q(),G(0),R(0),U(!1),z(!1),le(!1),C.current=0,h.current=0,x.current="none",$.current=!1,w.current=null,T.current=!1;const re=m.current;re&&M(Lo(re)),_.current=t},[t,U,Q]),a.useEffect(()=>{if(B!=="open")return;const re=()=>{const te=W=>{W.stopPropagation(),W.preventDefault(),document.removeEventListener("click",te,!0)};document.addEventListener("click",te,!0)},Le=te=>{Q(),I.current=!1,j(!1),R(0),le(!1),$.current=!1,h.current=0,x.current="none";const W=m.current;W&&M(Lo(W)),te<0?l():o()},Ce=te=>{if(Math.abs(te)>Zp&&e.length>1){Le(te);return}U(!0),R(0),O()},fe=te=>{if(te.touches.length!==1||I.current)return;const W=te.touches[0];T.current=!0,w.current={x:W.clientX,y:W.clientY},x.current="none",h.current=0,$.current=!1},$e=te=>{if(!w.current||te.touches.length!==1||I.current)return;const W=te.touches[0],J=W.clientX-w.current.x,Z=W.clientY-w.current.y;if(x.current==="none"){if(Math.abs(J)<10&&Math.abs(Z)<10)return;if(Math.abs(J)>Math.abs(Z)){if(e.length<=1)return;x.current="horizontal"}else if(Z>0)x.current="vertical";else return}if(x.current==="horizontal"){$.current=!0,le(!0),h.current=J,R(J),te.preventDefault();return}x.current==="vertical"&&($.current=!0,le(!0),C.current=Z,G(Z),te.preventDefault())},N=()=>{if(!w.current)return;const te=x.current,W=$.current;if(W&&te==="horizontal")Ce(h.current),re();else if(W&&te==="vertical"){if(C.current>Jp){const Z=window.innerHeight;C.current=Z,z(!0),G(Z),P("closing")}else C.current=0,G(0);re()}else te==="horizontal"&&Math.abs(h.current)>0&&(Ce(h.current),re());w.current=null,x.current="none",h.current=0,$.current=!1,le(!1)};return document.addEventListener("touchstart",fe,{passive:!0}),document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N),()=>{document.removeEventListener("touchstart",fe),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",N),document.removeEventListener("touchcancel",N)}},[B,e.length,l,o,U,O]),a.useEffect(()=>{const re=Le=>{Le.key==="Escape"&&(Le.preventDefault(),Le.stopPropagation(),B!=="closing"&&P("closing"))};return window.addEventListener("keydown",re,!0),()=>window.removeEventListener("keydown",re,!0)},[B]);const g=()=>{B!=="closing"&&P("closing")},he=B==="open",se=B==="closing",ve=b>0?Math.max(0,1-b/500):1,Ee=b>0?Math.max(.35,1-b/500):1,oe=re=>{if(re.stopPropagation(),T.current){T.current=!1;return}if(e.length<=1)return;const Le=re.currentTarget.getBoundingClientRect(),Ce=re.clientY-Le.top,fe=Math.min(52,Le.height*.2);if(!(Ce>Le.height-fe)){if(re.clientX-Le.left<Le.width/2){o();return}l()}},xe=re=>{if(e.length<=1)return;const Le=re.currentTarget.getBoundingClientRect(),Ce=re.clientX-Le.left,fe=re.clientY-Le.top,$e=Math.min(52,Le.height*.2);if(fe>Le.height-$e){re.currentTarget.style.cursor="default";return}re.currentTarget.style.cursor=Ce<Le.width/2?"w-resize":"e-resize"},Y=a.useCallback(re=>{re.propertyName!=="transform"||!I.current||(Q(),U(!1))},[Q,U]),be=D?`translateX(${f}px)`:b>0?`translateY(${b}px)`:void 0,me={position:"fixed",top:H==null?void 0:H.top,left:H==null?void 0:H.left,width:H==null?void 0:H.width,height:H==null?void 0:H.height,objectFit:n==="cover"?"cover":"contain",transform:be,opacity:b>0?Ee:B==="opening"||se?0:1,transition:K&&!A?"none":A?`transform ${Ln}ms ${Zn}`:X?`transform ${Ln}ms ${Zn}, opacity ${Ln}ms ${Zn}`:B==="opening"||se?`opacity ${Ln}ms ${Zn}`:"none",pointerEvents:E&&he&&!D?"auto":"none",touchAction:E&&he?"none":void 0,zIndex:9998},ue=H?{position:"fixed",top:H.top,height:H.height,width:H.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:u,style:{position:"fixed",top:"var(--cntrl-article-top, 0)",left:"var(--cntrl-article-left, 0)",width:"var(--cntrl-article-width, 100vw) !important",height:"var(--cntrl-viewport-height, 100vh) !important",zIndex:9997,touchAction:B==="open"?"none":void 0},onClick:g,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:he?ve:0,transition:K?"none":`opacity ${Ln}ms ${Zn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:m,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${Ln}ms ${Zn}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:m,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${Ln}ms ${Zn}`},children:e.length>1&&r.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]})}),H&&L&&(E?r.jsx(rm,{src:L.url,phase:B,mediaRef:v,mediaStyle:me,onLoadedMetadata:ge,onClick:oe,onMouseMove:xe,onTransitionEnd:Y},`${t}-${L.url}`):r.jsx("img",{ref:v,src:L.url,alt:L.name,onLoad:ge,onTransitionEnd:Y,style:me},`${t}-${L.url}`)),he&&ue&&e.length>1&&!E&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...ue,left:H.left,cursor:"w-resize",pointerEvents:D?"none":"auto"},onClick:re=>{if(T.current){T.current=!1;return}re.stopPropagation(),o()}}),r.jsx("div",{style:{...ue,left:H.left+H.width/2,cursor:"e-resize",pointerEvents:D?"none":"auto"},onClick:re=>{if(T.current){T.current=!1;return}re.stopPropagation(),l()}})]})]})}function sm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function lm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:v,textBoxWidth:w=100,verticalGap:C,entriesCount:h,lightbox:x,imageDisplay:$,lightboxImageDisplay:T,slider:I,sliderTiming:k,direction:H,transition:M,titleMarginTop:B,subtitleMarginTop:P,titleColor:b,subtitleColor:G,lightboxCounterColor:f,titleFontFamily:R,titleFontSettings:A,titleFontSize:j,titleLineHeight:K,titleLetterSpacing:le,titleWordSpacing:X,titleTextAppearance:z,subtitleFontFamily:_,subtitleFontSettings:L,subtitleFontSize:E,subtitleLineHeight:D,subtitleLetterSpacing:U,subtitleWordSpacing:Q,subtitleTextAppearance:O,lightboxCounterFontFamily:ge,lightboxCounterFontSettings:g,lightboxCounterFontSize:he,lightboxCounterLineHeight:se,lightboxCounterLetterSpacing:ve,lightboxCounterWordSpacing:Ee,lightboxCounterTextAppearance:oe,showText:xe="always",alignEntries:Y="off",align:be="top"}=e,me={fontSettings:{fontFamily:R,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:j??.01,lineHeight:K,letterSpacing:le??0,wordSpacing:X??0,textAppearance:z,color:b},re={...ln(Kt(me,n))},Le={fontSettings:{fontFamily:_,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:E??.01,lineHeight:D,letterSpacing:U??0,wordSpacing:Q??0,textAppearance:O,color:G},fe={...ln(Kt(Le,n))},$e={fontSettings:{fontFamily:ge,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:he??.01,lineHeight:se,letterSpacing:ve??0,wordSpacing:Ee??0,textAppearance:oe,color:f},te={...ln(Kt($e,n)),...Cr(he,se,u,n)},W=Sr(j,K,`${u}-item-title`,`${u}-text-tight-leading`),J=Sr(E,D,`${u}-item-subtitle`,`${u}-text-tight-leading`),Z=Cr(j,K,u,n),ce=Cr(E,D,u,n),pe=Sr(he,se,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ye=y.buildColorVars(u,{titleColor:b,subtitleColor:G,lightboxCounterColor:f},cm,dm),de=`${s&&s!=="default"?`${u}-state-${s}`:""}${xe==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Me=h===0?1/0:h,ee=(t??[]).slice(0,Me),ne=v.entryWidth??.2,Fe=($==null?void 0:$.display)==="cover",We=($==null?void 0:$.ratioValue)??"1:1",qe=($==null?void 0:$.reversed)??!1,[Ze,ct]=We.split(":").map(Number),vt=`${qe?ct:Ze} / ${qe?Ze:ct}`,$t=v.columnsCount,et=y.scalingValue(ne??0,n),je=et,dt=!Fe&&I!=="off",mt=ee.length%$t||$t,ot=mt<$t&&ee.length>0,kt=ee.length-mt,Ht=ot?Math.floor(($t-mt)/2)+1:1,tt={width:je,...Fe?{aspectRatio:vt,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${u}-item-image-wrapper${dt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),It=m==="d"||m==="e"||m==="f",ze=Y==="on",Qe=`calc(${y.scalingValue(ne??0,n)} * (${w} / 100))`,He=y.scalingValue(ne*w/100,n),st=Fe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[St,Ct]=a.useState("ltr"),[Zt,an]=a.useState(0),sn=a.useRef(null);a.useEffect(()=>{const Ne=sn.current;if(!Ne)return;const rt=new ResizeObserver(ke=>{an(Math.round(ke[0].contentRect.width))});return rt.observe(Ne),()=>rt.disconnect()},[]);const ht=(()=>{const Ne={...ye},rt=sn.current?getComputedStyle(sn.current).getPropertyValue("--cntrl-article-width").trim():"";return rt&&(Ne["--cntrl-article-width"]=rt),Ne})(),[Bt,Yt]=a.useState(!1),[Gt,Rt]=a.useState([]),[Qt,Te]=a.useState(0),_e=x==="on"&&(!n||i),De=(Ne,rt)=>{n&&!i||x!=="off"&&(Rt(Ne),Te(rt),Yt(!0))};a.useEffect(()=>{if(!Bt||x!=="on"||typeof document>"u")return;const Ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ne}},[Bt,x]),a.useEffect(()=>{!n||i||Yt(!1)},[n,i]);const Oe=a.useMemo(()=>Xp(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Oe}}),r.jsx("div",{style:ye,children:r.jsx("div",{ref:sn,className:`${u}-wrapper ${u}-type-${m}${ze?` ${u}-align-entries`:""} ${u}-image-align-${be} ${de}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${et})`,rowGap:ze?0:y.scalingValue(C??0,n),columnGap:y.scalingValue(v.horizontalGap??0,n),width:y.scalingValue(v.wrapperWidth??0,n),...ze?{[`--${u}-align-entries-row-gap`]:y.scalingValue(C??0,n)}:{}},children:ee.map((Ne,rt)=>{var zt;const ke=ts(Ne.title),Ye=ts(Ne.subtitle),Ke=(((zt=Ne.link)==null?void 0:zt.length)??0)>0&&x==="off"?Ne.link:void 0,Et=Math.floor(rt/$t)===Math.ceil(ee.length/$t)-1,xt=ot&&rt>=kt?`${Ht+(rt-kt)}`:void 0,ft=It?r.jsxs("div",{className:`${u}-item-text-block`,children:[ke&&r.jsx("p",{className:W,style:{width:Qe,...re,...Z},children:Ne.title}),ke&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:He}}),Ye&&r.jsx("p",{className:J,style:{width:Qe,...fe,...ce},children:Ne.subtitle}),Ye&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(P??0,n),width:He}})]}):null,Wt=ze?r.jsxs("div",{className:`${u}-item-title-row`,children:[!It&&r.jsx("div",{"data-controls":o&&ke?"titleMarginTop":void 0,className:o&&ke?`${u}-control`:void 0,style:{height:ke?y.scalingValue(B??0,n):0,width:He}}),ke&&r.jsx("p",{className:W,style:{width:Qe,...re,...Z},children:Ne.title}),It&&ke&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:He}})]}):null,Tt=ze?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!It&&r.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?y.scalingValue(P??0,n):0,width:He}}),Ye&&r.jsx("p",{className:J,style:{width:Qe,...fe,...ce},children:Ne.subtitle}),It&&Ye&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(P??0,n),width:He}})]}):null,jt=Ke?r.jsxs("a",{href:Ke,target:"_blank",className:`${u}-item-text-link`,children:[Wt,Tt]}):r.jsxs(r.Fragment,{children:[Wt,Tt]}),Ft=nm(Ne.gallery),Pt=Ft.filter(at=>at.lightboxMedia).map(at=>at.lightboxMedia),en=r.jsx("div",{className:At,style:tt,children:Ft.length===0?null:I==="off"?(()=>{const{displayMedia:at,lightboxMedia:_t}=Ft[0],qt=_t?Pt.findIndex(ie=>ie.url===_t.url):-1;return r.jsx(ns,{media:at,className:`${u}-item-${qi(at)?"video":"image"}`.trim(),style:st,onMediaClick:_e&&qt>=0?()=>De(Pt,qt):void 0})})():r.jsxs(r.Fragment,{children:[dt&&ze&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ft.map(({displayMedia:at})=>qi(at)?r.jsx("video",{src:at.url,muted:!0,playsInline:!0},`sizer-${at.url}`):r.jsx("img",{src:at.url,alt:""},`sizer-${at.url}`))}),r.jsx(va,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:k*1e3,width:"100%",height:"100%",speed:Yp,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":H!=="random"?H==="horizontal"?"ltr":"ttb":St},onMoved:at=>{if(H!=="random"||M==="fade")return;const _t=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ct(_t),setTimeout(()=>{at.refresh()},0)},children:Ft.map(({displayMedia:at,lightboxMedia:_t},qt)=>{const ie=_t?Pt.findIndex(Ae=>Ae.url===_t.url):-1;return r.jsx(xa,{children:r.jsx(ns,{media:at,className:`${u}-item-${qi(at)?"video":"image"}`.trim(),style:st,onMediaClick:_e&&ie>=0?()=>De(Pt,ie):void 0})},qt)})},`${M}-${ne}-${H}-${k}-${Zt}-${d}`)]})}),yt=It?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&ke?"titleMarginTop":void 0,className:o&&ke?`${u}-control`:void 0,style:{height:ke?y.scalingValue(B??0,n):0,width:He}}),r.jsx("p",{className:W,style:{width:Qe,...re,...Z},children:Ne.title}),r.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?y.scalingValue(P??0,n):0,width:He}}),r.jsx("p",{className:J,style:{width:Qe,...fe,...ce},children:Ne.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:xt&&!ze?{gridColumn:xt}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ze&&Et?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${et} * (${w} / 100))`:et,...xt&&ze?{gridColumn:xt}:{}},children:ze?r.jsx(r.Fragment,{children:It?r.jsxs(r.Fragment,{children:[jt,r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:en})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:en}),jt]})}):Ke?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:[ft,en]}),!It&&r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-text-link`,children:yt})]}):r.jsxs(r.Fragment,{children:[ft,en,yt]})})},rt)})})}),(!n||i)&&Bt&&typeof document<"u"&&x==="on"&&(()=>{const Ne=(c?document.getElementById(c):null)??document.body;return Wi.createPortal(r.jsx("div",{style:ht,"data-selection":"none",children:r.jsx(am,{items:Gt,index:Qt,imageDisplay:sm(T),onClose:()=>Yt(!1),onPrev:()=>Te(rt=>(rt-1+Gt.length)%Gt.length),onNext:()=>Te(rt=>(rt+1)%Gt.length),counterClassName:pe,counterStyle:te})}),Ne)})()]})}const cm={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},dm=["hover","focus","filled","success","error"],um=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4078
+ `}const Ln=500,Yp=750,Zn="cubic-bezier(0.22, 1, 0.36, 1)",Jp=72,Zp=50;function Qp(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function em(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function tm(e){const[t]=e.media;return t!=null&&t.url?t:null}function nm(e){return!Array.isArray(e)||e.length===0?[]:Qp(e)?e.flatMap(t=>{const n=em(t);if(!n)return[];const i=tm(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function qi(e){return e.type==="video"}function im(e){e.pause(),e.removeAttribute("src"),e.load()}function ns({media:e,className:t,style:n,onMediaClick:i}){return qi(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Lo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function om(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function rm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{im(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d,style:i})}function am({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:l,counterClassName:s,counterStyle:d}){const c=n==="cover",u=a.useRef(null),m=a.useRef(null),v=a.useRef(null),w=a.useRef(null),C=a.useRef(0),h=a.useRef(0),x=a.useRef("none"),$=a.useRef(!1),T=a.useRef(!1),I=a.useRef(!1),k=a.useRef(null),[N,M]=a.useState(null),[B,P]=a.useState("opening"),[b,X]=a.useState(0),[f,R]=a.useState(0),[A,j]=a.useState(!1),[q,le]=a.useState(!1),[Y,z]=a.useState(!1),H=a.useRef(t),L=e[t],E=L?qi(L):!1,D=f!==0||A,K=a.useCallback(oe=>{I.current=oe,j(oe)},[]),Q=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),O=a.useCallback(()=>{Q(),k.current=window.setTimeout(()=>{Q(),K(!1)},Ln+32)},[Q,K]),he=a.useCallback(()=>{const oe=m.current,Se=v.current;if(!oe)return;const Ie=oe.getBoundingClientRect(),fe=Ie.width,xe=Ie.height;if(!fe||!xe)return;if(n==="cover"){M({width:fe,height:xe,left:Ie.left,top:Ie.top});return}if(!Se){M(Lo(oe));return}const{width:_,height:ee}=om(Se);if(!_||!ee){M(Lo(oe));return}const W=_/ee,J=fe/xe;if(W>J){const Z=fe/W;M({width:fe,height:Z,left:Ie.left,top:Ie.top+(xe-Z)/2})}else{const Z=xe*W;M({width:Z,height:xe,left:Ie.left+(fe-Z)/2,top:Ie.top})}},[n]);a.useEffect(()=>{he();const oe=m.current;if(!oe)return;const Se=new ResizeObserver(()=>he());return Se.observe(oe),()=>Se.disconnect()},[he,t]),a.useEffect(()=>{B==="opening"&&N&&P("open")},[B,N]),a.useEffect(()=>{if(B!=="closing")return;const oe=setTimeout(()=>i(),Ln);return()=>clearTimeout(oe)},[B,i]),a.useEffect(()=>()=>{Q()},[Q]),a.useLayoutEffect(()=>{if(H.current===t)return;Q(),X(0),R(0),K(!1),z(!1),le(!1),C.current=0,h.current=0,x.current="none",$.current=!1,w.current=null,T.current=!1;const oe=m.current;oe&&M(Lo(oe)),H.current=t},[t,K,Q]),a.useEffect(()=>{if(B!=="open")return;const oe=()=>{const ee=W=>{W.stopPropagation(),W.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0)},Se=ee=>{Q(),I.current=!1,j(!1),R(0),le(!1),$.current=!1,h.current=0,x.current="none";const W=m.current;W&&M(Lo(W)),ee<0?l():o()},Ie=ee=>{if(Math.abs(ee)>Zp&&e.length>1){Se(ee);return}K(!0),R(0),O()},fe=ee=>{if(ee.touches.length!==1||I.current)return;const W=ee.touches[0];T.current=!0,w.current={x:W.clientX,y:W.clientY},x.current="none",h.current=0,$.current=!1},xe=ee=>{if(!w.current||ee.touches.length!==1||I.current)return;const W=ee.touches[0],J=W.clientX-w.current.x,Z=W.clientY-w.current.y;if(x.current==="none"){if(Math.abs(J)<10&&Math.abs(Z)<10)return;if(Math.abs(J)>Math.abs(Z)){if(e.length<=1)return;x.current="horizontal"}else if(Z>0)x.current="vertical";else return}if(x.current==="horizontal"){$.current=!0,le(!0),h.current=J,R(J),ee.preventDefault();return}x.current==="vertical"&&($.current=!0,le(!0),C.current=Z,X(Z),ee.preventDefault())},_=()=>{if(!w.current)return;const ee=x.current,W=$.current;if(W&&ee==="horizontal")Ie(h.current),oe();else if(W&&ee==="vertical"){if(C.current>Jp){const Z=window.innerHeight;C.current=Z,z(!0),X(Z),P("closing")}else C.current=0,X(0);oe()}else ee==="horizontal"&&Math.abs(h.current)>0&&(Ie(h.current),oe());w.current=null,x.current="none",h.current=0,$.current=!1,le(!1)};return document.addEventListener("touchstart",fe,{passive:!0}),document.addEventListener("touchmove",xe,{passive:!1}),document.addEventListener("touchend",_),document.addEventListener("touchcancel",_),()=>{document.removeEventListener("touchstart",fe),document.removeEventListener("touchmove",xe),document.removeEventListener("touchend",_),document.removeEventListener("touchcancel",_)}},[B,e.length,l,o,K,O]),a.useEffect(()=>{const oe=Se=>{Se.key==="Escape"&&(Se.preventDefault(),Se.stopPropagation(),B!=="closing"&&P("closing"))};return window.addEventListener("keydown",oe,!0),()=>window.removeEventListener("keydown",oe,!0)},[B]);const g=()=>{B!=="closing"&&P("closing")},me=B==="open",ae=B==="closing",we=b>0?Math.max(0,1-b/500):1,ke=b>0?Math.max(.35,1-b/500):1,ne=oe=>{if(oe.stopPropagation(),T.current){T.current=!1;return}if(e.length<=1)return;const Se=oe.currentTarget.getBoundingClientRect(),Ie=oe.clientY-Se.top,fe=Math.min(52,Se.height*.2);if(!(Ie>Se.height-fe)){if(oe.clientX-Se.left<Se.width/2){o();return}l()}},ye=oe=>{if(e.length<=1)return;const Se=oe.currentTarget.getBoundingClientRect(),Ie=oe.clientX-Se.left,fe=oe.clientY-Se.top,xe=Math.min(52,Se.height*.2);if(fe>Se.height-xe){oe.currentTarget.style.cursor="default";return}oe.currentTarget.style.cursor=Ie<Se.width/2?"w-resize":"e-resize"},U=a.useCallback(oe=>{oe.propertyName!=="transform"||!I.current||(Q(),K(!1))},[Q,K]),be=D?`translateX(${f}px)`:b>0?`translateY(${b}px)`:void 0,ge={position:"fixed",top:N==null?void 0:N.top,left:N==null?void 0:N.left,width:N==null?void 0:N.width,height:N==null?void 0:N.height,objectFit:n==="cover"?"cover":"contain",transform:be,opacity:b>0?ke:B==="opening"||ae?0:1,transition:q&&!A?"none":A?`transform ${Ln}ms ${Zn}`:Y?`transform ${Ln}ms ${Zn}, opacity ${Ln}ms ${Zn}`:B==="opening"||ae?`opacity ${Ln}ms ${Zn}`:"none",pointerEvents:E&&me&&!D?"auto":"none",touchAction:E&&me?"none":void 0,zIndex:9998},pe=N?{position:"fixed",top:N.top,height:N.height,width:N.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:u,style:{position:"fixed",top:"var(--cntrl-article-top, 0)",left:"var(--cntrl-article-left, 0)",width:"var(--cntrl-article-width, 100vw) !important",height:"var(--cntrl-viewport-height, 100vh) !important",zIndex:9997,touchAction:B==="open"?"none":void 0},onClick:g,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:me?we:0,transition:q?"none":`opacity ${Ln}ms ${Zn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:m,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:me?1:0,transition:`opacity ${Ln}ms ${Zn}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:m,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:me?1:0,transition:`opacity ${Ln}ms ${Zn}`},children:e.length>1&&r.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]})}),N&&L&&(E?r.jsx(rm,{src:L.url,phase:B,mediaRef:v,mediaStyle:ge,onLoadedMetadata:he,onClick:ne,onMouseMove:ye,onTransitionEnd:U},`${t}-${L.url}`):r.jsx("img",{ref:v,src:L.url,alt:L.name,onLoad:he,onTransitionEnd:U,style:ge},`${t}-${L.url}`)),me&&pe&&e.length>1&&!E&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...pe,left:N.left,cursor:"w-resize",pointerEvents:D?"none":"auto"},onClick:oe=>{if(T.current){T.current=!1;return}oe.stopPropagation(),o()}}),r.jsx("div",{style:{...pe,left:N.left+N.width/2,cursor:"e-resize",pointerEvents:D?"none":"auto"},onClick:oe=>{if(T.current){T.current=!1;return}oe.stopPropagation(),l()}})]})]})}function sm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function lm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:v,textBoxWidth:w=100,verticalGap:C,entriesCount:h,lightbox:x,imageDisplay:$,lightboxImageDisplay:T,slider:I,sliderTiming:k,direction:N,transition:M,titleMarginTop:B,subtitleMarginTop:P,titleColor:b,subtitleColor:X,lightboxCounterColor:f,titleFontFamily:R,titleFontSettings:A,titleFontSize:j,titleLineHeight:q,titleLetterSpacing:le,titleWordSpacing:Y,titleTextAppearance:z,subtitleFontFamily:H,subtitleFontSettings:L,subtitleFontSize:E,subtitleLineHeight:D,subtitleLetterSpacing:K,subtitleWordSpacing:Q,subtitleTextAppearance:O,lightboxCounterFontFamily:he,lightboxCounterFontSettings:g,lightboxCounterFontSize:me,lightboxCounterLineHeight:ae,lightboxCounterLetterSpacing:we,lightboxCounterWordSpacing:ke,lightboxCounterTextAppearance:ne,showText:ye="always",alignEntries:U="off",align:be="top"}=e,ge={fontSettings:{fontFamily:R,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:j??.01,lineHeight:q,letterSpacing:le??0,wordSpacing:Y??0,textAppearance:z,color:b},oe={...ln(Kt(ge,n))},Se={fontSettings:{fontFamily:H,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:E??.01,lineHeight:D,letterSpacing:K??0,wordSpacing:Q??0,textAppearance:O,color:X},fe={...ln(Kt(Se,n))},xe={fontSettings:{fontFamily:he,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:me??.01,lineHeight:ae,letterSpacing:we??0,wordSpacing:ke??0,textAppearance:ne,color:f},ee={...ln(Kt(xe,n)),...Cr(me,ae,u,n)},W=Sr(j,q,`${u}-item-title`,`${u}-text-tight-leading`),J=Sr(E,D,`${u}-item-subtitle`,`${u}-text-tight-leading`),Z=Cr(j,q,u,n),ce=Cr(E,D,u,n),ue=Sr(me,ae,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ve=y.buildColorVars(u,{titleColor:b,subtitleColor:X,lightboxCounterColor:f},cm,dm),de=`${s&&s!=="default"?`${u}-state-${s}`:""}${ye==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ee=h===0?1/0:h,te=(t??[]).slice(0,Ee),ie=v.entryWidth??.2,Fe=($==null?void 0:$.display)==="cover",We=($==null?void 0:$.ratioValue)??"1:1",qe=($==null?void 0:$.reversed)??!1,[Ze,ct]=We.split(":").map(Number),vt=`${qe?ct:Ze} / ${qe?Ze:ct}`,$t=v.columnsCount,et=y.scalingValue(ie??0,n),je=et,dt=!Fe&&I!=="off",mt=te.length%$t||$t,ot=mt<$t&&te.length>0,kt=te.length-mt,Ht=ot?Math.floor(($t-mt)/2)+1:1,tt={width:je,...Fe?{aspectRatio:vt,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${u}-item-image-wrapper${dt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),It=m==="d"||m==="e"||m==="f",ze=U==="on",Qe=`calc(${y.scalingValue(ie??0,n)} * (${w} / 100))`,He=y.scalingValue(ie*w/100,n),st=Fe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[St,Ct]=a.useState("ltr"),[Zt,an]=a.useState(0),sn=a.useRef(null);a.useEffect(()=>{const Ne=sn.current;if(!Ne)return;const rt=new ResizeObserver(Me=>{an(Math.round(Me[0].contentRect.width))});return rt.observe(Ne),()=>rt.disconnect()},[]);const ht=(()=>{const Ne={...ve},rt=sn.current?getComputedStyle(sn.current).getPropertyValue("--cntrl-article-width").trim():"";return rt&&(Ne["--cntrl-article-width"]=rt),Ne})(),[Bt,Yt]=a.useState(!1),[Gt,Rt]=a.useState([]),[Qt,Te]=a.useState(0),_e=x==="on"&&(!n||i),De=(Ne,rt)=>{n&&!i||x!=="off"&&(Rt(Ne),Te(rt),Yt(!0))};a.useEffect(()=>{if(!Bt||x!=="on"||typeof document>"u")return;const Ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ne}},[Bt,x]),a.useEffect(()=>{!n||i||Yt(!1)},[n,i]);const Oe=a.useMemo(()=>Xp(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Oe}}),r.jsx("div",{style:ve,children:r.jsx("div",{ref:sn,className:`${u}-wrapper ${u}-type-${m}${ze?` ${u}-align-entries`:""} ${u}-image-align-${be} ${de}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${et})`,rowGap:ze?0:y.scalingValue(C??0,n),columnGap:y.scalingValue(v.horizontalGap??0,n),width:y.scalingValue(v.wrapperWidth??0,n),...ze?{[`--${u}-align-entries-row-gap`]:y.scalingValue(C??0,n)}:{}},children:te.map((Ne,rt)=>{var zt;const Me=ts(Ne.title),Ye=ts(Ne.subtitle),Ke=(((zt=Ne.link)==null?void 0:zt.length)??0)>0&&x==="off"?Ne.link:void 0,Et=Math.floor(rt/$t)===Math.ceil(te.length/$t)-1,xt=ot&&rt>=kt?`${Ht+(rt-kt)}`:void 0,ft=It?r.jsxs("div",{className:`${u}-item-text-block`,children:[Me&&r.jsx("p",{className:W,style:{width:Qe,...oe,...Z},children:Ne.title}),Me&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:He}}),Ye&&r.jsx("p",{className:J,style:{width:Qe,...fe,...ce},children:Ne.subtitle}),Ye&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(P??0,n),width:He}})]}):null,Wt=ze?r.jsxs("div",{className:`${u}-item-title-row`,children:[!It&&r.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?y.scalingValue(B??0,n):0,width:He}}),Me&&r.jsx("p",{className:W,style:{width:Qe,...oe,...Z},children:Ne.title}),It&&Me&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:He}})]}):null,Tt=ze?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!It&&r.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?y.scalingValue(P??0,n):0,width:He}}),Ye&&r.jsx("p",{className:J,style:{width:Qe,...fe,...ce},children:Ne.subtitle}),It&&Ye&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(P??0,n),width:He}})]}):null,jt=Ke?r.jsxs("a",{href:Ke,target:"_blank",className:`${u}-item-text-link`,children:[Wt,Tt]}):r.jsxs(r.Fragment,{children:[Wt,Tt]}),Ft=nm(Ne.gallery),Pt=Ft.filter(at=>at.lightboxMedia).map(at=>at.lightboxMedia),en=r.jsx("div",{className:At,style:tt,children:Ft.length===0?null:I==="off"?(()=>{const{displayMedia:at,lightboxMedia:_t}=Ft[0],qt=_t?Pt.findIndex(re=>re.url===_t.url):-1;return r.jsx(ns,{media:at,className:`${u}-item-${qi(at)?"video":"image"}`.trim(),style:st,onMediaClick:_e&&qt>=0?()=>De(Pt,qt):void 0})})():r.jsxs(r.Fragment,{children:[dt&&ze&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ft.map(({displayMedia:at})=>qi(at)?r.jsx("video",{src:at.url,muted:!0,playsInline:!0},`sizer-${at.url}`):r.jsx("img",{src:at.url,alt:""},`sizer-${at.url}`))}),r.jsx(va,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:k*1e3,width:"100%",height:"100%",speed:Yp,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":N!=="random"?N==="horizontal"?"ltr":"ttb":St},onMoved:at=>{if(N!=="random"||M==="fade")return;const _t=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ct(_t),setTimeout(()=>{at.refresh()},0)},children:Ft.map(({displayMedia:at,lightboxMedia:_t},qt)=>{const re=_t?Pt.findIndex(Ae=>Ae.url===_t.url):-1;return r.jsx(xa,{children:r.jsx(ns,{media:at,className:`${u}-item-${qi(at)?"video":"image"}`.trim(),style:st,onMediaClick:_e&&re>=0?()=>De(Pt,re):void 0})},qt)})},`${M}-${ie}-${N}-${k}-${Zt}-${d}`)]})}),yt=It?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?y.scalingValue(B??0,n):0,width:He}}),r.jsx("p",{className:W,style:{width:Qe,...oe,...Z},children:Ne.title}),r.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?y.scalingValue(P??0,n):0,width:He}}),r.jsx("p",{className:J,style:{width:Qe,...fe,...ce},children:Ne.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:xt&&!ze?{gridColumn:xt}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ze&&Et?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${et} * (${w} / 100))`:et,...xt&&ze?{gridColumn:xt}:{}},children:ze?r.jsx(r.Fragment,{children:It?r.jsxs(r.Fragment,{children:[jt,r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:en})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:en}),jt]})}):Ke?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:[ft,en]}),!It&&r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-text-link`,children:yt})]}):r.jsxs(r.Fragment,{children:[ft,en,yt]})})},rt)})})}),(!n||i)&&Bt&&typeof document<"u"&&x==="on"&&(()=>{const Ne=(c?document.getElementById(c):null)??document.body;return Wi.createPortal(r.jsx("div",{style:ht,"data-selection":"none",children:r.jsx(am,{items:Gt,index:Qt,imageDisplay:sm(T),onClose:()=>Yt(!1),onPrev:()=>Te(rt=>(rt-1+Gt.length)%Gt.length),onNext:()=>Te(rt=>(rt+1)%Gt.length),counterClassName:ue,counterStyle:ee})}),Ne)})()]})}const cm={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},dm=["hover","focus","filled","success","error"],um=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4079
4079
  import '@splidejs/react-splide/css/core';
4080
4080
  import { CommonComponentProps } from '../props';
4081
4081
  import {
@@ -5877,7 +5877,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5877
5877
  };
5878
5878
 
5879
5879
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5880
- `,Tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},pm=["titleColor","subtitleColor","lightboxCounterColor"],mm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.015625,subtitleLineHeight:.018229166666666668,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...pm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},gm={element:lm,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:mm,sourceCode:um},hm=50,is=10,ba="cntrl-lightbox-journal",lr=ba,Ur=`${ba}-`,cr=e=>`${ba}-${e}`,wa=e=>e===lr||e.startsWith(Ur),os=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},rs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=os(t.get(cr(e)));if(i)return i}const n=os(t.get(lr));if(n)return n;for(const[i]of t){if(!i.startsWith(Ur))continue;const o=i.slice(Ur.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},as=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Sl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{wa(s)&&i.searchParams.delete(s)}),t?i.searchParams.set(cr(t),String(e)):i.searchParams.set(lr,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},fm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===cr(e)||i===lr:wa(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Cl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(cr(e)):[...t.keys()].some(n=>wa(n))},ym=(e,t)=>{if(Cl(t)){if(e){window.history.back();return}fm(t)}},vm=20,xm=2,Lr=e=>`max(${e}, ${vm}px)`,Li=e=>((e==null?void 0:e.image)??[]).slice(0,xm),Tl=e=>e.reduce((t,n)=>t+Li(n).length,0),bm=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+Li(l).length,1),i=Li(e[t]).length;return{start:n,end:n+i-1}},wm=(e,t)=>{const n=Tl(e),{start:i,end:o}=bm(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ho=(e,t)=>t==="B"?e.flatMap((n,i)=>Li(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Li(n)})),$m=(e,t,n,i)=>{var l;if(n==="B")return`${t+1} / ${e.length}`;const o=((l=e[t])==null?void 0:l.entryIndex)??0;return wm(i,o)},ss=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sm=(e,t,n)=>e==="B"?t.length>1:Tl(n)>1,pn=.004,On=.004,wi={title1Width:.13,title2Width:.13,title3Width:.14},Bn=(e,t,n,i,o)=>{const l=[];return t.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),l},Ii=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},no=(e,t)=>Ii(e,t),on=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},jn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ii(e.length,n),effective:no(e.length,n)}},Ll=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Il=(e,t,n,i)=>e.slice(0,i+1).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),ci=["title1","title2","title3","count"],Je=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Rl={title1:"1",title2:"2",title3:"3",count:"Count"},El=e=>[Je(e,"fontFamily"),Je(e,"fontSettings"),{type:"row",items:[Je(e,"fontSize"),Je(e,"lineHeight"),Je(e,"letterSpacing"),Je(e,"wordSpacing")]},Je(e,"textAlign"),Je(e,"textAppearance")],Cm=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ci.map(e=>[Rl[e],El(e)]))}),Tm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Lm={title1:.02,title2:.02,title3:.02,count:.017},oi=(e,t)=>{const n=i=>{const o=Je(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Tm[t]]}},ri=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Lm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)};function Im({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:v=0,title3MarginLeft:w=0,titleRowMarginBottom:C=0,titleHeaderLayout:h="desktop",contentMarginTop:x=0,iconMarginRight:$=0,closeIcon:T=null,closeIconMaxWidth:I=0,closeIconColor:k="#000000",closeIconHoverColor:H="#cccccc"}=n,M=y.scalingValue(x,i),B=y.scalingValue($,i),P=y.scalingValue(C,i),b=h==="mobile",G=ri("title1",oi(n,"title1"),i),f=ri("title2",oi(n,"title2"),i),R=ri("title3",oi(n,"title3"),i),A=a.useMemo(()=>({title1Width:d??wi.title1Width,title2Width:c??wi.title2Width,title3Width:u??wi.title3Width}),[d,c,u]),j=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:w}),[v,w]),K=a.useMemo(()=>Bn(e,t,G,f,R),[e,t,G,f,R]),le=a.useMemo(()=>K.map(q=>A[q.widthKey]),[K,A]),X=a.useMemo(()=>Ii(K.length,le),[K.length,le]),z=a.useMemo(()=>no(K.length,le),[K.length,le]),_=a.useMemo(()=>K.filter(q=>q.prefix==="title1"),[K]),L=a.useMemo(()=>K.filter(q=>q.prefix==="title2"||q.prefix==="title3"),[K]),E=a.useMemo(()=>jn(_,A),[_,A]),D=a.useMemo(()=>jn(L,A),[L,A]),U=!!(t.title1||t.title2||t.title3),Q=T!==null;if(!(U||Q))return null;const ge=(m??0)>0||o,g=(q,de)=>{const Me=K.findIndex(ne=>ne.prefix===q.prefix);if(!b||de==="single-row")return{effectiveWidth:z[Me]??0,resolvedWidth:X[Me]??0,maxWidth:on(Me,X)};if(de==="two-row-top"){const ne=_.findIndex(Fe=>Fe.prefix===q.prefix);return{effectiveWidth:E.effective[ne]??0,resolvedWidth:E.resolved[ne]??0,maxWidth:on(ne,E.resolved)}}const ee=L.findIndex(ne=>ne.prefix===q.prefix);return{effectiveWidth:D.effective[ee]??0,resolvedWidth:D.resolved[ee]??0,maxWidth:on(ee,D.resolved)}},he=(q,de,Me)=>{if(!b||Me==="single-row"){const qe=q.findIndex(Xe=>Xe.prefix===de.prefix),Ze=q.map(Xe=>A[Xe.widthKey]),ct=Ii(q.length,Ze);return{effectiveWidth:no(q.length,Ze)[qe]??0,resolvedWidth:ct[qe]??0,maxWidth:on(qe,ct)}}if(Me==="two-row-top"){const qe=q.filter(Xe=>Xe.prefix==="title1"),Ze=qe.findIndex(Xe=>Xe.prefix===de.prefix),{resolved:ct,effective:pt}=jn(qe,A);return{effectiveWidth:pt[Ze]??0,resolvedWidth:ct[Ze]??0,maxWidth:on(Ze,ct)}}const ee=q.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),ne=ee.findIndex(qe=>qe.prefix===de.prefix),{resolved:Fe,effective:We}=jn(ee,A);return{effectiveWidth:We[ne]??0,resolvedWidth:Fe[ne]??0,maxWidth:on(ne,Fe)}},se=q=>Il(K,X,j,q)+(b?0:m??0),ve=()=>b?0:m??0,Ee=q=>L.slice(0,q).reduce((de,Me,ee)=>de+(Me.marginLeftKey?j[Me.marginLeftKey]??0:0)+(D.resolved[ee]??0),0),oe=q=>{const de=L[q];return Ee(q)+(de.marginLeftKey?j[de.marginLeftKey]??0:0)+(D.resolved[q]??0)},xe=(q,de,Me)=>{const ee=q.marginLeftKey?j[q.marginLeftKey]??0:0,{effectiveWidth:ne,resolvedWidth:Fe,maxWidth:We}=Me??g(q,de),qe=Math.max(ee,On),Ze=o&&de==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":q.prefix,style:{width:y.scalingValue(ne,i),...ee>0?{marginLeft:y.scalingValue(ee,i)}:{}},children:[r.jsx("p",{className:q.className,style:q.style,children:q.text}),Ze&&q.marginLeftKey?r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:y.scalingValue(-ee,i),width:y.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,Ze?r.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-pn/2,i),width:y.scalingValue(pn,i),height:"100%",pointerEvents:"auto"}}):null]},q.className)},Y=(q="two-row")=>{const de=K.findIndex(ne=>ne.prefix==="title1"),Me=de>=0?X[de]:A.title1Width,ee=q==="two-row"&&o;return r.jsx("div",{...ee?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...ee?{pointerEvents:"auto"}:{}}})},be=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:G,"aria-hidden":"true",children:" "}),me=q=>{const de=Bn(e,q,G,f,R);return r.jsx(r.Fragment,{children:de.map(Me=>xe(Me,"single-row",he(de,Me,"single-row")))})},ue=q=>{const de=Bn(e,q,G,f,R),Me=de.find(ee=>ee.prefix==="title1");return Me?xe(Me,"two-row-top",he(de,Me,"two-row-top")):null},re=(q,de=!1)=>{const Me=Bn(e,q,G,f,R),ee=Me.filter(We=>We.prefix==="title2"||We.prefix==="title3"),ne=o&&de;return ee.length>0||ne||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ee.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:ee.map(We=>xe(We,"two-row-bottom",he(Me,We,"two-row-bottom")))}),de&&o?r.jsxs(r.Fragment,{children:[J(),Z()]}):null]}):null,(C??0)>0||ne?r.jsx("div",{"data-controls":ne?"titleRowMarginBottom":void 0,"data-controls-axis":ne?"y":void 0,"data-controls-reverse":ne?"":void 0,className:ne?`${e}-control`:void 0,style:{height:P,width:"100%",flexShrink:0,pointerEvents:ne?"auto":"none"}}):null]}):null},Le=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(I??0,i),height:y.scalingValue(I??0,i),marginRight:B,"--close-icon-hover-color":H},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:q=>{q.stopPropagation(),s==null||s()},"aria-label":"Close",children:r.jsx(cn,{url:T??"",fill:k,hoverFill:i&&!l?k:H,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:B,height:"100%",pointerEvents:"auto"}})]}),Ce=()=>Q?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Le()}):null,fe=q=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:q})}),$e=q=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Q||U?be():null,ge?Y("two-row"):null,fe(q),Ce()]}),N=(q,de=!1)=>r.jsxs(r.Fragment,{children:[$e(ue(q)),re(q,de)]}),te=()=>{const q=b?-1:K.findIndex(ee=>ee.prefix==="title1"),de=!b&&(o||(m??0)>0)?(()=>{const ee=m??0,ne=q>=0?X[q]:A.title1Width,Fe=Math.max(ee,On);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne),style:{position:"absolute",top:0,left:0,width:y.scalingValue(Fe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Me=K.flatMap((ee,ne)=>{if(!ee.marginLeftKey)return[];const Fe=j[ee.marginLeftKey]??0,We=Ll(K,X,j,ne)+ve(),qe=Math.max(Fe,On);return r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(X[ne]),style:{position:"absolute",top:0,left:y.scalingValue(We,i),width:y.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},ee.marginLeftKey)});return de?[de,...Me]:Me},W=()=>K.map((q,de)=>{const Me=on(de,X),ne=se(de)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Me),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(ne,i),width:y.scalingValue(pn,i),height:"100%",pointerEvents:"auto"}})},`${q.widthKey}-junction`)}),J=()=>L.flatMap((q,de)=>{if(!q.marginLeftKey)return[];const Me=j[q.marginLeftKey]??0,ee=Ee(de),ne=Math.max(Me,On),{resolvedWidth:Fe}=g(q,"two-row-bottom");return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:y.scalingValue(ee,i),width:y.scalingValue(ne,i),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)}),Z=()=>L.map((q,de)=>{const{maxWidth:Me}=g(q,"two-row-bottom"),ne=oe(de)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Me),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(ne,i),width:y.scalingValue(pn,i),height:"100%",pointerEvents:"auto"}})},`${q.widthKey}-junction`)}),ce=()=>!o||b?null:r.jsxs(r.Fragment,{children:[te(),W()]}),pe=!!(t.title2||t.title3||(C??0)>0||o),ye=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Q||U?be():null,ge?Y("single-row"):null,U?fe(me(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Ce(),ce()]}),Ie=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...pe?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:pe?void 0:{flex:"0 0 auto",height:"auto"},children:N(t,!0)}),ce()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:M,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...b?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${b?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${b?` ${e}-text-bar-cell-stacked`:""}`,style:b?void 0:{flex:1,minWidth:0,width:"100%"},children:b?Ie():ye()})})})]})}function Rm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Em(e){return`
5880
+ `,Tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},pm=["titleColor","subtitleColor","lightboxCounterColor"],mm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.015625,subtitleLineHeight:.018229166666666668,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...pm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},gm={element:lm,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:mm,sourceCode:um},hm=50,is=10,ba="cntrl-lightbox-journal",lr=ba,Ur=`${ba}-`,cr=e=>`${ba}-${e}`,wa=e=>e===lr||e.startsWith(Ur),os=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},rs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=os(t.get(cr(e)));if(i)return i}const n=os(t.get(lr));if(n)return n;for(const[i]of t){if(!i.startsWith(Ur))continue;const o=i.slice(Ur.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},as=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Sl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{wa(s)&&i.searchParams.delete(s)}),t?i.searchParams.set(cr(t),String(e)):i.searchParams.set(lr,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},fm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===cr(e)||i===lr:wa(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Cl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(cr(e)):[...t.keys()].some(n=>wa(n))},ym=(e,t)=>{if(Cl(t)){if(e){window.history.back();return}fm(t)}},vm=20,xm=2,Lr=e=>`max(${e}, ${vm}px)`,Li=e=>((e==null?void 0:e.image)??[]).slice(0,xm),Tl=e=>e.reduce((t,n)=>t+Li(n).length,0),bm=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+Li(l).length,1),i=Li(e[t]).length;return{start:n,end:n+i-1}},wm=(e,t)=>{const n=Tl(e),{start:i,end:o}=bm(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ho=(e,t)=>t==="B"?e.flatMap((n,i)=>Li(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Li(n)})),$m=(e,t,n,i)=>{var l;if(n==="B")return`${t+1} / ${e.length}`;const o=((l=e[t])==null?void 0:l.entryIndex)??0;return wm(i,o)},ss=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sm=(e,t,n)=>e==="B"?t.length>1:Tl(n)>1,pn=.004,On=.004,wi={title1Width:.13,title2Width:.13,title3Width:.14},Bn=(e,t,n,i,o)=>{const l=[];return t.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),l},Ii=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},no=(e,t)=>Ii(e,t),on=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},jn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ii(e.length,n),effective:no(e.length,n)}},Ll=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Il=(e,t,n,i)=>e.slice(0,i+1).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),ci=["title1","title2","title3","count"],Je=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Rl={title1:"1",title2:"2",title3:"3",count:"Count"},El=e=>[Je(e,"fontFamily"),Je(e,"fontSettings"),{type:"row",items:[Je(e,"fontSize"),Je(e,"lineHeight"),Je(e,"letterSpacing"),Je(e,"wordSpacing")]},Je(e,"textAlign"),Je(e,"textAppearance")],Cm=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ci.map(e=>[Rl[e],El(e)]))}),Tm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Lm={title1:.02,title2:.02,title3:.02,count:.017},oi=(e,t)=>{const n=i=>{const o=Je(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Tm[t]]}},ri=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Lm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)};function Im({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:v=0,title3MarginLeft:w=0,titleRowMarginBottom:C=0,titleHeaderLayout:h="desktop",contentMarginTop:x=0,iconMarginRight:$=0,closeIcon:T=null,closeIconMaxWidth:I=0,closeIconColor:k="#000000",closeIconHoverColor:N="#cccccc"}=n,M=y.scalingValue(x,i),B=y.scalingValue($,i),P=y.scalingValue(C,i),b=h==="mobile",X=ri("title1",oi(n,"title1"),i),f=ri("title2",oi(n,"title2"),i),R=ri("title3",oi(n,"title3"),i),A=a.useMemo(()=>({title1Width:d??wi.title1Width,title2Width:c??wi.title2Width,title3Width:u??wi.title3Width}),[d,c,u]),j=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:w}),[v,w]),q=a.useMemo(()=>Bn(e,t,X,f,R),[e,t,X,f,R]),le=a.useMemo(()=>q.map(G=>A[G.widthKey]),[q,A]),Y=a.useMemo(()=>Ii(q.length,le),[q.length,le]),z=a.useMemo(()=>no(q.length,le),[q.length,le]),H=a.useMemo(()=>q.filter(G=>G.prefix==="title1"),[q]),L=a.useMemo(()=>q.filter(G=>G.prefix==="title2"||G.prefix==="title3"),[q]),E=a.useMemo(()=>jn(H,A),[H,A]),D=a.useMemo(()=>jn(L,A),[L,A]),K=!!(t.title1||t.title2||t.title3),Q=T!==null;if(!(K||Q))return null;const he=(m??0)>0||o,g=(G,de)=>{const Ee=q.findIndex(ie=>ie.prefix===G.prefix);if(!b||de==="single-row")return{effectiveWidth:z[Ee]??0,resolvedWidth:Y[Ee]??0,maxWidth:on(Ee,Y)};if(de==="two-row-top"){const ie=H.findIndex(Fe=>Fe.prefix===G.prefix);return{effectiveWidth:E.effective[ie]??0,resolvedWidth:E.resolved[ie]??0,maxWidth:on(ie,E.resolved)}}const te=L.findIndex(ie=>ie.prefix===G.prefix);return{effectiveWidth:D.effective[te]??0,resolvedWidth:D.resolved[te]??0,maxWidth:on(te,D.resolved)}},me=(G,de,Ee)=>{if(!b||Ee==="single-row"){const qe=G.findIndex(Xe=>Xe.prefix===de.prefix),Ze=G.map(Xe=>A[Xe.widthKey]),ct=Ii(G.length,Ze);return{effectiveWidth:no(G.length,Ze)[qe]??0,resolvedWidth:ct[qe]??0,maxWidth:on(qe,ct)}}if(Ee==="two-row-top"){const qe=G.filter(Xe=>Xe.prefix==="title1"),Ze=qe.findIndex(Xe=>Xe.prefix===de.prefix),{resolved:ct,effective:pt}=jn(qe,A);return{effectiveWidth:pt[Ze]??0,resolvedWidth:ct[Ze]??0,maxWidth:on(Ze,ct)}}const te=G.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),ie=te.findIndex(qe=>qe.prefix===de.prefix),{resolved:Fe,effective:We}=jn(te,A);return{effectiveWidth:We[ie]??0,resolvedWidth:Fe[ie]??0,maxWidth:on(ie,Fe)}},ae=G=>Il(q,Y,j,G)+(b?0:m??0),we=()=>b?0:m??0,ke=G=>L.slice(0,G).reduce((de,Ee,te)=>de+(Ee.marginLeftKey?j[Ee.marginLeftKey]??0:0)+(D.resolved[te]??0),0),ne=G=>{const de=L[G];return ke(G)+(de.marginLeftKey?j[de.marginLeftKey]??0:0)+(D.resolved[G]??0)},ye=(G,de,Ee)=>{const te=G.marginLeftKey?j[G.marginLeftKey]??0:0,{effectiveWidth:ie,resolvedWidth:Fe,maxWidth:We}=Ee??g(G,de),qe=Math.max(te,On),Ze=o&&de==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":G.prefix,style:{width:y.scalingValue(ie,i),...te>0?{marginLeft:y.scalingValue(te,i)}:{}},children:[r.jsx("p",{className:G.className,style:G.style,children:G.text}),Ze&&G.marginLeftKey?r.jsx("div",{"data-controls":G.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:y.scalingValue(-te,i),width:y.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,Ze?r.jsx("div",{"data-controls":G.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-pn/2,i),width:y.scalingValue(pn,i),height:"100%",pointerEvents:"auto"}}):null]},G.className)},U=(G="two-row")=>{const de=q.findIndex(ie=>ie.prefix==="title1"),Ee=de>=0?Y[de]:A.title1Width,te=G==="two-row"&&o;return r.jsx("div",{...te?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...te?{pointerEvents:"auto"}:{}}})},be=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:X,"aria-hidden":"true",children:" "}),ge=G=>{const de=Bn(e,G,X,f,R);return r.jsx(r.Fragment,{children:de.map(Ee=>ye(Ee,"single-row",me(de,Ee,"single-row")))})},pe=G=>{const de=Bn(e,G,X,f,R),Ee=de.find(te=>te.prefix==="title1");return Ee?ye(Ee,"two-row-top",me(de,Ee,"two-row-top")):null},oe=(G,de=!1)=>{const Ee=Bn(e,G,X,f,R),te=Ee.filter(We=>We.prefix==="title2"||We.prefix==="title3"),ie=o&&de;return te.length>0||ie||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[te.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:te.map(We=>ye(We,"two-row-bottom",me(Ee,We,"two-row-bottom")))}),de&&o?r.jsxs(r.Fragment,{children:[J(),Z()]}):null]}):null,(C??0)>0||ie?r.jsx("div",{"data-controls":ie?"titleRowMarginBottom":void 0,"data-controls-axis":ie?"y":void 0,"data-controls-reverse":ie?"":void 0,className:ie?`${e}-control`:void 0,style:{height:P,width:"100%",flexShrink:0,pointerEvents:ie?"auto":"none"}}):null]}):null},Se=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(I??0,i),height:y.scalingValue(I??0,i),marginRight:B,"--close-icon-hover-color":N},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:G=>{G.stopPropagation(),s==null||s()},"aria-label":"Close",children:r.jsx(cn,{url:T??"",fill:k,hoverFill:i&&!l?k:N,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:B,height:"100%",pointerEvents:"auto"}})]}),Ie=()=>Q?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Se()}):null,fe=G=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:G})}),xe=G=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Q||K?be():null,he?U("two-row"):null,fe(G),Ie()]}),_=(G,de=!1)=>r.jsxs(r.Fragment,{children:[xe(pe(G)),oe(G,de)]}),ee=()=>{const G=b?-1:q.findIndex(te=>te.prefix==="title1"),de=!b&&(o||(m??0)>0)?(()=>{const te=m??0,ie=G>=0?Y[G]:A.title1Width,Fe=Math.max(te,On);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ie),style:{position:"absolute",top:0,left:0,width:y.scalingValue(Fe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ee=q.flatMap((te,ie)=>{if(!te.marginLeftKey)return[];const Fe=j[te.marginLeftKey]??0,We=Ll(q,Y,j,ie)+we(),qe=Math.max(Fe,On);return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Y[ie]),style:{position:"absolute",top:0,left:y.scalingValue(We,i),width:y.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)});return de?[de,...Ee]:Ee},W=()=>q.map((G,de)=>{const Ee=on(de,Y),ie=ae(de)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":G.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(ie,i),width:y.scalingValue(pn,i),height:"100%",pointerEvents:"auto"}})},`${G.widthKey}-junction`)}),J=()=>L.flatMap((G,de)=>{if(!G.marginLeftKey)return[];const Ee=j[G.marginLeftKey]??0,te=ke(de),ie=Math.max(Ee,On),{resolvedWidth:Fe}=g(G,"two-row-bottom");return r.jsx("div",{"data-controls":G.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:y.scalingValue(te,i),width:y.scalingValue(ie,i),height:"100%",pointerEvents:"auto"}},G.marginLeftKey)}),Z=()=>L.map((G,de)=>{const{maxWidth:Ee}=g(G,"two-row-bottom"),ie=ne(de)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":G.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(ie,i),width:y.scalingValue(pn,i),height:"100%",pointerEvents:"auto"}})},`${G.widthKey}-junction`)}),ce=()=>!o||b?null:r.jsxs(r.Fragment,{children:[ee(),W()]}),ue=!!(t.title2||t.title3||(C??0)>0||o),ve=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Q||K?be():null,he?U("single-row"):null,K?fe(ge(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Ie(),ce()]}),Le=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ue?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ue?void 0:{flex:"0 0 auto",height:"auto"},children:_(t,!0)}),ce()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:M,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...b?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${b?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${b?` ${e}-text-bar-cell-stacked`:""}`,style:b?void 0:{flex:1,minWidth:0,width:"100%"},children:b?Le():ve()})})})]})}function Rm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Em(e){return`
5881
5881
  .${e}-wrapper {
5882
5882
  display: grid;
5883
5883
  align-items: start;
@@ -6208,7 +6208,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6208
6208
  pointer-events: auto;
6209
6209
  flex-shrink: 0;
6210
6210
  }
6211
- `}const ls={url:"",name:"",objectFit:"cover"},$n=500,ji=650,dn="cubic-bezier(0.22, 1, 0.36, 1)",Mm=72,km=50,Pm=1e4,Am=650,Wm=500;function Fm(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function Ml(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Kr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function _m(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ml(i,n):null}function Nm(e){return e.reduce((t,n,i)=>{const o=$a(n.gallery),s=Sa(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return s.length===0||t.push({gridIndex:i,items:s,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Di(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function cs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Di(e,i,n)}const Hm=.03;function kl(e){return e.width*Hm}const Ir={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Io(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function ds(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Om(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Xr(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function Bm(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xr(e,t.width,t.height)}function jm(e,t){if(Hi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function zm(e){const t=new Set,n=[];for(const i of e){const o=$a(i.gallery),l=Sa(o);for(const s of l)for(const d of[s.displayMedia,s.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Dm({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Hi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ri(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:d}=n,c=kl(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function Ko(e,t,n){const i=Ri(e,t,n);return{...i,left:2*i.left-e.left}}function Vm(e,t,n){const{left:i,width:o}=n,l=kl(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function Pl(e,t,n,i){const o=Ri(e,"left",i),l=Ri(e,"right",i),s=Ko(e,"left",i),d=Ko(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function Gm(e,t,n,i){const{start:o,end:l}=Pl(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function qm(e,t,n){const i=Ri(e,t,n),o=Ko(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Al(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function $a(e){if(!e)return;if(Al(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??ls,i??o??ls]}]}function Km(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Um(e){const[t]=e.media;return t!=null&&t.url?t:null}function Sa(e){if(!Array.isArray(e)||e.length===0)return[];if(Al(e)){const t=[];for(const n of e){const i=Km(n);if(!i)continue;const o=Um(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Hi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Xm({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Hi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Ym({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function Ro({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Hi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function Jm({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:v,sourceRect:w,resolveCloseSourceRect:C,onClose:h,onPrev:x,onNext:$}){const T=a.useRef(null),I=a.useRef(null),k=a.useRef(null),H=a.useRef(new Map),[M,B]=a.useState(0),P=a.useRef(null),b=a.useRef(0),G=a.useRef(0),f=a.useRef("none"),R=a.useRef(!1),A=a.useRef(!1),j=a.useRef(!1),K=a.useRef(null),le=a.useRef(null),X=a.useRef(null),z=a.useRef(()=>{}),_=a.useRef(null),L=a.useRef(null),E=a.useRef(null),D=a.useRef(!1),[U,Q]=a.useState(null),[O,ge]=a.useState(Ir),[g,he]=a.useState(0),[se,ve]=a.useState("opening"),[Ee,oe]=a.useState(0),[xe,Y]=a.useState(0),[be,me]=a.useState(!1),[ue,re]=a.useState(null),[Le,Ce]=a.useState(null),[fe,$e]=a.useState(null),[N,te]=a.useState(!1),[W,J]=a.useState(null),[Z,ce]=a.useState(!1),pe=a.useRef(!1),[ye,Ie]=a.useState(!1),[q,de]=a.useState(!1),Me=a.useRef(n),ee=a.useRef(void 0),ne=t[n],Fe=ne?Hi(ne):!1,We=xe!==0||be,qe=!s&&(!l||!!d),Ze=c&&!s,ct=u.length>1,pt=a.useCallback((ie,Ae)=>t.length<=1?null:t[(ie+Ae+t.length)%t.length]??null,[t]),Xe=ct?Di(u,m,-1):pt(n,-1),vt=ct?Di(u,m,1):pt(n,1),$t=ue===-1&&We?ct&&Le!==null?Di(u,Le,-1):fe!==null?pt(fe,-1):null:null,et=ue===1&&We?ct&&Le!==null?Di(u,Le,1):fe!==null?pt(fe,1):null:null,je=$t&&$t.url!==(Xe==null?void 0:Xe.url)?$t:null,dt=et&&et.url!==(vt==null?void 0:vt.url)?et:null,mt=Xe&&Ze?(()=>{const ie=ct?cs(u,m,-1):t.length>2?pt((n-1+t.length)%t.length,-1):null;return ie&&ie.url!==Xe.url?ie:null})():null,ot=vt&&Ze?(()=>{const ie=ct?cs(u,m,1):t.length>2?pt((n+1)%t.length,1):null;return ie&&ie.url!==vt.url?ie:null})():null,kt=je??mt,Ht=dt??ot,tt=a.useCallback((ie,Ae,Ve)=>{if(!ie||!Ae||!Ve)return;const Ge=H.current,bt=Ge.get(ie);(bt==null?void 0:bt.width)===Ae&&(bt==null?void 0:bt.height)===Ve||(Ge.set(ie,{width:Ae,height:Ve}),B(Ut=>Ut+1))},[]),At=a.useCallback(ie=>{if(!(ie!=null&&ie.url))return null;const Ae=H.current.get(ie.url);return Bm(I.current,Ae)},[M,g]),It=a.useCallback(()=>{if(!ne)return;const ie=At(ne);if(ie){Q(ie);return}const Ae=I.current;Ae&&Q(ds(Ae))},[ne,At]),ze=a.useCallback(ie=>{if(ct){const Ae=u.length;Ce((m+ie+Ae)%Ae),$e(null);return}t.length>1&&($e((n+ie+t.length)%t.length),Ce(null))},[ct,u.length,m,t.length,n]),Qe=a.useCallback(ie=>{j.current=ie,me(ie)},[]),He=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),st=a.useCallback(()=>{He(),K.current=window.setTimeout(()=>{He(),Qe(!1)},ji+32)},[He,Qe]),St=a.useCallback(()=>{const ie=T.current;if(!ie){ge({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ir.width,height:typeof window<"u"?window.innerHeight:Ir.height});return}const Ae=ie.getBoundingClientRect();ge({left:Ae.left,top:Ae.top,width:Ae.width,height:Ae.height})},[]),Ct=a.useCallback((ie,Ae)=>{if(We){if(ye&&!be)return`translate(${xe}px, 0px)`;if(be&&ue!==null){const Ve=At(ie);if(!Ve)return;const{x:Ge,y:bt}=Gm(Ve,Ae,ue,O);return`translate(${Ge}px, ${bt}px)`}if(be)return"translate(0px, 0px)"}},[We,ye,be,xe,ue,O,At]),Zt=a.useCallback(()=>{const ie=le.current;le.current=null,He(),Qe(!1),re(null),Ce(null),$e(null),Y(0),Ie(!1),R.current=!1,G.current=0,f.current="none",ie===-1?x():ie===1&&$()},[He,Qe,x,$]),an=a.useCallback(()=>{He(),K.current=window.setTimeout(()=>{le.current!==null&&Zt()},ji+32)},[He,Zt]),sn=a.useCallback(()=>{He(),le.current=null,Qe(!1),re(null),Ce(null),$e(null),Y(0),Ie(!1),R.current=!1,G.current=0,f.current="none"},[He,Qe]),ht=a.useCallback(ie=>{if(!(!Ze||!U)){if(j.current){if(le.current===ie){X.current=ie,Zt();return}sn()}He(),ze(ie),le.current=ie,re(ie),Qe(!0),an()}},[Ze,U,Zt,sn,He,ze,Qe,an]);z.current=ht;const Bt=a.useCallback(()=>{_.current=null,D.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),Yt=a.useCallback(ie=>{L.current!==null&&window.clearInterval(L.current);const Ae=D.current?Wm:Am;L.current=window.setInterval(()=>{z.current(ie)},Ae)},[]),Gt=a.useCallback(ie=>{_.current!==ie&&(Bt(),_.current=ie,D.current=!1,z.current(ie),Yt(ie),E.current=window.setTimeout(()=>{E.current=null,_.current===ie&&(D.current=!0,Yt(ie))},Pm))},[Bt,Yt]),Rt=a.useCallback(()=>{const ie=I.current;if(!ie)return;const Ae=ne==null?void 0:ne.url,Ve=Ae?H.current.get(Ae):void 0;if(Ve!=null&&Ve.width&&(Ve!=null&&Ve.height)){Q(Xr(ie,Ve.width,Ve.height));return}const Ge=k.current;if(Ge&&Ae&&(Ge.src===Ae||Ge.currentSrc===Ae)){const{width:Ut,height:gt}=Om(Ge);if(Ut&&gt){tt(Ae,Ut,gt),Q(Xr(ie,Ut,gt));return}}const bt=ds(ie);!bt.width||!bt.height||Q(bt)},[ne==null?void 0:ne.url,tt]),Qt=a.useCallback(ie=>{if(k.current=ie,!!ie){if(ie instanceof HTMLVideoElement){ie.readyState>=1&&ie.videoWidth>0&&Rt();return}ie.complete&&ie.naturalWidth>0&&Rt()}},[Rt]),Te=a.useCallback(()=>{St(),Rt(),he(ie=>ie+1)},[St,Rt]);a.useEffect(()=>{Te();const ie=I.current,Ae=T.current,Ve=new ResizeObserver(()=>Te());return ie&&Ve.observe(ie),Ae&&Ve.observe(Ae),window.addEventListener("resize",Te),()=>{Ve.disconnect(),window.removeEventListener("resize",Te)}},[Te,n,v]),a.useLayoutEffect(()=>{if(!ne)return;const ie=k.current;if(ie){if(ie instanceof HTMLImageElement&&ie.complete&&ie.naturalWidth>0){Rt();return}ie instanceof HTMLVideoElement&&ie.readyState>=1&&ie.videoWidth>0&&Rt()}},[ne==null?void 0:ne.url,n,Rt]),a.useEffect(()=>{It()},[It,M]),a.useEffect(()=>{const ie=new Set,Ae=[],Ve=Ge=>{!(Ge!=null&&Ge.url)||ie.has(Ge.url)||(ie.add(Ge.url),Ae.push(Ge))};t.forEach(Ve),u.forEach(Ge=>Ge.items.forEach(Ve)),Ae.forEach(Ge=>{H.current.has(Ge.url)||jm(Ge,tt)})},[t,u,tt]),a.useEffect(()=>{if(se!=="opening"||!U)return;if(!w){ve("open");return}te(!1);const ie=requestAnimationFrame(()=>{requestAnimationFrame(()=>{te(!0),ve("open")})});return()=>cancelAnimationFrame(ie)},[se,U,w]),a.useEffect(()=>{if(se!=="closing")return;const ie=setTimeout(()=>h(),$n);return()=>clearTimeout(ie)},[se,h]),a.useEffect(()=>()=>{He()},[He]),a.useLayoutEffect(()=>{Me.current===n&&ee.current===(ne==null?void 0:ne.url)||(He(),le.current=null,re(null),Ce(null),$e(null),oe(0),Y(0),Qe(!1),de(!1),Ie(!1),b.current=0,G.current=0,f.current="none",R.current=!1,P.current=null,A.current=!1,k.current=null,It(),Me.current=n,ee.current=ne==null?void 0:ne.url)},[n,ne==null?void 0:ne.url,Qe,He,It]),a.useLayoutEffect(()=>{const ie=X.current;ie!==null&&(X.current=null,requestAnimationFrame(()=>{z.current(ie)}))},[n,m,ne==null?void 0:ne.url]),a.useLayoutEffect(()=>{if(se==="opening"){pe.current=!1,ce(!1);return}if(se!=="open"||pe.current)return;if(!Xe&&!vt){pe.current=!0;return}ce(!1);const ie=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),pe.current=!0})});return()=>cancelAnimationFrame(ie)},[se,Xe==null?void 0:Xe.url,vt==null?void 0:vt.url]),a.useEffect(()=>{if(se!=="open")return;const ie=()=>{const gt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Ae=gt=>{const wt=gt<0?1:-1;He(),ze(wt),le.current=wt,re(wt),Qe(!0),an()},Ve=gt=>{if(Math.abs(gt)>km&&Ze){Ae(gt);return}le.current=null,re(null),Ce(null),$e(null),Qe(!0),Y(0),st()},Ge=gt=>{if(gt.touches.length!==1||j.current)return;const wt=gt.touches[0];A.current=!0,P.current={x:wt.clientX,y:wt.clientY},f.current="none",G.current=0,R.current=!1},bt=gt=>{if(!P.current||gt.touches.length!==1||j.current)return;const wt=gt.touches[0],tn=wt.clientX-P.current.x,Ot=wt.clientY-P.current.y;if(f.current==="none"){if(Math.abs(tn)<10&&Math.abs(Ot)<10)return;if(Math.abs(tn)>Math.abs(Ot)){if(!Ze)return;f.current="horizontal"}else if(Ot>0){if(!qe)return;f.current="vertical"}else return}if(f.current==="horizontal"){R.current=!0,Ie(!0),G.current=tn,Y(tn),gt.preventDefault();return}f.current==="vertical"&&(R.current=!0,Ie(!0),b.current=Ot,oe(Ot),gt.preventDefault())},Ut=()=>{if(!P.current)return;const gt=f.current,wt=R.current;if(wt&&gt==="horizontal")Ve(G.current),ie();else if(wt&&gt==="vertical"){const tn=b.current;if(qe&&tn>Mm){const Ot=window.innerHeight;b.current=Ot,de(!0),oe(Ot),ve("closing")}else b.current=0,oe(0);ie()}else gt==="horizontal"&&Math.abs(G.current)>0&&(Ve(G.current),ie());P.current=null,f.current="none",G.current=0,R.current=!1,Ie(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",bt,{passive:!1}),document.addEventListener("touchend",Ut),document.addEventListener("touchcancel",Ut),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",bt),document.removeEventListener("touchend",Ut),document.removeEventListener("touchcancel",Ut)}},[se,Ze,Qe,st,He,qe,an,ze]);const _e=a.useCallback(()=>{const ie=(C==null?void 0:C())??w??null;ie&&U&&(J(ie),te(!0)),ve("closing")},[C,w,U]);a.useEffect(()=>{const ie=Ge=>{if(Ge.key==="Escape"){if(l&&d||se==="closing")return;Bt(),_e();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||se!=="open"||!Ze)return;Ge.preventDefault();const bt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&_.current===bt||Gt(bt)},Ae=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const bt=Ge.key==="ArrowLeft"?-1:1;_.current===bt&&Bt()},Ve=()=>{Bt()};return window.addEventListener("keydown",ie),window.addEventListener("keyup",Ae),window.addEventListener("blur",Ve),()=>{window.removeEventListener("keydown",ie),window.removeEventListener("keyup",Ae),window.removeEventListener("blur",Ve),Bt()}},[se,l,d,_e,Ze,Gt,Bt]),a.useEffect(()=>{se!=="open"&&Bt()},[se,Bt]);const De=()=>{se==="closing"||s||_e()},Oe=se==="open",Ne=se==="closing",rt=Ee>0?Math.max(0,1-Ee/500):1,ke=Ee>0?Math.max(.35,1-Ee/500):1,Ye=a.useCallback(ie=>{if(!(ie.propertyName!=="transform"||!j.current)){if(le.current!==null){Zt();return}He(),Qe(!1)}},[He,Qe,Zt]),Ke=se==="closing"?W??w:w,Et=Ke&&U&&(se==="opening"||Ne)?Fm(Ke,U):void 0,xt=We&&ne?Ct(ne,"center"):Ee>0?`translateY(${Ee}px)`:Et,ft=U?Io(U,O):null,Wt=!!(Ke&&U),Tt=Wt&&(se==="closing"||se==="open"&&N),jt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:xt,opacity:Ee>0?ke:Wt?1:se==="opening"||Ne?0:1,transition:ye&&!be?"none":be?`transform ${ji}ms ${dn}`:q?`transform ${$n}ms ${dn}, opacity ${$n}ms ${dn}`:Tt?`transform ${$n}ms ${dn}`:se==="opening"||Ne?`opacity ${$n}ms ${dn}`:"none",pointerEvents:Fe&&Oe&&!We?"auto":"none",touchAction:Fe&&Oe?"none":void 0,zIndex:1,overflow:Fe?"hidden":void 0},Ft={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Oe&&!We?"auto":"none"},Pt=(ie,Ae,Ve="adjacent")=>{const Ge=At(ie);if(!Ge)return{display:"none"};const bt=Ve==="far"?Ae==="left"?"far-left":"far-right":Ae==="left"?"left-adjacent":"right-adjacent",{start:Ut}=ue!==null?Pl(Ge,bt,ue,O):{start:Ve==="far"?Ko(Ge,Ae,O):Ri(Ge,Ae,O)},gt=Io(Ut,O),wt=Ct(ie,bt),tn=!We&&Ve==="adjacent"&&Oe&&!Z?qm(Ge,Ae,O):null,Ot=Ve==="far"&&We&&ue===(Ae==="left"?-1:1),fn=ye&&!be?!1:be,bn=Ve==="adjacent"&&Oe&&Z&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:wt??(tn?`translate(${tn.x}px, ${tn.y}px)`:void 0),opacity:Ve==="far"?Oe&&Ot?1:0:Oe?1:0,transition:fn?Ve==="far"?`transform ${ji}ms ${dn}`:`transform ${ji}ms ${dn}, opacity ${$n}ms ${dn}`:bn?`transform ${$n}ms ${dn}`:se==="opening"||Ne?`opacity ${$n}ms ${dn}`:"none",pointerEvents:"none",zIndex:1}},en=(ie,Ae)=>{const Ve=At(ie);return Ve?Vm(Ri(Ve,Ae,O),Ae,O):null},yt=ie=>Ae=>{if(!s){if(A.current){A.current=!1;return}Ae.stopPropagation(),ht(ie)}},zt=Xe?en(Xe,"left"):null,at=vt?en(vt,"right"):null,_t=zt?Io(zt,O):null,qt=at?Io(at,O):null;return r.jsxs("div",{ref:T,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:se==="open"?"none":void 0},onClick:De,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Oe?rt:0,transition:ye?"none":`opacity ${$n}ms ${dn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:I,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Oe?1:0,transition:ye?"none":`opacity ${$n}ms ${dn}`,pointerEvents:"none"},children:r.jsx(Im,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:De})})]}),Oe&&kt&&r.jsx(Ro,{media:kt,style:Pt(kt,"left","far"),onMeasure:tt,onTransitionEnd:Ye},`far-prev-${kt.url}`),Oe&&Xe&&r.jsxs(r.Fragment,{children:[r.jsx(Ro,{media:Xe,style:Pt(Xe,"left"),onMeasure:tt,onTransitionEnd:Ye},`prev-${Xe.url}`),_t&&r.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:s||ye?"default":"pointer",pointerEvents:s||ye?"none":"auto",zIndex:3},onClick:yt(-1)})]}),Oe&&vt&&r.jsxs(r.Fragment,{children:[r.jsx(Ro,{media:vt,style:Pt(vt,"right"),onMeasure:tt,onTransitionEnd:Ye},`next-${vt.url}`),qt&&r.jsx("div",{style:{position:"absolute",top:qt.top,left:qt.left,width:qt.width,height:qt.height,cursor:s||ye?"default":"pointer",pointerEvents:s||ye?"none":"auto",zIndex:3},onClick:yt(1)})]}),Oe&&Ht&&r.jsx(Ro,{media:Ht,style:Pt(Ht,"right","far"),onMeasure:tt,onTransitionEnd:Ye},`far-next-${Ht.url}`),U&&ne&&(Fe?r.jsx(Ym,{src:ne.url,phase:se,onMediaElement:Qt,wrapperStyle:jt,videoStyle:Ft,onLoadedMetadata:Rt,onTransitionEnd:Ye},`${n}-${ne.url}`):r.jsx("img",{ref:Qt,src:ne.url,alt:ne.name,onLoad:Rt,onTransitionEnd:Ye,style:jt},`${n}-${ne.url}`))]})}function Zm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:v}=e,w=(v==null?void 0:v.display)==="cover",C=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[x,$]=C.split(":").map(Number),k=`${h?$:x} / ${h?x:$}`,H=c.entryWidth??.2,M=c.columnsCount,B=y.scalingValue(H,n),P=y.scalingValue(c.horizontalGap??0,n),b=B,G=B,f={width:b,...w?{aspectRatio:k,height:"auto",overflow:"hidden"}:{height:"auto"}},R=w?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},A=a.useRef(null),[j,K]=a.useState(!1),[le,X]=a.useState([]),[z,_]=a.useState(0),[L,E]=a.useState(0),[D,U]=a.useState(null),[Q,O]=a.useState({title1:"",title2:"",title3:""}),ge=(()=>{const fe={},$e=A.current?getComputedStyle(A.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(fe["--cntrl-article-width"]=$e),fe})(),g=!n||i||o,he=a.useMemo(()=>Em(d),[d]),se=t??[],ve=se.length%M||M,Ee=ve<M&&se.length>0,oe=se.length-ve,xe=Ee?Math.floor((M-ve)/2)+1:1,Y=a.useMemo(()=>Nm(se),[se]),be=a.useMemo(()=>zm(se),[se]),me=(fe,$e,N)=>{if(n&&!o&&!i)return;const te=Y.findIndex(J=>J.gridIndex===fe);if(te<0)return;const W=Y[te];E(te),X(W.items),_($e),O(W.entry),U(N??null),K(!0)},ue=a.useCallback(()=>{K(!1),U(null)},[]),re=a.useCallback(()=>{const fe=Y[L];return!fe||!A.current?D:_m(A.current,fe.gridIndex,w?"cover":"contain")??D},[Y,L,D,w]),Le=a.useCallback(fe=>{if(Y.length>1){const $e=Y.length,N=(L+fe+$e)%$e,te=Y[N],W=Math.min(z,te.items.length-1);E(N),X(te.items),_(W),O(te.entry);return}_($e=>($e+fe+le.length)%le.length)},[Y,L,z,le.length]),Ce=Y.length>1||le.length>1;return a.useEffect(()=>{if(!j||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[j]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:he}}),r.jsx(Dm,{mediaList:be}),r.jsx("div",{ref:A,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${M}, ${B})`,rowGap:0,columnGap:P,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:se.map((fe,$e)=>{const N=$a(fe.gallery),te=Sa(N),W=te.filter(Ie=>Ie.lightboxMedia).map(Ie=>Ie.lightboxMedia),J=Math.floor($e/M)===Math.ceil(se.length/M)-1,Z=Ee&&$e>=oe?`${xe+($e-oe)}`:void 0,ce=te[0],pe=ce!=null&&ce.lightboxMedia?W.findIndex(Ie=>Ie.url===ce.lightboxMedia.url):-1,ye=r.jsx("div",{className:`${d}-item-image-wrapper`,style:f,children:te.length>0&&r.jsx(Xm,{media:ce.displayMedia,gridIndex:$e,className:`${d}-item-${Hi(ce.displayMedia)?"video":"image"}`.trim(),style:R,onMediaClick:g&&pe>=0?Ie=>me($e,pe,Ml(Ie.currentTarget,w?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,J?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...Z?{gridColumn:Z}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:G}})}),r.jsx("a",{className:`${d}-item-image-link`,children:ye}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:G}})})]})},$e)})}),j&&typeof document<"u"&&(()=>{const fe=(s?document.getElementById(s):null)??document.body;return Wi.createPortal(r.jsx("div",{style:ge,"data-selection":"none",children:r.jsx(Jm,{prefix:d,items:le,index:z,entry:Q,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ce,lightboxEntries:Y,entryIdx:L,layoutId:l,sourceRect:D,resolveCloseSourceRect:re,onClose:ue,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),fe)})()]})}const Qm=`import { CommonComponentProps } from '../props';
6211
+ `}const ls={url:"",name:"",objectFit:"cover"},$n=500,ji=650,dn="cubic-bezier(0.22, 1, 0.36, 1)",Mm=72,km=50,Pm=1e4,Am=650,Wm=500;function Fm(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function Ml(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Kr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function _m(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ml(i,n):null}function Nm(e){return e.reduce((t,n,i)=>{const o=$a(n.gallery),s=Sa(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return s.length===0||t.push({gridIndex:i,items:s,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Di(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function cs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Di(e,i,n)}const Hm=.03;function kl(e){return e.width*Hm}const Ir={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Io(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function ds(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Om(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Xr(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function Bm(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xr(e,t.width,t.height)}function jm(e,t){if(Hi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function zm(e){const t=new Set,n=[];for(const i of e){const o=$a(i.gallery),l=Sa(o);for(const s of l)for(const d of[s.displayMedia,s.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Dm({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Hi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ri(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:d}=n,c=kl(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function Ko(e,t,n){const i=Ri(e,t,n);return{...i,left:2*i.left-e.left}}function Vm(e,t,n){const{left:i,width:o}=n,l=kl(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function Pl(e,t,n,i){const o=Ri(e,"left",i),l=Ri(e,"right",i),s=Ko(e,"left",i),d=Ko(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function Gm(e,t,n,i){const{start:o,end:l}=Pl(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function qm(e,t,n){const i=Ri(e,t,n),o=Ko(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Al(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function $a(e){if(!e)return;if(Al(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??ls,i??o??ls]}]}function Km(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Um(e){const[t]=e.media;return t!=null&&t.url?t:null}function Sa(e){if(!Array.isArray(e)||e.length===0)return[];if(Al(e)){const t=[];for(const n of e){const i=Km(n);if(!i)continue;const o=Um(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Hi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Xm({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Hi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Ym({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function Ro({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Hi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function Jm({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:v,sourceRect:w,resolveCloseSourceRect:C,onClose:h,onPrev:x,onNext:$}){const T=a.useRef(null),I=a.useRef(null),k=a.useRef(null),N=a.useRef(new Map),[M,B]=a.useState(0),P=a.useRef(null),b=a.useRef(0),X=a.useRef(0),f=a.useRef("none"),R=a.useRef(!1),A=a.useRef(!1),j=a.useRef(!1),q=a.useRef(null),le=a.useRef(null),Y=a.useRef(null),z=a.useRef(()=>{}),H=a.useRef(null),L=a.useRef(null),E=a.useRef(null),D=a.useRef(!1),[K,Q]=a.useState(null),[O,he]=a.useState(Ir),[g,me]=a.useState(0),[ae,we]=a.useState("opening"),[ke,ne]=a.useState(0),[ye,U]=a.useState(0),[be,ge]=a.useState(!1),[pe,oe]=a.useState(null),[Se,Ie]=a.useState(null),[fe,xe]=a.useState(null),[_,ee]=a.useState(!1),[W,J]=a.useState(null),[Z,ce]=a.useState(!1),ue=a.useRef(!1),[ve,Le]=a.useState(!1),[G,de]=a.useState(!1),Ee=a.useRef(n),te=a.useRef(void 0),ie=t[n],Fe=ie?Hi(ie):!1,We=ye!==0||be,qe=!s&&(!l||!!d),Ze=c&&!s,ct=u.length>1,pt=a.useCallback((re,Ae)=>t.length<=1?null:t[(re+Ae+t.length)%t.length]??null,[t]),Xe=ct?Di(u,m,-1):pt(n,-1),vt=ct?Di(u,m,1):pt(n,1),$t=pe===-1&&We?ct&&Se!==null?Di(u,Se,-1):fe!==null?pt(fe,-1):null:null,et=pe===1&&We?ct&&Se!==null?Di(u,Se,1):fe!==null?pt(fe,1):null:null,je=$t&&$t.url!==(Xe==null?void 0:Xe.url)?$t:null,dt=et&&et.url!==(vt==null?void 0:vt.url)?et:null,mt=Xe&&Ze?(()=>{const re=ct?cs(u,m,-1):t.length>2?pt((n-1+t.length)%t.length,-1):null;return re&&re.url!==Xe.url?re:null})():null,ot=vt&&Ze?(()=>{const re=ct?cs(u,m,1):t.length>2?pt((n+1)%t.length,1):null;return re&&re.url!==vt.url?re:null})():null,kt=je??mt,Ht=dt??ot,tt=a.useCallback((re,Ae,Ve)=>{if(!re||!Ae||!Ve)return;const Ge=N.current,bt=Ge.get(re);(bt==null?void 0:bt.width)===Ae&&(bt==null?void 0:bt.height)===Ve||(Ge.set(re,{width:Ae,height:Ve}),B(Ut=>Ut+1))},[]),At=a.useCallback(re=>{if(!(re!=null&&re.url))return null;const Ae=N.current.get(re.url);return Bm(I.current,Ae)},[M,g]),It=a.useCallback(()=>{if(!ie)return;const re=At(ie);if(re){Q(re);return}const Ae=I.current;Ae&&Q(ds(Ae))},[ie,At]),ze=a.useCallback(re=>{if(ct){const Ae=u.length;Ie((m+re+Ae)%Ae),xe(null);return}t.length>1&&(xe((n+re+t.length)%t.length),Ie(null))},[ct,u.length,m,t.length,n]),Qe=a.useCallback(re=>{j.current=re,ge(re)},[]),He=a.useCallback(()=>{q.current!==null&&(window.clearTimeout(q.current),q.current=null)},[]),st=a.useCallback(()=>{He(),q.current=window.setTimeout(()=>{He(),Qe(!1)},ji+32)},[He,Qe]),St=a.useCallback(()=>{const re=T.current;if(!re){he({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ir.width,height:typeof window<"u"?window.innerHeight:Ir.height});return}const Ae=re.getBoundingClientRect();he({left:Ae.left,top:Ae.top,width:Ae.width,height:Ae.height})},[]),Ct=a.useCallback((re,Ae)=>{if(We){if(ve&&!be)return`translate(${ye}px, 0px)`;if(be&&pe!==null){const Ve=At(re);if(!Ve)return;const{x:Ge,y:bt}=Gm(Ve,Ae,pe,O);return`translate(${Ge}px, ${bt}px)`}if(be)return"translate(0px, 0px)"}},[We,ve,be,ye,pe,O,At]),Zt=a.useCallback(()=>{const re=le.current;le.current=null,He(),Qe(!1),oe(null),Ie(null),xe(null),U(0),Le(!1),R.current=!1,X.current=0,f.current="none",re===-1?x():re===1&&$()},[He,Qe,x,$]),an=a.useCallback(()=>{He(),q.current=window.setTimeout(()=>{le.current!==null&&Zt()},ji+32)},[He,Zt]),sn=a.useCallback(()=>{He(),le.current=null,Qe(!1),oe(null),Ie(null),xe(null),U(0),Le(!1),R.current=!1,X.current=0,f.current="none"},[He,Qe]),ht=a.useCallback(re=>{if(!(!Ze||!K)){if(j.current){if(le.current===re){Y.current=re,Zt();return}sn()}He(),ze(re),le.current=re,oe(re),Qe(!0),an()}},[Ze,K,Zt,sn,He,ze,Qe,an]);z.current=ht;const Bt=a.useCallback(()=>{H.current=null,D.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),Yt=a.useCallback(re=>{L.current!==null&&window.clearInterval(L.current);const Ae=D.current?Wm:Am;L.current=window.setInterval(()=>{z.current(re)},Ae)},[]),Gt=a.useCallback(re=>{H.current!==re&&(Bt(),H.current=re,D.current=!1,z.current(re),Yt(re),E.current=window.setTimeout(()=>{E.current=null,H.current===re&&(D.current=!0,Yt(re))},Pm))},[Bt,Yt]),Rt=a.useCallback(()=>{const re=I.current;if(!re)return;const Ae=ie==null?void 0:ie.url,Ve=Ae?N.current.get(Ae):void 0;if(Ve!=null&&Ve.width&&(Ve!=null&&Ve.height)){Q(Xr(re,Ve.width,Ve.height));return}const Ge=k.current;if(Ge&&Ae&&(Ge.src===Ae||Ge.currentSrc===Ae)){const{width:Ut,height:gt}=Om(Ge);if(Ut&&gt){tt(Ae,Ut,gt),Q(Xr(re,Ut,gt));return}}const bt=ds(re);!bt.width||!bt.height||Q(bt)},[ie==null?void 0:ie.url,tt]),Qt=a.useCallback(re=>{if(k.current=re,!!re){if(re instanceof HTMLVideoElement){re.readyState>=1&&re.videoWidth>0&&Rt();return}re.complete&&re.naturalWidth>0&&Rt()}},[Rt]),Te=a.useCallback(()=>{St(),Rt(),me(re=>re+1)},[St,Rt]);a.useEffect(()=>{Te();const re=I.current,Ae=T.current,Ve=new ResizeObserver(()=>Te());return re&&Ve.observe(re),Ae&&Ve.observe(Ae),window.addEventListener("resize",Te),()=>{Ve.disconnect(),window.removeEventListener("resize",Te)}},[Te,n,v]),a.useLayoutEffect(()=>{if(!ie)return;const re=k.current;if(re){if(re instanceof HTMLImageElement&&re.complete&&re.naturalWidth>0){Rt();return}re instanceof HTMLVideoElement&&re.readyState>=1&&re.videoWidth>0&&Rt()}},[ie==null?void 0:ie.url,n,Rt]),a.useEffect(()=>{It()},[It,M]),a.useEffect(()=>{const re=new Set,Ae=[],Ve=Ge=>{!(Ge!=null&&Ge.url)||re.has(Ge.url)||(re.add(Ge.url),Ae.push(Ge))};t.forEach(Ve),u.forEach(Ge=>Ge.items.forEach(Ve)),Ae.forEach(Ge=>{N.current.has(Ge.url)||jm(Ge,tt)})},[t,u,tt]),a.useEffect(()=>{if(ae!=="opening"||!K)return;if(!w){we("open");return}ee(!1);const re=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ee(!0),we("open")})});return()=>cancelAnimationFrame(re)},[ae,K,w]),a.useEffect(()=>{if(ae!=="closing")return;const re=setTimeout(()=>h(),$n);return()=>clearTimeout(re)},[ae,h]),a.useEffect(()=>()=>{He()},[He]),a.useLayoutEffect(()=>{Ee.current===n&&te.current===(ie==null?void 0:ie.url)||(He(),le.current=null,oe(null),Ie(null),xe(null),ne(0),U(0),Qe(!1),de(!1),Le(!1),b.current=0,X.current=0,f.current="none",R.current=!1,P.current=null,A.current=!1,k.current=null,It(),Ee.current=n,te.current=ie==null?void 0:ie.url)},[n,ie==null?void 0:ie.url,Qe,He,It]),a.useLayoutEffect(()=>{const re=Y.current;re!==null&&(Y.current=null,requestAnimationFrame(()=>{z.current(re)}))},[n,m,ie==null?void 0:ie.url]),a.useLayoutEffect(()=>{if(ae==="opening"){ue.current=!1,ce(!1);return}if(ae!=="open"||ue.current)return;if(!Xe&&!vt){ue.current=!0;return}ce(!1);const re=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),ue.current=!0})});return()=>cancelAnimationFrame(re)},[ae,Xe==null?void 0:Xe.url,vt==null?void 0:vt.url]),a.useEffect(()=>{if(ae!=="open")return;const re=()=>{const gt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Ae=gt=>{const wt=gt<0?1:-1;He(),ze(wt),le.current=wt,oe(wt),Qe(!0),an()},Ve=gt=>{if(Math.abs(gt)>km&&Ze){Ae(gt);return}le.current=null,oe(null),Ie(null),xe(null),Qe(!0),U(0),st()},Ge=gt=>{if(gt.touches.length!==1||j.current)return;const wt=gt.touches[0];A.current=!0,P.current={x:wt.clientX,y:wt.clientY},f.current="none",X.current=0,R.current=!1},bt=gt=>{if(!P.current||gt.touches.length!==1||j.current)return;const wt=gt.touches[0],tn=wt.clientX-P.current.x,Ot=wt.clientY-P.current.y;if(f.current==="none"){if(Math.abs(tn)<10&&Math.abs(Ot)<10)return;if(Math.abs(tn)>Math.abs(Ot)){if(!Ze)return;f.current="horizontal"}else if(Ot>0){if(!qe)return;f.current="vertical"}else return}if(f.current==="horizontal"){R.current=!0,Le(!0),X.current=tn,U(tn),gt.preventDefault();return}f.current==="vertical"&&(R.current=!0,Le(!0),b.current=Ot,ne(Ot),gt.preventDefault())},Ut=()=>{if(!P.current)return;const gt=f.current,wt=R.current;if(wt&&gt==="horizontal")Ve(X.current),re();else if(wt&&gt==="vertical"){const tn=b.current;if(qe&&tn>Mm){const Ot=window.innerHeight;b.current=Ot,de(!0),ne(Ot),we("closing")}else b.current=0,ne(0);re()}else gt==="horizontal"&&Math.abs(X.current)>0&&(Ve(X.current),re());P.current=null,f.current="none",X.current=0,R.current=!1,Le(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",bt,{passive:!1}),document.addEventListener("touchend",Ut),document.addEventListener("touchcancel",Ut),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",bt),document.removeEventListener("touchend",Ut),document.removeEventListener("touchcancel",Ut)}},[ae,Ze,Qe,st,He,qe,an,ze]);const _e=a.useCallback(()=>{const re=(C==null?void 0:C())??w??null;re&&K&&(J(re),ee(!0)),we("closing")},[C,w,K]);a.useEffect(()=>{const re=Ge=>{if(Ge.key==="Escape"){if(l&&d||ae==="closing")return;Bt(),_e();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||ae!=="open"||!Ze)return;Ge.preventDefault();const bt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&H.current===bt||Gt(bt)},Ae=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const bt=Ge.key==="ArrowLeft"?-1:1;H.current===bt&&Bt()},Ve=()=>{Bt()};return window.addEventListener("keydown",re),window.addEventListener("keyup",Ae),window.addEventListener("blur",Ve),()=>{window.removeEventListener("keydown",re),window.removeEventListener("keyup",Ae),window.removeEventListener("blur",Ve),Bt()}},[ae,l,d,_e,Ze,Gt,Bt]),a.useEffect(()=>{ae!=="open"&&Bt()},[ae,Bt]);const De=()=>{ae==="closing"||s||_e()},Oe=ae==="open",Ne=ae==="closing",rt=ke>0?Math.max(0,1-ke/500):1,Me=ke>0?Math.max(.35,1-ke/500):1,Ye=a.useCallback(re=>{if(!(re.propertyName!=="transform"||!j.current)){if(le.current!==null){Zt();return}He(),Qe(!1)}},[He,Qe,Zt]),Ke=ae==="closing"?W??w:w,Et=Ke&&K&&(ae==="opening"||Ne)?Fm(Ke,K):void 0,xt=We&&ie?Ct(ie,"center"):ke>0?`translateY(${ke}px)`:Et,ft=K?Io(K,O):null,Wt=!!(Ke&&K),Tt=Wt&&(ae==="closing"||ae==="open"&&_),jt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:xt,opacity:ke>0?Me:Wt?1:ae==="opening"||Ne?0:1,transition:ve&&!be?"none":be?`transform ${ji}ms ${dn}`:G?`transform ${$n}ms ${dn}, opacity ${$n}ms ${dn}`:Tt?`transform ${$n}ms ${dn}`:ae==="opening"||Ne?`opacity ${$n}ms ${dn}`:"none",pointerEvents:Fe&&Oe&&!We?"auto":"none",touchAction:Fe&&Oe?"none":void 0,zIndex:1,overflow:Fe?"hidden":void 0},Ft={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Oe&&!We?"auto":"none"},Pt=(re,Ae,Ve="adjacent")=>{const Ge=At(re);if(!Ge)return{display:"none"};const bt=Ve==="far"?Ae==="left"?"far-left":"far-right":Ae==="left"?"left-adjacent":"right-adjacent",{start:Ut}=pe!==null?Pl(Ge,bt,pe,O):{start:Ve==="far"?Ko(Ge,Ae,O):Ri(Ge,Ae,O)},gt=Io(Ut,O),wt=Ct(re,bt),tn=!We&&Ve==="adjacent"&&Oe&&!Z?qm(Ge,Ae,O):null,Ot=Ve==="far"&&We&&pe===(Ae==="left"?-1:1),fn=ve&&!be?!1:be,bn=Ve==="adjacent"&&Oe&&Z&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:wt??(tn?`translate(${tn.x}px, ${tn.y}px)`:void 0),opacity:Ve==="far"?Oe&&Ot?1:0:Oe?1:0,transition:fn?Ve==="far"?`transform ${ji}ms ${dn}`:`transform ${ji}ms ${dn}, opacity ${$n}ms ${dn}`:bn?`transform ${$n}ms ${dn}`:ae==="opening"||Ne?`opacity ${$n}ms ${dn}`:"none",pointerEvents:"none",zIndex:1}},en=(re,Ae)=>{const Ve=At(re);return Ve?Vm(Ri(Ve,Ae,O),Ae,O):null},yt=re=>Ae=>{if(!s){if(A.current){A.current=!1;return}Ae.stopPropagation(),ht(re)}},zt=Xe?en(Xe,"left"):null,at=vt?en(vt,"right"):null,_t=zt?Io(zt,O):null,qt=at?Io(at,O):null;return r.jsxs("div",{ref:T,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:ae==="open"?"none":void 0},onClick:De,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Oe?rt:0,transition:ve?"none":`opacity ${$n}ms ${dn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:I,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Oe?1:0,transition:ve?"none":`opacity ${$n}ms ${dn}`,pointerEvents:"none"},children:r.jsx(Im,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:De})})]}),Oe&&kt&&r.jsx(Ro,{media:kt,style:Pt(kt,"left","far"),onMeasure:tt,onTransitionEnd:Ye},`far-prev-${kt.url}`),Oe&&Xe&&r.jsxs(r.Fragment,{children:[r.jsx(Ro,{media:Xe,style:Pt(Xe,"left"),onMeasure:tt,onTransitionEnd:Ye},`prev-${Xe.url}`),_t&&r.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:s||ve?"default":"pointer",pointerEvents:s||ve?"none":"auto",zIndex:3},onClick:yt(-1)})]}),Oe&&vt&&r.jsxs(r.Fragment,{children:[r.jsx(Ro,{media:vt,style:Pt(vt,"right"),onMeasure:tt,onTransitionEnd:Ye},`next-${vt.url}`),qt&&r.jsx("div",{style:{position:"absolute",top:qt.top,left:qt.left,width:qt.width,height:qt.height,cursor:s||ve?"default":"pointer",pointerEvents:s||ve?"none":"auto",zIndex:3},onClick:yt(1)})]}),Oe&&Ht&&r.jsx(Ro,{media:Ht,style:Pt(Ht,"right","far"),onMeasure:tt,onTransitionEnd:Ye},`far-next-${Ht.url}`),K&&ie&&(Fe?r.jsx(Ym,{src:ie.url,phase:ae,onMediaElement:Qt,wrapperStyle:jt,videoStyle:Ft,onLoadedMetadata:Rt,onTransitionEnd:Ye},`${n}-${ie.url}`):r.jsx("img",{ref:Qt,src:ie.url,alt:ie.name,onLoad:Rt,onTransitionEnd:Ye,style:jt},`${n}-${ie.url}`))]})}function Zm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:v}=e,w=(v==null?void 0:v.display)==="cover",C=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[x,$]=C.split(":").map(Number),k=`${h?$:x} / ${h?x:$}`,N=c.entryWidth??.2,M=c.columnsCount,B=y.scalingValue(N,n),P=y.scalingValue(c.horizontalGap??0,n),b=B,X=B,f={width:b,...w?{aspectRatio:k,height:"auto",overflow:"hidden"}:{height:"auto"}},R=w?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},A=a.useRef(null),[j,q]=a.useState(!1),[le,Y]=a.useState([]),[z,H]=a.useState(0),[L,E]=a.useState(0),[D,K]=a.useState(null),[Q,O]=a.useState({title1:"",title2:"",title3:""}),he=(()=>{const fe={},xe=A.current?getComputedStyle(A.current).getPropertyValue("--cntrl-article-width").trim():"";return xe&&(fe["--cntrl-article-width"]=xe),fe})(),g=!n||i||o,me=a.useMemo(()=>Em(d),[d]),ae=t??[],we=ae.length%M||M,ke=we<M&&ae.length>0,ne=ae.length-we,ye=ke?Math.floor((M-we)/2)+1:1,U=a.useMemo(()=>Nm(ae),[ae]),be=a.useMemo(()=>zm(ae),[ae]),ge=(fe,xe,_)=>{if(n&&!o&&!i)return;const ee=U.findIndex(J=>J.gridIndex===fe);if(ee<0)return;const W=U[ee];E(ee),Y(W.items),H(xe),O(W.entry),K(_??null),q(!0)},pe=a.useCallback(()=>{q(!1),K(null)},[]),oe=a.useCallback(()=>{const fe=U[L];return!fe||!A.current?D:_m(A.current,fe.gridIndex,w?"cover":"contain")??D},[U,L,D,w]),Se=a.useCallback(fe=>{if(U.length>1){const xe=U.length,_=(L+fe+xe)%xe,ee=U[_],W=Math.min(z,ee.items.length-1);E(_),Y(ee.items),H(W),O(ee.entry);return}H(xe=>(xe+fe+le.length)%le.length)},[U,L,z,le.length]),Ie=U.length>1||le.length>1;return a.useEffect(()=>{if(!j||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[j]),a.useEffect(()=>{!n||o||i||q(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:me}}),r.jsx(Dm,{mediaList:be}),r.jsx("div",{ref:A,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${M}, ${B})`,rowGap:0,columnGap:P,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:ae.map((fe,xe)=>{const _=$a(fe.gallery),ee=Sa(_),W=ee.filter(Le=>Le.lightboxMedia).map(Le=>Le.lightboxMedia),J=Math.floor(xe/M)===Math.ceil(ae.length/M)-1,Z=ke&&xe>=ne?`${ye+(xe-ne)}`:void 0,ce=ee[0],ue=ce!=null&&ce.lightboxMedia?W.findIndex(Le=>Le.url===ce.lightboxMedia.url):-1,ve=r.jsx("div",{className:`${d}-item-image-wrapper`,style:f,children:ee.length>0&&r.jsx(Xm,{media:ce.displayMedia,gridIndex:xe,className:`${d}-item-${Hi(ce.displayMedia)?"video":"image"}`.trim(),style:R,onMediaClick:g&&ue>=0?Le=>ge(xe,ue,Ml(Le.currentTarget,w?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,J?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...Z?{gridColumn:Z}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:X}})}),r.jsx("a",{className:`${d}-item-image-link`,children:ve}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:X}})})]})},xe)})}),j&&typeof document<"u"&&(()=>{const fe=(s?document.getElementById(s):null)??document.body;return Wi.createPortal(r.jsx("div",{style:he,"data-selection":"none",children:r.jsx(Jm,{prefix:d,items:le,index:z,entry:Q,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ie,lightboxEntries:U,entryIdx:L,layoutId:l,sourceRect:D,resolveCloseSourceRect:oe,onClose:pe,onPrev:()=>Se(-1),onNext:()=>Se(1)})}),fe)})()]})}const Qm=`import { CommonComponentProps } from '../props';
6212
6212
  import { scalingValue, useScopedStyles } from '../utils/index';
6213
6213
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6214
6214
  import { createPortal } from 'react-dom';
@@ -8993,7 +8993,7 @@ a.${e}-list-item {
8993
8993
  overflow-wrap: anywhere;
8994
8994
  word-break: break-word;
8995
8995
  }
8996
- `}const Vn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ca=["AColumn","BColumn","CColumn","DColumn","EColumn"],kn="cutLabel",io=[...Ca,kn],dr=["A","B","C","D","E"];function Wl(e){return`${e}ColumnVerticalAlign`}const Yr=["Top","Center","Bottom"];function Ta(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return dr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function hg(e){const t=Ta(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function fg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return dr.includes(n)?n:null}function Fl(e,t,n){const i=fg(e);return i?i===t?!1:hg(n[Wl(i)]):!0}function oo(e){const t=Ta(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return dr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function yg(e,t,n){if(_l(e,t,n))return oo(e);const i=oo(e);return i.kind==="baseline"?{kind:"top"}:i}function vg(e){const t=oo(e);return t.kind==="baseline"?{kind:"top"}:t}function _l(e,t,n){return Fl(e,n,t)?oo(e).kind==="baseline":!1}function xg(e){const t={};let n=!1;for(const i of dr){const o=Wl(i),l=e[o];if(e.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[o]="Top",n=!0);continue}Fl(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function bg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function wg(e){const t=oo(e).kind;return t==="baseline"?"center":t}function $g(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function fs(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Sg(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-i;return n.remove(),l}function Er(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=Sg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const d=l.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+s}function Cg(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function Tg(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Lg={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function ut(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Ig={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Rg(e){return[ut(e,"textFontFamily"),ut(e,"textFontSettings"),{type:"row",items:[ut(e,"textFontSize"),ut(e,"textLineHeight"),ut(e,"textLetterSpacing"),ut(e,"textWordSpacing")]},ut(e,"textTextAlign"),ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function Eg(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(io.map(e=>[Ig[e],Rg(e)]))}}function Uo(e,t){const n=i=>{const o=ut(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===kn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function ys(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return ln(Kt(n,t))}function vs(e,t,n,i){const o=Uo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function xs(e,t,n,i){const o=Uo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-s)/2,i)}}const gn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Mi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ki=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Pi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Mg={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},kg=["hover","focus","filled","success","error"],bs=.004,yi=.004,Mr=yi,La=50,ro=1440,ao=La/ro;function Nl(e){const t=typeof e=="number"&&e>0?e:ro;return La/t}function Pg(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return ro}const Hl={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ki(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ag(e,t=1){const n=t/e;return Object.fromEntries(gn.map(i=>[i,n]))}function Wg(){return Object.fromEntries([...Mi.map(e=>[e,0]),...ki.map(e=>[e,0])])}function Fg(){return Object.fromEntries(Pi.map(e=>[e,0]))}function Eo(e){return Object.fromEntries(gn.map(t=>[t,typeof e[t]=="number"?e[t]:Hl[t]]))}function Ol(e,t,n){const i=e-ao,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/o;return{paddingLeft:t*l,paddingRight:n*l}}function Bo(e,t,n){const i=Ia(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((l,s)=>l+s,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function _g(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=Mi[o],s=ki[o],d=typeof n[l]=="number"?n[l]:0,c=typeof n[s]=="number"?n[s]:0,u=Ol(t[o]??0,d,c);u.paddingLeft!==d&&(i[l]=u.paddingLeft),u.paddingRight!==c&&(i[s]=u.paddingRight)}return i}function Ia(e,t,n){if(e<=0)return[];const i=gn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),s=o.reduce((u,m)=>u+m,0)+ao;if(t>=s)return i;const d=[...o];let c=s-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-ao;if(m<=0)continue;const v=Math.min(c,m);d[u]-=v,c-=v}return[...d,i[e-1]]}function Ng(e,t,n){if(e<=1)return{};const i=Ia(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=gn[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function ws(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vn]}function Hg(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Og(e,t,n,i){const o=Math.min(i,e.length,gn.length),l={};for(let s=0;s<o;s+=1){const d=e[s],c=t.indexOf(d);if(c===-1)continue;const u=gn[c],m=Mi[c],v=ki[c],w=Pi[c],C=gn[s],h=Mi[s],x=ki[s],$=Pi[s],T=n[u],I=n[m],k=n[v],H=n[w];typeof T=="number"&&(l[C]=T),typeof I=="number"&&(l[h]=I),typeof k=="number"&&(l[x]=k),typeof H=="number"&&(l[$]=H)}return l}function Bl(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function Bg(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ki(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...Ag(n,o),...Wg()};if(l)for(const d of Pi)typeof t[d]=="number"&&(s[d]=t[d]);else Object.assign(s,Fg());return Bl(e,s)?s:e}function jg(e,t,n){const i=xg(e);i&&(e={...e,...i});const o=Nl(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,d=Ki(e),c=Ki(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof l=="number"?l:typeof s=="number"?s:Vn.length,v=k=>{if(u)return k;const H=Eo({...t,...k}),M=Ki(k),B=Bo(m,M,H),P=_g(m,B,{...t,...k});return Object.keys(P).length===0?k:{...k,...P}};if(typeof l=="number"&&l!==s)return e;const w=ws(e),C=ws(t);if(!Hg(w,C))return v({...e,...Og(w,C,t,m)});if(d<c&&typeof m=="number"&&!u){const k=Eo({...t,...e});return v({...e,...Ng(m,d,k)})}if(u){const k=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(d-o)/2);return k>H?{...e,textPaddingLR:H}:e}const h=Eo({...t,...e}),x=Bo(m,c,Eo(t)),T=Bo(m,d,h).some((k,H)=>k<(x[H]??k)),I=gn.some(k=>{const H=e[k],M=t[k];return typeof H=="number"&&typeof M=="number"&&H!==M});return T||I?v(e):e}function zg(e,t,n,i){const o=t.slice(0,e).reduce((s,d)=>s+d,0),l=n.slice(e+1,t.length-1).reduce((s,d)=>s+d,0);return Math.max(ao,i-o-l-ao)}function Dg(e,t){return Math.random()*(t-e)+e}function Vg(e){return Object.fromEntries(gn.map(t=>[t,typeof e[t]=="number"?e[t]:Hl[t]]))}function kr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Gg(e,t,n,i,o,l){return e.slice(0,t).map((s,d)=>{const c=Mi[d],u=ki[d],m=Pi[d];return{key:s,textPrefix:Lg[s],widthKey:gn[d],width:n[gn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:l[m]}})}function qg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:v,wrapperWidth:w,entriesCount:C,cellMinHeight:h,dividerWidth:x,showVisibility:$,cut:T,showCut:I,cutCellMinHeight:k,cutLabel:H,imageSize:M,imageOnHover:B,entryHoverEffect:P,entryHoverShowOption:b,rowPaddingTop:G,rowPaddingBottom:f,rowPaddingTopB:R,columnsOrder:A,textPaddingLR:j,textColor:K,backgroundColor:le,dividerColor:X,textHoverColor:z,backgroundHoverColor:_,dividerHoverColor:L}=e,[E,D]=a.useState(void 0),[U,Q]=a.useState(null),O=B==="on"&&(!n||i),ge=(T??0)>0,g=v==="b",he=a.useRef(null),se=a.useRef(null),[ve,Ee]=a.useState(null),[oe,xe]=a.useState(ro),Y=Nl(oe),be=Math.max(0,((w??0)-Y)/2),me=Math.min(j??0,be),ue=Math.max(me,yi),re=((w??0)+Y)/2;a.useLayoutEffect(()=>{if(!n){xe(ro);return}const Te=()=>{xe(Pg(he.current))};Te();const _e=he.current;if(!_e)return;const De=new ResizeObserver(Te);De.observe(_e);let Oe=_e;for(;Oe&&!Oe.style.getPropertyValue("--cntrl-article-width");)Oe=Oe.parentElement;return Oe&&De.observe(Oe),()=>De.disconnect()},[n,s]),a.useEffect(()=>{D(void 0)},[T,I,t,C]),a.useEffect(()=>{n&&!i&&D(void 0)},[n,i]);const Le=y.buildColorVars(c,{textColor:K,backgroundColor:le,dividerColor:X,textHoverColor:z,backgroundHoverColor:_,dividerHoverColor:L},Mg,kg),Ce=l&&l!=="default"?`${c}-state-${l}`:"",$e=`${!n||i?P==="default"?`${c}-entry-hover-default`:P==="blinds"?`${c}-entry-hover-blinds`:P==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ce}`.trim(),N=P==="reveal"&&(!n||i),te=($==null?void 0:$[0])??!1,W=($==null?void 0:$[1])??!1,J=a.useRef(e),Z=a.useRef(s);a.useEffect(()=>{if(!d||!n){J.current=e,Z.current=s;return}if(Z.current!==s){J.current=e,Z.current=s;return}const Te=J.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){J.current=e;return}const De=jg(e,Te,{designWidth:oe});J.current=e,Bl(e,De)&&d(De)},[e,d,n,s,oe]);const ce=a.useMemo(()=>Vg(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),pe=a.useMemo(()=>kr(e,Mi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ye=a.useMemo(()=>kr(e,ki),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ie=a.useMemo(()=>kr(e,Pi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),q=a.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Vn],[A]),de=a.useMemo(()=>Gg(q,m,ce,pe,ye,Ie),[q,m,ce,pe,ye,Ie]),Me=Ki(e),ee=a.useMemo(()=>gn.slice(0,m).map(Te=>ce[Te]),[m,ce]),ne=a.useMemo(()=>Ia(m,Me,ce),[m,Me,ce]),Fe=a.useMemo(()=>Bo(m,Me,ce),[m,Me,ce]),We=a.useMemo(()=>de.map((Te,_e)=>Ol(Fe[_e]??0,Te.paddingLeft,Te.paddingRight)),[de,Fe]),qe=a.useMemo(()=>{const Te=C===0?1/0:C;return(t??[]).slice(0,Te).map((De,Oe)=>({id:Oe,cells:Object.fromEntries(Vn.map(Ne=>[Ne,De[Ne]??""])),image:De.image,link:De.link}))},[t,C]),Ze=ge?E??T:qe.length,ct=a.useMemo(()=>ge?qe.slice(0,Ze):qe,[qe,ge,Ze]),pt=ge&&Ze<qe.length,Xe=ct.length>1||pt,vt=[te?`${c}-divider-top`:"",W||Xe?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,et=()=>{if(!$t)return;const Te=E??T;if(!I){D(qe.length);return}D(Math.min(Te+I,qe.length))},je=Te=>y.scalingValue(Te,n??!1),dt=g?R??0:G??0,mt=f??0,ot=h??0,kt=dt+ot/2,Ht=Math.max(mt,Mr),tt=gs(0,ct.length,te,W,pt,x??0,n??!1).borderTopWidth,At=ve!=null?`${ve}px`:`calc(${tt} + ${je(kt)})`,It=g?"rowPaddingTopB":"rowPaddingTop",ze=de[0],Qe=de[de.length-1],He=We[0],st=We[We.length-1],St=ze&&He?Math.max(He.paddingLeft,yi):0,Ct=Qe&&st?Math.max(st.paddingRight,yi):0,Zt=Me,an=Te=>{const _e=he.current;if(!_e)return{x:0,y:0};const De=_e.getBoundingClientRect();return{x:Te.clientX-De.left+hs,y:Te.clientY-De.top+hs}},sn=(Te,_e)=>{if(!O)return;const De=Te.image;if(!(De!=null&&De.url)){Q(null);return}const{x:Oe,y:Ne}=an(_e),rt=(M==null?void 0:M.min)??80,ke=(M==null?void 0:M.max)??320,Ye=(U==null?void 0:U.rowId)===Te.id?U.widthPx:Dg(rt,ke);Q({rowId:Te.id,url:De.url,objectFit:"contain",isVideo:dg(De),widthPx:Ye,x:Oe,y:Ne})},ht=Te=>{if(!O||!U)return;const{x:_e,y:De}=an(Te);Q(Oe=>!Oe||Oe.x===_e&&Oe.y===De?Oe:{...Oe,x:_e,y:De})},Bt=()=>{Q(null)},Yt=Te=>{N&&ps(Te,c),O&&Q(null)},Gt=Te=>{N&&ms(Te,c)};a.useLayoutEffect(()=>{if(!u||g){Ee(null);return}const Te=se.current,_e=Te==null?void 0:Te.parentElement;if(!Te||!_e){Ee(null);return}const De=()=>{const Ne=Te.querySelector("[data-list-row]");if(!Ne){Ee(null);return}const rt=_e.getBoundingClientRect(),ke=Ne.getBoundingClientRect();Ee(ke.top-rt.top+ke.height/2)};De();const Oe=new ResizeObserver(De);return Oe.observe(Te),Oe.observe(_e),()=>Oe.disconnect()},[u,g,ct,dt,mt,ot,t,e,de,Fe,oe,x,te,W,pt]);const Rt=a.useMemo(()=>!g&&Ca.some(Te=>{const _e=Te.charAt(0),De=e[`${Te}VerticalAlign`];return _l(De,e,_e)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Ye;const Te=he.current;if(!Te)return;const _e=()=>{Te.querySelectorAll("[data-list-col]").forEach(Ke=>{Ke.style.transform="";const Et=Ke.querySelector(`.${c}-list-col`);Et&&(Et.style.minHeight="",Et.style.height="");const xt=Ke.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})};if(g||!Rt){_e();return}const De=()=>{const Ke=Array.from(Te.querySelectorAll("[data-list-row]")),Et=`${c}-list-col`,xt=`${c}-baseline-probe`;Ke.forEach(ft=>{ft.querySelectorAll("[data-list-col]").forEach(Wt=>{Wt.style.transform="";const Tt=Wt.querySelector(`.${Et}`);Tt&&(Tt.style.minHeight="",Tt.style.height="");const jt=Wt.querySelector(`.${c}-list-col-title`);jt&&(jt.style.transform="")})}),Ke.forEach(ft=>{const Wt=Array.from(ft.querySelectorAll("[data-list-col]"));Cg(ft,Wt,Et)}),Te.offsetHeight,Ke.forEach(ft=>{const Wt=Array.from(ft.querySelectorAll("[data-list-col]")),Tt=ft.getBoundingClientRect().top,jt=new Map,Ft=Wt.map(yt=>{const zt=yt.querySelector(`.${c}-list-col-title`),at={el:yt,titleEl:zt,letter:yt.getAttribute("data-col-letter")??"",kind:yt.getAttribute("data-valign")??"top",anchor:yt.getAttribute("data-valign-anchor")};return jt.set(at.letter,at),at}),Pt=new Map,en=(yt,zt)=>{const at=Pt.get(yt.letter);if(at!==void 0)return at;const _t=yt.anchor?jt.get(yt.anchor):void 0;if(yt.kind!=="baseline"||!_t||zt.has(yt.letter)){const Ge=Er(yt,Tt,Et,xt);return Pt.set(yt.letter,Ge),Ge}zt.add(yt.letter);const qt=en(_t,zt);zt.delete(yt.letter);const ie=Er(yt,Tt,Et,xt),Ae=qt-ie;Tg(yt.titleEl,Ae);const Ve=Er(yt,Tt,Et,xt);return Pt.set(yt.letter,Ve),Ve};Ft.forEach(yt=>en(yt,new Set))})};let Oe=null;const Ne=()=>{Oe===null&&(Oe=requestAnimationFrame(()=>{Oe=null,De()}))};De();const rt=new ResizeObserver(()=>Ne());rt.observe(Te);let ke=!1;return typeof document<"u"&&((Ye=document.fonts)!=null&&Ye.ready)&&document.fonts.ready.then(()=>{ke||Ne()}),()=>{ke=!0,Oe!==null&&(cancelAnimationFrame(Oe),Oe=null),rt.disconnect(),_e()}},[Rt,g,e,t,oe,ct,Fe]);const Qt=a.useMemo(()=>gg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Qt}}),r.jsx("div",{style:Le,children:r.jsxs("div",{ref:he,className:`${c}-wrapper ${$e}${vt?` ${vt}`:""}${g?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(w??0,n),...!g&&u?{[`--${c}-first-entry-handle-top`]:At}:{}},onMouseMove:O?ht:void 0,onMouseLeave:O?Bt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[ct.map((Te,_e)=>{var rt;const De=(((rt=Te.link)==null?void 0:rt.length)??0)>0,Oe=De&&(!n||i)?"a":"div",Ne=gs(_e,ct.length,te,W,pt,x??0,n??!1);return r.jsxs(Oe,{ref:_e===0?ke=>{se.current=ke}:void 0,className:`${c}-list-item${De||b==="always"?` ${c}-list-item-has-link`:""}`,...De?{href:Te.link,target:"_blank"}:{},style:Ne,onMouseEnter:ke=>{N&&(De||b==="always")&&ps(ke,c),O&&sn(Te,ke)},onMouseLeave:ke=>{N&&(De||b==="always")&&ms(ke,c)},children:[dt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:je(dt)}}),r.jsxs("div",{className:`${c}-list-cols-row${g?"":` ${c}-list-cols-row-h`}${u&&_e===0&&g?` ${c}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:je(ot)},children:[de.map((ke,Ye)=>{const Ke=Ye===de.length-1,Et=We[Ye],xt=ke.paddingBottom,ft=pg(Te.cells[ke.key]),Wt=g&&ft&&xt>0,Tt=g?{minHeight:je(ot)}:{width:je(Fe[Ye])},jt=g?{paddingLeft:je(me),paddingRight:je(me)}:{paddingLeft:je(Et.paddingLeft),paddingRight:je(Et.paddingRight)},Ft=ke.textPrefix.charAt(0),Pt=g?vg(e[`${ke.textPrefix}VerticalAlign`]):yg(e[`${ke.textPrefix}VerticalAlign`],e,Ft),en=g&&ft&&u&&_e===0;return r.jsxs("div",{className:g?`${c}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":Ft,"data-valign":Pt.kind,...Pt.kind==="baseline"?{"data-valign-anchor":Pt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ke?` ${c}-list-col-last`:""}`,style:{...jt,...Tt,...g?{justifyContent:fs(Pt.kind)}:{}},"data-test":ke.width,children:r.jsx("span",{className:vs(e,ke.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...ys(Uo(e,ke.textPrefix),n),...xs(e,ke.textPrefix,c,n),...g?{}:bg(Pt.kind)},children:Te.cells[ke.key]??null})}),Wt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:je(xt)}}),en&&r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":ke.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:je(Math.max(xt,Mr))}})]},ke.key)}),u&&_e===0&&g&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(re),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:je(ue),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(re),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:je(Math.max(ue,Me-ue)),width:je(ue),height:"100%"}})]})]}),!g&&mt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:je(mt)}}),u&&_e===0&&!g&&r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:je(Ht)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":It,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:tt,left:0,width:"100%",height:je(Math.max(dt,Mr))}})},"row-padding-handles"),u&&!g&&ze&&Qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":ze.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Fe[0]-((He==null?void 0:He.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:je(St),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Qe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Fe[de.length-1]-((st==null?void 0:st.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:je(Zt-Ct),width:je(Ct),height:"100%"}})]},"column-edge-padding-handles"),u&&!g&&de.slice(0,-1).map((Te,_e)=>{const De=de[_e+1],Oe=ne.slice(0,_e+1).reduce((Ke,Et)=>Ke+Et,0),Ne=We[_e],rt=We[_e+1],ke=Math.max(Ne.paddingRight,yi),Ye=Math.max(rt.paddingLeft,yi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Fe[_e]-Ne.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:je(Oe-ke),width:je(ke),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":De.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Fe[_e+1]-rt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:je(Oe),width:je(Ye),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!g&&de.slice(0,-1).map((Te,_e)=>{const De=zg(_e,ne,ee,Me),Ne=ne.slice(0,_e+1).reduce((rt,ke)=>rt+ke,0)-bs/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(La),"data-controls-max-fraction":String(De),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:je(Ne),width:je(bs),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),pt&&(()=>{const Te=Uo(e,kn),_e=wg(e.cutLabelVerticalAlign),De=Te.textTextAlign==="justify"||g;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:je(k??0),cursor:$t?"pointer":"default",...mg(W,x??0,n??!1)},onClick:$t?et:void 0,onMouseEnter:N||O?Yt:void 0,onMouseLeave:N?Gt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...g?{paddingLeft:je(me),paddingRight:je(me)}:{},justifyContent:$g(Te.textTextAlign),alignItems:fs(_e)},children:r.jsx("span",{className:vs(e,kn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...ys(Te,n),...xs(e,kn,c,n),...De?{width:"100%"}:{}},children:H})})})})(),O&&U&&(()=>{const Te=Oo(U.widthPx),_e={width:Te,height:"auto",maxHeight:Te,objectFit:"contain",left:U.x,top:U.y,position:"absolute"};return r.jsx(ug,{media:U,className:U.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:_e},`${U.rowId}-${U.url}`)})()]})})]})}const Kg=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
8996
+ `}const Vn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ca=["AColumn","BColumn","CColumn","DColumn","EColumn"],kn="cutLabel",io=[...Ca,kn],dr=["A","B","C","D","E"];function Wl(e){return`${e}ColumnVerticalAlign`}const Yr=["Top","Center","Bottom"];function Ta(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return dr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function hg(e){const t=Ta(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function fg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return dr.includes(n)?n:null}function Fl(e,t,n){const i=fg(e);return i?i===t?!1:hg(n[Wl(i)]):!0}function oo(e){const t=Ta(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return dr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function yg(e,t,n){if(_l(e,t,n))return oo(e);const i=oo(e);return i.kind==="baseline"?{kind:"top"}:i}function vg(e){const t=oo(e);return t.kind==="baseline"?{kind:"top"}:t}function _l(e,t,n){return Fl(e,n,t)?oo(e).kind==="baseline":!1}function xg(e){const t={};let n=!1;for(const i of dr){const o=Wl(i),l=e[o];if(e.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[o]="Top",n=!0);continue}Fl(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function bg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function wg(e){const t=oo(e).kind;return t==="baseline"?"center":t}function $g(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function fs(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Sg(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-i;return n.remove(),l}function Er(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=Sg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const d=l.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+s}function Cg(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function Tg(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Lg={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function ut(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Ig={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Rg(e){return[ut(e,"textFontFamily"),ut(e,"textFontSettings"),{type:"row",items:[ut(e,"textFontSize"),ut(e,"textLineHeight"),ut(e,"textLetterSpacing"),ut(e,"textWordSpacing")]},ut(e,"textTextAlign"),ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function Eg(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(io.map(e=>[Ig[e],Rg(e)]))}}function Uo(e,t){const n=i=>{const o=ut(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===kn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function ys(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return ln(Kt(n,t))}function vs(e,t,n,i){const o=Uo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function xs(e,t,n,i){const o=Uo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-s)/2,i)}}const gn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Mi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ki=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Pi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Mg={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},kg=["hover","focus","filled","success","error"],bs=.004,yi=.004,Mr=yi,La=50,ro=1440,ao=La/ro;function Nl(e){const t=typeof e=="number"&&e>0?e:ro;return La/t}function Pg(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return ro}const Hl={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ki(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ag(e,t=1){const n=t/e;return Object.fromEntries(gn.map(i=>[i,n]))}function Wg(){return Object.fromEntries([...Mi.map(e=>[e,0]),...ki.map(e=>[e,0])])}function Fg(){return Object.fromEntries(Pi.map(e=>[e,0]))}function Eo(e){return Object.fromEntries(gn.map(t=>[t,typeof e[t]=="number"?e[t]:Hl[t]]))}function Ol(e,t,n){const i=e-ao,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/o;return{paddingLeft:t*l,paddingRight:n*l}}function Bo(e,t,n){const i=Ia(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((l,s)=>l+s,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function _g(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=Mi[o],s=ki[o],d=typeof n[l]=="number"?n[l]:0,c=typeof n[s]=="number"?n[s]:0,u=Ol(t[o]??0,d,c);u.paddingLeft!==d&&(i[l]=u.paddingLeft),u.paddingRight!==c&&(i[s]=u.paddingRight)}return i}function Ia(e,t,n){if(e<=0)return[];const i=gn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),s=o.reduce((u,m)=>u+m,0)+ao;if(t>=s)return i;const d=[...o];let c=s-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-ao;if(m<=0)continue;const v=Math.min(c,m);d[u]-=v,c-=v}return[...d,i[e-1]]}function Ng(e,t,n){if(e<=1)return{};const i=Ia(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=gn[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function ws(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vn]}function Hg(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Og(e,t,n,i){const o=Math.min(i,e.length,gn.length),l={};for(let s=0;s<o;s+=1){const d=e[s],c=t.indexOf(d);if(c===-1)continue;const u=gn[c],m=Mi[c],v=ki[c],w=Pi[c],C=gn[s],h=Mi[s],x=ki[s],$=Pi[s],T=n[u],I=n[m],k=n[v],N=n[w];typeof T=="number"&&(l[C]=T),typeof I=="number"&&(l[h]=I),typeof k=="number"&&(l[x]=k),typeof N=="number"&&(l[$]=N)}return l}function Bl(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function Bg(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ki(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...Ag(n,o),...Wg()};if(l)for(const d of Pi)typeof t[d]=="number"&&(s[d]=t[d]);else Object.assign(s,Fg());return Bl(e,s)?s:e}function jg(e,t,n){const i=xg(e);i&&(e={...e,...i});const o=Nl(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,d=Ki(e),c=Ki(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof l=="number"?l:typeof s=="number"?s:Vn.length,v=k=>{if(u)return k;const N=Eo({...t,...k}),M=Ki(k),B=Bo(m,M,N),P=_g(m,B,{...t,...k});return Object.keys(P).length===0?k:{...k,...P}};if(typeof l=="number"&&l!==s)return e;const w=ws(e),C=ws(t);if(!Hg(w,C))return v({...e,...Og(w,C,t,m)});if(d<c&&typeof m=="number"&&!u){const k=Eo({...t,...e});return v({...e,...Ng(m,d,k)})}if(u){const k=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(d-o)/2);return k>N?{...e,textPaddingLR:N}:e}const h=Eo({...t,...e}),x=Bo(m,c,Eo(t)),T=Bo(m,d,h).some((k,N)=>k<(x[N]??k)),I=gn.some(k=>{const N=e[k],M=t[k];return typeof N=="number"&&typeof M=="number"&&N!==M});return T||I?v(e):e}function zg(e,t,n,i){const o=t.slice(0,e).reduce((s,d)=>s+d,0),l=n.slice(e+1,t.length-1).reduce((s,d)=>s+d,0);return Math.max(ao,i-o-l-ao)}function Dg(e,t){return Math.random()*(t-e)+e}function Vg(e){return Object.fromEntries(gn.map(t=>[t,typeof e[t]=="number"?e[t]:Hl[t]]))}function kr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Gg(e,t,n,i,o,l){return e.slice(0,t).map((s,d)=>{const c=Mi[d],u=ki[d],m=Pi[d];return{key:s,textPrefix:Lg[s],widthKey:gn[d],width:n[gn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:l[m]}})}function qg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:v,wrapperWidth:w,entriesCount:C,cellMinHeight:h,dividerWidth:x,showVisibility:$,cut:T,showCut:I,cutCellMinHeight:k,cutLabel:N,imageSize:M,imageOnHover:B,entryHoverEffect:P,entryHoverShowOption:b,rowPaddingTop:X,rowPaddingBottom:f,rowPaddingTopB:R,columnsOrder:A,textPaddingLR:j,textColor:q,backgroundColor:le,dividerColor:Y,textHoverColor:z,backgroundHoverColor:H,dividerHoverColor:L}=e,[E,D]=a.useState(void 0),[K,Q]=a.useState(null),O=B==="on"&&(!n||i),he=(T??0)>0,g=v==="b",me=a.useRef(null),ae=a.useRef(null),[we,ke]=a.useState(null),[ne,ye]=a.useState(ro),U=Nl(ne),be=Math.max(0,((w??0)-U)/2),ge=Math.min(j??0,be),pe=Math.max(ge,yi),oe=((w??0)+U)/2;a.useLayoutEffect(()=>{if(!n){ye(ro);return}const Te=()=>{ye(Pg(me.current))};Te();const _e=me.current;if(!_e)return;const De=new ResizeObserver(Te);De.observe(_e);let Oe=_e;for(;Oe&&!Oe.style.getPropertyValue("--cntrl-article-width");)Oe=Oe.parentElement;return Oe&&De.observe(Oe),()=>De.disconnect()},[n,s]),a.useEffect(()=>{D(void 0)},[T,I,t,C]),a.useEffect(()=>{n&&!i&&D(void 0)},[n,i]);const Se=y.buildColorVars(c,{textColor:q,backgroundColor:le,dividerColor:Y,textHoverColor:z,backgroundHoverColor:H,dividerHoverColor:L},Mg,kg),Ie=l&&l!=="default"?`${c}-state-${l}`:"",xe=`${!n||i?P==="default"?`${c}-entry-hover-default`:P==="blinds"?`${c}-entry-hover-blinds`:P==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ie}`.trim(),_=P==="reveal"&&(!n||i),ee=($==null?void 0:$[0])??!1,W=($==null?void 0:$[1])??!1,J=a.useRef(e),Z=a.useRef(s);a.useEffect(()=>{if(!d||!n){J.current=e,Z.current=s;return}if(Z.current!==s){J.current=e,Z.current=s;return}const Te=J.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){J.current=e;return}const De=jg(e,Te,{designWidth:ne});J.current=e,Bl(e,De)&&d(De)},[e,d,n,s,ne]);const ce=a.useMemo(()=>Vg(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ue=a.useMemo(()=>kr(e,Mi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ve=a.useMemo(()=>kr(e,ki),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Le=a.useMemo(()=>kr(e,Pi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),G=a.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Vn],[A]),de=a.useMemo(()=>Gg(G,m,ce,ue,ve,Le),[G,m,ce,ue,ve,Le]),Ee=Ki(e),te=a.useMemo(()=>gn.slice(0,m).map(Te=>ce[Te]),[m,ce]),ie=a.useMemo(()=>Ia(m,Ee,ce),[m,Ee,ce]),Fe=a.useMemo(()=>Bo(m,Ee,ce),[m,Ee,ce]),We=a.useMemo(()=>de.map((Te,_e)=>Ol(Fe[_e]??0,Te.paddingLeft,Te.paddingRight)),[de,Fe]),qe=a.useMemo(()=>{const Te=C===0?1/0:C;return(t??[]).slice(0,Te).map((De,Oe)=>({id:Oe,cells:Object.fromEntries(Vn.map(Ne=>[Ne,De[Ne]??""])),image:De.image,link:De.link}))},[t,C]),Ze=he?E??T:qe.length,ct=a.useMemo(()=>he?qe.slice(0,Ze):qe,[qe,he,Ze]),pt=he&&Ze<qe.length,Xe=ct.length>1||pt,vt=[ee?`${c}-divider-top`:"",W||Xe?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,et=()=>{if(!$t)return;const Te=E??T;if(!I){D(qe.length);return}D(Math.min(Te+I,qe.length))},je=Te=>y.scalingValue(Te,n??!1),dt=g?R??0:X??0,mt=f??0,ot=h??0,kt=dt+ot/2,Ht=Math.max(mt,Mr),tt=gs(0,ct.length,ee,W,pt,x??0,n??!1).borderTopWidth,At=we!=null?`${we}px`:`calc(${tt} + ${je(kt)})`,It=g?"rowPaddingTopB":"rowPaddingTop",ze=de[0],Qe=de[de.length-1],He=We[0],st=We[We.length-1],St=ze&&He?Math.max(He.paddingLeft,yi):0,Ct=Qe&&st?Math.max(st.paddingRight,yi):0,Zt=Ee,an=Te=>{const _e=me.current;if(!_e)return{x:0,y:0};const De=_e.getBoundingClientRect();return{x:Te.clientX-De.left+hs,y:Te.clientY-De.top+hs}},sn=(Te,_e)=>{if(!O)return;const De=Te.image;if(!(De!=null&&De.url)){Q(null);return}const{x:Oe,y:Ne}=an(_e),rt=(M==null?void 0:M.min)??80,Me=(M==null?void 0:M.max)??320,Ye=(K==null?void 0:K.rowId)===Te.id?K.widthPx:Dg(rt,Me);Q({rowId:Te.id,url:De.url,objectFit:"contain",isVideo:dg(De),widthPx:Ye,x:Oe,y:Ne})},ht=Te=>{if(!O||!K)return;const{x:_e,y:De}=an(Te);Q(Oe=>!Oe||Oe.x===_e&&Oe.y===De?Oe:{...Oe,x:_e,y:De})},Bt=()=>{Q(null)},Yt=Te=>{_&&ps(Te,c),O&&Q(null)},Gt=Te=>{_&&ms(Te,c)};a.useLayoutEffect(()=>{if(!u||g){ke(null);return}const Te=ae.current,_e=Te==null?void 0:Te.parentElement;if(!Te||!_e){ke(null);return}const De=()=>{const Ne=Te.querySelector("[data-list-row]");if(!Ne){ke(null);return}const rt=_e.getBoundingClientRect(),Me=Ne.getBoundingClientRect();ke(Me.top-rt.top+Me.height/2)};De();const Oe=new ResizeObserver(De);return Oe.observe(Te),Oe.observe(_e),()=>Oe.disconnect()},[u,g,ct,dt,mt,ot,t,e,de,Fe,ne,x,ee,W,pt]);const Rt=a.useMemo(()=>!g&&Ca.some(Te=>{const _e=Te.charAt(0),De=e[`${Te}VerticalAlign`];return _l(De,e,_e)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Ye;const Te=me.current;if(!Te)return;const _e=()=>{Te.querySelectorAll("[data-list-col]").forEach(Ke=>{Ke.style.transform="";const Et=Ke.querySelector(`.${c}-list-col`);Et&&(Et.style.minHeight="",Et.style.height="");const xt=Ke.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})};if(g||!Rt){_e();return}const De=()=>{const Ke=Array.from(Te.querySelectorAll("[data-list-row]")),Et=`${c}-list-col`,xt=`${c}-baseline-probe`;Ke.forEach(ft=>{ft.querySelectorAll("[data-list-col]").forEach(Wt=>{Wt.style.transform="";const Tt=Wt.querySelector(`.${Et}`);Tt&&(Tt.style.minHeight="",Tt.style.height="");const jt=Wt.querySelector(`.${c}-list-col-title`);jt&&(jt.style.transform="")})}),Ke.forEach(ft=>{const Wt=Array.from(ft.querySelectorAll("[data-list-col]"));Cg(ft,Wt,Et)}),Te.offsetHeight,Ke.forEach(ft=>{const Wt=Array.from(ft.querySelectorAll("[data-list-col]")),Tt=ft.getBoundingClientRect().top,jt=new Map,Ft=Wt.map(yt=>{const zt=yt.querySelector(`.${c}-list-col-title`),at={el:yt,titleEl:zt,letter:yt.getAttribute("data-col-letter")??"",kind:yt.getAttribute("data-valign")??"top",anchor:yt.getAttribute("data-valign-anchor")};return jt.set(at.letter,at),at}),Pt=new Map,en=(yt,zt)=>{const at=Pt.get(yt.letter);if(at!==void 0)return at;const _t=yt.anchor?jt.get(yt.anchor):void 0;if(yt.kind!=="baseline"||!_t||zt.has(yt.letter)){const Ge=Er(yt,Tt,Et,xt);return Pt.set(yt.letter,Ge),Ge}zt.add(yt.letter);const qt=en(_t,zt);zt.delete(yt.letter);const re=Er(yt,Tt,Et,xt),Ae=qt-re;Tg(yt.titleEl,Ae);const Ve=Er(yt,Tt,Et,xt);return Pt.set(yt.letter,Ve),Ve};Ft.forEach(yt=>en(yt,new Set))})};let Oe=null;const Ne=()=>{Oe===null&&(Oe=requestAnimationFrame(()=>{Oe=null,De()}))};De();const rt=new ResizeObserver(()=>Ne());rt.observe(Te);let Me=!1;return typeof document<"u"&&((Ye=document.fonts)!=null&&Ye.ready)&&document.fonts.ready.then(()=>{Me||Ne()}),()=>{Me=!0,Oe!==null&&(cancelAnimationFrame(Oe),Oe=null),rt.disconnect(),_e()}},[Rt,g,e,t,ne,ct,Fe]);const Qt=a.useMemo(()=>gg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Qt}}),r.jsx("div",{style:Se,children:r.jsxs("div",{ref:me,className:`${c}-wrapper ${xe}${vt?` ${vt}`:""}${g?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(w??0,n),...!g&&u?{[`--${c}-first-entry-handle-top`]:At}:{}},onMouseMove:O?ht:void 0,onMouseLeave:O?Bt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[ct.map((Te,_e)=>{var rt;const De=(((rt=Te.link)==null?void 0:rt.length)??0)>0,Oe=De&&(!n||i)?"a":"div",Ne=gs(_e,ct.length,ee,W,pt,x??0,n??!1);return r.jsxs(Oe,{ref:_e===0?Me=>{ae.current=Me}:void 0,className:`${c}-list-item${De||b==="always"?` ${c}-list-item-has-link`:""}`,...De?{href:Te.link,target:"_blank"}:{},style:Ne,onMouseEnter:Me=>{_&&(De||b==="always")&&ps(Me,c),O&&sn(Te,Me)},onMouseLeave:Me=>{_&&(De||b==="always")&&ms(Me,c)},children:[dt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:je(dt)}}),r.jsxs("div",{className:`${c}-list-cols-row${g?"":` ${c}-list-cols-row-h`}${u&&_e===0&&g?` ${c}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:je(ot)},children:[de.map((Me,Ye)=>{const Ke=Ye===de.length-1,Et=We[Ye],xt=Me.paddingBottom,ft=pg(Te.cells[Me.key]),Wt=g&&ft&&xt>0,Tt=g?{minHeight:je(ot)}:{width:je(Fe[Ye])},jt=g?{paddingLeft:je(ge),paddingRight:je(ge)}:{paddingLeft:je(Et.paddingLeft),paddingRight:je(Et.paddingRight)},Ft=Me.textPrefix.charAt(0),Pt=g?vg(e[`${Me.textPrefix}VerticalAlign`]):yg(e[`${Me.textPrefix}VerticalAlign`],e,Ft),en=g&&ft&&u&&_e===0;return r.jsxs("div",{className:g?`${c}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":Ft,"data-valign":Pt.kind,...Pt.kind==="baseline"?{"data-valign-anchor":Pt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ke?` ${c}-list-col-last`:""}`,style:{...jt,...Tt,...g?{justifyContent:fs(Pt.kind)}:{}},"data-test":Me.width,children:r.jsx("span",{className:vs(e,Me.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...ys(Uo(e,Me.textPrefix),n),...xs(e,Me.textPrefix,c,n),...g?{}:bg(Pt.kind)},children:Te.cells[Me.key]??null})}),Wt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:je(xt)}}),en&&r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Me.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:je(Math.max(xt,Mr))}})]},Me.key)}),u&&_e===0&&g&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(oe),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:je(pe),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(oe),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:je(Math.max(pe,Ee-pe)),width:je(pe),height:"100%"}})]})]}),!g&&mt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:je(mt)}}),u&&_e===0&&!g&&r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:je(Ht)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":It,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:tt,left:0,width:"100%",height:je(Math.max(dt,Mr))}})},"row-padding-handles"),u&&!g&&ze&&Qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":ze.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Fe[0]-((He==null?void 0:He.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:je(St),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Qe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Fe[de.length-1]-((st==null?void 0:st.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:je(Zt-Ct),width:je(Ct),height:"100%"}})]},"column-edge-padding-handles"),u&&!g&&de.slice(0,-1).map((Te,_e)=>{const De=de[_e+1],Oe=ie.slice(0,_e+1).reduce((Ke,Et)=>Ke+Et,0),Ne=We[_e],rt=We[_e+1],Me=Math.max(Ne.paddingRight,yi),Ye=Math.max(rt.paddingLeft,yi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Fe[_e]-Ne.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:je(Oe-Me),width:je(Me),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":De.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Fe[_e+1]-rt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:je(Oe),width:je(Ye),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!g&&de.slice(0,-1).map((Te,_e)=>{const De=zg(_e,ie,te,Ee),Ne=ie.slice(0,_e+1).reduce((rt,Me)=>rt+Me,0)-bs/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(La),"data-controls-max-fraction":String(De),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:je(Ne),width:je(bs),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),pt&&(()=>{const Te=Uo(e,kn),_e=wg(e.cutLabelVerticalAlign),De=Te.textTextAlign==="justify"||g;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:je(k??0),cursor:$t?"pointer":"default",...mg(W,x??0,n??!1)},onClick:$t?et:void 0,onMouseEnter:_||O?Yt:void 0,onMouseLeave:_?Gt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...g?{paddingLeft:je(ge),paddingRight:je(ge)}:{},justifyContent:$g(Te.textTextAlign),alignItems:fs(_e)},children:r.jsx("span",{className:vs(e,kn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...ys(Te,n),...xs(e,kn,c,n),...De?{width:"100%"}:{}},children:N})})})})(),O&&K&&(()=>{const Te=Oo(K.widthPx),_e={width:Te,height:"auto",maxHeight:Te,objectFit:"contain",left:K.x,top:K.y,position:"absolute"};return r.jsx(ug,{media:K,className:K.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:_e},`${K.rowId}-${K.url}`)})()]})})]})}const Kg=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
8997
8997
  import { CommonComponentProps } from '../props';
8998
8998
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
8999
8999
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -12143,7 +12143,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12143
12143
  left: 20px;
12144
12144
  transform: translateY(-50%);
12145
12145
  }
12146
- `}function Rs(e,t,n,i,o,l,s,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:l??0,textAppearance:s,color:d??"#000000"}}function hh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l}){const{prefix:s}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:v="solid",entryHoverEffect:w="default",autoclose:C="off",icon:h,iconMaxWidth:x=.00833,iconPaddingRight:$=0,iconAnimation:T="rotate 45",questionColor:I="#000000",answerColor:k="#000000",dividerColor:H="#0000001F",iconColor:M="#000000",questionHoverColor:B="#666666",iconHoverColor:P="#666666",iconActiveColor:b="#000000",dividerHoverColor:G="#000000",questionFontFamily:f,questionFontSettings:R,questionFontSize:A,questionLineHeight:j,questionLetterSpacing:K,questionWordSpacing:le,questionTextAppearance:X,answerFontFamily:z,answerFontSettings:_,answerFontSize:L,answerLineHeight:E,answerLetterSpacing:D,answerWordSpacing:U,answerTextAppearance:Q,questionPaddingLeft:O=0,questionPaddingTop:ge=0,questionPaddingBottom:g=0,answerPaddingLeft:he=0,answerPaddingRight:se=0,answerPaddingTop:ve=0,answerPaddingBottom:Ee=0}=e,oe=t??[],[xe,Y]=a.useState(()=>new Set),be=!n||i;a.useEffect(()=>{Y(new Set)},[C]),a.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const me=je=>y.scalingValue(je,n??!1),ue=Math.max(O,Fn),re=Math.max(ge,Fn),Le=Math.max(g,Fn),Ce=Math.max(he,Fn),fe=Math.max(se,Fn),$e=Math.max(ve,Fn),N=Math.max(Ee,Fn),te=Math.max(0,(c??1)-$-x),W=Math.max(0,(c??1)-se),J=Math.max(0,(c??1)-he),Z=Math.max($,Fn),ce=Math.max(0,(c??1)-O-x),pe=a.useMemo(()=>xe.size===0?0:Math.min(...xe),[xe]),ye=a.useCallback(je=>xe.has(je),[xe]),Ie=be&&w==="default"?`${s}-entry-hover-default`:"",q=h??"",de=q!=="",Me=T.replace(/^rotate /,""),ee=`${s}-icon-anim-${Me}`,ne=ln(Kt(Rs(f,R,A,j,K,le,X,I),n)),Fe=ln(Kt(Rs(z,_,L,E,D,U,Q,k),n)),We=Ls(A,j,`${s}-question`,`${s}-text-tight-leading`),qe=Ls(L,E,`${s}-answer-text`,`${s}-text-tight-leading`),Ze=Is(A,j,s,n),ct=Is(L,E,s,n),pt=y.buildColorVars(s,{questionColor:I,answerColor:k,dividerColor:H,iconColor:M,questionHoverColor:B,iconHoverColor:P,iconActiveColor:b,dividerHoverColor:G},uh,ph),Xe=l&&l!=="default"?`${s}-state-${l}`:"",vt=a.useCallback(je=>{be&&Y(dt=>{if(dt.has(je)){const ot=new Set(dt);return ot.delete(je),ot}if(C==="on")return new Set([je]);const mt=new Set(dt);return mt.add(je),mt})},[be,C]),$t=a.useMemo(()=>gh(s),[s]),et={[`--${s}-divider-width`]:y.scalingValue(m,n??!1),[`--${s}-divider-style`]:v,[`--${s}-icon-max-width`]:y.scalingValue(x,n??!1),...u>0?{[`--${s}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$t}}),r.jsx("div",{style:pt,children:r.jsx("div",{className:it(`${s}-wrapper`,n&&!i&&`${s}-editor`,Ie,Xe),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...et},children:oe.map((je,dt)=>{var At;const mt=ye(dt),ot=((At=je.question)==null?void 0:At.trim())??"",kt=je.answer,Ht=((kt==null?void 0:kt.length)??0)>0,tt=d&&dt===pe;return r.jsxs("div",{className:it(`${s}-item`,mt&&`${s}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${s}-question-controls`,children:[tt&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:me(re),zIndex:2}}),r.jsx(Jt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(te),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:me(ue),height:"100%",zIndex:2}}),r.jsx(Jt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ce),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:me(Z),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${s}-question-button`,"aria-expanded":mt,style:{...ne,...Ze,paddingLeft:me(O),paddingRight:me($)},onClick:()=>vt(dt),children:[ge>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:me(ge)},"aria-hidden":"true"}),r.jsxs("span",{className:`${s}-question-row`,children:[r.jsx("span",{className:We,children:ot}),Ht&&(de?r.jsx("span",{className:`${s}-icon ${s}-icon-custom ${ee}`,"aria-hidden":"true",children:r.jsx(cn,{url:q,fill:M,hoverFill:P,className:`${s}-icon-image`})}):r.jsx("span",{className:`${s}-icon ${s}-icon-default ${ee}`,"aria-hidden":"true"}))]}),g>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:me(g)},"aria-hidden":"true"})]}),tt&&r.jsx(Jt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:me(Le),zIndex:2}})]}),Ht&&kt&&r.jsx("div",{className:`${s}-panel`,"aria-hidden":!mt,children:r.jsx("div",{className:`${s}-panel-inner`,children:r.jsxs("div",{className:`${s}-answer-controls`,children:[tt&&mt&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:me($e),zIndex:2}}),r.jsx(Jt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(W),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:me(Ce),height:"100%",zIndex:2}}),r.jsx(Jt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:me(fe),height:"100%",zIndex:2}})]}),ve>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:me(ve)}}),r.jsx("div",{className:`${s}-answer`,style:{...Fe,...ct,paddingLeft:me(he),paddingRight:me(se)},children:r.jsx("div",{className:qe,children:r.jsx(Ti,{content:kt})})}),Ee>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:me(Ee)}}),tt&&mt&&r.jsx(Jt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:me(N),zIndex:2}})]})})})]},dt)})})})]})}const fh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12146
+ `}function Rs(e,t,n,i,o,l,s,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:l??0,textAppearance:s,color:d??"#000000"}}function hh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l}){const{prefix:s}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:v="solid",entryHoverEffect:w="default",autoclose:C="off",icon:h,iconMaxWidth:x=.00833,iconPaddingRight:$=0,iconAnimation:T="rotate 45",questionColor:I="#000000",answerColor:k="#000000",dividerColor:N="#0000001F",iconColor:M="#000000",questionHoverColor:B="#666666",iconHoverColor:P="#666666",iconActiveColor:b="#000000",dividerHoverColor:X="#000000",questionFontFamily:f,questionFontSettings:R,questionFontSize:A,questionLineHeight:j,questionLetterSpacing:q,questionWordSpacing:le,questionTextAppearance:Y,answerFontFamily:z,answerFontSettings:H,answerFontSize:L,answerLineHeight:E,answerLetterSpacing:D,answerWordSpacing:K,answerTextAppearance:Q,questionPaddingLeft:O=0,questionPaddingTop:he=0,questionPaddingBottom:g=0,answerPaddingLeft:me=0,answerPaddingRight:ae=0,answerPaddingTop:we=0,answerPaddingBottom:ke=0}=e,ne=t??[],[ye,U]=a.useState(()=>new Set),be=!n||i;a.useEffect(()=>{U(new Set)},[C]),a.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const ge=je=>y.scalingValue(je,n??!1),pe=Math.max(O,Fn),oe=Math.max(he,Fn),Se=Math.max(g,Fn),Ie=Math.max(me,Fn),fe=Math.max(ae,Fn),xe=Math.max(we,Fn),_=Math.max(ke,Fn),ee=Math.max(0,(c??1)-$-x),W=Math.max(0,(c??1)-ae),J=Math.max(0,(c??1)-me),Z=Math.max($,Fn),ce=Math.max(0,(c??1)-O-x),ue=a.useMemo(()=>ye.size===0?0:Math.min(...ye),[ye]),ve=a.useCallback(je=>ye.has(je),[ye]),Le=be&&w==="default"?`${s}-entry-hover-default`:"",G=h??"",de=G!=="",Ee=T.replace(/^rotate /,""),te=`${s}-icon-anim-${Ee}`,ie=ln(Kt(Rs(f,R,A,j,q,le,Y,I),n)),Fe=ln(Kt(Rs(z,H,L,E,D,K,Q,k),n)),We=Ls(A,j,`${s}-question`,`${s}-text-tight-leading`),qe=Ls(L,E,`${s}-answer-text`,`${s}-text-tight-leading`),Ze=Is(A,j,s,n),ct=Is(L,E,s,n),pt=y.buildColorVars(s,{questionColor:I,answerColor:k,dividerColor:N,iconColor:M,questionHoverColor:B,iconHoverColor:P,iconActiveColor:b,dividerHoverColor:X},uh,ph),Xe=l&&l!=="default"?`${s}-state-${l}`:"",vt=a.useCallback(je=>{be&&U(dt=>{if(dt.has(je)){const ot=new Set(dt);return ot.delete(je),ot}if(C==="on")return new Set([je]);const mt=new Set(dt);return mt.add(je),mt})},[be,C]),$t=a.useMemo(()=>gh(s),[s]),et={[`--${s}-divider-width`]:y.scalingValue(m,n??!1),[`--${s}-divider-style`]:v,[`--${s}-icon-max-width`]:y.scalingValue(x,n??!1),...u>0?{[`--${s}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$t}}),r.jsx("div",{style:pt,children:r.jsx("div",{className:it(`${s}-wrapper`,n&&!i&&`${s}-editor`,Le,Xe),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...et},children:ne.map((je,dt)=>{var At;const mt=ve(dt),ot=((At=je.question)==null?void 0:At.trim())??"",kt=je.answer,Ht=((kt==null?void 0:kt.length)??0)>0,tt=d&&dt===ue;return r.jsxs("div",{className:it(`${s}-item`,mt&&`${s}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${s}-question-controls`,children:[tt&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ge(oe),zIndex:2}}),r.jsx(Jt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ge(pe),height:"100%",zIndex:2}}),r.jsx(Jt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ce),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ge(Z),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${s}-question-button`,"aria-expanded":mt,style:{...ie,...Ze,paddingLeft:ge(O),paddingRight:ge($)},onClick:()=>vt(dt),children:[he>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:ge(he)},"aria-hidden":"true"}),r.jsxs("span",{className:`${s}-question-row`,children:[r.jsx("span",{className:We,children:ot}),Ht&&(de?r.jsx("span",{className:`${s}-icon ${s}-icon-custom ${te}`,"aria-hidden":"true",children:r.jsx(cn,{url:G,fill:M,hoverFill:P,className:`${s}-icon-image`})}):r.jsx("span",{className:`${s}-icon ${s}-icon-default ${te}`,"aria-hidden":"true"}))]}),g>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:ge(g)},"aria-hidden":"true"})]}),tt&&r.jsx(Jt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ge(Se),zIndex:2}})]}),Ht&&kt&&r.jsx("div",{className:`${s}-panel`,"aria-hidden":!mt,children:r.jsx("div",{className:`${s}-panel-inner`,children:r.jsxs("div",{className:`${s}-answer-controls`,children:[tt&&mt&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ge(xe),zIndex:2}}),r.jsx(Jt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(W),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ge(Ie),height:"100%",zIndex:2}}),r.jsx(Jt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ge(fe),height:"100%",zIndex:2}})]}),we>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:ge(we)}}),r.jsx("div",{className:`${s}-answer`,style:{...Fe,...ct,paddingLeft:ge(me),paddingRight:ge(ae)},children:r.jsx("div",{className:qe,children:r.jsx(Ti,{content:kt})})}),ke>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:ge(ke)}}),tt&&mt&&r.jsx(Jt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ge(_),zIndex:2}})]})})})]},dt)})})})]})}const fh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12147
12147
  import cn from 'classnames';
12148
12148
  import { CommonComponentProps } from '../props';
12149
12149
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -12940,7 +12940,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
12940
12940
  </>
12941
12941
  );
12942
12942
  }
12943
- `;function _n(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Es={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],vh={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:_n("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:_n("Question Padding Left"),questionPaddingTop:_n("Question Padding Top"),questionPaddingBottom:_n("Question Padding Bottom"),answerPaddingLeft:_n("Answer Padding Left"),answerPaddingRight:_n("Answer Padding Right"),answerPaddingTop:_n("Answer Padding Top"),answerPaddingBottom:_n("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...yh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},xh={element:hh,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:vh,sourceCode:fh},Pn=e=>e.display==="cover",ur=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ms=100,bh=.2,ks=8,zl=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=a.useState(0),[s,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Ms:Math.max(Ms,window.innerHeight*bh),[]),v=a.useCallback(f=>Math.max(0,1-f/(m*1.5)),[m]),w=a.useCallback(f=>Math.max(0,1-f/(m*.45)),[m]),C=a.useCallback(f=>{const R=typeof window<"u"?window.innerHeight:800,A=Math.max(.88,1-f/R*.12);return`translateY(${f}px) scale(${A})`},[]),h=a.useCallback(()=>{c.current=null},[]),x=a.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),$=a.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),l(f),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),T=a.useCallback(f=>{!e||s||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,s,i]),I=a.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const A=f.clientX-R.startX,j=f.clientY-R.startY;if(R.isLocked===null){if(Math.abs(A)<ks&&Math.abs(j)<ks)return;if(j>0&&j>Math.abs(A))R.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{R.isLocked=!1,h();return}}if(!R.isLocked)return;f.preventDefault();const K=Math.max(0,j);u.current=K,l(K)},[e,h]),k=a.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const A=R.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!A){h();return}f.clientY-R.startY>=m?$():x()},[m,$,e,h,x]),H=a.useCallback(f=>{k(f)},[k]),M=a.useCallback(f=>{k(f)},[k]),B=o>0,P=s?`transform ${n}ms ease`:"none",b=s?`opacity ${n}ms ease`:"none",G=o>0||s;return{isSwipeDragging:B,backdropStyle:{opacity:v(o),transition:b},mediaAreaStyle:{transform:C(o),transition:P,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:G?{opacity:w(o),transition:b}:void 0,swipeHandlers:e?{onPointerDown:T,onPointerMove:I,onPointerUp:H,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},wh="[data-lightbox-scrollable]",Dl=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const s=d=>{const c=d.target;c instanceof Element&&c.closest(wh)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=l,window.scrollTo(0,e)}},[])},$h=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Sh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ch=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Th=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,d=n-s,c=s-n,u=(h,x)=>{Sh(t),e.scrollLeft=h,x&&(l==null||l())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,v=0;const w=()=>{t.removeEventListener("transitionend",C),clearTimeout(v)},C=h=>{h.target!==t||h.propertyName!=="transform"||m||(m=!0,w(),u(n,!0))};return t.addEventListener("transitionend",C),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,v=window.setTimeout(()=>{m||(m=!0,w(),u(n,!0))},i+64),()=>{m||(m=!0,w(),u(s-Ch(t),!1))}},Ui=300,Lh=900,Ih=1500,Rh="cubic-bezier(0.16, 1, 0.3, 1)",Eh=3e3,Mh=2,kh=16,Ph=.05,Ah=1,ko=.3,Wh=50,Fh=20,gi=.004,Ai=["title1","title2","title3"],_h={title1:"1",title2:"2",title3:"3"},Nh={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Hh={title1:.02,title2:.02,title3:.02},Po=e=>`max(${e}, ${Fh}px)`,Oh=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},Bh=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=Oh(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,jh=e=>[Lt(e,"fontFamily"),Lt(e,"fontSettings"),{type:"row",items:[Lt(e,"fontSize"),Lt(e,"lineHeight"),Lt(e,"letterSpacing"),Lt(e,"wordSpacing")]},Lt(e,"textAlign"),Lt(e,"textAppearance")],zh=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ai.map(e=>[_h[e],jh(e)]))}),Ra=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},Vl=(e,t)=>Ra(e,t),Ao=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ps=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ra(e.length,n),effective:Vl(e.length,n)}},Dh=(e,t,n,i,o,l,s)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),d},Pr=(e,t)=>{const n=i=>{const o=Lt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Nh[t]]}},Vh=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Ar=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Hh[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)},Gh=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:v,closeIcon:w,closeIconMaxWidth:C,closeIconColor:h,closeIconHoverColor:x,thumbnailTrigger:$,thumbnailVisibility:T,thumbnailObjectFit:I,thumbnailActive:k,thumbnailActiveColor:H,title1Width:M,title2Width:B,title3Width:P,title1MarginLeft:b=0,title2MarginLeft:G=0,title3MarginLeft:f=0,titleRowMarginBottom:R=0,titleHeaderLayout:A="desktop",contentMarginTop:j,iconMarginLeft:K}=n,le=p=>y.scalingValue(p,i??!1),X=c??n.thumnailSize??.03,z=le(X),_=le(u),L=le(m??.02),E=le(v??0),D=le(j??0),U=Po(D),Q=le(K??0),[O,ge]=a.useState(0),g=a.useRef(O);g.current=O;const he=t[O],{title1:se,title2:ve,title3:Ee}=Bh(he),oe=Ar("title1",Pr(n,"title1"),i),xe=Ar("title2",Pr(n,"title2"),i),Y=Ar("title3",Pr(n,"title3"),i),be=A==="mobile",me=!o&&(!i||l),ue=me,re=me,Le=me,Ce=Pn(I),fe=Ce?{"--image-aspect-ratio":ur(I)}:void 0,$e=!!(se||ve||Ee),N=a.useMemo(()=>Dh(e,se,ve,Ee,oe,xe,Y),[e,O,se,ve,Ee,oe,xe,Y]),te=a.useMemo(()=>({title1Width:M,title2Width:B,title3Width:P}),[M,B,P]),W=a.useMemo(()=>N.map(p=>te[p.widthKey]),[N,te]),J=a.useMemo(()=>Ra(N.length,W),[N.length,W]),Z=a.useMemo(()=>Vl(N.length,W),[N.length,W]),ce=a.useMemo(()=>N.filter(p=>p.prefix==="title1"),[N]),pe=a.useMemo(()=>N.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[N]),ye=a.useMemo(()=>Ps(ce,te),[ce,te]),Ie=a.useMemo(()=>Ps(pe,te),[pe,te]),q=a.useCallback((p,S)=>{const F=N.indexOf(p);if(!be||S==="single-row")return{effectiveWidth:Z[F]??0,resolvedWidth:J[F]??0,maxWidth:Ao(F,J)};if(S==="two-row-top"){const we=ce.indexOf(p);return{effectiveWidth:ye.effective[we]??0,resolvedWidth:ye.resolved[we]??0,maxWidth:Ao(we,ye.resolved)}}const ae=pe.indexOf(p);return{effectiveWidth:Ie.effective[ae]??0,resolvedWidth:Ie.resolved[ae]??0,maxWidth:Ao(ae,Ie.resolved)}},[pe,Ie,Z,J,N,ce,ye,be]),de=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Me=de(R??0),ee=a.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:G,title3MarginLeft:f}),[b,G,f]),ne=a.useCallback(p=>N.slice(0,p+1).reduce((S,F,ae)=>S+(F!=null&&F.marginLeftKey?ee[F.marginLeftKey]??0:0)+(J[ae]??0),0)+(be?0:b??0),[N,ee,J,be,b]),Fe=a.useCallback(()=>be?0:b??0,[be,b]),We=a.useCallback(p=>pe.slice(0,p).reduce((S,F,ae)=>S+(F.marginLeftKey?ee[F.marginLeftKey]??0:0)+(Ie.resolved[ae]??0),0),[pe,Ie.resolved,ee]),qe=a.useCallback(p=>{const S=pe[p];return We(p)+(S.marginLeftKey?ee[S.marginLeftKey]??0:0)+(Ie.resolved[p]??0)},[pe,Ie.resolved,We,ee]),Ze=(p,S)=>{const F=p.marginLeftKey?ee[p.marginLeftKey]??0:0,{effectiveWidth:ae,resolvedWidth:we,maxWidth:Pe}=q(p,S),Ue=o&&S==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...S==="single-row"?{gridArea:p.prefix}:{},width:de(ae),...F>0?{marginLeft:de(F)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),Ue&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:de(-F),width:`max(${de(F)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ue&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:de(-gi/2),width:de(gi),height:"100%",pointerEvents:"auto"}})]},p.className)},ct=()=>{const p=be?-1:N.findIndex(ae=>ae.prefix==="title1"),S=!be&&(o||(b??0)>0)?(()=>{const ae=b??0,we=p>=0?J[p]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:0,width:`max(${de(ae)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,F=N.flatMap((ae,we)=>{if(!ae.marginLeftKey)return[];const Pe=ee[ae.marginLeftKey]??0,Ue=Vh(N,J,ee,we)+Fe();return r.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J[we]),style:{position:"absolute",top:0,left:de(Ue),width:`max(${de(Pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)});return S?[S,...F]:F},pt=()=>N.map((p,S)=>{const F=Ao(S,J),we=ne(S)-gi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(we),width:de(gi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Xe=()=>pe.flatMap((p,S)=>{if(!p.marginLeftKey)return[];const F=ee[p.marginLeftKey]??0,ae=We(S),{resolvedWidth:we}=q(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:de(ae),width:`max(${de(F)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),vt=()=>pe.map((p,S)=>{const{maxWidth:F}=q(p,"two-row-bottom"),we=qe(S)-gi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(we),width:de(gi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),et=a.useRef(null),je=a.useRef(null),dt=a.useRef(null),mt=a.useRef([]),ot=a.useRef([]),kt=a.useRef(0),Ht=a.useRef(null),tt=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),At=a.useRef(null),It=a.useRef(null),ze=a.useRef(0),Qe=a.useRef("forward"),He=a.useRef(0),st=a.useRef(null),St=a.useRef(!1),Ct=t.length>1&&(!o||!!l),Zt=Ct?3:1,an=a.useMemo(()=>Array.from({length:Zt},()=>t).flat(),[t,Zt]),[sn,ht]=a.useState(!1),[Bt,Yt]=a.useState(!1),[Gt,Rt]=a.useState(!0),Qt=a.useRef(null),Te=a.useRef(null),_e=a.useRef(!1),De=a.useRef(!1),Oe=a.useRef(null),Ne=a.useRef(null),rt=ue&&!Gt,ke=a.useCallback(()=>{ue&&(Rt(!0),Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(()=>{tt.current.isActive||Rt(!1)},Eh))},[ue]),Ye=a.useCallback(()=>{o||De.current||(De.current=!0,Yt(!1),Oe.current=setTimeout(()=>{s()},Ui))},[o,s]),Ke=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rt?"true":"false",style:{width:y.scalingValue(C??0,i),height:y.scalingValue(C??0,i),marginRight:Q,"--close-icon-hover-color":x},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:r.jsx(cn,{url:w,fill:h,hoverFill:i&&!l?h:x,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Q,height:"100%",pointerEvents:"auto"}})]}),Et=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:de(b??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),xt=()=>{const p=N.find(ae=>ae.prefix==="title1"),S=N.filter(ae=>ae.prefix==="title2"||ae.prefix==="title3"),F=S.length>0||o||(R??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?Et():null,p&&Ze(p,"two-row-top"),w&&Ke()]}),F?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[S.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[S.map(ae=>Ze(ae,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Xe(),vt()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Me,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?Et("single-row"):null,N.map(p=>Ze(p,"single-row")),o?r.jsxs(r.Fragment,{children:[ct(),pt()]}):null,w?Ke():null]}),Wt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Tt,backdropStyle:jt,mediaAreaStyle:Ft,overlayContentStyle:Pt,swipeHandlers:en,dismissAreaStyle:yt}=zl({enabled:me??!1,onClose:Ye,animMs:Ui,isBlockedTarget:Wt}),zt=()=>{if(!Ct||t.length===0)return kt.current=0,0;const p=ot.current[0],S=ot.current[t.length];if(!p||!S)return kt.current;const F=S.offsetLeft-p.offsetLeft;return F>0&&(kt.current=F),kt.current},at=(p=!1)=>{if(!Ct)return;const S=et.current,F=zt();!S||F<=0||F<S.clientWidth*.25||(S.scrollLeft<=0?(S.scrollLeft+=F,p&&(tt.current.scrollLeft+=F),St.current&&(He.current+=F)):S.scrollLeft>=F*2&&(S.scrollLeft-=F,p&&(tt.current.scrollLeft-=F),St.current&&(He.current-=F)))},_t=(p,S=(F=>(F=et.current)==null?void 0:F.scrollLeft)()??0)=>{if(!Ct)return p;let ae=t.length+p,we=1/0;for(let Pe=0;Pe<Zt;Pe++){const Ue=Pe*t.length+p,lt=ot.current[Ue];if(!lt)continue;const Xt=Math.abs(lt.offsetLeft-S);Xt<we&&(we=Xt,ae=Ue)}return ae},qt=p=>{const S=et.current;return!p||!S?!1:p.offsetWidth>S.clientWidth+1},ie=p=>{const S=et.current;if(!p||!S||!qt(p))return!1;const F=p.offsetLeft,ae=F+p.offsetWidth;return S.scrollLeft>=F-1&&S.scrollLeft+S.clientWidth<=ae+1},Ae=(p=(S=>(S=et.current)==null?void 0:S.scrollLeft)()??0)=>{for(let ae=0;ae<ot.current.length;ae+=1){const we=ot.current[ae];if(we&&ie(we))return ae}let F={flatIndex:0,distance:1/0};return ot.current.forEach((ae,we)=>{if(!ae)return;const Pe=Math.abs(ae.offsetLeft-p);Pe<F.distance&&(F={flatIndex:we,distance:Pe})}),F.flatIndex},Ve=p=>{et.current&&ot.current.forEach(S=>{S&&(S.style.scrollSnapAlign=qt(S)&&p==="backward"?"end":"start")})},Ge=(p,S,F)=>{const ae=p-S,we=Ae(S),Pe=ot.current[we];if(ie(Pe))return Ae(p)%t.length;const Ue=ot.current[we+1],lt=Pe?Ue?Ue.offsetLeft-Pe.offsetLeft:Pe.offsetWidth:0,Xt=lt>0?ae>lt*ko?1:ae<-lt*ko?-1:0:0;return Xt===0?F:Ct?(F+Xt+t.length)%t.length:Math.max(0,Math.min(t.length-1,F+Xt))},bt=a.useCallback((p=!1)=>{if(T!=="on"||o)return;const S=dt.current,F=g.current,ae=mt.current[F];if(!S||!ae||S.scrollWidth<=S.clientWidth)return;const we=S.scrollLeft,Pe=we+S.clientWidth,Ue=ae.offsetLeft,lt=Ue+ae.offsetWidth;if(Ue>=we&&lt<=Pe)return;const Xt=S.scrollWidth-S.clientWidth;let Dt=we;if(!p&&Qt.current===null){const pi=mt.current[F-1],Bi=mt.current[F+1],bo=pi?ae.offsetLeft-pi.offsetLeft:Bi?Bi.offsetLeft-ae.offsetLeft:ae.offsetWidth;lt>Pe?Dt+=bo:Ue<we&&(Dt-=bo)}else lt>Pe?Dt=lt-S.clientWidth:Dt=Ue;S.scrollLeft=Math.max(0,Math.min(Xt,Dt))},[o,T]),Ut=a.useCallback((p=!1)=>{p&&(_e.current=!0),Te.current===null&&(Te.current=requestAnimationFrame(()=>{Te.current=null;const S=_e.current;_e.current=!1,bt(S)}))},[bt]),gt=a.useCallback(p=>{if(p===g.current)return;const S=g.current;g.current=p;const F=Math.abs(p-S)>1,ae=Ct&&t.length>1&&(S===t.length-1&&p===0||S===0&&p===t.length-1);ge(p),Ut(F||ae)},[t.length,Ct,Ut]),wt=()=>{if(!et.current||t.length===0||Qt.current!==null||tt.current.isActive&&tt.current.hasMoved)return;const p=et.current.scrollLeft,S=Ae(p)%t.length;S!==g.current&&gt(S)},tn=()=>{Qt.current=null},Ot=p=>{const S=et.current;S&&(S.style.scrollSnapType=p?"":"none")},fn=()=>{var p;(p=It.current)==null||p.call(It),It.current=null},bn=()=>{st.current!==null&&(cancelAnimationFrame(st.current),st.current=null),St.current=!1},Un=()=>{const p=et.current;if(!p){st.current=null,St.current=!1;return}const S=He.current-p.scrollLeft;if(Math.abs(S)<.5){p.scrollLeft=He.current,at(),wt(),st.current=null,St.current=!1;return}p.scrollLeft+=S*Ph,at(),wt(),ke(),st.current=requestAnimationFrame(Un)},Xn=()=>{const p=je.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},fo=(p,S,F,ae)=>{Xn(),p.scrollLeft=S,ze.current=p.scrollLeft,at(),F!==void 0?(g.current=F,ge(F)):wt(),Ot(!0),ae==null||ae()},yo=(p,{behavior:S="smooth",activeIndex:F,onComplete:ae}={})=>{const we=et.current,Pe=je.current;if(!we||!Pe)return;if(bn(),fn(),Ot(!1),S==="auto"){fo(we,p,F,ae);return}const Ue=Math.abs(p-we.scrollLeft),lt=$h(Ue,Lh,Ih,we.clientWidth*.55);It.current=Th(we,Pe,p,{duration:lt,easing:Rh,onComplete:()=>{It.current=null,fo(we,p,F,ae)}})},pr=(p="smooth")=>{const S=et.current;if(!S||t.length===0)return;const F=Ae()%t.length,ae=_t(F,S.scrollLeft),we=ot.current[ae];we&&yo(we.offsetLeft,{behavior:p,activeIndex:F})},mr=(p,S="smooth",F,ae)=>{const we=et.current;if(!we||t.length===0)return;const Pe=(ae??we.scrollLeft)-p,Ue=Ae(p),lt=ot.current[Ue];if(ie(lt)){Ot(!0),wt();return}const Xt=ot.current[Ue+1],Dt=lt?Xt?Xt.offsetLeft-lt.offsetLeft:lt.offsetWidth:0;if((Dt>0?Pe>Dt*ko?1:Pe<-Dt*ko?-1:0:0)!==0){const Kl=F??Ue%t.length,Ul=Ge(ae??we.scrollLeft,p,Kl);wn(Ul,S);return}const Bi=ae??we.scrollLeft,bo=Ae(Bi),Ea=ot.current[bo];if(Ea&&Math.abs(Ea.offsetLeft-Bi)<1){Ot(!0),wt();return}pr("auto")},wn=(p,S="smooth")=>{const F=et.current;if(!F||t.length===0)return;const ae=_t(p,F.scrollLeft),we=ot.current[ae];we&&(S==="smooth"?Qt.current=p:Qt.current=null,g.current=p,ge(p),Ut(!0),yo(we.offsetLeft,{behavior:S,activeIndex:p,onComplete:S==="smooth"?tn:void 0}))},ui=()=>{At.current&&(window.removeEventListener("pointerup",At.current),window.removeEventListener("pointercancel",At.current),At.current=null)},vo=(p,S,F,ae,we)=>{const Pe=F-p,Ue=ae-S,lt=Math.abs(Pe),Xt=Math.abs(Ue);if(lt<Wh||lt<=Xt)return!1;const Dt=Pe<0?1:-1,pi=Ct?(we+Dt+t.length)%t.length:Math.max(0,Math.min(t.length-1,we+Dt));return pi===we?!1:(wn(pi),!0)},Yn=p=>{if(!tt.current.isActive)return;ui();const S=et.current;if(!S)return;const{scrollLeft:F,startActiveIndex:ae,hasMoved:we}=tt.current,Pe=S.scrollLeft;at(!0),tt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ht(!1),p!==void 0&&S.hasPointerCapture(p)&&S.releasePointerCapture(p),we?mr(F,"smooth",ae,Pe):(Ot(!0),wt()),ke()},xo=(p,S)=>{const F=Ht.current;Ht.current=null,F&&(vo(F.startX,F.startY,p,S,F.startActiveIndex),ke())},gr=p=>{if(!re)return;if(p.pointerType==="touch"){if(bn(),Ot(!0),Wt(p.target))return;Ht.current={startX:p.clientX,startY:p.clientY,startActiveIndex:g.current};return}if(p.pointerType!=="mouse"||p.button!==0||Wt(p.target))return;const S=et.current;if(!S)return;bn(),fn(),Xn(),Qt.current=null,tt.current={isActive:!0,startX:p.clientX,scrollLeft:S.scrollLeft,startActiveIndex:g.current,hasMoved:!1},Ot(!1),ke(),S.setPointerCapture(p.pointerId),ui();const F=ae=>{ae.pointerType==="mouse"&&Yn(ae.pointerId)};At.current=F,window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F)},hr=p=>{if(!re||p.pointerType!=="mouse")return;const S=et.current;if(!S||!tt.current.isActive)return;if(p.buttons===0){Yn(p.pointerId);return}const F=p.clientX-tt.current.startX;Math.abs(F)>Ah&&(tt.current.hasMoved=!0,ht(!0)),tt.current.hasMoved&&(p.preventDefault(),S.scrollLeft=tt.current.scrollLeft-F,at(!0),wt(),ke())},V=p=>{if(re){if(p.pointerType==="touch"){p.type==="pointerup"?xo(p.clientX,p.clientY):Ht.current=null;return}p.pointerType==="mouse"&&Yn(p.pointerId)}},Se=p=>{!re||p.pointerType!=="mouse"||Yn(p.pointerId)};return Dl(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Yt(!0));return()=>{cancelAnimationFrame(p),fn(),ui(),Te.current!==null&&(cancelAnimationFrame(Te.current),Te.current=null),Oe.current&&clearTimeout(Oe.current),Ne.current&&clearTimeout(Ne.current)}},[]),a.useEffect(()=>{if(!ue){Rt(!0);return}ke();const p=$t.current;if(!p)return;const S=()=>ke();return p.addEventListener("pointermove",S),p.addEventListener("pointerdown",S),()=>{p.removeEventListener("pointermove",S),p.removeEventListener("pointerdown",S),Ne.current&&clearTimeout(Ne.current)}},[ue,ke]),a.useEffect(()=>{const p=S=>{S.key==="Escape"&&Ye()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Ye]),a.useLayoutEffect(()=>{zt()},[E,t.length,Ct]),a.useLayoutEffect(()=>{o||wn(g.current,"auto")},[E,o]),a.useLayoutEffect(()=>{wn(0,"auto")},[t.length,Ct]),a.useEffect(()=>{const p=et.current;if(!p||o||!me)return;const S=F=>{if(F.preventDefault(),Math.abs(F.deltaY)<=Math.abs(F.deltaX))return;const ae=F.deltaMode===1?kh:F.deltaMode===2?p.clientHeight:1,we=F.deltaY*ae*Mh;if(we!==0){if(fn(),St.current||(St.current=!0,He.current=p.scrollLeft,Qt.current=null,Ot(!1)),He.current+=we,!Ct){const Pe=p.scrollWidth-p.clientWidth;He.current=Math.max(0,Math.min(Pe,He.current))}ke(),st.current===null&&(st.current=requestAnimationFrame(Un))}};return p.addEventListener("wheel",S,{passive:!1}),()=>{p.removeEventListener("wheel",S),bn()}},[o,me,Ct]),a.useEffect(()=>{const p=et.current;if(!p)return;const S=()=>{at(tt.current.isActive);const ae=p.scrollLeft,we=ae-ze.current;ze.current=ae;const Pe=kt.current>0?kt.current*.5:1/0;if(we!==0&&Math.abs(we)<Pe){const Ue=we>0?"forward":"backward";Ue!==Qe.current&&(Qe.current=Ue,Ve(Ue))}tt.current.isActive&&tt.current.hasMoved||wt()};p.addEventListener("scroll",S,{passive:!0});const F=new ResizeObserver(()=>{zt(),at(tt.current.isActive),Ve(Qe.current),wt()});return F.observe(p),()=>{fn(),p.removeEventListener("scroll",S),F.disconnect()}},[t.length,Ct]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Tt||Ye()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Bt?1:0,transition:`opacity ${Ui}ms ease`,pointerEvents:Bt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...jt}}),r.jsxs("div",{ref:$t,className:`${e}-lightbox-dismiss-area`,style:yt,...en,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ft,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:et,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":re&&t.length>0?"true":"false","data-mouse-dragging":sn?"true":"false",onPointerDown:gr,onPointerMove:hr,onPointerUp:V,onPointerCancel:V,onLostPointerCapture:Se,children:r.jsx("div",{ref:je,className:`${e}-lightbox-strip-track`,style:{gap:E},children:an.map((p,S)=>{const F=p.image.objectFit??"contain",ae=S%t.length,we=Math.floor(S/t.length),Pe=Po(E),Ue=`calc(-0.5 * (${Pe} + ${E}))`;return r.jsxs("div",{ref:lt=>ot.current[S]=lt,className:`${e}-strip-item`,style:{height:A==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:F}}),o&&ae<t.length-1&&we===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ue,width:Pe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${we}-${p.image.url}-${ae}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rt?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:D,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:U,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:($e||w)&&r.jsx("div",{className:`${e}-header ${be?`${e}-header-two-row`:`${e}-header-single-row`}`,children:be?xt():$e||w?ft():null})})})]}),t.length>1&&T==="on"&&(()=>{const p=Po(L),S=`calc(-0.5 * (${L} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:L},children:r.jsx("div",{ref:dt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:F=>F.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":k,style:{gap:_,"--thumbnail-active-color":H},children:[t.map((F,ae)=>{const we=Po(_),Pe=`calc(-0.5 * (${we} + ${_}))`;return r.jsxs("div",{ref:Ue=>{mt.current[ae]=Ue},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===ae?"true":"false",onClick:()=>me&&$==="click"&&wn(ae),onMouseEnter:()=>Le&&$==="hover"&&wn(ae),"aria-label":F.image.name?`View ${F.image.name}`:`View image ${ae+1}`,"aria-current":O===ae?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Ce?` ${e}-thumb-image-cover`:""}`,src:F.image.url,alt:"",draggable:!1,style:{...fe,maxWidth:z,maxHeight:z,width:I.display==="cover"?"auto":"100%",height:"auto",objectFit:I.display==="cover"?"cover":"contain"}})}),o&&ae<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pe,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${F.image.url}-${ae}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:S,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function qh(e){return`
12943
+ `;function _n(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Es={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],vh={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:_n("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:_n("Question Padding Left"),questionPaddingTop:_n("Question Padding Top"),questionPaddingBottom:_n("Question Padding Bottom"),answerPaddingLeft:_n("Answer Padding Left"),answerPaddingRight:_n("Answer Padding Right"),answerPaddingTop:_n("Answer Padding Top"),answerPaddingBottom:_n("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...yh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},xh={element:hh,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:vh,sourceCode:fh},Pn=e=>e.display==="cover",ur=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ms=100,bh=.2,ks=8,zl=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=a.useState(0),[s,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Ms:Math.max(Ms,window.innerHeight*bh),[]),v=a.useCallback(f=>Math.max(0,1-f/(m*1.5)),[m]),w=a.useCallback(f=>Math.max(0,1-f/(m*.45)),[m]),C=a.useCallback(f=>{const R=typeof window<"u"?window.innerHeight:800,A=Math.max(.88,1-f/R*.12);return`translateY(${f}px) scale(${A})`},[]),h=a.useCallback(()=>{c.current=null},[]),x=a.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),$=a.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),l(f),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),T=a.useCallback(f=>{!e||s||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,s,i]),I=a.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const A=f.clientX-R.startX,j=f.clientY-R.startY;if(R.isLocked===null){if(Math.abs(A)<ks&&Math.abs(j)<ks)return;if(j>0&&j>Math.abs(A))R.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{R.isLocked=!1,h();return}}if(!R.isLocked)return;f.preventDefault();const q=Math.max(0,j);u.current=q,l(q)},[e,h]),k=a.useCallback(f=>{const R=c.current;if(!e||!R||f.pointerType!=="touch"||R.pointerId!==f.pointerId)return;const A=R.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!A){h();return}f.clientY-R.startY>=m?$():x()},[m,$,e,h,x]),N=a.useCallback(f=>{k(f)},[k]),M=a.useCallback(f=>{k(f)},[k]),B=o>0,P=s?`transform ${n}ms ease`:"none",b=s?`opacity ${n}ms ease`:"none",X=o>0||s;return{isSwipeDragging:B,backdropStyle:{opacity:v(o),transition:b},mediaAreaStyle:{transform:C(o),transition:P,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:X?{opacity:w(o),transition:b}:void 0,swipeHandlers:e?{onPointerDown:T,onPointerMove:I,onPointerUp:N,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},wh="[data-lightbox-scrollable]",Dl=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const s=d=>{const c=d.target;c instanceof Element&&c.closest(wh)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=l,window.scrollTo(0,e)}},[])},$h=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Sh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ch=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Th=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,d=n-s,c=s-n,u=(h,x)=>{Sh(t),e.scrollLeft=h,x&&(l==null||l())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,v=0;const w=()=>{t.removeEventListener("transitionend",C),clearTimeout(v)},C=h=>{h.target!==t||h.propertyName!=="transform"||m||(m=!0,w(),u(n,!0))};return t.addEventListener("transitionend",C),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,v=window.setTimeout(()=>{m||(m=!0,w(),u(n,!0))},i+64),()=>{m||(m=!0,w(),u(s-Ch(t),!1))}},Ui=300,Lh=900,Ih=1500,Rh="cubic-bezier(0.16, 1, 0.3, 1)",Eh=3e3,Mh=2,kh=16,Ph=.05,Ah=1,ko=.3,Wh=50,Fh=20,gi=.004,Ai=["title1","title2","title3"],_h={title1:"1",title2:"2",title3:"3"},Nh={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Hh={title1:.02,title2:.02,title3:.02},Po=e=>`max(${e}, ${Fh}px)`,Oh=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},Bh=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=Oh(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,jh=e=>[Lt(e,"fontFamily"),Lt(e,"fontSettings"),{type:"row",items:[Lt(e,"fontSize"),Lt(e,"lineHeight"),Lt(e,"letterSpacing"),Lt(e,"wordSpacing")]},Lt(e,"textAlign"),Lt(e,"textAppearance")],zh=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ai.map(e=>[_h[e],jh(e)]))}),Ra=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},Vl=(e,t)=>Ra(e,t),Ao=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ps=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ra(e.length,n),effective:Vl(e.length,n)}},Dh=(e,t,n,i,o,l,s)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),d},Pr=(e,t)=>{const n=i=>{const o=Lt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Nh[t]]}},Vh=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Ar=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Hh[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Kt(i,n)},Gh=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:v,closeIcon:w,closeIconMaxWidth:C,closeIconColor:h,closeIconHoverColor:x,thumbnailTrigger:$,thumbnailVisibility:T,thumbnailObjectFit:I,thumbnailActive:k,thumbnailActiveColor:N,title1Width:M,title2Width:B,title3Width:P,title1MarginLeft:b=0,title2MarginLeft:X=0,title3MarginLeft:f=0,titleRowMarginBottom:R=0,titleHeaderLayout:A="desktop",contentMarginTop:j,iconMarginLeft:q}=n,le=p=>y.scalingValue(p,i??!1),Y=c??n.thumnailSize??.03,z=le(Y),H=le(u),L=le(m??.02),E=le(v??0),D=le(j??0),K=Po(D),Q=le(q??0),[O,he]=a.useState(0),g=a.useRef(O);g.current=O;const me=t[O],{title1:ae,title2:we,title3:ke}=Bh(me),ne=Ar("title1",Pr(n,"title1"),i),ye=Ar("title2",Pr(n,"title2"),i),U=Ar("title3",Pr(n,"title3"),i),be=A==="mobile",ge=!o&&(!i||l),pe=ge,oe=ge,Se=ge,Ie=Pn(I),fe=Ie?{"--image-aspect-ratio":ur(I)}:void 0,xe=!!(ae||we||ke),_=a.useMemo(()=>Dh(e,ae,we,ke,ne,ye,U),[e,O,ae,we,ke,ne,ye,U]),ee=a.useMemo(()=>({title1Width:M,title2Width:B,title3Width:P}),[M,B,P]),W=a.useMemo(()=>_.map(p=>ee[p.widthKey]),[_,ee]),J=a.useMemo(()=>Ra(_.length,W),[_.length,W]),Z=a.useMemo(()=>Vl(_.length,W),[_.length,W]),ce=a.useMemo(()=>_.filter(p=>p.prefix==="title1"),[_]),ue=a.useMemo(()=>_.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[_]),ve=a.useMemo(()=>Ps(ce,ee),[ce,ee]),Le=a.useMemo(()=>Ps(ue,ee),[ue,ee]),G=a.useCallback((p,S)=>{const F=_.indexOf(p);if(!be||S==="single-row")return{effectiveWidth:Z[F]??0,resolvedWidth:J[F]??0,maxWidth:Ao(F,J)};if(S==="two-row-top"){const $e=ce.indexOf(p);return{effectiveWidth:ve.effective[$e]??0,resolvedWidth:ve.resolved[$e]??0,maxWidth:Ao($e,ve.resolved)}}const se=ue.indexOf(p);return{effectiveWidth:Le.effective[se]??0,resolvedWidth:Le.resolved[se]??0,maxWidth:Ao(se,Le.resolved)}},[ue,Le,Z,J,_,ce,ve,be]),de=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Ee=de(R??0),te=a.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:X,title3MarginLeft:f}),[b,X,f]),ie=a.useCallback(p=>_.slice(0,p+1).reduce((S,F,se)=>S+(F!=null&&F.marginLeftKey?te[F.marginLeftKey]??0:0)+(J[se]??0),0)+(be?0:b??0),[_,te,J,be,b]),Fe=a.useCallback(()=>be?0:b??0,[be,b]),We=a.useCallback(p=>ue.slice(0,p).reduce((S,F,se)=>S+(F.marginLeftKey?te[F.marginLeftKey]??0:0)+(Le.resolved[se]??0),0),[ue,Le.resolved,te]),qe=a.useCallback(p=>{const S=ue[p];return We(p)+(S.marginLeftKey?te[S.marginLeftKey]??0:0)+(Le.resolved[p]??0)},[ue,Le.resolved,We,te]),Ze=(p,S)=>{const F=p.marginLeftKey?te[p.marginLeftKey]??0:0,{effectiveWidth:se,resolvedWidth:$e,maxWidth:Pe}=G(p,S),Ue=o&&S==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...S==="single-row"?{gridArea:p.prefix}:{},width:de(se),...F>0?{marginLeft:de(F)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),Ue&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e),style:{position:"absolute",top:0,left:de(-F),width:`max(${de(F)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ue&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:de(-gi/2),width:de(gi),height:"100%",pointerEvents:"auto"}})]},p.className)},ct=()=>{const p=be?-1:_.findIndex(se=>se.prefix==="title1"),S=!be&&(o||(b??0)>0)?(()=>{const se=b??0,$e=p>=0?J[p]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e),style:{position:"absolute",top:0,left:0,width:`max(${de(se)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,F=_.flatMap((se,$e)=>{if(!se.marginLeftKey)return[];const Pe=te[se.marginLeftKey]??0,Ue=Vh(_,J,te,$e)+Fe();return r.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J[$e]),style:{position:"absolute",top:0,left:de(Ue),width:`max(${de(Pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return S?[S,...F]:F},pt=()=>_.map((p,S)=>{const F=Ao(S,J),$e=ie(S)-gi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de($e),width:de(gi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Xe=()=>ue.flatMap((p,S)=>{if(!p.marginLeftKey)return[];const F=te[p.marginLeftKey]??0,se=We(S),{resolvedWidth:$e}=G(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e),style:{position:"absolute",top:0,left:de(se),width:`max(${de(F)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),vt=()=>ue.map((p,S)=>{const{maxWidth:F}=G(p,"two-row-bottom"),$e=qe(S)-gi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de($e),width:de(gi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),et=a.useRef(null),je=a.useRef(null),dt=a.useRef(null),mt=a.useRef([]),ot=a.useRef([]),kt=a.useRef(0),Ht=a.useRef(null),tt=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),At=a.useRef(null),It=a.useRef(null),ze=a.useRef(0),Qe=a.useRef("forward"),He=a.useRef(0),st=a.useRef(null),St=a.useRef(!1),Ct=t.length>1&&(!o||!!l),Zt=Ct?3:1,an=a.useMemo(()=>Array.from({length:Zt},()=>t).flat(),[t,Zt]),[sn,ht]=a.useState(!1),[Bt,Yt]=a.useState(!1),[Gt,Rt]=a.useState(!0),Qt=a.useRef(null),Te=a.useRef(null),_e=a.useRef(!1),De=a.useRef(!1),Oe=a.useRef(null),Ne=a.useRef(null),rt=pe&&!Gt,Me=a.useCallback(()=>{pe&&(Rt(!0),Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(()=>{tt.current.isActive||Rt(!1)},Eh))},[pe]),Ye=a.useCallback(()=>{o||De.current||(De.current=!0,Yt(!1),Oe.current=setTimeout(()=>{s()},Ui))},[o,s]),Ke=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rt?"true":"false",style:{width:y.scalingValue(C??0,i),height:y.scalingValue(C??0,i),marginRight:Q,"--close-icon-hover-color":x},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:r.jsx(cn,{url:w,fill:h,hoverFill:i&&!l?h:x,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Q,height:"100%",pointerEvents:"auto"}})]}),Et=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:de(b??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),xt=()=>{const p=_.find(se=>se.prefix==="title1"),S=_.filter(se=>se.prefix==="title2"||se.prefix==="title3"),F=S.length>0||o||(R??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?Et():null,p&&Ze(p,"two-row-top"),w&&Ke()]}),F?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[S.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[S.map(se=>Ze(se,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Xe(),vt()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ee,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?Et("single-row"):null,_.map(p=>Ze(p,"single-row")),o?r.jsxs(r.Fragment,{children:[ct(),pt()]}):null,w?Ke():null]}),Wt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Tt,backdropStyle:jt,mediaAreaStyle:Ft,overlayContentStyle:Pt,swipeHandlers:en,dismissAreaStyle:yt}=zl({enabled:ge??!1,onClose:Ye,animMs:Ui,isBlockedTarget:Wt}),zt=()=>{if(!Ct||t.length===0)return kt.current=0,0;const p=ot.current[0],S=ot.current[t.length];if(!p||!S)return kt.current;const F=S.offsetLeft-p.offsetLeft;return F>0&&(kt.current=F),kt.current},at=(p=!1)=>{if(!Ct)return;const S=et.current,F=zt();!S||F<=0||F<S.clientWidth*.25||(S.scrollLeft<=0?(S.scrollLeft+=F,p&&(tt.current.scrollLeft+=F),St.current&&(He.current+=F)):S.scrollLeft>=F*2&&(S.scrollLeft-=F,p&&(tt.current.scrollLeft-=F),St.current&&(He.current-=F)))},_t=(p,S=(F=>(F=et.current)==null?void 0:F.scrollLeft)()??0)=>{if(!Ct)return p;let se=t.length+p,$e=1/0;for(let Pe=0;Pe<Zt;Pe++){const Ue=Pe*t.length+p,lt=ot.current[Ue];if(!lt)continue;const Xt=Math.abs(lt.offsetLeft-S);Xt<$e&&($e=Xt,se=Ue)}return se},qt=p=>{const S=et.current;return!p||!S?!1:p.offsetWidth>S.clientWidth+1},re=p=>{const S=et.current;if(!p||!S||!qt(p))return!1;const F=p.offsetLeft,se=F+p.offsetWidth;return S.scrollLeft>=F-1&&S.scrollLeft+S.clientWidth<=se+1},Ae=(p=(S=>(S=et.current)==null?void 0:S.scrollLeft)()??0)=>{for(let se=0;se<ot.current.length;se+=1){const $e=ot.current[se];if($e&&re($e))return se}let F={flatIndex:0,distance:1/0};return ot.current.forEach((se,$e)=>{if(!se)return;const Pe=Math.abs(se.offsetLeft-p);Pe<F.distance&&(F={flatIndex:$e,distance:Pe})}),F.flatIndex},Ve=p=>{et.current&&ot.current.forEach(S=>{S&&(S.style.scrollSnapAlign=qt(S)&&p==="backward"?"end":"start")})},Ge=(p,S,F)=>{const se=p-S,$e=Ae(S),Pe=ot.current[$e];if(re(Pe))return Ae(p)%t.length;const Ue=ot.current[$e+1],lt=Pe?Ue?Ue.offsetLeft-Pe.offsetLeft:Pe.offsetWidth:0,Xt=lt>0?se>lt*ko?1:se<-lt*ko?-1:0:0;return Xt===0?F:Ct?(F+Xt+t.length)%t.length:Math.max(0,Math.min(t.length-1,F+Xt))},bt=a.useCallback((p=!1)=>{if(T!=="on"||o)return;const S=dt.current,F=g.current,se=mt.current[F];if(!S||!se||S.scrollWidth<=S.clientWidth)return;const $e=S.scrollLeft,Pe=$e+S.clientWidth,Ue=se.offsetLeft,lt=Ue+se.offsetWidth;if(Ue>=$e&&lt<=Pe)return;const Xt=S.scrollWidth-S.clientWidth;let Dt=$e;if(!p&&Qt.current===null){const pi=mt.current[F-1],Bi=mt.current[F+1],bo=pi?se.offsetLeft-pi.offsetLeft:Bi?Bi.offsetLeft-se.offsetLeft:se.offsetWidth;lt>Pe?Dt+=bo:Ue<$e&&(Dt-=bo)}else lt>Pe?Dt=lt-S.clientWidth:Dt=Ue;S.scrollLeft=Math.max(0,Math.min(Xt,Dt))},[o,T]),Ut=a.useCallback((p=!1)=>{p&&(_e.current=!0),Te.current===null&&(Te.current=requestAnimationFrame(()=>{Te.current=null;const S=_e.current;_e.current=!1,bt(S)}))},[bt]),gt=a.useCallback(p=>{if(p===g.current)return;const S=g.current;g.current=p;const F=Math.abs(p-S)>1,se=Ct&&t.length>1&&(S===t.length-1&&p===0||S===0&&p===t.length-1);he(p),Ut(F||se)},[t.length,Ct,Ut]),wt=()=>{if(!et.current||t.length===0||Qt.current!==null||tt.current.isActive&&tt.current.hasMoved)return;const p=et.current.scrollLeft,S=Ae(p)%t.length;S!==g.current&&gt(S)},tn=()=>{Qt.current=null},Ot=p=>{const S=et.current;S&&(S.style.scrollSnapType=p?"":"none")},fn=()=>{var p;(p=It.current)==null||p.call(It),It.current=null},bn=()=>{st.current!==null&&(cancelAnimationFrame(st.current),st.current=null),St.current=!1},Un=()=>{const p=et.current;if(!p){st.current=null,St.current=!1;return}const S=He.current-p.scrollLeft;if(Math.abs(S)<.5){p.scrollLeft=He.current,at(),wt(),st.current=null,St.current=!1;return}p.scrollLeft+=S*Ph,at(),wt(),Me(),st.current=requestAnimationFrame(Un)},Xn=()=>{const p=je.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},fo=(p,S,F,se)=>{Xn(),p.scrollLeft=S,ze.current=p.scrollLeft,at(),F!==void 0?(g.current=F,he(F)):wt(),Ot(!0),se==null||se()},yo=(p,{behavior:S="smooth",activeIndex:F,onComplete:se}={})=>{const $e=et.current,Pe=je.current;if(!$e||!Pe)return;if(bn(),fn(),Ot(!1),S==="auto"){fo($e,p,F,se);return}const Ue=Math.abs(p-$e.scrollLeft),lt=$h(Ue,Lh,Ih,$e.clientWidth*.55);It.current=Th($e,Pe,p,{duration:lt,easing:Rh,onComplete:()=>{It.current=null,fo($e,p,F,se)}})},pr=(p="smooth")=>{const S=et.current;if(!S||t.length===0)return;const F=Ae()%t.length,se=_t(F,S.scrollLeft),$e=ot.current[se];$e&&yo($e.offsetLeft,{behavior:p,activeIndex:F})},mr=(p,S="smooth",F,se)=>{const $e=et.current;if(!$e||t.length===0)return;const Pe=(se??$e.scrollLeft)-p,Ue=Ae(p),lt=ot.current[Ue];if(re(lt)){Ot(!0),wt();return}const Xt=ot.current[Ue+1],Dt=lt?Xt?Xt.offsetLeft-lt.offsetLeft:lt.offsetWidth:0;if((Dt>0?Pe>Dt*ko?1:Pe<-Dt*ko?-1:0:0)!==0){const Kl=F??Ue%t.length,Ul=Ge(se??$e.scrollLeft,p,Kl);wn(Ul,S);return}const Bi=se??$e.scrollLeft,bo=Ae(Bi),Ea=ot.current[bo];if(Ea&&Math.abs(Ea.offsetLeft-Bi)<1){Ot(!0),wt();return}pr("auto")},wn=(p,S="smooth")=>{const F=et.current;if(!F||t.length===0)return;const se=_t(p,F.scrollLeft),$e=ot.current[se];$e&&(S==="smooth"?Qt.current=p:Qt.current=null,g.current=p,he(p),Ut(!0),yo($e.offsetLeft,{behavior:S,activeIndex:p,onComplete:S==="smooth"?tn:void 0}))},ui=()=>{At.current&&(window.removeEventListener("pointerup",At.current),window.removeEventListener("pointercancel",At.current),At.current=null)},vo=(p,S,F,se,$e)=>{const Pe=F-p,Ue=se-S,lt=Math.abs(Pe),Xt=Math.abs(Ue);if(lt<Wh||lt<=Xt)return!1;const Dt=Pe<0?1:-1,pi=Ct?($e+Dt+t.length)%t.length:Math.max(0,Math.min(t.length-1,$e+Dt));return pi===$e?!1:(wn(pi),!0)},Yn=p=>{if(!tt.current.isActive)return;ui();const S=et.current;if(!S)return;const{scrollLeft:F,startActiveIndex:se,hasMoved:$e}=tt.current,Pe=S.scrollLeft;at(!0),tt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ht(!1),p!==void 0&&S.hasPointerCapture(p)&&S.releasePointerCapture(p),$e?mr(F,"smooth",se,Pe):(Ot(!0),wt()),Me()},xo=(p,S)=>{const F=Ht.current;Ht.current=null,F&&(vo(F.startX,F.startY,p,S,F.startActiveIndex),Me())},gr=p=>{if(!oe)return;if(p.pointerType==="touch"){if(bn(),Ot(!0),Wt(p.target))return;Ht.current={startX:p.clientX,startY:p.clientY,startActiveIndex:g.current};return}if(p.pointerType!=="mouse"||p.button!==0||Wt(p.target))return;const S=et.current;if(!S)return;bn(),fn(),Xn(),Qt.current=null,tt.current={isActive:!0,startX:p.clientX,scrollLeft:S.scrollLeft,startActiveIndex:g.current,hasMoved:!1},Ot(!1),Me(),S.setPointerCapture(p.pointerId),ui();const F=se=>{se.pointerType==="mouse"&&Yn(se.pointerId)};At.current=F,window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F)},hr=p=>{if(!oe||p.pointerType!=="mouse")return;const S=et.current;if(!S||!tt.current.isActive)return;if(p.buttons===0){Yn(p.pointerId);return}const F=p.clientX-tt.current.startX;Math.abs(F)>Ah&&(tt.current.hasMoved=!0,ht(!0)),tt.current.hasMoved&&(p.preventDefault(),S.scrollLeft=tt.current.scrollLeft-F,at(!0),wt(),Me())},V=p=>{if(oe){if(p.pointerType==="touch"){p.type==="pointerup"?xo(p.clientX,p.clientY):Ht.current=null;return}p.pointerType==="mouse"&&Yn(p.pointerId)}},Ce=p=>{!oe||p.pointerType!=="mouse"||Yn(p.pointerId)};return Dl(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Yt(!0));return()=>{cancelAnimationFrame(p),fn(),ui(),Te.current!==null&&(cancelAnimationFrame(Te.current),Te.current=null),Oe.current&&clearTimeout(Oe.current),Ne.current&&clearTimeout(Ne.current)}},[]),a.useEffect(()=>{if(!pe){Rt(!0);return}Me();const p=$t.current;if(!p)return;const S=()=>Me();return p.addEventListener("pointermove",S),p.addEventListener("pointerdown",S),()=>{p.removeEventListener("pointermove",S),p.removeEventListener("pointerdown",S),Ne.current&&clearTimeout(Ne.current)}},[pe,Me]),a.useEffect(()=>{const p=S=>{S.key==="Escape"&&Ye()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Ye]),a.useLayoutEffect(()=>{zt()},[E,t.length,Ct]),a.useLayoutEffect(()=>{o||wn(g.current,"auto")},[E,o]),a.useLayoutEffect(()=>{wn(0,"auto")},[t.length,Ct]),a.useEffect(()=>{const p=et.current;if(!p||o||!ge)return;const S=F=>{if(F.preventDefault(),Math.abs(F.deltaY)<=Math.abs(F.deltaX))return;const se=F.deltaMode===1?kh:F.deltaMode===2?p.clientHeight:1,$e=F.deltaY*se*Mh;if($e!==0){if(fn(),St.current||(St.current=!0,He.current=p.scrollLeft,Qt.current=null,Ot(!1)),He.current+=$e,!Ct){const Pe=p.scrollWidth-p.clientWidth;He.current=Math.max(0,Math.min(Pe,He.current))}Me(),st.current===null&&(st.current=requestAnimationFrame(Un))}};return p.addEventListener("wheel",S,{passive:!1}),()=>{p.removeEventListener("wheel",S),bn()}},[o,ge,Ct]),a.useEffect(()=>{const p=et.current;if(!p)return;const S=()=>{at(tt.current.isActive);const se=p.scrollLeft,$e=se-ze.current;ze.current=se;const Pe=kt.current>0?kt.current*.5:1/0;if($e!==0&&Math.abs($e)<Pe){const Ue=$e>0?"forward":"backward";Ue!==Qe.current&&(Qe.current=Ue,Ve(Ue))}tt.current.isActive&&tt.current.hasMoved||wt()};p.addEventListener("scroll",S,{passive:!0});const F=new ResizeObserver(()=>{zt(),at(tt.current.isActive),Ve(Qe.current),wt()});return F.observe(p),()=>{fn(),p.removeEventListener("scroll",S),F.disconnect()}},[t.length,Ct]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Tt||Ye()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Bt?1:0,transition:`opacity ${Ui}ms ease`,pointerEvents:Bt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...jt}}),r.jsxs("div",{ref:$t,className:`${e}-lightbox-dismiss-area`,style:yt,...en,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ft,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:et,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":oe&&t.length>0?"true":"false","data-mouse-dragging":sn?"true":"false",onPointerDown:gr,onPointerMove:hr,onPointerUp:V,onPointerCancel:V,onLostPointerCapture:Ce,children:r.jsx("div",{ref:je,className:`${e}-lightbox-strip-track`,style:{gap:E},children:an.map((p,S)=>{const F=p.image.objectFit??"contain",se=S%t.length,$e=Math.floor(S/t.length),Pe=Po(E),Ue=`calc(-0.5 * (${Pe} + ${E}))`;return r.jsxs("div",{ref:lt=>ot.current[S]=lt,className:`${e}-strip-item`,style:{height:A==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:F}}),o&&se<t.length-1&&$e===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ue,width:Pe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${$e}-${p.image.url}-${se}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rt?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:D,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:K,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:(xe||w)&&r.jsx("div",{className:`${e}-header ${be?`${e}-header-two-row`:`${e}-header-single-row`}`,children:be?xt():xe||w?ft():null})})})]}),t.length>1&&T==="on"&&(()=>{const p=Po(L),S=`calc(-0.5 * (${L} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:L},children:r.jsx("div",{ref:dt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:F=>F.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":k,style:{gap:H,"--thumbnail-active-color":N},children:[t.map((F,se)=>{const $e=Po(H),Pe=`calc(-0.5 * (${$e} + ${H}))`;return r.jsxs("div",{ref:Ue=>{mt.current[se]=Ue},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===se?"true":"false",onClick:()=>ge&&$==="click"&&wn(se),onMouseEnter:()=>Se&&$==="hover"&&wn(se),"aria-label":F.image.name?`View ${F.image.name}`:`View image ${se+1}`,"aria-current":O===se?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Ie?` ${e}-thumb-image-cover`:""}`,src:F.image.url,alt:"",draggable:!1,style:{...fe,maxWidth:z,maxHeight:z,width:I.display==="cover"?"auto":"100%",height:"auto",objectFit:I.display==="cover"?"cover":"contain"}})}),o&&se<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pe,width:$e,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${F.image.url}-${se}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:S,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function qh(e){return`
12944
12944
  .${e}-wrapper {
12945
12945
  position: relative;
12946
12946
  width: 100%;
@@ -13886,7 +13886,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
13886
13886
  </>
13887
13887
  );
13888
13888
  };
13889
- `,Xh="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Yh(e){const t={};return t[Lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Lt(e,"fontSettings")]={...ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Lt(e,"fontSize")]={...ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Lt(e,"lineHeight")]={...ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Lt(e,"letterSpacing")]={...ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Lt(e,"wordSpacing")]={...ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Lt(e,"textAlign")]={...ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Lt(e,"textAppearance")]={...ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Jh=Ai.reduce((e,t)=>({...e,...Yh(t)}),{}),Zh=Ai.reduce((e,t)=>({...e,[Lt(t,"fontFamily")]:"Goudy Bookletter 1911",[Lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Lt(t,"letterSpacing")]:0,[Lt(t,"wordSpacing")]:0,[Lt(t,"textAlign")]:"left",[Lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Wr(e){return Ai.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Lt(n,"fontSize")]=i),o!==void 0&&(t[Lt(n,"lineHeight")]=o),t},{})}const Qh=zh(),ef={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Jh,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Xh,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...Zh},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Wr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Wr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Wr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Qh]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},tf={element:Kh,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:ef,sourceCode:Uh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ai.map(e=>({path:`${Lt(e,"fontFamily")}`}))]},fontRelations:{...Ai.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Lt(t,"fontFamily")}`}),{})}},nf=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:v,coverFit:w,backgroundColor:C,imageGap:h,maxWidth:x,maxHeight:$,textTransition:T,title1Width:I,title2Width:k,title3Width:H,title1MarginLeft:M=0,title2MarginLeft:B=0,title3MarginLeft:P=0,titleRowMarginBottom:b=0,titleHeaderLayout:G="single-row",countCloseGap:f=0,closeIcon:R,closeIconMaxWidth:A,closeIconColor:j,closeIconHoverColor:K,contentMarginTop:le=0,iconMarginRight:X=0}=n,z=a.useCallback(V=>y.scalingValue(V,i??!1),[i]),_=z(h??0),L=`${x}%`,E=`${$}%`,D=z(f),U=z(le),Q=z(X),O=ri("title1",oi(n,"title1"),i),ge=ri("title2",oi(n,"title2"),i),g=ri("title3",oi(n,"title3"),i),he=ri("count",oi(n,"count"),i),se=G==="mobile",ve=!i||!!l,Ee=!o&&(!i||!!l),oe=a.useMemo(()=>Ho(t,v),[t,v]),[xe,Y]=a.useState(s),be=oe[xe],me=be==null?void 0:be.entry,[ue,re]=a.useState(!1),[Le,Ce]=a.useState(null),[fe,$e]=a.useState(!1),[N,te]=a.useState(null),[W,J]=a.useState(!1),[Z,ce]=a.useState(0),[pe,ye]=a.useState(),[Ie,q]=a.useState(),[de,Me]=a.useState(null),ee=a.useRef(null),ne=a.useRef(0),Fe=a.useRef(0),We=a.useRef(0),qe=a.useRef(!1),Ze=a.useRef(null),ct=a.useRef(null),pt=a.useRef(null),Xe=a.useRef(null),vt=a.useRef(null),$t=a.useRef(null),et=a.useRef(null),je=a.useCallback(()=>{const V=ct.current;if(!V)return;const Se=V.closest(`.${e}-lightbox-content-area`);if(!Se)return V.getBoundingClientRect().width;const p=Array.from(Se.children).reduce((S,F)=>!(F instanceof HTMLElement)||F.contains(V)?S:S+F.getBoundingClientRect().width,0);return Se.getBoundingClientRect().width-p},[e]),dt=a.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=null)},[]),mt=a.useCallback(V=>{V===ne.current&&(te(null),J(!1))},[]),ot=a.useCallback(()=>{o||qe.current||(qe.current=!0,u==null||u(),re(!1),Ze.current=setTimeout(()=>{m()},300))},[o,u,m]),kt=a.useCallback(V=>!!(V.closest("[data-controls]")||V.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:tt,mediaAreaStyle:At,overlayContentStyle:It,swipeHandlers:ze,dismissAreaStyle:Qe}=zl({enabled:Ee,onClose:ot,animMs:300,isBlockedTarget:kt}),He=a.useCallback(V=>{d&&Sl(V+1,c,!0)},[d,c]),st=a.useCallback(V=>{if(V)return V.getBoundingClientRect().height},[]),St=a.useCallback(V=>{if(oe.length===0)return;const Se=(V%oe.length+oe.length)%oe.length;if(Se===xe)return;const p=oe[xe],S=oe[Se];ne.current+=1;const F=ne.current,ae=T==="fade"&&ss(p==null?void 0:p.entry)!==ss(S==null?void 0:S.entry),we=st(pt.current),Pe=ae?(()=>{const lt=je();Wi.flushSync(()=>{Me(S.entry)}),pt.current&&lt&&(pt.current.style.width=`${lt}px`);const Xt=st(pt.current);return pt.current&&(pt.current.style.width=""),{measuredIncomingTitlesHeight:Xt,incomingTitlesMeasureWidth:lt}})():void 0,Ue=Math.max(we??0,(Pe==null?void 0:Pe.measuredIncomingTitlesHeight)??0)||void 0;ce(F),te(xe),J(!0),Y(Se),He(Se),We.current=Se,ae?(dt(),Ue&&ye(Ue),Pe!=null&&Pe.incomingTitlesMeasureWidth&&q(Pe.incomingTitlesMeasureWidth),Ce((p==null?void 0:p.entryIndex)??null),$e(!0),Fe.current=S.entryIndex,ee.current=setTimeout(()=>{Ce(null),$e(!1),ye(void 0),q(void 0),Me(null),ee.current=null},400)):(dt(),Ce(null),$e(!1),ye(void 0),q(void 0),Me(null),Fe.current=S.entryIndex)},[xe,dt,je,st,oe,He,T]),Ct=a.useCallback(()=>{et.current=null},[]),Zt=a.useCallback(V=>{!ve||oe.length<=1||V.pointerType==="mouse"&&V.button!==0||V.target.closest("[data-controls]")||(et.current={startX:V.clientX,startY:V.clientY,pointerId:V.pointerId})},[ve,oe.length]),an=a.useCallback(V=>{var lt;if(!ve||oe.length<=1||V.pointerType==="mouse"&&V.button!==0)return;if(Ht){Ct();return}const Se=et.current;if(!Se||Se.pointerId!==V.pointerId||(Ct(),V.target.closest("[data-controls]")))return;const S=V.clientX-Se.startX,F=V.clientY-Se.startY,ae=Math.abs(S),we=Math.abs(F);if(ae>=hm&&ae>we){St(S>0?xe-1:xe+1);return}if(ae>is||we>is)return;const Pe=(lt=Xe.current)==null?void 0:lt.getBoundingClientRect(),Ue=Pe?Pe.left+Pe.width/2:window.innerWidth/2;St(V.clientX<Ue?xe-1:xe+1)},[xe,ve,St,Ht,Ct,oe.length]),sn=a.useCallback(V=>{const Se=et.current;(Se==null?void 0:Se.pointerId)===V.pointerId&&Ct()},[Ct]);Dl(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const V=requestAnimationFrame(()=>{re(!0),requestAnimationFrame(()=>{vt.current?vt.current.focus():Xe.current&&Xe.current.focus()})});return()=>{cancelAnimationFrame(V),Ze.current&&clearTimeout(Ze.current),ee.current&&clearTimeout(ee.current);const Se=$t.current;Se&&document.contains(Se)&&Se.focus()}},[]),a.useEffect(()=>{var V;T!=="fade"&&(Fe.current=((V=oe[xe])==null?void 0:V.entryIndex)??0,dt(),Ce(null),$e(!1),ye(void 0),q(void 0))},[xe,dt,oe,T]),a.useEffect(()=>{const V=Se=>{if(Se.key==="Escape"){ot();return}if(Se.key==="ArrowLeft"&&oe.length>1){St(xe-1);return}if(Se.key==="ArrowRight"&&oe.length>1){St(xe+1);return}if(Se.key==="Tab"&&Xe.current){const p=Xe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),S=Array.from(p).filter(Pe=>!Pe.closest('[aria-hidden="true"]'));if(S.length===0)return;const F=S[0],ae=S[S.length-1],we=document.activeElement;Se.shiftKey?(we===F||!Xe.current.contains(we))&&(Se.preventDefault(),ae.focus()):(we===ae||!Xe.current.contains(we))&&(Se.preventDefault(),F.focus())}};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[St,ot,xe,oe.length]),a.useLayoutEffect(()=>{dt(),ne.current=0,ce(0),te(null),J(!1),Ce(null),$e(!1),ye(void 0),q(void 0),Me(null),Y(V=>{const Se=Math.max(0,oe.length-1);return Math.min(V,Se)})},[dt,t.length,v,oe.length]),a.useLayoutEffect(()=>{var p;const V=Math.max(0,oe.length-1),Se=Math.min(Math.max(0,s),V);We.current=Se,Fe.current=((p=oe[Se])==null?void 0:p.entryIndex)??0,Y(Se)},[s]);const ht=Le!==null?t[Le]:null,Bt=N!==null?oe[N]:null,Yt=(me==null?void 0:me.title1)||(me==null?void 0:me.title2)||(me==null?void 0:me.title3)||(ht==null?void 0:ht.title1)||(ht==null?void 0:ht.title2)||(ht==null?void 0:ht.title3),Gt=Sm(v,oe,t),Rt=R!==null,Qt=Yt||Gt||Rt,Te=Gt&&Rt?{gap:D}:void 0,_e=`${e}-titles-stack${se?` ${e}-titles-stack-stacked`:""}`,De=`${e}-titles-layer-out${se?` ${e}-titles-layer-out-stacked`:""}`,Oe=`${e}-titles-layer-out`,Ne=(M??0)>0||o,rt=z(b),ke=a.useMemo(()=>({title1Width:I??wi.title1Width,title2Width:k??wi.title2Width,title3Width:H??wi.title3Width}),[I,k,H]),Ye=a.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:P}),[B,P]),Ke=a.useMemo(()=>me?Bn(e,me,O,ge,g):[],[e,me,O,ge,g]),Et=a.useMemo(()=>Ke.map(V=>ke[V.widthKey]),[Ke,ke]),xt=a.useMemo(()=>Ii(Ke.length,Et),[Ke.length,Et]),ft=a.useMemo(()=>no(Ke.length,Et),[Ke.length,Et]),Wt=a.useMemo(()=>Ke.filter(V=>V.prefix==="title1"),[Ke]),Tt=a.useMemo(()=>Ke.filter(V=>V.prefix==="title2"||V.prefix==="title3"),[Ke]),jt=a.useMemo(()=>jn(Wt,ke),[Wt,ke]),Ft=a.useMemo(()=>jn(Tt,ke),[Tt,ke]),Pt=a.useCallback((V,Se)=>{const p=Ke.findIndex(F=>F.prefix===V.prefix);if(!se||Se==="single-row")return{effectiveWidth:ft[p]??0,resolvedWidth:xt[p]??0,maxWidth:on(p,xt)};if(Se==="two-row-top"){const F=Wt.findIndex(ae=>ae.prefix===V.prefix);return{effectiveWidth:jt.effective[F]??0,resolvedWidth:jt.resolved[F]??0,maxWidth:on(F,jt.resolved)}}const S=Tt.findIndex(F=>F.prefix===V.prefix);return{effectiveWidth:Ft.effective[S]??0,resolvedWidth:Ft.resolved[S]??0,maxWidth:on(S,Ft.resolved)}},[Ke,Tt,Ft,ft,xt,Wt,jt,se]),en=a.useCallback(V=>Il(Ke,xt,Ye,V)+(se?0:M??0),[Ke,xt,Ye,se,M]),yt=a.useCallback(()=>se?0:M??0,[se,M]),zt=a.useCallback(V=>Tt.slice(0,V).reduce((Se,p,S)=>Se+(p.marginLeftKey?Ye[p.marginLeftKey]??0:0)+(Ft.resolved[S]??0),0),[Tt,Ft.resolved,Ye]),at=a.useCallback(V=>{const Se=Tt[V];return zt(V)+(Se.marginLeftKey?Ye[Se.marginLeftKey]??0:0)+(Ft.resolved[V]??0)},[Tt,Ft.resolved,zt,Ye]),_t=a.useCallback((V,Se,p)=>{if(!se||p==="single-row"){const Pe=V.findIndex(Dt=>Dt.prefix===Se.prefix),Ue=V.map(Dt=>ke[Dt.widthKey]),lt=Ii(V.length,Ue);return{effectiveWidth:no(V.length,Ue)[Pe]??0,resolvedWidth:lt[Pe]??0,maxWidth:on(Pe,lt)}}if(p==="two-row-top"){const Pe=V.filter(Dt=>Dt.prefix==="title1"),Ue=Pe.findIndex(Dt=>Dt.prefix===Se.prefix),{resolved:lt,effective:Xt}=jn(Pe,ke);return{effectiveWidth:Xt[Ue]??0,resolvedWidth:lt[Ue]??0,maxWidth:on(Ue,lt)}}const S=V.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),F=S.findIndex(Pe=>Pe.prefix===Se.prefix),{resolved:ae,effective:we}=jn(S,ke);return{effectiveWidth:we[F]??0,resolvedWidth:ae[F]??0,maxWidth:on(F,ae)}},[ke,se]),qt=(V,Se,p)=>{const S=V.marginLeftKey?Ye[V.marginLeftKey]??0:0,{effectiveWidth:F,resolvedWidth:ae,maxWidth:we}=p??Pt(V,Se),Pe=Math.max(S,On),Ue=o&&Se==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":V.prefix,style:{width:z(F),...S>0?{marginLeft:z(S)}:{}},children:[r.jsx("p",{className:V.className,style:V.style,children:V.text}),Ue&&V.marginLeftKey?r.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae),style:{position:"absolute",top:0,left:z(-S),width:z(Pe),height:"100%",pointerEvents:"auto"}}):null,Ue?r.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(we),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-pn/2),width:z(pn),height:"100%",pointerEvents:"auto"}}):null]},V.className)},ie=(V="two-row")=>{const Se=Ke.findIndex(F=>F.prefix==="title1"),p=Se>=0?xt[Se]:ke.title1Width,S=V==="two-row"&&o;return r.jsx("div",{...S?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:z(M??0),flexShrink:0,alignSelf:"stretch",...S?{pointerEvents:"auto"}:{}}})},Ae=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),Ve=()=>r.jsx("span",{className:`${e}-entry-counter`,style:he,"aria-live":"polite","aria-atomic":"true",children:$m(oe,xe,v,t)}),Ge=()=>Gt?o&&Rt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ve(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Lr(D)} + ${D}))`,width:Lr(D),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ve():null,bt=()=>!Gt&&!Rt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Te,children:[Ge(),Rt?wt():null]}),Ut=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?Ae():null,Ne?ie("single-row"):null,Ot(me),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),bt(),wn()]}),gt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?Ae():null,Ne?ie("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:fe&&pe?{minHeight:pe}:void 0,children:[r.jsx("div",{ref:pt,className:_e,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Xn(de||me)}),r.jsxs("div",{ref:ct,className:_e,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%",...fe&&Ie?{width:Ie,maxWidth:"100%"}:void 0},children:[ht&&fe?r.jsx("div",{className:`${De} ${e}-titles-fade-out`,children:Xn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Xn(me)})]})]}),bt(),wn()]}),wt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(A??0,i),height:y.scalingValue(A??0,i),marginRight:Q,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:vt,type:"button",className:`${e}-close-icon-inner`,onClick:ot,"aria-label":"Close",children:r.jsx(cn,{url:R??"",fill:j,hoverFill:i&&!l?j:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Q,height:"100%",pointerEvents:"auto"}})]}),tn=(V,Se)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Gt||Yt?Ae():null,Ne?ie("two-row"):null,Se!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Se},children:V}):r.jsxs(r.Fragment,{children:[V,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),bt()]}),Ot=V=>{if(!V)return null;const Se=Bn(e,V,O,ge,g);return r.jsx(r.Fragment,{children:Se.map(p=>qt(p,"single-row",_t(Se,p,"single-row")))})},fn=V=>{if(!V)return null;const Se=Bn(e,V,O,ge,g),p=Se.find(S=>S.prefix==="title1");return p?qt(p,"two-row-top",_t(Se,p,"two-row-top")):null},bn=(V,Se=!1)=>{const p=V?Bn(e,V,O,ge,g):[],S=p.filter(we=>we.prefix==="title2"||we.prefix==="title3"),F=o&&Se;return S.length>0||F||(b??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[S.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[S.map(we=>qt(we,"two-row-bottom",_t(p,we,"two-row-bottom"))),Se&&o?r.jsxs(r.Fragment,{children:[pr(),mr()]}):null]}):null,(b??0)>0||F?r.jsx("div",{"data-controls":F?"titleRowMarginBottom":void 0,"data-controls-axis":F?"y":void 0,"data-controls-reverse":F?"":void 0,className:F?`${e}-control`:void 0,style:{height:rt,width:"100%",flexShrink:0,pointerEvents:F?"auto":"none"}}):null]}):null},Un=(V,Se=!1)=>r.jsxs(r.Fragment,{children:[tn(fn(V)),bn(V,Se)]}),Xn=V=>se?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Un(V)}):V?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ot(V)}):null,fo=()=>{const V=se?-1:Ke.findIndex(S=>S.prefix==="title1"),Se=!se&&(o||(M??0)>0)?(()=>{const S=M??0,F=V>=0?xt[V]:ke.title1Width,ae=Math.max(S,On);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F),style:{position:"absolute",top:0,left:0,width:z(ae),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=Ke.flatMap((S,F)=>{if(!S.marginLeftKey)return[];const ae=Ye[S.marginLeftKey]??0,we=Ll(Ke,xt,Ye,F)+yt(),Pe=Math.max(ae,On);return r.jsx("div",{"data-controls":S.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(xt[F]),style:{position:"absolute",top:0,left:z(we),width:z(Pe),height:"100%",pointerEvents:"auto"}},S.marginLeftKey)});return Se?[Se,...p]:p},yo=()=>Ke.map((V,Se)=>{const p=on(Se,xt),F=en(Se)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(F),width:z(pn),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),pr=()=>Tt.flatMap((V,Se)=>{if(!V.marginLeftKey)return[];const p=Ye[V.marginLeftKey]??0,S=zt(Se),F=Math.max(p,On),{resolvedWidth:ae}=Pt(V,"two-row-bottom");return r.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae),style:{position:"absolute",top:0,left:z(S),width:z(F),height:"100%",pointerEvents:"auto"}},V.marginLeftKey)}),mr=()=>Tt.map((V,Se)=>{const{maxWidth:p}=Pt(V,"two-row-bottom"),F=at(Se)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(F),width:z(pn),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),wn=()=>!o||se?null:r.jsxs(r.Fragment,{children:[fo(),yo()]}),ui=V=>{const Se=!V.objectFit&&Pn(w);return{className:`${e}-slide-image-cell${Se?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:L,maxHeight:E,...Se?{"--image-aspect-ratio":ur(w)}:{}}}},vo=V=>V.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":V.objectFit}}:Pn(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Yn=V=>{if(V.length===0)return null;const Se=V.length>1,p=Lr(_),S=`calc(-0.5 * (${p} + ${_}))`;if(V.length===1){const F=V[0];return r.jsx("div",{...ui(F),children:r.jsx("img",{...vo(F),src:F.url,alt:F.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Se?{gap:_}:void 0,children:V.map((F,ae)=>r.jsxs("div",{...ui(F),children:[r.jsx("img",{...vo(F),src:F.url,alt:F.name??"",draggable:!1}),o&&Se&&ae<V.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:S,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${F.url}-${ae}`))})},xo=!!(me!=null&&me.title2||me!=null&&me.title3||ht!=null&&ht.title2||ht!=null&&ht.title3||(b??0)>0||o),gr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:pt,className:_e,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Un(de||me)}),r.jsxs("div",{ref:ct,className:`${e}-titles-row-two-row`,style:{...fe&&pe?{minHeight:pe}:void 0,...fe&&Ie?{width:Ie,maxWidth:"100%"}:void 0},children:[tn(r.jsxs("div",{className:_e,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%"},children:[ht&&fe?r.jsx("div",{className:`${Oe} ${e}-titles-fade-out`,children:fn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:fn(me)})]}),fe&&pe?pe:void 0),xo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ht&&fe?r.jsx("div",{className:`${De} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:bn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${se?` ${e}-titles-layer-in-stacked`:""}`,children:bn(me,!0)})]}):null]})]}),hr=()=>{const V=xo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...V?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:V?void 0:{flex:"0 0 auto",height:"auto"},children:Un(me,!0)}),wn()]})};return r.jsxs("div",{ref:Xe,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||ot()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Rt?void 0:-1,style:{opacity:ue?1:0,transition:"opacity 300ms ease",pointerEvents:ue?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:C,...tt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Qe,...ze,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:V=>V.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ve&&oe.length>1?"true":"false",onPointerDown:ve?Zt:void 0,onPointerUp:ve?an:void 0,onPointerCancel:ve?sn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&W?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:V=>{V.target===V.currentTarget&&mt(Z)},children:r.jsx("div",{className:`${e}-slide-area`,children:Yn(Bt.images)})},`slide-out-${Z}`):null,r.jsx("div",{className:`${e}-slide-layer-in${W?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:be?Yn(be.images):null})},`slide-in-${Z}-${xe}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:It,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:U,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...se?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${se?` ${e}-lightbox-content-area-stacked`:""}`,children:Qt&&r.jsx("div",{className:`${e}-text-bar-cell${se?` ${e}-text-bar-cell-stacked`:""}`,style:se?void 0:{flex:1,minWidth:0,width:"100%"},children:se?T==="fade"?gr():hr():T==="fade"?gt():Ut()})})})]})]})]})};function of(e){return`
13889
+ `,Xh="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Yh(e){const t={};return t[Lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Lt(e,"fontSettings")]={...ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Lt(e,"fontSize")]={...ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Lt(e,"lineHeight")]={...ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Lt(e,"letterSpacing")]={...ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Lt(e,"wordSpacing")]={...ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Lt(e,"textAlign")]={...ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Lt(e,"textAppearance")]={...ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Jh=Ai.reduce((e,t)=>({...e,...Yh(t)}),{}),Zh=Ai.reduce((e,t)=>({...e,[Lt(t,"fontFamily")]:"Goudy Bookletter 1911",[Lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Lt(t,"letterSpacing")]:0,[Lt(t,"wordSpacing")]:0,[Lt(t,"textAlign")]:"left",[Lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Wr(e){return Ai.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Lt(n,"fontSize")]=i),o!==void 0&&(t[Lt(n,"lineHeight")]=o),t},{})}const Qh=zh(),ef={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Jh,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Xh,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...Zh},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Wr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Wr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Wr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Qh]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},tf={element:Kh,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:ef,sourceCode:Uh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ai.map(e=>({path:`${Lt(e,"fontFamily")}`}))]},fontRelations:{...Ai.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Lt(t,"fontFamily")}`}),{})}},nf=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:v,coverFit:w,backgroundColor:C,imageGap:h,maxWidth:x,maxHeight:$,textTransition:T,title1Width:I,title2Width:k,title3Width:N,title1MarginLeft:M=0,title2MarginLeft:B=0,title3MarginLeft:P=0,titleRowMarginBottom:b=0,titleHeaderLayout:X="single-row",countCloseGap:f=0,closeIcon:R,closeIconMaxWidth:A,closeIconColor:j,closeIconHoverColor:q,contentMarginTop:le=0,iconMarginRight:Y=0}=n,z=a.useCallback(V=>y.scalingValue(V,i??!1),[i]),H=z(h??0),L=`${x}%`,E=`${$}%`,D=z(f),K=z(le),Q=z(Y),O=ri("title1",oi(n,"title1"),i),he=ri("title2",oi(n,"title2"),i),g=ri("title3",oi(n,"title3"),i),me=ri("count",oi(n,"count"),i),ae=X==="mobile",we=!i||!!l,ke=!o&&(!i||!!l),ne=a.useMemo(()=>Ho(t,v),[t,v]),[ye,U]=a.useState(s),be=ne[ye],ge=be==null?void 0:be.entry,[pe,oe]=a.useState(!1),[Se,Ie]=a.useState(null),[fe,xe]=a.useState(!1),[_,ee]=a.useState(null),[W,J]=a.useState(!1),[Z,ce]=a.useState(0),[ue,ve]=a.useState(),[Le,G]=a.useState(),[de,Ee]=a.useState(null),te=a.useRef(null),ie=a.useRef(0),Fe=a.useRef(0),We=a.useRef(0),qe=a.useRef(!1),Ze=a.useRef(null),ct=a.useRef(null),pt=a.useRef(null),Xe=a.useRef(null),vt=a.useRef(null),$t=a.useRef(null),et=a.useRef(null),je=a.useCallback(()=>{const V=ct.current;if(!V)return;const Ce=V.closest(`.${e}-lightbox-content-area`);if(!Ce)return V.getBoundingClientRect().width;const p=Array.from(Ce.children).reduce((S,F)=>!(F instanceof HTMLElement)||F.contains(V)?S:S+F.getBoundingClientRect().width,0);return Ce.getBoundingClientRect().width-p},[e]),dt=a.useCallback(()=>{te.current&&(clearTimeout(te.current),te.current=null)},[]),mt=a.useCallback(V=>{V===ie.current&&(ee(null),J(!1))},[]),ot=a.useCallback(()=>{o||qe.current||(qe.current=!0,u==null||u(),oe(!1),Ze.current=setTimeout(()=>{m()},300))},[o,u,m]),kt=a.useCallback(V=>!!(V.closest("[data-controls]")||V.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:tt,mediaAreaStyle:At,overlayContentStyle:It,swipeHandlers:ze,dismissAreaStyle:Qe}=zl({enabled:ke,onClose:ot,animMs:300,isBlockedTarget:kt}),He=a.useCallback(V=>{d&&Sl(V+1,c,!0)},[d,c]),st=a.useCallback(V=>{if(V)return V.getBoundingClientRect().height},[]),St=a.useCallback(V=>{if(ne.length===0)return;const Ce=(V%ne.length+ne.length)%ne.length;if(Ce===ye)return;const p=ne[ye],S=ne[Ce];ie.current+=1;const F=ie.current,se=T==="fade"&&ss(p==null?void 0:p.entry)!==ss(S==null?void 0:S.entry),$e=st(pt.current),Pe=se?(()=>{const lt=je();Wi.flushSync(()=>{Ee(S.entry)}),pt.current&&lt&&(pt.current.style.width=`${lt}px`);const Xt=st(pt.current);return pt.current&&(pt.current.style.width=""),{measuredIncomingTitlesHeight:Xt,incomingTitlesMeasureWidth:lt}})():void 0,Ue=Math.max($e??0,(Pe==null?void 0:Pe.measuredIncomingTitlesHeight)??0)||void 0;ce(F),ee(ye),J(!0),U(Ce),He(Ce),We.current=Ce,se?(dt(),Ue&&ve(Ue),Pe!=null&&Pe.incomingTitlesMeasureWidth&&G(Pe.incomingTitlesMeasureWidth),Ie((p==null?void 0:p.entryIndex)??null),xe(!0),Fe.current=S.entryIndex,te.current=setTimeout(()=>{Ie(null),xe(!1),ve(void 0),G(void 0),Ee(null),te.current=null},400)):(dt(),Ie(null),xe(!1),ve(void 0),G(void 0),Ee(null),Fe.current=S.entryIndex)},[ye,dt,je,st,ne,He,T]),Ct=a.useCallback(()=>{et.current=null},[]),Zt=a.useCallback(V=>{!we||ne.length<=1||V.pointerType==="mouse"&&V.button!==0||V.target.closest("[data-controls]")||(et.current={startX:V.clientX,startY:V.clientY,pointerId:V.pointerId})},[we,ne.length]),an=a.useCallback(V=>{var lt;if(!we||ne.length<=1||V.pointerType==="mouse"&&V.button!==0)return;if(Ht){Ct();return}const Ce=et.current;if(!Ce||Ce.pointerId!==V.pointerId||(Ct(),V.target.closest("[data-controls]")))return;const S=V.clientX-Ce.startX,F=V.clientY-Ce.startY,se=Math.abs(S),$e=Math.abs(F);if(se>=hm&&se>$e){St(S>0?ye-1:ye+1);return}if(se>is||$e>is)return;const Pe=(lt=Xe.current)==null?void 0:lt.getBoundingClientRect(),Ue=Pe?Pe.left+Pe.width/2:window.innerWidth/2;St(V.clientX<Ue?ye-1:ye+1)},[ye,we,St,Ht,Ct,ne.length]),sn=a.useCallback(V=>{const Ce=et.current;(Ce==null?void 0:Ce.pointerId)===V.pointerId&&Ct()},[Ct]);Dl(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const V=requestAnimationFrame(()=>{oe(!0),requestAnimationFrame(()=>{vt.current?vt.current.focus():Xe.current&&Xe.current.focus()})});return()=>{cancelAnimationFrame(V),Ze.current&&clearTimeout(Ze.current),te.current&&clearTimeout(te.current);const Ce=$t.current;Ce&&document.contains(Ce)&&Ce.focus()}},[]),a.useEffect(()=>{var V;T!=="fade"&&(Fe.current=((V=ne[ye])==null?void 0:V.entryIndex)??0,dt(),Ie(null),xe(!1),ve(void 0),G(void 0))},[ye,dt,ne,T]),a.useEffect(()=>{const V=Ce=>{if(Ce.key==="Escape"){ot();return}if(Ce.key==="ArrowLeft"&&ne.length>1){St(ye-1);return}if(Ce.key==="ArrowRight"&&ne.length>1){St(ye+1);return}if(Ce.key==="Tab"&&Xe.current){const p=Xe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),S=Array.from(p).filter(Pe=>!Pe.closest('[aria-hidden="true"]'));if(S.length===0)return;const F=S[0],se=S[S.length-1],$e=document.activeElement;Ce.shiftKey?($e===F||!Xe.current.contains($e))&&(Ce.preventDefault(),se.focus()):($e===se||!Xe.current.contains($e))&&(Ce.preventDefault(),F.focus())}};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[St,ot,ye,ne.length]),a.useLayoutEffect(()=>{dt(),ie.current=0,ce(0),ee(null),J(!1),Ie(null),xe(!1),ve(void 0),G(void 0),Ee(null),U(V=>{const Ce=Math.max(0,ne.length-1);return Math.min(V,Ce)})},[dt,t.length,v,ne.length]),a.useLayoutEffect(()=>{var p;const V=Math.max(0,ne.length-1),Ce=Math.min(Math.max(0,s),V);We.current=Ce,Fe.current=((p=ne[Ce])==null?void 0:p.entryIndex)??0,U(Ce)},[s]);const ht=Se!==null?t[Se]:null,Bt=_!==null?ne[_]:null,Yt=(ge==null?void 0:ge.title1)||(ge==null?void 0:ge.title2)||(ge==null?void 0:ge.title3)||(ht==null?void 0:ht.title1)||(ht==null?void 0:ht.title2)||(ht==null?void 0:ht.title3),Gt=Sm(v,ne,t),Rt=R!==null,Qt=Yt||Gt||Rt,Te=Gt&&Rt?{gap:D}:void 0,_e=`${e}-titles-stack${ae?` ${e}-titles-stack-stacked`:""}`,De=`${e}-titles-layer-out${ae?` ${e}-titles-layer-out-stacked`:""}`,Oe=`${e}-titles-layer-out`,Ne=(M??0)>0||o,rt=z(b),Me=a.useMemo(()=>({title1Width:I??wi.title1Width,title2Width:k??wi.title2Width,title3Width:N??wi.title3Width}),[I,k,N]),Ye=a.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:P}),[B,P]),Ke=a.useMemo(()=>ge?Bn(e,ge,O,he,g):[],[e,ge,O,he,g]),Et=a.useMemo(()=>Ke.map(V=>Me[V.widthKey]),[Ke,Me]),xt=a.useMemo(()=>Ii(Ke.length,Et),[Ke.length,Et]),ft=a.useMemo(()=>no(Ke.length,Et),[Ke.length,Et]),Wt=a.useMemo(()=>Ke.filter(V=>V.prefix==="title1"),[Ke]),Tt=a.useMemo(()=>Ke.filter(V=>V.prefix==="title2"||V.prefix==="title3"),[Ke]),jt=a.useMemo(()=>jn(Wt,Me),[Wt,Me]),Ft=a.useMemo(()=>jn(Tt,Me),[Tt,Me]),Pt=a.useCallback((V,Ce)=>{const p=Ke.findIndex(F=>F.prefix===V.prefix);if(!ae||Ce==="single-row")return{effectiveWidth:ft[p]??0,resolvedWidth:xt[p]??0,maxWidth:on(p,xt)};if(Ce==="two-row-top"){const F=Wt.findIndex(se=>se.prefix===V.prefix);return{effectiveWidth:jt.effective[F]??0,resolvedWidth:jt.resolved[F]??0,maxWidth:on(F,jt.resolved)}}const S=Tt.findIndex(F=>F.prefix===V.prefix);return{effectiveWidth:Ft.effective[S]??0,resolvedWidth:Ft.resolved[S]??0,maxWidth:on(S,Ft.resolved)}},[Ke,Tt,Ft,ft,xt,Wt,jt,ae]),en=a.useCallback(V=>Il(Ke,xt,Ye,V)+(ae?0:M??0),[Ke,xt,Ye,ae,M]),yt=a.useCallback(()=>ae?0:M??0,[ae,M]),zt=a.useCallback(V=>Tt.slice(0,V).reduce((Ce,p,S)=>Ce+(p.marginLeftKey?Ye[p.marginLeftKey]??0:0)+(Ft.resolved[S]??0),0),[Tt,Ft.resolved,Ye]),at=a.useCallback(V=>{const Ce=Tt[V];return zt(V)+(Ce.marginLeftKey?Ye[Ce.marginLeftKey]??0:0)+(Ft.resolved[V]??0)},[Tt,Ft.resolved,zt,Ye]),_t=a.useCallback((V,Ce,p)=>{if(!ae||p==="single-row"){const Pe=V.findIndex(Dt=>Dt.prefix===Ce.prefix),Ue=V.map(Dt=>Me[Dt.widthKey]),lt=Ii(V.length,Ue);return{effectiveWidth:no(V.length,Ue)[Pe]??0,resolvedWidth:lt[Pe]??0,maxWidth:on(Pe,lt)}}if(p==="two-row-top"){const Pe=V.filter(Dt=>Dt.prefix==="title1"),Ue=Pe.findIndex(Dt=>Dt.prefix===Ce.prefix),{resolved:lt,effective:Xt}=jn(Pe,Me);return{effectiveWidth:Xt[Ue]??0,resolvedWidth:lt[Ue]??0,maxWidth:on(Ue,lt)}}const S=V.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),F=S.findIndex(Pe=>Pe.prefix===Ce.prefix),{resolved:se,effective:$e}=jn(S,Me);return{effectiveWidth:$e[F]??0,resolvedWidth:se[F]??0,maxWidth:on(F,se)}},[Me,ae]),qt=(V,Ce,p)=>{const S=V.marginLeftKey?Ye[V.marginLeftKey]??0:0,{effectiveWidth:F,resolvedWidth:se,maxWidth:$e}=p??Pt(V,Ce),Pe=Math.max(S,On),Ue=o&&Ce==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":V.prefix,style:{width:z(F),...S>0?{marginLeft:z(S)}:{}},children:[r.jsx("p",{className:V.className,style:V.style,children:V.text}),Ue&&V.marginLeftKey?r.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(se),style:{position:"absolute",top:0,left:z(-S),width:z(Pe),height:"100%",pointerEvents:"auto"}}):null,Ue?r.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-pn/2),width:z(pn),height:"100%",pointerEvents:"auto"}}):null]},V.className)},re=(V="two-row")=>{const Ce=Ke.findIndex(F=>F.prefix==="title1"),p=Ce>=0?xt[Ce]:Me.title1Width,S=V==="two-row"&&o;return r.jsx("div",{...S?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:z(M??0),flexShrink:0,alignSelf:"stretch",...S?{pointerEvents:"auto"}:{}}})},Ae=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),Ve=()=>r.jsx("span",{className:`${e}-entry-counter`,style:me,"aria-live":"polite","aria-atomic":"true",children:$m(ne,ye,v,t)}),Ge=()=>Gt?o&&Rt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ve(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Lr(D)} + ${D}))`,width:Lr(D),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ve():null,bt=()=>!Gt&&!Rt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Te,children:[Ge(),Rt?wt():null]}),Ut=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?Ae():null,Ne?re("single-row"):null,Ot(ge),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),bt(),wn()]}),gt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?Ae():null,Ne?re("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:fe&&ue?{minHeight:ue}:void 0,children:[r.jsx("div",{ref:pt,className:_e,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Xn(de||ge)}),r.jsxs("div",{ref:ct,className:_e,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%",...fe&&Le?{width:Le,maxWidth:"100%"}:void 0},children:[ht&&fe?r.jsx("div",{className:`${De} ${e}-titles-fade-out`,children:Xn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Xn(ge)})]})]}),bt(),wn()]}),wt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(A??0,i),height:y.scalingValue(A??0,i),marginRight:Q,"--close-icon-hover-color":q},children:[r.jsx("button",{ref:vt,type:"button",className:`${e}-close-icon-inner`,onClick:ot,"aria-label":"Close",children:r.jsx(cn,{url:R??"",fill:j,hoverFill:i&&!l?j:q,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Q,height:"100%",pointerEvents:"auto"}})]}),tn=(V,Ce)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Gt||Yt?Ae():null,Ne?re("two-row"):null,Ce!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ce},children:V}):r.jsxs(r.Fragment,{children:[V,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),bt()]}),Ot=V=>{if(!V)return null;const Ce=Bn(e,V,O,he,g);return r.jsx(r.Fragment,{children:Ce.map(p=>qt(p,"single-row",_t(Ce,p,"single-row")))})},fn=V=>{if(!V)return null;const Ce=Bn(e,V,O,he,g),p=Ce.find(S=>S.prefix==="title1");return p?qt(p,"two-row-top",_t(Ce,p,"two-row-top")):null},bn=(V,Ce=!1)=>{const p=V?Bn(e,V,O,he,g):[],S=p.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),F=o&&Ce;return S.length>0||F||(b??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[S.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[S.map($e=>qt($e,"two-row-bottom",_t(p,$e,"two-row-bottom"))),Ce&&o?r.jsxs(r.Fragment,{children:[pr(),mr()]}):null]}):null,(b??0)>0||F?r.jsx("div",{"data-controls":F?"titleRowMarginBottom":void 0,"data-controls-axis":F?"y":void 0,"data-controls-reverse":F?"":void 0,className:F?`${e}-control`:void 0,style:{height:rt,width:"100%",flexShrink:0,pointerEvents:F?"auto":"none"}}):null]}):null},Un=(V,Ce=!1)=>r.jsxs(r.Fragment,{children:[tn(fn(V)),bn(V,Ce)]}),Xn=V=>ae?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Un(V)}):V?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ot(V)}):null,fo=()=>{const V=ae?-1:Ke.findIndex(S=>S.prefix==="title1"),Ce=!ae&&(o||(M??0)>0)?(()=>{const S=M??0,F=V>=0?xt[V]:Me.title1Width,se=Math.max(S,On);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F),style:{position:"absolute",top:0,left:0,width:z(se),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=Ke.flatMap((S,F)=>{if(!S.marginLeftKey)return[];const se=Ye[S.marginLeftKey]??0,$e=Ll(Ke,xt,Ye,F)+yt(),Pe=Math.max(se,On);return r.jsx("div",{"data-controls":S.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(xt[F]),style:{position:"absolute",top:0,left:z($e),width:z(Pe),height:"100%",pointerEvents:"auto"}},S.marginLeftKey)});return Ce?[Ce,...p]:p},yo=()=>Ke.map((V,Ce)=>{const p=on(Ce,xt),F=en(Ce)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(F),width:z(pn),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),pr=()=>Tt.flatMap((V,Ce)=>{if(!V.marginLeftKey)return[];const p=Ye[V.marginLeftKey]??0,S=zt(Ce),F=Math.max(p,On),{resolvedWidth:se}=Pt(V,"two-row-bottom");return r.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(se),style:{position:"absolute",top:0,left:z(S),width:z(F),height:"100%",pointerEvents:"auto"}},V.marginLeftKey)}),mr=()=>Tt.map((V,Ce)=>{const{maxWidth:p}=Pt(V,"two-row-bottom"),F=at(Ce)-pn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":V.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(F),width:z(pn),height:"100%",pointerEvents:"auto"}})},`${V.widthKey}-junction`)}),wn=()=>!o||ae?null:r.jsxs(r.Fragment,{children:[fo(),yo()]}),ui=V=>{const Ce=!V.objectFit&&Pn(w);return{className:`${e}-slide-image-cell${Ce?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:L,maxHeight:E,...Ce?{"--image-aspect-ratio":ur(w)}:{}}}},vo=V=>V.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":V.objectFit}}:Pn(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Yn=V=>{if(V.length===0)return null;const Ce=V.length>1,p=Lr(H),S=`calc(-0.5 * (${p} + ${H}))`;if(V.length===1){const F=V[0];return r.jsx("div",{...ui(F),children:r.jsx("img",{...vo(F),src:F.url,alt:F.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Ce?{gap:H}:void 0,children:V.map((F,se)=>r.jsxs("div",{...ui(F),children:[r.jsx("img",{...vo(F),src:F.url,alt:F.name??"",draggable:!1}),o&&Ce&&se<V.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:S,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${F.url}-${se}`))})},xo=!!(ge!=null&&ge.title2||ge!=null&&ge.title3||ht!=null&&ht.title2||ht!=null&&ht.title3||(b??0)>0||o),gr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:pt,className:_e,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Un(de||ge)}),r.jsxs("div",{ref:ct,className:`${e}-titles-row-two-row`,style:{...fe&&ue?{minHeight:ue}:void 0,...fe&&Le?{width:Le,maxWidth:"100%"}:void 0},children:[tn(r.jsxs("div",{className:_e,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%"},children:[ht&&fe?r.jsx("div",{className:`${Oe} ${e}-titles-fade-out`,children:fn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:fn(ge)})]}),fe&&ue?ue:void 0),xo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ht&&fe?r.jsx("div",{className:`${De} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:bn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ae?` ${e}-titles-layer-in-stacked`:""}`,children:bn(ge,!0)})]}):null]})]}),hr=()=>{const V=xo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...V?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:V?void 0:{flex:"0 0 auto",height:"auto"},children:Un(ge,!0)}),wn()]})};return r.jsxs("div",{ref:Xe,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||ot()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Rt?void 0:-1,style:{opacity:pe?1:0,transition:"opacity 300ms ease",pointerEvents:pe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:C,...tt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Qe,...ze,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:V=>V.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":we&&ne.length>1?"true":"false",onPointerDown:we?Zt:void 0,onPointerUp:we?an:void 0,onPointerCancel:we?sn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&W?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:V=>{V.target===V.currentTarget&&mt(Z)},children:r.jsx("div",{className:`${e}-slide-area`,children:Yn(Bt.images)})},`slide-out-${Z}`):null,r.jsx("div",{className:`${e}-slide-layer-in${W?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:be?Yn(be.images):null})},`slide-in-${Z}-${ye}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:It,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:K,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ae?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${ae?` ${e}-lightbox-content-area-stacked`:""}`,children:Qt&&r.jsx("div",{className:`${e}-text-bar-cell${ae?` ${e}-text-bar-cell-stacked`:""}`,style:ae?void 0:{flex:1,minWidth:0,width:"100%"},children:ae?T==="fade"?gr():hr():T==="fade"?gt():Ut()})})})]})]})]})};function of(e){return`
13890
13890
  .${e}-wrapper {
13891
13891
  position: relative;
13892
13892
  width: 100%;
@@ -14420,7 +14420,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14420
14420
  pointer-events: auto;
14421
14421
  z-index: 10;
14422
14422
  }
14423
- `}const rf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:d}=y.useScopedStyles(),c=(s==null?void 0:s.itemId)??null,{cover:u,coverFit:m,type:v}=e,w=a.useRef(null),[C,h]=a.useState(!1),[x,$]=a.useState(0),T=a.useRef(!1),I=a.useRef(!1),k=a.useRef(!1),H=a.useMemo(()=>(t??[]).filter(f=>Li(f).length>0),[t]),M=C&&H.length>0,B=!n,P=a.useCallback(()=>{B&&(k.current=!0,ym(I.current,c),I.current=!1)},[B,c]),b=(f=0)=>{if(H.length===0||n&&!i&&!o)return;const R=Ho(H,v),A=Math.max(0,Math.min(f,R.length-1));if($(A),B){const j=Cl();Sl(A+1,c,j),I.current=!j}h(!0)},G=a.useCallback(()=>{h(!1),k.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!B||T.current)return;T.current=!0;const f=rs(c);if(!f)return;const R=as(f,Ho(H,v).length);R<0||($(R),h(!0))},[H,c,B,v]),a.useEffect(()=>{if(!B)return;const f=()=>{if(k.current){k.current=!1,h(!1);return}const R=rs(c);if(!R){h(!1);return}const A=as(R,Ho(H,v).length);if(A<0){h(!1);return}I.current=!1,$(A),h(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[H,c,B,v]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:w,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:of(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Pn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>b(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Pn(m)?{"--image-aspect-ratio":ur(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Pn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),M&&typeof document<"u"&&(()=>{const f=(l?document.getElementById(l):null)??document.body;return Wi.createPortal(r.jsx(nf,{prefix:d,entries:H,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:B,journalItemId:c,onBeforeClose:P,onClose:G}),f)})()]})},af=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14423
+ `}const rf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:d}=y.useScopedStyles(),c=(s==null?void 0:s.itemId)??null,{cover:u,coverFit:m,type:v}=e,w=a.useRef(null),[C,h]=a.useState(!1),[x,$]=a.useState(0),T=a.useRef(!1),I=a.useRef(!1),k=a.useRef(!1),N=a.useMemo(()=>(t??[]).filter(f=>Li(f).length>0),[t]),M=C&&N.length>0,B=!n,P=a.useCallback(()=>{B&&(k.current=!0,ym(I.current,c),I.current=!1)},[B,c]),b=(f=0)=>{if(N.length===0||n&&!i&&!o)return;const R=Ho(N,v),A=Math.max(0,Math.min(f,R.length-1));if($(A),B){const j=Cl();Sl(A+1,c,j),I.current=!j}h(!0)},X=a.useCallback(()=>{h(!1),k.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!B||T.current)return;T.current=!0;const f=rs(c);if(!f)return;const R=as(f,Ho(N,v).length);R<0||($(R),h(!0))},[N,c,B,v]),a.useEffect(()=>{if(!B)return;const f=()=>{if(k.current){k.current=!1,h(!1);return}const R=rs(c);if(!R){h(!1);return}const A=as(R,Ho(N,v).length);if(A<0){h(!1);return}I.current=!1,$(A),h(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[N,c,B,v]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:w,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:of(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Pn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>b(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Pn(m)?{"--image-aspect-ratio":ur(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Pn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),M&&typeof document<"u"&&(()=>{const f=(l?document.getElementById(l):null)??document.body;return Wi.createPortal(r.jsx(nf,{prefix:d,entries:N,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:B,journalItemId:c,onBeforeClose:P,onClose:X}),f)})()]})},af=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14424
14424
  import { createPortal } from 'react-dom';
14425
14425
  import { CommonComponentProps } from '../props';
14426
14426
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15223,7 +15223,7 @@ export type LightboxJournalSettings = {
15223
15223
  width: 32px;
15224
15224
  height: 32px;
15225
15225
  }
15226
- `}function yf(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function vf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yf(i)]));return new Map(n)}function xf({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,l]=a.useState(null),[s,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[v,w]=a.useState({x:0,y:0}),[C,h]=a.useState("none"),x=a.useRef({x:0,y:0}),[$,T]=a.useState(!1),[I,k]=a.useState(!1),H=a.useRef(new Map),{imageSize:M=gf,cursor:B="system",target:P="area",position:b="random",visible:G="all",defaultCursor:f=null,hoverCursor:R=null}=e,A=a.useMemo(()=>ff(i),[i]),j=a.useCallback((_,L,E=s)=>{if(!o)return;const D=o.getBoundingClientRect(),U=_-D.left,Q=L-D.top;w({x:U,y:Q}),h(hf(U,Q,E,o,B,P,R,f))},[o,s,B,P,R,f]);a.useEffect(()=>{const _=[...t.map(E=>E.image.url),f,R].filter(E=>!!E);if(_.length===0){H.current=new Map,k(!0);return}let L=!1;return k(!1),vf(_).then(E=>{L||(H.current=E,k(!0))}),()=>{L=!0}},[t,f,R]),a.useEffect(()=>{if(!o)return;const _=E=>{E.stopPropagation(),x.current={x:E.clientX,y:E.clientY},j(E.clientX,E.clientY)},L=()=>{$&&j(x.current.x,x.current.y)};return o.addEventListener("mousemove",_),window.addEventListener("scroll",L,!0),()=>{o.removeEventListener("mousemove",_),window.removeEventListener("scroll",L,!0)}},[o,$,j]),a.useEffect(()=>{!o||!$||j(x.current.x,x.current.y)},[s,o,$,j]),a.useEffect(()=>{$||h("none")},[$]);const K=(_,L,E,D={})=>{var he;const U=((he=H.current.get(_.image.url))==null?void 0:he.aspectRatio)??1,Q=Ws(_.image.url,M,H.current),{heightPx:O}=Xo(Q,U);let ge=0,g=0;return b==="same"?{x:ge,y:g}=As(L,E,Q,U):(ge=D.x??Math.random()*L,g=D.y??Math.random()*E,{x:ge,y:g}=Jr(ge,g,L,E,Q,O)),{id:m.current++,url:_.image.url,link:_.link,name:_.image.name,x:ge,y:g,xRatio:ge/L,yRatio:g/E,aspectRatio:U,widthPx:Q}},le=()=>{if(!o)return;const _=o.getBoundingClientRect(),L=_.width,E=_.height;L===0||E===0||d(D=>D.length===0?D:D.map(U=>{const Q=M.sizeType==="random"?U.widthPx:Ws(U.url,M,H.current),{heightPx:O}=Xo(Q,U.aspectRatio);if(b==="same"){const{x:he,y:se}=As(L,E,Q,U.aspectRatio);return{...U,x:he,y:se,widthPx:Q}}const{x:ge,y:g}=Jr(U.xRatio*L,U.yRatio*E,L,E,Q,O);return{...U,x:ge,y:g,widthPx:Q}}))};a.useEffect(()=>{if(!o||t.length===0||!I)return;const _=o.getBoundingClientRect(),L=_.width,E=_.height,D=K(t[0],L,E);d([D]),u(1)},[M,b,o,t,I]),a.useEffect(()=>{if(!o)return;le();const _=new ResizeObserver(le);return _.observe(o),window.addEventListener("resize",le),()=>{_.disconnect(),window.removeEventListener("resize",le)}},[o,b,M,s.length]),a.useEffect(()=>{G==="last One"&&d(_=>_.length>0?[_[_.length-1]]:[])},[G]);const X=_=>{if(!o||t.length===0||!I)return;const L=o.getBoundingClientRect(),E=_.clientX-L.left,D=_.clientY-L.top;if(P==="image"&&!Gl(E,D,s))return;let U=0,Q=0;b==="on Click"?(U=E,Q=D):b==="same"?(U=L.width/2,Q=L.height/2):(U=Math.random()*L.width,Q=Math.random()*L.height);const O=t[c],ge=K(O,L.width,L.height,{x:U,y:Q}),g=G==="all"?[...s,ge]:[ge];d(g),u(he=>he>=t.length-1?0:he+1),j(_.clientX,_.clientY,g)},z=B==="custom"&&C!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsxs("div",{ref:l,onClick:X,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:`${i}-root`,style:{cursor:z?"none":"default"},children:[s.map(_=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${_.y}px`,left:`${_.x}px`,width:`${_.widthPx}px`,cursor:z?"none":"default"},children:P==="area"&&_.link?r.jsx("a",{href:_.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:_.url,alt:_.name,className:`${i}-image`})}):r.jsx("img",{src:_.url,alt:_.name,className:`${i}-image`})},_.id)),$&&z&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${C}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15226
+ `}function yf(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function vf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yf(i)]));return new Map(n)}function xf({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,l]=a.useState(null),[s,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[v,w]=a.useState({x:0,y:0}),[C,h]=a.useState("none"),x=a.useRef({x:0,y:0}),[$,T]=a.useState(!1),[I,k]=a.useState(!1),N=a.useRef(new Map),{imageSize:M=gf,cursor:B="system",target:P="area",position:b="random",visible:X="all",defaultCursor:f=null,hoverCursor:R=null}=e,A=a.useMemo(()=>ff(i),[i]),j=a.useCallback((H,L,E=s)=>{if(!o)return;const D=o.getBoundingClientRect(),K=H-D.left,Q=L-D.top;w({x:K,y:Q}),h(hf(K,Q,E,o,B,P,R,f))},[o,s,B,P,R,f]);a.useEffect(()=>{const H=[...t.map(E=>E.image.url),f,R].filter(E=>!!E);if(H.length===0){N.current=new Map,k(!0);return}let L=!1;return k(!1),vf(H).then(E=>{L||(N.current=E,k(!0))}),()=>{L=!0}},[t,f,R]),a.useEffect(()=>{if(!o)return;const H=E=>{E.stopPropagation(),x.current={x:E.clientX,y:E.clientY},j(E.clientX,E.clientY)},L=()=>{$&&j(x.current.x,x.current.y)};return o.addEventListener("mousemove",H),window.addEventListener("scroll",L,!0),()=>{o.removeEventListener("mousemove",H),window.removeEventListener("scroll",L,!0)}},[o,$,j]),a.useEffect(()=>{!o||!$||j(x.current.x,x.current.y)},[s,o,$,j]),a.useEffect(()=>{$||h("none")},[$]);const q=(H,L,E,D={})=>{var me;const K=((me=N.current.get(H.image.url))==null?void 0:me.aspectRatio)??1,Q=Ws(H.image.url,M,N.current),{heightPx:O}=Xo(Q,K);let he=0,g=0;return b==="same"?{x:he,y:g}=As(L,E,Q,K):(he=D.x??Math.random()*L,g=D.y??Math.random()*E,{x:he,y:g}=Jr(he,g,L,E,Q,O)),{id:m.current++,url:H.image.url,link:H.link,name:H.image.name,x:he,y:g,xRatio:he/L,yRatio:g/E,aspectRatio:K,widthPx:Q}},le=()=>{if(!o)return;const H=o.getBoundingClientRect(),L=H.width,E=H.height;L===0||E===0||d(D=>D.length===0?D:D.map(K=>{const Q=M.sizeType==="random"?K.widthPx:Ws(K.url,M,N.current),{heightPx:O}=Xo(Q,K.aspectRatio);if(b==="same"){const{x:me,y:ae}=As(L,E,Q,K.aspectRatio);return{...K,x:me,y:ae,widthPx:Q}}const{x:he,y:g}=Jr(K.xRatio*L,K.yRatio*E,L,E,Q,O);return{...K,x:he,y:g,widthPx:Q}}))};a.useEffect(()=>{if(!o||t.length===0||!I)return;const H=o.getBoundingClientRect(),L=H.width,E=H.height,D=q(t[0],L,E);d([D]),u(1)},[M,b,o,t,I]),a.useEffect(()=>{if(!o)return;le();const H=new ResizeObserver(le);return H.observe(o),window.addEventListener("resize",le),()=>{H.disconnect(),window.removeEventListener("resize",le)}},[o,b,M,s.length]),a.useEffect(()=>{X==="last One"&&d(H=>H.length>0?[H[H.length-1]]:[])},[X]);const Y=H=>{if(!o||t.length===0||!I)return;const L=o.getBoundingClientRect(),E=H.clientX-L.left,D=H.clientY-L.top;if(P==="image"&&!Gl(E,D,s))return;let K=0,Q=0;b==="on Click"?(K=E,Q=D):b==="same"?(K=L.width/2,Q=L.height/2):(K=Math.random()*L.width,Q=Math.random()*L.height);const O=t[c],he=q(O,L.width,L.height,{x:K,y:Q}),g=X==="all"?[...s,he]:[he];d(g),u(me=>me>=t.length-1?0:me+1),j(H.clientX,H.clientY,g)},z=B==="custom"&&C!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsxs("div",{ref:l,onClick:Y,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:`${i}-root`,style:{cursor:z?"none":"default"},children:[s.map(H=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${H.y}px`,left:`${H.x}px`,width:`${H.widthPx}px`,cursor:z?"none":"default"},children:P==="area"&&H.link?r.jsx("a",{href:H.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:H.url,alt:H.name,className:`${i}-image`})}):r.jsx("img",{src:H.url,alt:H.name,className:`${i}-image`})},H.id)),$&&z&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${C}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15227
15227
  import { CommonComponentProps } from '../props';
15228
15228
  import { useScopedStyles } from '../utils/index';
15229
15229
 
@@ -15854,7 +15854,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15854
15854
  display: block;
15855
15855
  pointer-events: none;
15856
15856
  }
15857
- `}function Lf(e){return e==="blur"?Cf:e==="greyscale"?Sf:0}function zi(e,t=1,n=1){const i=Lf(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function Fs(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function If(e,t){return t<=1?0:(e-1+t)%t}function Rf(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ef(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const l=e*i/100,s=t*o/100;let d=l,c=d/n;return c>s&&(c=s,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function _s(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function ql(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Ns(e,t,n){return{...ql(e),[`--${n}-stage-scale`]:t}}function Mf(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function kf({settings:e,content:t,isEditor:n,isPreviewMode:i}){var $e,N,te,W,J,Z,ce;const{prefix:o}=y.useScopedStyles(),l=a.useMemo(()=>Tf(o),[o]),{imageSize:s,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,v=t??[],w=Fs(v.length),[C,h]=a.useState(w.activeIndex),[x,$]=a.useState(w.backgroundIndex),[T,I]=a.useState(!1),[k,H]=a.useState(!1),[M,B]=a.useState(null),[P,b]=a.useState(null),[G,f]=a.useState(0),[R,A]=a.useState(1),[j,K]=a.useState("none"),[le,X]=a.useState("next"),[z,_]=a.useState({}),[L,E]=a.useState({width:0,height:0}),D=a.useRef(null),U=a.useRef(null),Q=!n||!!i,O=s??60,ge=Math.max(10,Math.min(100,d??O)),g=Math.max(10,Math.min(100,c??O)),he=Math.max(100,u),se=zi(m),ve=a.useCallback(pe=>{const ye=Rf(pe?z[pe]:void 0);return Ef(L.width,L.height,ye,ge,g)},[L.height,L.width,z,g,ge]);a.useEffect(()=>{const pe=U.current;if(!pe)return;const ye=new ResizeObserver(([Ie])=>{const{width:q,height:de}=Ie.contentRect;E({width:q,height:de})});return ye.observe(pe),()=>ye.disconnect()},[]),a.useEffect(()=>{const pe=(t??[]).map(ye=>{var Ie;return(Ie=ye.image)==null?void 0:Ie.url}).filter(ye=>!!ye);Mf(pe,(ye,Ie)=>{_(q=>{var de,Me;return((de=q[ye])==null?void 0:de.width)===Ie.width&&((Me=q[ye])==null?void 0:Me.height)===Ie.height?q:{...q,[ye]:Ie}})})},[t]),a.useEffect(()=>{const{backgroundIndex:pe,activeIndex:ye}=Fs(v.length);h(ye),$(pe),I(!1),H(!1),B(null),b(null),f(0),A(1),K("none"),X("next")},[v.length,t]),a.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]);const Ee=a.useCallback(pe=>{var ee,ne,Fe,We;if(!Q||T||v.length<=1)return;const ye=pe==="next"?(C+1)%v.length:(C-1+v.length)%v.length,Ie=ve((ne=(ee=v[C])==null?void 0:ee.image)==null?void 0:ne.url),q=ve((We=(Fe=v[ye])==null?void 0:Fe.image)==null?void 0:We.url),de=_s(L.width,L.height,Ie),Me=_s(L.width,L.height,q);D.current&&clearTimeout(D.current),X(pe),H(!0),I(!0),pe==="next"?(B(C),b(ye),f(0),A(1),K(zi(m,0,1))):($(If(ye,v.length)),B(ye),b(C),f(1),A(Me),K(zi(m,1,Me))),requestAnimationFrame(()=>{H(!1),requestAnimationFrame(()=>{pe==="next"?(f(1),A(de),K(zi(m,1,de))):(f(0),A(1),K(zi(m,0,1)))})}),D.current=setTimeout(()=>{pe==="next"&&$(C),h(ye),B(null),b(null),I(!1)},he)},[C,m,L.height,L.width,ve,T,Q,v,he]),oe=v[C],xe=x!==null?v[x]:null,Y=M!==null?v[M]:null,be=P!==null?v[P]:null,me=v.length<=1?0:(C-1+v.length)%v.length,ue=v.length<=1?0:(C+1)%v.length,re=ve(($e=oe==null?void 0:oe.image)==null?void 0:$e.url),Le=ve((N=Y==null?void 0:Y.image)==null?void 0:N.url),Ce=ve((te=be==null?void 0:be.image)==null?void 0:te.url),fe={[`--${o}-transition-ms`]:`${he}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsxs("div",{ref:U,className:it(`${o}-wrapper`,k&&`${o}-snap`,n&&!i&&`${o}-editor`),style:fe,"aria-label":"Zoom gallery",children:[((W=xe==null?void 0:xe.image)==null?void 0:W.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:xe.image.url,alt:"",style:{filter:se}})}),T&&((J=Y==null?void 0:Y.image)==null?void 0:J.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${le}`),style:Ns(Le,R,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:j}})}),T&&((Z=be==null?void 0:be.image)==null?void 0:Z.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${le}`),style:Ns(Ce,G,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:be.image.url,alt:""})}),!T&&((ce=oe==null?void 0:oe.image)==null?void 0:ce.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-foreground`),style:ql(re),children:r.jsx("img",{className:`${o}-image`,src:oe.image.url,alt:oe.image.name??""})}),Q&&v.length>1&&!T&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:it(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ee("prev"),"aria-label":`Show previous image (${me+1} of ${v.length})`}),r.jsx("button",{type:"button",className:it(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ee("next"),"aria-label":`Show next image (${ue+1} of ${v.length})`})]})]})]})}const Pf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15857
+ `}function Lf(e){return e==="blur"?Cf:e==="greyscale"?Sf:0}function zi(e,t=1,n=1){const i=Lf(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function Fs(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function If(e,t){return t<=1?0:(e-1+t)%t}function Rf(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ef(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const l=e*i/100,s=t*o/100;let d=l,c=d/n;return c>s&&(c=s,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function _s(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function ql(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Ns(e,t,n){return{...ql(e),[`--${n}-stage-scale`]:t}}function Mf(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function kf({settings:e,content:t,isEditor:n,isPreviewMode:i}){var xe,_,ee,W,J,Z,ce;const{prefix:o}=y.useScopedStyles(),l=a.useMemo(()=>Tf(o),[o]),{imageSize:s,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,v=t??[],w=Fs(v.length),[C,h]=a.useState(w.activeIndex),[x,$]=a.useState(w.backgroundIndex),[T,I]=a.useState(!1),[k,N]=a.useState(!1),[M,B]=a.useState(null),[P,b]=a.useState(null),[X,f]=a.useState(0),[R,A]=a.useState(1),[j,q]=a.useState("none"),[le,Y]=a.useState("next"),[z,H]=a.useState({}),[L,E]=a.useState({width:0,height:0}),D=a.useRef(null),K=a.useRef(null),Q=!n||!!i,O=s??60,he=Math.max(10,Math.min(100,d??O)),g=Math.max(10,Math.min(100,c??O)),me=Math.max(100,u),ae=zi(m),we=a.useCallback(ue=>{const ve=Rf(ue?z[ue]:void 0);return Ef(L.width,L.height,ve,he,g)},[L.height,L.width,z,g,he]);a.useEffect(()=>{const ue=K.current;if(!ue)return;const ve=new ResizeObserver(([Le])=>{const{width:G,height:de}=Le.contentRect;E({width:G,height:de})});return ve.observe(ue),()=>ve.disconnect()},[]),a.useEffect(()=>{const ue=(t??[]).map(ve=>{var Le;return(Le=ve.image)==null?void 0:Le.url}).filter(ve=>!!ve);Mf(ue,(ve,Le)=>{H(G=>{var de,Ee;return((de=G[ve])==null?void 0:de.width)===Le.width&&((Ee=G[ve])==null?void 0:Ee.height)===Le.height?G:{...G,[ve]:Le}})})},[t]),a.useEffect(()=>{const{backgroundIndex:ue,activeIndex:ve}=Fs(v.length);h(ve),$(ue),I(!1),N(!1),B(null),b(null),f(0),A(1),q("none"),Y("next")},[v.length,t]),a.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]);const ke=a.useCallback(ue=>{var te,ie,Fe,We;if(!Q||T||v.length<=1)return;const ve=ue==="next"?(C+1)%v.length:(C-1+v.length)%v.length,Le=we((ie=(te=v[C])==null?void 0:te.image)==null?void 0:ie.url),G=we((We=(Fe=v[ve])==null?void 0:Fe.image)==null?void 0:We.url),de=_s(L.width,L.height,Le),Ee=_s(L.width,L.height,G);D.current&&clearTimeout(D.current),Y(ue),N(!0),I(!0),ue==="next"?(B(C),b(ve),f(0),A(1),q(zi(m,0,1))):($(If(ve,v.length)),B(ve),b(C),f(1),A(Ee),q(zi(m,1,Ee))),requestAnimationFrame(()=>{N(!1),requestAnimationFrame(()=>{ue==="next"?(f(1),A(de),q(zi(m,1,de))):(f(0),A(1),q(zi(m,0,1)))})}),D.current=setTimeout(()=>{ue==="next"&&$(C),h(ve),B(null),b(null),I(!1)},me)},[C,m,L.height,L.width,we,T,Q,v,me]),ne=v[C],ye=x!==null?v[x]:null,U=M!==null?v[M]:null,be=P!==null?v[P]:null,ge=v.length<=1?0:(C-1+v.length)%v.length,pe=v.length<=1?0:(C+1)%v.length,oe=we((xe=ne==null?void 0:ne.image)==null?void 0:xe.url),Se=we((_=U==null?void 0:U.image)==null?void 0:_.url),Ie=we((ee=be==null?void 0:be.image)==null?void 0:ee.url),fe={[`--${o}-transition-ms`]:`${me}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsxs("div",{ref:K,className:it(`${o}-wrapper`,k&&`${o}-snap`,n&&!i&&`${o}-editor`),style:fe,"aria-label":"Zoom gallery",children:[((W=ye==null?void 0:ye.image)==null?void 0:W.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ye.image.url,alt:"",style:{filter:ae}})}),T&&((J=U==null?void 0:U.image)==null?void 0:J.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${le}`),style:Ns(Se,R,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:U.image.url,alt:"",style:{filter:j}})}),T&&((Z=be==null?void 0:be.image)==null?void 0:Z.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${le}`),style:Ns(Ie,X,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:be.image.url,alt:""})}),!T&&((ce=ne==null?void 0:ne.image)==null?void 0:ce.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-foreground`),style:ql(oe),children:r.jsx("img",{className:`${o}-image`,src:ne.image.url,alt:ne.image.name??""})}),Q&&v.length>1&&!T&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:it(`${o}-nav`,`${o}-nav-prev`),onClick:()=>ke("prev"),"aria-label":`Show previous image (${ge+1} of ${v.length})`}),r.jsx("button",{type:"button",className:it(`${o}-nav`,`${o}-nav-next`),onClick:()=>ke("next"),"aria-label":`Show next image (${pe+1} of ${v.length})`})]})]})]})}const Pf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15858
15858
  import cn from 'classnames';
15859
15859
  import { CommonComponentProps } from '../props';
15860
15860
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16373,7 +16373,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16373
16373
  </>
16374
16374
  );
16375
16375
  }
16376
- `,Af={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_1.jpg ",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_6.jpg",name:""}}]}},Wf={element:kf,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Af,sourceCode:Pf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Ff={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color"},_f=["hover","active"],_r={left:"flex-start",center:"center",right:"flex-end"};function Nf(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Hf(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Of(e){return`
16376
+ `,Af={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_1.jpg ",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_6.jpg",name:""}}]}},Wf={element:kf,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Af,sourceCode:Pf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Ff={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},_f=["hover","active"],_r={left:"flex-start",center:"center",right:"flex-end"};function Nf(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Hf(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Of(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,l=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,s=`${o}, ${l}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,m=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`;return`
16377
16377
  .${e}-wrapper {
16378
16378
  display: flex;
16379
16379
  width: 100%;
@@ -16394,8 +16394,9 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16394
16394
  white-space: pre-wrap;
16395
16395
  overflow-wrap: anywhere;
16396
16396
  word-break: break-word;
16397
+ user-select: none;
16397
16398
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms, box-shadow 250ms;
16398
- box-shadow: var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent);
16399
+ box-shadow: ${i};
16399
16400
  }
16400
16401
  .${e}-wrapper.${e}-editing .${e}-button {
16401
16402
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
@@ -16407,7 +16408,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16407
16408
  .${e}-hover-effect-lift:hover,
16408
16409
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
16409
16410
  transform: translateY(-2px);
16410
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
16411
+ box-shadow: ${m};
16411
16412
  }
16412
16413
  .${e}-hover-effect-blinds,
16413
16414
  .${e}-hover-effect-reveal,
@@ -16544,25 +16545,25 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16544
16545
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16545
16546
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16546
16547
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16547
- box-shadow: var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent));
16548
+ box-shadow: ${s};
16548
16549
  }
16549
16550
  .${e}-wrapper.${e}-state-hover .${e}-button {
16550
16551
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16551
16552
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16552
16553
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16553
- box-shadow: var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent));
16554
+ box-shadow: ${s};
16554
16555
  }
16555
16556
  .${e}-button:active {
16556
16557
  background-color: var(--${e}-active-background-color, var(--${e}-background-color));
16557
16558
  color: var(--${e}-active-text-color, var(--${e}-text-color));
16558
16559
  border-color: var(--${e}-active-border-color, var(--${e}-border-color));
16559
- box-shadow: var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent));
16560
+ box-shadow: ${u};
16560
16561
  }
16561
16562
  .${e}-wrapper.${e}-state-active .${e}-button {
16562
16563
  background-color: var(--${e}-active-background-color, var(--${e}-background-color));
16563
16564
  color: var(--${e}-active-text-color, var(--${e}-text-color));
16564
16565
  border-color: var(--${e}-active-border-color, var(--${e}-border-color));
16565
- box-shadow: var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent));
16566
+ box-shadow: ${u};
16566
16567
  }
16567
16568
  .${e}-text {
16568
16569
  display: block;
@@ -16609,7 +16610,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16609
16610
  height: calc(1em * var(--${e}-icon-scale, 1));
16610
16611
  width: calc(1em * var(--${e}-icon-scale, 1));
16611
16612
  }
16612
- `}function Nr(e,t,n="",i,o){const l=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:l}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function Hs(e,t,n="fill",i=100,o=0,l){if(!t)return null;const s=r.jsx(cn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:s});if(n==="fixed"&&o>0){const d=y.scalingValue(o,l);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:s})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:s})}function Bf({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i}){const{prefix:o}=y.useScopedStyles(),l=a.useMemo(()=>Of(o),[o]),{type:s="a",label:d="Button",icon:c,alignment:u="center",alignA:m,order:v="text-icon",gap:w=0,iconScale:C=100,iconSize:h=0,dimensions:x=!1,padding:$={top:0,right:0,bottom:0,left:0},cornerRadius:T={top:0,right:0,bottom:0,left:0},boxShadow:I={top:0,left:0,right:0,bottom:0},boxShadowColor:k="rgba(0, 0, 0, 0)",stroke:H=0,backgroundColor:M="#000000",textColor:B="#ffffff",borderColor:P="#ffffff",iconColor:b="#ffffff",hoverEffect:G="none",fontFamily:f,fontSettings:R,fontSize:A,lineHeight:j,letterSpacing:K=0,wordSpacing:le=0,textAppearance:X,stateOverrides:z,minWidth:_=0,minHeight:L=0}=e,E=y.buildColorVars(o,{backgroundColor:M,textColor:B,borderColor:P,iconColor:b,boxShadowColor:k},Ff,_f,z),D=i&&i!=="default"?`${o}-state-${i}`:"",U=t&&!n?`${o}-editing`:"",Q=G!=="none"&&(!t||n||i==="hover")?`${o}-hover-effect-${G}`:"",O=G==="blinds"||G==="reveal"||G==="swipe",ge=G==="content-roll",g=G==="reveal"&&(!t||n),he=x===!0,ve=he?"center":s==="a"?m??u:u,Ee=s==="c",oe=s!=="b",xe={fontSettings:{fontFamily:f,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:A??.01,lineHeight:j,letterSpacing:K,wordSpacing:le,textAppearance:X,color:B},be={...oe?ln(Kt(xe,t)):{},[`--${o}-box-shadow-x`]:y.scalingValue(I.left,t),[`--${o}-box-shadow-y`]:y.scalingValue(I.top,t),[`--${o}-box-shadow-blur`]:y.scalingValue(I.right,t),[`--${o}-box-shadow-spread`]:y.scalingValue(I.bottom,t),paddingTop:y.scalingValue($.top,t),paddingRight:y.scalingValue($.right,t),paddingBottom:y.scalingValue($.bottom,t),paddingLeft:y.scalingValue($.left,t),borderTopLeftRadius:y.scalingValue(T.top,t),borderTopRightRadius:y.scalingValue(T.right,t),borderBottomRightRadius:y.scalingValue(T.bottom,t),borderBottomLeftRadius:y.scalingValue(T.left,t),borderWidth:y.scalingValue(H,t),...Ee?{}:{justifyContent:_r[ve],textAlign:ve},...Ee&&!ge?{gap:y.scalingValue(w,t)}:{},...he?{width:"auto",height:"auto"}:{minWidth:y.scalingValue(_,t),minHeight:y.scalingValue(L,t),...Ee?{width:"100%"}:{}}};let me;const ue={display:"inline-flex",alignItems:"center",justifyContent:Ee?_r[ve]:_r[s==="a"?ve:"center"],gap:Ee?y.scalingValue(w,t):void 0,width:"100%",height:"100%",...s==="a"?{textAlign:ve}:{}};if(s==="b"){const Ce=()=>Hs(o,c,h>0?"fixed":"fill",100,h,t);me=ge?Nr(o,Ce,`${o}-icon-roll`,void 0,ue):Ce()}else if(s==="c"){const Ce=()=>{const fe=r.jsx("span",{className:`${o}-text`,style:{textAlign:ve},children:d}),$e=Hs(o,c,"inline",C);return v==="icon-text"?r.jsxs(r.Fragment,{children:[$e,fe]}):r.jsxs(r.Fragment,{children:[fe,$e]})};me=ge?Nr(o,Ce,`${o}-icon-text-roll`,void 0,ue):Ce()}else me=ge?Nr(o,()=>d,`${o}-label-roll`,void 0,ue):O?r.jsx("span",{className:`${o}-button-inner`,children:d}):d;const re=g?Ce=>Nf(Ce,o):void 0,Le=g?Ce=>Hf(Ce,o):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${o}-wrapper ${D} ${U}`.trim(),style:E,children:r.jsx("button",{type:"button",className:`${o}-button ${Q}`.trim(),style:be,onMouseEnter:re,onMouseLeave:Le,children:me})})]})}const jf=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16613
+ `}function Nr(e,t,n="",i,o){const l=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:l}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function Hs(e,t,n="fill",i=100,o=0,l){if(!t)return null;const s=r.jsx(cn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:s});if(n==="fixed"&&o>0){const d=y.scalingValue(o,l);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:s})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:s})}function Bf({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i}){const{prefix:o}=y.useScopedStyles(),l=a.useMemo(()=>Of(o),[o]),{type:s="a",label:d="Button",icon:c,alignment:u="center",alignA:m,order:v="text-icon",gap:w=0,iconScale:C=100,iconSize:h=0,dimensions:x=!1,padding:$={top:0,right:0,bottom:0,left:0},cornerRadius:T={top:0,right:0,bottom:0,left:0},boxShadow:I={top:0,left:0,right:0,bottom:0},boxShadowColor:k="rgba(0, 0, 0, 0)",innerBoxShadow:N={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:M="rgba(0, 0, 0, 0)",stroke:B=0,backgroundColor:P="#000000",textColor:b="#ffffff",borderColor:X="#ffffff",iconColor:f="#ffffff",hoverEffect:R="none",fontFamily:A,fontSettings:j,fontSize:q,lineHeight:le,letterSpacing:Y=0,wordSpacing:z=0,textAppearance:H,stateOverrides:L,minWidth:E=0,minHeight:D=0}=e,K=y.buildColorVars(o,{backgroundColor:P,textColor:b,borderColor:X,iconColor:f,boxShadowColor:k,innerBoxShadowColor:M},Ff,_f,L),Q=i&&i!=="default"?`${o}-state-${i}`:"",O=t&&!n?`${o}-editing`:"",he=R!=="none"&&(!t||n||i==="hover")?`${o}-hover-effect-${R}`:"",g=R==="blinds"||R==="reveal"||R==="swipe",me=R==="content-roll",ae=R==="reveal"&&(!t||n),we=x===!0,ne=we?"center":s==="a"?m??u:u,ye=s==="c",U=s!=="b",be={fontSettings:{fontFamily:A,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:q??.01,lineHeight:le,letterSpacing:Y,wordSpacing:z,textAppearance:H,color:b},pe={...U?ln(Kt(be,t)):{},[`--${o}-box-shadow-x`]:y.scalingValue(I.left,t),[`--${o}-box-shadow-y`]:y.scalingValue(I.top,t),[`--${o}-box-shadow-blur`]:y.scalingValue(I.right,t),[`--${o}-box-shadow-spread`]:y.scalingValue(I.bottom,t),[`--${o}-inner-box-shadow-x`]:y.scalingValue(N.left,t),[`--${o}-inner-box-shadow-y`]:y.scalingValue(N.top,t),[`--${o}-inner-box-shadow-blur`]:y.scalingValue(N.right,t),[`--${o}-inner-box-shadow-spread`]:y.scalingValue(N.bottom,t),paddingTop:y.scalingValue($.top,t),paddingRight:y.scalingValue($.right,t),paddingBottom:y.scalingValue($.bottom,t),paddingLeft:y.scalingValue($.left,t),borderTopLeftRadius:y.scalingValue(T.top,t),borderTopRightRadius:y.scalingValue(T.right,t),borderBottomRightRadius:y.scalingValue(T.bottom,t),borderBottomLeftRadius:y.scalingValue(T.left,t),borderWidth:y.scalingValue(B,t),...ye?{}:{justifyContent:_r[ne],textAlign:ne},...ye&&!me?{gap:y.scalingValue(w,t)}:{},...we?{width:"auto",height:"auto"}:{minWidth:y.scalingValue(E,t),minHeight:y.scalingValue(D,t),...ye?{width:"100%"}:{}}};let oe;const Se={display:"inline-flex",alignItems:"center",justifyContent:ye?_r[ne]:_r[s==="a"?ne:"center"],gap:ye?y.scalingValue(w,t):void 0,width:"100%",height:"100%",...s==="a"?{textAlign:ne}:{}};if(s==="b"){const xe=()=>Hs(o,c,h>0?"fixed":"fill",100,h,t);oe=me?Nr(o,xe,`${o}-icon-roll`,void 0,Se):xe()}else if(s==="c"){const xe=()=>{const _=r.jsx("span",{className:`${o}-text`,style:{textAlign:ne},children:d}),ee=Hs(o,c,"inline",C);return v==="icon-text"?r.jsxs(r.Fragment,{children:[ee,_]}):r.jsxs(r.Fragment,{children:[_,ee]})};oe=me?Nr(o,xe,`${o}-icon-text-roll`,void 0,Se):xe()}else oe=me?Nr(o,()=>d,`${o}-label-roll`,void 0,Se):g?r.jsx("span",{className:`${o}-button-inner`,children:d}):d;const Ie=ae?xe=>Nf(xe,o):void 0,fe=ae?xe=>Hf(xe,o):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${o}-wrapper ${Q} ${O}`.trim(),style:K,children:r.jsx("div",{className:`${o}-button ${he}`.trim(),style:pe,onMouseEnter:Ie,onMouseLeave:fe,role:"button",children:oe})})]})}const jf=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16613
16614
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
16614
16615
  import { CommonComponentProps } from '../props';
16615
16616
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -16654,6 +16655,8 @@ type SimpleButtonSettings = {
16654
16655
  cornerRadius?: CornerRadius;
16655
16656
  boxShadow?: BoxShadow;
16656
16657
  boxShadowColor?: string;
16658
+ innerBoxShadow?: BoxShadow;
16659
+ innerBoxShadowColor?: string;
16657
16660
  stroke?: number;
16658
16661
  backgroundColor?: string;
16659
16662
  textColor?: string;
@@ -16678,7 +16681,7 @@ type SimpleButtonSettings = {
16678
16681
  minHeight?: number;
16679
16682
  };
16680
16683
 
16681
- type ColorKeys = 'backgroundColor' | 'textColor' | 'borderColor' | 'iconColor' | 'boxShadowColor';
16684
+ type ColorKeys = 'backgroundColor' | 'textColor' | 'borderColor' | 'iconColor' | 'boxShadowColor' | 'innerBoxShadowColor';
16682
16685
 
16683
16686
  type SimpleButtonProps = {
16684
16687
  settings: SimpleButtonSettings;
@@ -16693,6 +16696,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
16693
16696
  borderColor: 'border-color',
16694
16697
  iconColor: 'icon-color',
16695
16698
  boxShadowColor: 'box-shadow-color',
16699
+ innerBoxShadowColor: 'inner-box-shadow-color',
16696
16700
  };
16697
16701
 
16698
16702
  const STATE_KEYS = ['hover', 'active'] as const;
@@ -16718,6 +16722,17 @@ function setRevealCloseDirectionFromMouseLeave(event: MouseEvent<HTMLElement>, p
16718
16722
  }
16719
16723
 
16720
16724
  function getCSS(P: string): string {
16725
+ const outerShadow = \`var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-box-shadow-color, transparent)\`;
16726
+ const innerShadow = \`inset var(--\${P}-inner-box-shadow-x, 0) var(--\${P}-inner-box-shadow-y, 0) var(--\${P}-inner-box-shadow-blur, 0) var(--\${P}-inner-box-shadow-spread, 0) var(--\${P}-inner-box-shadow-color, transparent)\`;
16727
+ const boxShadow = \`\${outerShadow}, \${innerShadow}\`;
16728
+ const hoverOuterShadow = \`var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-hover-box-shadow-color, var(--\${P}-box-shadow-color, transparent))\`;
16729
+ const hoverInnerShadow = \`inset var(--\${P}-inner-box-shadow-x, 0) var(--\${P}-inner-box-shadow-y, 0) var(--\${P}-inner-box-shadow-blur, 0) var(--\${P}-inner-box-shadow-spread, 0) var(--\${P}-hover-inner-box-shadow-color, var(--\${P}-inner-box-shadow-color, transparent))\`;
16730
+ const hoverBoxShadow = \`\${hoverOuterShadow}, \${hoverInnerShadow}\`;
16731
+ const activeOuterShadow = \`var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-active-box-shadow-color, var(--\${P}-box-shadow-color, transparent))\`;
16732
+ const activeInnerShadow = \`inset var(--\${P}-inner-box-shadow-x, 0) var(--\${P}-inner-box-shadow-y, 0) var(--\${P}-inner-box-shadow-blur, 0) var(--\${P}-inner-box-shadow-spread, 0) var(--\${P}-active-inner-box-shadow-color, var(--\${P}-inner-box-shadow-color, transparent))\`;
16733
+ const activeBoxShadow = \`\${activeOuterShadow}, \${activeInnerShadow}\`;
16734
+ const liftBoxShadow = \`0 4px 12px rgba(0, 0, 0, 0.15), \${innerShadow}\`;
16735
+
16721
16736
  return \`
16722
16737
  .\${P}-wrapper {
16723
16738
  display: flex;
@@ -16739,8 +16754,9 @@ function getCSS(P: string): string {
16739
16754
  white-space: pre-wrap;
16740
16755
  overflow-wrap: anywhere;
16741
16756
  word-break: break-word;
16757
+ user-select: none;
16742
16758
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms, box-shadow 250ms;
16743
- box-shadow: var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-box-shadow-color, transparent);
16759
+ box-shadow: \${boxShadow};
16744
16760
  }
16745
16761
  .\${P}-wrapper.\${P}-editing .\${P}-button {
16746
16762
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
@@ -16752,7 +16768,7 @@ function getCSS(P: string): string {
16752
16768
  .\${P}-hover-effect-lift:hover,
16753
16769
  .\${P}-wrapper.\${P}-state-hover .\${P}-hover-effect-lift {
16754
16770
  transform: translateY(-2px);
16755
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
16771
+ box-shadow: \${liftBoxShadow};
16756
16772
  }
16757
16773
  .\${P}-hover-effect-blinds,
16758
16774
  .\${P}-hover-effect-reveal,
@@ -16889,25 +16905,25 @@ function getCSS(P: string): string {
16889
16905
  background-color: var(--\${P}-hover-background-color, var(--\${P}-background-color));
16890
16906
  color: var(--\${P}-hover-text-color, var(--\${P}-text-color));
16891
16907
  border-color: var(--\${P}-hover-border-color, var(--\${P}-border-color));
16892
- box-shadow: var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-hover-box-shadow-color, var(--\${P}-box-shadow-color, transparent));
16908
+ box-shadow: \${hoverBoxShadow};
16893
16909
  }
16894
16910
  .\${P}-wrapper.\${P}-state-hover .\${P}-button {
16895
16911
  background-color: var(--\${P}-hover-background-color, var(--\${P}-background-color));
16896
16912
  color: var(--\${P}-hover-text-color, var(--\${P}-text-color));
16897
16913
  border-color: var(--\${P}-hover-border-color, var(--\${P}-border-color));
16898
- box-shadow: var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-hover-box-shadow-color, var(--\${P}-box-shadow-color, transparent));
16914
+ box-shadow: \${hoverBoxShadow};
16899
16915
  }
16900
16916
  .\${P}-button:active {
16901
16917
  background-color: var(--\${P}-active-background-color, var(--\${P}-background-color));
16902
16918
  color: var(--\${P}-active-text-color, var(--\${P}-text-color));
16903
16919
  border-color: var(--\${P}-active-border-color, var(--\${P}-border-color));
16904
- box-shadow: var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-active-box-shadow-color, var(--\${P}-box-shadow-color, transparent));
16920
+ box-shadow: \${activeBoxShadow};
16905
16921
  }
16906
16922
  .\${P}-wrapper.\${P}-state-active .\${P}-button {
16907
16923
  background-color: var(--\${P}-active-background-color, var(--\${P}-background-color));
16908
16924
  color: var(--\${P}-active-text-color, var(--\${P}-text-color));
16909
16925
  border-color: var(--\${P}-active-border-color, var(--\${P}-border-color));
16910
- box-shadow: var(--\${P}-box-shadow-x, 0) var(--\${P}-box-shadow-y, 0) var(--\${P}-box-shadow-blur, 0) var(--\${P}-box-shadow-spread, 0) var(--\${P}-active-box-shadow-color, var(--\${P}-box-shadow-color, transparent));
16926
+ box-shadow: \${activeBoxShadow};
16911
16927
  }
16912
16928
  .\${P}-text {
16913
16929
  display: block;
@@ -17043,6 +17059,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent }:
17043
17059
  cornerRadius = { top: 0, right: 0, bottom: 0, left: 0 },
17044
17060
  boxShadow = { top: 0, left: 0, right: 0, bottom: 0 },
17045
17061
  boxShadowColor = 'rgba(0, 0, 0, 0)',
17062
+ innerBoxShadow = { top: 0, left: 0, right: 0, bottom: 0 },
17063
+ innerBoxShadowColor = 'rgba(0, 0, 0, 0)',
17046
17064
  stroke = 0,
17047
17065
  backgroundColor = '#000000',
17048
17066
  textColor = '#ffffff',
@@ -17067,6 +17085,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent }:
17067
17085
  borderColor,
17068
17086
  iconColor,
17069
17087
  boxShadowColor,
17088
+ innerBoxShadowColor,
17070
17089
  }, COLOR_VAR_MAP, STATE_KEYS, stateOverrides);
17071
17090
 
17072
17091
  const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
@@ -17109,6 +17128,10 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent }:
17109
17128
  [\`--\${P}-box-shadow-y\`]: scalingValue(boxShadow.top, isEditor),
17110
17129
  [\`--\${P}-box-shadow-blur\`]: scalingValue(boxShadow.right, isEditor),
17111
17130
  [\`--\${P}-box-shadow-spread\`]: scalingValue(boxShadow.bottom, isEditor),
17131
+ [\`--\${P}-inner-box-shadow-x\`]: scalingValue(innerBoxShadow.left, isEditor),
17132
+ [\`--\${P}-inner-box-shadow-y\`]: scalingValue(innerBoxShadow.top, isEditor),
17133
+ [\`--\${P}-inner-box-shadow-blur\`]: scalingValue(innerBoxShadow.right, isEditor),
17134
+ [\`--\${P}-inner-box-shadow-spread\`]: scalingValue(innerBoxShadow.bottom, isEditor),
17112
17135
  paddingTop: scalingValue(padding.top, isEditor),
17113
17136
  paddingRight: scalingValue(padding.right, isEditor),
17114
17137
  paddingBottom: scalingValue(padding.bottom, isEditor),
@@ -17180,27 +17203,27 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent }:
17180
17203
  }
17181
17204
 
17182
17205
  const handleRevealMouseEnter = revealHoverActive
17183
- ? (event: MouseEvent<HTMLButtonElement>) => setRevealOpenDirectionFromMouseEnter(event, P)
17206
+ ? (event: MouseEvent<HTMLDivElement>) => setRevealOpenDirectionFromMouseEnter(event, P)
17184
17207
  : undefined;
17185
17208
  const handleRevealMouseLeave = revealHoverActive
17186
- ? (event: MouseEvent<HTMLButtonElement>) => setRevealCloseDirectionFromMouseLeave(event, P)
17209
+ ? (event: MouseEvent<HTMLDivElement>) => setRevealCloseDirectionFromMouseLeave(event, P)
17187
17210
  : undefined;
17188
17211
 
17189
17212
  return (
17190
17213
  <>
17191
17214
  <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
17192
17215
  <div className={\`\${P}-wrapper \${stateClass} \${editingClass}\`.trim()} style={colorVars}>
17193
- <button
17194
- type="button"
17216
+ <div
17195
17217
  className={\`\${P}-button \${hoverEffectClass}\`.trim()}
17196
17218
  style={buttonStyle}
17197
17219
  onMouseEnter={handleRevealMouseEnter}
17198
17220
  onMouseLeave={handleRevealMouseLeave}
17221
+ role="button"
17199
17222
  >
17200
17223
  {buttonContent}
17201
- </button>
17224
+ </div>
17202
17225
  </div>
17203
17226
  </>
17204
17227
  );
17205
17228
  }
17206
- `,zf={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Df=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor"],Vf={type:"object",version:1,settings:{sizing:"auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconScale:{type:"number",scope:"layout",title:"Icon size (%)",display:{type:"percentage-input",visible:!1},min:10,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"object",scope:"layout",title:"Corner radius",display:{type:"padding-controls"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow color",display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Border",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"Default background",display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Default text",display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border color",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Default icon",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","blinds","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...zf.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999}},defaults:{type:"a",label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",alignment:"center",alignA:"center",order:"text-icon",gap:0,iconScale:100,iconSize:40/1440,dimensions:!1,padding:{top:10/1440,right:10/1440,bottom:10/1440,left:10/1440},cornerRadius:{top:0,right:0,bottom:0,left:0},boxShadow:{top:0,left:0,right:0,bottom:0},boxShadowColor:"#000000",stroke:0,backgroundColor:"#000000",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",hoverEffect:"none",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},stateOverrides:{hover:{backgroundColor:"#333333"},active:{backgroundColor:"#555555"}},minWidth:100/1440,minHeight:100/1440},layoutDefaults:{m:{dimensions:!1,padding:{top:10/375,right:10/375,bottom:10/375,left:10/375},minWidth:100/375,minHeight:100/375,iconSize:32/375,fontSize:.0426,lineHeight:.0426},t:{dimensions:!1,padding:{top:10/768,right:10/768,bottom:10/768,left:10/768},minWidth:100/768,minHeight:100/768,iconSize:36/768,fontSize:.02083,lineHeight:.02604},d:{dimensions:!1,padding:{top:10/1440,right:10/1440,bottom:10/1440,left:10/1440},minWidth:100/1440,minHeight:100/1440,iconSize:40/1440,fontSize:.01,lineHeight:.01}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconScale","iconSize","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","boxShadow","boxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconScale.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.alignment.display.enabled",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.alignA.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconScale"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Df],panelIds:["general","typeStyle"],stateItems:{default:["backgroundColor","textColor","borderColor","iconColor","boxShadowColor"],hover:["backgroundColor","textColor","borderColor","iconColor","boxShadowColor"],active:["backgroundColor","textColor","borderColor","iconColor","boxShadowColor"]}},states:["default","hover","active"],statesByLayout:{m:["default","active"],t:["default","active"]}},Gf={element:Bf,id:"simple-button",name:"Simple Button",category:"dev",version:1,defaultSize:{d:{width:200,height:100},m:{width:160,height:80}},schema:Vf,sourceCode:jf,assetsPaths:{content:[],parameters:[{path:"settings.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}},qf=[ou,uu,$f,Qu,lp,vp,Fp,Bp,Kp,gm,lg,dh,xh,tf,mf,Wf,Gf];exports.components=qf;exports.isSchemaV1=Xl;
17229
+ `,zf={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Df=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Vf={type:"object",version:1,settings:{sizing:"auto",linkInParamsPanel:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconScale:{type:"number",scope:"layout",title:"Icon size (%)",display:{type:"percentage-input",visible:!1},min:10,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"object",scope:"layout",title:"Corner radius",display:{type:"padding-controls"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow color",display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner shadow color",display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Border",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"Default background",display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Default text",display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border color",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Default icon",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","blinds","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...zf.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999}},defaults:{type:"a",label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",alignment:"center",alignA:"center",order:"text-icon",gap:0,iconScale:100,iconSize:40/1440,dimensions:!1,padding:{top:10/1440,right:10/1440,bottom:10/1440,left:10/1440},cornerRadius:{top:0,right:0,bottom:0,left:0},boxShadow:{top:0,left:0,right:0,bottom:0},boxShadowColor:"#000000",innerBoxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadowColor:"#000000",stroke:0,backgroundColor:"#000000",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",hoverEffect:"none",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},stateOverrides:{hover:{backgroundColor:"#333333"},active:{backgroundColor:"#555555"}},minWidth:100/1440,minHeight:100/1440},layoutDefaults:{m:{dimensions:!1,padding:{top:10/375,right:10/375,bottom:10/375,left:10/375},minWidth:100/375,minHeight:100/375,iconSize:32/375,fontSize:.0426,lineHeight:.0426},t:{dimensions:!1,padding:{top:10/768,right:10/768,bottom:10/768,left:10/768},minWidth:100/768,minHeight:100/768,iconSize:36/768,fontSize:.02083,lineHeight:.02604},d:{dimensions:!1,padding:{top:10/1440,right:10/1440,bottom:10/1440,left:10/1440},minWidth:100/1440,minHeight:100/1440,iconSize:40/1440,fontSize:.01,lineHeight:.01}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconScale","iconSize","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconScale.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.alignment.display.enabled",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.alignA.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconScale"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Df],panelIds:["general","typeStyle"],stateItems:{default:["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],hover:["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],active:["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"]}},states:["default","hover","active"],statesByLayout:{m:["default","active"],t:["default","active"]}},Gf={element:Bf,id:"simple-button",name:"Simple Button",category:"dev",version:1,defaultSize:{d:{width:200,height:100},m:{width:160,height:80}},schema:Vf,sourceCode:jf,assetsPaths:{content:[],parameters:[{path:"settings.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}},qf=[ou,uu,$f,Qu,lp,vp,Fp,Bp,Kp,gm,lg,dh,xh,tf,mf,Wf,Gf];exports.components=qf;exports.isSchemaV1=Xl;